bug-gnulib
[Top][All Lists]
Advanced

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

Re: gnulib bugs on OSX & C++


From: Jim Meyering
Subject: Re: gnulib bugs on OSX & C++
Date: Sat, 10 Apr 2010 11:52:55 +0200

Bruno Haible wrote:

> Hi Jim,
>
> Jarno Rajahalme wrote:
>> Here is a simple program to demonstrate two problems with current gnulib:
>>
>> file main.cc:
>>
>> // config.h defines GNULIB_NAMESPACE as gnulib
>> #include <config.h>
>> #include <string.h>
>> #include <unistd.h>
>> #include <stdio.h>
>>
>> int main()
>> {
>>   char * dir = gnulib::strndup(gnulib::getcwd(NULL, 32), 
>> gnulib::strnlen("Hello!", 5));
>>   int fd = gnulib::open("hopefully non-existent file", O_RDONLY);
>>   gnulib::fprintf(stdout, "Current Working Directory truncated to 5 
>> characters: %s\n", dir);
>>   gnulib::close(fd);
>>   return 0;
>> }
>>
>>
>> Compiling this with GCC 4.4.3 on OSX 10.6.3 produces two problems:
>>
>> 1. compiling main.cc fails:
>>
>> g++-mp-4.4 -DHAVE_CONFIG_H -I. -I..  -I../lib -g  -g -O2 -MT main.o -MD -MP 
>> -MF .deps/main.Tpo -c -o main.o main.cc
>> In file included from main.cc:4:
>> ../lib/unistd.h:730: error: 'fchownat' was not declared in this scope
>> ../lib/unistd.h:730: error: invalid type in declaration before ';' token
>
> I've already posted a fix for this on Monday (the same problem occurred
> on Solaris):

Sorry I didn't reply sooner.

> <http://lists.gnu.org/archive/html/bug-gnulib/2010-04/msg00075.html>
> Is it ok to apply it?

Yes, please.
I'll correct the formatting afterward.




reply via email to

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