mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng15] Fix for the preprocessor of the Intel C compiler. The preprocessor
adjacent @ signs with a space; this changes the concatentation from @@@ to PNG_JOIN; that should work with all compiler preprocessors.
This commit is contained in:
parent
aff44028ba
commit
1d8b75550f
4
ANNOUNCE
4
ANNOUNCE
@ -33,6 +33,10 @@ Version 1.5.7 [November 3, 2011]
|
|||||||
of a png_struct or png_info failed. This would probably have led to a
|
of a png_struct or png_info failed. This would probably have led to a
|
||||||
crash. The pngmem.c implementation of png_malloc() included a cast
|
crash. The pngmem.c implementation of png_malloc() included a cast
|
||||||
to png_size_t which would fail on large allocations on 16-bit systems.
|
to png_size_t which would fail on large allocations on 16-bit systems.
|
||||||
|
Fix for the preprocessor of the Intel C compiler. The preprocessor
|
||||||
|
splits adjacent @ signs with a space; this changes the concatentation
|
||||||
|
token from @@@ to PNG_JOIN; that should work with all compiler
|
||||||
|
preprocessors.
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
4
CHANGES
4
CHANGES
@ -3676,6 +3676,10 @@ Version 1.5.7 [November 3, 2011]
|
|||||||
of a png_struct or png_info failed. This would probably have led to a
|
of a png_struct or png_info failed. This would probably have led to a
|
||||||
crash. The pngmem.c implementation of png_malloc() included a cast
|
crash. The pngmem.c implementation of png_malloc() included a cast
|
||||||
to png_size_t which would fail on large allocations on 16-bit systems.
|
to png_size_t which would fail on large allocations on 16-bit systems.
|
||||||
|
Fix for the preprocessor of the Intel C compiler. The preprocessor
|
||||||
|
splits adjacent @ signs with a space; this changes the concatentation
|
||||||
|
token from @@@ to PNG_JOIN; that should work with all compiler
|
||||||
|
preprocessors.
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
@ -142,9 +142,9 @@ SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0'\
|
|||||||
echo '#include "$<"' >dfn.c
|
echo '#include "$<"' >dfn.c
|
||||||
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) @LIBPNG_DEFINES@\
|
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) @LIBPNG_DEFINES@\
|
||||||
$(CPPFLAGS) $(SYMBOL_CFLAGS) dfn.c > dfn1.out
|
$(CPPFLAGS) $(SYMBOL_CFLAGS) dfn.c > dfn1.out
|
||||||
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC-\(.*\)-PNG_DEFN_END.*$$|\1|p'\
|
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC *-\(.*\)- *PNG_DEFN_END.*$$|\1|p'\
|
||||||
dfn1.out >dfn2.out
|
dfn1.out >dfn2.out
|
||||||
$(SED) -e 's| *@@@ *||g' -e 's| *$$||' dfn2.out >dfn3.out
|
$(SED) -e 's| *PNG_JOIN *||g' -e 's| *$$||' dfn2.out >dfn3.out
|
||||||
rm -f dfn.c dfn[12].out
|
rm -f dfn.c dfn[12].out
|
||||||
mv dfn3.out $@
|
mv dfn3.out $@
|
||||||
|
|
||||||
|
|||||||
@ -1340,9 +1340,9 @@ pngvalid.o pngtest.o: pnglibconf.h
|
|||||||
echo '#include "$<"' >dfn.c
|
echo '#include "$<"' >dfn.c
|
||||||
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) @LIBPNG_DEFINES@\
|
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) @LIBPNG_DEFINES@\
|
||||||
$(CPPFLAGS) $(SYMBOL_CFLAGS) dfn.c > dfn1.out
|
$(CPPFLAGS) $(SYMBOL_CFLAGS) dfn.c > dfn1.out
|
||||||
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC-\(.*\)-PNG_DEFN_END.*$$|\1|p'\
|
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC *-\(.*\)- *PNG_DEFN_END.*$$|\1|p'\
|
||||||
dfn1.out >dfn2.out
|
dfn1.out >dfn2.out
|
||||||
$(SED) -e 's| *@@@ *||g' -e 's| *$$||' dfn2.out >dfn3.out
|
$(SED) -e 's| *PNG_JOIN *||g' -e 's| *$$||' dfn2.out >dfn3.out
|
||||||
rm -f dfn.c dfn[12].out
|
rm -f dfn.c dfn[12].out
|
||||||
mv dfn3.out $@
|
mv dfn3.out $@
|
||||||
|
|
||||||
|
|||||||
@ -27,12 +27,12 @@ S--E
|
|||||||
S-EXPORTS-E
|
S-EXPORTS-E
|
||||||
S-;Version 1.5.0beta58-E
|
S-;Version 1.5.0beta58-E
|
||||||
|
|
||||||
/* NOTE: @@@ is interpreted by the calling script as a signal to
|
/* NOTE: PNG_JOIN is interpreted by the calling script as a signal to
|
||||||
* join the two things on either side, so we can do symbol
|
* join the two things on either side, so we can do symbol
|
||||||
* substitution within the name, regular C ## joins the pp-tokens,
|
* substitution within the name, regular C ## joins the pp-tokens,
|
||||||
* not their final values.
|
* not their final values.
|
||||||
*/
|
*/
|
||||||
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
||||||
PNG_DEFN_MAGIC- SYMBOL_PREFIX @@@ name-PNG_DEFN_END
|
PNG_DEFN_MAGIC- SYMBOL_PREFIX PNG_JOIN name-PNG_DEFN_END
|
||||||
|
|
||||||
#include "../png.h"
|
#include "../png.h"
|
||||||
|
|||||||
@ -35,13 +35,14 @@ BEGIN{
|
|||||||
err=0 # in-line exit sets this
|
err=0 # in-line exit sets this
|
||||||
start="PNG_DEFN_MAGIC-" # Arbitrary start
|
start="PNG_DEFN_MAGIC-" # Arbitrary start
|
||||||
end="-PNG_DEFN_END" # Arbitrary end
|
end="-PNG_DEFN_END" # Arbitrary end
|
||||||
cx= "/@@@*" # Open C comment for output file
|
ct="PNG_JOIN" # Join two tokens
|
||||||
|
cx= "/" ct "*" # Open C comment for output file
|
||||||
comment=start cx # Comment start
|
comment=start cx # Comment start
|
||||||
cend="*/" end # Comment end
|
cend="*/" end # Comment end
|
||||||
def=start "#define PNG_@@@" # Arbitrary define
|
def=start "#define PNG_" ct # Arbitrary define
|
||||||
sup="@@@_SUPPORTED" end # end supported option
|
sup=ct "_SUPPORTED" end # end supported option
|
||||||
und=comment "#undef PNG_@@@" # Unsupported option
|
und=comment "#undef PNG_" ct # Unsupported option
|
||||||
une="@@@_SUPPORTED" cend # end unsupported option
|
une=ct "_SUPPORTED" cend # end unsupported option
|
||||||
error=start "ERROR:" # error message
|
error=start "ERROR:" # error message
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
|
|||||||
@ -10,6 +10,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
||||||
PNG_DEFN_MAGIC-SYMBOL_PREFIX @@@ name-PNG_DEFN_END
|
PNG_DEFN_MAGIC-SYMBOL_PREFIX PNG_JOIN name-PNG_DEFN_END
|
||||||
|
|
||||||
#include "../png.h"
|
#include "../png.h"
|
||||||
|
|||||||
@ -11,13 +11,13 @@
|
|||||||
|
|
||||||
#define HEADER PNG_DEFN_MAGIC-PNGLIB_LIBNAME {global:-PNG_DEFN_END
|
#define HEADER PNG_DEFN_MAGIC-PNGLIB_LIBNAME {global:-PNG_DEFN_END
|
||||||
|
|
||||||
/* NOTE: @@@ is interpreted by the calling script as a signal to
|
/* NOTE: PNG_JOIN is interpreted by the calling script as a signal to
|
||||||
* join the two things on either side, so we can do symbol
|
* join the two things on either side, so we can do symbol
|
||||||
* substitution within the name, regular C ## joins the pp-tokens,
|
* substitution within the name, regular C ## joins the pp-tokens,
|
||||||
* not their final values.
|
* not their final values.
|
||||||
*/
|
*/
|
||||||
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
||||||
PNG_DEFN_MAGIC- SYMBOL_PREFIX @@@ name;-PNG_DEFN_END
|
PNG_DEFN_MAGIC- SYMBOL_PREFIX PNG_JOIN name;-PNG_DEFN_END
|
||||||
|
|
||||||
#define TRAILER PNG_DEFN_MAGIC-local: *; };-PNG_DEFN_END
|
#define TRAILER PNG_DEFN_MAGIC-local: *; };-PNG_DEFN_END
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user