GNOME Bugzilla – Bug 445270
games-setgid doesn't compile with mingw32
Last modified: 2009-07-11 14:37:30 UTC
games-setgid doesn't compile with mingw32: In file included from games-setgid-io.c:64: C:/MinGW/include/stdlib.h:314: warning: no previous prototype for 'strtof' C:/MinGW/include/stdlib.h:326: warning: no previous prototype for 'wcstof' C:/MinGW/include/stdlib.h:472: warning: no previous prototype for 'llabs' In file included from C:/MinGW/include/unistd.h:10, from games-setgid-io.c:65: C:/MinGW/include/io.h:150: warning: no previous prototype for 'lseek64' In file included from games-setgid-io.c:67: C:/MinGW/include/string.h:97: warning: no previous prototype for 'strcasecmp' C:/MinGW/include/string.h:103: warning: no previous prototype for 'strncasecmp' games-setgid-io.c: In function `write_n_bytes': games-setgid-io.c:108: warning: pointer of type `void *' used in arithmetic games-setgid-io.c: In function `read_n_bytes': games-setgid-io.c:125: warning: pointer of type `void *' used in arithmetic games-setgid-io.c: In function `setgid_io_lock_priv': games-setgid-io.c:350: error: storage size of 'lock' isn't known games-setgid-io.c:354: error: `F_WRLCK' undeclared (first use in this function) games-setgid-io.c:354: error: (Each undeclared identifier is reported only once games-setgid-io.c:354: error: for each function it appears in.) games-setgid-io.c:355: error: `SEEK_SET' undeclared (first use in this function) games-setgid-io.c:359: warning: implicit declaration of function `fcntl' games-setgid-io.c:359: warning: nested extern declaration of `fcntl' games-setgid-io.c:359: error: `F_SETLKW' undeclared (first use in this function) games-setgid-io.c:350: warning: unused variable `lock' games-setgid-io.c: In function `setgid_io_unlock_priv': games-setgid-io.c:380: error: storage size of 'lock' isn't known games-setgid-io.c:384: error: `F_UNLCK' undeclared (first use in this function) games-setgid-io.c:385: error: `SEEK_SET' undeclared (first use in this function) games-setgid-io.c:389: warning: nested extern declaration of `fcntl' games-setgid-io.c:389: error: `F_SETLKW' undeclared (first use in this function) games-setgid-io.c:380: warning: unused variable `lock' games-setgid-io.c: In function `setgid_io_pipe_watcher': games-setgid-io.c:459: error: `fd_set' undeclared (first use in this function) games-setgid-io.c:459: error: syntax error before "watchfds" games-setgid-io.c:463: warning: implicit declaration of function `FD_ZERO' games-setgid-io.c:463: warning: nested extern declaration of `FD_ZERO' games-setgid-io.c:463: error: `watchfds' undeclared (first use in this function) games-setgid-io.c:464: warning: implicit declaration of function `FD_SET' games-setgid-io.c:464: warning: nested extern declaration of `FD_SET' games-setgid-io.c:467: warning: implicit declaration of function `select' games-setgid-io.c:467: warning: nested extern declaration of `select' games-setgid-io.c: In function `setgid_io_init': games-setgid-io.c:510: error: `gid_t' undeclared (first use in this function) games-setgid-io.c:510: error: syntax error before "safegid" games-setgid-io.c:519: warning: implicit declaration of function `fork' games-setgid-io.c:519: warning: nested extern declaration of `fork' games-setgid-io.c:526: error: `safegid' undeclared (first use in this function) games-setgid-io.c:526: warning: implicit declaration of function `getgid' games-setgid-io.c:526: warning: nested extern declaration of `getgid' games-setgid-io.c:527: warning: implicit declaration of function `setregid' games-setgid-io.c:527: warning: nested extern declaration of `setregid' games-setgid-io.c:531: error: `STDIN_FILENO' undeclared (first use in this function) make[2]: *** [libgames_support_la-games-setgid-io.lo] Error 1 make[2]: Leaving directory `/c/devel/gnome-games-2.19.3/libgames-support' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/c/devel/gnome-games-2.19.3' make: *** [all] Error 2
Re-assigning to new default owner.
This code looks highly unsuitable for win32; it should probably be ifdef'd out in the Makefile (not even built on win32).
Should be fixed on master. I fixed Makefile.am to only build games-setgid-io when --enable-setgid is passed, and made that default to off on win32. Of course, no scores are kept at all when --disable-setgid, as before.