about summary refs log tree commit diff
path: root/doc/INSTALL
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-06-30 03:27:10 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-06-30 03:27:10 +0000
commit08d938dc6fc6b30e5da6733b52c97169c0d24f8a (patch)
tree92673cd6a5755fc209078cc6b6a42602defc0212 /doc/INSTALL
parente21f4e95d897c93a4779bf78c71f1341d164a222 (diff)
downloadnetpbm-mirror-08d938dc6fc6b30e5da6733b52c97169c0d24f8a.tar.gz
netpbm-mirror-08d938dc6fc6b30e5da6733b52c97169c0d24f8a.tar.xz
netpbm-mirror-08d938dc6fc6b30e5da6733b52c97169c0d24f8a.zip
Copy Development as new Advanced
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@3018 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'doc/INSTALL')
-rw-r--r--doc/INSTALL41
1 files changed, 39 insertions, 2 deletions
diff --git a/doc/INSTALL b/doc/INSTALL
index a71e5179..39bbc0a5 100644
--- a/doc/INSTALL
+++ b/doc/INSTALL
@@ -182,6 +182,45 @@ Netpbm has also been built for Windows using Djgpp, as late as 2001.
 
 See also the general installation instructions above.
 
+Mingw Modification
+-------------------
+
+With at least some versions of MinGW, you have to make a small change to
+_mingw.h or you get a compilation failure for invalid syntax in that file
+where it expands the macro _XOPEN_SOURCE.
+
+The problem is that many Netpbm programs declare that they need a C library
+that conforms to any version of the X/Open (XPG, XSI, SUS) standard.  The way
+they do that is, in accordance with the earliest version of that standard, by
+defining the macro _XOPEN_SOURCE with a null (zero-length) body.  But MinGW is
+not designed to work with programs that request anything earlier than Issue
+(version) 5 of this standard, and in fact _mingw.h will not compile if the
+macro expands to something other than a number.
+
+But it is easy to add pre-Issue 5 function to MinGW and having done so, your
+MinGW installation will also work with lots of other code.  All you have to do
+is change
+
+  if _XOPEN_SOURCE < 500
+
+to
+
+  if (_XOPEN_SOURCE + 0) < 500
+
+in _mingw.h.  This is the trick other C libraries use.
+
+(A user proposed that this change be distributed in _mingw.h, in April 2017 on
+the mingw-users mailing list, but the maintainer was opposed to accomodating
+programs written for the older standards).
+
+If you cannot change _mingw.h, you can alternatively change Netpbm.  Find all
+instances of
+
+  #define _XOPEN_SOURCE
+
+and change them to
+
+  #define _XOPEN_SOURCE 0
 
 
 INSTALLATION - MAKING ONLY THE PARTS YOU NEED
@@ -457,5 +496,3 @@ link is picking up the old system version instead.  Why?  Because the link
 options say to search /usr/lib _before_ the local build directory.  And they
 do that because libpng-config erroneously says that you need a -L /usr/lib
 link option to find the Libpng library.
-
-