Prevent clashes with non-POSIX macros that are (or were?) still part of some
standard and are defined in our headers. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36063 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+4
-4
@@ -184,7 +184,7 @@ void * test( void * arg )
|
|||||||
sigset_t set;
|
sigset_t set;
|
||||||
int i, j=0;
|
int i, j=0;
|
||||||
int signals[] = { SIGBUS, SIGKILL, SIGABRT, SIGCHLD, SIGHUP };
|
int signals[] = { SIGBUS, SIGKILL, SIGABRT, SIGCHLD, SIGHUP };
|
||||||
#define NSIG (sizeof(signals)/sizeof(int))
|
#define NUM_SIGNALS (sizeof(signals)/sizeof(int))
|
||||||
int operation[] = {SIG_SETMASK, SIG_BLOCK, SIG_UNBLOCK};
|
int operation[] = {SIG_SETMASK, SIG_BLOCK, SIG_UNBLOCK};
|
||||||
|
|
||||||
ret = sigemptyset( &set );
|
ret = sigemptyset( &set );
|
||||||
@@ -210,10 +210,10 @@ void * test( void * arg )
|
|||||||
for ( i = 0; i < 3; i++ )
|
for ( i = 0; i < 3; i++ )
|
||||||
{
|
{
|
||||||
j++;
|
j++;
|
||||||
j %= 2 * NSIG;
|
j %= 2 * NUM_SIGNALS;
|
||||||
|
|
||||||
if ( j >= NSIG )
|
if ( j >= NUM_SIGNALS )
|
||||||
ret = sigdelset( &set, signals[ j - NSIG ] );
|
ret = sigdelset( &set, signals[ j - NUM_SIGNALS ] );
|
||||||
else
|
else
|
||||||
ret = sigaddset( &set, signals[ j ] );
|
ret = sigaddset( &set, signals[ j ] );
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,8 @@ int main( int argc, char * argv[] )
|
|||||||
{
|
{
|
||||||
int ret, error;
|
int ret, error;
|
||||||
sem_t * sem;
|
sem_t * sem;
|
||||||
|
#undef PATH_MAX
|
||||||
|
#undef NAME_MAX
|
||||||
long PATH_MAX, NAME_MAX;
|
long PATH_MAX, NAME_MAX;
|
||||||
char * sem_name;
|
char * sem_name;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user