This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug? on mkstemp


I don't know why the parse error occurs when compile the following file.

   gcc -c conf.c  is working well.

But, 

   c++ -c conf.C fails :

   conf.C  :  parse error before 'templete'

Is this a BUG ?

By the way, I couldn't find where mkstemp is declared.
Could not find it in <stdio.h>, nor in <stdlib.h>

--------------------
conf.c
--------------------
#include <stdio.h>
#include <sys/param.h>

#ifdef __cplusplus
extern "C"
#endif

int mkstemp(char * template);

int main() {

   char path[MAXPATHLEN];
   int fd;
   sprintf(path,"/tmp/test.XXXXXX");
   fd = mkstemp(path);
   return 0;
}
----------------------

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]