Ben Fritz wrote: > So, I know this is a very old system, but I've been self-compiling Vim > on it successfully for some years now (I'm not an admin on the > system): > > $ cat /etc/release > Solaris 9 12/03 s9s_u5wos_08b SPARC > Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. > Use is subject to license terms. > Assembled 21 November 2003 > $ gcc --version > 2.95.2 > > > > Trying to compile Vim, starting at patch 8.0.0219 (found by bisect) gives > either an error in eval.c: > > gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF -I/usr/dt/include -g > -O2 -I/usr/openwin/include -o objects/eval.o eval.c > eval.c: In function `eval6': > eval.c:4113: `INT_MIN' undeclared (first use in this function) > eval.c:4113: (Each undeclared identifier is reported only once > eval.c:4113: for each function it appears in.) > eval.c:4115: `INT_MAX' undeclared (first use in this function) > *** Error code 1 > make: Fatal error: Command failed for target `objects/eval.o' > > > > ...or this error in charset.c: > > gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF -I/usr/dt/include -g > -O2 -I/usr/openwin/include -o objects/charset.o charset.c > charset.c: In function `vim_str2nr': > charset.c:1905: `UINT_MAX' undeclared (first use in this function) > charset.c:1905: (Each undeclared identifier is reported only once > charset.c:1905: for each function it appears in.) > charset.c:1971: `INT_MAX' undeclared (first use in this function) > charset.c:1972: `INT_MIN' undeclared (first use in this function) > *** Error code 1 > make: Fatal error: Command failed for target `objects/charset.o' > > > > Editing src/structs.h to insert the following line allows me to compile, but > possibly it needs to be wrapped in some conditional preprocesser logic: > > #include <limits.h>
Yes, we use INT_MIN and INT_MAX without including limits.h. We rely on it being included indirectly, which is not good. I believe limits.h is very, very old, thus we can just include it. The check in os_unixx.h is actually invalid, HAVE_LIMITS_H is never defined. -- Q: What's a light-year? A: One-third less calories than a regular year. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
