From 9cb84c4cb9d490308ccaf803300ffe35c1677c0b Mon Sep 17 00:00:00 2001 From: Cosmin Truta Date: Wed, 14 Sep 2022 08:54:57 +0300 Subject: Delete vestigial declarations formerly used on 16-bit platforms Delete the structure members used in the 16-bit Turbo C memory models. Delete the PNG_ABORT declaration used in the 16-bit Windows build. Stop checking macros (e.g. _WINDOWS) predefined by 16-bit Windows compilers (but do check the __NT__ macro, which was the only one predefined by ancient Windows NT compilers). --- pngconf.h | 6 +++--- pngpriv.h | 13 ++++--------- pngstruct.h | 12 +----------- 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/pngconf.h b/pngconf.h index 8c56d4094..78882aefb 100644 --- a/pngconf.h +++ b/pngconf.h @@ -3,7 +3,7 @@ * * libpng version 1.6.38.git * - * Copyright (c) 2018-2019 Cosmin Truta + * Copyright (c) 2018-2022 Cosmin Truta * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson * Copyright (c) 1996-1997 Andreas Dilger * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. @@ -180,8 +180,8 @@ * compiler-specific macros to the values required to change the calling * conventions of the various functions. */ -#if defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\ - defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +#if defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || \ + defined(__CYGWIN__) /* Windows system (DOS doesn't support DLLs). Includes builds under Cygwin or * MinGW on any architecture currently supported by Windows. Also includes * Watcom builds but these need special treatment because they are not diff --git a/pngpriv.h b/pngpriv.h index a8e78e4cc..e4808a858 100644 --- a/pngpriv.h +++ b/pngpriv.h @@ -540,9 +540,8 @@ # include #endif -#if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \ - defined(_WIN32) || defined(__WIN32__) -# include /* defines _WINDOWS_ macro */ +#if defined(_WIN32) || defined(__WIN32__) || defined(__NT__) +# include #endif #endif /* PNG_VERSION_INFO_ONLY */ @@ -551,13 +550,9 @@ * functions that are passed far data must be model-independent. */ -/* Memory model/platform independent fns */ +/* Platform-independent functions */ #ifndef PNG_ABORT -# ifdef _WINDOWS_ -# define PNG_ABORT() ExitProcess(0) -# else -# define PNG_ABORT() abort() -# endif +# define PNG_ABORT() abort() #endif /* These macros may need to be architecture dependent. */ diff --git a/pngstruct.h b/pngstruct.h index 8bdc7ce46..e591d94d5 100644 --- a/pngstruct.h +++ b/pngstruct.h @@ -1,7 +1,7 @@ /* pngstruct.h - header file for PNG reference library * - * Copyright (c) 2018-2019 Cosmin Truta + * Copyright (c) 2018-2022 Cosmin Truta * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson * Copyright (c) 1996-1997 Andreas Dilger * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. @@ -334,18 +334,8 @@ struct png_struct_def size_t current_buffer_size; /* amount of data now in current_buffer */ int process_mode; /* what push library is currently doing */ int cur_palette; /* current push library palette index */ - #endif /* PROGRESSIVE_READ */ -#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) -/* For the Borland special 64K segment handler */ - png_bytepp offset_table_ptr; - png_bytep offset_table; - png_uint_16 offset_table_number; - png_uint_16 offset_table_count; - png_uint_16 offset_table_count_free; -#endif - #ifdef PNG_READ_QUANTIZE_SUPPORTED png_bytep palette_lookup; /* lookup table for quantizing */ png_bytep quantize_index; /* index translation for palette files */ -- cgit v1.2.1