2002-10-15 03:11:28 +05:30
|
|
|
/* libbb_udhcp.h - busybox compatability wrapper */
|
|
|
|
|
|
|
|
#ifndef _LIBBB_UDHCP_H
|
|
|
|
#define _LIBBB_UDHCP_H
|
|
|
|
|
2002-12-12 04:13:37 +05:30
|
|
|
#ifdef IN_BUSYBOX
|
2003-12-16 07:58:20 +05:30
|
|
|
#include "busybox.h"
|
2002-10-15 03:11:28 +05:30
|
|
|
|
|
|
|
#ifdef CONFIG_FEATURE_UDHCP_SYSLOG
|
|
|
|
#define SYSLOG
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_FEATURE_UDHCP_DEBUG
|
|
|
|
#define DEBUG
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define COMBINED_BINARY
|
2002-11-06 01:40:21 +05:30
|
|
|
#include "version.h"
|
2002-10-15 03:11:28 +05:30
|
|
|
|
2003-12-16 07:58:20 +05:30
|
|
|
#ifdef CONFIG_INSTALL_NO_USR
|
|
|
|
#define DEFAULT_SCRIPT "/share/udhcpc/default.script"
|
|
|
|
#else
|
|
|
|
#define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define xfopen bb_xfopen
|
|
|
|
|
2002-10-15 03:11:28 +05:30
|
|
|
#else /* ! BB_VER */
|
|
|
|
|
2003-12-16 07:58:20 +05:30
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2002-10-15 03:11:28 +05:30
|
|
|
#define TRUE 1
|
|
|
|
#define FALSE 0
|
|
|
|
|
|
|
|
#define xmalloc malloc
|
2003-12-16 07:58:20 +05:30
|
|
|
#define xcalloc calloc
|
|
|
|
|
|
|
|
#define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script"
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
2002-10-15 03:11:28 +05:30
|
|
|
|
|
|
|
#endif /* BB_VER */
|
|
|
|
|
|
|
|
#endif /* _LIBBB_UDHCP_H */
|