From 257533ea6e783f44c435339423f465d10a020f84 Mon Sep 17 00:00:00 2001 From: wasiher Date: Mon, 27 Jul 2020 09:30:49 +0900 Subject: [PATCH 1/6] Delete strdup.c --- Python/strdup.c | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 Python/strdup.c diff --git a/Python/strdup.c b/Python/strdup.c deleted file mode 100644 index 6ce171b21fe6c4..00000000000000 --- a/Python/strdup.c +++ /dev/null @@ -1,12 +0,0 @@ -/* strdup() replacement (from stdwin, if you must know) */ - -char * -strdup(const char *str) -{ - if (str != NULL) { - char *copy = malloc(strlen(str) + 1); - if (copy != NULL) - return strcpy(copy, str); - } - return NULL; -} From 437c834ff5ea5c1abeab13f8b4b4956ddb184953 Mon Sep 17 00:00:00 2001 From: wasiher Date: Mon, 27 Jul 2020 09:32:33 +0900 Subject: [PATCH 2/6] removed HAVE_STRDUP --- pyconfig.h.in | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyconfig.h.in b/pyconfig.h.in index bc906a869b623e..c162a3c33e57b6 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -1034,9 +1034,6 @@ /* Has stdatomic.h with atomic_int and atomic_uintptr_t */ #undef HAVE_STD_ATOMIC -/* Define to 1 if you have the `strdup' function. */ -#undef HAVE_STRDUP - /* Define to 1 if you have the `strftime' function. */ #undef HAVE_STRFTIME From 90c8c0a762d6332d4a094801bec9e07e2959e3e5 Mon Sep 17 00:00:00 2001 From: wasiher Date: Mon, 27 Jul 2020 09:45:45 +0900 Subject: [PATCH 3/6] remove strdup --- configure | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/configure b/configure index 5024860ca4395a..69e975a4e8ef3c 100755 --- a/configure +++ b/configure @@ -12829,19 +12829,6 @@ esac fi -ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" -if test "x$ac_cv_func_strdup" = xyes; then : - $as_echo "#define HAVE_STRDUP 1" >>confdefs.h - -else - case " $LIBOBJS " in - *" strdup.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strdup.$ac_objext" - ;; -esac - -fi - for ac_func in getpgrp do : From 3e6a7b9fe8741f7425b96f573d7d763b324f3833 Mon Sep 17 00:00:00 2001 From: wasiher Date: Mon, 27 Jul 2020 09:52:37 +0900 Subject: [PATCH 4/6] removed strdup --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5a3e340aa3e72b..07c0585432b065 100644 --- a/configure.ac +++ b/configure.ac @@ -3970,7 +3970,7 @@ AC_CHECK_FUNCS(forkpty,, # check for long file support functions AC_CHECK_FUNCS(fseek64 fseeko fstatvfs ftell64 ftello statvfs) -AC_REPLACE_FUNCS(dup2 strdup) +AC_REPLACE_FUNCS(dup2) AC_CHECK_FUNCS(getpgrp, AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[getpgrp(0);]])], [AC_DEFINE(GETPGRP_HAVE_ARG, 1, [Define if getpgrp() must be called as getpgrp(0).])], From fd2334ca4823091c26b6be30de215fd9dfd26f49 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2020 01:50:07 +0000 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Core and Builtins/2020-07-27-01-50-06.bpo-41340.pZXfcF.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2020-07-27-01-50-06.bpo-41340.pZXfcF.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-07-27-01-50-06.bpo-41340.pZXfcF.rst b/Misc/NEWS.d/next/Core and Builtins/2020-07-27-01-50-06.bpo-41340.pZXfcF.rst new file mode 100644 index 00000000000000..87e5728061fb1e --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-07-27-01-50-06.bpo-41340.pZXfcF.rst @@ -0,0 +1 @@ +Removed Python/strdup.c \ No newline at end of file From 795a0edea89119da697950730d805f2b85d6289f Mon Sep 17 00:00:00 2001 From: wasiher Date: Mon, 27 Jul 2020 11:50:58 +0900 Subject: [PATCH 6/6] Update Misc/NEWS.d/next/Core and Builtins/2020-07-27-01-50-06.bpo-41340.pZXfcF.rst Co-authored-by: Inada Naoki --- .../Core and Builtins/2020-07-27-01-50-06.bpo-41340.pZXfcF.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-07-27-01-50-06.bpo-41340.pZXfcF.rst b/Misc/NEWS.d/next/Core and Builtins/2020-07-27-01-50-06.bpo-41340.pZXfcF.rst index 87e5728061fb1e..3a93a576931070 100644 --- a/Misc/NEWS.d/next/Core and Builtins/2020-07-27-01-50-06.bpo-41340.pZXfcF.rst +++ b/Misc/NEWS.d/next/Core and Builtins/2020-07-27-01-50-06.bpo-41340.pZXfcF.rst @@ -1 +1 @@ -Removed Python/strdup.c \ No newline at end of file +Removed fallback implementation for ``strdup``.