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
openldap
OpenLDAP
Commits
a9cf0f5c
Commit
a9cf0f5c
authored
Feb 11, 2002
by
Kurt Zeilenga
Browse files
Add uuid_to_str() detection.
parent
defed68e
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
configure
View file @
a9cf0f5c
This diff is collapsed.
Click to expand it.
configure.in
View file @
a9cf0f5c
...
...
@@ -895,11 +895,30 @@ if test "$ol_cv_c_posix_regex" = no ; then
fi
dnl ----------------------------------------------------------------
dnl UUID Support
have_uuid=no
AC_CHECK_HEADERS(sys/uuid.h)
if test $ac_cv_header_sys_uuid_h = yes ; then
save_LIBS="$LIBS"
AC_SEARCH_LIBS(uuid_to_str, uuid, [have_uuid=yes], :)
LIBS="$save_LIBS"
if test have_uuid = yes ; then
AC_DEFINE(HAVE_UUID_TO_STR,1,
[define if you have uuid_to_str()])
test "$ac_cv_search_uuid_to_str" = "none required" || \
SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
fi
fi
dnl For windows, check for the need of RPCRT for UUID function support
AC_MSG_CHECKING(to see if -lrpcrt4 is needed for win32 UUID support)
save_LIBS="$LIBS"
LIBS="$LIBS -lrpcrt4"
AC_TRY_LINK([
if test $have_uuid = no ; then
AC_MSG_CHECKING(to see if -lrpcrt4 is needed for win32 UUID support)
save_LIBS="$LIBS"
LIBS="$LIBS -lrpcrt4"
AC_TRY_LINK([
char UuidCreate@4();
char UuidToStringA@8();
],
...
...
@@ -908,11 +927,12 @@ AC_TRY_LINK([
UuidToStringA@8();
],
need_rpcrt=yes, need_rpcrt=no)
if test $need_rpcrt = yes; then
SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
if test $need_rpcrt = yes; then
SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
fi
LIBS="$save_LIBS"
AC_MSG_RESULT($need_rpcrt)
fi
LIBS="$save_LIBS"
AC_MSG_RESULT($need_rpcrt)
dnl ----------------------------------------------------------------
dnl Check for resolver routines
...
...
include/portable.h.in
View file @
a9cf0f5c
...
...
@@ -536,6 +536,9 @@
/* Define if you have the <sys/un.h> header file. */
#undef HAVE_SYS_UN_H
/* Define if you have the <sys/uuid.h> header file. */
#undef HAVE_SYS_UUID_H
/* Define if you have the <sysexits.h> header file. */
#undef HAVE_SYSEXITS_H
...
...
@@ -641,6 +644,9 @@
/* define if you have winsock2 */
#undef HAVE_WINSOCK2
/* define if you have uuid_to_str() */
#undef HAVE_UUID_TO_STR
/* define if you have res_query() */
#undef HAVE_RES_QUERY
...
...
libraries/liblutil/uuid.c
View file @
a9cf0f5c
...
...
@@ -22,7 +22,7 @@
#include
<ac/stdlib.h>
#ifdef HAVE_
SYS_
UUID_
H
#ifdef HAVE_UUID_
TO_STR
# include <sys/uuid.h>
#elif defined( _WIN32 )
# include <rpc.h>
...
...
@@ -43,7 +43,7 @@
#include
<lutil.h>
/* not needed for Windows */
#if !defined(HAVE_
SYS_
UUID_
H
) && !defined(_WIN32)
#if !defined(HAVE_UUID_
TO_STR
) && !defined(_WIN32)
static
unsigned
char
*
lutil_eaddr
(
void
)
{
...
...
@@ -182,7 +182,7 @@ lutil_eaddr( void )
size_t
lutil_uuidstr
(
char
*
buf
,
size_t
len
)
{
#ifdef HAVE_
SYS_
UUID_
H
#ifdef HAVE_UUID_
TO_STR
uuid_t
uu
=
{
0
};
unsigned
rc
;
char
*
s
;
...
...
@@ -283,7 +283,7 @@ main(int argc, char **argv)
{
char
buf1
[
8
],
buf2
[
64
];
#ifndef HAVE_
SYS_
UUID_
H
#ifndef HAVE_UUID_
TO_STR
unsigned
char
*
p
=
lutil_eaddr
();
if
(
p
)
{
...
...
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