1
0
mirror of https://frontier.innolan.net/rainlance/amiga-ntimed.git synced 2025-11-22 01:35:44 +00:00

Optimized includes

This commit is contained in:
llsth
2015-03-19 14:41:38 +01:00
parent ac7c9449da
commit 42ffc2e7a4
8 changed files with 130 additions and 184 deletions

View File

@ -27,6 +27,14 @@
#ifndef NTIMED_COMPILER_H #ifndef NTIMED_COMPILER_H
#define NTIMED_COMPILER_H #define NTIMED_COMPILER_H
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <signal.h>
#include <math.h>
#include <sys/socket.h>
/* /*
* See also: * See also:
* http://codewiz.org/projects/amiga/Headers/CompilerSpecific.h * http://codewiz.org/projects/amiga/Headers/CompilerSpecific.h

42
configure vendored
View File

@ -50,6 +50,7 @@ SRCS='
main_amiga_client.c main_amiga_client.c
main_amiga_poll.c main_amiga_poll.c
main_amiga_sim.c main_amiga_sim.c
main_amiga_test.c
combine_delta.c combine_delta.c
mem.c mem.c
net_getaddrinfo.c net_getaddrinfo.c
@ -137,6 +138,28 @@ SRCS3='
todo.c todo.c
udp.c udp.c
' '
SRCS4='
main_amiga_test.c
combine_delta.c
mem.c
net_getaddrinfo.c
net_poll.c
ntp_filter.c
ntp_packet.c
ntp_peer.c
ntp_peerset.c
ntp_tools.c
ocx_stdio.c
param.c
pll_std.c
suckaddr.c
time_amiga.c
time_stuff.c
todo.c
udp.c
'
################################################# #################################################
if make -v 2>&1 | grep GNU > /dev/null 2>&1 ; then if make -v 2>&1 | grep GNU > /dev/null 2>&1 ; then
@ -151,16 +174,16 @@ if $VALID ; then
( (
echo '# Portable Makefile generated by configure' echo '# Portable Makefile generated by configure'
echo '' echo ''
echo 'all: ntimed ntimed-poll ntimed-sim' echo 'all: ntimed ntimed-poll ntimed-sim ntimed-test'
echo '' echo ''
if [ -n "$1" ] && [ $1 = "AMIGA" ] ; then if [ -n "$1" ] && [ $1 = "AMIGA" ] ; then
echo 'CC = gcc' echo 'CC = gcc'
echo "CFLAGS += -O2 -DAOS3 -Wall -Werror" echo "CFLAGS += -O2 -DAOS3 -DWITHTEST -Wall -Werror"
elif [ -n "$1" ] && [ $1 = "AROS" ] ; then elif [ -n "$1" ] && [ $1 = "AROS" ] ; then
echo 'CC = gcc' echo 'CC = gcc'
echo "CFLAGS += -O2 -DAROS -Wall -Werror" echo "CFLAGS += -O2 -DAROS -DWITHTEST -Wall -Werror"
else else
echo "CFLAGS += -O2 -Wall -Werror" echo "CFLAGS += -O2 -Wall -DWITHTEST -Werror"
fi fi
echo '' echo ''
@ -212,6 +235,12 @@ if $VALID ; then
do do
BIN3="${BIN3} `basename $f .c`.o" BIN3="${BIN3} `basename $f .c`.o"
done done
BIN4=""
for f in ${SRCS4}
do
BIN4="${BIN4} `basename $f .c`.o"
done
################################################# #################################################
echo echo
@ -224,8 +253,11 @@ if $VALID ; then
echo "ntimed-sim: ${BIN3}" echo "ntimed-sim: ${BIN3}"
echo " \${CC} \${CFLAGS} -o ntimed-sim ${BIN3} -lm" echo " \${CC} \${CFLAGS} -o ntimed-sim ${BIN3} -lm"
echo echo
echo "ntimed-test: ${BIN4}"
echo " \${CC} \${CFLAGS} -o ntimed-test ${BIN4} -lm"
echo
echo "clean:" echo "clean:"
echo " rm -f ${l} ntimed ntimed-poll ntimed-sim" echo " rm -f ${l} ntimed ntimed-poll ntimed-sim ntimed-test"
echo echo
echo "depend:" echo "depend:"
echo " @echo Dependencies already done" echo " @echo Dependencies already done"

View File

@ -25,67 +25,22 @@
* *
*/ */
#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/intuition.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <signal.h>
#include <math.h>
#include <sys/socket.h>
#include <resources/battclock.h>
#include <clib/battclock_protos.h>
#include <clib/utility_protos.h>
#ifdef Debug
#undef Debug
#endif
#ifdef AROS
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/param.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <proto/socket.h>
#include <sys/socket.h>
#include <bsdsocket/socketbasetags.h>
#include <net/if.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#ifdef Debug
#undef Debug
#endif
#endif
#include "tz.h"
#include "ntimed.h"
#include "ntimed_platform.h" #include "ntimed_platform.h"
#include "mem.h" #include "ntimed.h"
#include "tz.h"
#include "ntp.h" #include "ntp.h"
#include "udp.h" #include "udp.h"
#define ARGSFORMAT "P=PARAM/K,T=TRACEFILE/K,Z=TIMEZONE/K,SERVERS/M,SYNC/S,SAVE/S,QUIET/S"
const char *vers = "\0$VER: ntimed-client 1.0a";
#define PARAM_CLIENT PARAM_INSTANCE #define PARAM_CLIENT PARAM_INSTANCE
#define PARAM_TABLE_NAME client_param_table #define PARAM_TABLE_NAME client_param_table
#include "param_instance.h" #include "param_instance.h"
#undef PARAM_TABLE_NAME #undef PARAM_TABLE_NAME
#undef PARAM_CLIENT #undef PARAM_CLIENT
#define ARGSFORMAT "P=PARAM/K,T=TRACEFILE/K,Z=TIMEZONE/K,SERVERS/M,SYNC/S,SAVE/S,QUIET/S"
const char *vers = "\0$VER: ntimed 1.0a";
void Time_Amiga(struct todolist *); void Time_Amiga(struct todolist *);
void Time_Amiga_Passive(void);
extern int validtime; extern int validtime;
BOOL savetime; BOOL savetime;

