Skip to content

Commit 37627eb

Browse files
committed
Remove HPUX 9 rint() test.
Cleanup new crypt() source code.
1 parent cb8b129 commit 37627eb

File tree

3 files changed

+8
-176
lines changed

3 files changed

+8
-176
lines changed

configure

Lines changed: 0 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -11263,159 +11263,6 @@ LIBOBJS="$LIBOBJS dirmod.$ac_objext"
1126311263
LIBOBJS="$LIBOBJS opendir.$ac_objext" ;;
1126411264
esac
1126511265
11266-
# Now that rint() is /port, I am not sure this still works, bjm 2003-05-09
11267-
# On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
11268-
# this hackery with HPUXMATHLIB allows us to cope.
11269-
HPUXMATHLIB=""
11270-
case $host_cpu in
11271-
hppa1.1)
11272-
if test -r /lib/pa1.1/libm.a ; then
11273-
HPUXMATHLIB="-L /lib/pa1.1 -lm"
11274-
fi ;;
11275-
esac
11276-
11277-
11278-
11279-
for ac_func in rint
11280-
do
11281-
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11282-
echo "$as_me:$LINENO: checking for $ac_func" >&5
11283-
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11284-
if eval "test \"\${$as_ac_var+set}\" = set"; then
11285-
echo $ECHO_N "(cached) $ECHO_C" >&6
11286-
else
11287-
cat >conftest.$ac_ext <<_ACEOF
11288-
#line $LINENO "configure"
11289-
#include "confdefs.h"
11290-
/* System header to define __stub macros and hopefully few prototypes,
11291-
which can conflict with char $ac_func (); below. */
11292-
#include <assert.h>
11293-
/* Override any gcc2 internal prototype to avoid an error. */
11294-
#ifdef __cplusplus
11295-
extern "C"
11296-
#endif
11297-
/* We use char because int might match the return type of a gcc2
11298-
builtin and then its argument prototype would still apply. */
11299-
char $ac_func ();
11300-
char (*f) ();
11301-
11302-
#ifdef F77_DUMMY_MAIN
11303-
# ifdef __cplusplus
11304-
extern "C"
11305-
# endif
11306-
int F77_DUMMY_MAIN() { return 1; }
11307-
#endif
11308-
int
11309-
main ()
11310-
{
11311-
/* The GNU C library defines this for functions which it implements
11312-
to always fail with ENOSYS. Some functions are actually named
11313-
something starting with __ and the normal name is an alias. */
11314-
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11315-
choke me
11316-
#else
11317-
f = $ac_func;
11318-
#endif
11319-
11320-
;
11321-
return 0;
11322-
}
11323-
_ACEOF
11324-
rm -f conftest.$ac_objext conftest$ac_exeext
11325-
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11326-
(eval $ac_link) 2>&5
11327-
ac_status=$?
11328-
echo "$as_me:$LINENO: \$? = $ac_status" >&5
11329-
(exit $ac_status); } &&
11330-
{ ac_try='test -s conftest$ac_exeext'
11331-
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11332-
(eval $ac_try) 2>&5
11333-
ac_status=$?
11334-
echo "$as_me:$LINENO: \$? = $ac_status" >&5
11335-
(exit $ac_status); }; }; then
11336-
eval "$as_ac_var=yes"
11337-
else
11338-
echo "$as_me: failed program was:" >&5
11339-
cat conftest.$ac_ext >&5
11340-
eval "$as_ac_var=no"
11341-
fi
11342-
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11343-
fi
11344-
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11345-
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11346-
if test `eval echo '${'$as_ac_var'}'` = yes; then
11347-
cat >>confdefs.h <<_ACEOF
11348-
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11349-
_ACEOF
11350-
11351-
else
11352-
echo "$as_me:$LINENO: checking for rint in -lm" >&5
11353-
echo $ECHO_N "checking for rint in -lm... $ECHO_C" >&6
11354-
if test "${ac_cv_lib_m_rint+set}" = set; then
11355-
echo $ECHO_N "(cached) $ECHO_C" >&6
11356-
else
11357-
ac_check_lib_save_LIBS=$LIBS
11358-
LIBS="-lm $HPUXMATHLIB $LIBS"
11359-
cat >conftest.$ac_ext <<_ACEOF
11360-
#line $LINENO "configure"
11361-
#include "confdefs.h"
11362-
11363-
/* Override any gcc2 internal prototype to avoid an error. */
11364-
#ifdef __cplusplus
11365-
extern "C"
11366-
#endif
11367-
/* We use char because int might match the return type of a gcc2
11368-
builtin and then its argument prototype would still apply. */
11369-
char rint ();
11370-
#ifdef F77_DUMMY_MAIN
11371-
# ifdef __cplusplus
11372-
extern "C"
11373-
# endif
11374-
int F77_DUMMY_MAIN() { return 1; }
11375-
#endif
11376-
int
11377-
main ()
11378-
{
11379-
rint ();
11380-
;
11381-
return 0;
11382-
}
11383-
_ACEOF
11384-
rm -f conftest.$ac_objext conftest$ac_exeext
11385-
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11386-
(eval $ac_link) 2>&5
11387-
ac_status=$?
11388-
echo "$as_me:$LINENO: \$? = $ac_status" >&5
11389-
(exit $ac_status); } &&
11390-
{ ac_try='test -s conftest$ac_exeext'
11391-
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11392-
(eval $ac_try) 2>&5
11393-
ac_status=$?
11394-
echo "$as_me:$LINENO: \$? = $ac_status" >&5
11395-
(exit $ac_status); }; }; then
11396-
ac_cv_lib_m_rint=yes
11397-
else
11398-
echo "$as_me: failed program was:" >&5
11399-
cat conftest.$ac_ext >&5
11400-
ac_cv_lib_m_rint=no
11401-
fi
11402-
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11403-
LIBS=$ac_check_lib_save_LIBS
11404-
fi
11405-
echo "$as_me:$LINENO: result: $ac_cv_lib_m_rint" >&5
11406-
echo "${ECHO_T}$ac_cv_lib_m_rint" >&6
11407-
if test $ac_cv_lib_m_rint = yes; then
11408-
cat >>confdefs.h <<\_ACEOF
11409-
#define HAVE_RINT 1
11410-
_ACEOF
11411-
11412-
fi
11413-
11414-
fi
11415-
done
11416-
11417-
11418-
1141911266
if test "$with_readline" = yes; then
1142011267
echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
1142111268
echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
@@ -17230,7 +17077,6 @@ s,@python_moduleexecdir@,$python_moduleexecdir,;t t
1723017077
s,@python_includespec@,$python_includespec,;t t
1723117078
s,@python_libspec@,$python_libspec,;t t
1723217079
s,@LIBOBJS@,$LIBOBJS,;t t
17233-
s,@HPUXMATHLIB@,$HPUXMATHLIB,;t t
1723417080
s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
1723517081
s,@MSGFMT@,$MSGFMT,;t t
1723617082
s,@MSGMERGE@,$MSGMERGE,;t t

