Skip to content

Commit b31ac48

Browse files
timer.c: Clean up / simplify includes. (#155)
1 parent 848177a commit b31ac48

File tree

1 file changed

+12
-25
lines changed

1 file changed

+12
-25
lines changed

src/timer.c

+12-25
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,18 @@
1818

1919
#include "version.h"
2020

21-
#ifdef DOS
21+
#include <fcntl.h>
22+
#include <setjmp.h>
23+
#include <signal.h>
24+
#include <stdio.h>
25+
#include <stdlib.h>
26+
#include <sys/types.h>
2227
#include <time.h>
28+
#include <unistd.h>
29+
30+
#ifdef DOS
2331
#include <dos.h>
2432
#include <i32.h> /* "#pragma interrupt" & '_chain_intr'*/
25-
#include <dos.h> /* defines REGS & other structs */
26-
#include <stdio.h> /* define NULL */
27-
#include <stdlib.h>
2833
#define SIGVTALRM SIGUSR1
2934
#define SIGIO SIGREAD
3035
/******************************************************************************
@@ -36,34 +41,16 @@ void (*prev_int_1c)(); /* keeps address of previous 1c handlr*/
3641
void DOStimer();
3742

3843
unsigned long tick_count = 0; /* approx 18 ticks per sec */
39-
40-
#else
41-
#include <time.h>
42-
#include <sys/time.h>
43-
#endif /* DOS */
44-
#include <sys/types.h>
45-
#include <stdio.h>
46-
#include <stdlib.h>
47-
#include <signal.h>
48-
#include <unistd.h>
49-
#include <fcntl.h>
50-
51-
#ifndef DOS
44+
#else /* DOS */
5245
#include <sys/resource.h>
46+
#include <sys/time.h>
5347
#endif /* DOS */
5448

55-
#ifdef OS5
49+
#ifdef USE_DLPI
5650
#include <stropts.h>
5751
extern int ether_fd;
5852
#endif
5953

60-
#ifdef LINUX
61-
#include <sys/ioctl.h>
62-
#include <signal.h>
63-
#endif
64-
65-
#include <setjmp.h>
66-
6754
#include "lispemul.h"
6855
#include "emlglob.h"
6956
#include "lspglob.h"

0 commit comments

Comments
 (0)