Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Zsolt Vadász
wine
Commits
788e30f1
Commit
788e30f1
authored
18 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
dnsapi: Added check for _msg_ptr vs. _ptr member in ns_msg struct.
parent
d1a3383d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
configure
+129
-0
129 additions, 0 deletions
configure
configure.ac
+12
-0
12 additions, 0 deletions
configure.ac
dlls/dnsapi/ns_parse.c
+21
-15
21 additions, 15 deletions
dlls/dnsapi/ns_parse.c
include/config.h.in
+3
-0
3 additions, 0 deletions
include/config.h.in
with
165 additions
and
15 deletions
configure
+
129
−
0
View file @
788e30f1
...
...
@@ -20742,6 +20742,135 @@ _ACEOF
fi
{ echo "$as_me:$LINENO: checking for ns_msg._msg_ptr" >&5
echo $ECHO_N "checking for ns_msg._msg_ptr... $ECHO_C" >&6; }
if test "${ac_cv_member_ns_msg__msg_ptr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
# include <arpa/nameser.h>
#endif
int
main ()
{
static ns_msg ac_aggr;
if (ac_aggr._msg_ptr)
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_member_ns_msg__msg_ptr=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
# include <arpa/nameser.h>
#endif
int
main ()
{
static ns_msg ac_aggr;
if (sizeof ac_aggr._msg_ptr)
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_member_ns_msg__msg_ptr=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_member_ns_msg__msg_ptr=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_member_ns_msg__msg_ptr" >&5
echo "${ECHO_T}$ac_cv_member_ns_msg__msg_ptr" >&6; }
if test $ac_cv_member_ns_msg__msg_ptr = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_NS_MSG__MSG_PTR 1
_ACEOF
fi
{ echo "$as_me:$LINENO: checking for timezone variable" >&5
echo $ECHO_N "checking for timezone variable... $ECHO_C" >&6; }
if test "${ac_cv_have_timezone+set}" = set; then
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
12
−
0
View file @
788e30f1
...
...
@@ -1455,6 +1455,18 @@ AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,,
#include <netinet/in.h>
#endif])
dnl Check for ns_msg ptr member
AC_CHECK_MEMBERS([ns_msg._msg_ptr],,,
[#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
# include <arpa/nameser.h>
#endif])
dnl Check for the external timezone variables timezone and daylight
AC_CACHE_CHECK([for timezone variable], ac_cv_have_timezone,
AC_TRY_LINK([#include <time.h>],[timezone;],
...
...
This diff is collapsed.
Click to expand it.
dlls/dnsapi/ns_parse.c
+
21
−
15
View file @
788e30f1
...
...
@@ -40,6 +40,12 @@ static void setsection(ns_msg *msg, ns_sect sect);
#define RETERR(err) do { return (-1); } while (0)
#ifdef HAVE_NS_MSG__MSG_PTR
# define NS_PTR(ns_msg) ((ns_msg)->_msg_ptr)
#else
# define NS_PTR(ns_msg) ((ns_msg)->_ptr)
#endif
/* Public. */
static
int
...
...
@@ -121,38 +127,38 @@ dns_ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) {
if
(
rrnum
<
handle
->
_rrnum
)
setsection
(
handle
,
section
);
if
(
rrnum
>
handle
->
_rrnum
)
{
b
=
dns_ns_skiprr
(
handle
->
_ptr
,
handle
->
_eom
,
section
,
b
=
dns_ns_skiprr
(
NS_PTR
(
handle
)
,
handle
->
_eom
,
section
,
rrnum
-
handle
->
_rrnum
);
if
(
b
<
0
)
return
(
-
1
);
handle
->
_ptr
+=
b
;
NS_PTR
(
handle
)
+=
b
;
handle
->
_rrnum
=
rrnum
;
}
/* Do the parse. */
b
=
dn_expand
(
handle
->
_msg
,
handle
->
_eom
,
handle
->
_ptr
,
rr
->
name
,
NS_MAXDNAME
);
NS_PTR
(
handle
)
,
rr
->
name
,
NS_MAXDNAME
);
if
(
b
<
0
)
return
(
-
1
);
handle
->
_ptr
+=
b
;
if
(
handle
->
_ptr
+
NS_INT16SZ
+
NS_INT16SZ
>
handle
->
_eom
)
NS_PTR
(
handle
)
+=
b
;
if
(
NS_PTR
(
handle
)
+
NS_INT16SZ
+
NS_INT16SZ
>
handle
->
_eom
)
RETERR
(
EMSGSIZE
);
NS_GET16
(
rr
->
type
,
handle
->
_ptr
);
NS_GET16
(
rr
->
rr_class
,
handle
->
_ptr
);
NS_GET16
(
rr
->
type
,
NS_PTR
(
handle
)
);
NS_GET16
(
rr
->
rr_class
,
NS_PTR
(
handle
)
);
if
(
section
==
ns_s_qd
)
{
rr
->
ttl
=
0
;
rr
->
rdlength
=
0
;
rr
->
rdata
=
NULL
;
}
else
{
if
(
handle
->
_ptr
+
NS_INT32SZ
+
NS_INT16SZ
>
handle
->
_eom
)
if
(
NS_PTR
(
handle
)
+
NS_INT32SZ
+
NS_INT16SZ
>
handle
->
_eom
)
RETERR
(
EMSGSIZE
);
NS_GET32
(
rr
->
ttl
,
handle
->
_ptr
);
NS_GET16
(
rr
->
rdlength
,
handle
->
_ptr
);
if
(
handle
->
_ptr
+
rr
->
rdlength
>
handle
->
_eom
)
NS_GET32
(
rr
->
ttl
,
NS_PTR
(
handle
)
);
NS_GET16
(
rr
->
rdlength
,
NS_PTR
(
handle
)
);
if
(
NS_PTR
(
handle
)
+
rr
->
rdlength
>
handle
->
_eom
)
RETERR
(
EMSGSIZE
);
rr
->
rdata
=
handle
->
_ptr
;
handle
->
_ptr
+=
rr
->
rdlength
;
rr
->
rdata
=
NS_PTR
(
handle
)
;
NS_PTR
(
handle
)
+=
rr
->
rdlength
;
}
if
(
++
handle
->
_rrnum
>
handle
->
_counts
[(
int
)
section
])
setsection
(
handle
,
(
ns_sect
)((
int
)
section
+
1
));
...
...
@@ -168,9 +174,9 @@ setsection(ns_msg *msg, ns_sect sect) {
msg
->
_sect
=
sect
;
if
(
sect
==
ns_s_max
)
{
msg
->
_rrnum
=
-
1
;
msg
->
_ptr
=
NULL
;
NS_PTR
(
msg
)
=
NULL
;
}
else
{
msg
->
_rrnum
=
0
;
msg
->
_ptr
=
msg
->
_sections
[(
int
)
sect
];
NS_PTR
(
msg
)
=
msg
->
_sections
[(
int
)
sect
];
}
}
This diff is collapsed.
Click to expand it.
include/config.h.in
+
3
−
0
View file @
788e30f1
...
...
@@ -476,6 +476,9 @@
/* Define to 1 if you have the <net/route.h> header file. */
#undef HAVE_NET_ROUTE_H
/* Define to 1 if `_msg_ptr' is member of `ns_msg'. */
#undef HAVE_NS_MSG__MSG_PTR
/* Define to 1 if the system has the type `off_t'. */
#undef HAVE_OFF_T
...
...
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