From: Michal H. <ms...@gm...> - 2010-10-26 09:57:10
|
Hi, On Mon, Oct 25, 2010 at 08:31:35PM -0400, Robert S. Kissel wrote: > I've sent a zip file containing a transcript of the build, with its > error, the output of running configure, and the cygwin stdlib.h from > /usr/include, to Michal Hocko. As you can see in the make output (which also includes output from configure) the test for mkstemp passed: checking for popen... yes checking for mkstemp... yes checking for mkstemps... yes So there must be a problem with the way how we compile the sources. The configure test is as simplistic as possible (just an include with the function call compiled with minimal compiler flags). I guess that our building environment is too strict for your cygwin. Let's see what we have in the header file: #ifndef __STRICT_ANSI__ #ifndef _REENT_ONLY char * _EXFUN(mkdtemp,(char *)); int _EXFUN(mkostemp,(char *, int)); int _EXFUN(mkostemps,(char *, int, int)); int _EXFUN(mkstemp,(char *)); int _EXFUN(mkstemps,(char *, int)); char * _EXFUN(mktemp,(char *) _ATTRIBUTE ((__warning__ ("the use of `mktemp' is dangerous; use `mkstemp' instead")))); #endif There is no other definition of mkstemp in the header (it can be also in some of the headers that are included from this one, of course). What surprises me here is that this code is defined only if __STRICT_ANSI__ is not defined. This macro is defined if -ansi parameter is used for gcc/g++. From man page: " -ansi In C mode, support all ISO C90 programs. In C ++ mode, remove GNU extensions that conflict with ISO C ++ . [...] The macro "__STRICT_ANSI__" is predefined when the -ansi option is used. Some header files may notice this macro and refrain from declaring certain functions or defining certain macros that the ISO standard doesn't call for; this is to avoid interfering with any programs that might use these names for other things. " So I guess that cygwin headers are too strict in this direction. So please try to remove -ansi parameter from both CONFIG_CFLAGS and CONFIG_CXXFLAGS variables (do not run configure again, just run make). I will update our configure system if it helps. Thanks -- Michal Hocko |