Where defined F_* constants for rts.c?
../.././xgcc -B/usr/local/i386-pc-os2_emx/bin/ -B../.././ -I/usr/local/i386-pc-os2_emx/include -c -I. -W -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -g -O2 -DRTS_RELEASE_STRING="'`cat /gpc/pgcc-2.95.3/gcc/p/rts/rts-version`'" rts.c rts.c: In function `_p_Real_Ln1Plus': rts.c:717: warning: unused parameter `x' rts.c: In function `_p_Mode2SysMode': rts.c:1566: `S_IRUSR' undeclared (first use in this function) rts.c:1566: (Each undeclared identifier is reported only once rts.c:1566: for each function it appears in.) rts.c:1566: `S_IWUSR' undeclared (first use in this function) rts.c:1566: `S_IXUSR' undeclared (first use in this function) rts.c:1567: warning: control reaches end of non-void function rts.c: In function `_p_SysMode2Mode': rts.c:1571: `S_IRUSR' undeclared (first use in this function) rts.c:1571: `S_IWUSR' undeclared (first use in this function) rts.c:1571: `S_IXUSR' undeclared (first use in this function) rts.c:1572: warning: control reaches end of non-void function rts.c: In function `_p_Stat': rts.c:1610: storage size of `st' isn't known rts.c:1614: warning: implicit declaration of function `stat' rts.c:1635: warning: implicit declaration of function `S_ISDIR' rts.c:1610: warning: unused variable `st' rts.c: In function `_p_FlushHandle': rts.c:1682: warning: implicit declaration of function `fsync' rts.c: In function `_p_CStringChMod': rts.c:1757: warning: implicit declaration of function `chmod' rts.c: In function `_p_TruncateHandle': rts.c:1841: warning: implicit declaration of function `ftruncate' rts.c: In function `_p_LockHandle': rts.c:1855: storage size of `Lock' isn't known rts.c:1858: `F_WRLCK' undeclared (first use in this function) rts.c:1858: `F_RDLCK' undeclared (first use in this function) rts.c:1861: `F_SETLKW' undeclared (first use in this function) rts.c:1861: `F_SETLK' undeclared (first use in this function) rts.c:1855: warning: unused variable `Lock' rts.c: In function `_p_UnlockHandle': rts.c:1876: storage size of `Lock' isn't known rts.c:1879: `F_UNLCK' undeclared (first use in this function) rts.c:1882: `F_SETLK' undeclared (first use in this function) rts.c:1876: warning: unused variable `Lock' make[1]: *** [rts.o] Error 1 make[1]: Leaving directory `/gpc/pgcc-2.95.3/gcc/p/rts' make: *** [pascal.rts] Error 2
Yuri Prokushev wrote:
Where defined F_* constants for rts.c?
rts.c:1566: `S_IRUSR' undeclared (first use in this function) rts.c:1566: `S_IWUSR' undeclared (first use in this function) rts.c:1566: `S_IXUSR' undeclared (first use in this function) rts.c:1635: warning: implicit declaration of function `S_ISDIR'
These should be defined in <sys/stat.h> or some other system header.
rts.c: In function `_p_FlushHandle': rts.c:1682: warning: implicit declaration of function `fsync'
This code is enclosed in `#ifdef HAVE_FSYNC'. Similar for other functions (and the F_* constants which are in `#ifdef HAVE_FCNTL').
Since HAVE_FSYNC is set (by configure, unless you changed this manually), I assume your system does in fact have these functions, but it's missing the declarations in the headers (as for the S_* constants).
This is for EMX, is it? Well, I haven't used EMX myself so I don't know what its headers look like. Perhaps you just have to include some more header (if I know which one, I can do it automatically in the future, but you can try adding #include statements in rts.c manually).
Is anyone on this lists who's used EMX recently? I haven't heard much of it for some years ...
Frank