Hi all,
After converting a Mach-O project from CW8.3 to CW9.5 I get the
following errors:
// Error 1:
Error : undefined identifier 'NSIG'
signal.h line 66 extern __const char *__const sys_signame[NSIG];
Error : undefined identifier 'NSIG'
signal.h line 67 extern __const char *__const sys_siglist[NSIG];
// Error 2:
Error : ')' expected
signal.h line 75 int (*(sigset_t *) |= 1 << (( int) - 1), 0);
Error : ')' expected
signal.h line 77 int (*(sigset_t *) &= ~(1 << (( int) - 1)), 0);
Error : ')' expected
signal.h line 78 int (*(sigset_t *) = 0, 0);
Error : ')' expected
signal.h line 79 int (*(sigset_t *) = ~(sigset_t)0, 0);
Error : ')' expected
signal.h line 80 int ((*(const sigset_t *) & (1 << (( int) - 1))) != 0);
Thus occurs when I #include <unistd.h>
As to Error 1: The macro NSIG does not seem to be defined.
As for Error 2: These functions seem to be declared and have a macro
defined them
int sigaddset(sigset_t *, int);
int sigdelset(sigset_t *, int);
int sigemptyset(sigset_t *);
int sigfillset(sigset_t *);
int sigismember(const sigset_t *, int);
#define sigaddset(set, signo) (*(set) |= 1 << ((signo) - 1), 0)
#define sigdelset(set, signo) (*(set) &= ~(1 << ((signo) - 1)), 0)
#define sigemptyset(set) (*(set) = 0, 0)
#define sigfillset(set) (*(set) = ~(sigset_t)0, 0)
#define sigismember(set, signo) ((*(set) & (1 << ((signo) - 1))) != 0)
What am I doing wrong here?
With kind regards,
Peter Paulus
MW Ron - 07 Jun 2005 22:47 GMT
>Hi all,
>
[quoted text clipped - 4 lines]
>Error : undefined identifier 'NSIG'
>signal.h line 66 extern __const char *__const sys_signame[NSIG];
Look and see if you have the recursive search for your access paths for
OS X includes that has to be off.
MSL only has 33 lines in its signal.h
Reprecompile your precompiled headers somehow you are getting the BSD C
headers and MSL C Headers both pulled in. You want to use one or the
oher, not both.
Ron
>Error : undefined identifier 'NSIG'
>signal.h line 67 extern __const char *__const sys_siglist[NSIG];
[quoted text clipped - 37 lines]
>With kind regards,
>Peter Paulus

Signature
Metrowerks Community Forum is a free online resource for developers
to discuss CodeWarrior topics with other users and Metrowerks' staff
-- http://www.metrowerks.com/community --
Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com
Peter Paulus - 08 Jun 2005 15:13 GMT
>>Hi all,
>>
[quoted text clipped - 57 lines]
>>With kind regards,
>>Peter Paulus
Hello Ron,
Thank you for your prompt reply in these turbulent times.
I seem to have corrected the mixup of MSL and BSD C. I'm now using
MSLCarbonPrefix.h
My access paths are:
{Compiler} MSL (recursive)
{OSX Volume}usr/include (non-recursive)
{OSX Volume}System/Library/Frameworks (framework)
I've included frameworks Carbon, CoreServices and CoreFoundation.
I now get a load of other errors:
JSPREFIX 2
JSRef.prefix line 4 #pragma message("JSPREFIX 2")
Error : undefined identifier 'DIR'
dirent.h line 56 _MSL_IMP_EXP_C DIR *opendir(const char *)
_MSL_CANT_THROW;
Error : identifier 'mode_t' redeclared
was declared as: 'unsigned short'
now declared as: 'unsigned long'
stat.h line 61 typedef unsigned long mode_t;
Error : identifier 'ino_t' redeclared
was declared as: 'unsigned int'
now declared as: 'unsigned long'
stat.h line 62 typedef unsigned long ino_t;
Error : identifier 'dev_t' redeclared
was declared as: 'int'
now declared as: 'unsigned long'
stat.h line 63 typedef unsigned long dev_t;
Error : identifier 'nlink_t' redeclared
was declared as: 'unsigned short'
now declared as: 'short'
stat.h line 64 typedef short nlink_t;
Error : identifier 'uid_t' redeclared
was declared as: 'unsigned int'
now declared as: 'unsigned long'
stat.h line 65 typedef unsigned long uid_t;
Error : identifier 'gid_t' redeclared
was declared as: 'unsigned int'
now declared as: 'unsigned long'
stat.h line 66 typedef unsigned long gid_t;
Error : identifier 'off_t' redeclared
was declared as: 'long long'
now declared as: 'long'
stat.h line 67 typedef long off_t;
Error : macro 'NAME_MAX' redefined
syslimits.h line 73 #define NAME_MAX 255 /* max bytes in a file
name */
Error : (location of previous definition)
dirent.h line 16 #define NAME_MAX 260 /* this should have been
defined in <limits.h>! */
Error : undefined identifier 'rmdir'
NativeFolder.cpp line 50 ::rmdir(path);
Error : undefined identifier 'opendir'
NativeFolder.cpp line 57 dir = opendir(path);
Error : undefined identifier 'd_type'
NativeFolder.cpp line 122 if (dp->d_type == DT_REG)
Error : expression syntax error
NativeFolder.cpp line 134 }
Error : ';' expected
NativeFolder.cpp line 136 result = dp->d_name;
Error : undefined identifier 'd_type'
NativeFolder.cpp line 152 if (dp->d_type == DT_REG)
Error : expression syntax error
NativeFolder.cpp line 161 }
Error : ';' expected
NativeFolder.cpp line 163 }
Error : '(' expected
NativeFolder.cpp line 170 NativeFolder* NativeFolder::nextFolder()
Error : ')' expected
NativeFolder.cpp line 174 struct dirent* dp;
Error : expression syntax error
NativeFolder.cpp line 176 while (dp = ::readdir(dir), dp != 0L)
Error : expression syntax error
NativeFolder.cpp line 198 }
Error : ';' expected
NativeFolder.cpp line 200 }
Error : expression syntax error
NativeFolder.cpp line 200 }
Error : undefined identifier 'seekdir'
NativeFolder.cpp line 208 ::seekdir(dir, loc);
Error : undefined identifier 'telldir'
NativeFolder.cpp line 217 return ::telldir(dir);
This is just exemplary. In fact I'm dealing with about 15 projects and
30 targets I need to compile in both CW83 and CW95, all sharing the same
code base. In CW83 all my projects were fully operational.
This is about the fourth time that I inquire about this. I still can't
seem to get it right. Maybe you can explain to me in detail.
I've attached a preprocessed file, so you can perhaps see what is happening.
Precompiled headers have been recompiled during installation. This time
without having me to correct some errors.
Hope you can help me
With kind regards,
Peter Paulus
MW Ron - 08 Jun 2005 23:48 GMT
>I seem to have corrected the mixup of MSL and BSD C. I'm now using
>MSLCarbonPrefix.h
[quoted text clipped - 7 lines]
>
>I now get a load of other errors:
Peter,
Send me a project so I can see what settings you are using. I think
this is still an access path or settings error.
If you can send me a project and a source file that shows these I can
probably fix it.
Ron

Signature
Metrowerks Community Forum is a free online resource for developers
to discuss CodeWarrior topics with other users and Metrowerks' staff
-- http://www.metrowerks.com/community --
Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com