zephyr-im / zephyr

An institutional/enterprise-scale distributed real-time messaging and notification system
35 stars 11 forks source link

Include arpa/nameser_compat.h instead of arpa/nameser.h if it exists #39

Closed andersk-auto closed 10 years ago

andersk-auto commented 10 years ago

Some particularly awesome platforms like Mac OS X don't automatically include arpa/nameser_compat.h in arpa/nameser.h, meaning that they fail to get the constants they need in ZInit.c (in particular).

configure should detect if arpa/nameser_compat.h exists, and use that instead of arpa/nameser.h if it does (maybe in addition to? I'm not really sure)

andersk-auto commented 10 years ago

Imported from trac issue 39. Created by broder@ATHENA.MIT.EDU on 2009-04-02T02:18:01, last modified: 2009-04-02T15:07:21

andersk-auto commented 10 years ago

Trac comment by broder@ATHENA.MIT.EDU on 2009-04-02 02:46:34:

It looks like you actually want to use #defines instead of including a different file. nameser_compat.h seems to refer to constants that are defined in nameser.h (NS_MAXDNAME is my specific example)

Linux seems to conditionalize on BIND_4_COMPAT for causing nameser_compat.h to be included from nameser.h, but OS X was apparently too cool to do what everybody else had settled on. It requires you to set BIND_8_COMPAT

andersk-auto commented 10 years ago

Trac comment by kcr@ATHENA.MIT.EDU on 2009-04-02 02:53:05:

Well, that just means you have to include it after nameser.h.

andersk-auto commented 10 years ago

Trac comment by kcr@ATHENA.MIT.EDU on 2009-04-02 10:55:31:

And [2374] does just that.

andersk-auto commented 10 years ago

Trac comment by broder@ATHENA.MIT.EDU on 2009-04-02 11:37:57:

Looks like the same patch needs to be applied to zwgc/main.c

andersk-auto commented 10 years ago

Trac comment by kcr@ATHENA.MIT.EDU on 2009-04-02 15:07:21:

[2375] should fix the other two usages