diff --git a/ChangeLog b/ChangeLog index 092d8b73..50ec5610 100644 --- a/ChangeLog +++ b/ChangeLog @@ -36,6 +36,10 @@ John Emmas Jackdmp changes log --------------------------- +2012-03-15 Stephane Letz + + * POST_PACKED_STRUCTURE used for jack_latency_range_t type. + 2012-03-09 Stephane Letz * Remove JACK_32_64 flag, so POST_PACKED_STRUCTURE now always used. diff --git a/common/jack/systemdeps.h b/common/jack/systemdeps.h index 4806533b..3c3c064f 100644 --- a/common/jack/systemdeps.h +++ b/common/jack/systemdeps.h @@ -49,6 +49,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #define POST_PACKED_STRUCTURE ;__pragma(pack(pop)) /* and POST_PACKED_STRUCTURE needs to be a macro which restores the packing to its previous setting */ + #else + #define PRE_PACKED_STRUCTURE + #define POST_PACKED_STRUCTURE #endif #endif diff --git a/common/jack/types.h b/common/jack/types.h index cfad3e54..fa059159 100644 --- a/common/jack/types.h +++ b/common/jack/types.h @@ -259,6 +259,7 @@ typedef void (*JackLatencyCallback)(jack_latency_callback_mode_t mode, void *arg /** * the new latency API operates on Ranges. */ +PRE_PACKED_STRUCTURE struct _jack_latency_range { /** @@ -269,7 +270,7 @@ struct _jack_latency_range * maximum latency */ jack_nframes_t max; -}; +} POST_PACKED_STRUCTURE; typedef struct _jack_latency_range jack_latency_range_t; @@ -549,7 +550,7 @@ typedef enum { #define EXTENDED_TIME_INFO PRE_PACKED_STRUCTURE -typedef struct { +struct _jack_position { /* these four cannot be set from clients: the server sets them */ jack_unique_t unique_1; /**< unique ID */ @@ -615,7 +616,9 @@ typedef struct { /* When (unique_1 == unique_2) the contents are consistent. */ jack_unique_t unique_2; /**< unique ID */ -} POST_PACKED_STRUCTURE jack_position_t; +} POST_PACKED_STRUCTURE; + +typedef struct _jack_position jack_position_t; /** * Prototype for the @a sync_callback defined by slow-sync clients. diff --git a/common/shm.h b/common/shm.h index 2a6d6096..2ee4e87e 100644 --- a/common/shm.h +++ b/common/shm.h @@ -117,20 +117,17 @@ extern "C" */ PRE_PACKED_STRUCTURE - typedef struct _jack_shm_info { + struct _jack_shm_info { jack_shm_registry_index_t index; /* offset into the registry */ uint32_t size; union { void *attached_at; /* address where attached */ char ptr_size[8]; } ptr; /* a "pointer" that has the same 8 bytes size when compling in 32 or 64 bits */ - } -#ifdef _MSC_VER - jack_shm_info_t; POST_PACKED_STRUCTURE -#else - POST_PACKED_STRUCTURE jack_shm_info_t; -#endif - + } POST_PACKED_STRUCTURE; + + typedef struct _jack_shm_info jack_shm_info_t; + /* utility functions used only within JACK */ void jack_shm_copy_from_registry (jack_shm_info_t*, diff --git a/windows/JackCompilerDeps_os.h b/windows/JackCompilerDeps_os.h index ecb767e9..ca7b7a38 100644 --- a/windows/JackCompilerDeps_os.h +++ b/windows/JackCompilerDeps_os.h @@ -22,6 +22,7 @@ #define __JackCompilerDeps_WIN32__ #define LIB_EXPORT __declspec(dllexport) + #ifdef SERVER_SIDE #define SERVER_EXPORT __declspec(dllexport) #else @@ -69,4 +70,8 @@ #endif +#if defined(_MSC_VER) /* Added by JE - 31-01-2012 */ +#define snprintf _snprintf +#endif + #endif