View File

@ -25,56 +25,15 @@
* *
*/ */
#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/intuition.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <signal.h>
#include <math.h>
#include <sys/socket.h>
#ifdef Debug
#undef Debug
#endif
#ifdef AROS
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/param.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <proto/socket.h>
#include <sys/socket.h>
#include <bsdsocket/socketbasetags.h>
#include <net/if.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#ifdef Debug
#undef Debug
#endif
#endif
#include "tz.h"
#include "ntimed.h"
#include "ntimed_platform.h" #include "ntimed_platform.h"
#include "mem.h" #include "ntimed.h"
#include "tz.h"
#include "ntp.h" #include "ntp.h"
#include "udp.h" #include "udp.h"
#define ARGSFORMAT "D=DURATION/N,M=MONITOR/K,T=TRACEFILE/K,Z=TIMEZONE/K,SERVERS/M,QUIET/S" #define ARGSFORMAT "D=DURATION/N,M=MONITOR/K,T=TRACEFILE/K,Z=TIMEZONE/K,SERVERS/M,QUIET/S"
const char *vers = "\0$VER: ntimed-poll 1.0a"; const char *vers = "\0$VER: ntimed-poll 1.0a";
void Time_Amiga(struct todolist *);
void Time_Amiga_Passive(void); void Time_Amiga_Passive(void);
BOOL started_from_wb; BOOL started_from_wb;

View File

@ -25,52 +25,14 @@
* *
*/ */
#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/intuition.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <signal.h>
#include <math.h>
#include <sys/socket.h>
#ifdef Debug
#undef Debug
#endif
#ifdef AROS
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/param.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <proto/socket.h>
#include <sys/socket.h>
#include <bsdsocket/socketbasetags.h>
#include <net/if.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#ifdef Debug
#undef Debug
#endif
#endif
#include "tz.h"
#include "ntimed.h"
#include "ntimed_platform.h" #include "ntimed_platform.h"
#include "mem.h" #include "ntimed.h"
#include "ntp.h" #include "ntp.h"
#include "udp.h" #include "udp.h"
#define ARGSFORMAT "P=PARAM/K,B=BUMP/K,T=TRACEFILE/K,SIMFILE/A,QUIET/S"
const char *vers = "\0$VER: ntimed-sim 1.0a";
#define PARAM_CLIENT PARAM_INSTANCE #define PARAM_CLIENT PARAM_INSTANCE
#define PARAM_TABLE_NAME client_param_table #define PARAM_TABLE_NAME client_param_table
#include "param_instance.h" #include "param_instance.h"
@ -107,9 +69,6 @@ struct Library *SocketBase = NULL;
struct RDArgs *rdargs = NULL; struct RDArgs *rdargs = NULL;
struct todolist *tdl = NULL; struct todolist *tdl = NULL;
#define ARGSFORMAT "P=PARAM/K,B=BUMP/K,T=TRACEFILE/K,SIMFILE/A,QUIET/S"
const char *vers = "\0$VER: ntimed-sim 1.0a";
struct ntimedargs { struct ntimedargs {
char *params; char *params;
char *bump; char *bump;

View File

@ -33,6 +33,37 @@
#endif #endif
#endif #endif
#include "mem.h"
#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/intuition.h>
#include <resources/battclock.h>
#include <clib/battclock_protos.h>
#include <clib/utility_protos.h>
#ifdef AROS
#ifdef Debug
#undef Debug
#endif
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/param.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <proto/socket.h>
#include <sys/socket.h>
#include <bsdsocket/socketbasetags.h>
#include <net/if.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#ifdef Debug
#undef Debug
#endif
#endif
#ifdef AOS3 #ifdef AOS3
#define ARGPTR STRPTR #define ARGPTR STRPTR
#define ARGS_FORMAT ARGSFORMAT #define ARGS_FORMAT ARGSFORMAT

View File

@ -216,6 +216,8 @@ tb_adjust_f *TB_Adjust = tb_Adjust;
* Timebase test functions. * Timebase test functions.
*/ */
#ifdef WITHTEST
static int static int
ts_onetest(struct ocx *ocx, const struct timestamp *ts, double off) ts_onetest(struct ocx *ocx, const struct timestamp *ts, double off)
{ {
@ -264,4 +266,4 @@ TS_RunTest(struct ocx *ocx)
AZ(nf); AZ(nf);
} }
#endif