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:
parent
4358b19156
commit
b22623ba6a
@ -184,7 +184,7 @@ void * test( void * arg )
|
||||
sigset_t set;
|
||||
int i, j=0;
|
||||
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};
|
||||
|
||||
ret = sigemptyset( &set );
|
||||
@ -210,10 +210,10 @@ void * test( void * arg )
|
||||
for ( i = 0; i < 3; i++ )
|
||||
{
|
||||
j++;
|
||||
j %= 2 * NSIG;
|
||||
j %= 2 * NUM_SIGNALS;
|
||||
|
||||
if ( j >= NSIG )
|
||||
ret = sigdelset( &set, signals[ j - NSIG ] );
|
||||
if ( j >= NUM_SIGNALS )
|
||||
ret = sigdelset( &set, signals[ j - NUM_SIGNALS ] );
|
||||
else
|
||||
ret = sigaddset( &set, signals[ j ] );
|
||||
|
||||
|
@ -93,6 +93,8 @@ int main( int argc, char * argv[] )
|
||||
{
|
||||
int ret, error;
|
||||
sem_t * sem;
|
||||
#undef PATH_MAX
|
||||
#undef NAME_MAX
|
||||
long PATH_MAX, NAME_MAX;
|
||||
char * sem_name;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user