Commit 53f7f276 authored by Matthias Andree's avatar Matthias Andree

FreeBSD cleanups to header shuffling.

parent fea8e876
......@@ -78,18 +78,12 @@ AC_CHECK_HEADERS([unistd.h termios.h termio.h sgtty.h stdarg.h \
if test _$ac_cv_header_stdarg_h != _yes ; then
AC_MSG_WARN([stdarg.h is not defined. Unsupported configuration, proceed at your own risk.])
fi
AC_CHECK_TYPE(u_int32_t,,
AC_DEFINE(u_int32_t,unsigned int,
[Define to unsigned int if <sys/types.h> does not define.]),
[AC_INCLUDES_DEFAULT
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif])
AC_TYPE_UINT32_T
AC_CHECK_HEADERS([resolv.h],,,[
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
......@@ -191,12 +185,8 @@ dnl INET6 is used by KAME/getnameinfo
AC_CACHE_CHECK(for AF_INET6/PF_INET6,ac_cv_inet6,
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
]],[[
int foo = AF_INET6;
int bar = PF_INET6;
......@@ -222,9 +212,7 @@ for lib in '' -lresolv; do
LIBS="$old_LIBS $lib"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
......@@ -273,9 +261,8 @@ pid = waitpid (-1, &status, 0);
AC_MSG_CHECKING(sys_siglist declaration in signal.h or unistd.h)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>
/* NetBSD declares sys_siglist in <unistd.h>. */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif]], [[char *msg = *(sys_siglist + 1);]])],[AC_DEFINE(SYS_SIGLIST_DECLARED,1,[Define if 'sys_siglist' is declared by <signal.h>.]) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
]], [[char *msg = *(sys_siglist + 1);]])],[AC_DEFINE(SYS_SIGLIST_DECLARED,1,[Define if 'sys_siglist' is declared by <signal.h>.]) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
# Find the right directory to put the root-mode PID file in
for dir in "/var/run" "/etc"
......
......@@ -5,7 +5,6 @@
* For license terms, see the file COPYING in this directory.
*/
/* We need this for HAVE_STDARG_H, etc */
#include "config.h"
struct addrinfo;
......@@ -40,12 +39,6 @@ struct addrinfo;
#endif
#include "uid_db.h"
/* We need this for strstr */
#if !defined(HAVE_STRSTR) && !defined(strstr)
char *strstr(const char *, const char *);
#endif
#include "fm_strl.h"
/* constants designating the various supported protocols */
......
......@@ -15,11 +15,7 @@
#endif /* HAVE_MEMORY_H */
#include <sys/types.h>
#include <sys/stat.h>
#ifndef HAVE_NET_SOCKET_H
#include <sys/socket.h>
#else
#include <net/socket.h>
#endif
#include <sys/un.h>
#include <netinet/in.h>
#ifdef HAVE_ARPA_INET_H
......@@ -53,6 +49,7 @@
#include "getaddrinfo.h"
#include "i18n.h"
#include "sdump.h"
#include "uid_db.h"
/* Defines to allow BeOS and Cygwin to play nice... */
#ifdef __BEOS__
......
......@@ -8,9 +8,7 @@
6.3.17 release, including the OpenSSL exemption.
*/
/* Have Solaris expose ffs() from strings.h: */
#define __EXTENSIONS__
#define _XOPEN_SOURCE 700
#include "fetchmail.h"
/* includes */
#include <stdio.h>
......@@ -18,9 +16,10 @@
#include <string.h>
#include <strings.h> /* ffs() lives here - needs #define on Solaris. */
#include "xmalloc.h"
#include "uid_db.h"
#include "xmalloc.h"
/* constants */
enum {
MIN_RECORDS = 16 /* arbitrary */
......
......@@ -10,6 +10,10 @@
#ifndef fetchmail_uid_db_h
#define fetchmail_uid_db_h
/* If ffs() is missing on, for instance, Solaris, make sure that config.h or fetchmail.h
* contains #define __EXTENSIONS__ - autoconf should set it in config.h. */
#include "config.h"
/* includes */
#include <stddef.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment