OS/2 fixes for new PNG lib
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -8,20 +8,20 @@ LIBTARGET=$(WXDIR)\lib\pngd.lib
|
|||||||
!endif
|
!endif
|
||||||
|
|
||||||
OBJECTS = $D\png.obj \
|
OBJECTS = $D\png.obj \
|
||||||
|
$D\pngerror.obj \
|
||||||
|
$D\pngget.obj \
|
||||||
|
$D\pngmem.obj \
|
||||||
|
$D\pngpread.obj \
|
||||||
$D\pngread.obj \
|
$D\pngread.obj \
|
||||||
|
$D\pngrio.obj \
|
||||||
$D\pngrtran.obj \
|
$D\pngrtran.obj \
|
||||||
$D\pngrutil.obj \
|
$D\pngrutil.obj \
|
||||||
$D\pngpread.obj \
|
$D\pngset.obj \
|
||||||
$D\pngtrans.obj \
|
$D\pngtrans.obj \
|
||||||
|
$D\pngwio.obj \
|
||||||
$D\pngwrite.obj \
|
$D\pngwrite.obj \
|
||||||
$D\pngwtran.obj \
|
$D\pngwtran.obj \
|
||||||
$D\pngwutil.obj \
|
$D\pngwutil.obj
|
||||||
$D\pngerror.obj \
|
|
||||||
$D\pngmem.obj \
|
|
||||||
$D\pngwio.obj \
|
|
||||||
$D\pngrio.obj \
|
|
||||||
$D\pngget.obj \
|
|
||||||
$D\pngset.obj
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -82,6 +82,10 @@ const int FARDATA png_pass_dsp_mask[]
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __VISAGECPP__
|
||||||
|
const char png_libpng_ver[18] = "1.2.4";
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Tells libpng that we have already handled the first "num_bytes" bytes
|
/* Tells libpng that we have already handled the first "num_bytes" bytes
|
||||||
* of the PNG file signature. If the PNG data is embedded into another
|
* of the PNG file signature. If the PNG data is embedded into another
|
||||||
* stream we can set num_bytes = 8 so that libpng will not attempt to read
|
* stream we can set num_bytes = 8 so that libpng will not attempt to read
|
||||||
@@ -144,7 +148,7 @@ png_zalloc(voidpf png_ptr, uInt items, uInt size)
|
|||||||
{
|
{
|
||||||
png_uint_32 num_bytes = (png_uint_32)items * size;
|
png_uint_32 num_bytes = (png_uint_32)items * size;
|
||||||
png_voidp ptr;
|
png_voidp ptr;
|
||||||
png_structp p=png_ptr;
|
png_structp p=(png_structp)png_ptr;
|
||||||
png_uint_32 save_flags=p->flags;
|
png_uint_32 save_flags=p->flags;
|
||||||
|
|
||||||
p->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;
|
p->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;
|
||||||
|
@@ -80,9 +80,9 @@
|
|||||||
* 'Cygwin' defines/defaults:
|
* 'Cygwin' defines/defaults:
|
||||||
* PNG_BUILD_DLL -- (ignored) building the dll
|
* PNG_BUILD_DLL -- (ignored) building the dll
|
||||||
* (no define) -- (ignored) building an application, linking to the dll
|
* (no define) -- (ignored) building an application, linking to the dll
|
||||||
* PNG_STATIC -- (ignored) building the static lib, or building an
|
* PNG_STATIC -- (ignored) building the static lib, or building an
|
||||||
* application that links to the static lib.
|
* application that links to the static lib.
|
||||||
* ALL_STATIC -- (ignored) building various static libs, or building an
|
* ALL_STATIC -- (ignored) building various static libs, or building an
|
||||||
* application that links to the static libs.
|
* application that links to the static libs.
|
||||||
* Thus,
|
* Thus,
|
||||||
* a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and
|
* a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and
|
||||||
@@ -95,12 +95,12 @@
|
|||||||
* PNG_BUILD_DLL
|
* PNG_BUILD_DLL
|
||||||
* PNG_STATIC
|
* PNG_STATIC
|
||||||
* (nothing) == PNG_USE_DLL
|
* (nothing) == PNG_USE_DLL
|
||||||
*
|
*
|
||||||
* CYGWIN (2002-01-20): The preceding is now obsolete. With the advent
|
* CYGWIN (2002-01-20): The preceding is now obsolete. With the advent
|
||||||
* of auto-import in binutils, we no longer need to worry about
|
* of auto-import in binutils, we no longer need to worry about
|
||||||
* __declspec(dllexport) / __declspec(dllimport) and friends. Therefore,
|
* __declspec(dllexport) / __declspec(dllimport) and friends. Therefore,
|
||||||
* we don't need to worry about PNG_STATIC or ALL_STATIC when it comes
|
* we don't need to worry about PNG_STATIC or ALL_STATIC when it comes
|
||||||
* to __declspec() stuff. However, we DO need to worry about
|
* to __declspec() stuff. However, we DO need to worry about
|
||||||
* PNG_BUILD_DLL and PNG_STATIC because those change some defaults
|
* PNG_BUILD_DLL and PNG_STATIC because those change some defaults
|
||||||
* such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.
|
* such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.
|
||||||
*/
|
*/
|
||||||
@@ -144,8 +144,8 @@
|
|||||||
# if !defined(PNG_DLL)
|
# if !defined(PNG_DLL)
|
||||||
# define PNG_DLL
|
# define PNG_DLL
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -640,7 +640,7 @@
|
|||||||
# define PNG_EASY_ACCESS_SUPPORTED
|
# define PNG_EASY_ACCESS_SUPPORTED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
|
/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
|
||||||
even when PNG_USE_PNGVCRD or PNG_USE_PNGGCCRD is not defined */
|
even when PNG_USE_PNGVCRD or PNG_USE_PNGGCCRD is not defined */
|
||||||
#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
|
#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
|
||||||
# ifndef PNG_ASSEMBLER_CODE_SUPPORTED
|
# ifndef PNG_ASSEMBLER_CODE_SUPPORTED
|
||||||
@@ -1162,7 +1162,7 @@ typedef z_stream FAR * png_zstreamp;
|
|||||||
# define PNGAPI __cdecl
|
# define PNGAPI __cdecl
|
||||||
# undef PNG_IMPEXP
|
# undef PNG_IMPEXP
|
||||||
# define PNG_IMPEXP
|
# define PNG_IMPEXP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",
|
/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",
|
||||||
* you may get warnings regarding the linkage of png_zalloc and png_zfree.
|
* you may get warnings regarding the linkage of png_zalloc and png_zfree.
|
||||||
@@ -1228,7 +1228,7 @@ typedef z_stream FAR * png_zstreamp;
|
|||||||
# endif
|
# endif
|
||||||
# endif /* PNG_IMPEXP */
|
# endif /* PNG_IMPEXP */
|
||||||
#else /* !(DLL || non-cygwin WINDOWS) */
|
#else /* !(DLL || non-cygwin WINDOWS) */
|
||||||
# if (defined(__IBMC__) || defined(IBMCPP__)) && defined(__OS2__)
|
# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
|
||||||
# define PNGAPI _System
|
# define PNGAPI _System
|
||||||
# define PNG_IMPEXP
|
# define PNG_IMPEXP
|
||||||
# else
|
# else
|
||||||
@@ -1241,6 +1241,20 @@ typedef z_stream FAR * png_zstreamp;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__VISAGECPP__)
|
||||||
|
/* I don't compile with _System linkage, ever! */
|
||||||
|
# ifdef PNGAPI
|
||||||
|
# undef PNGAPI
|
||||||
|
# endif
|
||||||
|
# define PNGAPI _Optlink
|
||||||
|
# define PNG_IMPEXP
|
||||||
|
# define PNG_USE_LOCAL_ARRAYS
|
||||||
|
# ifdef PNG_USE_GLOBAL_ARRAYS
|
||||||
|
# undef PNG_USE_GLOBAL_ARRAYS
|
||||||
|
# endif
|
||||||
|
extern const char png_libpng_ver[18];
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef PNGAPI
|
#ifndef PNGAPI
|
||||||
# define PNGAPI
|
# define PNGAPI
|
||||||
#endif
|
#endif
|
||||||
@@ -1317,7 +1331,7 @@ typedef z_stream FAR * png_zstreamp;
|
|||||||
# define PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT 128 /* >= */
|
# define PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT 128 /* >= */
|
||||||
#endif
|
#endif
|
||||||
#ifndef PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT
|
#ifndef PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT
|
||||||
# define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT 9 /* >= */
|
# define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT 9 /* >= */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Set this in the makefile for VC++ on Pentium, not here. */
|
/* Set this in the makefile for VC++ on Pentium, not here. */
|
||||||
|
Reference in New Issue
Block a user