[master] Correct use of _WINDOWS_ in pngconf.h

This commit is contained in:
Glenn Randers-Pehrson 2010-08-03 21:10:04 -05:00
parent d8daacf157
commit 902d4d109a
4 changed files with 14 additions and 15 deletions

View File

@ -52,6 +52,7 @@ version 1.4.4beta04 [July 31, 2010]
version 1.4.4beta05 [August 4, 2010]
Updated projects/visualc71 so it can find scripts/pnglibconf.h
Removed unused png_mem_* defines from pngconf.h.
Correct use of _WINDOWS_ in pngconf.h
Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit

View File

@ -2636,6 +2636,7 @@ version 1.4.4beta04 [July 31, 2010]
version 1.4.4beta05 [August 4, 2010]
Updated projects/visualc71 so it can find scripts/pnglibconf.h
Removed unused png_mem_* defines from pngconf.h.
Correct use of _WINDOWS_ in pngconf.h
Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit

View File

@ -1124,7 +1124,7 @@ typedef unsigned char png_byte;
#else
typedef size_t png_size_t;
#endif
#define png_sizeof(x) sizeof(x)
#define png_sizeof(x) (sizeof (x))
/* The following is needed for medium model support. It cannot be in the
* pngpriv.h header. Needs modification for other compilers besides
@ -1428,14 +1428,10 @@ typedef char FAR * FAR * FAR * png_charppp;
/* memory model/platform independent fns */
#ifndef PNG_ABORT
# ifdef _WIN32_WCE
# define PNG_ABORT() exit(-1)
# ifdef _WINDOWS_
# define PNG_ABORT() ExitProcess(0)
# else
# ifdef _WINDOWS_
# define PNG_ABORT() ExitProcess(0)
# else
# define PNG_ABORT() abort()
# endif
# define PNG_ABORT() abort()
# endif
#endif
@ -1514,8 +1510,13 @@ typedef char FAR * FAR * FAR * png_charppp;
# if defined(_MSC_VER) && defined(MAXSEG_64K)
typedef unsigned long png_alloc_size_t;
# else
# if defined(_WINDOWS_) && (!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL)
typedef DWORD png_alloc_size_t;
/* This is an attempt to detect an old Windows system where (int) is
* actually 16 bits, in that case png_malloc must have an argument with a
* bigger size to accomodate the requirements of the library.
*/
# if (defined(_Windows) || defined(_WINDOWS) || defined(_WINDOWS_)) && \
(!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL)
typedef DWORD png_alloc_size_t;
# else
typedef png_size_t png_alloc_size_t;
# endif

View File

@ -1,7 +1,7 @@
/* pngpriv.h - private declarations for use inside libpng
*
* libpng version 1.4.4beta05 - August 3, 2010
* libpng version 1.4.4beta05 - August 4, 2010
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -77,10 +77,6 @@
#if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \
defined(_WIN32) || defined(__WIN32__)
# include <windows.h> /* defines _WINDOWS_ macro */
/* I have no idea why is this necessary... */
# ifdef _MSC_VER
# include <malloc.h>
# endif
#endif
/* Various modes of operation. Note that after an init, mode is set to