summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorLuca Dariz <luca@orpolo.org>2022-06-28 12:10:43 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-28 02:54:15 +0200
commit5e3913bb0abaac77f672366280d71503e6bb0f45 (patch)
treec6fdc90989f1a7a6e14f7d49250a99a3011bbd53 /ipc
parent222aee5ef5885dbe5b5b39c59495f9e3f22f864d (diff)
compute mach port size from the corresponding type
* ipc/ipc_machdep.h: re-define PORT_T_SIZE_IN_BITS to be computed from mach_port_t instead of being hardcoded. Signed-off-by: Luca Dariz <luca@orpolo.org> Message-Id: <20220628101054.446126-5-luca@orpolo.org>
Diffstat (limited to 'ipc')
-rwxr-xr-xipc/ipc_machdep.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/ipc/ipc_machdep.h b/ipc/ipc_machdep.h
index c205ba45..29878dc9 100755
--- a/ipc/ipc_machdep.h
+++ b/ipc/ipc_machdep.h
@@ -27,18 +27,12 @@
#ifndef _IPC_IPC_MACHDEP_H_
#define _IPC_IPC_MACHDEP_H_
+#include <mach/message.h>
+
/*
* At times, we need to know the size of a port in bits
*/
-/* 64 bit machines */
-#if defined(__alpha)
-#define PORT_T_SIZE_IN_BITS 64
-#endif
-
-/* default, 32 bit machines */
-#if !defined(PORT_T_SIZE_IN_BITS)
-#define PORT_T_SIZE_IN_BITS 32
-#endif
+#define PORT_T_SIZE_IN_BITS (sizeof(mach_port_t)*8)
#endif /* _IPC_IPC_MACHDEP_H_ */