[Gd-chatter] [Bug 7368] New: Posix support

bugzilla-daemon at gwydiondylan.org bugzilla-daemon at gwydiondylan.org
Fri Feb 15 03:32:06 CET 2008


http://www.gwydiondylan.org/cgi-bin/bugzilla/show_bug.cgi?id=7368

           Summary: Posix support
           Product: build
           Version: unspecified
          Platform: Macintosh
        OS/Version: Mac OS
            Status: NEW
          Severity: normal
          Priority: P2
         Component: other
        AssignedTo: d_j_v at mac.com
        ReportedBy: d_j_v at mac.com
                CC: gd-chatter at gwydiondylan.org


The Mac OS X build fails, reporting that 'struct stat' has no member named
'st_ctimespec'.

The cause of this message is that

1. Melange can only handle OS X headers if _POSIX_C_SOURCE is defined;
therefore, d2c and gcc also need _POSIX_C_SOURCE defined so that datatypes are
in agreement between the three of them;
2. _POSIX_C_SOURCE removes st_ctimespec and other fields from the stat
structure;
3. unix-portability.c relies on configure to determine if it should use
st_ctimespec;
4. configure does not define _POSIX_C_SOURCE when testing the stat structure;
so
5. unix-portability.c thinks st_ctimespec is present and attempts to use that
field, though it isn't actually defined.

This may be causing a problem with Ubuntu as well.

Solution:

First, make it so _POSIX_C_SOURCE is only defined for certain platforms.
Cleanest way to do this is probably to add a new field to platforms.descr for
defines of this type.

Second, alter configure so that it uses such platform-specific defines when
building and running its tests.


-- 
Configure bugmail: http://www.gwydiondylan.org/cgi-bin/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the chatter mailing list