gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NetBSD & FreeBSD compile problems


From: Richard Frith-Macdonald
Subject: Re: NetBSD & FreeBSD compile problems
Date: Sat, 15 Oct 2011 16:54:59 +0100

On 15 Oct 2011, at 16:05, Wolfgang Lux wrote:

> Riccardo Mottola wrote:
> 
>> sadly, the new fixes by Richard do not improve the situation on NetBSD and 
>> FreeBSD on my systems. How is the situation for others?
>> This is the current error on NetBSD:
>> 
>> Compiling file NSFileManager.m ...
>> In file included from /usr/include/sys/mount.h:39,
>>                from NSFileManager.m:144:
>> /usr/include/sys/ucred.h:45: error: expected specifier-qualifier-list before 
>> 'u_short'
>> In file included from /usr/include/sys/mount.h:46,
>>                from NSFileManager.m:144:
>> /usr/include/sys/lock.h:120: error: expected specifier-qualifier-list before 
>> 'u_int'
>> NSFileManager.m: In function '-[NSFileManager changeCurrentDirectoryPath:]':
>> 
>> 
>> This on FreeBSD:
>> 
>> Compiling file GSHTTPURLHandle.m ...
>> In file included from GSHTTPURLHandle.m:53:
>> /usr/include/sys/file.h:161: error: expected specifier-qualifier-list before 
>> 'u_int'
>> gmake[4]: *** [obj/libgnustep-base.obj/GSHTTPURLHandle.m.o] Error 1
> 
> and this is for OS X:
> 
> Compiling file NSFileManager.m ...
> In file included from /usr/include/sys/attr.h:42:0,
>                 from /usr/include/sys/mount.h:76,
>                 from NSFileManager.m:144:
> /usr/include/sys/ucred.h:91:2: error: unknown type name 'u_long'
> /usr/include/sys/ucred.h:137:9: error: unknown type name 'u_int'
> In file included from /usr/include/sys/mount.h:76:0,
>                 from NSFileManager.m:144:
> /usr/include/sys/attr.h:77:2: error: unknown type name 'u_short'
> /usr/include/sys/attr.h:432:2: error: unknown type name 'u_long'
> /usr/include/sys/attr.h:444:2: error: unknown type name 'u_char'
> 
> BTW, I also noticed a new warning
> Compiling file Unicode.m ...
> Unicode.m: In function 'GSPrivateDefaultCStringEncoding':
> Unicode.m:2683:6: warning: implicit declaration of function 'strcasecmp'
> (and in a few other places, too).
> 
> There seem to be to workarounds for OS X: either not define _POSIX_C_SOURCE 
> or define _DARWIN_C_SOURCE in addition to _POSIX_C_SOURCE.

I think this may be a broadly sysv / bsd split, with systems derived from sysv 
doing it one way and systems derived from bsd tending to do it the other.
I think of Solaris as being a BSD system (as I first knew it when it was very 
closely BSD derived), but when the name was changed from SunOS to Solaris they 
also made it very SysV like.

Anyway, most of what we want POSIX behavior for on Solaris is thread-safety (ie 
thread-safe errno and safer standard library calls) ... and it seems that the 
-pthread option in the compiler actually knows how to do that (ie which macros 
to define) in a platform-specific way ... so I've tried changing gnustep-make 
to use -pthread and removed the macro define from base.

Actually, this is a better solution anyway, as it means that other software 
built with gnustep-make will benefit, not just the base library.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]