diff --git a/ChangeLog b/ChangeLog index 3182cd159..9f6099ef1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * backend/bh.c backend/coolscan.c: Minor conversion fixes (from Andrea Suatoni ). * backend/test.c: Use "Color pattern" consistantly. + * acinclude.m4 aclocal.m4 configure configure.in + include/sane/config.h.in: Declare prototypes for all functions that + may miss on some platforms. 2003-01-24 Gerhard Jaeger * doc/plustek/Plustek-USB-TODO.txt diff --git a/acinclude.m4 b/acinclude.m4 index a4ba695ab..fd077863d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -12,6 +12,7 @@ dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present) dnl SANE_LINKER_RPATH dnl SANE_CHECK_U_TYPES dnl SANE_CHECK_GPHOTO2 +dnl SANE_PROTOTYPES dnl AC_PROG_LIBTOOL dnl @@ -342,6 +343,72 @@ AC_DEFUN([SANE_CHECK_GPHOTO2], ]) fi ]) +# +# Generate prototypes for functions not available on the system +AC_DEFUN([SANE_PROTOTYPES], +[ +AH_BOTTOM([ + +/* Prototype for getenv */ +#ifndef HAVE_GETENV +char * getenv(const char *name); +#endif + +/* Prototype for inet_ntop */ +#ifndef HAVE_INET_NTOP +#include +const char * inet_ntop (int af, const void *src, char *dst, size_t cnt); +#endif + +/* Prototype for inet_pton */ +#ifndef HAVE_INET_PTON +int inet_pton (int af, const char *src, void *dst); +#endif + +/* Prototype for isfdtype */ +#ifndef HAVE_ISFDTYPE +int isfdtype(int fd, int fdtype); +#endif + +/* Prototype for sigprocmask */ +#ifndef HAVE_SIGPROCMASK +int sigprocmask (int how, int *new, int *old); +#endif + +/* Prototype for snprintf */ +#ifndef HAVE_SNPRINTF +#include +int snprintf (char *str,size_t count,const char *fmt,...); +#endif + +/* Prototype for strdup */ +#ifndef HAVE_STRDUP +char *strdup (const char * s); +#endif + +/* Prototype for strndup */ +#ifndef HAVE_STRNDUP +#include +char *strndup(const char * s, size_t n); +#endif + +/* Prototype for strsep */ +#ifndef HAVE_STRSEP +char *strsep(char **stringp, const char *delim); +#endif + +/* Prototype for usleep */ +#ifndef HAVE_USLEEP +unsigned int usleep (unsigned int useconds); +#endif + +/* Prototype for vsyslog */ +#ifndef HAVE_VSYSLOG +#include +void vsyslog(int priority, const char *format, va_list args); +#endif +]) +]) # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- ## Copyright 1996, 1997, 1998, 1999, 2000, 2001 diff --git a/aclocal.m4 b/aclocal.m4 index c152d3cce..5e5ea7c5c 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -24,6 +24,7 @@ dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present) dnl SANE_LINKER_RPATH dnl SANE_CHECK_U_TYPES dnl SANE_CHECK_GPHOTO2 +dnl SANE_PROTOTYPES dnl AC_PROG_LIBTOOL dnl @@ -354,6 +355,72 @@ AC_DEFUN([SANE_CHECK_GPHOTO2], ]) fi ]) +# +# Generate prototypes for functions not available on the system +AC_DEFUN([SANE_PROTOTYPES], +[ +AH_BOTTOM([ + +/* Prototype for getenv */ +#ifndef HAVE_GETENV +char * getenv(const char *name); +#endif + +/* Prototype for inet_ntop */ +#ifndef HAVE_INET_NTOP +#include +const char * inet_ntop (int af, const void *src, char *dst, size_t cnt); +#endif + +/* Prototype for inet_pton */ +#ifndef HAVE_INET_PTON +int inet_pton (int af, const char *src, void *dst); +#endif + +/* Prototype for isfdtype */ +#ifndef HAVE_ISFDTYPE +int isfdtype(int fd, int fdtype); +#endif + +/* Prototype for sigprocmask */ +#ifndef HAVE_SIGPROCMASK +int sigprocmask (int how, int *new, int *old); +#endif + +/* Prototype for snprintf */ +#ifndef HAVE_SNPRINTF +#include +int snprintf (char *str,size_t count,const char *fmt,...); +#endif + +/* Prototype for strdup */ +#ifndef HAVE_STRDUP +char *strdup (const char * s); +#endif + +/* Prototype for strndup */ +#ifndef HAVE_STRNDUP +#include +char *strndup(const char * s, size_t n); +#endif + +/* Prototype for strsep */ +#ifndef HAVE_STRSEP +char *strsep(char **stringp, const char *delim); +#endif + +/* Prototype for usleep */ +#ifndef HAVE_USLEEP +unsigned int usleep (unsigned int useconds); +#endif + +/* Prototype for vsyslog */ +#ifndef HAVE_VSYSLOG +#include +void vsyslog(int priority, const char *format, va_list args); +#endif +]) +]) # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- diff --git a/configure b/configure index 3b1ff2c61..e46434762 100755 --- a/configure +++ b/configure @@ -8194,6 +8194,10 @@ fi done + + + + if test "$ac_cv_header_os2_h" = "yes" ; then cat >>confdefs.h <<\_ACEOF @@ -9469,7 +9473,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 9472 "configure"' > conftest.$ac_ext + echo '#line 9476 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9998,7 +10002,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:10001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:10005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -11830,7 +11834,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < does not define. */ #undef u_long + + + +/* Prototype for getenv */ +#ifndef HAVE_GETENV +char * getenv(const char *name); +#endif + +/* Prototype for inet_ntop */ +#ifndef HAVE_INET_NTOP +#include +const char * inet_ntop (int af, const void *src, char *dst, size_t cnt); +#endif + +/* Prototype for inet_pton */ +#ifndef HAVE_INET_PTON +int inet_pton (int af, const char *src, void *dst); +#endif + +/* Prototype for isfdtype */ +#ifndef HAVE_ISFDTYPE +int isfdtype(int fd, int fdtype); +#endif + +/* Prototype for sigprocmask */ +#ifndef HAVE_SIGPROCMASK +int sigprocmask (int how, int *new, int *old); +#endif + +/* Prototype for snprintf */ +#ifndef HAVE_SNPRINTF +#include +int snprintf (char *str,size_t count,const char *fmt,...); +#endif + +/* Prototype for strdup */ +#ifndef HAVE_STRDUP +char *strdup (const char * s); +#endif + +/* Prototype for strndup */ +#ifndef HAVE_STRNDUP +#include +char *strndup(const char * s, size_t n); +#endif + +/* Prototype for strsep */ +#ifndef HAVE_STRSEP +char *strsep(char **stringp, const char *delim); +#endif + +/* Prototype for usleep */ +#ifndef HAVE_USLEEP +unsigned int usleep (unsigned int useconds); +#endif + +/* Prototype for vsyslog */ +#ifndef HAVE_VSYSLOG +#include +void vsyslog(int priority, const char *format, va_list args); +#endif +