taskThe GNU Hurd - Tasks: task #6615, Mig should output const in...

 
 

task #6615: Mig should output const in generated prototypes

Submitted by:  Samuel Thibault <sthibaul>
Submitted on:  Sat 10 Mar 2007 10:54:09 PM UTC  
 
Category: GNU MIGShould Start On: Fri 09 Mar 2007 11:00:00 PM UTC
Should be Finished on: Fri 09 Mar 2007 11:00:00 PM UTCPriority: 1 - Later
Status: In ProgressPrivacy: Public
Percent Complete: 0%Assigned to: Thomas Schwinge <tschwinge>
Open/Closed: OpenPlanned Release: None
Effort: 0.00
Wiki-like text discussion box: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 29 Jul 2008 09:45:33 AM UTC, comment #1:

One thing is to have the MIG-generated user stubs use `const' where appropriate for IN parameters. Another thing is to have the server routines (Hurd servers, etc.) use `const' where appropriate for IN parameters and have the MIG-generated server stubs adhere to that. I'm testing patches for both of these and also already (locally, not yet pushed) did changes to the Hurd (quite a few, obviously, but trivial) and glibc (not many) source code to make them compile again. Lacking a proper system at the moment, I have not yet tried to run the resulting binaries.

Thomas Schwinge <tschwinge>
Project AdministratorIn charge of this item.
Sat 10 Mar 2007 10:54:09 PM UTC, original submission:

For instance, GNU Mach's include/device/device.defs declares

routine device_write(
device : device_t;
sreplyport reply_port : reply_port_t;
in mode : dev_mode_t;
in recnum : recnum_t;
in data : io_buf_ptr_t;
out bytes_written : int
);

which results to the following device_write prototype:

kern_return_t device_write
(
mach_port_t device,
dev_mode_t mode,
recnum_t recnum,
io_buf_ptr_t data,
mach_msg_type_number_t dataCnt,
int *bytes_written
);

memory pointed to by data is provided by the client and not modified by the server, so in this case "const" should be output just before io_buf_ptr_t.

That fix makes a lot of sense and would drop a bunch of spurious warnings in the glibc compilation log.

Samuel Thibault <sthibaul>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by tschwinge (Posted a comment)
  • -unavailable- added by sthibaul (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 29 Jul 2008 09:45:33 AM UTCtschwingeStatusNone=>In Progress
      Assigned toNone=>tschwinge

    Back to the top


    Powered by Savane 3.1-cleanup