On Mon, 15 Jan 2007, Hugh Sasse wrote: > On Sat, 13 Jan 2007, Kevin Ryde wrote: > > > You might be able to just stick in a prototype, > > Tried to do that, it still complained about it. > > or alternately just > > "./configure --disable-error-on-warning". > > Hmmmm, I'll give that a go.
Right, I got this: if /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -g -O2 -Wall -Wmissing-prototypes -MT posix.lo -MD -MP -MF ".deps/posix.Tpo" -c -o posix.lo posix.c; \ then mv -f ".deps/posix.Tpo" ".deps/posix.Plo"; else rm -f ".deps/posix.Tpo"; exit 1; fi gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -g -O2 -Wall -Wmissing-prototypes -MT posix.lo -MD -MP -MF .deps/posix.Tpo -c posix.c -fPIC -DPIC -o .libs/posix.o posix.c: In function 'scm_putenv': posix.c:1332: error: 'len' undeclared (first use in this function) posix.c:1332: error: (Each undeclared identifier is reported only once posix.c:1332: error: for each function it appears in.) gmake[3]: *** [posix.lo] Error 1 gmake[3]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/libguile' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/libguile' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1' gmake: *** [all] Error 2 bash-2.05$ bash-2.05$ ggrep -n -C 2 '\<len\>' posix.c 1314- char *c_str = scm_to_locale_string (str); 1315-#ifdef __MINGW32__ 1316: size_t len = strlen (c_str); 1317-#endif 1318- -- 1330- environment variable 'name'. */ 1331- int e; 1332: char *ptr = scm_malloc (len + 2); 1333- strcpy (ptr, c_str); 1334: strcpy (ptr+len, "="); 1335- rv = putenv (ptr); 1336- e = errno; free (ptr); free (c_str); errno = e; -- 1349- because MINGW putenv copies it. */ 1350- 1351: if (c_str[len-1] == '=') 1352- { 1353: char *ptr = scm_malloc (len+2); 1354- strcpy (ptr, c_str); 1355: strcpy (ptr+len, " "); 1356- rv = putenv (ptr); 1357- if (rv < 0) -- 1363- } 1364- /* truncate to just the name */ 1365: c_str[len-1] = '\0'; 1366- ptr = getenv (c_str); 1367- if (ptr) -- 1592-{ 1593- static char user[256]; 1594: static unsigned long len = 256; 1595- 1596: if (!GetUserName (user, &len)) 1597- return NULL; 1598- return user; -- 1745-static int flock (int fd, int operation) 1746-{ 1747: long pos, len; 1748- int ret, err; 1749- -- 1771- 1772- /* Save current file pointer and seek to beginning. */ 1773: if ((pos = lseek (fd, 0, SEEK_CUR)) == -1 || (len = filelength (fd)) == -1) 1774- return -1; 1775- lseek (fd, 0L, SEEK_SET); -- 1778- do 1779- { 1780: ret = _locking (fd, operation, len); 1781- } 1782- while (ret == -1 && errno == EDEADLOCK); -- 1871- /* Various systems define MAXHOSTNAMELEN (including Solaris in fact). 1872- * On GNU/Linux this doesn't include the terminating '\0', hence "+ 1". */ 1873: const int len = MAXHOSTNAMELEN + 1; 1874: char *const p = scm_malloc (len); 1875: const int res = gethostname (p, len); 1876- 1877- scm_dynwind_begin (0); -- 1882- /* Default 256 is for Solaris, under Linux ENAMETOOLONG is returned if not 1883- * large enough. SUSv2 specifies 255 maximum too, apparently. */ 1884: int len = 256; 1885- int res; 1886- char *p; -- 1895- const long int n = sysconf (_SC_HOST_NAME_MAX); 1896- if (n != -1L) 1897: len = n; 1898- } 1899- 1900-# endif 1901- 1902: p = scm_malloc (len); 1903- 1904- scm_dynwind_begin (0); 1905- scm_dynwind_unwind_handler (free, p, 0); 1906- 1907: res = gethostname (p, len); 1908- while (res == -1 && errno == ENAMETOOLONG) 1909- { 1910: len *= 2; 1911- 1912- /* scm_realloc may throw an exception. */ 1913: p = scm_realloc (p, len); 1914: res = gethostname (p, len); 1915- } 1916- bash-2.05$ Hugh _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user