Skip to content

Commit c45643d

Browse files
committed
Remove configure detection of crypt()
crypt() hasn't been needed since crypt detection was removed from PostgreSQL, so these configure checks are not necessary. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/21f88934-f00c-27f6-a9d8-7ea06d317781%402ndquadrant.com
1 parent 8f75e8e commit c45643d

File tree

8 files changed

+2
-1159
lines changed

8 files changed

+2
-1159
lines changed

configure

+1-70
Original file line numberDiff line numberDiff line change
@@ -11209,62 +11209,6 @@ if test "$ac_res" != no; then :
1120911209

1121011210
fi
1121111211

11212-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
11213-
$as_echo_n "checking for library containing crypt... " >&6; }
11214-
if ${ac_cv_search_crypt+:} false; then :
11215-
$as_echo_n "(cached) " >&6
11216-
else
11217-
ac_func_search_save_LIBS=$LIBS
11218-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11219-
/* end confdefs.h. */
11220-
11221-
/* Override any GCC internal prototype to avoid an error.
11222-
Use char because int might match the return type of a GCC
11223-
builtin and then its argument prototype would still apply. */
11224-
#ifdef __cplusplus
11225-
extern "C"
11226-
#endif
11227-
char crypt ();
11228-
int
11229-
main ()
11230-
{
11231-
return crypt ();
11232-
;
11233-
return 0;
11234-
}
11235-
_ACEOF
11236-
for ac_lib in '' crypt; do
11237-
if test -z "$ac_lib"; then
11238-
ac_res="none required"
11239-
else
11240-
ac_res=-l$ac_lib
11241-
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11242-
fi
11243-
if ac_fn_c_try_link "$LINENO"; then :
11244-
ac_cv_search_crypt=$ac_res
11245-
fi
11246-
rm -f core conftest.err conftest.$ac_objext \
11247-
conftest$ac_exeext
11248-
if ${ac_cv_search_crypt+:} false; then :
11249-
break
11250-
fi
11251-
done
11252-
if ${ac_cv_search_crypt+:} false; then :
11253-
11254-
else
11255-
ac_cv_search_crypt=no
11256-
fi
11257-
rm conftest.$ac_ext
11258-
LIBS=$ac_func_search_save_LIBS
11259-
fi
11260-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
11261-
$as_echo "$ac_cv_search_crypt" >&6; }
11262-
ac_res=$ac_cv_search_crypt
11263-
if test "$ac_res" != no; then :
11264-
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11265-
11266-
fi
11267-
1126811212
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
1126911213
$as_echo_n "checking for library containing shm_open... " >&6; }
1127011214
if ${ac_cv_search_shm_open+:} false; then :
@@ -12760,7 +12704,7 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
1276012704
fi
1276112705

1276212706

12763-
for ac_header in atomic.h copyfile.h crypt.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
12707+
for ac_header in atomic.h copyfile.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
1276412708
do :
1276512709
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1276612710
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -15782,19 +15726,6 @@ done
1578215726

1578315727
fi
1578415728

15785-
ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15786-
if test "x$ac_cv_func_crypt" = xyes; then :
15787-
$as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15788-
15789-
else
15790-
case " $LIBOBJS " in
15791-
*" crypt.$ac_objext "* ) ;;
15792-
*) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15793-
;;
15794-
esac
15795-
15796-
fi
15797-
1579815729
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
1579915730
if test "x$ac_cv_func_dlopen" = xyes; then :
1580015731
$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h

configure.in

-3
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,6 @@ AC_SEARCH_LIBS(dlopen, dl)
11181118
AC_SEARCH_LIBS(socket, [socket ws2_32])
11191119
AC_SEARCH_LIBS(shl_load, dld)
11201120
AC_SEARCH_LIBS(getopt_long, [getopt gnugetopt])
1121-
AC_SEARCH_LIBS(crypt, crypt)
11221121
AC_SEARCH_LIBS(shm_open, rt)
11231122
AC_SEARCH_LIBS(shm_unlink, rt)
11241123
AC_SEARCH_LIBS(clock_gettime, [rt posix4])
@@ -1273,7 +1272,6 @@ AC_HEADER_STDBOOL
12731272
AC_CHECK_HEADERS(m4_normalize([
12741273
atomic.h
12751274
copyfile.h
1276-
crypt.h
12771275
fp_class.h
12781276
getopt.h
12791277
ieeefp.h
@@ -1692,7 +1690,6 @@ else
16921690
fi
16931691

16941692
AC_REPLACE_FUNCS(m4_normalize([
1695-
crypt
16961693
dlopen
16971694
fls
16981695
getopt

src/backend/libpq/crypt.c

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
#include "postgres.h"
1515

1616
#include <unistd.h>
17-
#ifdef HAVE_CRYPT_H
18-
#include <crypt.h>
19-
#endif
2017

2118
#include "catalog/pg_authid.h"
2219
#include "common/md5.h"

src/include/pg_config.h.in

-6
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,9 @@
123123
/* Define to 1 if you have the <crtdefs.h> header file. */
124124
#undef HAVE_CRTDEFS_H
125125

126-
/* Define to 1 if you have the `crypt' function. */
127-
#undef HAVE_CRYPT
128-
129126
/* Define to 1 if you have the `CRYPTO_lock' function. */
130127
#undef HAVE_CRYPTO_LOCK
131128

132-
/* Define to 1 if you have the <crypt.h> header file. */
133-
#undef HAVE_CRYPT_H
134-
135129
/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you
136130
don't. */
137131
#undef HAVE_DECL_FDATASYNC

src/include/pg_config.h.win32

-6
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,6 @@
9393
/* Define to 1 if your compiler handles computed gotos. */
9494
/* #undef HAVE_COMPUTED_GOTO */
9595

96-
/* Define to 1 if you have the `crypt' function. */
97-
/* #undef HAVE_CRYPT */
98-
99-
/* Define to 1 if you have the <crypt.h> header file. */
100-
/* #undef HAVE_CRYPT_H */
101-
10296
/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you
10397
don't. */
10498
#define HAVE_DECL_FDATASYNC 0

src/include/port.h

-3
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,6 @@ extern int gettimeofday(struct timeval *tp, struct timezone *tzp);
330330
* Default "extern" declarations or macro substitutes for library routines.
331331
* When necessary, these routines are provided by files in src/port/.
332332
*/
333-
#ifndef HAVE_CRYPT
334-
extern char *crypt(const char *key, const char *setting);
335-
#endif
336333

337334
/* WIN32 handled in port/win32_port.h */
338335
#ifndef WIN32

0 commit comments

Comments
 (0)