diff options
| author | Paul Eggert | 2021-12-18 16:12:38 -0800 |
|---|---|---|
| committer | Paul Eggert | 2021-12-18 16:15:49 -0800 |
| commit | f05a93e8232e6f56458ac16d733b03e96a63e930 (patch) | |
| tree | b6b95198cf4b5e0b2969b7a427db1c5146a7d856 /lib/string.in.h | |
| parent | 35da3ed05212e0222841becf614c109011f9ad80 (diff) | |
| download | emacs-f05a93e8232e6f56458ac16d733b03e96a63e930.tar.gz emacs-f05a93e8232e6f56458ac16d733b03e96a63e930.zip | |
Update from gnulib
Make the following changes by hand, and run ‘admin/merge-gnulib’.
* configure.ac (AM_CONDITIONAL): Adjust to new Gnulib convention.
Diffstat (limited to 'lib/string.in.h')
| -rw-r--r-- | lib/string.in.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/string.in.h b/lib/string.in.h index 8d77ae38000..afe73508677 100644 --- a/lib/string.in.h +++ b/lib/string.in.h | |||
| @@ -67,6 +67,35 @@ | |||
| 67 | # include <strings.h> | 67 | # include <strings.h> |
| 68 | #endif | 68 | #endif |
| 69 | 69 | ||
| 70 | /* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers | ||
| 71 | that can be freed by passing them as the Ith argument to the | ||
| 72 | function F. */ | ||
| 73 | #ifndef _GL_ATTRIBUTE_DEALLOC | ||
| 74 | # if __GNUC__ >= 11 | ||
| 75 | # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) | ||
| 76 | # else | ||
| 77 | # define _GL_ATTRIBUTE_DEALLOC(f, i) | ||
| 78 | # endif | ||
| 79 | #endif | ||
| 80 | |||
| 81 | /* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that | ||
| 82 | can be freed via 'free'; it can be used only after declaring 'free'. */ | ||
| 83 | /* Applies to: functions. Cannot be used on inline functions. */ | ||
| 84 | #ifndef _GL_ATTRIBUTE_DEALLOC_FREE | ||
| 85 | # define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) | ||
| 86 | #endif | ||
| 87 | |||
| 88 | /* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly | ||
| 89 | allocated memory. */ | ||
| 90 | /* Applies to: functions. */ | ||
| 91 | #ifndef _GL_ATTRIBUTE_MALLOC | ||
| 92 | # if __GNUC__ >= 3 || defined __clang__ | ||
| 93 | # define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) | ||
| 94 | # else | ||
| 95 | # define _GL_ATTRIBUTE_MALLOC | ||
| 96 | # endif | ||
| 97 | #endif | ||
| 98 | |||
| 70 | /* The __attribute__ feature is available in gcc versions 2.5 and later. | 99 | /* The __attribute__ feature is available in gcc versions 2.5 and later. |
| 71 | The attribute __pure__ was added in gcc 2.96. */ | 100 | The attribute __pure__ was added in gcc 2.96. */ |
| 72 | #ifndef _GL_ATTRIBUTE_PURE | 101 | #ifndef _GL_ATTRIBUTE_PURE |