__pragma keyword is only supported by recent Microsoft compilers

This commit is contained in:
dch
2013-04-07 15:28:05 +01:00
committed by Petteri Aimonen
parent 384e686fe6
commit 710465a8e0

2
pb.h
View File

@@ -30,7 +30,7 @@
# define PB_PACKED_STRUCT_START _Pragma("pack(push, 1)") # define PB_PACKED_STRUCT_START _Pragma("pack(push, 1)")
# define PB_PACKED_STRUCT_END _Pragma("pack(pop)") # define PB_PACKED_STRUCT_END _Pragma("pack(pop)")
# define pb_packed # define pb_packed
#elif defined(_MSC_VER) #elif defined(_MSC_VER) && (_MSC_VER >= 1500)
/* For Microsoft Visual C++ */ /* For Microsoft Visual C++ */
# define PB_PACKED_STRUCT_START __pragma(pack(push, 1)) # define PB_PACKED_STRUCT_START __pragma(pack(push, 1))
# define PB_PACKED_STRUCT_END __pragma(pack(pop)) # define PB_PACKED_STRUCT_END __pragma(pack(pop))