about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Makefile.version2
-rw-r--r--converter/other/jpeg2000/jpeg2ktopam.c3
-rw-r--r--converter/other/jpeg2000/pamtojpeg2k.c3
-rw-r--r--doc/HISTORY9
-rw-r--r--editor/pamperspective.c15
5 files changed, 23 insertions, 9 deletions
diff --git a/Makefile.version b/Makefile.version
index 87004e71..5f05dafe 100644
--- a/Makefile.version
+++ b/Makefile.version
@@ -1,3 +1,3 @@
 NETPBM_MAJOR_RELEASE = 10
 NETPBM_MINOR_RELEASE = 35
-NETPBM_POINT_RELEASE = 35
+NETPBM_POINT_RELEASE = 36
diff --git a/converter/other/jpeg2000/jpeg2ktopam.c b/converter/other/jpeg2000/jpeg2ktopam.c
index d6ea580c..e11e9fb4 100644
--- a/converter/other/jpeg2000/jpeg2ktopam.c
+++ b/converter/other/jpeg2000/jpeg2ktopam.c
@@ -9,7 +9,8 @@
 *****************************************************************************/
 
 #define _BSD_SOURCE 1      /* Make sure strdup() is in string.h */
-#define _XOPEN_SOURCE 500  /* Make sure strdup() is in string.h */
+/* Make sure strdup() is in string.h and int_fast32_t is in inttypes.h */
+#define _XOPEN_SOURCE 600
 #include <string.h>
 
 #include "pam.h"
diff --git a/converter/other/jpeg2000/pamtojpeg2k.c b/converter/other/jpeg2000/pamtojpeg2k.c
index 76da46d2..851d2bf9 100644
--- a/converter/other/jpeg2000/pamtojpeg2k.c
+++ b/converter/other/jpeg2000/pamtojpeg2k.c
@@ -9,7 +9,8 @@
 *****************************************************************************/
 
 #define _BSD_SOURCE 1    /* Make sure strdup() is in string.h */
-#define _XOPEN_SOURCE 500  /* Make sure strdup() is in string.h */
+/* Make sure strdup() is in string.h and int_fast32_t is in inttypes.h */
+#define _XOPEN_SOURCE 600
 #include <string.h>
 
 #include "pam.h"
diff --git a/doc/HISTORY b/doc/HISTORY
index 3c23ab19..a956e3b3 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,15 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+07.12.27 BJH  Release 10.35.36
+
+              pamperspective: Eliminate build-time symbol conflict
+              with 'nearest' on AIX.
+
+              set _XOPEN_SOURCE=600 so jpeg2ktopam and pamtojpeg2k
+              compile on AIX (_XOPEN_SOURCE=500 keeps int_fast32_t from
+              being defined).
+
 07.12.11 BJH  Release 10.35.35
 
               pamtotiff: fix incorrect pixels with PNM maxval != TIFF
diff --git a/editor/pamperspective.c b/editor/pamperspective.c
index 7bcc74fb..d460ffcf 100644
--- a/editor/pamperspective.c
+++ b/editor/pamperspective.c
@@ -44,7 +44,10 @@ const char *const unit_token[3] = {"image", "pixel", NULL};
 typedef enum {lattice, pixel_s} coord_system;
 const char *const system_token[3] = {"lattice", "pixel", NULL};
 
-typedef enum {nearest, linear} interpolation;
+/* Note that 'nearest' is a function in AIX's math.h.  So don't use
+   that as a symbol.
+*/
+typedef enum {interp_nearest, interp_linear} interpolation;
 const char *const interpolation_token[3] = {"nearest", "linear", NULL};
 
 typedef enum {free_, fixed} proportion;
@@ -233,7 +236,7 @@ static void set_command_line_defaults (option *const options)
   options->enums[0] = lattice;          /* --input_system         */
   options->enums[1] = lattice;          /* --output_system        */
   options->enums[2] = pixel_u;          /* --input_unit           */
-  options->enums[3] = nearest;          /* --interpolation        */
+  options->enums[3] = interp_nearest;   /* --interpolation        */
   options->enums[4] = free_;            /* --proportion           */
   options->bools[0] = TRUE;             /* --frame_include        */
 }
@@ -1100,9 +1103,9 @@ static void init_buffer (buffer *const b, const world_data *const world,
                        diff (clean_y(yur,outpam), clean_y(y_min,outpam))))
     + 2;
   switch (options->enums[3]) {  /* --interpolation */
-  case nearest:
+  case interp_nearest:
     break;
-  case linear:
+  case interp_linear:
     num_rows += 1;
     break;
   };
@@ -1308,10 +1311,10 @@ int main (int argc, char* argv[])
   outrow = pnm_allocpamrow (&outpam);
   init_interpolation_global_vars (&inbuffer,&inpam,&outpam);
   switch (options.enums[3]) {   /* --interpolation */
-  case nearest:
+  case interp_nearest:
     interpolate = take_nearest;
     break;
-  case linear:
+  case interp_linear:
     interpolate = linear_interpolation;
     break;
   };