|
Christian Leutloff
12/13/2007 5:10 AM
post3729
|
unistd.h fails when -std=c99 is defined
Some packages of pkgsrc are triggering this error message:
/usr/qnx632/target/qnx6/usr/include/unistd.h:135:2: #error _POSIX_VERSION not configured for system
Here is a small example to verify the behavior:
$ cat unistd.c
#include <unistd.h>
$ cc unistd.c
(no messages -> works)
$ cc -std=c99 unistd.c
In file included from unistd.c:1:
/usr/qnx632/target/qnx6/usr/include/unistd.h:135:2: #error _POSIX_VERSION not configured for system
$ cc --version
cc (GCC) 3.3.5 (qnx-nto)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I'm using the Momentics 6.3.2 plus the utility package of pkgsrc.
Cited from the gcc 3.3.5 manual:
-std=
Determine the language standard. This option is currently only supported when compiling C or C++. A value for this
option must be provided; possible values are
[...]
`c99'
ISO C99. Note that this standard is not yet fully supported; see http://gcc.gnu.org/gcc-3.3/c99status.html for
more information. The names `c9x' and `iso9899:199x' are deprecated.
Here is another example of the same error that is NOT related to the std option:
package devel/py-gobject in directory
/usr/src/HEAD/pkgsrc/devel/py-gobject/work/pygobject-2.12.3/gobject:
cc -DHAVE_CONFIG_H -I. -I.. -I/usr/src/HEAD/pkgsrc/devel/py-gobject/work/.buildlink/include/python2.4 -D_REENTRANT -I/
usr/src/HEAD/pkgsrc/devel/py-gobject/work/.buildlink/include/glib/glib-2.0 -I/usr/src/HEAD/pkgsrc/devel/py-gobject/work/
.buildlink/lib/glib-2.0/include -DPY_SSIZE_T_CLEAN -I/usr/src/HEAD/pkgsrc/devel/py-gobject/work/.buildlink/include -O2 -
Wall -std=c9x -fno-strict-aliasing -MT _gobject_la-gobjectmodule.lo -MD -MP -MF .deps/_gobject_la-gobjectmodule.Tpo -c
gobjectmodule.c -fPIC -DPIC -o .libs/_gobject_la-gobjectmodule.o
In file included from /usr/src/HEAD/pkgsrc/devel/py-gobject/work/.buildlink/include/python2.4/Python.h:41,
from pygobject.h:5,
from pygobject-private.h:9,
from gobjectmodule.c:27:
/usr/qnx632/target/qnx6/usr/include/unistd.h:135:2: #error _POSIX_VERSION not configured for system
|
|
|
|
|