1 #ifndef JPGTN_COMMON_H 2 #define JPGTN_COMMON_H 1 3 4 #if HAVE_CONFIG_H 5 # include "config.h" 6 #endif 7 8 #include <stdio.h> 9 10 #if HAVE_SYS_TYPES_H 11 # include <sys/types.h> 12 #endif 13 14 #if HAVE_SYS_STAT_H 15 # include <sys/stat.h> 16 #endif 17 18 #if STDC_HEADERS 19 # include <stdlib.h> 20 # include <string.h> 21 # include <setjmp.h> 22 #elif HAVE_STRINGS_H 23 # include <strings.h> 24 #endif 25 26 #if HAVE_UNISTD_H 27 # include <unistd.h> 28 #endif 29 30 #if HAVE_LIBJPEG 31 #include <jpeglib.h> 32 #endif 33 34 #if HAVE_ERRNO_H 35 # include <errno.h> 36 #endif 37 #ifndef errno 38 extern int errno; 39 #endif 40 41 #if !HAVE_STRRCHR && HAVE_RINDEX 42 # define strrchr rindex 43 #endif 44 45 #ifndef EXIT_SUCCESS 46 #define EXIT_SUCCESS 0 47 #endif 48 #ifndef EXIT_FAILURE 49 #define EXIT_FAILURE 1 50 #endif 51 52 #endif /* !JPGTN_COMMON_H */ 53