Took a little doing, but apache 1.3.12 now compile/works on Neutrino.
Doing a configure --host=qnx almost works (There does not seem to be a
Neutrino host config). However, the following problems arise:
The linker flags -lunix and -N128 don’t work.
Solution:
linker flags that work: -lsocket -lm
The flock function does not seem to be in libc
Solution:
write your own using fcntl()… something like this
#define LOCK_SH 1
#define LOCK_EX 2
#define LOCK_NB 4
#define LOCK_UN 8
int flock(int fd, int op)
{
struct flock fl;
switch(op & (~LOCK_NB))
{
case LOCK_EX:
fl.l_type = F_WRLCK;
break;
case LOCK_UN:
fl.l_type = F_UNLCK;
break;
case LOCK_SH:
fl.l_type = F_RDLCK;
break;
}
fl.l_whence = SEEK_SET;
fl.l_start = 0;
fl.l_len = 0;
if((op & LOCK_NB) == LOCK_NB) {
if (fcntl(fd, F_SETLK, &fl) != -1)
return 0;
else
return -1;
}
else {
if (fcntl(fd, F_SETLKW, &fl) != -1)
return 0;
else
return -1;
}
The default SCOREBOARD file type selected by config uses shared memory which
causes a core dump with a SIGBUS. Actually, it seems that shm_open is
unimplemented.
Solution:
change the config.h file to use MMAP_SCOREBOARD
The default method of execing programs fails for CGI scripts (exec format
error).
Solution:
change config.h to indicate that you need HASHBANG emulation.
Recompile and install… Should work now…