> Versions 4.35--4.37 of glpk have failed to build on SGI IRIX MIPS, but > I only today had the time to figure out why.
> The problem is this definition in the native <ctype.h> file: > #define _G 0x40000000 /* Graphic characters only */ > It conflicts with this piece of code in src/glpnet03.c: > int glp_netgen(glp_graph *_G, int _v_rhs, int _a_cap, int _a_cost, > const int parm[1+15]) > The rules of ISO Standard C (1989 and 1999) are that names beginning > with two underscores, and names beginning with an underscore and a > capital letter, are reserved for the implementation. Thus, IRIX is > permitted to define _G as shown above, and glpk is in error in using > that name for its own variables. > As a quick workaround, I made this simple patch to include/glpstd.h: > % diff -c include/glpstd.h.~1~ include/glpstd.h > *** include/glpstd.h.~1~ Sun Mar 29 03:00:00 2009 > --- include/glpstd.h Mon Mar 30 15:33:04 2009 > *************** > *** 37,42 **** > --- 37,44 ---- > #include <string.h> > #include <time.h> > + #undef _G > + > #endif > /* eof */ > The package then built correctly, and passed its validation test. > I suggest changing the initial underscores in local variables > and function arguments to be trailing underscores, in order > to easily avoid vendor namespaces. Thank you for the bug report. Necessary changes will be made in the next release. _______________________________________________ Bug-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-glpk
