summaryrefslogtreecommitdiff
path: root/busybox/networking/udhcp/libbb_udhcp.h
diff options
context:
space:
mode:
authornobody2004-10-13 09:42:10 +0000
committernobody2004-10-13 09:42:10 +0000
commit8c59a0bf0e9e2d87b0ff273ea3f0bf05bbbf6373 (patch)
tree1826706cd4fd009fcd14f4f8021005ec8ec0fa59 /busybox/networking/udhcp/libbb_udhcp.h
downloadbusybox-8c59a0bf0e9e2d87b0ff273ea3f0bf05bbbf6373.zip
busybox-8c59a0bf0e9e2d87b0ff273ea3f0bf05bbbf6373.tar.gz
This commit was manufactured by cvs2svn to create tag 'busybox_1_00'.
Diffstat (limited to 'busybox/networking/udhcp/libbb_udhcp.h')
-rw-r--r--busybox/networking/udhcp/libbb_udhcp.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/busybox/networking/udhcp/libbb_udhcp.h b/busybox/networking/udhcp/libbb_udhcp.h
new file mode 100644
index 0000000..51e1571
--- /dev/null
+++ b/busybox/networking/udhcp/libbb_udhcp.h
@@ -0,0 +1,54 @@
+/* libbb_udhcp.h - busybox compatability wrapper */
+
+/* bit of a hack, do this no matter what the order of the includes.
+ * (for busybox) */
+
+#ifdef CONFIG_INSTALL_NO_USR
+#undef DEFAULT_SCRIPT
+#define DEFAULT_SCRIPT "/share/udhcpc/default.script"
+#endif
+
+#ifndef _LIBBB_UDHCP_H
+#define _LIBBB_UDHCP_H
+
+#ifdef IN_BUSYBOX
+#include "busybox.h"
+
+#ifdef CONFIG_FEATURE_UDHCP_SYSLOG
+#define UDHCP_SYSLOG
+#endif
+
+#ifdef CONFIG_FEATURE_UDHCP_DEBUG
+#define UDHCP_DEBUG
+#endif
+
+#define COMBINED_BINARY
+#include "version.h"
+
+#define xfopen bb_xfopen
+
+#else /* ! BB_VER */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/sysinfo.h>
+
+#define TRUE 1
+#define FALSE 0
+
+#define xmalloc malloc
+#define xcalloc calloc
+
+static inline FILE *xfopen(const char *file, const char *mode)
+{
+ FILE *fp;
+ if (!(fp = fopen(file, mode))) {
+ perror("could not open input file");
+ exit(0);
+ }
+ return fp;
+}
+
+#endif /* BB_VER */
+
+#endif /* _LIBBB_UDHCP_H */