diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/argp.h | 29 | ||||
-rw-r--r-- | include/features.h | 4 | ||||
-rw-r--r-- | include/sys/stat.h | 4 |
3 files changed, 26 insertions, 11 deletions
diff --git a/include/argp.h b/include/argp.h index 8e8674296..d67723521 100644 --- a/include/argp.h +++ b/include/argp.h @@ -46,12 +46,14 @@ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || defined(__STRICT_ANSI__) # define __attribute__(Spec) /* empty */ +# define __UCLIBC_ATTRIBUTE_FALLBACK__ # endif /* The __-protected variants of `format' and `printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || defined(__STRICT_ANSI__) # define __format__ format # define __printf__ printf +# define __UCLIBC_PRINTF_FALLBACK__ # endif #endif @@ -71,7 +73,7 @@ typedef int error_t; # define __error_t_defined #endif - + #ifdef __cplusplus extern "C" { #endif @@ -145,7 +147,7 @@ struct argp_option distinguish these two cases, -x should probably be marked OPTION_NO_USAGE. */ #define OPTION_NO_USAGE 0x10 - + struct argp; /* fwd declare this type */ struct argp_state; /* " */ struct argp_child; /* " */ @@ -283,7 +285,7 @@ struct argp suppressed. */ #define ARGP_KEY_HELP_DUP_ARGS_NOTE 0x2000005 #define ARGP_KEY_HELP_ARGS_DOC 0x2000006 /* Argument doc string. */ - + /* When an argp has a non-zero CHILDREN field, it should point to a vector of argp_child structures, each of which describes a subsidiary argp. */ struct argp_child @@ -308,7 +310,7 @@ struct argp_child (merging the child's grouping levels with the parents). */ int group; }; - + /* Parsing state. This is provided to parsing functions called by argp, which may examine and, as noted, modify fields. */ struct argp_state @@ -356,7 +358,7 @@ struct argp_state void *pstate; /* Private, for use by argp. */ }; - + /* Flags for argp_parse (note that the defaults are those that are convenient for program command line parsing): */ @@ -412,7 +414,7 @@ extern error_t argp_parse (__const struct argp *__restrict __argp, int __argc, char **__restrict __argv, unsigned __flags, int *__restrict __arg_index, void *__restrict __input); - + /* Global variables. */ /* If defined or set by the user program to a non-zero value, then a default @@ -441,7 +443,7 @@ extern __const char *argp_program_bug_address; If not defined or set by the user program, this defaults to EX_USAGE from <sysexits.h>. */ extern error_t argp_err_exit_status; - + /* Flags for argp_help. */ #define ARGP_HELP_USAGE 0x01 /* a Usage: message. */ #define ARGP_HELP_SHORT_USAGE 0x02 /* " but don't actually print options. */ @@ -476,7 +478,7 @@ extern error_t argp_err_exit_status; extern void argp_help (__const struct argp *__restrict __argp, FILE *__restrict __stream, unsigned __flags, char *__restrict __name); - + /* The following routines are intended to be called from within an argp parsing routine (thus taking an argp_state structure as the first argument). They may or may not print an error message and exit, depending @@ -526,7 +528,7 @@ extern int __option_is_end (__const struct argp_option *__opt) __THROW; extern void *__argp_input (__const struct argp *__restrict __argp, __const struct argp_state *__restrict __state) __THROW; - + #ifdef __USE_EXTERN_INLINES # ifndef ARGP_EI @@ -562,4 +564,13 @@ __NTH (__option_is_end (__const struct argp_option *__opt)) } #endif +#ifdef __UCLIBC_ATTRIBUTE_FALLBACK__ +# undef __attribute__ +#endif + +#ifdef __UCLIBC_PRINTF_FALLBACK__ +# undef __format__ +# undef __printf__ +#endif + #endif /* argp.h */ diff --git a/include/features.h b/include/features.h index 11b34205f..b5d4e79f2 100644 --- a/include/features.h +++ b/include/features.h @@ -437,4 +437,8 @@ # include <libc-internal.h> #endif +#if defined(__UCLIBC_USE_TIME64__) || __TARGET_ARCH_BITS__ == 64 +#define __USE_TIME_BITS64 1 +#endif + #endif /* features.h */ diff --git a/include/sys/stat.h b/include/sys/stat.h index 99a6382a0..2dca6c552 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -371,7 +371,7 @@ extern int mkfifo (const char *__path, __mode_t __mode) extern int mkfifoat (int __fd, const char *__path, __mode_t __mode) __THROW __nonnull ((2)); #endif - + #ifdef __USE_ATFILE /* Set file access and modification times relative to directory file descriptor. */ @@ -386,7 +386,7 @@ libc_hidden_proto(utimensat) /* Set file access and modification times of the file associated with FD. */ extern int futimens (int __fd, const struct timespec __times[2]) __THROW; #endif - + /* on uClibc we have unversioned struct stat and mknod. * bits/stat.h is filled with wrong info, so we undo it here. */ #undef _STAT_VER |