Cleanup including of system headers

This commit is contained in:
Miroslav Lichvar 2013-06-14 13:30:54 +02:00
parent f7802f0111
commit 6ca73bf670
18 changed files with 15 additions and 87 deletions

View file

@ -48,12 +48,6 @@
#endif
#endif
#ifdef HAS_STDINT_H
#include <stdint.h>
#elif defined(HAS_INTTYPES_H)
#include <inttypes.h>
#endif
/* ================================================== */
union sockaddr_in46 {

View file

@ -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"

4
keys.c
View file

@ -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"

View file

@ -30,8 +30,7 @@
#include "config.h"
#include <assert.h>
#include <stddef.h>
#include "sysincl.h"
#include "conf.h"
#include "local.h"

View file

@ -32,7 +32,7 @@
#include "config.h"
#include <stddef.h>
#include "sysincl.h"
#include "manual.h"
#include "logging.h"

6
md5.h
View file

@ -32,11 +32,7 @@
***********************************************************************
*/
#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;

View file

@ -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)))

View file

@ -32,7 +32,6 @@
#include "nameserv.h"
#include "util.h"
#include <resolv.h>
/* ================================================== */

6
ntp.h
View file

@ -27,11 +27,7 @@
#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"

View file

@ -39,8 +39,6 @@
#include "conf.h"
#include "util.h"
#include <fcntl.h>
union sockaddr_in46 {
struct sockaddr_in in4;
#ifdef HAVE_IPV6

View file

@ -27,13 +27,12 @@
#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 {

View file

@ -27,16 +27,13 @@
#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 {

View file

@ -28,11 +28,7 @@
#include "config.h"
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "sysincl.h"
#include "regress.h"
#include "logging.h"

View file

@ -29,25 +29,8 @@
#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 */

View 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 */

View file

@ -29,14 +29,8 @@
#include "config.h"
#ifdef LINUX
#include "sysincl.h"
#include <sys/time.h>
#include <stdio.h>
#include <unistd.h>
#include <math.h>
#include <ctype.h>
#include <assert.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
* */

View file

@ -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>

View file

@ -31,10 +31,6 @@
#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