Issue 113 - move APPLE ifdef in direwolf.h

This commit is contained in:
wb2osz 2017-10-21 11:42:14 -04:00
parent 9c2b8f9b1a
commit 5cb6e04c54
1 changed files with 21 additions and 12 deletions

View File

@ -32,18 +32,6 @@
#endif
#ifdef __APPLE__
// https://groups.yahoo.com/neo/groups/direwolf_packet/conversations/messages/2072
// I think we should put it here, so it will apply to all files,
// rather than only in ptt.c.
#define __DARWIN_C_LEVEL __DARWIN_C_FULL
#endif
/*
* Previously, we could handle only a single audio device.
* This meant we could have only two radio channels.
@ -131,6 +119,27 @@
#endif
#ifdef __APPLE__
// https://groups.yahoo.com/neo/groups/direwolf_packet/conversations/messages/2072
// The original suggestion was to add this to only ptt.c.
// I thought it would make sense to put it here, so it will apply to all files,
// consistently, rather than only one file ptt.c.
// The placement of this is critical. Putting it earlier was a problem.
// https://github.com/wb2osz/direwolf/issues/113
// It needs to be after the include pthread.h because
// pthread.h pulls in <sys/cdefs.h>, which redefines __DARWIN_C_LEVEL back to ansi,
// which breaks things.
// Maybe it should just go in ptt.c as originally suggested.
#define __DARWIN_C_LEVEL __DARWIN_C_FULL
#endif
/* Not sure where to put these. */
/* Prefix with DW_ because /usr/include/gps.h uses a couple of these names. */