diff options
author | Lorenz <12514511+RincewindsHat@users.noreply.github.com> | 2023-03-11 10:34:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-11 10:34:47 (GMT) |
commit | 75342b53853a898bdd93c7d3da9374115bab6b6d (patch) | |
tree | 0c0af2b796bcdd8ddd42187beb5badb420db8dea /gl/m4/xstrndup.m4 | |
parent | 6bbe0b7b0f609ecab831dec9be7690842bf0a0fc (diff) | |
parent | 357787868b5201ec3e874e7a225b1c944cbbdb4d (diff) | |
download | monitoring-plugins-75342b53853a898bdd93c7d3da9374115bab6b6d.tar.gz |
Merge branch 'master' into patch-1refs/pull/1842/head
Diffstat (limited to 'gl/m4/xstrndup.m4')
-rw-r--r-- | gl/m4/xstrndup.m4 | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/gl/m4/strndup.m4 b/gl/m4/strndup.m4 deleted file mode 100644 index a1f8274..0000000 --- a/gl/m4/strndup.m4 +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | # strndup.m4 serial 21 | ||
2 | dnl Copyright (C) 2002-2003, 2005-2013 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | AC_DEFUN([gl_FUNC_STRNDUP], | ||
8 | [ | ||
9 | dnl Persuade glibc <string.h> to declare strndup(). | ||
10 | AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) | ||
11 | |||
12 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles | ||
13 | AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) | ||
14 | AC_CHECK_DECLS_ONCE([strndup]) | ||
15 | AC_CHECK_FUNCS_ONCE([strndup]) | ||
16 | if test $ac_cv_have_decl_strndup = no; then | ||
17 | HAVE_DECL_STRNDUP=0 | ||
18 | fi | ||
19 | |||
20 | if test $ac_cv_func_strndup = yes; then | ||
21 | HAVE_STRNDUP=1 | ||
22 | # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. | ||
23 | AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works], | ||
24 | [AC_RUN_IFELSE([ | ||
25 | AC_LANG_PROGRAM([[#include <string.h> | ||
26 | #include <stdlib.h>]], [[ | ||
27 | #if !HAVE_DECL_STRNDUP | ||
28 | extern | ||
29 | #ifdef __cplusplus | ||
30 | "C" | ||
31 | #endif | ||
32 | char *strndup (const char *, size_t); | ||
33 | #endif | ||
34 | char *s; | ||
35 | s = strndup ("some longer string", 15); | ||
36 | free (s); | ||
37 | s = strndup ("shorter string", 13); | ||
38 | return s[13] != '\0';]])], | ||
39 | [gl_cv_func_strndup_works=yes], | ||
40 | [gl_cv_func_strndup_works=no], | ||
41 | [ | ||
42 | changequote(,)dnl | ||
43 | case $host_os in | ||
44 | aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";; | ||
45 | *) gl_cv_func_strndup_works="guessing yes";; | ||
46 | esac | ||
47 | changequote([,])dnl | ||
48 | ])]) | ||
49 | case $gl_cv_func_strndup_works in | ||
50 | *no) REPLACE_STRNDUP=1 ;; | ||
51 | esac | ||
52 | else | ||
53 | HAVE_STRNDUP=0 | ||
54 | fi | ||
55 | ]) | ||
diff --git a/gl/m4/xstrndup.m4 b/gl/m4/xstrndup.m4 deleted file mode 100644 index 4a9330b..0000000 --- a/gl/m4/xstrndup.m4 +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | # xstrndup.m4 serial 2 | ||
2 | dnl Copyright (C) 2003, 2009-2013 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | AC_DEFUN([gl_XSTRNDUP], | ||
8 | [ | ||
9 | gl_PREREQ_XSTRNDUP | ||
10 | ]) | ||
11 | |||
12 | # Prerequisites of lib/xstrndup.c. | ||
13 | AC_DEFUN([gl_PREREQ_XSTRNDUP], [ | ||
14 | : | ||
15 | ]) | ||