Small "syntax" issue with xlc compiler and version 1.5.28

Michael Felt <[email protected]>
Newsgroups gmane.comp.graphics.png.devel
Message-ID <[email protected]>
Hi.

I just noticed the recent updates - thanks!

During the build on AIX, using xlc as compiler I had a 'textual' syntax 
issue that I was able to resolve with:
(as 1.5.28 and 1.6.28 were equal and showing how I patched 1.5.28)

michael@x071:[/data/prj/aixtools/libpng]diff -u 
./src/libpng-1.6.28/contrib/libtests/pngvalid.c ./src/libpng-1.5.28/contri>
--- ./src/libpng-1.6.28/contrib/libtests/pngvalid.c     2017-01-05 
13:52:09 +0000
+++ ./src/libpng-1.5.28/contrib/libtests/pngvalid.c     2017-01-12 
13:37:45 +0000
@@ -7742,13 +7742,12 @@
            * NOTE: this number only affects the internal limit check in 
pngvalid,
            * it has no effect on the limits applied to the libpng values.
            */
-         that->pm->limit += pow(
-#        if DIGITIZE
-            2.0
-#        else
-            1.0
-#        endif
-            /255, data.gamma);
+         that->pm->limit += pow( 2.0/255, data.gamma);
+#if     DIGITIZE
+           that->pm->limit += pow( 2.0/255, data.gamma);
+#       else
+            that->pm->limit += pow( 1.0/255, data.gamma);
+#       endif
        }
     }

Without the patch I get:

         source='../src/libpng-1.5.28/contrib/libtests/pngvalid.c' 
object='contrib/libtests/pngvalid.o' libtool=no  DEPDIR=.deps 
depmode=xlc /bin/sh ../src/libpng-1.5.28/depcomp  xlc_r -DHAVE_CONFIG_H 
-I. -I../src/libpng-1.5.28    -I/opt/include -I/opt/buildaix/include  
-I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -I/opt/buildaix/includes -c 
-o contrib/libtests/pngvalid.o 
../src/libpng-1.5.28/contrib/libtests/pngvalid.c
"../src/libpng-1.5.28/contrib/libtests/pngvalid.c", line 7746.1: 
1506-191 (E) The character # is not a valid C source character.
"../src/libpng-1.5.28/contrib/libtests/pngvalid.c", line 7746.10: 
1506-046 (S) Syntax error.
"../src/libpng-1.5.28/contrib/libtests/pngvalid.c", line 7748.1: 
1506-191 (E) The character # is not a valid C source character.
"../src/libpng-1.5.28/contrib/libtests/pngvalid.c", line 7750.1: 
1506-191 (E) The character # is not a valid C source character.
make: 1254-004 The error code from the last command is 1.


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.