]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Harmonize macOS pack declarations with Heimdal 1109/head
authorGreg Hudson <ghudson@mit.edu>
Tue, 1 Sep 2020 04:33:42 +0000 (00:33 -0400)
committerGreg Hudson <ghudson@mit.edu>
Wed, 2 Sep 2020 21:54:25 +0000 (17:54 -0400)
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)

src/include/CredentialsCache.h
src/include/CredentialsCache2.h
src/include/krb5/krb5.hin
src/lib/gssapi/generic/gssapi.hin
src/lib/krb5/krb/gic_opt.c

index c18159639466243c7156e60044f3450ee8a8c683..1c20f9de81ab310a68328b3d1db45b566a565ce4 100644 (file)
@@ -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
 
index 9e5a346ac041aaab2ceef09537157d5836b6d17a..8a5871b066406ba019b4bf2cb79ae8320afb5faa 100644 (file)
@@ -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
 
index 114ab196908f59d41cbd52f97e97255c7117edc4..9927d2f58c2ff8457d540180224e7e90feb546a6 100644 (file)
 
 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
index 5049fbdf7daec74b9e9701bbd6b33ff0773a630c..767fb07b0a2b75e0237c4eef6ef65c1da5878380 100644 (file)
@@ -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
index ccbe1a65fa5a225af71383d19672253ac526f6c7..11f0b719f21041fbda047122be5728e92ed05e18 100644 (file)
@@ -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