mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Remove HPUX 9 rint() test.
Cleanup new crypt() source code.
This commit is contained in:
154
configure
vendored
154
configure
vendored
@ -11263,159 +11263,6 @@ LIBOBJS="$LIBOBJS dirmod.$ac_objext"
|
|||||||
LIBOBJS="$LIBOBJS opendir.$ac_objext" ;;
|
LIBOBJS="$LIBOBJS opendir.$ac_objext" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Now that rint() is /port, I am not sure this still works, bjm 2003-05-09
|
|
||||||
# On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
|
|
||||||
# this hackery with HPUXMATHLIB allows us to cope.
|
|
||||||
HPUXMATHLIB=""
|
|
||||||
case $host_cpu in
|
|
||||||
hppa1.1)
|
|
||||||
if test -r /lib/pa1.1/libm.a ; then
|
|
||||||
HPUXMATHLIB="-L /lib/pa1.1 -lm"
|
|
||||||
fi ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for ac_func in rint
|
|
||||||
do
|
|
||||||
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
|
||||||
echo "$as_me:$LINENO: checking for $ac_func" >&5
|
|
||||||
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
|
|
||||||
if eval "test \"\${$as_ac_var+set}\" = set"; then
|
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
||||||
else
|
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
|
||||||
#line $LINENO "configure"
|
|
||||||
#include "confdefs.h"
|
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
|
||||||
which can conflict with char $ac_func (); below. */
|
|
||||||
#include <assert.h>
|
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
#endif
|
|
||||||
/* We use char because int might match the return type of a gcc2
|
|
||||||
builtin and then its argument prototype would still apply. */
|
|
||||||
char $ac_func ();
|
|
||||||
char (*f) ();
|
|
||||||
|
|
||||||
#ifdef F77_DUMMY_MAIN
|
|
||||||
# ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
# endif
|
|
||||||
int F77_DUMMY_MAIN() { return 1; }
|
|
||||||
#endif
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
/* The GNU C library defines this for functions which it implements
|
|
||||||
to always fail with ENOSYS. Some functions are actually named
|
|
||||||
something starting with __ and the normal name is an alias. */
|
|
||||||
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
|
|
||||||
choke me
|
|
||||||
#else
|
|
||||||
f = $ac_func;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
|
||||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|
||||||
(eval $ac_link) 2>&5
|
|
||||||
ac_status=$?
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); } &&
|
|
||||||
{ ac_try='test -s conftest$ac_exeext'
|
|
||||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
|
||||||
(eval $ac_try) 2>&5
|
|
||||||
ac_status=$?
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); }; }; then
|
|
||||||
eval "$as_ac_var=yes"
|
|
||||||
else
|
|
||||||
echo "$as_me: failed program was:" >&5
|
|
||||||
cat conftest.$ac_ext >&5
|
|
||||||
eval "$as_ac_var=no"
|
|
||||||
fi
|
|
||||||
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
|
||||||
fi
|
|
||||||
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
|
|
||||||
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
|
|
||||||
if test `eval echo '${'$as_ac_var'}'` = yes; then
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
|
||||||
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
else
|
|
||||||
echo "$as_me:$LINENO: checking for rint in -lm" >&5
|
|
||||||
echo $ECHO_N "checking for rint in -lm... $ECHO_C" >&6
|
|
||||||
if test "${ac_cv_lib_m_rint+set}" = set; then
|
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
||||||
else
|
|
||||||
ac_check_lib_save_LIBS=$LIBS
|
|
||||||
LIBS="-lm $HPUXMATHLIB $LIBS"
|
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
|
||||||
#line $LINENO "configure"
|
|
||||||
#include "confdefs.h"
|
|
||||||
|
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
#endif
|
|
||||||
/* We use char because int might match the return type of a gcc2
|
|
||||||
builtin and then its argument prototype would still apply. */
|
|
||||||
char rint ();
|
|
||||||
#ifdef F77_DUMMY_MAIN
|
|
||||||
# ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
# endif
|
|
||||||
int F77_DUMMY_MAIN() { return 1; }
|
|
||||||
#endif
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
rint ();
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
|
||||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|
||||||
(eval $ac_link) 2>&5
|
|
||||||
ac_status=$?
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); } &&
|
|
||||||
{ ac_try='test -s conftest$ac_exeext'
|
|
||||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
|
||||||
(eval $ac_try) 2>&5
|
|
||||||
ac_status=$?
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); }; }; then
|
|
||||||
ac_cv_lib_m_rint=yes
|
|
||||||
else
|
|
||||||
echo "$as_me: failed program was:" >&5
|
|
||||||
cat conftest.$ac_ext >&5
|
|
||||||
ac_cv_lib_m_rint=no
|
|
||||||
fi
|
|
||||||
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
|
||||||
LIBS=$ac_check_lib_save_LIBS
|
|
||||||
fi
|
|
||||||
echo "$as_me:$LINENO: result: $ac_cv_lib_m_rint" >&5
|
|
||||||
echo "${ECHO_T}$ac_cv_lib_m_rint" >&6
|
|
||||||
if test $ac_cv_lib_m_rint = yes; then
|
|
||||||
cat >>confdefs.h <<\_ACEOF
|
|
||||||
#define HAVE_RINT 1
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if test "$with_readline" = yes; then
|
if test "$with_readline" = yes; then
|
||||||
echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
|
echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
|
||||||
echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
|
echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
|
||||||
@ -17230,7 +17077,6 @@ s,@python_moduleexecdir@,$python_moduleexecdir,;t t
|
|||||||
s,@python_includespec@,$python_includespec,;t t
|
s,@python_includespec@,$python_includespec,;t t
|
||||||
s,@python_libspec@,$python_libspec,;t t
|
s,@python_libspec@,$python_libspec,;t t
|
||||||
s,@LIBOBJS@,$LIBOBJS,;t t
|
s,@LIBOBJS@,$LIBOBJS,;t t
|
||||||
s,@HPUXMATHLIB@,$HPUXMATHLIB,;t t
|
|
||||||
s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
|
s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
|
||||||
s,@MSGFMT@,$MSGFMT,;t t
|
s,@MSGFMT@,$MSGFMT,;t t
|
||||||
s,@MSGMERGE@,$MSGMERGE,;t t
|
s,@MSGMERGE@,$MSGMERGE,;t t
|
||||||
|
18
configure.in
18
configure.in
@ -1,5 +1,5 @@
|
|||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
dnl $Header: /cvsroot/pgsql/configure.in,v 1.248 2003/05/09 16:52:10 momjian Exp $
|
dnl $Header: /cvsroot/pgsql/configure.in,v 1.249 2003/05/10 04:03:37 momjian Exp $
|
||||||
dnl
|
dnl
|
||||||
dnl Developers, please strive to achieve this order:
|
dnl Developers, please strive to achieve this order:
|
||||||
dnl
|
dnl
|
||||||
@ -867,22 +867,6 @@ AC_LIBOBJ(dirmod)
|
|||||||
AC_LIBOBJ(opendir) ;;
|
AC_LIBOBJ(opendir) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Now that rint() is /port, I am not sure this still works, bjm 2003-05-09
|
|
||||||
# On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
|
|
||||||
# this hackery with HPUXMATHLIB allows us to cope.
|
|
||||||
HPUXMATHLIB=""
|
|
||||||
case $host_cpu in
|
|
||||||
hppa1.1)
|
|
||||||
if test -r /lib/pa1.1/libm.a ; then
|
|
||||||
HPUXMATHLIB="-L /lib/pa1.1 -lm"
|
|
||||||
fi ;;
|
|
||||||
esac
|
|
||||||
AC_SUBST(HPUXMATHLIB)
|
|
||||||
|
|
||||||
AC_CHECK_FUNCS(rint, [],
|
|
||||||
[AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT), , $HPUXMATHLIB)])
|
|
||||||
|
|
||||||
|
|
||||||
if test "$with_readline" = yes; then
|
if test "$with_readline" = yes; then
|
||||||
PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER
|
PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER
|
||||||
AC_CHECK_FUNCS([rl_completion_matches rl_filename_completion_function])
|
AC_CHECK_FUNCS([rl_completion_matches rl_filename_completion_function])
|
||||||
|
@ -53,7 +53,10 @@ __RCSID("$NetBSD: crypt.c,v 1.18 2001/03/01 14:37:35 wiz Exp $");
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#include "crypt.h"
|
static int des_setkey(const char *key);
|
||||||
|
static int des_cipher(const char *in, char *out, long salt, int num_iter);
|
||||||
|
static int setkey(const char *key);
|
||||||
|
static int encrypt(char *block, int flag);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* UNIX password, and DES, encryption.
|
* UNIX password, and DES, encryption.
|
||||||
@ -473,7 +476,6 @@ static C_block CF6464[64/CHUNKBITS][1<<CHUNKBITS];
|
|||||||
|
|
||||||
|
|
||||||
static C_block constdatablock; /* encryption constant */
|
static C_block constdatablock; /* encryption constant */
|
||||||
POWERGRES_TLS
|
|
||||||
static char cryptresult[1+4+4+11+1]; /* encrypted result */
|
static char cryptresult[1+4+4+11+1]; /* encrypted result */
|
||||||
|
|
||||||
extern char *__md5crypt(const char *, const char *); /* XXX */
|
extern char *__md5crypt(const char *, const char *); /* XXX */
|
||||||
@ -604,7 +606,7 @@ static volatile int des_ready = 0;
|
|||||||
/*
|
/*
|
||||||
* Set up the key schedule from the key.
|
* Set up the key schedule from the key.
|
||||||
*/
|
*/
|
||||||
int
|
static int
|
||||||
des_setkey(key)
|
des_setkey(key)
|
||||||
const char *key;
|
const char *key;
|
||||||
{
|
{
|
||||||
@ -636,7 +638,7 @@ des_setkey(key)
|
|||||||
* NOTE: the performance of this routine is critically dependent on your
|
* NOTE: the performance of this routine is critically dependent on your
|
||||||
* compiler and machine architecture.
|
* compiler and machine architecture.
|
||||||
*/
|
*/
|
||||||
int
|
static int
|
||||||
des_cipher(in, out, salt, num_iter)
|
des_cipher(in, out, salt, num_iter)
|
||||||
const char *in;
|
const char *in;
|
||||||
char *out;
|
char *out;
|
||||||
@ -958,7 +960,7 @@ setkey(key)
|
|||||||
/*
|
/*
|
||||||
* "encrypt" routine (for backwards compatibility)
|
* "encrypt" routine (for backwards compatibility)
|
||||||
*/
|
*/
|
||||||
int
|
static int
|
||||||
encrypt(block, flag)
|
encrypt(block, flag)
|
||||||
char *block;
|
char *block;
|
||||||
int flag;
|
int flag;
|
||||||
|
Reference in New Issue
Block a user