Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
6ffd26d8
Commit
6ffd26d8
authored
Mar 19, 1997
by
Marc G. Fournier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a check for strerr, and add in D'Arcy's strerror() code in case not
found
parent
da9dcf82
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
15 deletions
+99
-15
src/backend/port/Makefile.in
src/backend/port/Makefile.in
+2
-2
src/backend/port/strerror.c
src/backend/port/strerror.c
+30
-0
src/configure
src/configure
+61
-11
src/configure.in
src/configure.in
+2
-1
src/include/config.h.in
src/include/config.h.in
+4
-1
No files found.
src/backend/port/Makefile.in
View file @
6ffd26d8
...
...
@@ -19,7 +19,7 @@
# be converted to Method 2.
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/port/Attic/Makefile.in,v 1.
2 1997/02/28 10:57:47 momjian
Exp $
# $Header: /cvsroot/pgsql/src/backend/port/Attic/Makefile.in,v 1.
3 1997/03/19 02:33:29 scrappy
Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -31,7 +31,7 @@ ifndef PORTNAME
@
false
else
OBJS
=
$(PORTNAME)
/SUBSYS.o @INET_ATON@
OBJS
=
$(PORTNAME)
/SUBSYS.o @INET_ATON@
@STRERROR@
all
:
submake SUBSYS.o
...
...
src/backend/port/strerror.c
0 → 100644
View file @
6ffd26d8
/*
* strerror - map error number to descriptive string
*
* This version is obviously somewhat Unix-specific.
*
* based on code by Henry Spencer
* modified for ANSI by D'Arcy J.M. Cain
*/
#include <string.h>
#include <stdio.h>
#include <errno.h>
extern
const
char
*
const
sys_errlist
[];
extern
int
sys_nerr
;
const
char
*
strerror
(
int
errnum
)
{
static
char
buf
[
24
];
if
(
errnum
<
0
||
errnum
>
sys_nerr
)
{
sprintf
(
buf
,
"unknown error %d"
,
errnum
);
return
(
buf
);
}
return
(
sys_errlist
[
errnum
]);
}
src/configure
View file @
6ffd26d8
...
...
@@ -2955,12 +2955,62 @@ else
INET_ATON
=
'inet_aton.o'
fi
echo
$ac_n
"checking for strerror""...
$ac_c
"
1>&6
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_strerror
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 2964 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strerror(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char strerror();
int main() { return 0; }
int t() {
/* 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_strerror) || defined (__stub___strerror)
choke me
#else
strerror();
#endif
; return 0; }
EOF
if
{
(
eval echo
configure:2988:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_func_strerror=yes"
else
rm
-rf
conftest
*
eval
"ac_cv_func_strerror=no"
fi
rm
-f
conftest
*
fi
if
eval
"test
\"
`
echo
'$ac_cv_func_'
strerror
`
\"
= yes"
;
then
echo
"
$ac_t
""yes"
1>&6
cat
>>
confdefs.h
<<
\
EOF
#define HAVE_STRERROR 1
EOF
else
echo
"
$ac_t
""no"
1>&6
STRERROR
=
'strerror.o'
fi
echo
$ac_n
"checking for strdup""...
$ac_c
"
1>&6
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_strdup
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line
296
4 "configure"
#line
301
4 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strdup(); below. */
...
...
@@ -2984,7 +3034,7 @@ strdup();
; return 0; }
EOF
if
{
(
eval echo
configure:
298
8:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:
303
8:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_func_strdup=yes"
else
...
...
@@ -3012,7 +3062,7 @@ if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 30
1
6 "configure"
#line 30
6
6 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char cbrt(); below. */
...
...
@@ -3036,7 +3086,7 @@ cbrt();
; return 0; }
EOF
if
{
(
eval echo
configure:30
4
0:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:30
9
0:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_func_cbrt=yes"
else
...
...
@@ -3062,7 +3112,7 @@ else
ac_save_LIBS
=
"
$LIBS
"
LIBS
=
"-lm
$LIBS
"
cat
>
conftest.
$ac_ext
<<
EOF
#line 3
06
6 "configure"
#line 3
11
6 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
...
...
@@ -3074,7 +3124,7 @@ int t() {
cbrt()
; return 0; }
EOF
if
{
(
eval echo
configure:3
07
8:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:3
12
8:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_lib_
$ac_lib_var
=yes"
else
...
...
@@ -3102,7 +3152,7 @@ if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 31
0
6 "configure"
#line 31
5
6 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char rint(); below. */
...
...
@@ -3126,7 +3176,7 @@ rint();
; return 0; }
EOF
if
{
(
eval echo
configure:31
3
0:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:31
8
0:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_func_rint=yes"
else
...
...
@@ -3152,7 +3202,7 @@ else
ac_save_LIBS
=
"
$LIBS
"
LIBS
=
"-lm
$LIBS
"
cat
>
conftest.
$ac_ext
<<
EOF
#line 3
15
6 "configure"
#line 3
20
6 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
...
...
@@ -3164,7 +3214,7 @@ int t() {
rint()
; return 0; }
EOF
if
{
(
eval echo
configure:3
16
8:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:3
21
8:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
;
then
rm
-rf
conftest
*
eval
"ac_cv_lib_
$ac_lib_var
=yes"
else
...
...
@@ -3545,4 +3595,4 @@ EOF
chmod
+x
$CONFIG_STATUS
rm
-fr
confdefs
*
$ac_clean_files
test
"
$no_create
"
=
yes
||
${
CONFIG_SHELL
-/bin/sh
}
$CONFIG_STATUS
||
exit
1
src/configure.in
View file @
6ffd26d8
...
...
@@ -162,10 +162,11 @@ AC_FUNC_VPRINTF
AC_CHECK_FUNCS(isinf tzset getrusage vfork memmove sigsetjmp kill sysconf)
AC_CHECK_FUNCS(sigprocmask waitpid setsid)
AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON), INET_ATON='inet_aton.o')
AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR), STRERROR='strerror.o')
AC_CHECK_FUNC(strdup, AC_DEFINE(HAVE_STRDUP), STRDUP='../../utils/strdup.o')
AC_SUBST(STRDUP)
AC_SUBST(INET_ATON)
AC_CHECK_FUNC(cbrt, AC_DEFINE(HAVE_CBRT), AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT)))
AC_CHECK_FUNC(rint, AC_DEFINE(HAVE_RINT), AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT)))
AC_OUTPUT(GNUmakefile Makefile.global backend/port/Makefile bin/psql/Makefile bin/pg_dump/Makefile)
AC_OUTPUT(GNUmakefile Makefile.global backend/port/Makefile bin/psql/Makefile bin/pg_dump/Makefile)
src/include/config.h.in
View file @
6ffd26d8
...
...
@@ -47,9 +47,12 @@
/* Set to 1 if you have cbrt() */
#undef HAVE_CBRT
/* Set to 1 if you have
cbrt
() */
/* Set to 1 if you have
inet_aton
() */
#undef HAVE_INET_ATON
/* Set to 1 if you have strerror() */
#undef HAVE_STRERROR
/* Set to 1 if you have rint() */
#undef HAVE_RINT
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment