Declare prototypes for all functions that may miss on some platforms.

RELEASE_1_0_11_BRANCH
Henning Geinitz 2003-01-24 14:06:08 +00:00
rodzic 85dddb6ca0
commit b8010a3fec
6 zmienionych plików z 208 dodań i 4 usunięć

Wyświetl plik

@ -3,6 +3,9 @@
* backend/bh.c backend/coolscan.c: Minor conversion fixes (from
Andrea Suatoni <a.suatoni@telefonica.net>).
* 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 <gerhard@gjaeger.de>
* doc/plustek/Plustek-USB-TODO.txt

Wyświetl plik

@ -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 <sys/types.h>
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 <sys/types.h>
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 <sys/types.h>
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 <stdarg.h>
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

67
aclocal.m4 vendored
Wyświetl plik

@ -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 <sys/types.h>
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 <sys/types.h>
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 <sys/types.h>
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 <stdarg.h>
void vsyslog(int priority, const char *format, va_list args);
#endif
])
])
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-

12
configure vendored
Wyświetl plik

@ -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 <<EOF
#line 11833 "configure"
#line 11837 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11928,7 +11932,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 11931 "configure"
#line 11935 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

Wyświetl plik

@ -183,6 +183,7 @@ AC_CHECK_FUNCS(atexit inet_addr inet_aton inet_ntoa ioperm mkdir \
cfmakeraw tcsendbreak strcasecmp strncasecmp _portaccess)
AC_REPLACE_FUNCS(getenv inet_ntop inet_pton isfdtype sigprocmask snprintf \
strdup strndup strsep usleep vsyslog)
SANE_PROTOTYPES
if test "$ac_cv_header_os2_h" = "yes" ; then
AC_DEFINE(strncasecmp, strnicmp, [Define for OS/2 only])
AC_DEFINE(strcasecmp, stricmp, [Define for OS/2 only])

Wyświetl plik

@ -406,3 +406,65 @@
/* Define to `unsigned long' if <sys/types.h> 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 <sys/types.h>
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 <sys/types.h>
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 <sys/types.h>
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 <stdarg.h>
void vsyslog(int priority, const char *format, va_list args);
#endif