Date: Wed, 7 Dec 2005 00:04:20 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 662 ************************************************** Tuesday 06 December 2005 Number 662 ************************************************** Subjects for today 1 ncurses v5.5 : John Poltorak 2 Re: DosLoadModule problem : Holger Veit **= Email 1 ==========================** Date: Tue, 6 Dec 2005 09:34:57 +0000 From: John Poltorak Subject: ncurses v5.5 Ncurses 5.5 has been released recently, but I've found I am unable to build it with my standard build environment. The following errors are produced In file included from ../ncurses/./tty/tty_update.c:70: g:\ux2bs\posix2\include\sys/select.h:26: `NBBY' undeclared here (not in a function) g:\ux2bs\posix2\include\sys/select.h:26: `NBBY' undeclared here (not in a function) g:\ux2bs\posix2\include\sys/select.h:26: size of array `fds_bits' has non-integer type g:\ux2bs\posix2\include\sys/select.h:43: conflicting types for `_select' g:\ux2bs\posix2\include\sys/unistdx.h:149: previous declaration of `_select' make[1]: *** [../objects/tty_update.o] Error 1 make[1]: Leaving directory `/ux2bs/workdir/ncurses-5.5/ncurses' make: *** [all] Error 2 In file included from ../ncurses/./tty/tty_update.c:70: g:\ux2bs\posix2\include\sys/select.h:26: `NBBY' undeclared here (not in a function) g:\ux2bs\posix2\include\sys/select.h:26: `NBBY' undeclared here (not in a function) g:\ux2bs\posix2\include\sys/select.h:26: size of array `fds_bits' has non-integer type g:\ux2bs\posix2\include\sys/select.h:43: conflicting types for `_select' g:\ux2bs\posix2\include\sys/unistdx.h:149: previous declaration of `_select' make[1]: *** [../objects/tty_update.o] Error 1 I suspect that this may have something to do with Posix/2. Can anyone confirm that? -- John **= Email 2 ==========================** Date: Tue, 06 Dec 2005 12:09:46 +0100 From: Holger Veit Subject: Re: DosLoadModule problem Dave Yeo wrote: >On Sat, 03 Dec 2005 22:21:05 +1030, Paul Smedley wrote: > > > >>I'm currently grappling with loading Apache2 modules dynamically. >> >> > >Wonder how hard it would be to change over to loading ELF modules? This is the way XFree86 dynamicaly loads modules >Dave > > You could look at the source code of the X server to see how this is done :-) It can also handle COFF and a.out files, BTW. The point with this method is that the X server is a specifically tailored environment to load and dynamically link predefined entry points only. This also means that it does not understand all fields of an ELF file, but only those which are required to keep a module alive. The X server also contains its own special libc for resolving module libc entries - the native libc might have different calling conventions. Loading such an ELF module is rather simple in principle: malloc enough space, fixup links according to a predefined entry table and add the new entry points introduced by the module to the table. This could work with Apache as well, but you need to know in advance which entry points a module requires. Regular ELF exports any symbol which is not specifically static - for these special modules you need to define everything first. Holger