From: UnixOS2 Archive To: "UnixOS2 Archive" Date: Wed, 5 Jun 2002 04:27:26 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 234 ************************************************** Tuesday 04 June 2002 Number 234 ************************************************** Subjects for today 1 Re: Fnodes : Andrew MacIntyre 2 Re: A little EMX help please : csaba.raduly at sophos.com 3 Re: Compiling HTML Tidy for OS/2 : csaba.raduly at sophos.com 4 Re: Fnodes : csaba.raduly at sophos.com 5 Re: A little EMX help please - working : Dave Saville" **= Email 1 ==========================** Date: Wed, 5 Jun 2002 09:20:48 +1100 (edt) From: Andrew MacIntyre Subject: Re: Fnodes On Tue, 4 Jun 2002, Jack Troughton wrote: > > Isn't that what the CGI version of PHP does? > > AFAIK, it executes separately each time you call a page. I don't believe > that the CGI interface spec permits script interpreters to function as a > daemon. > > This could depend on the web server in question, of course. I believe that Fast-CGI and several other forms of persistent CGI were developed for this reason. The xitami webserver, for which there's explicit OS/2 (EMX even) support, has a feature called "LRWP" (long running web processes) which is of this type. I've not yet had a chance to try it in conjunction with the Python port yet (LWRP support for C, Java, Python & Perl is in the distribution). -- Andrew I MacIntyre "These thoughts are mine alone..." E-mail: andymac at bullseye.apana.org.au | Snail: PO Box 370 andymac at pcug.org.au | Belconnen ACT 2616 Web: http://www.andymac.org/ | Australia **= Email 2 ==========================** Date: Wed, 5 Jun 2002 10:23:18 +0100 From: csaba.raduly at sophos.com Subject: Re: A little EMX help please >Dave Saville wrote: >> >> Hi all >> >> I need to link to an undocumented function that is of course not in >> EMX. I know I need to add an IMPORTS line to the def file >> >> IMPORTS c_routine_name = module.number >> >> and I also know that emxbind ignores it. I poked about and found I >> need emximp, but I can't figure out what I am then doing wrong. >> emximp just gives an 8 byte file with not a lot in it :-) >> >> 00000000 213C6172 63683E0A 00000000 00000000 *!.........* >> On 03/06/2002 04:59:52 Henry Sobotka wrote: (top-posting corrected) >Instead of using an IMPORTS statement, why not just link with the >library containing the missing function? For instance, if it's in >foo.[a|lib], just add > >-L[path/to/library] -lfoo > >to your linkage command (assuming foo is not already in LIBRARY_PATH, in >which case you just need -lfoo). > The fact that he adds to the IMPORTS section of the .DEF clearly suggests that he's talking about dynamic link libraries (DLLs), not .a/.lib Most likely this is a case of a function exported from a DLL with no corresponding import library available. Dave, emximp is *supposed* to produce a file beginning with ! although not that short :-) I doubt emximp will produce an import library from the DEF file of your program (which contains the IMPORTS directive). AFAIU, it only processes DEF files for the DLL, which would contain EXPORTS directives. You probably don't have the DEF file for the DLL. You might need to write a slightly different file for emximp to process. Check out view emxdev emximp and especially section 4.4.1 (just click Forward from the emximp page) about emx import list file. You'll need to write such a file: c_routine_name module number XXX where XXX is the number of 32-bit words passed to the function (most likely the number of arguments). You should be able to determine that from the calling statement (I assume you can compile your program but can't link). HTH, -- Csaba Ráduly, Software Engineer Sophos Anti-Virus email: csaba.raduly at sophos.com http://www.sophos.com US Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933 **= Email 3 ==========================** Date: Wed, 5 Jun 2002 10:26:59 +0100 From: csaba.raduly at sophos.com Subject: Re: Compiling HTML Tidy for OS/2 On 02/06/2002 19:35:25 owner-os2-unix wrote: >On Sun, 2 Jun 2002 19:18:30 +0100, John Poltorak wrote: > >>I did notice that it also come with a Makefile suitable for NMAKE so you >>could try building it with VAC... > >It worked with the last version, but not with this one. I get a ton of >errors about " is not valid C code". > That sounds as if it tried to compile some binaries instead of sources... Can you post the output of a clean build nmake 2>&1 1>rez in the file called "rez" ? -- Csaba Ráduly, Software Engineer Sophos Anti-Virus email: csaba.raduly at sophos.com http://www.sophos.com US Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933 **= Email 4 ==========================** Date: Wed, 5 Jun 2002 10:31:24 +0100 From: csaba.raduly at sophos.com Subject: Re: Fnodes On 04/06/2002 16:43:49 owner-os2-unix wrote: >Christian Hennecke wrote: >>>>You know what would be cool? If you could start a program like php and >>>>feed it script names to execute on stdin, with output going to stdout. >>> >> >> Isn't that what the CGI version of PHP does? > >AFAIK, it executes separately each time you call a page. I don't believe >that the CGI interface spec permits script interpreters to function as a >daemon. > Not the original CGI, no. But check out FastCGI (use Google). -- Csaba Ráduly, Software Engineer Sophos Anti-Virus email: csaba.raduly at sophos.com http://www.sophos.com US Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933 **= Email 5 ==========================** Date: Wed, 05 Jun 2002 11:48:32 +0100 (BST) From: "Dave Saville" Subject: Re: A little EMX help please - working On Wed, 5 Jun 2002 10:23:18 +0100, csaba.raduly at sophos.com wrote: > >>Dave Saville wrote: >>> >>> Hi all >>> >>> I need to link to an undocumented function that is of course not in >>> EMX. I know I need to add an IMPORTS line to the def file >>> >>> IMPORTS c_routine_name = module.number >>> >>> and I also know that emxbind ignores it. I poked about and found I >>> need emximp, but I can't figure out what I am then doing wrong. >>> emximp just gives an 8 byte file with not a lot in it :-) >>> >>> 00000000 213C6172 63683E0A 00000000 00000000 *!.........* >>> > >On 03/06/2002 04:59:52 Henry Sobotka wrote: >(top-posting corrected) > >>Instead of using an IMPORTS statement, why not just link with the >>library containing the missing function? For instance, if it's in >>foo.[a|lib], just add >> >>-L[path/to/library] -lfoo >> >>to your linkage command (assuming foo is not already in LIBRARY_PATH, in >>which case you just need -lfoo). >> > >The fact that he adds to the IMPORTS section of the .DEF clearly suggests >that he's talking about dynamic link libraries (DLLs), not .a/.lib > >Most likely this is a case of a function exported from a DLL with no >corresponding import library available. > >Dave, emximp is *supposed* to produce a file beginning with ! >although not that short :-) >I doubt emximp will produce an import library from the DEF file >of your program (which contains the IMPORTS directive). AFAIU, >it only processes DEF files for the DLL, which would contain >EXPORTS directives. You probably don't have the DEF file >for the DLL. > >You might need to write a slightly different file for emximp >to process. Check out > >view emxdev emximp > >and especially section 4.4.1 (just click Forward from the emximp page) >about emx import list file. You'll need to write such a file: > >c_routine_name module number XXX > >where XXX is the number of 32-bit words passed to the function >(most likely the number of arguments). You should be able to determine >that from the calling statement (I assume you can compile your program >but can't link). > >HTH, > >-- >Csaba Ráduly, Software Engineer Sophos Anti-Virus >email: csaba.raduly at sophos.com http://www.sophos.com >US Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933 > > All Thanks everybody for the help - I have got it working. Built a foo.imp file and used emximp to generate a foo.a file and then put a -lfoo in the gcc link. -- Regards Dave Saville Please note new email address dave.saville at ntlworld.com