Date: Tue, 2 Nov 2004 00:04:21 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 435 ************************************************** Monday 01 November 2004 Number 435 ************************************************** Subjects for today 1 Re: GNUDIFF : Stefan.Neis at t-online.de 2 Re: Removing RO during 'tar -x' : Thomas Dickey 3 Ghostscript : John Poltorak 4 Re: Ghostscript : Mikkel C. Simonsen" 5 GCC 3.3.4 problem : John Poltorak 6 Re: Posix/2 sys\select.h & NBBY : Dave Yeo" 7 Re: Posix/2 sys\select.h & NBBY : John Poltorak 8 Re: GCC 3.3.4 problem : Stefan.Neis at t-online.de 9 Re: Posix/2 sys\select.h & NBBY : Stefan.Neis at t-online.de 10 Re: Posix/2 sys\select.h & NBBY : Stefan.Neis at t-online.de 11 Re: Posix/2 sys\select.h & NBBY : John Poltorak 12 Re: GCC 3.3.4 problem : Dave Yeo" 13 Re: Posix/2 sys\select.h & NBBY : Dave Yeo" 14 Re: Posix/2 sys\select.h & NBBY : Stefan.Neis at t-online.de 15 Re: Posix/2 sys\select.h & NBBY : Steve Wendt" 16 Re: Posix/2 sys\select.h & NBBY : Stefan.Neis at t-online.de 17 Re: Posix/2 sys\select.h & NBBY : Neil Waldhauer" 18 Re: Posix/2 sys\select.h & NBBY : Steve Wendt" 19 Re: Removing RO during 'tar -x' : John Poltorak 20 Re: GCC 3.3.4 problem : John Poltorak 21 AM_WITH_REGEX macro : John Poltorak 22 Re: GCC 3.3.4 problem : Stefan.Neis at t-online.de 23 Re: Removing RO during 'tar -x' : Dave Saville" **= Email 1 ==========================** Date: Sun, 31 Oct 2004 14:37:41 +0100 From: Stefan.Neis at t-online.de Subject: Re: GNUDIFF Hi, > On Sat, Oct 30, 2004 at 08:28:54PM -0400, Henry Sobotka wrote: > > John Poltorak wrote: > > > > > > Having said that, I'm still not to clear how the debug target ends up > > > triggering os2-debug. How make manoevures its way round these dependencies > > > always ties me up in knots. > > > > > > debug dos-debug: config.h > > > $(MAKE) all \ > > > 'CFLAGS=-g -O -Wall' \ > > > LDFLAGS= > > > dos-release: config.h all > > > > > > os2-debug : dos-debug > > > > It doesn't trigger os2-debug, but debug (which is the same as dos-debug > > and os2-debug). os2-debug would have to be called explicitly. > > I didn't realise you could equate targets like debug and dos-debug on the > same line like that, but I still don't see how the debug target triggers > os2-debug. As Henry already write: It does _not_ trigger os2-debug. "make debug" just results in make calling "make all 'CFLAGS=-g -O -Wall' LDFLAGS=" as listed in the beginning of your makefile snippet and that's it. "os2-debug : dos-debug" is only there so that you don't get an error message if you call "make os2-debug" (in analogy to "make os2-release") and results in the same rule being executed as if you simply called "make dos-debug" or "make debug" or simply "make". > It looks to me like 'os2-debug' has a dependency on 'dos-debug' > not the other way round. I'm obviously missing something here. No, that's completely correct, you aren't missing anything. Again, it does _not_ make "os2-debug". Regards, Stefan **= Email 2 ==========================** Date: Sun, 31 Oct 2004 09:16:23 -0500 (EST) From: Thomas Dickey Subject: Re: Removing RO during 'tar -x' On Sun, 31 Oct 2004, John Poltorak wrote: > On Sat, Oct 30, 2004 at 07:28:46PM -0400, Thomas Dickey wrote: > > On Sat, 30 Oct 2004, John Poltorak wrote: > > > > > Is there any way of removing RO attributes from files while extracting > > > them from a tar file? > > > > after extracting, I'd do > > > > chmod -R u+x . I should have said "u+w" (brain did, fingers fumbled) > I currently have this > > chmod -R a+w * For a single directory, on OS/2 that's equivalent. The "-R" option is for subdirectories. > Not sure if that is materially different to what you have, but I thought > tar may have some built in option for changing attributes. The reason I > wanted to change the command above was because of the amount of time it > takes when proessing something like a Mozilla diretory tree. Not sure why > it takes as long as it does. Maybe it would be quicker running the command > against files which needed it since few are likely to be RO, although I > can't think how to change only the files which need changing. I can't either - efficiently - since the program would still have to find the files that need changing, which would take time. You could do something like (untested) find . -perm -200 -exec chmod +w {} \; but that would be slow since it invokes a separate chmod process for each file that's modified. I usually use my directory editor for chmod's like that. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net **= Email 3 ==========================** Date: Sun, 31 Oct 2004 15:50:33 +0000 From: John Poltorak Subject: Ghostscript On Sat, Oct 30, 2004 at 01:25:50AM +0200, Christian Hennecke wrote: > I'm trying to compile Ghostscript 8.14 with support for XFree86/OS2 4.4 > using gcc 3.0.3. I managed to build the required gsos2.exe and > gsdll2.dll. See: > > http://www.os2world.com/os2files/files/gs8.14-xfree86os2.zip > > I used the standard options. Are there any options for devices, etc. > that are worth changing? > > These versions cannot be used with the standard GSView. They load, but > GSView will lockup hard shortly afterwards. There was some trick to > avoid this but I can't remember. Can anybody enlighten me? > > When using Alexander's build of gv.exe, PS files display fine. But it > won't load PDFs. Either I get a cryptic message about "invalid file > access" before gv.exe even noticed how many pages the PDF has, or it > displays the number of pages but the cursor remains in the "clock" > state forever. > > BTW, gv.exe seems to have some problems with XFree86/OS2 4.4 or > whatever toolkit it uses. Instead of listing some menu choices (e.g., > the filters in the file open dialog) correctly, they are displayed in > one row. Looks like a problem with line termination. Can anybody > confirm this? I don't have an answer, just wondered how easy it was to build this on OS/2... Are any OS/2 patches required? > Christian Hennecke > -- John **= Email 4 ==========================** Date: Sun, 31 Oct 2004 17:19:53 +0100 From: "Mikkel C. Simonsen" Subject: Re: Ghostscript John Poltorak skrev: > I don't have an answer, just wondered how easy it was to build this on > OS/2... Are any OS/2 patches required? Build what? GhostScript or GV? GhostScript is no problem at all. Download the source, make a few changes to os2.mak and run nmake src\os2.mak Best regards, Mikkel C. Simonsen **= Email 5 ==========================** Date: Sun, 31 Oct 2004 22:13:36 +0000 From: John Poltorak Subject: GCC 3.3.4 problem I'm looking to get gcc 3.3.4 integrated into UX2BS in place of 2.8.1. The first app I tried building was PDKSH which failed with these errors:- makefile:158: warning: overriding commands for target `TAGS' makefile:155: warning: ignoring old commands for target `TAGS' gcc -c -DHAVE_CONFIG_H -I. -I. -O -DOS2 os2.c In file included from os2.c:8: sh.h:91: error: conflicting types for `strncasecmp' t:/usr/include/strings.h:55: error: previous declaration of `strncasecmp' os2.c: In function `ksh_execve': os2.c:280: error: `_emx_env' undeclared (first use in this function) os2.c:280: error: (Each undeclared identifier is reported only once os2.c:280: error: for each function it appears in.) make: *** [os2.o] Error 1 makefile:158: warning: overriding commands for target `TAGS' makefile:155: warning: ignoring old commands for target `TAGS' ../mkinstalldirs t:/usr/bin t:/usr/share/man/man1 mkdir t:/usr/share/man mkdir t:/usr/share/man/man1 gcc -c -DHAVE_CONFIG_H -I. -I. -O -DOS2 os2.c In file included from os2.c:8: sh.h:91: error: conflicting types for `strncasecmp' t:/usr/include/strings.h:55: error: previous declaration of `strncasecmp' os2.c: In function `ksh_execve': os2.c:280: error: `_emx_env' undeclared (first use in this function) os2.c:280: error: (Each undeclared identifier is reported only once os2.c:280: error: for each function it appears in.) make: *** [os2.o] Error 1 Should I expect to find 'emx_env' in this new environment? If not, what do I do about this error? -- John **= Email 6 ==========================** Date: Sun, 31 Oct 2004 13:51:17 -0800 From: "Dave Yeo" Subject: Re: Posix/2 sys\select.h & NBBY On Wed, 27 Oct 2004 22:37:46 +0100, Stefan.Neis at t-online.de wrote: >Now, if somebody manages to compile XFree86 and a couple of >libraries with that compiler, I'm ready to forget about EMX+Posix/2, I tried to compile X.org (which is pretty close to XFree86) with GCC-3.3.4-alpha2.zip and the make died right away after building imake.exe and trying to run imake with a segmentation fault in imake. Dave **= Email 7 ==========================** Date: Sun, 31 Oct 2004 23:26:55 +0000 From: John Poltorak Subject: Re: Posix/2 sys\select.h & NBBY On Sun, Oct 31, 2004 at 01:51:17PM -0800, Dave Yeo wrote: > On Wed, 27 Oct 2004 22:37:46 +0100, Stefan.Neis at t-online.de wrote: > > >Now, if somebody manages to compile XFree86 and a couple of > >libraries with that compiler, I'm ready to forget about EMX+Posix/2, > > I tried to compile X.org (which is pretty close to XFree86) with GCC-3.3.4-alpha2.zip and > the make died right away after building imake.exe and trying to run imake with a > segmentation fault in imake. I can't help thinking we have a lot of work to do in getting gcc 3.3.4 to play nicely with scores of existing apps. > Dave -- John **= Email 8 ==========================** Date: Sun, 31 Oct 2004 23:39:42 +0100 From: Stefan.Neis at t-online.de Subject: Re: GCC 3.3.4 problem Hi, > makefile:158: warning: overriding commands for target `TAGS' > makefile:155: warning: ignoring old commands for target `TAGS' > gcc -c -DHAVE_CONFIG_H -I. -I. -O -DOS2 os2.c > In file included from os2.c:8: > sh.h:91: error: conflicting types for `strncasecmp' Check if config.h has something like HAVE_STRNCASECMP and if yes, #define that to 1 instead of #undef'ing it. > t:/usr/include/strings.h:55: error: previous declaration of `strncasecmp' > os2.c: In function `ksh_execve': > os2.c:280: error: `_emx_env' undeclared (first use in this function) > os2.c:280: error: (Each undeclared identifier is reported only once > os2.c:280: error: for each function it appears in.) > make: *** [os2.o] Error 1 > > Should I expect to find 'emx_env' in this new environment? Probably not. You might remember that EMX is targetting DOS and OS/2 and Window, and _emx_env gives information about what environment a given executable is running on. Since Innotek's compilation environment is targetting OS/2 only, _emx_env is irrelevant. If its value is checked somewhere, it's probably safe to assume that it's 0x0200 (i.e. "runnning under OS/2 without filename truncation"). Regards, Stefan **= Email 9 ==========================** Date: Sun, 31 Oct 2004 23:40:46 +0100 From: Stefan.Neis at t-online.de Subject: Re: Posix/2 sys\select.h & NBBY Hi, > I tried to compile X.org (which is pretty close to XFree86) with GCC-3.3.4-alpha2.zip and > the make died right away after building imake.exe and trying to run imake with a > segmentation fault in imake. :-( Anyway, thanks for the information. Stefan **= Email 10 ==========================** Date: Sun, 31 Oct 2004 23:44:49 +0100 From: Stefan.Neis at t-online.de Subject: Re: Posix/2 sys\select.h & NBBY Hi, > I can't help thinking we have a lot of work to do in getting gcc 3.3.4 > to play nicely with scores of existing apps. We sure do need to remove/revise a lot of the existing hacks added specifically for OS/2... And then, there always is code which is written for the specifics of EMX which just won't work with a different runtime without major surgery, but I don't think there will be tons of code like that... Regards, Stefan **= Email 11 ==========================** Date: Mon, 1 Nov 2004 00:03:48 +0000 From: John Poltorak Subject: Re: Posix/2 sys\select.h & NBBY On Sun, Oct 31, 2004 at 11:44:49PM +0100, Stefan.Neis at t-online.de wrote: > Hi, > > > I can't help thinking we have a lot of work to do in getting gcc 3.3.4 > > to play nicely with scores of existing apps. > > We sure do need to remove/revise a lot of the existing hacks added > specifically for OS/2... > And then, there always is code which is written for the specifics of > EMX which just won't work with a different runtime without major > surgery, but I don't think there will be tons of code like that... I think one of the major problems will be handcrafted Makefiles... > Regards, > Stefan -- John **= Email 12 ==========================** Date: Sun, 31 Oct 2004 15:37:30 -0800 From: "Dave Yeo" Subject: Re: GCC 3.3.4 problem On Sun, 31 Oct 2004 22:13:36 +0000, John Poltorak wrote: >I'm looking to get gcc 3.3.4 integrated into UX2BS in place of 2.8.1. > >The first app I tried building was PDKSH which failed with these errors:- I wonder if you should be CC'ing Knut with some of these messages? IIRC he did state that he doesn't follow the list closely and to CC him Dave **= Email 13 ==========================** Date: Sun, 31 Oct 2004 15:42:05 -0800 From: "Dave Yeo" Subject: Re: Posix/2 sys\select.h & NBBY On Sun, 31 Oct 2004 23:26:55 +0000, John Poltorak wrote: >I can't help thinking we have a lot of work to do in getting gcc 3.3.4 >to play nicely with scores of existing apps. Hopefully a lot of it will be simply removnig #ifdefs, things like #define __EMX__ #define strcasecmp strnicmp #endif Which may be one of the problems with PDKSH. The real problem I see is the lack of a good a.out debugger like gdb. I wish I was knowledgeable to update gdb to work with Innoteks gcc Dave **= Email 14 ==========================** Date: Mon, 1 Nov 2004 00:48:36 +0100 From: Stefan.Neis at t-online.de Subject: Re: Posix/2 sys\select.h & NBBY Hi, > I think one of the major problems will be handcrafted Makefiles... I don't think so. At worst, there will be options that Innotek's gcc port doesn't understand. If that really becomes a problem, I think it should be relatively easy to convince Knut to "silently" ignore the option, at most giving a warning about it... It's more the stuff like adding e.g. strncasecmp to some source file "because EMX doesn't support it" which worries me... Regards, Stefan **= Email 15 ==========================** Date: Sun, 31 Oct 2004 16:03:31 -0800 (PST) From: "Steve Wendt" Subject: Re: Posix/2 sys\select.h & NBBY On Sun, 31 Oct 2004 15:42:05 -0800, Dave Yeo wrote: >The real problem I see is the lack of a good a.out debugger like gdb. I wish I >was knowledgeable to update gdb to work with Innoteks gcc The OpenWatcom debugger might work with gcc compiled binaries in the future (which most people find more useful than gdb!). ----------- "Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws." - Plato (427-347 B.C.) **= Email 16 ==========================** Date: Mon, 1 Nov 2004 01:55:46 +0100 From: Stefan.Neis at t-online.de Subject: Re: Posix/2 sys\select.h & NBBY > >The real problem I see is the lack of a good a.out debugger like gdb. I wish I > >was knowledgeable to update gdb to work with Innoteks gcc > > The OpenWatcom debugger might work with gcc compiled binaries in the future > (which most people find more useful than gdb!). But probably only for OMF format, right? So an a.out debugger is still missing. BTW, if you're working on a lot of different platforms (sparc, alpha, ppc, i86), a debugger which only works on one platform is only marginally useful as it requires learning (and remembering, which is a real problem if you use it every three or four months) too many specific details to make use of it ... Regards, Stefan **= Email 17 ==========================** Date: Sun, 31 Oct 2004 17:04:01 -0800 From: "Neil Waldhauer" Subject: Re: Posix/2 sys\select.h & NBBY On Sun, 31 Oct 2004 16:03:31 -0800 (PST), "Steve Wendt" wrote: > The OpenWatcom debugger might work with gcc compiled binaries in the future > (which most people find more useful than gdb!). I used the Watcom debugger long ago. I found remote debugging particularly useful. Is this really a possibility? I'm beginning to contemplate a port of some proprietary code from IBM CSet++ to gcc. Neil -- Neil Waldhauer, neil at blondeguy.com Real Life: that big room with the ceiling that is sometimes blue and sometimes black with little lights **= Email 18 ==========================** Date: Sun, 31 Oct 2004 17:16:02 -0800 (PST) From: "Steve Wendt" Subject: Re: Posix/2 sys\select.h & NBBY On Mon, 1 Nov 2004 01:55:46 +0100, Stefan.Neis at t-online.de wrote: >> The OpenWatcom debugger might work with gcc compiled binaries in the >> future (which most people find more useful than gdb!). > >But probably only for OMF format, right? So an a.out debugger is >still missing. I don't know the details... >BTW, if you're working on a lot of different platforms >(sparc, alpha, ppc, i86), a debugger which only works on one >platform is only marginally useful as it requires learning (and >remembering, which is a real problem if you use it every three or >four months) too many specific details to make use of it ... That's true! OpenWatcom does have some PPC support, though (Watcom was planning to support OS/2 for PPC). ----------- "Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws." - Plato (427-347 B.C.) **= Email 19 ==========================** Date: Mon, 1 Nov 2004 11:22:31 +0000 From: John Poltorak Subject: Re: Removing RO during 'tar -x' On Sun, Oct 31, 2004 at 09:16:23AM -0500, Thomas Dickey wrote: > > Not sure if that is materially different to what you have, but I thought > > tar may have some built in option for changing attributes. The reason I > > wanted to change the command above was because of the amount of time it > > takes when proessing something like a Mozilla diretory tree. Not sure why > > it takes as long as it does. Maybe it would be quicker running the command > > against files which needed it since few are likely to be RO, although I > > can't think how to change only the files which need changing. > > I can't either - efficiently - since the program would still have to > find the files that need changing, which would take time. You could > do something like (untested) > > find . -perm -200 -exec chmod +w {} \; > > but that would be slow since it invokes a separate chmod process for each > file that's modified. I usually use my directory editor for chmod's like > that. On OS/2 you can run this command to find which files are RO;- dir /a:r /s /b Is there a Unix equivalent whose result could be fed to chmod? > -- > Thomas E. Dickey > http://invisible-island.net > ftp://invisible-island.net -- John **= Email 20 ==========================** Date: Mon, 1 Nov 2004 11:40:32 +0000 From: John Poltorak Subject: Re: GCC 3.3.4 problem On Sun, Oct 31, 2004 at 11:39:42PM +0100, Stefan.Neis at t-online.de wrote: > Hi, > > > makefile:158: warning: overriding commands for target `TAGS' > > makefile:155: warning: ignoring old commands for target `TAGS' > > gcc -c -DHAVE_CONFIG_H -I. -I. -O -DOS2 os2.c > > In file included from os2.c:8: > > sh.h:91: error: conflicting types for `strncasecmp' > > Check if config.h has something like HAVE_STRNCASECMP and if yes, > #define that to 1 instead of #undef'ing it. config.h does not contain this string. What I need to do currently under gcc 2.8.1 is to add -Dstrncasecmp=strnicmp -Dstrcasecmp=stricmp to CFLAGS. > > t:/usr/include/strings.h:55: error: previous declaration of `strncasecmp' > > os2.c: In function `ksh_execve': > > os2.c:280: error: `_emx_env' undeclared (first use in this function) > > os2.c:280: error: (Each undeclared identifier is reported only once > > os2.c:280: error: for each function it appears in.) > > make: *** [os2.o] Error 1 > > > > Should I expect to find 'emx_env' in this new environment? > > Probably not. You might remember that EMX is targetting DOS and OS/2 > and Window, and _emx_env gives information about what environment > a given executable is running on. Since Innotek's compilation > environment is targetting OS/2 only, _emx_env is irrelevant. If its > value is checked somewhere, it's probably safe to assume that it's > 0x0200 (i.e. "runnning under OS/2 without filename truncation"). This is a line of code in os2.c:- if (_emx_env & 0x1000) { /* RSX, do best we can do. */ What is the best way of getting round it? > Regards, > Stefan -- John **= Email 21 ==========================** Date: Mon, 1 Nov 2004 11:49:10 +0000 From: John Poltorak Subject: AM_WITH_REGEX macro AM_WITH_REGEX looks as though it should add the option to build with an external regex library when running configure, but I'm not sure how to get autoconf to recognise it - I presume it is a macro which should be in configure.in... Do I need anything else in the file apart from including the name of the macro? -- John **= Email 22 ==========================** Date: Mon, 1 Nov 2004 12:33:38 +0100 From: Stefan.Neis at t-online.de Subject: Re: GCC 3.3.4 problem Hi, > config.h does not contain this string. What I need to do currently under > gcc 2.8.1 is to add > > -Dstrncasecmp=strnicmp -Dstrcasecmp=stricmp > > to CFLAGS. So omitting those when using Innotek's libc should help. > This is a line of code in os2.c:- > > if (_emx_env & 0x1000) { /* RSX, do best we can do. */ > > > What is the best way of getting round it? According to emx' documentation 0x1000 indicates that it's running under RSX which will never be the case for stuff compiled with Innotek, so "if (0) {" (or removing the whole block of RSX-code) seems like a good solution. Regards, Stefan **= Email 23 ==========================** Date: Mon, 01 Nov 2004 11:38:51 +0000 (GMT) From: "Dave Saville" Subject: Re: Removing RO during 'tar -x' On Mon, 1 Nov 2004 11:22:31 +0000, John Poltorak wrote: >Is there a Unix equivalent whose result could be fed to chmod? ls -l |grep ^^..-|cut -c 34-|xargs chmod +w :-) List files with attributes find lines that start with "any char" "any char" "-" i.e. is read only Cut out the file name Pump whats left into xargs which runs one chmod across all files found. -- Regards Dave Saville