delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/06/01/13:44:57

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <005501c566d1$71bb5e70$0500a8c0@AMDLAPTOP1>
From: "Aaron Gray" <angray AT beeb DOT net>
To: <cygwin AT cygwin DOT com>
Subject: mkdtemp() configuration bug
Date: Wed, 1 Jun 2005 18:43:35 +0100
MIME-Version: 1.0
X-IsSubscribed: yes

It looks like the latest Cygwin has a problem with mkdtemp(). mkdtemp() 
exists in a library and is linkable, but there is no function prototype for 
it in the headers.

The configuration system compiles a function :-

/* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char mkdtemp ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined (__stub_mkdtemp) || defined (__stub___mkdtemp)
| choke me
| #else
| char (*f) () = mkdtemp;
| #endif
| #ifdef __cplusplus
| }
| #endif
|
| int
| main ()
| {
| return f != mkdtemp;
|   ;
|   return 0;
| }

It defines 'char mkdtemp()' and links it as it is defined in a library but 
not in a header !

Aaron Gray



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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