From f02474d74d100ffc03455efa101fa72ab72e34be Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Tue, 4 Aug 2015 09:53:52 +0100 Subject: [PATCH] Removed unused 'strdup' function and autoconf check. Function left unused by commit 00b14f309b5da3917d62f7d98a727290eaee6ea2. --- re2c/configure.ac | 4 ---- re2c/src/parse/parser.ypp | 17 ----------------- 2 files changed, 21 deletions(-) diff --git a/re2c/configure.ac b/re2c/configure.ac index dc49d1a1..7a5c3f3d 100644 --- a/re2c/configure.ac +++ b/re2c/configure.ac @@ -83,10 +83,6 @@ AC_CHECK_SIZEOF([0ll], [], [[]]) AC_CHECK_SIZEOF([0i8], [], [[]]) -# checks for library functions -AC_CHECK_FUNCS([strdup]) - - AC_CONFIG_FILES([\ Makefile \ doc/re2c.ad \ diff --git a/re2c/src/parse/parser.ypp b/re2c/src/parse/parser.ypp index bcb64402..4a5aafd6 100644 --- a/re2c/src/parse/parser.ypp +++ b/re2c/src/parse/parser.ypp @@ -50,23 +50,6 @@ static symbol_table_t symbol_table; #define __attribute__(x) #endif -/* strdup() isn't standard C, so if we don't have it, we'll create our - * own version - */ -#if !defined(HAVE_STRDUP) -static char* strdup(const char* s) -{ - char* rv = (char*)malloc(strlen(s) + 1); - - if (rv == NULL) - { - return NULL; - } - strcpy(rv, s); - return rv; -} -#endif - void context_check(CondList *clist) { if (!cFlag) -- 2.40.0