* Fix invalid pointer/int cast (Closes #39).tags/v0.99.beta14
| @@ -91,11 +91,16 @@ AC_CHECK_HEADERS(stdio.h stdarg.h signal.h sys/ioctl.h sys/time.h inttypes.h end | |||||
| AC_CHECK_FUNCS(signal ioctl snprintf vsnprintf getenv putenv strcasecmp htons) | AC_CHECK_FUNCS(signal ioctl snprintf vsnprintf getenv putenv strcasecmp htons) | ||||
| AC_CHECK_FUNCS(usleep gettimeofday) | AC_CHECK_FUNCS(usleep gettimeofday) | ||||
| ac_cv_have_getopt_long="no" | |||||
| AC_CHECK_FUNCS(getopt_long, | AC_CHECK_FUNCS(getopt_long, | ||||
| [AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the `getopt_long' function.)], | |||||
| [ac_cv_have_getopt_long="yes"], | |||||
| [AC_CHECK_LIB(gnugetopt, getopt_long, | [AC_CHECK_LIB(gnugetopt, getopt_long, | ||||
| [AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the `getopt_long' function.) | |||||
| [ac_cv_have_getopt_long="yes" | |||||
| GETOPT_LIBS="${GETOPT_LIBS} -lgnugetopt"])]) | GETOPT_LIBS="${GETOPT_LIBS} -lgnugetopt"])]) | ||||
| if test "$ac_cv_have_getopt_long" != "no"; then | |||||
| AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the `getopt_long' function.) | |||||
| fi | |||||
| AM_CONDITIONAL(NEED_GETOPT_LONG, test "$ac_cv_have_getopt_long" = "no") | |||||
| AC_SUBST(GETOPT_LIBS) | AC_SUBST(GETOPT_LIBS) | ||||
| AC_MSG_CHECKING(for Sleep) | AC_MSG_CHECKING(for Sleep) | ||||
| @@ -29,13 +29,18 @@ cacaplay_LDADD = ../caca/libcaca.la ../cucul/libcucul.la | |||||
| cacaserver_SOURCES = cacaserver.c | cacaserver_SOURCES = cacaserver.c | ||||
| cacaserver_LDADD = ../cucul/libcucul.la | cacaserver_LDADD = ../cucul/libcucul.la | ||||
| img2txt_SOURCES = img2txt.c mygetopt.c mygetopt.h common-image.c common-image.h | |||||
| img2txt_SOURCES = img2txt.c $(GETOPT) common-image.c common-image.h | |||||
| img2txt_LDADD = ../cucul/libcucul.la | img2txt_LDADD = ../cucul/libcucul.la | ||||
| img2txt_CFLAGS = $(IMLIB2_CFLAGS) | img2txt_CFLAGS = $(IMLIB2_CFLAGS) | ||||
| img2txt_LDFLAGS = $(IMLIB2_LIBS) | |||||
| img2txt_LDFLAGS = $(IMLIB2_LIBS) $(GETOPT_LIBS) | |||||
| if USE_NETWORK | if USE_NETWORK | ||||
| fcntl_programs = cacaserver | fcntl_programs = cacaserver | ||||
| else | else | ||||
| fcntl_programs = | fcntl_programs = | ||||
| endif | endif | ||||
| if NEED_GETOPT_LONG | |||||
| GETOPT = mygetopt.c mygetopt.h | |||||
| endif | |||||
| @@ -17,6 +17,7 @@ | |||||
| */ | */ | ||||
| #include "config.h" | #include "config.h" | ||||
| #include "common.h" | |||||
| #if defined HAVE_STDINT_H | #if defined HAVE_STDINT_H | ||||
| # include <stdint.h> | # include <stdint.h> | ||||
| @@ -24,13 +25,6 @@ | |||||
| # include <inttypes.h> | # include <inttypes.h> | ||||
| #endif | #endif | ||||
| /* DOS / Kernel driver */ | |||||
| #ifndef __intptr_t_defined | |||||
| #ifndef _UINTPTR_T | |||||
| typedef unsigned int uintptr_t; | |||||
| #endif | |||||
| #endif | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <string.h> | #include <string.h> | ||||