]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Cleanup including of system headers
authorMiroslav Lichvar <mlichvar@redhat.com>
Fri, 14 Jun 2013 11:30:54 +0000 (13:30 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 14 Jun 2013 11:41:16 +0000 (13:41 +0200)
18 files changed:
client.c
cmdmon.c
keys.c
local.c
manual.c
md5.h
memory.h
nameserv.c
ntp.h
ntp_io.c
refclock_shm.c
refclock_sock.c
regress.c
rtc_linux.c
rtc_linux.h
sys_linux.c
sysincl.h
wrap_adjtimex.c

index fec503b504f1eb67ef76fc5ab611e2a3da4e4b66..d247977fa477fdb4047cdd41080cad3a9fa08c20 100644 (file)
--- a/client.c
+++ b/client.c
 #endif
 #endif
 
-#ifdef HAS_STDINT_H
-#include <stdint.h>
-#elif defined(HAS_INTTYPES_H)
-#include <inttypes.h>
-#endif
-
 /* ================================================== */
 
 union sockaddr_in46 {
index c9fa39bac738b417551b68804a5249ab0374199e..b61e776a2afa0be8c725c90f4e860f5fb5bff96f 100644 (file)
--- a/cmdmon.c
+++ b/cmdmon.c
@@ -34,7 +34,6 @@
 #include "sched.h"
 #include "util.h"
 #include "logging.h"
-#include "md5.h"
 #include "keys.h"
 #include "ntp_sources.h"
 #include "ntp_core.h"
diff --git a/keys.c b/keys.c
index 1c14dc22bb65dd3d7ccaef190f1b941e827bbe8f..e11a264a52b13802a9fbdd1ea62d16bd844d9b41 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -28,9 +28,7 @@
 
 #include "config.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "sysincl.h"
 
 #include "keys.h"
 #include "cmdparse.h"
diff --git a/local.c b/local.c
index 3cd1bb27520368cfb30dc598a0e78d6edbeb125d..cbe8518b42beb4b67d3baca8b438755da089890d 100644 (file)
--- a/local.c
+++ b/local.c
@@ -30,8 +30,7 @@
 
 #include "config.h"
 
-#include <assert.h>
-#include <stddef.h>
+#include "sysincl.h"
 
 #include "conf.h"
 #include "local.h"
index 47a4d1fa769bc3234bc921f9fc88017f6e06cf08..a7b117ca8bf992bf41953fa55a368dd9f04111a7 100644 (file)
--- a/manual.c
+++ b/manual.c
@@ -32,7 +32,7 @@
 
 #include "config.h"
 
-#include <stddef.h>
+#include "sysincl.h"
 
 #include "manual.h"
 #include "logging.h"
diff --git a/md5.h b/md5.h
index aaf9548f1b31d0607abca8bac1648ec4fb7d60c3..5f37235bdfb41c4930e5f5ec3ff1b566e94d1399 100644 (file)
--- a/md5.h
+++ b/md5.h
  ***********************************************************************
  */
 
-#ifdef HAS_STDINT_H
-#include <stdint.h>
-#elif defined(HAS_INTTYPES_H)
-#include <inttypes.h>
-#endif
+#include "sysincl.h"
 
 /* typedef a 32-bit type */
 typedef uint32_t UINT4;
index 4e584fb8792f286d390cb81f7ad27aca17b80206..5c65272ef190e53bdc0ce49b497d3dc453013171 100644 (file)
--- a/memory.h
+++ b/memory.h
@@ -27,8 +27,6 @@
 #ifndef GOT_MEMORY_H
 #define GOT_MEMORY_H
 
-#include <stdlib.h>
-
 #define Malloc(x) malloc(x)
 #define MallocNew(T) ((T *) malloc(sizeof(T)))
 #define MallocArray(T, n) ((T *) malloc((n) * sizeof(T)))
index 1770845e8419ab1876052d468728a5cf8129fb76..328212b46ffe199505bcbfe4b9792de04d2b809e 100644 (file)
@@ -32,7 +32,6 @@
 
 #include "nameserv.h"
 #include "util.h"
-#include <resolv.h>
 
 /* ================================================== */
 
diff --git a/ntp.h b/ntp.h
index 88019703f71a63929e13352af0b6627924f27c0c..6ae7bd850fe5202b72bc050a029d120c38a544eb 100644 (file)
--- a/ntp.h
+++ b/ntp.h
 #ifndef GOT_NTP_H
 #define GOT_NTP_H
 
-#ifdef HAS_STDINT_H
-#include <stdint.h>
-#elif defined(HAS_INTTYPES_H)
-#include <inttypes.h>
-#endif
+#include "sysincl.h"
 
 #include "hash.h"
 
index 803be915d9521037615151851040d9bcd2382653..9924056c8e9ad54622f80d0057029c6a039d82b8 100644 (file)
--- a/ntp_io.c
+++ b/ntp_io.c
@@ -39,8 +39,6 @@
 #include "conf.h"
 #include "util.h"
 
-#include <fcntl.h>
-
 union sockaddr_in46 {
   struct sockaddr_in in4;
 #ifdef HAVE_IPV6
index 110236fbfc839831ebcea3b2ce6b2665b2bb4365..acf2e52c29cb0753c9faefe61f9c468f9e0e5898 100644 (file)
 
 #include "config.h"
 
+#include "sysincl.h"
+
 #include "refclock.h"
 #include "logging.h"
 #include "util.h"
 
-#include <sys/types.h>
-#include <sys/shm.h>
-
 #define SHMKEY 0x4e545030
 
 struct shmTime {
index 79e0e545adb9274b8ac03c4b3a7c68f5edda0403..73f02befdfe329e698d7aca3950db774d11a2ec6 100644 (file)
 
 #include "config.h"
 
+#include "sysincl.h"
+
 #include "refclock.h"
 #include "logging.h"
 #include "util.h"
 #include "sched.h"
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <unistd.h>
-
 #define SOCK_MAGIC 0x534f434b
 
 struct sock_sample {
index 60e589a8a6a54facf1fb8488da783e7f8d7a5fd1..89222886af4afbbe79ea40c86e8fa106643ed2c4 100644 (file)
--- a/regress.c
+++ b/regress.c
 
 #include "config.h"
 
-#include <assert.h>
-#include <math.h>
-
-#include <stdio.h>
-#include <string.h>
+#include "sysincl.h"
 
 #include "regress.h"
 #include "logging.h"
index 500af307dffab980627348c84db40ae807bc34d7..2c5242646f726426fdbbbdec0c02e2217bf1ea57 100644 (file)
 
 #include "config.h"
 
-#if defined LINUX
+#include "sysincl.h"
 
-#ifdef sparc
-#define __KERNEL__
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-#include <sys/time.h>
-#include <sys/types.h>
-
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <assert.h>
-#include <string.h>
 #include <linux/rtc.h>
 
 #include "logging.h"
@@ -1067,7 +1050,3 @@ RTC_Linux_Trim(void)
   return 1;
   
 }
-
-/* ================================================== */
-
-#endif /* defined LINUX */
index 04896a30557a26847f5b4792b74514ac701e322b..4ac13e173c46b25fb9bd1962125f5ed56f257912 100644 (file)
@@ -28,8 +28,6 @@
 
 #include "reports.h"
 
-#if defined LINUX
-
 extern int RTC_Linux_Initialise(void);
 extern void RTC_Linux_Finalise(void);
 extern void RTC_Linux_TimePreInit(void);
@@ -44,6 +42,4 @@ extern int RTC_Linux_Trim(void);
 
 extern void RTC_Linux_CycleLogFile(void);
 
-#endif /* defined LINUX */
-
 #endif /* _GOT_RTC_LINUX_H */
index f6c2d8de5be1714ab7b1c7e7b76c59b610c4ea5c..80c888ed67b08484dae67aec5f9e61c68ea32c19 100644 (file)
 
 #include "config.h"
 
-#ifdef LINUX
-
-#include <sys/time.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <math.h>
-#include <ctype.h>
-#include <assert.h>
+#include "sysincl.h"
+
 #include <sys/utsname.h>
 
 #if defined(HAVE_SCHED_SETSCHEDULER)
@@ -1250,9 +1244,3 @@ void SYS_Linux_MemLockAll(int LockAll)
   }
 }
 #endif /* HAVE_MLOCKALL */
-
-#endif /* LINUX */
-
-/* vim:ts=8
- * */
-
index 1baef3993a07bb2290de88c0f366edccff210ebf..55c020779189e37afd8f06851f319d4c0bf01f75 100644 (file)
--- a/sysincl.h
+++ b/sysincl.h
@@ -45,6 +45,7 @@
 #include <math.h>
 #include <netdb.h>
 #include <netinet/in.h>
+#include <resolv.h>
 #include <signal.h>
 #include <stdarg.h>
 #include <stddef.h>
@@ -56,6 +57,8 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/types.h>
+#include <sys/un.h>
+#include <sys/shm.h>
 #include <syslog.h>
 #include <time.h>
 
index d0cd14ae75ad216628df95137f34ee17b4117502..9e2f1b8edeba840f99b238e99e67e5f8eeb8dbf1 100644 (file)
 
 #include "config.h"
 
-#ifdef LINUX
-
-#define _LOOSE_KERNEL_NAMES
-
 #include "chrony_timex.h"
 #include "wrap_adjtimex.h"
 
@@ -276,6 +272,3 @@ TMX_ApplyStepOffset(double offset)
 
   return adjtimex(&txc);
 }
-
-#endif
-