Hi,
I'm trying to compile a version of the GENESIS neural simulator (The GENESIS Simulator) under Mac OS X Snow Leopard and using the latest version of XCode.
I was successfully able to compile source code under Ubuntu Linux without any problems, but for some reason the following error starts appearing under Mac. The specific error I am receiving is as follows:
Makefile output:
cc -O2 -D__NO_MATH_INLINES -DBIGENDIAN -DBSD -DMacOSXDarwin -I. -I.. -I../shell -I../ss jump.c -c
jump.c: In function ‘save_context’:
jump.c:95: error: invalid application of ‘sizeof’ to incomplete type ‘struct sigcontext’
Output upon running cc independent of Makefile
$ cc jump.c -c
jump.c: In function ‘save_context’:
jump.c:95: error: invalid application of ‘sizeof’ to incomplete type ‘struct sigcontext’
Thanks in advance for your help - I have been struggling with this for some time and any advice you could provide would be much appreciated.
Briefly, here is the contents of jump.c near the site of the error.
The complete file, jump.c, can be found at the following location:
http://individual.utoronto.ca/davestansweb/jump.c
#include <math.h>
#include <stdio.h>
#include <signal.h>
#include <setjmp.h>
#include <strings.h>
#include "system_deps.h"
#if (defined(i860) && !defined(paragon)) || (defined(Linux) && !defined(__GLIBC__)) || defined(CRAY) || defined(Cygwin)
struct sigcontext
{
int xyzzy;
};
#endif
extern jmp_buf main_context;
#ifndef Solaris
struct sigcontext sig_context;
SIGTYPE
save_context(sig,code,scp)
int sig,code;
struct sigcontext *scp;
{
/*
** save the context for later return
*/
BCOPY(scp,&sig_context,sizeof(struct sigcontext)); <-- line 95
}
#endif