diff options
-rw-r--r-- | busybox.h | 3 | ||||
-rw-r--r-- | cmdedit.h | 16 | ||||
-rw-r--r-- | coreutils/md5sum.c | 40 | ||||
-rw-r--r-- | include/busybox.h | 3 | ||||
-rw-r--r-- | md5sum.c | 40 | ||||
-rw-r--r-- | nfsmount.h | 89 | ||||
-rw-r--r-- | shell/cmdedit.h | 16 | ||||
-rw-r--r-- | util-linux/nfsmount.h | 89 |
8 files changed, 6 insertions, 290 deletions
@@ -109,8 +109,7 @@ struct BB_applet { extern const struct BB_applet applets[]; /* Automagically pull in all the applet function prototypes and - * applet usage strings. - * These are all of the form: + * applet usage strings. These are all of the form: * extern int foo_main(int argc, char **argv); * extern const char foo_usage[]; * These are all autogenerated from the set of currently defined applets. @@ -1,11 +1,11 @@ #ifndef CMDEDIT_H #define CMDEDIT_H +#ifdef BB_FEATURE_SH_COMMAND_EDITING /* unix systems can #define POSIX to use termios, otherwise * the bsd or sysv interface will be used */ -#ifdef __STDC__ #include <stddef.h> typedef size_t (*cmdedit_strwidth_proc)(char *); @@ -21,18 +21,6 @@ extern int (*cmdedit_in_hook)(char *); extern int (*cmdedit_out_hook)(char *); extern int (*cmdedit_tab_hook)(char *, int, int *); -#else /* not __STDC__ */ - -void cmdedit_init(void); -void cmdedit_read_input(char* promptStr, char* command); -void cmdedit_setwidth(); -void cmdedit_histadd(); -void cmdedit_strwidth(); - -extern int (*cmdedit_in_hook)(); -extern int (*cmdedit_out_hook)(); -extern int (*cmdedit_tab_hook)(); - -#endif /* __STDC__ */ +#endif /* BB_FEATURE_SH_COMMAND_EDITING */ #endif /* CMDEDIT_H */ diff --git a/coreutils/md5sum.c b/coreutils/md5sum.c index 30b882a..84e037a 100644 --- a/coreutils/md5sum.c +++ b/coreutils/md5sum.c @@ -107,48 +107,8 @@ extern _IO_ssize_t getline __P ((char **, size_t *, FILE *)); the resulting executable. Locally running cross-compiled executables is usually not possible. */ -#ifdef _LIBC # include <sys/types.h> typedef u_int32_t md5_uint32; -#else -# if defined __STDC__ && __STDC__ -# define UINT_MAX_32_BITS 4294967295U -# else -# define UINT_MAX_32_BITS 0xFFFFFFFF -# endif - -/* If UINT_MAX isn't defined, assume it's a 32-bit type. - This should be valid for all systems GNU cares about because - that doesn't include 16-bit systems, and only modern systems - (that certainly have <limits.h>) have 64+-bit integral types. */ - -# ifndef UINT_MAX -# define UINT_MAX UINT_MAX_32_BITS -# endif - -# if UINT_MAX == UINT_MAX_32_BITS - typedef unsigned int md5_uint32; -# else -# if USHRT_MAX == UINT_MAX_32_BITS - typedef unsigned short md5_uint32; -# else -# if ULONG_MAX == UINT_MAX_32_BITS - typedef unsigned long md5_uint32; -# else - /* The following line is intended to evoke an error. - Using #error is not portable enough. */ - "Cannot determine unsigned 32-bit data type." -# endif -# endif -# endif -#endif - -#undef __P -#if defined (__STDC__) && __STDC__ -#define __P(x) x -#else -#define __P(x) () -#endif /* Structure to save state of computation between the single steps. */ struct md5_ctx diff --git a/include/busybox.h b/include/busybox.h index cff4af4..bd8fca5 100644 --- a/include/busybox.h +++ b/include/busybox.h @@ -109,8 +109,7 @@ struct BB_applet { extern const struct BB_applet applets[]; /* Automagically pull in all the applet function prototypes and - * applet usage strings. - * These are all of the form: + * applet usage strings. These are all of the form: * extern int foo_main(int argc, char **argv); * extern const char foo_usage[]; * These are all autogenerated from the set of currently defined applets. @@ -107,48 +107,8 @@ extern _IO_ssize_t getline __P ((char **, size_t *, FILE *)); the resulting executable. Locally running cross-compiled executables is usually not possible. */ -#ifdef _LIBC # include <sys/types.h> typedef u_int32_t md5_uint32; -#else -# if defined __STDC__ && __STDC__ -# define UINT_MAX_32_BITS 4294967295U -# else -# define UINT_MAX_32_BITS 0xFFFFFFFF -# endif - -/* If UINT_MAX isn't defined, assume it's a 32-bit type. - This should be valid for all systems GNU cares about because - that doesn't include 16-bit systems, and only modern systems - (that certainly have <limits.h>) have 64+-bit integral types. */ - -# ifndef UINT_MAX -# define UINT_MAX UINT_MAX_32_BITS -# endif - -# if UINT_MAX == UINT_MAX_32_BITS - typedef unsigned int md5_uint32; -# else -# if USHRT_MAX == UINT_MAX_32_BITS - typedef unsigned short md5_uint32; -# else -# if ULONG_MAX == UINT_MAX_32_BITS - typedef unsigned long md5_uint32; -# else - /* The following line is intended to evoke an error. - Using #error is not portable enough. */ - "Cannot determine unsigned 32-bit data type." -# endif -# endif -# endif -#endif - -#undef __P -#if defined (__STDC__) && __STDC__ -#define __P(x) x -#else -#define __P(x) () -#endif /* Structure to save state of computation between the single steps. */ struct md5_ctx @@ -150,7 +150,6 @@ typedef struct ppathcnf ppathcnf; #define MOUNTPROG 100005 #define MOUNTVERS 1 -#if defined(__STDC__) || defined(__cplusplus) #define MOUNTPROC_NULL 0 extern void * mountproc_null_1(void *, CLIENT *); extern void * mountproc_null_1_svc(void *, struct svc_req *); @@ -174,33 +173,8 @@ extern exports * mountproc_exportall_1(void *, CLIENT *); extern exports * mountproc_exportall_1_svc(void *, struct svc_req *); extern int mountprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t); -#else /* K&R C */ -#define MOUNTPROC_NULL 0 -extern void * mountproc_null_1(); -extern void * mountproc_null_1_svc(); -#define MOUNTPROC_MNT 1 -extern fhstatus * mountproc_mnt_1(); -extern fhstatus * mountproc_mnt_1_svc(); -#define MOUNTPROC_DUMP 2 -extern mountlist * mountproc_dump_1(); -extern mountlist * mountproc_dump_1_svc(); -#define MOUNTPROC_UMNT 3 -extern void * mountproc_umnt_1(); -extern void * mountproc_umnt_1_svc(); -#define MOUNTPROC_UMNTALL 4 -extern void * mountproc_umntall_1(); -extern void * mountproc_umntall_1_svc(); -#define MOUNTPROC_EXPORT 5 -extern exports * mountproc_export_1(); -extern exports * mountproc_export_1_svc(); -#define MOUNTPROC_EXPORTALL 6 -extern exports * mountproc_exportall_1(); -extern exports * mountproc_exportall_1_svc(); -extern int mountprog_1_freeresult (); -#endif /* K&R C */ #define MOUNTVERS_POSIX 2 -#if defined(__STDC__) || defined(__cplusplus) extern void * mountproc_null_2(void *, CLIENT *); extern void * mountproc_null_2_svc(void *, struct svc_req *); extern fhstatus * mountproc_mnt_2(dirpath *, CLIENT *); @@ -220,29 +194,8 @@ extern ppathcnf * mountproc_pathconf_2(dirpath *, CLIENT *); extern ppathcnf * mountproc_pathconf_2_svc(dirpath *, struct svc_req *); extern int mountprog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t); -#else /* K&R C */ -extern void * mountproc_null_2(); -extern void * mountproc_null_2_svc(); -extern fhstatus * mountproc_mnt_2(); -extern fhstatus * mountproc_mnt_2_svc(); -extern mountlist * mountproc_dump_2(); -extern mountlist * mountproc_dump_2_svc(); -extern void * mountproc_umnt_2(); -extern void * mountproc_umnt_2_svc(); -extern void * mountproc_umntall_2(); -extern void * mountproc_umntall_2_svc(); -extern exports * mountproc_export_2(); -extern exports * mountproc_export_2_svc(); -extern exports * mountproc_exportall_2(); -extern exports * mountproc_exportall_2_svc(); -#define MOUNTPROC_PATHCONF 7 -extern ppathcnf * mountproc_pathconf_2(); -extern ppathcnf * mountproc_pathconf_2_svc(); -extern int mountprog_2_freeresult (); -#endif /* K&R C */ #define MOUNT_V3 3 -#if defined(__STDC__) || defined(__cplusplus) #define MOUNTPROC3_NULL 0 extern void * mountproc3_null_3(void *, CLIENT *); extern void * mountproc3_null_3_svc(void *, struct svc_req *); @@ -263,31 +216,8 @@ extern exports * mountproc3_export_3(void *, CLIENT *); extern exports * mountproc3_export_3_svc(void *, struct svc_req *); extern int mountprog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t); -#else /* K&R C */ -#define MOUNTPROC3_NULL 0 -extern void * mountproc3_null_3(); -extern void * mountproc3_null_3_svc(); -#define MOUNTPROC3_MNT 1 -extern mountres3 * mountproc3_mnt_3(); -extern mountres3 * mountproc3_mnt_3_svc(); -#define MOUNTPROC3_DUMP 2 -extern mountlist * mountproc3_dump_3(); -extern mountlist * mountproc3_dump_3_svc(); -#define MOUNTPROC3_UMNT 3 -extern void * mountproc3_umnt_3(); -extern void * mountproc3_umnt_3_svc(); -#define MOUNTPROC3_UMNTALL 4 -extern void * mountproc3_umntall_3(); -extern void * mountproc3_umntall_3_svc(); -#define MOUNTPROC3_EXPORT 5 -extern exports * mountproc3_export_3(); -extern exports * mountproc3_export_3_svc(); -extern int mountprog_3_freeresult (); -#endif /* K&R C */ - /* the xdr functions */ -#if defined(__STDC__) || defined(__cplusplus) extern bool_t xdr_fhandle (XDR *, fhandle); extern bool_t xdr_fhandle3 (XDR *, fhandle3*); extern bool_t xdr_mountstat3 (XDR *, mountstat3*); @@ -304,25 +234,6 @@ extern bool_t xdr_exports (XDR *, exports*); extern bool_t xdr_exportnode (XDR *, exportnode*); extern bool_t xdr_ppathcnf (XDR *, ppathcnf*); -#else /* K&R C */ -extern bool_t xdr_fhandle (); -extern bool_t xdr_fhandle3 (); -extern bool_t xdr_mountstat3 (); -extern bool_t xdr_fhstatus (); -extern bool_t xdr_mountres3_ok (); -extern bool_t xdr_mountres3 (); -extern bool_t xdr_dirpath (); -extern bool_t xdr_name (); -extern bool_t xdr_mountlist (); -extern bool_t xdr_mountbody (); -extern bool_t xdr_groups (); -extern bool_t xdr_groupnode (); -extern bool_t xdr_exports (); -extern bool_t xdr_exportnode (); -extern bool_t xdr_ppathcnf (); - -#endif /* K&R C */ - #ifdef __cplusplus } #endif diff --git a/shell/cmdedit.h b/shell/cmdedit.h index 27f7b55..8ebf0d0 100644 --- a/shell/cmdedit.h +++ b/shell/cmdedit.h @@ -1,11 +1,11 @@ #ifndef CMDEDIT_H #define CMDEDIT_H +#ifdef BB_FEATURE_SH_COMMAND_EDITING /* unix systems can #define POSIX to use termios, otherwise * the bsd or sysv interface will be used */ -#ifdef __STDC__ #include <stddef.h> typedef size_t (*cmdedit_strwidth_proc)(char *); @@ -21,18 +21,6 @@ extern int (*cmdedit_in_hook)(char *); extern int (*cmdedit_out_hook)(char *); extern int (*cmdedit_tab_hook)(char *, int, int *); -#else /* not __STDC__ */ - -void cmdedit_init(void); -void cmdedit_read_input(char* promptStr, char* command); -void cmdedit_setwidth(); -void cmdedit_histadd(); -void cmdedit_strwidth(); - -extern int (*cmdedit_in_hook)(); -extern int (*cmdedit_out_hook)(); -extern int (*cmdedit_tab_hook)(); - -#endif /* __STDC__ */ +#endif /* BB_FEATURE_SH_COMMAND_EDITING */ #endif /* CMDEDIT_H */ diff --git a/util-linux/nfsmount.h b/util-linux/nfsmount.h index a12de50..4f39ff2 100644 --- a/util-linux/nfsmount.h +++ b/util-linux/nfsmount.h @@ -150,7 +150,6 @@ typedef struct ppathcnf ppathcnf; #define MOUNTPROG 100005 #define MOUNTVERS 1 -#if defined(__STDC__) || defined(__cplusplus) #define MOUNTPROC_NULL 0 extern void * mountproc_null_1(void *, CLIENT *); extern void * mountproc_null_1_svc(void *, struct svc_req *); @@ -174,33 +173,8 @@ extern exports * mountproc_exportall_1(void *, CLIENT *); extern exports * mountproc_exportall_1_svc(void *, struct svc_req *); extern int mountprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t); -#else /* K&R C */ -#define MOUNTPROC_NULL 0 -extern void * mountproc_null_1(); -extern void * mountproc_null_1_svc(); -#define MOUNTPROC_MNT 1 -extern fhstatus * mountproc_mnt_1(); -extern fhstatus * mountproc_mnt_1_svc(); -#define MOUNTPROC_DUMP 2 -extern mountlist * mountproc_dump_1(); -extern mountlist * mountproc_dump_1_svc(); -#define MOUNTPROC_UMNT 3 -extern void * mountproc_umnt_1(); -extern void * mountproc_umnt_1_svc(); -#define MOUNTPROC_UMNTALL 4 -extern void * mountproc_umntall_1(); -extern void * mountproc_umntall_1_svc(); -#define MOUNTPROC_EXPORT 5 -extern exports * mountproc_export_1(); -extern exports * mountproc_export_1_svc(); -#define MOUNTPROC_EXPORTALL 6 -extern exports * mountproc_exportall_1(); -extern exports * mountproc_exportall_1_svc(); -extern int mountprog_1_freeresult (); -#endif /* K&R C */ #define MOUNTVERS_POSIX 2 -#if defined(__STDC__) || defined(__cplusplus) extern void * mountproc_null_2(void *, CLIENT *); extern void * mountproc_null_2_svc(void *, struct svc_req *); extern fhstatus * mountproc_mnt_2(dirpath *, CLIENT *); @@ -220,29 +194,8 @@ extern ppathcnf * mountproc_pathconf_2(dirpath *, CLIENT *); extern ppathcnf * mountproc_pathconf_2_svc(dirpath *, struct svc_req *); extern int mountprog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t); -#else /* K&R C */ -extern void * mountproc_null_2(); -extern void * mountproc_null_2_svc(); -extern fhstatus * mountproc_mnt_2(); -extern fhstatus * mountproc_mnt_2_svc(); -extern mountlist * mountproc_dump_2(); -extern mountlist * mountproc_dump_2_svc(); -extern void * mountproc_umnt_2(); -extern void * mountproc_umnt_2_svc(); -extern void * mountproc_umntall_2(); -extern void * mountproc_umntall_2_svc(); -extern exports * mountproc_export_2(); -extern exports * mountproc_export_2_svc(); -extern exports * mountproc_exportall_2(); -extern exports * mountproc_exportall_2_svc(); -#define MOUNTPROC_PATHCONF 7 -extern ppathcnf * mountproc_pathconf_2(); -extern ppathcnf * mountproc_pathconf_2_svc(); -extern int mountprog_2_freeresult (); -#endif /* K&R C */ #define MOUNT_V3 3 -#if defined(__STDC__) || defined(__cplusplus) #define MOUNTPROC3_NULL 0 extern void * mountproc3_null_3(void *, CLIENT *); extern void * mountproc3_null_3_svc(void *, struct svc_req *); @@ -263,31 +216,8 @@ extern exports * mountproc3_export_3(void *, CLIENT *); extern exports * mountproc3_export_3_svc(void *, struct svc_req *); extern int mountprog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t); -#else /* K&R C */ -#define MOUNTPROC3_NULL 0 -extern void * mountproc3_null_3(); -extern void * mountproc3_null_3_svc(); -#define MOUNTPROC3_MNT 1 -extern mountres3 * mountproc3_mnt_3(); -extern mountres3 * mountproc3_mnt_3_svc(); -#define MOUNTPROC3_DUMP 2 -extern mountlist * mountproc3_dump_3(); -extern mountlist * mountproc3_dump_3_svc(); -#define MOUNTPROC3_UMNT 3 -extern void * mountproc3_umnt_3(); -extern void * mountproc3_umnt_3_svc(); -#define MOUNTPROC3_UMNTALL 4 -extern void * mountproc3_umntall_3(); -extern void * mountproc3_umntall_3_svc(); -#define MOUNTPROC3_EXPORT 5 -extern exports * mountproc3_export_3(); -extern exports * mountproc3_export_3_svc(); -extern int mountprog_3_freeresult (); -#endif /* K&R C */ - /* the xdr functions */ -#if defined(__STDC__) || defined(__cplusplus) extern bool_t xdr_fhandle (XDR *, fhandle); extern bool_t xdr_fhandle3 (XDR *, fhandle3*); extern bool_t xdr_mountstat3 (XDR *, mountstat3*); @@ -304,25 +234,6 @@ extern bool_t xdr_exports (XDR *, exports*); extern bool_t xdr_exportnode (XDR *, exportnode*); extern bool_t xdr_ppathcnf (XDR *, ppathcnf*); -#else /* K&R C */ -extern bool_t xdr_fhandle (); -extern bool_t xdr_fhandle3 (); -extern bool_t xdr_mountstat3 (); -extern bool_t xdr_fhstatus (); -extern bool_t xdr_mountres3_ok (); -extern bool_t xdr_mountres3 (); -extern bool_t xdr_dirpath (); -extern bool_t xdr_name (); -extern bool_t xdr_mountlist (); -extern bool_t xdr_mountbody (); -extern bool_t xdr_groups (); -extern bool_t xdr_groupnode (); -extern bool_t xdr_exports (); -extern bool_t xdr_exportnode (); -extern bool_t xdr_ppathcnf (); - -#endif /* K&R C */ - #ifdef __cplusplus } #endif |