[evolution/gnome-3-8] configure.ac: Remove unused function and header checks.



commit 4e782c997232e09b11d0570bed3cb75fa0791f70
Author: Matthew Barnes <mbarnes redhat com>
Date:   Tue May 28 09:36:33 2013 -0400

    configure.ac: Remove unused function and header checks.
    
    This removes the following definitions from config.h:
    
       CTIME_R_THREE_ARGS
       GETHOSTBYADDR_R_SEVEN_ARGS
       GETHOSTBYNAME_R_FIVE_ARGS
       HAVE_ISBLANK
       HAVE_MKSTEMP
       HAVE_STATFS
       HAVE_STATVFS
       HAVE_SYS_MOUNT_H
       HAVE_SYS_PARAM_H
       HAVE_SYS_STATVFS_H
    
    These were all either unused or unnecessarily used.
    
    (cherry picked from commit 3777e4887c286282b5e24b42328a6a660d7360c8)

 configure.ac          |  106 +------------------------------------------------
 e-util/e-file-utils.c |   33 +--------------
 mail/message-list.c   |    7 ---
 3 files changed, 3 insertions(+), 143 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d6e86d4..44c9679 100644
--- a/configure.ac
+++ b/configure.ac
@@ -487,111 +487,7 @@ else
 fi
 
 
-AC_CHECK_FUNCS(mkstemp mkdtemp isblank)
-
-dnl **************************************************
-dnl ctime_r prototype
-dnl **************************************************
-
-AC_CACHE_CHECK([if ctime_r wants three arguments], [ac_cv_ctime_r_three_args],
-[
-       AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-       [[      #include <time.h> ]],
-       [[      char *buf;
-               time_t date;
-               ctime_r (&date, buf, 100); ]]
-       )],[ac_cv_ctime_r_three_args=yes],[ac_cv_ctime_r_three_args=no])
-])
-
-if test x"$ac_cv_ctime_r_three_args" = xyes ; then
-       AC_DEFINE(CTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
-fi
-
-dnl **************************************************
-dnl gethostbyname_r prototype
-dnl **************************************************
-
-AC_CHECK_FUNCS(gethostbyname_r,[
-AC_CACHE_CHECK([if gethostbyname_r wants five arguments], [ac_cv_gethostbyname_r_five_args],
-[
-       AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-       [[
-               #include "confdefs.h"
-               #include <sys/types.h>
-               #include <sys/socket.h>
-               #include <netinet/in.h>
-               #include <netdb.h>
-
-               #define BUFSIZE (sizeof(struct hostent)+10)
-       ]],
-       [[
-               struct hostent hent;
-               char buffer[BUFSIZE];
-               int bufsize=BUFSIZE;
-               int h_errno;
-               (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
-       ]]
-       )],[ac_cv_gethostbyname_r_five_args=yes],[ac_cv_gethostbyname_r_five_args=no])
-])])
-
-if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
-       AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS, 1, [Solaris-style gethostbyname_r])
-fi
-
-dnl **************************************************
-dnl gethostbyaddr_r prototype
-dnl **************************************************
-
-AC_CHECK_FUNCS(gethostbyaddr_r,[
-AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], [ac_cv_gethostbyaddr_r_seven_args],
-[
-       AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-       [[
-               #include "confdefs.h"
-               #include <sys/types.h>
-               #include <sys/socket.h>
-               #include <netinet/in.h>
-               #include <netdb.h>
-               #define BUFSIZE (sizeof(struct hostent)+10)
-       ]],
-       [[
-               struct hostent hent;
-               char buffer[BUFSIZE];
-               int bufsize=BUFSIZE;
-               int h_errno;
-               (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno); ]]
-       )],[ac_cv_gethostbyaddr_r_seven_args=yes],[ac_cv_gethostbyaddr_r_seven_args=no])
-])])
-
-if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
-       AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
-fi
-
-dnl **************************************************
-dnl stat(v)fs location/type
-dnl **************************************************
-
-AC_CHECK_HEADER([sys/statvfs.h],
-       [AC_DEFINE([HAVE_SYS_STATVFS_H], 1, [Have <sys/statvfs.h>])],,
-       [[      #if HAVE_SYS_STATVFS_H
-               #include <sys/statvfs.h>
-               #endif
-       ]])
-AC_CHECK_FUNCS(statvfs)
-
-AC_CHECK_HEADER([sys/param.h],
-       [AC_DEFINE([HAVE_SYS_PARAM_H], 1, [Have <sys/param.h>])],,
-       [[      #if HAVE_SYS_PARAM_H
-               #include <sys/param.h>
-               #endif
-       ]])
-AC_CHECK_HEADER([sys/mount.h],
-       [AC_DEFINE([HAVE_SYS_MOUNT_H], 1, [Have <sys/mount.h>])],,
-       [[      #if HAVE_SYS_MOUNT_H
-               #include <sys/mount.h>
-               #endif
-       ]])
-AC_CHECK_FUNCS(statfs)
+AC_CHECK_FUNCS(mkdtemp)
 
 dnl **************************************************
 dnl Gnome Icon Theme
diff --git a/e-util/e-file-utils.c b/e-util/e-file-utils.c
index 90b2e77..982f0ef 100644
--- a/e-util/e-file-utils.c
+++ b/e-util/e-file-utils.c
@@ -21,40 +21,11 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
+#include "e-file-utils.h"
+
 #include <config.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-/* This isn't as portable as, say, the stuff in GNU coreutils.
- * But I care not for OSF1. */
-#ifdef HAVE_STATVFS
-# ifdef HAVE_SYS_STATVFS_H
-#  include <sys/statvfs.h>
-# endif
-#else
-#ifdef HAVE_STATFS
-# ifdef HAVE_SYS_PARAM_H
-#  include <sys/param.h>       /* bsd interface */
-# endif
-# ifdef HAVE_SYS_MOUNT_H
-#  include <sys/mount.h>
-# endif
-#endif
-#endif
-
-#include <errno.h>
-#include <string.h>
-
-#include <glib/gstdio.h>
 #include <glib/gi18n-lib.h>
 
-#include "e-activity.h"
-#include "e-file-utils.h"
-
 typedef struct _AsyncContext AsyncContext;
 
 struct _AsyncContext {
diff --git a/mail/message-list.c b/mail/message-list.c
index 6b45022..f5ed8c1 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -1920,13 +1920,6 @@ filter_date (time_t date)
                        e_utf8_strftime_fix_am_pm (buf, 26, _("%b %d %Y"), &then);
                }
        }
-#if 0
-#ifdef CTIME_R_THREE_ARGS
-       ctime_r (&date, buf, 26);
-#else
-       ctime_r (&date, buf);
-#endif
-#endif
 
        return g_strdup (buf);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]