mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Removed the PNG_PTR_NORETURN attribute
This commit is contained in:
parent
537c146082
commit
b302c4721a
21
png.h
21
png.h
@ -846,25 +846,18 @@ typedef PNG_CALLBACK(void, *png_unknown_chunk_ptr, (png_structp));
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_SETJMP_SUPPORTED
|
#ifdef PNG_SETJMP_SUPPORTED
|
||||||
/* This must match the function definition in <setjmp.h>, and the
|
/* This must match the function definition in <setjmp.h>, and the application
|
||||||
* application must include this before png.h to obtain the definition
|
* must include this before png.h to obtain the definition of jmp_buf. The
|
||||||
* of jmp_buf. The function is required to be PNG_NORETURN. (Note that
|
* function is required to be PNG_NORETURN, but this is not checked. If the
|
||||||
* PNG_PTR_NORETURN is used here because current versions of the Microsoft
|
* function does return the application will crash via an abort() or similar
|
||||||
* C compiler do not support the PNG_NORETURN attribute on a pointer.)
|
* system level call.
|
||||||
*
|
*
|
||||||
* If you get a type warning from the compiler when linking against this line
|
* If you get a warning here while building the library you may need to make
|
||||||
* then your compiler has 'longjmp' that does not match the requirements of the
|
|
||||||
* compiler that built libpng. You will have to write a wrapper function for
|
|
||||||
* your compiler's longjmp and call png_set_longjmp_fn directly (not via the
|
|
||||||
* png_jmpbuf macro.)
|
|
||||||
*
|
|
||||||
* If you get a warning here while building the library you will need to make
|
|
||||||
* changes to ensure that pnglibconf.h records the calling convention used by
|
* changes to ensure that pnglibconf.h records the calling convention used by
|
||||||
* your compiler. This may be very difficult - try using a different compiler
|
* your compiler. This may be very difficult - try using a different compiler
|
||||||
* to build the library!
|
* to build the library!
|
||||||
*/
|
*/
|
||||||
typedef PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)),
|
PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef);
|
||||||
PNG_PTR_NORETURN);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Transform masks for the high-level interface */
|
/* Transform masks for the high-level interface */
|
||||||
|
|||||||
23
pngconf.h
23
pngconf.h
@ -353,23 +353,6 @@
|
|||||||
# ifndef PNG_NORETURN
|
# ifndef PNG_NORETURN
|
||||||
# define PNG_NORETURN __attribute__((__noreturn__))
|
# define PNG_NORETURN __attribute__((__noreturn__))
|
||||||
# endif
|
# endif
|
||||||
# ifndef PNG_PTR_NORETURN
|
|
||||||
/* It's not enough to have the compiler be the correct compiler at
|
|
||||||
* this point - it's necessary for the library (which defines
|
|
||||||
* the type of the library longjmp) to also be the GNU library.
|
|
||||||
* This is because many systems use the GNU compiler with a
|
|
||||||
* non-GNU libc implementation. Min/GW headers are also compatible
|
|
||||||
* with GCC as well as uclibc, so it seems best to exclude known
|
|
||||||
* problem libcs here rather than just including known libcs.
|
|
||||||
*
|
|
||||||
* NOTE: this relies on the only use of PNG_PTR_NORETURN being with
|
|
||||||
* the system longjmp. If the same type is used elsewhere then this
|
|
||||||
* will need to be changed.
|
|
||||||
*/
|
|
||||||
# if !defined(__CYGWIN__)
|
|
||||||
# define PNG_PTR_NORETURN __attribute__((__noreturn__))
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# ifndef PNG_ALLOCATED
|
# ifndef PNG_ALLOCATED
|
||||||
# define PNG_ALLOCATED __attribute__((__malloc__))
|
# define PNG_ALLOCATED __attribute__((__malloc__))
|
||||||
# endif
|
# endif
|
||||||
@ -404,9 +387,6 @@
|
|||||||
# ifndef PNG_NORETURN
|
# ifndef PNG_NORETURN
|
||||||
# define PNG_NORETURN __declspec(noreturn)
|
# define PNG_NORETURN __declspec(noreturn)
|
||||||
# endif
|
# endif
|
||||||
# ifndef PNG_PTR_NORETURN
|
|
||||||
# define PNG_PTR_NORETURN /* not supported */
|
|
||||||
# endif
|
|
||||||
# ifndef PNG_ALLOCATED
|
# ifndef PNG_ALLOCATED
|
||||||
# define PNG_ALLOCATED __declspec(restrict)
|
# define PNG_ALLOCATED __declspec(restrict)
|
||||||
# endif
|
# endif
|
||||||
@ -438,9 +418,6 @@
|
|||||||
#ifndef PNG_NORETURN
|
#ifndef PNG_NORETURN
|
||||||
# define PNG_NORETURN /* This function does not return */
|
# define PNG_NORETURN /* This function does not return */
|
||||||
#endif
|
#endif
|
||||||
#ifndef PNG_PTR_NORETURN
|
|
||||||
# define PNG_PTR_NORETURN /* This function does not return */
|
|
||||||
#endif
|
|
||||||
#ifndef PNG_ALLOCATED
|
#ifndef PNG_ALLOCATED
|
||||||
# define PNG_ALLOCATED /* The result of the function is new memory */
|
# define PNG_ALLOCATED /* The result of the function is new memory */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user