Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3284e03

Browse files
committed
Remove strdup, strtol, strtoul from libpgport
These should not be needed anymore, at least after the recent port removals. So let's see whether we can do without them.
1 parent d7b2cd9 commit 3284e03

File tree

8 files changed

+2
-323
lines changed

8 files changed

+2
-323
lines changed

configure

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20845,10 +20845,7 @@ LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
2084520845

2084620846

2084720847

20848-
20849-
20850-
20851-
for ac_func in crypt fls getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul
20848+
for ac_func in crypt fls getopt getrusage inet_aton random rint srandom strerror strlcat strlcpy
2085220849
do
2085320850
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
2085420851
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ fi
13251325
pgac_save_LIBS="$LIBS"
13261326
LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
13271327

1328-
AC_REPLACE_FUNCS([crypt fls getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul])
1328+
AC_REPLACE_FUNCS([crypt fls getopt getrusage inet_aton random rint srandom strerror strlcat strlcpy])
13291329

13301330
case $host_os in
13311331

src/include/pg_config.h.in

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -460,9 +460,6 @@
460460
/* Define to 1 if you have the <stdlib.h> header file. */
461461
#undef HAVE_STDLIB_H
462462

463-
/* Define to 1 if you have the `strdup' function. */
464-
#undef HAVE_STRDUP
465-
466463
/* Define to 1 if you have the `strerror' function. */
467464
#undef HAVE_STRERROR
468465

@@ -484,18 +481,12 @@
484481
/* Define to 1 if you have the `strlcpy' function. */
485482
#undef HAVE_STRLCPY
486483

487-
/* Define to 1 if you have the `strtol' function. */
488-
#undef HAVE_STRTOL
489-
490484
/* Define to 1 if you have the `strtoll' function. */
491485
#undef HAVE_STRTOLL
492486

493487
/* Define to 1 if you have the `strtoq' function. */
494488
#undef HAVE_STRTOQ
495489

496-
/* Define to 1 if you have the `strtoul' function. */
497-
#undef HAVE_STRTOUL
498-
499490
/* Define to 1 if you have the `strtoull' function. */
500491
#undef HAVE_STRTOULL
501492

src/include/pg_config.h.win32

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,6 @@
355355
/* Define to 1 if you have the <stdlib.h> header file. */
356356
#define HAVE_STDLIB_H 1
357357

358-
/* Define to 1 if you have the `strdup' function. */
359-
#define HAVE_STRDUP 1
360-
361358
/* Define to 1 if you have the `strerror' function. */
362359
#ifndef HAVE_STRERROR
363360
#define HAVE_STRERROR 1
@@ -375,18 +372,12 @@
375372
/* Define to 1 if you have the <string.h> header file. */
376373
#define HAVE_STRING_H 1
377374

378-
/* Define to 1 if you have the `strtol' function. */
379-
#define HAVE_STRTOL 1
380-
381375
/* Define to 1 if you have the `strtoll' function. */
382376
//#define HAVE_STRTOLL 1
383377

384378
/* Define to 1 if you have the `strtoq' function. */
385379
/* #undef HAVE_STRTOQ */
386380

387-
/* Define to 1 if you have the `strtoul' function. */
388-
#define HAVE_STRTOUL 1
389-
390381
/* Define to 1 if you have the `strtoull' function. */
391382
//#define HAVE_STRTOULL 1
392383

src/include/port.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,10 +408,6 @@ extern double rint(double x);
408408
extern int inet_aton(const char *cp, struct in_addr * addr);
409409
#endif
410410

411-
#ifndef HAVE_STRDUP
412-
extern char *strdup(const char *str);
413-
#endif
414-
415411
#if !HAVE_DECL_STRLCAT
416412
extern size_t strlcat(char *dst, const char *src, size_t siz);
417413
#endif

src/port/strdup.c

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/port/strtol.c

Lines changed: 0 additions & 149 deletions
This file was deleted.

src/port/strtoul.c

Lines changed: 0 additions & 119 deletions
This file was deleted.

0 commit comments

Comments
 (0)