]> git.meshlink.io Git - meshlink/commitdiff
Remove unused/obsolete checks from configure.ac and unused functions from dropin.c.
authorGuus Sliepen <guus@meshlink.io>
Sun, 8 Oct 2017 15:11:19 +0000 (17:11 +0200)
committerGuus Sliepen <guus@meshlink.io>
Sun, 8 Oct 2017 15:11:19 +0000 (17:11 +0200)
configure.ac
src/dropin.c
src/dropin.h
src/have.h
src/system.h

index d2d7c8c7088441096c08d32e58c2f36728d6c787..f62eff73bf29966bfa5f4e46e2e9a14e584ca234 100644 (file)
@@ -95,20 +95,9 @@ AM_CONDITIONAL(INSTALL_TESTS, test "$install_tests" = true)
 dnl Checks for header files.
 dnl We do this in multiple stages, because unlike Linux all the other operating systems really suck and don't include their own dependencies.
 
 dnl Checks for header files.
 dnl We do this in multiple stages, because unlike Linux all the other operating systems really suck and don't include their own dependencies.
 
-AC_HEADER_STDC
-AC_CHECK_HEADERS([stdbool.h syslog.h sys/file.h sys/param.h sys/resource.h sys/socket.h sys/time.h sys/un.h sys/wait.h netdb.h arpa/inet.h dirent.h])
-AC_CHECK_HEADERS([time.h],
-  [], [], [#include "src/have.h"]
-)
+AC_CHECK_HEADERS([syslog.h sys/file.h sys/param.h sys/resource.h sys/socket.h sys/time.h sys/un.h sys/wait.h netdb.h arpa/inet.h dirent.h])
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 
 dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_C_VOLATILE
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
-AC_HEADER_TIME
-AC_STRUCT_TM
-
 MeshLink_ATTRIBUTE(__malloc__)
 MeshLink_ATTRIBUTE(__warn_unused_result__)
 
 MeshLink_ATTRIBUTE(__malloc__)
 MeshLink_ATTRIBUTE(__warn_unused_result__)
 
@@ -122,7 +111,7 @@ AC_CHECK_TYPES([struct sockaddr_storage], ,AC_MSG_ERROR([System must support str
 
 dnl Checks for library functions.
 AC_TYPE_SIGNAL
 
 dnl Checks for library functions.
 AC_TYPE_SIGNAL
-AC_CHECK_FUNCS([asprintf fchmod fork get_current_dir_name gettimeofday random select strdup strerror time usleep],
+AC_CHECK_FUNCS([asprintf fchmod fork gettimeofday random select strdup usleep],
   [], [], [#include "src/have.h"]
 )
 
   [], [], [#include "src/have.h"]
 )
 
index 9fbd6b9eaa7efa9801ea5d019d403c12b974404b..ff3e8c028211548ecbb189e51e2e9e2c7fcd260a 100644 (file)
 
 #include "xalloc.h"
 
 
 #include "xalloc.h"
 
-#ifndef HAVE_GET_CURRENT_DIR_NAME
-/*
-  Replacement for the GNU get_current_dir_name function:
-
-  get_current_dir_name will malloc(3) an array big enough to hold the
-  current directory name.  If the environment variable PWD is set, and
-  its value is correct, then that value will be returned.
-*/
-char *get_current_dir_name(void) {
-       size_t size;
-       char *buf;
-       char *r;
-
-       /* Start with 100 bytes.  If this turns out to be insufficient to
-          contain the working directory, double the size.  */
-       size = 100;
-       buf = xmalloc(size);
-
-       errno = 0;                                      /* Success */
-       r = getcwd(buf, size);
-
-       /* getcwd returns NULL and sets errno to ERANGE if the bufferspace
-          is insufficient to contain the entire working directory.  */
-       while(r == NULL && errno == ERANGE) {
-               free(buf);
-               size <<= 1;                             /* double the size */
-               buf = xmalloc(size);
-               r = getcwd(buf, size);
-       }
-
-       return buf;
-}
-#endif
-
 #ifndef HAVE_ASPRINTF
 int asprintf(char **buf, const char *fmt, ...) {
        int result;
 #ifndef HAVE_ASPRINTF
 int asprintf(char **buf, const char *fmt, ...) {
        int result;
index a85f81109062c4b64fed761079557a12d27c02c5..fe2b85898a6efd50b9d3083e6af288cd8afdc20c 100644 (file)
 #include "fake-getaddrinfo.h"
 #include "fake-getnameinfo.h"
 
 #include "fake-getaddrinfo.h"
 #include "fake-getnameinfo.h"
 
-#ifndef HAVE_GET_CURRENT_DIR_NAME
-extern char *get_current_dir_name(void);
-#endif
-
 #ifndef HAVE_ASPRINTF
 extern int asprintf(char **, const char *, ...);
 extern int vasprintf(char **, const char *, va_list ap);
 #ifndef HAVE_ASPRINTF
 extern int asprintf(char **, const char *, ...);
 extern int vasprintf(char **, const char *, va_list ap);
index 7695adc16b1a4c277c260fc231e88a4bd79ef59f..536226d5826d54335c71678cb6ccfe6a0073b547 100644 (file)
@@ -32,6 +32,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <inttypes.h>
 #include <string.h>
 #include <ctype.h>
 #include <signal.h>
 #include <string.h>
 #include <ctype.h>
 #include <signal.h>
 #include <ws2tcpip.h>
 #endif
 
 #include <ws2tcpip.h>
 #endif
 
-#ifdef HAVE_STDBOOL_H
-#include <stdbool.h>
-#endif
-
 #ifdef HAVE_TERMIOS_H
 #include <termios.h>
 #endif
 
 #ifdef HAVE_TERMIOS_H
 #include <termios.h>
 #endif
 
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-
 /* Include system specific headers */
 
 #ifdef HAVE_SYSLOG_H
 /* Include system specific headers */
 
 #ifdef HAVE_SYSLOG_H
index 2c09551530e871d1127235c15769c547c9046303..dc3928748a1930394a6081c123b6f4da4577bf62 100644 (file)
 
 #include "have.h"
 
 
 #include "have.h"
 
-#ifndef HAVE_STDBOOL_H
-typedef int bool;
-#define true 1
-#define false 0
-#endif
-
 #ifndef HAVE_STRSIGNAL
 # define strsignal(p) ""
 #endif
 #ifndef HAVE_STRSIGNAL
 # define strsignal(p) ""
 #endif