Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/apache2/mDNSResponder/dist if __packed exists, use ...



details:   https://anonhg.NetBSD.org/src/rev/24a29187df0a
branches:  trunk
changeset: 747815:24a29187df0a
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Oct 02 21:05:10 2009 +0000

description:
if __packed exists, use it. I might revert this later when I fully implement
attribute for lint.

diffstat:

 external/apache2/mDNSResponder/dist/mDNSCore/mDNSEmbeddedAPI.h |  5 ++++-
 external/apache2/mDNSResponder/dist/mDNSShared/dnssd_ipc.h     |  5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 9f4214a4a5eb -r 24a29187df0a external/apache2/mDNSResponder/dist/mDNSCore/mDNSEmbeddedAPI.h
--- a/external/apache2/mDNSResponder/dist/mDNSCore/mDNSEmbeddedAPI.h    Fri Oct 02 21:04:03 2009 +0000
+++ b/external/apache2/mDNSResponder/dist/mDNSCore/mDNSEmbeddedAPI.h    Fri Oct 02 21:05:10 2009 +0000
@@ -1040,7 +1040,10 @@
 // In the event that structures are not packed correctly, mDNS_Init() will detect this and report an error, so the
 // developer will know what's wrong, and can investigate what needs to be done on that compiler to provide proper packing.
 #ifndef packedstruct
- #if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 9)))
+ #ifdef __packed
+  #define packedstruct struct __packed
+  #define packedunion  union __packed
+ #elif ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 9)))
   #define packedstruct struct __attribute__((__packed__))
   #define packedunion  union  __attribute__((__packed__))
  #else
diff -r 9f4214a4a5eb -r 24a29187df0a external/apache2/mDNSResponder/dist/mDNSShared/dnssd_ipc.h
--- a/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_ipc.h        Fri Oct 02 21:04:03 2009 +0000
+++ b/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_ipc.h        Fri Oct 02 21:05:10 2009 +0000
@@ -234,7 +234,10 @@
 // structures correctly anyway, so a plain "struct" is usually fine. In the event that structures are not packed
 // correctly, our compile-time assertion checks will catch it and prevent inadvertent generation of non-working code.
 #ifndef packedstruct
- #if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 9)))
+ #ifdef __packed
+  #define packedstruct struct __packed
+  #define packedunion  union  __packed
+ #elif ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 9)))
   #define packedstruct struct __attribute__((__packed__))
   #define packedunion  union  __attribute__((__packed__))
  #else



Home | Main Index | Thread Index | Old Index