configure.in

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $Header: /cvsroot/pgsql/configure.in,v 1.248 2003/05/09 16:52:10 momjian Exp $
2+
dnl $Header: /cvsroot/pgsql/configure.in,v 1.249 2003/05/10 04:03:37 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -867,22 +867,6 @@ AC_LIBOBJ(dirmod)
867867
AC_LIBOBJ(opendir) ;;
868868
esac
869869

870-
# Now that rint() is /port, I am not sure this still works, bjm 2003-05-09
871-
# On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
872-
# this hackery with HPUXMATHLIB allows us to cope.
873-
HPUXMATHLIB=""
874-
case $host_cpu in
875-
hppa1.1)
876-
if test -r /lib/pa1.1/libm.a ; then
877-
HPUXMATHLIB="-L /lib/pa1.1 -lm"
878-
fi ;;
879-
esac
880-
AC_SUBST(HPUXMATHLIB)
881-
882-
AC_CHECK_FUNCS(rint, [],
883-
[AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT), , $HPUXMATHLIB)])
884-
885-
886870
if test "$with_readline" = yes; then
887871
PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER
888872
AC_CHECK_FUNCS([rl_completion_matches rl_filename_completion_function])

src/port/crypt.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ __RCSID("$NetBSD: crypt.c,v 1.18 2001/03/01 14:37:35 wiz Exp $");
5353
#include <unistd.h>
5454
#include <windows.h>
5555

56-
#include "crypt.h"
56+
static int des_setkey(const char *key);
57+
static int des_cipher(const char *in, char *out, long salt, int num_iter);
58+
static int setkey(const char *key);
59+
static int encrypt(char *block, int flag);
5760

5861
/*
5962
* UNIX password, and DES, encryption.
@@ -473,7 +476,6 @@ static C_block CF6464[64/CHUNKBITS][1<<CHUNKBITS];
473476

474477

475478
static C_block constdatablock; /* encryption constant */
476-
POWERGRES_TLS
477479
static char cryptresult[1+4+4+11+1]; /* encrypted result */
478480

479481
extern char *__md5crypt(const char *, const char *); /* XXX */
@@ -604,7 +606,7 @@ static volatile int des_ready = 0;
604606
/*
605607
* Set up the key schedule from the key.
606608
*/
607-
int
609+
static int
608610
des_setkey(key)
609611
const char *key;
610612
{
@@ -636,7 +638,7 @@ des_setkey(key)
636638
* NOTE: the performance of this routine is critically dependent on your
637639
* compiler and machine architecture.
638640
*/
639-
int
641+
static int
640642
des_cipher(in, out, salt, num_iter)
641643
const char *in;
642644
char *out;
@@ -958,7 +960,7 @@ setkey(key)
958960
/*
959961
* "encrypt" routine (for backwards compatibility)
960962
*/
961-
int
963+
static int
962964
encrypt(block, flag)
963965
char *block;
964966
int flag;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy