build-sys: add gnulib

This will mean better portability, and a good reason to get rid of
various portability autotools directives which where part of this
project.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2012-11-04 21:31:34 +00:00
parent b5e518cd5e
commit ab699e71ad
18 changed files with 1309 additions and 256 deletions

View file

@ -168,20 +168,8 @@ int do_counting(void);
void flip_ranges(struct range_t *__restrict ranges, struct range_t *__restrict tmp_ranges)
__attribute__ ((nonnull(1, 2)));
/* support functions */
void *safe_malloc(const size_t size)
#if __GNUC__ >= 3
__attribute__ ((__malloc__))
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
__attribute__ ((__alloc_size__((1))))
#endif
#endif
;
void *safe_realloc(void *__restrict ptr, const size_t size);
char *safe_strdup(const char *__restrict str) __attribute__ ((nonnull(1)));
int xstrstr(char *__restrict a, const char *__restrict b, int len);
double strtod_or_err(const char *__restrict str, const char *__restrict errmesg);
int close_stream(FILE * stream);
void close_stdout(void);
void print_version(void) __attribute__ ((noreturn));
void usage(int status) __attribute__ ((noreturn));
/* qsort required functions... */