Date: Sun, 23 May 2004 00:04:19 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 384 ************************************************** Saturday 22 May 2004 Number 384 ************************************************** Subjects for today 1 Re: posix threads library : John Poltorak 2 Re: posix threads library : Stefan.Neis at t-online.de 3 Re: posix threads library : Jon Saxton" 4 Re: posix threads library : Dave Yeo" 5 Re: posix threads library : John Poltorak 6 GNUPLOT : John Poltorak 7 Shell scripting : Lyn St George" **= Email 1 ==========================** Date: Fri, 21 May 2004 16:39:38 +0100 From: John Poltorak Subject: Re: posix threads library On Thu, May 20, 2004 at 05:35:37PM -0400, Jon Saxton wrote: > I have just built the posix threads library from the xine/netlabs sources > (http://www.reamined.on.ca/doconnor/xine/xinepthread.zip) as suggested by JP. Is there much involved in this? I think I ought to include pthreads in UX2BS but prefer to build apps from source if possible. > During the process I found that most of the source files had a ^Z at the end > (which caused gcc to report an error) and a few did not end in a LF (which > caused gcc to emit a warning). After correcting few of these in the editor I > wrote a little program to fix the files which needed it. Wouldn't utility like DOS2UNIX sort out the problems? > Question: Is this a common problem? Different formats for line endings are a perennial problem, but I guess everyone has their own way of dealing with them. Handling newlines would probably be a good subject for a FAQ. > -- > Jon Saxton Developer of cross-platform software for UNIX, Windows and OS/2 > U.S. agent for Triton Technologies International Ltd > http://www.triton.vg/ -- John **= Email 2 ==========================** Date: Fri, 21 May 2004 17:57:06 +0100 From: Stefan.Neis at t-online.de Subject: Re: posix threads library Hi, > Is there much involved in this? I think I ought to include pthreads in > UX2BS but prefer to build apps from source if possible. My main problem is that it is EMX specific, i.e. when trying to integrate it with/into Innotek's libc, you probably need to heavily modify the existing code, so for the time being, I'd rather not waste time on it... Regards, Stefan **= Email 3 ==========================** Date: Fri, 21 May 2004 14:49:06 -0400 From: "Jon Saxton" Subject: Re: posix threads library ** Reply to note from John Poltorak on Fri, 21 May 2004 16:39:38 +0100 > On Thu, May 20, 2004 at 05:35:37PM -0400, Jon Saxton wrote: > > I have just built the posix threads library from the xine/netlabs sources > > (http://www.reamined.on.ca/doconnor/xine/xinepthread.zip) as suggested by JP. > > Is there much involved in this? I think I ought to include pthreads in > UX2BS but prefer to build apps from source if possible. There are some issues outstanding but basically there was nothing more complicated than issuing "make". The source needs to be unpacked into /emx/src/pthreads because there are path-relative includes. That may not be consistent with the unix-os2 build philosophy. Also, the makefiles use deprecated constructs (-m486 instead of -mcpu=i486 or -march=i486) (and in any case I built for i686 on the grounds that most people have at least that nowadays). "make install" wants to put the end products into /usr/lib, /usr/dll and /usr/include instead of /emx/... . While that may be more UNIXy, and where xine expects to find stuff, it is not generally consistent with the emx-gcc environments that I've seen. These are pretty minor issues but there's another that I have not yet resolved, namely that "make test" fails with a missing DLL. The DLL isn't built in the main phase. If I recall correctly, it is because of duplicate exports. > > During the process I found that most of the source files had a ^Z at the end > > (which caused gcc to report an error) and a few did not end in a LF (which > > caused gcc to emit a warning). After correcting few of these in the editor I > > wrote a little program to fix the files which needed it. > > Wouldn't utility like DOS2UNIX sort out the problems? Running such a utility, possibly followed by its converse, may solve the ^Z issue but I don't know that it would insert a LF at the end of a file which lacks one. > > Question: Is this a common problem? > > Different formats for line endings are a perennial problem, but I guess > everyone has their own way of dealing with them. > > Handling newlines would probably be a good subject for a FAQ. The CR-LF vs LF dichotomy is well known. The ^Z issue antedates CP/M but should have died out in the mid eighties. Twenty years later I am a bit surprised to find those at the end of the source files, apparently put there or at least tolerated by the xine group. Very strange. I'll get back to the outstanding pthreads issues in a few days. -- Jon Saxton Developer of cross-platform software for UNIX, Windows and OS/2 U.S. agent for Triton Technologies International Ltd http://www.triton.vg/ **= Email 4 ==========================** Date: Fri, 21 May 2004 19:21:09 -0800 From: "Dave Yeo" Subject: Re: posix threads library On Fri, 21 May 2004 17:57:06 +0100, Stefan.Neis at t-online.de wrote: > Hi, > >> Is there much involved in this? I think I ought to include pthreads in >> UX2BS but prefer to build apps from source if possible. > >My main problem is that it is EMX specific, i.e. when trying to integrate >it with/into Innotek's libc, you probably need to heavily modify the >existing code, so for the time being, I'd rather not waste time on it... On the other hand pthreads are used by things like glib and it is a lot easier to use pthreads the n write OS/2 threading support. Dave **= Email 5 ==========================** Date: Sat, 22 May 2004 12:03:45 +0100 From: John Poltorak Subject: Re: posix threads library On Fri, May 21, 2004 at 07:21:09PM -0800, Dave Yeo wrote: > On Fri, 21 May 2004 17:57:06 +0100, Stefan.Neis at t-online.de wrote: > > > Hi, > > > >> Is there much involved in this? I think I ought to include pthreads in > >> UX2BS but prefer to build apps from source if possible. > > > >My main problem is that it is EMX specific, i.e. when trying to integrate > >it with/into Innotek's libc, you probably need to heavily modify the > >existing code, so for the time being, I'd rather not waste time on it... > > On the other hand pthreads are used by things like glib and it is a lot easier to use pthreads the n write OS/2 threading support. Do I need pthreads to build glib? No wonder my build didn't succeed. > Dave -- John **= Email 6 ==========================** Date: Sat, 22 May 2004 12:42:24 +0100 From: John Poltorak Subject: GNUPLOT Does anyone know if GNUPLOT builds easily on OS/2? Apparently v4.0 has been released recently and the OS/2 version now includes mouse support, although I'm not sure if the standard distribution includes OS/2 support. I guess I should give it a try. The source is available from:- http://prdownloads.sourceforge.net/gnuplot/gnuplot-4.0.0.tar.gz?download -- John **= Email 7 ==========================** Date: Sat, 22 May 2004 13:41:10 +0100 (BST) From: "Lyn St George" Subject: Shell scripting Hallo all I'm hoping that there are some shell scripting gurus here who would tell me how to get this one working. I've updated Newtware's which.exe again so that 'which -t foo' returns 0 if foo is not on the path (ditto for -tl on the libpath and -ti on the include path) so it can be used in this script. (pseudo code, either cmd.exe or ksh.exe shell) which -t foo if (return value == 0) then call build_foo.cmd & echo "Installing foo" else echo "You have foo as 'which -s' " exit Many TIA Lyn St George