problem solved: par, mingw win32, compilation failure

fireartist on 2005-10-17T09:23:15

Compilation of PAR 0.89 fails with this error message:

>dmake
gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_
SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX  -I"C:\usr\local\perl\lib\CORE" s
tatic.c
In file included from c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/
fcntl.h:20,
                 from mktmpdir.h:3,
                 from mktmpdir.c:1,
                 from static.c:8:
c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/io.h:162:39: macro "mk
dir" requires 2 arguments, but only 1 given
dmake:  Error code 129, while making 'static.o'
dmake:  Error code 255, while making 'subdirs'

Solution: Near the top of the PAR file "myldr/static.c" change this:

#ifdef WIN32
# include 
# define mkdir(file, mode) _mkdir(file)
#endif

to this (just add the io.h line):

#ifdef WIN32
# include 
# include 
# define mkdir(file, mode) _mkdir(file)
#endif

keywords: PAR, mingw, perl, windows, win32, mkdir, compilation failure

Reference:


Re: problem solved: par, mingw win32, compilation

fireartist on 2006-01-24T15:20:12

btw, this is fixed in bleadperl