bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] mkdir.m4 under MinGW (2)


From: Manu
Subject: [patch] mkdir.m4 under MinGW (2)
Date: Sun, 16 Nov 2003 03:22:46 +0100

I found precisely why mkdir.m4 returns "yes" under
MinGW.
The following compiles fine with one warning:

#include <sys/types.h>
#include <sys/stat.h>

int
main ()
{
mkdir ("dir", 0);
  ;
  return 0;
}

Building...
[...]
mkdir.c: In function `main':
mkdir.c:7: warning: implicit declaration of function `mkdir'
Successful (315 ms)

That test __must__ fail indeed.
It just requires unistd.h or io.h to be included:
#include <sys/types.h>
#include <sys/stat.h>

#include <unistd.h>

int
main ()
{
mkdir ("dir", 0);
  ;
  return 0;
}

Building...
[...]
mkdir.c: In function `main':
mkdir.c:9: too many arguments to function `mkdir'
mingw32-make: *** [mkdir.o] Error 1
Error(s)

Then the mkdir test works fine, the first step with
mkdir(foo, bar) fails as expected, and the second
with mkdir(foo) succeeds.

Please merge the attached diff.

Manu.

Attachment: ChangeLog
Description: Binary data

Attachment: patch-2.5.9.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]