After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676511 - mkdir on win32 has only one parameter
mkdir on win32 has only one parameter
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
unspecified
Other Windows
: Urgent normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-21 17:38 UTC by Juan Pablo Ugarte
Modified: 2014-07-21 11:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix mingw-w64 build (1.05 KB, patch)
2013-10-07 17:48 UTC, Lars Kanis
reviewed Details | Review

Description Juan Pablo Ugarte 2012-05-21 17:38:08 UTC
While cross compiling libxslt for mingw host I found that in libxslt/security.c
mkdir() is used with two arguments which fails
adding a line like this around line #41
#define mkdir(a,b) mkdir(a)
fixes the problem
Comment 1 Lars Kanis 2013-10-07 17:45:47 UTC
I can confirm this issue.

With mingw32 (i586-mingw32msvc-gcc version 4.2.1) it builds, but warns with:
  CC     security.lo
security.c: In function 'xsltCheckWritePath':
security.c:346: warning: implicit declaration of function 'mkdir'


With mingw-w64 (i686-w64-mingw32-gcc or x86_64-w64-mingw32-gcc version 4.7.2) it does not build:

make  all-recursive
make[1]: Entering directory `/vagrant/nokogiri/tmp/x86-mingw32/nokogiri/2.0.0/tmp/i686-w64-mingw32/ports/libxslt/1.1.28/libxslt-1.1.28'
Making all in libxslt
make[2]: Entering directory `/vagrant/nokogiri/tmp/x86-mingw32/nokogiri/2.0.0/tmp/i686-w64-mingw32/ports/libxslt/1.1.28/libxslt-1.1.28/libxslt'
[...]
  CC     security.lo
security.c: In function 'xsltCheckWritePath':
security.c:346:3: error: too many arguments to function 'mkdir'
In file included from /home/vagrant/mingw/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/sys/stat.h:14:0,
                 from security.c:18:
/home/vagrant/mingw/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/io.h:267:15: note: declared here
make[2]: *** [security.lo] Error 1
make[2]: Leaving directory `/vagrant/nokogiri/tmp/x86-mingw32/nokogiri/2.0.0/tmp/i686-w64-mingw32/ports/libxslt/1.1.28/libxslt-1.1.28/libxslt'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/vagrant/nokogiri/tmp/x86-mingw32/nokogiri/2.0.0/tmp/i686-w64-mingw32/ports/libxslt/1.1.28/libxslt-1.1.28'
make: *** [all] Error 2


Attached you can find a patch to fix this.
Comment 2 Lars Kanis 2013-10-07 17:48:54 UTC
Created attachment 256651 [details] [review]
Fix mingw-w64 build

This patch is used to build nokogiri for windows: https://github.com/sparklemotion/nokogiri/pull/976
Comment 3 Lars Kanis 2013-10-21 19:06:50 UTC
Can I do something that makes it easier for you to review/merge this patch?
Comment 4 Juan Pablo Ugarte 2013-10-22 03:47:19 UTC
(In reply to comment #3)
> Can I do something that makes it easier for you to review/merge this patch?

hmm Are you asking me? because I am not an libxslt developer
Comment 5 LRN 2014-07-21 09:04:11 UTC
Review of attachment 256651 [details] [review]:

Patch looks OK.
Whether the use of _MSC_VER || __MINGW32__ instead of _WIN32 is justified or not is an open question. Better ask libxslt maintainers about it.
Comment 6 Ignacio Casal Quinteiro (nacho) 2014-07-21 09:12:26 UTC
Raising importance of the bug report since this is a compilation error.
Comment 7 Daniel Veillard 2014-07-21 11:55:38 UTC
Hum, indeed I hadn't seen it so far, patch looks fine, applied and pushed to
git and pushed,

https://git.gnome.org/browse/libxslt/commit/?id=ab5810bf27cd63b6914143d084f7cdb7d08b03da

  I will never see those as I never use windows or compile for it myself,

     thanks !

Daniel