Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
James Lowden
OpenLDAP
Commits
7f0c73bf
Commit
7f0c73bf
authored
20 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
new strerror_r checks
parent
0cd5b9f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
build/openldap.m4
+39
-0
39 additions, 0 deletions
build/openldap.m4
configure
+862
-718
862 additions, 718 deletions
configure
configure.in
+4
-5
4 additions, 5 deletions
configure.in
include/portable.h.in
+12
-6
12 additions, 6 deletions
include/portable.h.in
with
917 additions
and
729 deletions
build/openldap.m4
+
39
−
0
View file @
7f0c73bf
...
...
@@ -971,6 +971,8 @@ fi
])
dnl
dnl ====================================================================
dnl Error string checks
dnl
dnl Check for declaration of sys_errlist in one of stdio.h and errno.h.
dnl Declaration of sys_errlist on BSD4.4 interferes with our declaration.
dnl Reported by Keith Bostic.
...
...
@@ -1004,7 +1006,44 @@ if test $ol_cv_have_sys_errlist = yes ; then
[define if you actually have sys_errlist in your libs])
fi
])dnl
AC_DEFUN([OL_NONPOSIX_STRERROR_R],
[AC_CACHE_CHECK([non-posix strerror_r],ol_cv_nonposix_strerror_r,[
AC_EGREP_CPP(strerror_r,[#include <string.h>],
ol_decl_strerror_r=yes, ol_decl_strerror_r=no)dnl
if test $ol_decl_strerror_r = yes ; then
AC_TRY_COMPILE([#include <string.h>],
[ /* from autoconf 2.59 */
char buf[100];
char x = *strerror_r (0, buf, sizeof buf);
char *p = strerror_r (0, buf, sizeof buf);
], ol_cv_nonposix_strerror_r=yes, ol_cv_nonposix_strerror_r=no)
else
AC_TRY_RUN([
main() {
char buf[100];
buf[0] = 0;
strerror_r( 1, buf, sizeof buf );
exit( buf[0] == 0 );
}
], ol_cv_nonposix_strerror_r=yes, ol_cv_nonposix_strerror=no)
fi
])
if test $ol_cv_nonposix_strerror_r = yes ; then
AC_DEFINE(HAVE_NONPOSIX_STRERROR_R,1,
[define if strerror_r returns char* instead of int])
fi
])dnl
dnl
AC_DEFUN([OL_STRERROR],
[AC_CHECK_FUNCS(strerror strerror_r)
ol_cv_func_strerror_r=no
if test "${ac_cv_func_strerror_r}" = yes ; then
OL_NONPOSIX_STRERROR_R
elif test "${ac_cv_func_strerror}" = no ; then
OL_SYS_ERRLIST
fi
])dnl
dnl ====================================================================
dnl Early MIPS compilers (used in Ultrix 4.2) don't like
dnl "int x; int *volatile a = &x; *a = 0;"
...
...
This diff is collapsed.
Click to expand it.
configure
+
862
−
718
View file @
7f0c73bf
This diff is collapsed.
Click to expand it.
configure.in
+
4
−
5
View file @
7f0c73bf
...
...
@@ -882,6 +882,10 @@ fi
dnl check to see if system call automatically restart
dnl AC_SYS_RESTARTABLE_SYSCALLS
dnl ----------------------------------------------------------------
# strerror checks
OL_STRERROR
dnl ----------------------------------------------------------------
dnl require POSIX regex
AC_CHECK_HEADERS( regex.h )
...
...
@@ -2346,7 +2350,6 @@ AC_CHECK_FUNCS( \
signal \
sigset \
strdup \
strerror \
strpbrk \
strrchr \
strsep \
...
...
@@ -2386,10 +2389,6 @@ if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
fi
fi
dnl ----------------------------------------------------------------
# Check Configuration
OL_SYS_ERRLIST
dnl ----------------------------------------------------------------
dnl Sort out defines
...
...
This diff is collapsed.
Click to expand it.
include/portable.h.in
+
12
−
6
View file @
7f0c73bf
...
...
@@ -284,6 +284,9 @@
/* Define if you have the strerror function. */
#undef HAVE_STRERROR
/* Define if you have the strerror_r function. */
#undef HAVE_STRERROR_R
/* Define if you have the strpbrk function. */
#undef HAVE_STRPBRK
...
...
@@ -671,6 +674,15 @@
/* define if you have winsock2 */
#undef HAVE_WINSOCK2
/* define if strerror_r returns char* instead of int */
#undef HAVE_NONPOSIX_STRERROR_R
/* define if sys_errlist is not declared in stdio.h or errno.h */
#undef DECL_SYS_ERRLIST
/* define if you actually have sys_errlist in your libs */
#undef HAVE_SYS_ERRLIST
/* define if you have uuid_to_str() */
#undef HAVE_UUID_TO_STR
...
...
@@ -890,12 +902,6 @@
/* define to snprintf routine */
#undef vsnprintf
/* define if sys_errlist is not declared in stdio.h or errno.h */
#undef DECL_SYS_ERRLIST
/* define if you actually have sys_errlist in your libs */
#undef HAVE_SYS_ERRLIST
/* define if you have libtool -ltdl */
#undef HAVE_LIBLTDL
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment