Date: Fri, 30 Apr 2004 00:04:16 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 364 ************************************************** Thursday 29 April 2004 Number 364 ************************************************** Subjects for today 1 emacs : John Poltorak 2 Re: Installing emTeX : John Poltorak 3 Re: _lstat : John Poltorak 4 Re: Installing emTeX : Stefan.Neis at t-online.de 5 Re: _lstat : Stefan.Neis at t-online.de 6 Re: _lstat : John Poltorak 7 Some porting expertise wanted : John Poltorak 8 Re: TeX Directory Structure : Michael Zolk 9 Re: Installing emTeX : John Poltorak 10 Re: Makefile.am for PATCH : John Poltorak 11 Re: _lstat : Dave Yeo" 12 Using Watcom DLLs with EMX : Dave Yeo" 13 Re: Using Watcom DLLs with EMX : Stefan.Neis at t-online.de 14 Re: Using Watcom DLLs with EMX : John Poltorak 15 SED one liners : John Poltorak 16 Re: TeX Directory Structure : John Poltorak 17 os2.h : John Poltorak 18 Re: Makefile.am for PATCH : Sebastian Wittmeier" 19 Re: Using Watcom DLLs with EMX : Andrew MacIntyre 20 Re: Makefile.am for PATCH : John Poltorak **= Email 1 ==========================** Date: Wed, 28 Apr 2004 15:31:23 +0100 From: John Poltorak Subject: emacs Here is a _rough_ guide to building emacs 20.7 which I managed to get working with some effort about two years ago:- c: md c:\tmp md c:\tmp\archives cd \tmp\archives wget ftp://ftp.gnu.org/pub/gnu/emacs/emacs-21.1.tar.gz wget ftp://ftp.gnu.org/pub/gnu/emacs/leim-21.1.tar.gz wget http://www.asahi-net.or.jp/~ik3a-nsmr/emacs-20.7-KIT1.9.tgz set SOMEWHERE=c:\tmp\archives set INCLUDE=%C_INCLUDE_PATH% set NAME=Richard Stallman tar zxf %SOMEWHERE%\emacs-20.7.tar.gz tar zxf %SOMEWHERE%\leim-20.7.tar.gz cd emacs-20.7 chmod +rw -R * rem 'tar zxf' does not work with patch kit untgz %SOMEWHERE%\emacs-20.7-KIT1.9.tgz copy ..\configure.cmd copy ..\configure-fu.cmd rem rem Edit configure.cmd rem rem change gpatch rem xcopy pause rem rem Execution of configure.cmd ask you twice, enter PATCH and press Enter key rem pause configure.cmd --with-bsd-socket --with-xf86sup-pty make exit 8. edit src\puresize.h as follows (line 36-43); #ifndef SYSTEM_PURESIZE_EXTRA /* #define SYSTEM_PURESIZE_EXTRA 0 */ #define SYSTEM_PURESIZE_EXTRA 200000 =1B$B"+=1B(B this number #endif #ifndef SITELOAD_PURESIZE_EXTRA #define SITELOAD_PURESIZE_EXTRA 200000 =1B$B"+=1B(B this nimber #endif Moreover, I have edited src\config.h as follows (line 246-248); #define EMACS_CONFIGURATION "AthlonXP OS/2_Warp_V4.51 emx09d_fix04" #define EMACS_CONFIG_OPTIONS "--emacs-configuration=3DAthlonXP OS/2_Warp_V4= ..51 emx09d_fix04 --with-bsd-socket=3Dyes --with-xf86sup-pty=3Dyes" 7. SET INCLUDE=x:/emx/include SET NAME=Richard Stallman =1B$B"+=1B(B ADD this in CONFIG.SYS 8. make 9. del src\emacs.exe 10. make 11. add emacs-20.7\src to SET PATH in the CONFIG.SYS In my case, SET PATH=....;\g:\usr\local\emacs-20.7\src; And add these 3 lines SET EMACSROOT=g:/usr/local/emacs-20.7 SET EMACSLOADPATH=g:/usr/local/emacs-20.7/lisp;g:/usr/local/emacs-20.7/site-lisp;g:/usr/local/emacs-20.7/leim SET NAME=Richard Stallman (Yes, I executed make under the g:\usr\local directory.) 12. make emacs.cmd like this g:\usr\local\emacs-20.7\src\emacs.exe then relate with a nice icon (emacs.ico) which is in the ..\emacs-20.7\os2. 13. Reboot This needs tidying up to some extent to make it fully automated. If anyone is familiar with emacs especially building it, then any advice on the above procedure would be welcomed. Apologies if anyone saw this earlier but there was a power cut just as this was getting sent out - and I'm not sure where it made it or not. -- John **= Email 2 ==========================** Date: Wed, 28 Apr 2004 15:52:56 +0100 From: John Poltorak Subject: Re: Installing emTeX On Wed, Apr 28, 2004 at 11:35:21AM +0200, Stefan.Neis at t-online.de wrote: > John Poltorak schrieb: > > > call makefmt 386 latex2e US 8bit -b \emtex\bin\latex2e > > rem ********************** need to restore directory here > > ************** > > cd \in\tex\os2\emtex > > i.e. something like > cmd /c "makefmt 386 latex2e US 8bit -b \emtex\bin\latex2e" I tried that, but it didn't make any difference. > Regards, > Stefan -- John **= Email 3 ==========================** Date: Wed, 28 Apr 2004 17:26:16 +0100 From: John Poltorak Subject: Re: _lstat On Tue, Apr 27, 2004 at 09:51:04PM +0200, Andreas Buening wrote: > John Poltorak wrote: > > > > On Sat, Apr 24, 2004 at 08:16:38AM -0800, Dave Yeo wrote: > > > On Sat, 24 Apr 2004 10:13:50 +0100, John Poltorak wrote: > > > > > > >Actually, after digging through my archives I found the solution suggested > > > >by Andreas the last time it happened - that was to run autoheader after > > > >autoconf. This solution worked perfectly well with MKTEMP v1.4 when I last > > > >tried it and also with the newer version (1.5) when I tried it yesterday. > > > >The thing is it only works using the OS/2 version of Autoconf v2.50, not > > > >the latest version. Maybe some experimental code was put in and then taken > > > >out. > > Exactly. I put it out because automagical stuff tends to cause > problems sometimes. > > Solutions (FAQ candidate?): Possibly, but only after it works ;-)... > 1) CPPFLAGS="-Dlstat" This seemed like the easiest option, but I got these compile errors:- config.status: creating config.h make gcc -c -I. -I. "-DMKTEMP_VERSION=\"1.5\"" -Dlstat mktemp.c gcc -c -I. -I. "-DMKTEMP_VERSION=\"1.5\"" -Dlstat priv_mktemp.c priv_mktemp.c: In function `_gettemp': priv_mktemp.c:143: called object is not a function make: *** [priv_mktemp.o] Error 1 This did not occur when I used your Autoconf v2.50-r5 without setting CPPFLAGS. > Bye, > Andreas -- John **= Email 4 ==========================** Date: Wed, 28 Apr 2004 19:15:28 +0200 (CEST) From: Stefan.Neis at t-online.de Subject: Re: Installing emTeX John Poltorak schrieb: > > cmd /c "makefmt 386 latex2e US 8bit -b > \emtex\bin\latex2e" > > I tried that, but it didn't make any difference. Maybe some issue with escaping '"'? At least, on a plain command shell (with c being my boot drive) I can do: > > [C:\]cmd /C "cd OS2 && dir xx*" > > Datenträger, Laufwerk C, hat den Namen ECOMSTATION. > Datenträgernummer ist E880:E814 > Verzeichnis von C:\OS2 ^^^^^^ > SYS0002: Die angegebene Datei konnte nicht gefunden werden. > >[C:\] ^^^^^ i.e. it works in principle ... Regards, Stefan **= Email 5 ==========================** Date: Wed, 28 Apr 2004 19:17:56 +0200 (CEST) From: Stefan.Neis at t-online.de Subject: Re: _lstat John Poltorak schrieb: > > 1) CPPFLAGS="-Dlstat" > > This seemed like the easiest option, but I got these > compile errors:- That probably should have been CPPFLAGS="-Dlstat=stat" Stefan **= Email 6 ==========================** Date: Wed, 28 Apr 2004 18:48:43 +0100 From: John Poltorak Subject: Re: _lstat On Wed, Apr 28, 2004 at 07:17:56PM +0200, Stefan.Neis at t-online.de wrote: > John Poltorak schrieb: > > > > 1) CPPFLAGS="-Dlstat" > > > > This seemed like the easiest option, but I got these > > compile errors:- > > That probably should have been > CPPFLAGS="-Dlstat=stat" Yes, you're right. I shouldn't have blindly pasted into my build script. It does work now. > Stefan -- John **= Email 7 ==========================** Date: Wed, 28 Apr 2004 19:12:21 +0100 From: John Poltorak Subject: Some porting expertise wanted I've been looking at the configure script from MAN, available here:- ftp://ftp.win.tue.nl/pub/linux-local/utils/man/man-1.5k.tar.gz for a few days, and it would seem that all it needs to get it to run on OS/2 is to make it cope with a DOS filesystem - ie. drives, pathseps and dirseps, and then to recognise OS/2 executables. Unfortunately, I can't get my head round some of the shell coding involved to actually get it to work. Could anyone else have a look at it? -- John **= Email 8 ==========================** Date: Wed, 28 Apr 2004 22:29:10 +0200 From: Michael Zolk Subject: Re: TeX Directory Structure On Mon, Apr 26, 2004 at 02:38:20PM +0100, John Poltorak wrote: > > I've just found a document:- > > ftp://ftp.dante.de/tex-archive/tds/index.html > > which explains a proposed directory structure for TeX. > > > If this was to be used in UnixOS/2, where should texmf go? > > Should we have /usr/local/share/texmf ? > > Anyone have a handy Unix system with TeX installed? On my Debian system, it's /usr/share/texmf. Michael -- **= Email 9 ==========================** Date: Wed, 28 Apr 2004 22:39:58 +0100 From: John Poltorak Subject: Re: Installing emTeX On Wed, Apr 28, 2004 at 07:15:28PM +0200, Stefan.Neis at t-online.de wrote: > John Poltorak schrieb: > > > > cmd /c "makefmt 386 latex2e US 8bit -b > > \emtex\bin\latex2e" > > > > I tried that, but it didn't make any difference. > > Maybe some issue with escaping '"'? > At least, on a plain command shell (with c > being my boot drive) I can do: > i.e. it works in principle ... It normally does work but in the case of:- cd \emtex\btexfmts call makefmt 386 latex2e US 8bit -b \emtex\bin\latex2e I get this:- makefmt -- Version 1.0c -- Copyright (c) 1995-1997 by Eberhard Mattes This is emTeX (tex386), Version 3.14159 [4b] (INITEX) **latex.ini \dump (latex.ini (/emtex/texinput/latex2e/latex.ltx (/emtex/texinput/latex2e/texsys.cfg) ../texsys.aux found \ at currdir set to: ./. Assuming \openin and \input have the same search path. Defining UNIX/DOS style filename parser. catcodes, registers, compatibility for TeX 2, parameters, !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! You are attempting to make a LaTeX format from a source file ! That is more than one year old. ! ! If you enter to scroll past this message then the format ! will be built, but please consider obtaining newer source files ! before continuing to build LaTeX. ! ! LaTeX is re-issued every 6 months, in June and December. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! LaTeX source files more than 1 year old!. l.573 ...urce files more than 1 year old!} ? This seems to mess things up somehow. Maybe if I tried using a newer version of the file it would be OK - although I'm notsure where to get one... > Regards, > Stefan -- John **= Email 10 ==========================** Date: Wed, 28 Apr 2004 22:43:31 +0100 From: John Poltorak Subject: Re: Makefile.am for PATCH On Tue, Apr 27, 2004 at 08:49:06PM +0200, Andreas Buening wrote: > John Poltorak wrote: > > > > I'm attempting to retrofit a Makefile.am into PATCH as I think it would be > > easier to maintain than patching Makefile.in. Since I don't anything about > > putting together a Makefile.am from scratch, this could take some time... > > > > AIUI the first two things you need in the file are:- > > > > bin_PROGRAMS = foo > > foo_SOURCES = foo.c foo.h xxx.c yyy.c zzz.c > > > > For PATCH, I guess the first line should be:- > > > > bin_PROGRAMS = patch > > > > but I'm not sure about the second... Looking through Makefile.in, these > > variable are set up:- > > [snip] > > This looks like a system-dependent source file selection > procedure. Not that easy to implement. And, don't forget > to set a link to every file in Makefile.am so that "make dist" > will store all source and text files. I thought PATCH would be fairly straightforward since it is only composed of a few files which are in the root directory. I'm not too concerned about the 'dist' target yet - I just want to be able to create a Makefile capable of building patch. > > so I'm tempted to add $SRCS and $HDRS to patch_sources. > > Sounds reasonably. Well all I have in Makefile.am at the moment is:- bin_PROGRAMS = patch patch_SOURCES = addext.c argmatch.c backupfile.c basename.c error.c inp.c maketime.c mkdir.c partime.c patch.c pch.c quotearg.c quotesys.c rmdir.c util.c version.c xmalloc.c argmatch.h backupfile.h basename.h common.h error.h getopt.h inp.h maketime.h partime.h patchlevel.h pch.h quotearg.h quotesys.h util.h version.h xalloc.h which appears to help produce a Makefile that does start compiling some of these files but ends with:- gcc -DHAVE_CONFIG_H -I. -I. -I. -c backupfile.c source='basename.c' object='basename.o' libtool=no \ depfile='.deps/basename.Po' tmpdepfile='.deps/basename.TPo' \ depmode=gcc c:/bin/sh ./depcomp \ gcc -DHAVE_CONFIG_H -I. -I. -I. -c basename.c source='error.c' object='error.o' libtool=no \ depfile='.deps/error.Po' tmpdepfile='.deps/error.TPo' \ depmode=gcc c:/bin/sh ./depcomp \ gcc -DHAVE_CONFIG_H -I. -I. -I. -c error.c error.c: In function `error': error.c:125: argument `message' doesn't match prototype error.h:50: prototype declaration Any ideas? > Bye, > Andreas -- John **= Email 11 ==========================** Date: Wed, 28 Apr 2004 19:14:51 -0800 From: "Dave Yeo" Subject: Re: _lstat On Tue, 27 Apr 2004 21:51:04 +0200, Andreas Buening wrote: > >Exactly. I put it out because automagical stuff tends to cause >problems sometimes. > >Solutions (FAQ candidate?): > >1) CPPFLAGS="-Dlstat" > >2) Somewhere in the source >#define lstat stat Should that be #define lstat(n ,b) stat(n ,b) > >3) configure.ac: >AC_CHECK_FUNC([lstat], , > [AC_DEFINE([lstat], [stat], > [Define to 'stat' if you do not have the 'lstat' function.]) > ] >) How about extending emxfix.a (available at ftp.netlabs.org/pub/xfree/src) to include something like this /* lstat.c */ #include int lstat (__const__ char *, struct stat *) { return stat (n, b); } From the emxfix.zip readme This library is supposed to be a quick hack to "fix" the most annoying problems of EMX. Fixing means here: to provide the missing function prototypes that prevent XFree86/OS2 from compiling. The system assumes to be running completely as 'root'. Dave **= Email 12 ==========================** Date: Wed, 28 Apr 2004 22:09:21 -0800 From: "Dave Yeo" Subject: Using Watcom DLLs with EMX There's a new port of SDL on ftp.netlabs.org which is great. Unluckily it is built with Watcom. I've been trying to build things with GCC to use SDL but haven't had much luck. Best I have got is a window appearing and disappearing. Should this be possible? I've also tried building some apps with Watcom but I get so many strange errors with code meant for GCC. Running the configure script ends with unsupported system, please add to configure.in which would be nice to do but sure looks like a big job. Dave **= Email 13 ==========================** Date: Thu, 29 Apr 2004 10:30:38 +0200 (CEST) From: Stefan.Neis at t-online.de Subject: Re: Using Watcom DLLs with EMX Dave Yeo schrieb: > Running the configure script ends with > unsupported system, please add > to configure.in which would be nice to do > but sure looks like a big job. It's either impossible or easy, depending on whether or not Watcom's commmand line interface supports some standard Posix flags (most notably "-o filename" and "-c"). OpenWatcom 1.0 didn't, but I heard some rumours that "they" plan to add this. Regards, Stefan **= Email 14 ==========================** Date: Thu, 29 Apr 2004 10:30:23 +0100 From: John Poltorak Subject: Re: Using Watcom DLLs with EMX On Wed, Apr 28, 2004 at 10:09:21PM -0800, Dave Yeo wrote: > There's a new port of SDL on ftp.netlabs.org which is great. Unluckily > it is built with Watcom. I've been trying to build things with GCC to > use SDL but haven't had much luck. Best I have got is a window > appearing and disappearing. Should this be possible? > I've also tried building some apps with Watcom but I get so many > strange errors with code meant for GCC. > Running the configure script ends with unsupported system, please add > to configure.in which would be nice to do but sure looks like a big > job. It would be nice to have alternatives to gcc but I suppose it needs changes to the GNU build tools as well as changes to Watcom so that it complies with any standards the build tools require. As far as the build tools go, it may just require a few entries to a number of files... I'm guessing here, but having OS/2 as a recognised platform only required entries to config.guess and config.sub so something similar may require amending to recognise new compilers. > Dave -- John **= Email 15 ==========================** Date: Thu, 29 Apr 2004 10:38:41 +0100 From: John Poltorak Subject: SED one liners For those not familiar with the power of SED, and even or those who are, you may find some interesting ways of getting SED to do complex things from the command line. See:- http://sed.sourceforge.net/sed1line.txt You may even want to check the SED FAQ:- http://sed.sourceforge.net/sedfaq.html It's good to see that OS/2 is mentioned in the FAQ. -- John **= Email 16 ==========================** Date: Thu, 29 Apr 2004 10:58:01 +0100 From: John Poltorak Subject: Re: TeX Directory Structure On Wed, Apr 28, 2004 at 10:29:10PM +0200, Michael Zolk wrote: > On Mon, Apr 26, 2004 at 02:38:20PM +0100, John Poltorak wrote: > > > > I've just found a document:- > > > > ftp://ftp.dante.de/tex-archive/tds/index.html > > > > which explains a proposed directory structure for TeX. > > > > > > If this was to be used in UnixOS/2, where should texmf go? > > > > Should we have /usr/local/share/texmf ? > > > > Anyone have a handy Unix system with TeX installed? > > On my Debian system, it's /usr/share/texmf. Where do the binaries go? /usr/bin ? Do they have the same names as they do in emTeX? > Michael > -- -- John **= Email 17 ==========================** Date: Thu, 29 Apr 2004 11:43:12 +0100 From: John Poltorak Subject: os2.h I'm running RC (IBM's resource compiler) and it complains about being unable to find os2.h. Would this be the os2.h from EMX? If so, I guess RC does not use C_INCLUDE_PATH ... Incidentally, I just noticed that the OS/2 version of which 2.14 has an option '-i' - search directories in C_INCLUDE_PATH for header (.h) files A very handy option indeed. -- John **= Email 18 ==========================** Date: Thu, 29 Apr 2004 15:00:03 +0200 (CEST) From: "Sebastian Wittmeier" Subject: Re: Makefile.am for PATCH On Wed, 28 Apr 2004 22:43:31 +0100, John Poltorak wrote: >gcc -DHAVE_CONFIG_H -I. -I. -I. -c error.c >error.c: In function `error': >error.c:125: argument `message' doesn't match prototype >error.h:50: prototype declaration > > >Any ideas? I experimented a bit - what helped was to define one of those: /* Define if you don't have vprintf but do have _doprnt. */ #define HAVE_DOPRNT /* Define if you have the vprintf function. */ #define HAVE_VPRINTF Does anybody know, what the difference is, and if they exist on OS/2? Sebastian **= Email 19 ==========================** Date: Thu, 29 Apr 2004 21:35:40 +1000 (EST) From: Andrew MacIntyre Subject: Re: Using Watcom DLLs with EMX On Wed, 28 Apr 2004, Dave Yeo wrote: > There's a new port of SDL on ftp.netlabs.org which is great. Unluckily > it is built with Watcom. I've been trying to build things with GCC to > use SDL but haven't had much luck. Best I have got is a window > appearing and disappearing. Should this be possible? > I've also tried building some apps with Watcom but I get so many > strange errors with code meant for GCC. > Running the configure script ends with unsupported system, please add > to configure.in which would be nice to do but sure looks like a big > job. I can imagine that this could be made to work if the following hold: - the library is built as a DLL with a staticly linked C library; - all the DLL exported functions are declared _System (or __syscall etc); - no file handles need to be manipulated by both the DLL and the caller; - no memory malloc()ed on one side of the app/DLL divide needs to be free() or realloc()ed on the other side without an exported interface being available to do it. I've just used OW 1.1 to create a shim library that made it easier to use the later OS/2 TCP/IP API (ie tcpip32.dll instead of tcp32dll.dll+so32dll.dll) bypassing the EMX socket abstraction with minimal source disturbance. I managed to avoid using any of the OW C library though, so the shim is easily linked to EMX apps (though OMF only, perhaps convertible to a.out with EMX tools). BTW, at least with OW 1.1, the command line is nothing like that of a Unix C compiler. -- Andrew I MacIntyre "These thoughts are mine alone..." E-mail: andymac at bullseye.apana.org.au (pref) | Snail: PO Box 370 andymac at pcug.org.au (alt) | Belconnen ACT 2616 Web: http://www.andymac.org/ | Australia **= Email 20 ==========================** Date: Thu, 29 Apr 2004 14:33:02 +0100 From: John Poltorak Subject: Re: Makefile.am for PATCH On Thu, Apr 29, 2004 at 03:00:03PM +0200, Sebastian Wittmeier wrote: > On Wed, 28 Apr 2004 22:43:31 +0100, John Poltorak wrote: > > >gcc -DHAVE_CONFIG_H -I. -I. -I. -c error.c > >error.c: In function `error': > >error.c:125: argument `message' doesn't match prototype > >error.h:50: prototype declaration > > > > > >Any ideas? > > I experimented a bit - what helped was to define one of those: > > /* Define if you don't have vprintf but do have _doprnt. */ > #define HAVE_DOPRNT > > /* Define if you have the vprintf function. */ > #define HAVE_VPRINTF Are they defined in config.h ? AIUI config.h is generated through entries in configure.in, so what would you need to add to configure.in? I'm starting from scratch and so far, only have these lines: dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.53]) AC_INIT([patch], [2.5.4]) AM_INIT_AUTOMAKE([patch], [2.5.4]) AC_PROG_CC AC_CONFIG_HEADERS([config.h:config.hin]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT > Sebastian > > -- John