Skip to content

Commit b1f5034

Browse files
authored
Merge pull request #90 from JoeMerten/osx-custom-baud-enable
Changed when to enable custom baud by default (#84)
2 parents 07c27c6 + 56e6886 commit b1f5034

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

custbaud.h

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,22 @@
4141
#endif /* of arch */
4242
#endif /* of version */
4343

44-
#elif defined (__APPLE__)
45-
46-
/* ?? Maybe enable by-default for specific versions ?? */
44+
#elif defined (__APPLE__) && defined(__MACH__)
45+
46+
#include <AvailabilityMacros.h>
47+
#include <TargetConditionals.h>
48+
#if TARGET_IPHONE_SIMULATOR
49+
/* Do not enable by default for iOS in Xcode simulator */
50+
#elif TARGET_OS_IPHONE
51+
/* Do not enable by default for iOS until it has been tested */
52+
#elif TARGET_OS_MAC
53+
#if defined (__i386__) || defined (__x86_64__)
54+
/* Enable by-default for Intel Mac, macOS / OSX >= 10.4 (Tiger) */
55+
#ifndef USE_CUSTOM_BAUD
56+
#define USE_CUSTOM_BAUD
57+
#endif
58+
#endif /* of arch */
59+
#endif /* of TARGET_OS_... */
4760
#define CUSTOM_BAUD_HEAD "custbaud_bsd.h"
4861

4962
#elif defined (__NetBSD__)

0 commit comments

Comments
 (0)