diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | m4/extern-inline.m4 | 45 | ||||
-rw-r--r-- | src/include/gnunet_disk_lib.h | 15 | ||||
-rw-r--r-- | src/include/gnunet_strings_lib.h | 2 |
4 files changed, 18 insertions, 46 deletions
diff --git a/configure.ac b/configure.ac index b8bc61947..9ae80398f 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -962,7 +962,7 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) | |||
962 | 962 | ||
963 | # check for gettext | 963 | # check for gettext |
964 | AM_GNU_GETTEXT([external]) | 964 | AM_GNU_GETTEXT([external]) |
965 | AM_GNU_GETTEXT_VERSION([0.18.3]) | 965 | AM_GNU_GETTEXT_VERSION([0.18.1]) |
966 | 966 | ||
967 | # Checks for standard typedefs, structures, and compiler characteristics. | 967 | # Checks for standard typedefs, structures, and compiler characteristics. |
968 | AC_TYPE_PID_T | 968 | AC_TYPE_PID_T |
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4 index 7f1bb397c..c4c5e7f22 100644 --- a/m4/extern-inline.m4 +++ b/m4/extern-inline.m4 | |||
@@ -1,6 +1,6 @@ | |||
1 | dnl 'extern inline' a la ISO C99. | 1 | dnl 'extern inline' a la ISO C99. |
2 | 2 | ||
3 | dnl Copyright 2012-2014 Free Software Foundation, Inc. | 3 | dnl Copyright 2012-2013 Free Software Foundation, Inc. |
4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
@@ -19,56 +19,27 @@ AC_DEFUN([gl_EXTERN_INLINE], | |||
19 | 'reference to static identifier "f" in extern inline function'. | 19 | 'reference to static identifier "f" in extern inline function'. |
20 | This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. | 20 | This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. |
21 | 21 | ||
22 | Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) | 22 | Suppress the use of extern inline on Apple's platforms, as Libc at least |
23 | on configurations that mistakenly use 'static inline' to implement | 23 | through Libc-825.26 (2013-04-09) is incompatible with it; see, e.g., |
24 | functions or macros in standard C headers like <ctype.h>. For example, | 24 | <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>. |
25 | if isdigit is mistakenly implemented via a static inline function, | 25 | Perhaps Apple will fix this some day. */ |
26 | a program containing an extern inline function that calls isdigit | ||
27 | may not work since the C standard prohibits extern inline functions | ||
28 | from calling static functions. This bug is known to occur on: | ||
29 | |||
30 | OS X 10.8 and earlier; see: | ||
31 | http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html | ||
32 | |||
33 | DragonFly; see | ||
34 | http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log | ||
35 | |||
36 | FreeBSD; see: | ||
37 | http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html | ||
38 | |||
39 | OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and | ||
40 | for clang but remains for g++; see <http://trac.macports.org/ticket/41033>. | ||
41 | Assume DragonFly and FreeBSD will be similar. */ | ||
42 | #if (((defined __APPLE__ && defined __MACH__) \ | ||
43 | || defined __DragonFly__ || defined __FreeBSD__) \ | ||
44 | && (defined __header_inline \ | ||
45 | ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ | ||
46 | && ! defined __clang__) \ | ||
47 | : ((! defined _DONT_USE_CTYPE_INLINE_ \ | ||
48 | && (defined __GNUC__ || defined __cplusplus)) \ | ||
49 | || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ | ||
50 | && defined __GNUC__ && ! defined __cplusplus)))) | ||
51 | # define _GL_EXTERN_INLINE_STDHEADER_BUG | ||
52 | #endif | ||
53 | #if ((__GNUC__ \ | 26 | #if ((__GNUC__ \ |
54 | ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ | 27 | ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ |
55 | : (199901L <= __STDC_VERSION__ \ | 28 | : (199901L <= __STDC_VERSION__ \ |
56 | && !defined __HP_cc \ | 29 | && !defined __HP_cc \ |
57 | && !(defined __SUNPRO_C && __STDC__))) \ | 30 | && !(defined __SUNPRO_C && __STDC__))) \ |
58 | && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) | 31 | && !defined __APPLE__) |
59 | # define _GL_INLINE inline | 32 | # define _GL_INLINE inline |
60 | # define _GL_EXTERN_INLINE extern inline | 33 | # define _GL_EXTERN_INLINE extern inline |
61 | # define _GL_EXTERN_INLINE_IN_USE | ||
62 | #elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ | 34 | #elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ |
63 | && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) | 35 | && !defined __APPLE__) |
64 | # if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ | 36 | # if __GNUC_GNU_INLINE__ |
65 | /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ | 37 | /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ |
66 | # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) | 38 | # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) |
67 | # else | 39 | # else |
68 | # define _GL_INLINE extern inline | 40 | # define _GL_INLINE extern inline |
69 | # endif | 41 | # endif |
70 | # define _GL_EXTERN_INLINE extern | 42 | # define _GL_EXTERN_INLINE extern |
71 | # define _GL_EXTERN_INLINE_IN_USE | ||
72 | #else | 43 | #else |
73 | # define _GL_INLINE static _GL_UNUSED | 44 | # define _GL_INLINE static _GL_UNUSED |
74 | # define _GL_EXTERN_INLINE static _GL_UNUSED | 45 | # define _GL_EXTERN_INLINE static _GL_UNUSED |
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h index ddb2369c2..4b38a31d6 100644 --- a/src/include/gnunet_disk_lib.h +++ b/src/include/gnunet_disk_lib.h | |||
@@ -344,7 +344,7 @@ GNUNET_DISK_file_size (const char *filename, uint64_t *size, | |||
344 | * @param filename name of the file | 344 | * @param filename name of the file |
345 | * @param dev set to the device ID | 345 | * @param dev set to the device ID |
346 | * @param ino set to the inode ID | 346 | * @param ino set to the inode ID |
347 | * @return GNUNET_OK on success | 347 | * @return #GNUNET_OK on success |
348 | */ | 348 | */ |
349 | int | 349 | int |
350 | GNUNET_DISK_file_get_identifiers (const char *filename, | 350 | GNUNET_DISK_file_get_identifiers (const char *filename, |
@@ -528,7 +528,6 @@ GNUNET_DISK_fix_permissions (const char *fn, | |||
528 | int require_gid_match); | 528 | int require_gid_match); |
529 | 529 | ||
530 | 530 | ||
531 | |||
532 | /** | 531 | /** |
533 | * Get a handle from a native integer FD. | 532 | * Get a handle from a native integer FD. |
534 | * | 533 | * |
@@ -646,7 +645,8 @@ GNUNET_DISK_fn_write (const char *fn, | |||
646 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 645 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
647 | */ | 646 | */ |
648 | int | 647 | int |
649 | GNUNET_DISK_file_copy (const char *src, const char *dst); | 648 | GNUNET_DISK_file_copy (const char *src, |
649 | const char *dst); | ||
650 | 650 | ||
651 | 651 | ||
652 | /** | 652 | /** |
@@ -679,10 +679,11 @@ struct GNUNET_DISK_DirectoryIterator; | |||
679 | * @param filename complete filename (absolute path) | 679 | * @param filename complete filename (absolute path) |
680 | * @param dirname directory name (absolute path) | 680 | * @param dirname directory name (absolute path) |
681 | */ | 681 | */ |
682 | typedef void (*GNUNET_DISK_DirectoryIteratorCallback) (void *cls, | 682 | typedef void |
683 | struct GNUNET_DISK_DirectoryIterator *di, | 683 | (*GNUNET_DISK_DirectoryIteratorCallback) (void *cls, |
684 | const char *filename, | 684 | struct GNUNET_DISK_DirectoryIterator *di, |
685 | const char *dirname); | 685 | const char *filename, |
686 | const char *dirname); | ||
686 | 687 | ||
687 | 688 | ||
688 | /** | 689 | /** |
diff --git a/src/include/gnunet_strings_lib.h b/src/include/gnunet_strings_lib.h index f8f2a92d5..903b45ec5 100644 --- a/src/include/gnunet_strings_lib.h +++ b/src/include/gnunet_strings_lib.h | |||
@@ -316,7 +316,7 @@ GNUNET_STRINGS_data_to_string_alloc (const void *buf, | |||
316 | * @a out_size must match exactly the size of the data before it was encoded. | 316 | * @a out_size must match exactly the size of the data before it was encoded. |
317 | * | 317 | * |
318 | * @param enc the encoding | 318 | * @param enc the encoding |
319 | * @param enclen number of characters in 'enc' (without 0-terminator, which can be missing) | 319 | * @param enclen number of characters in @a enc (without 0-terminator, which can be missing) |
320 | * @param out location where to store the decoded data | 320 | * @param out location where to store the decoded data |
321 | * @param out_size size of the output buffer @a out | 321 | * @param out_size size of the output buffer @a out |
322 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if result has the wrong encoding | 322 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if result has the wrong encoding |