Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
fca3ef06
Commit
fca3ef06
authored
Apr 19, 2000
by
Andrew Tridgell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
autoconf test for broken solaris inet_aton()
parent
07a14ef8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
20 deletions
+36
-20
acconfig.h
acconfig.h
+1
-0
configure.in
configure.in
+18
-4
compat.c
lib/compat.c
+17
-16
No files found.
acconfig.h
View file @
fca3ef06
...
@@ -10,5 +10,6 @@
...
@@ -10,5 +10,6 @@
#undef HAVE_SHORT_INO_T
#undef HAVE_SHORT_INO_T
#undef HAVE_GETOPT_LONG
#undef HAVE_GETOPT_LONG
#undef REPLACE_INET_NTOA
#undef REPLACE_INET_NTOA
#undef REPLACE_INET_ATON
#undef HAVE_GETTIMEOFDAY_TZ
#undef HAVE_GETTIMEOFDAY_TZ
#undef HAVE_SOCKETPAIR
#undef HAVE_SOCKETPAIR
configure.in
View file @
fca3ef06
...
@@ -97,7 +97,7 @@ AC_FUNC_UTIME_NULL
...
@@ -97,7 +97,7 @@ AC_FUNC_UTIME_NULL
AC_CHECK_FUNCS(waitpid wait4 getcwd strdup strerror chown chmod mknod)
AC_CHECK_FUNCS(waitpid wait4 getcwd strdup strerror chown chmod mknod)
AC_CHECK_FUNCS(fchmod fstat strchr readlink link utime utimes strftime)
AC_CHECK_FUNCS(fchmod fstat strchr readlink link utime utimes strftime)
AC_CHECK_FUNCS(memmove lchown vsnprintf snprintf setsid glob strpbrk)
AC_CHECK_FUNCS(memmove lchown vsnprintf snprintf setsid glob strpbrk)
AC_CHECK_FUNCS(strlcat strlcpy
inet_aton
)
AC_CHECK_FUNCS(strlcat strlcpy)
AC_CACHE_CHECK([for working socketpair],rsync_cv_HAVE_SOCKETPAIR,[
AC_CACHE_CHECK([for working socketpair],rsync_cv_HAVE_SOCKETPAIR,[
AC_TRY_RUN([#include <sys/types.h>
AC_TRY_RUN([#include <sys/types.h>
...
@@ -210,13 +210,27 @@ AC_TRY_RUN([
...
@@ -210,13 +210,27 @@ AC_TRY_RUN([
#include <arpa/inet.h>
#include <arpa/inet.h>
main() { struct in_addr ip; ip.s_addr = 0x12345678;
main() { struct in_addr ip; ip.s_addr = 0x12345678;
if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(
0
); }
strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(
1
); }
exit(
1
);}],
exit(
0
);}],
rsync_cv_REPLACE_INET_NTOA=
yes,rsync_cv_REPLACE_INET_NTOA=no
,rsync_cv_REPLACE_INET_NTOA=cross)])
rsync_cv_REPLACE_INET_NTOA=
no,rsync_cv_REPLACE_INET_NTOA=yes
,rsync_cv_REPLACE_INET_NTOA=cross)])
if test x"$rsync_cv_REPLACE_INET_NTOA" = x"yes"; then
if test x"$rsync_cv_REPLACE_INET_NTOA" = x"yes"; then
AC_DEFINE(REPLACE_INET_NTOA)
AC_DEFINE(REPLACE_INET_NTOA)
fi
fi
AC_CACHE_CHECK([for broken inet_aton],rsync_cv_REPLACE_INET_ATON,[
AC_TRY_RUN([
#include <stdio.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
main() { struct in_addr ip;
if (inet_aton("example", &ip) == 0) exit(0); exit(1);}],
rsync_cv_REPLACE_INET_ATON=no,rsync_cv_REPLACE_INET_ATON=yes,rsync_cv_REPLACE_INET_ATON=cross)])
if test x"$rsync_cv_REPLACE_INET_ATON" = x"yes"; then
AC_DEFINE(REPLACE_INET_ATON)
fi
#
#
# The following test was mostly taken from the tcl/tk plus patches
# The following test was mostly taken from the tcl/tk plus patches
#
#
...
...
lib/compat.c
View file @
fca3ef06
...
@@ -95,21 +95,6 @@
...
@@ -95,21 +95,6 @@
}
}
#endif
#endif
#ifdef REPLACE_INET_NTOA
char
*
rep_inet_ntoa
(
struct
in_addr
ip
)
{
unsigned
char
*
p
=
(
unsigned
char
*
)
&
ip
.
s_addr
;
static
char
buf
[
18
];
#if WORDS_BIGENDIAN
slprintf
(
buf
,
18
,
"%d.%d.%d.%d"
,
(
int
)
p
[
0
],
(
int
)
p
[
1
],
(
int
)
p
[
2
],
(
int
)
p
[
3
]);
#else
slprintf
(
buf
,
18
,
"%d.%d.%d.%d"
,
(
int
)
p
[
3
],
(
int
)
p
[
2
],
(
int
)
p
[
1
],
(
int
)
p
[
0
]);
#endif
return
buf
;
}
#endif
#ifndef HAVE_STRLCPY
#ifndef HAVE_STRLCPY
/* like strncpy but does not 0 fill the buffer and always null
/* like strncpy but does not 0 fill the buffer and always null
...
@@ -146,7 +131,23 @@
...
@@ -146,7 +131,23 @@
}
}
#endif
#endif
#ifndef HAVE_INET_ATON
#ifdef REPLACE_INET_NTOA
char
*
rep_inet_ntoa
(
struct
in_addr
ip
)
{
unsigned
char
*
p
=
(
unsigned
char
*
)
&
ip
.
s_addr
;
static
char
buf
[
18
];
#if WORDS_BIGENDIAN
slprintf
(
buf
,
18
,
"%d.%d.%d.%d"
,
(
int
)
p
[
0
],
(
int
)
p
[
1
],
(
int
)
p
[
2
],
(
int
)
p
[
3
]);
#else
slprintf
(
buf
,
18
,
"%d.%d.%d.%d"
,
(
int
)
p
[
3
],
(
int
)
p
[
2
],
(
int
)
p
[
1
],
(
int
)
p
[
0
]);
#endif
return
buf
;
}
#endif
#ifndef REPLACE_INET_ATON
int
inet_aton
(
const
char
*
cp
,
struct
in_addr
*
inp
)
int
inet_aton
(
const
char
*
cp
,
struct
in_addr
*
inp
)
{
{
unsigned
int
a1
,
a2
,
a3
,
a4
;
unsigned
int
a1
,
a2
,
a3
,
a4
;
...
...
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