delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/12/06/01:10:32

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <002901c05f4b$90efe280$8b0c4ea8@kepri.re.kr>
From: "Jong B. Lee" <jbdoll AT kepri DOT re DOT kr>
To: <cygwin AT sources DOT redhat DOT com>
Subject: Bug? on mkstemp
Date: Wed, 6 Dec 2000 15:12:51 +0900
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id BAA31564

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;
}
----------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019