[LLVMdev] [Cygwin] The mkdtemp() error

Aaron Gray angray at beeb.net
Wed Jun 1 06:45:12 PDT 2005


>Just an aside .. are you putting these Cygwin installs on the same box?
>Can you do that? I didn't think it was allowed.

Ahh, we have ways of renaming directories :)

I do have a second machine but I have to juggle the disk partitions to make enough room so I have not been able to use that. Besides for some reason it did not want to build binutils-2.15 :(

Okay it looks like the newer "uptodate" Cygwin has a problem with mkdtemp(). It looks like 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 !

Well, thats thats the easy but annoying one. Have to either hand edit the config.h or do a patch on it for now until the Cygwin crew get it together to correct this half implemented function.

Do you think it is worth reporting it to the Cygwin mailing list ?


As for LLVM I will have to rerun the tests as I have confused myself to what is going on now. It is strange that the old configuration did not work again, very strange.

Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050601/563dde4e/attachment.html>


More information about the llvm-dev mailing list