aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2020-09-01 00:33:42 -0400
committerGreg Hudson <ghudson@mit.edu>2020-09-02 17:54:25 -0400
commitd177b5d70bf575c498bfdd3abb6a6413646ad7c5 (patch)
tree909b89398e9a2daeadb1b0509e6bc8f5dbd6c372 /src
parentaa07b84341566def14a48a1487cd29c9627a915e (diff)
downloadkrb5-d177b5d70bf575c498bfdd3abb6a6413646ad7c5.zip
krb5-d177b5d70bf575c498bfdd3abb6a6413646ad7c5.tar.gz
krb5-d177b5d70bf575c498bfdd3abb6a6413646ad7c5.tar.bz2
Harmonize macOS pack declarations with Heimdal
Replace the TARGET_OS_MAC conditionals with the conditionals used in Heimdal, so that we do not pack structures inconsistently with macOS on ARM. Suggested by Luke Howard. ticket: 8944 (new)
Diffstat (limited to 'src')
-rw-r--r--src/include/CredentialsCache.h4
-rw-r--r--src/include/CredentialsCache2.h4
-rw-r--r--src/include/krb5/krb5.hin8
-rw-r--r--src/lib/gssapi/generic/gssapi.hin8
-rw-r--r--src/lib/krb5/krb/gic_opt.c4
5 files changed, 14 insertions, 14 deletions
diff --git a/src/include/CredentialsCache.h b/src/include/CredentialsCache.h
index c181596..1c20f9d 100644
--- a/src/include/CredentialsCache.h
+++ b/src/include/CredentialsCache.h
@@ -52,7 +52,7 @@
extern "C" {
#endif /* __cplusplus */
-#if TARGET_OS_MAC
+#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
#pragma pack(push,2)
#endif
@@ -1518,7 +1518,7 @@ CCACHE_API cc_int32 cc_initialize (cc_context_t *out_context,
((iterator) -> functions -> clone (iterator, new_iterator))
/*!@}*/
-#if TARGET_OS_MAC
+#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
#pragma pack(pop)
#endif
diff --git a/src/include/CredentialsCache2.h b/src/include/CredentialsCache2.h
index 9e5a346..8a5871b 100644
--- a/src/include/CredentialsCache2.h
+++ b/src/include/CredentialsCache2.h
@@ -50,7 +50,7 @@
extern "C" {
#endif /* __cplusplus */
-#if TARGET_OS_MAC
+#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
#pragma pack(push,2)
#endif
@@ -291,7 +291,7 @@ cc_lock_request (apiCB *in_context,
const cc_int32 in_lock_type)
CCAPI_DEPRECATED;
-#if TARGET_OS_MAC
+#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
#pragma pack(pop)
#endif
diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin
index 114ab19..9927d2f 100644
--- a/src/include/krb5/krb5.hin
+++ b/src/include/krb5/krb5.hin
@@ -106,8 +106,8 @@
KRB5INT_BEGIN_DECLS
-#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
-# pragma pack(push,2)
+#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
+#pragma pack(push,2)
#endif
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 30203
@@ -8552,8 +8552,8 @@ void KRB5_CALLCONV
krb5_set_kdc_recv_hook(krb5_context context, krb5_post_recv_fn recv_hook,
void *data);
-#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
-# pragma pack(pop)
+#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
+#pragma pack(pop)
#endif
KRB5INT_END_DECLS
diff --git a/src/lib/gssapi/generic/gssapi.hin b/src/lib/gssapi/generic/gssapi.hin
index 5049fbd..767fb07 100644
--- a/src/lib/gssapi/generic/gssapi.hin
+++ b/src/lib/gssapi/generic/gssapi.hin
@@ -39,8 +39,8 @@
extern "C" {
#endif /* __cplusplus */
-#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
-# pragma pack(push,2)
+#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
+#pragma pack(push,2)
#endif
#if defined(_MSDOS) || defined(_WIN32)
@@ -816,8 +816,8 @@ gss_set_neg_mechs(
gss_cred_id_t, /* cred_handle */
const gss_OID_set); /* mech_set */
-#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
-# pragma pack(pop)
+#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
+#pragma pack(pop)
#endif
#ifdef __cplusplus
diff --git a/src/lib/krb5/krb/gic_opt.c b/src/lib/krb5/krb/gic_opt.c
index ccbe1a6..11f0b71 100644
--- a/src/lib/krb5/krb/gic_opt.c
+++ b/src/lib/krb5/krb/gic_opt.c
@@ -13,7 +13,7 @@
#endif
/* Match struct packing of krb5_get_init_creds_opt on macOS. */
-#if TARGET_OS_MAC
+#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
#pragma pack(push,2)
#endif
struct extended_options {
@@ -30,7 +30,7 @@ struct extended_options {
void *responder_data;
int pac_request; /* -1 unset, 0 false, 1 true */
};
-#if TARGET_OS_MAC
+#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
#pragma pack(pop)
#endif