Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
5009ee7b
Commit
5009ee7b
authored
Nov 04, 1998
by
Kurt Zeilenga
Browse files
Add tests for vsnprintf and snprintf.
parent
41e25b40
Changes
4
Hide whitespace changes
Inline
Side-by-side
configure
View file @
5009ee7b
...
...
@@ -6142,8 +6142,67 @@ fi
fi
if
test
$ac_cv_func_vprintf
=
yes
;
then
for
ac_func
in
vsnprintf
do
echo
$ac_n
"checking for
$ac_func
""...
$ac_c
"
1>&6
echo
"configure:6151: checking for
$ac_func
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_
$ac_func
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 6156 "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. */
/* 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
();
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
$ac_func
();
#endif
; return 0; }
EOF
if
{
(
eval echo
configure:6179:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
;
then
rm
-rf
conftest
*
eval
"ac_cv_func_
$ac_func
=yes"
else
echo
"configure: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
rm
-rf
conftest
*
eval
"ac_cv_func_
$ac_func
=no"
fi
rm
-f
conftest
*
fi
if
eval
"test
\"
`
echo
'$ac_cv_func_'
$ac_func
`
\"
= yes"
;
then
echo
"
$ac_t
""yes"
1>&6
ac_tr_func
=
HAVE_
`
echo
$ac_func
|
tr
'abcdefghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
`
cat
>>
confdefs.h
<<
EOF
#define
$ac_tr_func
1
EOF
else
echo
"
$ac_t
""no"
1>&6
fi
done
fi
echo
$ac_n
"checking for wait3 that fills in rusage""...
$ac_c
"
1>&6
echo
"configure:6
147
: checking for wait3 that fills in rusage"
>
&5
echo
"configure:6
206
: checking for wait3 that fills in rusage"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_wait3_rusage
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -6151,7 +6210,7 @@ else
ac_cv_func_wait3_rusage
=
no
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 6
155
"configure"
#line 6
214
"configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
...
...
@@ -6182,7 +6241,7 @@ main() {
}
}
EOF
if
{
(
eval echo
configure:6
186
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
&&
(
./conftest
;
exit
)
2>/dev/null
if
{
(
eval echo
configure:6
245
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
&&
(
./conftest
;
exit
)
2>/dev/null
then
ac_cv_func_wait3_rusage
=
yes
else
...
...
@@ -6222,6 +6281,7 @@ for ac_func in \
setsid
\
signal
\
sigset
\
snprintf
\
socket
\
strerror
\
strstr
\
...
...
@@ -6236,12 +6296,12 @@ for ac_func in \
do
echo
$ac_n
"checking for
$ac_func
""...
$ac_c
"
1>&6
echo
"configure:6
24
0: checking for
$ac_func
"
>
&5
echo
"configure:6
30
0: checking for
$ac_func
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_
$ac_func
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 6
24
5 "configure"
#line 6
30
5 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char
$ac_func
(); below. */
...
...
@@ -6264,7 +6324,7 @@ $ac_func();
; return 0; }
EOF
if
{
(
eval echo
configure:62
6
8:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
;
then
if
{
(
eval echo
configure:6
3
28:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
;
then
rm
-rf
conftest
*
eval
"ac_cv_func_
$ac_func
=yes"
else
...
...
@@ -6292,12 +6352,12 @@ done
for
ac_func
in
getopt strdup tempnam
do
echo
$ac_n
"checking for
$ac_func
""...
$ac_c
"
1>&6
echo
"configure:6
29
6: checking for
$ac_func
"
>
&5
echo
"configure:6
35
6: checking for
$ac_func
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_
$ac_func
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 63
0
1 "configure"
#line 63
6
1 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char
$ac_func
(); below. */
...
...
@@ -6320,7 +6380,7 @@ $ac_func();
; return 0; }
EOF
if
{
(
eval echo
configure:63
2
4:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
;
then
if
{
(
eval echo
configure:63
8
4:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
;
then
rm
-rf
conftest
*
eval
"ac_cv_func_
$ac_func
=yes"
else
...
...
@@ -6350,13 +6410,13 @@ done
# Check Configuration
echo
$ac_n
"checking declaration of sys_errlist""...
$ac_c
"
1>&6
echo
"configure:6
35
4: checking declaration of sys_errlist"
>
&5
echo
"configure:6
41
4: checking declaration of sys_errlist"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ol_cv_dcl_sys_errlist
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 6
36
0 "configure"
#line 6
42
0 "configure"
#include "confdefs.h"
#include <stdio.h>
...
...
@@ -6366,7 +6426,7 @@ int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
if
{
(
eval echo
configure:63
7
0:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:6
4
30:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ol_cv_dcl_sys_errlist
=
yes
else
...
...
@@ -6387,20 +6447,20 @@ if test $ol_cv_dcl_sys_errlist = no ; then
EOF
echo
$ac_n
"checking existence of sys_errlist""...
$ac_c
"
1>&6
echo
"configure:6
39
1: checking existence of sys_errlist"
>
&5
echo
"configure:6
45
1: checking existence of sys_errlist"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ol_cv_have_sys_errlist
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 6
39
7 "configure"
#line 6
45
7 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
if
{
(
eval echo
configure:64
0
4:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
;
then
if
{
(
eval echo
configure:64
6
4:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
;
then
rm
-rf
conftest
*
ol_cv_have_sys_errlist
=
yes
else
...
...
@@ -6529,6 +6589,10 @@ if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \
BUILD_SLURPD
=
yes
fi
if
test
$ol_enable_ldapd
!=
no
;
then
BUILD_SLURPD
=
yes
fi
...
...
configure.in
View file @
5009ee7b
...
...
@@ -803,6 +803,12 @@ dnl Checks for library functions.
AC_FUNC_MEMCMP
AC_FUNC_STRFTIME
AC_FUNC_VPRINTF
if test $ac_cv_func_vprintf = yes ; then
dnl check for vsnprintf
AC_CHECK_FUNCS(vsnprintf)
fi
AC_FUNC_WAIT3
AC_CHECK_FUNCS( \
...
...
@@ -822,6 +828,7 @@ AC_CHECK_FUNCS( \
setsid \
signal \
sigset \
snprintf \
socket \
strerror \
strstr \
...
...
@@ -911,6 +918,10 @@ if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \
BUILD_SLURPD=yes
fi
if test $ol_enable_ldapd != no ; then
BUILD_SLURPD=yes
fi
dnl ----------------------------------------------------------------
AC_SUBST(BUILD_LDAPD)
...
...
include/portable.h.in
View file @
5009ee7b
...
...
@@ -290,6 +290,9 @@ is provided ``as is'' without express or implied warranty.
/* Define if you have the sigset function. */
#undef HAVE_SIGSET
/* Define if you have the snprintf function. */
#undef HAVE_SNPRINTF
/* Define if you have the socket function. */
#undef HAVE_SOCKET
...
...
@@ -323,6 +326,9 @@ is provided ``as is'' without express or implied warranty.
/* Define if you have the tempnam function. */
#undef HAVE_TEMPNAM
/* Define if you have the vsnprintf function. */
#undef HAVE_VSNPRINTF
/* Define if you have the waitpid function. */
#undef HAVE_WAITPID
...
...
include/portable.h.nt
View file @
5009ee7b
/* include/portable.h.nt -- manually updated of MS NT (MS VC5) */
/* synced with portable.h.in 1.
5
*/
/* synced with portable.h.in 1.
6
*/
/*
Copyright 1998 The OpenLDAP Foundation, Redwood City, California, USA
All rights reserved.
...
...
@@ -89,6 +89,9 @@ typedef char * caddr_t;
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF 1
/* Define if you have the vsnprintf function. */
/* #undef HAVE_VSNPRINTF */
/* Define if you have the wait3 system call. */
/* #undef HAVE_WAIT3 */
...
...
@@ -315,6 +318,9 @@ typedef char * caddr_t;
/* Define if you have the sigset function. */
/* #undef HAVE_SIGSET */
/* Define if you have the snprintf function. */
/* #undef HAVE_SNPRINTF */
/* Define if you have the socket function. */
#define HAVE_SOCKET 1
...
...
Write
Preview
Supports
Markdown
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