[master] Correct use of _WINDOWS_ in pngconf.h; Removed png_mem_ #defines;

they are no longer used.
This commit is contained in:
Glenn Randers-Pehrson 2010-08-03 20:26:34 -05:00
parent 3e71719502
commit d3a726db0d
5 changed files with 18 additions and 23 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.5.0beta40 - August 2, 2010 Libpng 1.5.0beta40 - August 4, 2010
This is not intended to be a public release. It will be replaced This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version. within a few weeks by a public version or by another test version.
@ -226,7 +226,7 @@ version 1.5.0beta24 [May 7, 2010]
offset of the png_ptr->rowbuf pointer into png_ptr->big_row_buf. offset of the png_ptr->rowbuf pointer into png_ptr->big_row_buf.
Added more blank lines for readability. Added more blank lines for readability.
version 1.5.0beta25 [August 2, 2010] version 1.5.0beta25 [August 4, 2010]
In pngpread.c: png_push_have_row() add check for new_row > height In pngpread.c: png_push_have_row() add check for new_row > height
Removed the now-redundant check for out-of-bounds new_row from example.c Removed the now-redundant check for out-of-bounds new_row from example.c
@ -334,7 +334,9 @@ version 1.5.0beta39 [August 2, 2010]
declarations, PNG_FUNCTION has been added to enable this and the declarations, PNG_FUNCTION has been added to enable this and the
relevant function definitions changed. relevant function definitions changed.
version 1.5.0beta40 [August 2, 2010] version 1.5.0beta40 [August 4, 2010]
Correct use of _WINDOWS_ in pngconf.h
Removed png_mem_ #defines; they are no longer used.
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

View File

@ -2816,7 +2816,9 @@ version 1.5.0beta39 [August 2, 2010]
declarations, PNG_FUNCTION has been added to enable this and the declarations, PNG_FUNCTION has been added to enable this and the
relevant function definitions changed. relevant function definitions changed.
version 1.5.0beta40 [August 2, 2010] version 1.5.0beta40 [August 4, 2010]
Correct use of _WINDOWS_ in pngconf.h
Removed png_mem_ #defines; they are no longer used.
projects/vstudio now builds and runs all tests (pngvalid added), projects/vstudio now builds and runs all tests (pngvalid added),
however the DLL builds are probably not useful as there seems to be no however the DLL builds are probably not useful as there seems to be no

View File

@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng /* pngconf.h - machine configurable file for libpng
* *
* libpng version 1.5.0beta40 - August 2, 2010 * libpng version 1.5.0beta40 - August 4, 2010
* *
* Copyright (c) 1998-2010 Glenn Randers-Pehrson * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -484,7 +484,7 @@ typedef unsigned int png_size_t;
#else #else
typedef size_t png_size_t; typedef size_t png_size_t;
#endif #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 /* The following is needed for medium model support. It cannot be in the
* pngpriv.h header. Needs modification for other compilers besides * pngpriv.h header. Needs modification for other compilers besides
@ -598,22 +598,19 @@ typedef char FAR * FAR * FAR * png_charppp;
* to encounter practical situations that require such conversions. * to encounter practical situations that require such conversions.
*/ */
#if defined(__TURBOC__) && !defined(__FLAT__) #if defined(__TURBOC__) && !defined(__FLAT__)
# define png_mem_alloc farmalloc
# define png_mem_free farfree
typedef unsigned long png_alloc_size_t; typedef unsigned long png_alloc_size_t;
#else #else
# if defined(_MSC_VER) && defined(MAXSEG_64K) # if defined(_MSC_VER) && defined(MAXSEG_64K)
# define png_mem_alloc(s) halloc(s, 1)
# define png_mem_free hfree
typedef unsigned long png_alloc_size_t; typedef unsigned long png_alloc_size_t;
# else # else
# if defined(_WINDOWS_) && (!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL) /* This is an attempt to detect an old Windows system where (int) is
# define png_mem_alloc(s) HeapAlloc(GetProcessHeap(), 0, s) * actually 16 bits, in that case png_malloc must have an argument with a
# define png_mem_free(p) HeapFree(GetProcessHeap(), 0, p) * bigger size to accomodate the requirements of the library.
typedef DWORD png_alloc_size_t; */
# if (defined(_Windows) || defined(_WINDOWS) || defined(_WINDOWS_)) && \
(!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL)
typedef DWORD png_alloc_size_t;
# else # else
# define png_mem_alloc malloc
# define png_mem_free free
typedef png_size_t png_alloc_size_t; typedef png_size_t png_alloc_size_t;
# endif # endif
# endif # endif

View File

@ -1,7 +1,7 @@
/* pngpriv.h - private declarations for use inside libpng /* pngpriv.h - private declarations for use inside libpng
* *
* libpng version 1.5.0beta40 - August 2, 2010 * libpng version 1.5.0beta40 - August 4, 2010
* For conditions of distribution and use, see copyright notice in png.h * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2010 Glenn Randers-Pehrson * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -154,10 +154,6 @@
#if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \ #if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \
defined(_WIN32) || defined(__WIN32__) defined(_WIN32) || defined(__WIN32__)
# include <windows.h> /* defines _WINDOWS_ macro */ # include <windows.h> /* defines _WINDOWS_ macro */
/* I have no idea why is this necessary... */
# ifdef _MSC_VER
# include <malloc.h>
# endif
#endif #endif
/* Moved here around 1.5.0beta36 from pngconf.h */ /* Moved here around 1.5.0beta36 from pngconf.h */

View File

@ -2114,5 +2114,3 @@ int main(int argc, PNG_CONST char **argv)
return 0; return 0;
} }
/* vim: set sw=3 ts=8 tw=80: */