On Wed, 2009-03-11 at 12:53 +0800, Ginn Chen wrote: > > On Mar 11, 2009, at 8:22 AM, Ke Wang wrote: > > > > > On Tue, 2009-03-10 at 19:30 +0800, Ginn Chen wrote: > > > What's the problem you're trying to fix? > > > > System header files have been updated recently and this makes > > libproxy > > do not compile with _POSIX_C_SOURCE defined. > > > What's the exact error message?
pkgbuild: "/usr/include/dlfcn.h", line 87: syntax error before or at: mmapobj_result_t > I guess you should change the value of _POSIX_C_SOURCE rather than > define _GNU_SOURCE I find the definition of mmapobj_result_t in /usr/include/sys/mman.h is enclosed in the conditional macro #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) But in /usr/include/dlfcn.h, where mmapobj_result_t is used, the corresponding code is enclosed in the conditional macro #if !defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) In /usr/include/sys/feature_test.h, I find the following macro definition: #if defined(_XOPEN_SOURCE) || defined(_POSIX_C_SOURCE) #define __XOPEN_OR_POSIX #endif This shows that __XOPEN_OR_POSIX is a superset of _XOPEN_SOURCE, so if we only define _POSIX_C_SOURCE, the definition of mmapobj_result_t in sys/mman.h will be excluded while it is being used in dlfcn.h. I don't know why two different conditional macros are used. Perhaps this is a bug? BTW, I don't find the _GNU_SOURCE in sys/feature_test.h, so I think this macro is not used in Solaris, and the "-D_GNU_SOURCE" will not make sense. The result will be the same as just removing "_D_POSIX_C_SOURCE", so I'll update the patch to remove "-D_GNU_SOURCE". Attached the updated patch. > > > Ginn > > > -------- > Ginn Chen > Software Engineer, Browser Team > Sun Microsystems, Inc. > Phone: x82869 / +86-10-62673869 > Fax: +86-10-62780969 > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: libproxy-05-config-posix.diff Type: text/x-patch Size: 588 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/jds-review/attachments/20090311/a27e3190/attachment.bin>
