Date: Tue, 18 Jan 2005 00:04:21 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 505 ************************************************** Monday 17 January 2005 Number 505 ************************************************** Subjects for today 1 Re: tar zxf : Stefan.Neis at t-online.de 2 Re: OpenSSL update : John Poltorak 3 Python, OS/2, Chemical Engineering : John Poltorak 4 Re: wchar.h and innotek_libc : Andy Willis 5 Re: Date coversion using GNU Date : Anton Monroe 6 Re: tar zxf : Dave Yeo" 7 Calculations in a shell script : John Poltorak 8 Re: zlib : Dave Yeo" 9 Re: Calculations in a shell script : Steven Levine" 10 Re: Python v2.4 : Andrew MacIntyre 11 expr 1 * 2 -> syntax error : John Poltorak 12 Re: expr 1 * 2 -> syntax error : Illya Vaes **= Email 1 ==========================** Date: Sun, 16 Jan 2005 15:27:05 +0100 From: Stefan.Neis at t-online.de Subject: Re: tar zxf ** Reply to note from John Poltorak Sun, 16 Jan 2005 12:27:08 +0000 > > > Is there any difference in terms of performance or funcionality between > running:- > > > tar zxf archivefile.tgz > > and > > gzip -d archivefile.tgz | tar xf - Well, the first definitely requires GNU tar, while the second will work with any tar program (including star, Solaris built-in tar, BSD tar). Otherwise, I don't think there really is a big difference, i.e. I believe the first thing is ending up doing just the same as the second... Regards, Stefan **= Email 2 ==========================** Date: Sun, 16 Jan 2005 15:34:30 +0000 From: John Poltorak Subject: Re: OpenSSL update On Sat, Jan 15, 2005 at 01:10:13PM +1000, Brian Havard wrote: > On Fri, 14 Jan 2005 22:10:01 +0100, Stefan.Neis at t-online.de wrote: > >match the list of defined symbols. Since the later seems to be > >generated, I guess somebody (Brian?) forgot to include updates > >for util\pl\OS2-EMX.pl (or a similar file) when submitting some > >other changes - I suppose those problems will be updated over > >the next couple of days... > > ???? > I just built a clean checkout of the OpenSSL_0_9_7-stable branch & it built > without error. Are you building that or HEAD (0.9.8)? Brian, I noticed your name among the changes of v0.9.7e. Should we see you as the OS/2 maintainer of OpenSSL? I know you do a lot keeping us uptodate with Apache and PHP among other appsand this is much appreciated, but it would be nice to have someone nominally looking after our interests wrt OpenSSL. > -- > ______________________________________________________________________________ > | Brian Havard | "He is not the messiah! | > | brianh at kheldar.apana.org.au | He's a very naughty boy!" - Life of Brian | > ------------------------------------------------------------------------------ > -- John **= Email 3 ==========================** Date: Sun, 16 Jan 2005 15:42:16 +0000 From: John Poltorak Subject: Python, OS/2, Chemical Engineering Interesting website, although a little old :- http://www.sschwarzer.net/ -- John **= Email 4 ==========================** Date: Sun, 16 Jan 2005 10:51:31 -0700 From: Andy Willis Subject: Re: wchar.h and innotek_libc lsunley at mb.sympatico.ca wrote: >In <20050116041843.1C0B6D3F99 at generation.lgisp.net>, on 01/15/05 > at 08:19 PM, "Dave Yeo" said: > > > >>Hi has anyone got any of the functions in wchar.h to link? Twice in the >>last 2 days I've had source (wget-cvs and bsdtar) fail in old emx due to >>wchar.h. In both cases they compile under Innotek_libc but fail to link. >>While some of the failures are due to not being implemented yet (&todo) >>others such as wcscmp look like they are implemented but aren't locatable >>in /usr/lib and produce undefined symbol errors Dave >> >> > >AFAIK Knut was working on some of that for beta 3 of LIBC > > > > The wide stuff (which I think wcscmp falls into) is on the todo list... I had an issue building coreutils. I didn't have that problem with 3.3.5 b1 but did with b2 so I think enough got implemented that it is seen by configure as being there but fails on the link. Knut said it was on the todo list but as busy as he is there is no way to know when he can finish it. **= Email 5 ==========================** Date: Sun, 16 Jan 2005 12:41:24 -0600 From: Anton Monroe Subject: Re: Date coversion using GNU Date On Sun, Jan 16, 2005 at 12:13:13PM +0000, John Poltorak wrote: > > I think what you want is: > > date +%Y:%m:%d:%H:%M:%S --date="1/1/1970 +1105707584 seconds" > > Many thanks for that. It isn't too intuitive and I don't see it mentioned > in any docs. Just wondered how you worked that out... It isn't supposed to be intuitive, it's Unix. You don't need the + in front of the seconds, it just makes it look slightly more sensible to me. What baffled me was why date +%s --date='1970-01-01 00:00:00' told me that the beginning of 1970 is 21600 seconds after the beginning of 1970. (It's my timezone difference.) The info file has an 'Examples' section that tells how to convert to/from seconds since 1970. Anton **= Email 6 ==========================** Date: Sun, 16 Jan 2005 12:35:42 -0800 From: "Dave Yeo" Subject: Re: tar zxf On Sun, 16 Jan 2005 15:27:05 +0100, Stefan.Neis at t-online.de wrote: > >Well, the first definitely requires GNU tar, while the second will >work with any tar program (including star, Solaris built-in tar, >BSD tar). Otherwise, I don't think there really is a big difference, >i.e. I believe the first thing is ending up doing just the same as >the second... The BSD tar I tried building yesterday had dependencies on libz and libbz2. BTW tried building bzip2-1.0.1 on innotek_libc and it failed the tests Dave **= Email 7 ==========================** Date: Sun, 16 Jan 2005 21:15:34 +0000 From: John Poltorak Subject: Calculations in a shell script I'm trying to write a simple shell script which will evaluate whether a file is over six hours old, based on a line in the file which has the timestamp of the file. The relevant line is the second one in the file and has a value such as this:- T1105805631 Given that I have the timestamp of the file in seconds and can get the current time in seconds, then I want to do something like if t0 - t1 > 6 * 60 * 60 then del file. I want to do something like:- # /bin/sh t0=`date +%s` for x in (q*) do t1=`sed -n '2s/^T//p'` if $t0 - $t1 > 6 * 60 * 60; then rm $x done Can anyone suggest how this ought to be done? -- John **= Email 8 ==========================** Date: Sun, 16 Jan 2005 13:46:50 -0800 From: "Dave Yeo" Subject: Re: zlib On Sun, 16 Jan 2005 08:53:31 +0000, John Poltorak wrote: >On Fri, Jan 14, 2005 at 09:56:55AM -0800, Dave Yeo wrote: >> On Fri, 14 Jan 2005 16:22:11 +0000, John Poltorak wrote: >> >> >But can you build it? >> >> Yes > >Any clues? Going the configure, make route almost works. The problem I had was that configure tested for mmap.h and attempted to use mmap. On OS/2 mmap is a library so I had to add -mmap to ldflags in the makefile. I have a makefile and def file that builds a backwards compatible Z.DLL as well. I would like to extend this to also build a ZLIB1.DLL which imports by name instead of ordinal and encourage people to link against ZLIB1.DLL. Ideally for this is to use the DEF file in the win32 directory by adding a bit more OS/2 info on the fly. By using the win32 def file zlib should continue to build with no updates. > >BTW in the zlib 1.2.2 archive there is an 'old' directory which includes >an os2 directory as well as a README which says:- > > > >This directory contains files that have not been updated for zlib 1.2.x > >(Volunteers are encouraged to help clean this up. Thanks.) Yes I'm planning on sending my updates to them. > > >It would be good to include build instructions for OS/2 within the >archive which even provides support for DOS. Is the win32\makefile.gcc a >reasonable example to follow? You know I haven't even looked at these yet. I've just been extending someone elses makefile. I'll check these out Also I'd send the makefiles but I think the list is stripping attachments now Dave **= Email 9 ==========================** Date: Sun, 16 Jan 2005 14:58:05 -0800 From: "Steven Levine" Subject: Re: Calculations in a shell script In <20050116211534.F18360 at warpix.org>, on 01/16/05 at 09:15 PM, John Poltorak said: ># /bin/sh >t0=`date +%s` > for x in (q*) > do > t1=`sed -n '2s/^T//p'` > if $t0 - $t1 > 6 * 60 * 60; then rm $x > done You will be much closer with: age=`expr $t0 - $t1` sixh=`expr 6 * 60 * 60` if [ $age -gt $sixh ] ; then rm $x ; fi This can all be done in one statement if you need to optimize. Steven -- ---------------------------------------------------------------------- "Steven Levine" MR2/ICE 2.60b #10183 Warp4/FP15/14.100c_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST) ---------------------------------------------------------------------- **= Email 10 ==========================** Date: Mon, 17 Jan 2005 08:16:27 +1000 From: Andrew MacIntyre Subject: Re: Python v2.4 John Poltorak wrote: > Now that Python v2.4 has been released should I be able to build it myself > on OS/2? > > ISTR that the OS/2 patches for v2.3.4 only consisted of a number of > Makefiles and the only source change was the addition of emx_link. > > Wouldn't same patches also work with v2.4? emx_link is included in the 2.4 source tarball, so you just need to tweak the Makefile, and if running Zope/Plone change the thread stack size as previously discussed (this will be made into a Makefile knob for the next release). -- ------------------------------------------------------------------------- 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 11 ==========================** Date: Mon, 17 Jan 2005 11:25:10 +0000 From: John Poltorak Subject: expr 1 * 2 -> syntax error I can't get expr to do multipilication! # expr 1 * 2 (null): syntax error This is under PDKSH. The other mathematical operations work fine. Have I done something really dumb here? -- John **= Email 12 ==========================** Date: Mon, 17 Jan 2005 11:46:10 GMT From: Illya Vaes Subject: Re: expr 1 * 2 -> syntax error >I can't get expr to do multipilication! ># expr 1 * 2 >This is under PDKSH. The other mathematical operations work fine. * is the wildcard that _the shell_ expands to all the files in the current working directory _before_ it starts expr and hands it the arguments. You should quote what you give to a program, eg. # expr '1 * 2' or # expr 1 \* 2 In the first case, expr gets only 1 argument (1_*_2), in the second case it gets three (the literals '1', '*' and '2').