Tom, The below for HAVE_REALPATH is undoubtedly the exact same issue. Either the test is early, cache is old, or we need to account for declaration.
Assuming the latter, there is a decision to be made. I'm inclined to still use a function when it exists (particularly for POSIX functions) regardless of it being declared. The code still has to deal with it not existing (hence the HAVE_ wrapping) so portability is managed, but we won't unnecessarily cripple the implementation. Basically, it'll mean adding additional checks for declaration and defining such c99/posix functions in a compat header (wrapped in HAVE_DECL_* blocks). Cheers! Sean On Sep 29, 2013, at 6:32 PM, [email protected] wrote: > Revision: 57953 > http://sourceforge.net/p/brlcad/code/57953 > Author: tbrowder2 > Date: 2013-09-29 22:32:51 +0000 (Sun, 29 Sep 2013) > Log Message: > ----------- > add FIXME for C99 compliance thats a little more complicated > > Modified Paths: > -------------- > brlcad/trunk/src/libbu/getcwd.c > > Modified: brlcad/trunk/src/libbu/getcwd.c > =================================================================== > --- brlcad/trunk/src/libbu/getcwd.c 2013-09-29 22:28:23 UTC (rev 57952) > +++ brlcad/trunk/src/libbu/getcwd.c 2013-09-29 22:32:51 UTC (rev 57953) > @@ -60,7 +60,8 @@ > && bu_file_exists(cwd, NULL)) > { > #ifdef HAVE_REALPATH > - rwd = realpath(cbuf, rbuf); > + /* FIXME: shouldn't have gotten here with -std=c99 (HAVE_REALPATH test > not working right?) */ > + rwd = bu_realpath(cbuf, rbuf); > if (rwd > && strlen(rwd) > 0 > && bu_file_exists(rwd, NULL)) > > This was sent by the SourceForge.net collaborative development platform, the > world's largest Open Source development site. > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk > _______________________________________________ > BRL-CAD Source Commits mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/brlcad-commits ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ BRL-CAD Developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/brlcad-devel
