Fix a typo, patch by Andrew Victor
[oweals/busybox.git] / networking / udhcp / libbb_udhcp.h
1 /* libbb_udhcp.h - busybox compatability wrapper */
2
3 /* bit of a hack, do this no matter what the order of the includes.
4  * (for busybox) */
5
6 #ifdef CONFIG_INSTALL_NO_USR
7 #undef DEFAULT_SCRIPT
8 #define DEFAULT_SCRIPT  "/share/udhcpc/default.script"
9 #endif
10
11 #ifndef _LIBBB_UDHCP_H
12 #define _LIBBB_UDHCP_H
13
14 #ifdef IN_BUSYBOX
15 #include "busybox.h"
16
17 #ifdef CONFIG_FEATURE_UDHCP_SYSLOG
18 #define UDHCP_SYSLOG
19 #endif
20
21 #ifdef CONFIG_FEATURE_UDHCP_DEBUG
22 #define UDHCP_DEBUG
23 #endif
24
25 #define COMBINED_BINARY
26 #include "version.h"
27
28 #define xfopen bb_xfopen
29
30 #else /* ! BB_VER */
31
32 #include <stdlib.h>
33 #include <stdio.h>
34
35 #define TRUE                    1
36 #define FALSE                   0
37
38 #define xmalloc malloc
39 #define xcalloc calloc
40
41 static inline FILE *xfopen(const char *file, const char *mode)
42 {
43         FILE *fp;
44         if (!(fp = fopen(file, mode))) {
45                 perror("could not open input file");
46                 exit(0);
47         }
48         return fp;
49 }
50
51 #endif /* BB_VER */
52
53 #endif /* _LIBBB_UDHCP_H */