Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISC Open Source Projects
BIND
Commits
9935447b
Commit
9935447b
authored
Dec 01, 2008
by
Mark Andrews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2503. [port] linux: improve compatibility with Linux Standard
Base. [RT #18793]
parent
07e2d951
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
227 additions
and
241 deletions
+227
-241
CHANGES
CHANGES
+3
-0
acconfig.h
acconfig.h
+1
-7
bin/named/unix/os.c
bin/named/unix/os.c
+5
-1
config.h.in
config.h.in
+7
-10
configure
configure
+163
-178
configure.in
configure.in
+14
-19
lib/dns/dst_api.c
lib/dns/dst_api.c
+3
-1
lib/isc/Makefile.in
lib/isc/Makefile.in
+3
-3
lib/isc/include/isc/platform.h.in
lib/isc/include/isc/platform.h.in
+1
-6
lib/isc/unix/dir.c
lib/isc/unix/dir.c
+5
-1
lib/isc/unix/entropy.c
lib/isc/unix/entropy.c
+12
-1
lib/isc/unix/include/isc/net.h
lib/isc/unix/include/isc/net.h
+1
-3
lib/isc/unix/include/isc/offset.h
lib/isc/unix/include/isc/offset.h
+2
-1
lib/isc/unix/include/isc/strerror.h
lib/isc/unix/include/isc/strerror.h
+2
-2
lib/isc/unix/interfaceiter.c
lib/isc/unix/interfaceiter.c
+3
-3
lib/isc/win32/include/isc/net.h
lib/isc/win32/include/isc/net.h
+1
-3
lib/isc/win32/include/isc/platform.h
lib/isc/win32/include/isc/platform.h
+1
-2
No files found.
CHANGES
View file @
9935447b
2503. [port] linux: improve compatibility with Linux Standard
Base. [RT #18793]
2502. [cleanup] isc_radix: Improve compliance with coding style,
document function in <isc/radix.h>. [RT #18534]
...
...
acconfig.h
View file @
9935447b
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: acconfig.h,v 1.5
1
200
7/06/19 23:46:59 tbox
Exp $ */
/* $Id: acconfig.h,v 1.5
2
200
8/12/01 03:51:47 marka
Exp $ */
/*! \file */
...
...
@@ -25,9 +25,6 @@
***/
@
TOP
@
/** define to `int' if <sys/types.h> doesn't define. */
#undef ssize_t
/** define on DEC OSF to enable 4.4BSD style sa_len support */
#undef _SOCKADDR_LEN
...
...
@@ -61,9 +58,6 @@
/** define if you have the NET_RT_IFLIST sysctl variable and sys/sysctl.h */
#undef HAVE_IFLIST_SYSCTL
/** define if chroot() is available */
#undef HAVE_CHROOT
/** define if tzset() is available */
#undef HAVE_TZSET
...
...
bin/named/unix/os.c
View file @
9935447b
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: os.c,v 1.
8
9 2008/1
1/14 05:08
:4
8
marka Exp $ */
/* $Id: os.c,v 1.9
0
2008/1
2/01 03:51
:4
7
marka Exp $ */
/*! \file */
...
...
@@ -505,10 +505,14 @@ ns_os_chroot(const char *root) {
ns_smf_chroot
=
0
;
#endif
if
(
root
!=
NULL
)
{
#ifdef HAVE_CHROOT
if
(
chroot
(
root
)
<
0
)
{
isc__strerror
(
errno
,
strbuf
,
sizeof
(
strbuf
));
ns_main_earlyfatal
(
"chroot(): %s"
,
strbuf
);
}
#else
ns_main_earlyfatal
(
"chroot(): disabled"
);
#endif
if
(
chdir
(
"/"
)
<
0
)
{
isc__strerror
(
errno
,
strbuf
,
sizeof
(
strbuf
));
ns_main_earlyfatal
(
"chdir(/): %s"
,
strbuf
);
...
...
config.h.in
View file @
9935447b
...
...
@@ -16,7 +16,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.h.in,v 1.10
6
2008/1
0/21 02:43:07
marka Exp $ */
/* $Id: config.h.in,v 1.10
7
2008/1
2/01 03:53:32
marka Exp $ */
/*! \file */
...
...
@@ -25,9 +25,6 @@
*** it does not get installed.
***/
/** define to `int' if <sys/types.h> doesn't define. */
#undef ssize_t
/** define on DEC OSF to enable 4.4BSD style sa_len support */
#undef _SOCKADDR_LEN
...
...
@@ -61,9 +58,6 @@
/** define if you have the NET_RT_IFLIST sysctl variable and sys/sysctl.h */
#undef HAVE_IFLIST_SYSCTL
/** define if chroot() is available */
#undef HAVE_CHROOT
/** define if tzset() is available */
#undef HAVE_TZSET
...
...
@@ -163,6 +157,9 @@ int sigwait(const unsigned int *set, int *sig);
/* Solaris hack to get select_large_fdset. */
#undef FD_SETSIZE
/* Define to 1 if you have the `chroot' function. */
#undef HAVE_CHROOT
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
...
...
@@ -187,9 +184,6 @@ int sigwait(const unsigned int *set, int *sig);
/* Define to 1 if you have the `c_r' library (-lc_r). */
#undef HAVE_LIBC_R
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
/* Define to 1 if you have the `pthread' library (-lpthread). */
#undef HAVE_LIBPTHREAD
...
...
@@ -214,6 +208,9 @@ int sigwait(const unsigned int *set, int *sig);
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `nanosleep' function. */
#undef HAVE_NANOSLEEP
/* Define to 1 if you have the <net/if6.h> header file. */
#undef HAVE_NET_IF6_H
...
...
configure
View file @
9935447b
This diff is collapsed.
Click to expand it.
configure.in
View file @
9935447b
...
...
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
AC_REVISION($Revision: 1.45
7
$)
AC_REVISION($Revision: 1.45
8
$)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.59)
...
...
@@ -1155,7 +1155,6 @@ AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
#
# AC_CHECK_LIB(xnet, socket, ,
# AC_CHECK_LIB(socket, socket)
# AC_CHECK_LIB(nsl, inet_ntoa)
# )
#
# Use this for now, instead:
...
...
@@ -1165,7 +1164,6 @@ case "$host" in
;;
*)
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, inet_ntoa)
;;
esac
...
...
@@ -1603,23 +1601,8 @@ main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
[AC_MSG_RESULT(assuming target platform has working inet_pton)
ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"])
AC_MSG_CHECKING([for inet_aton])
AC_TRY_LINK([
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>],
[struct in_addr in; inet_aton(0, &in); return (0);],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON"],
[AC_MSG_RESULT(no)
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O"
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c"
ISC_PLATFORM_NEEDATON="#define ISC_PLATFORM_NEEDATON 1"])
AC_SUBST(ISC_PLATFORM_NEEDNTOP)
AC_SUBST(ISC_PLATFORM_NEEDPTON)
AC_SUBST(ISC_PLATFORM_NEEDATON)
#
# Look for a 4.4BSD-style sa_len member in struct sockaddr.
...
...
@@ -1972,7 +1955,17 @@ AC_SUBST(LWRES_PLATFORM_QUADFORMAT)
#
# Security Stuff
#
AC_CHECK_FUNC(chroot, AC_DEFINE(HAVE_CHROOT))
# Note it is very recommended to *not* disable chroot(),
# this is only because chroot() was made obsolete by Posix.
AC_ARG_ENABLE(chroot,
[ --disable-chroot disable chroot])
case "$enable_chroot" in
yes|'')
AC_CHECK_FUNCS(chroot)
;;
no)
;;
esac
AC_ARG_ENABLE(linux-caps,
[ --disable-linux-caps disable linux capabilities])
case "$enable_linux_caps" in
...
...
@@ -2207,6 +2200,8 @@ yes)
esac
AC_SUBST(ISC_PLATFORM_HAVEIFNAMETOINDEX)
AC_CHECK_FUNCS(nanosleep)
#
# Machine architecture dependent features
#
...
...
lib/dns/dst_api.c
View file @
9935447b
...
...
@@ -31,7 +31,7 @@
/*
* Principal Author: Brian Wellington
* $Id: dst_api.c,v 1.1
6
2008/1
1/14 22
:5
3
:4
6
marka Exp $
* $Id: dst_api.c,v 1.1
7
2008/1
2/01 03
:5
1
:4
7
marka Exp $
*/
/*! \file */
...
...
@@ -125,6 +125,7 @@ static isc_result_t addsuffix(char *filename, unsigned int len,
return (_r); \
} while (0); \
#ifdef OPENSSL
static
void
*
default_memalloc
(
void
*
arg
,
size_t
size
)
{
UNUSED
(
arg
);
...
...
@@ -138,6 +139,7 @@ default_memfree(void *arg, void *ptr) {
UNUSED
(
arg
);
free
(
ptr
);
}
#endif
isc_result_t
dst_lib_init
(
isc_mem_t
*
mctx
,
isc_entropy_t
*
ectx
,
unsigned
int
eflags
)
{
...
...
lib/isc/Makefile.in
View file @
9935447b
...
...
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.9
6
2008/
09/24 02:46:23
marka Exp $
# $Id: Makefile.in,v 1.9
7
2008/
12/01 03:51:47
marka Exp $
srcdir
=
@srcdir@
VPATH
=
@srcdir@
...
...
@@ -54,7 +54,7 @@ OBJS = @ISC_EXTRA_OBJS@ \
assertions.@O@ base32.@O@ base64.@O@ bitstring.@O@ buffer.@O@
\
bufferlist.@O@ commandline.@O@ error.@O@ event.@O@
\
hash.@O@ heap.@O@ hex.@O@ hmacmd5.@O@ hmacsha.@O@
\
httpd.@O@ iterated_hash.@O@
\
httpd.@O@
inet_aton.@O@
iterated_hash.@O@
\
lex.@O@ lfsr.@O@ lib.@O@ log.@O@
\
md5.@O@ mem.@O@ mutexblock.@O@
\
netaddr.@O@ netscope.@O@ ondestroy.@O@
\
...
...
@@ -69,7 +69,7 @@ SRCS = @ISC_EXTRA_SRCS@ \
assertions.c base32.c base64.c bitstring.c buffer.c
\
bufferlist.c commandline.c error.c event.c
\
heap.c hex.c hmacmd5.c hmacsha.c
\
httpd.c iterated_hash.c
\
httpd.c
inet_aton.c
iterated_hash.c
\
lex.c lfsr.c lib.c log.c
\
md5.c mem.c mutexblock.c
\
netaddr.c netscope.c ondestroy.c
\
...
...
lib/isc/include/isc/platform.h.in
View file @
9935447b
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: platform.h.in,v 1.4
8
2008/
06/23 19:41:19 jinmei
Exp $ */
/* $Id: platform.h.in,v 1.4
9
2008/
12/01 03:51:47 marka
Exp $ */
#ifndef ISC_PLATFORM_H
#define ISC_PLATFORM_H 1
...
...
@@ -93,11 +93,6 @@
*/
@ISC_PLATFORM_NEEDPTON@
/*! \brief
* If this system needs inet_aton(), ISC_PLATFORM_NEEDATON will be defined.
*/
@ISC_PLATFORM_NEEDATON@
/*! \brief
* If this system needs in_port_t, ISC_PLATFORM_NEEDPORTT will be defined.
*/
...
...
lib/isc/unix/dir.c
View file @
9935447b
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dir.c,v 1.2
5
200
7/06/19 23:47:18 tbox
Exp $ */
/* $Id: dir.c,v 1.2
6
200
8/12/01 03:51:47 marka
Exp $ */
/*! \file
* \author Principal Authors: DCL */
...
...
@@ -171,10 +171,14 @@ isc_dir_chroot(const char *dirname) {
REQUIRE
(
dirname
!=
NULL
);
#ifdef HAVE_CHROOT
if
(
chroot
(
dirname
)
<
0
)
return
(
isc__errno2result
(
errno
));
return
(
ISC_R_SUCCESS
);
#else
return
(
ISC_R_NOTIMPLEMENTED
);
#endif
}
isc_result_t
...
...
lib/isc/unix/entropy.c
View file @
9935447b
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: entropy.c,v 1.8
0
200
7/06/19 23:47:18 tbox
Exp $ */
/* $Id: entropy.c,v 1.8
1
200
8/12/01 03:51:47 marka
Exp $ */
/* \file unix/entropy.c
* \brief
...
...
@@ -31,6 +31,9 @@
#include <sys/socket.h>
#include <sys/un.h>
#ifdef HAVE_NANOSLEEP
#include <time.h>
#endif
#include <unistd.h>
#include <isc/platform.h>
...
...
@@ -174,7 +177,15 @@ get_from_usocketsource(isc_entropysource_t *source, isc_uint32_t desired) {
* just "break", then the "desired"
* amount gets borked.
*/
#ifdef HAVE_NANOSLEEP
struct
timespec
ts
;
ts
.
tv_sec
=
0
;
ts
.
tv_nsec
=
1000000
;
nanosleep
(
&
ts
,
NULL
);
#else
usleep
(
1000
);
#endif
goto
eagain_loop
;
}
if
(
errno
==
EWOULDBLOCK
||
errno
==
EINTR
)
...
...
lib/isc/unix/include/isc/net.h
View file @
9935447b
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: net.h,v 1.4
8
2008/
06/23 23:47:11 tbox
Exp $ */
/* $Id: net.h,v 1.4
9
2008/
12/01 03:51:47 marka
Exp $ */
#ifndef ISC_NET_H
#define ISC_NET_H 1
...
...
@@ -354,11 +354,9 @@ isc_net_pton(int af, const char *src, void *dst);
#define inet_pton isc_net_pton
#endif
#ifdef ISC_PLATFORM_NEEDATON
int
isc_net_aton
(
const
char
*
cp
,
struct
in_addr
*
addr
);
#define inet_aton isc_net_aton
#endif
ISC_LANG_ENDDECLS
...
...
lib/isc/unix/include/isc/offset.h
View file @
9935447b
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: offset.h,v 1.1
5
200
7/06/19 23:47:19 tbox
Exp $ */
/* $Id: offset.h,v 1.1
6
200
8/12/01 03:51:47 marka
Exp $ */
#ifndef ISC_OFFSET_H
#define ISC_OFFSET_H 1
...
...
@@ -26,6 +26,7 @@
*/
#include <limits.h>
/* Required for CHAR_BIT. */
#include <sys/types.h>
#include <stddef.h>
/* For Linux Standard Base. */
typedef
off_t
isc_offset_t
;
...
...
lib/isc/unix/include/isc/strerror.h
View file @
9935447b
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: strerror.h,v 1.
8
200
7/06/19 23:47:19 tbox
Exp $ */
/* $Id: strerror.h,v 1.
9
200
8/12/01 03:51:47 marka
Exp $ */
#ifndef ISC_STRERROR_H
#define ISC_STRERROR_H
...
...
@@ -32,7 +32,7 @@ ISC_LANG_BEGINDECLS
#define ISC_STRERRORSIZE 128
/*%
* Provide a thread safe wrapper to strerr
r
or().
* Provide a thread safe wrapper to strerror().
*
* Requires:
* 'buf' to be non NULL.
...
...
lib/isc/unix/interfaceiter.c
View file @
9935447b
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: interfaceiter.c,v 1.4
4
2008/
03/20 23:47:00 tbox
Exp $ */
/* $Id: interfaceiter.c,v 1.4
5
2008/
12/01 03:51:47 marka
Exp $ */
/*! \file */
...
...
@@ -217,8 +217,8 @@ linux_if_inet6_current(isc_interfaceiter_t *iter) {
for
(
i
=
0
;
i
<
16
;
i
++
)
{
unsigned
char
byte
;
static
const
char
hex
[]
=
"0123456789abcdef"
;
byte
=
((
index
(
hex
,
address
[
i
*
2
])
-
hex
)
<<
4
)
|
(
index
(
hex
,
address
[
i
*
2
+
1
])
-
hex
);
byte
=
((
strchr
(
hex
,
address
[
i
*
2
])
-
hex
)
<<
4
)
|
(
strchr
(
hex
,
address
[
i
*
2
+
1
])
-
hex
);
addr6
.
s6_addr
[
i
]
=
byte
;
}
iter
->
current
.
af
=
AF_INET6
;
...
...
lib/isc/win32/include/isc/net.h
View file @
9935447b
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: net.h,v 1.3
0
2008/
07
/01
2
3:
47:17 tbox
Exp $ */
/* $Id: net.h,v 1.3
1
2008/
12
/01
0
3:
51:47 marka
Exp $ */
#ifndef ISC_NET_H
#define ISC_NET_H 1
...
...
@@ -335,11 +335,9 @@ isc_net_pton(int af, const char *src, void *dst);
#define inet_pton isc_net_pton
#endif
#ifdef ISC_PLATFORM_NEEDATON
int
isc_net_aton
(
const
char
*
cp
,
struct
in_addr
*
addr
);
#define inet_aton isc_net_aton
#endif
ISC_LANG_ENDDECLS
...
...
lib/isc/win32/include/isc/platform.h
View file @
9935447b
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: platform.h,v 1.1
6
2008/
04/02 23:46:58 tbox
Exp $ */
/* $Id: platform.h,v 1.1
7
2008/
12/01 03:51:47 marka
Exp $ */
#ifndef ISC_PLATFORM_H
#define ISC_PLATFORM_H 1
...
...
@@ -39,7 +39,6 @@
#undef MSG_TRUNC
#define ISC_PLATFORM_NEEDNTOP
#define ISC_PLATFORM_NEEDPTON
#define ISC_PLATFORM_NEEDATON
#define ISC_PLATFORM_QUADFORMAT "I64"
...
...
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