From: UnixOS2 Archive To: "UnixOS2 Archive" Date: Mon, 31 Mar 2003 05:00:57 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 87 ************************************************** Sunday 30 March 2003 Number 87 ************************************************** Subjects for today 1 Re: OT code page conversions : Steven Levine" 2 Postgres : John Poltorak 3 Building Perl with gcc v3.2.1 : John Poltorak 4 Strange Makefile entry for M4 : John Poltorak 5 Re: LDAP : Stefan Neis 6 Re: BSD installations [was: Building Python] : Stefan Neis 7 OT code page conversions : Dave Saville" 8 Re: Building Perl with gcc v3.2.1 : Henry Sobotka 9 Nistime : John Poltorak 10 Re: Building Perl with gcc v3.2.1 : John Poltorak 11 Re: BSD installations [was: Building Python] : Dave and Natalie" 12 Re: Strange Makefile entry for M4 : Andreas Buening 13 Re: Nistime : John Poltorak 14 Re: Nistime : Tobias Huerlimann" **= Email 1 ==========================** Date: Mon, 31 Mar 2003 08:56:08 -0800 From: "Steven Levine" Subject: Re: OT code page conversions In <20030331111904.VYOU6166.mta01-svc.ntlworld.com at pooh>, on 03/31/03 at 12:14 PM, "Dave Saville" said: >Anyone know if gcc can do code page conversions? I found some info in the >warp toolkit on iconv - but it appears to be Visual Age C++. A Goggle search for: iconv gcc implies the gcc library supports iconv(). Steven -- --------------------------------------------------------------------- "Steven Levine" MR2/ICE 2.35 #10183 Warp4/FP15/14.085_W4 www.scoug.com irc.webbnet.org #scoug (Wed 7pm PST) --------------------------------------------------------------------- **= Email 2 ==========================** Date: Mon, 31 Mar 2003 08:57:05 +0000 From: John Poltorak Subject: Postgres A new version of Postgres (7.3.2) is now available from:- http://www.ecomstation.it/postgres/ -- John **= Email 3 ==========================** Date: Mon, 31 Mar 2003 09:12:15 +0000 From: John Poltorak Subject: Building Perl with gcc v3.2.1 --K7xIEzypd/DixUjb Content-Type: text/plain; charset=us-ascii I'm forwarding a reply I got from IlyaZ to a post I made on USENET about building Perl with gcc 3.2.1. Maybe someone can explain to me what he means... -- John --K7xIEzypd/DixUjb Content-Type: message/rfc822 Received: from Math.Berkeley.EDU by mail.warpix.org (IBM OS/2 SENDMAIL VERSION 2.03/2.0) id WAA461.05; Sun, 30 Mar 2003 22:47:06 GMT Received: from powdermilk.math.berkeley.edu (powdermilk.Math.Berkeley.EDU [169.229.140.13]) by Math.Berkeley.EDU (8.12.8/8.12.8) with ESMTP id h2UMkxeB023707; Sun, 30 Mar 2003 14:46:59 -0800 (PST) Received: (from ilya at localhost) by powdermilk.math.berkeley.edu (8.9.3/8.9.3) id OAA03076; Sun, 30 Mar 2003 14:46:55 -0800 (PST) Date: Sun, 30 Mar 2003 14:46:55 -0800 (PST) Message-Id: <200303302246.OAA03076 at powdermilk.math.berkeley.edu> To: John Poltorak Newsgroups: comp.os.os2.programmer.misc,comp.os.os2.programmer.porting Subject: Re: Building Perl with gcc v3.2.1 References: <1049037862.496376 at ananke.eclipse.net.uk> Sender: Ilya Zakharevich From: Ilya Zakharevich Organization: U.C. Berkeley Math. Department. X-How-To-Reach-Me: The From: address is valid X-How-To-Disable-Cc: Put in the headers the line: Mail-Copies-To: never [A complimentary Cc of this posting was sent to John Poltorak ], who wrote in article <1049037862.496376 at ananke.eclipse.net.uk>: > Has anyone succeeded in building Perl using gcc v3.2.1? > > Apparently the latest gcc will not create OBJ files called .obj and this > is likely to comptelely mess up the way Perl is built on OS/2. I never checked that make aout_perl will work without first doing make (some dependencies may be missing), but one can always try. Moreover, I think I left the logic in hints/os2.sh to build aout by default... Hope this helps, Ilya --K7xIEzypd/DixUjb-- **= Email 4 ==========================** Date: Mon, 31 Mar 2003 10:11:45 +0000 From: John Poltorak Subject: Strange Makefile entry for M4 When building m4 there is a strange looking command executed as part of make install... This is what actually occurs:- /bin/sh ./../mkinstalldirs /usr/local/bin u:/unixos2/bin/install.exe m4.exe /usr/local/bin/`echo m4.exe | sed 's,x,x,'` make[1]: Leaving directory `U:/unixos2/workdir/m4-1.4/src' The Makefile contains:- transform = s,x,x, ... ... install: all $(mkinstalldirs) $(bindir) $(INSTALL_PROGRAM) m4$(EXEEXT) $(bindir)/`echo m4$(EXEEXT) | sed '$(transform)'` I haven't seen anything like this before and don't understand what is going on. Can anyone explain it? m4.exe does not get installed in the target directory. -- John **= Email 5 ==========================** Date: Mon, 31 Mar 2003 10:56:55 +0200 (CEST) From: Stefan Neis Subject: Re: LDAP > Does anyone know much about LDAP? > > AFAIK, there is an OpenLDAP project. Can this be ported to OS/2? There's a longish list of prerequisites (especially a particular version of SleepyCat's DB) but once everything is available, porting OpenLDAP should be relatively easy - at least it compiled without problems not only on Linux but also on Solaris, which implies that it's more portable than the average Linux code. ;-) Regards, Stefan -- Micro$oft is not an answer. It is a question. The answer is 'no'. **= Email 6 ==========================** Date: Mon, 31 Mar 2003 11:03:20 +0200 (CEST) From: Stefan Neis Subject: Re: BSD installations [was: Building Python] On Sun, 30 Mar 2003, Tobias Huerlimann wrote: > I have to admit that the fdisk/disklabel steps (the first > two major parts of the OpenBSD install script) can be nasty if one's doing > that for the first time. That's exactly where I lost hours (particularaly because I had to restart from scratch, when my partioning turned out to be "suboptimal") while on FreeBSD I could just choose "set reasonable default values" and those steps were done within seconds. But I have to agree that _after_ that, OpenBSD leaves less room for errors. (And by now (since disklabel doesn't scare me anymore), OpenBSD would be the BSD of my choice for its security policy...). Regards, Stefan **= Email 7 ==========================** Date: Mon, 31 Mar 2003 12:14:25 +0100 (BST) From: "Dave Saville" Subject: OT code page conversions Anyone know if gcc can do code page conversions? I found some info in the warp toolkit on iconv - but it appears to be Visual Age C++. TIA -- Regards Dave Saville **= Email 8 ==========================** Date: Mon, 31 Mar 2003 16:45:12 -0500 From: Henry Sobotka Subject: Re: Building Perl with gcc v3.2.1 John Poltorak wrote: > > I'm not all that well clued up on these things, but I thought there was a > problem in creating OBJ files called .obj, which, AIUI is what Perl > expects. Perl uses the two extensions, .obj and .o, to distinguish between an OMF and aout build, and for this relies on pre-3.x gcc's behavior of automatically producing foo.obj when -Zomf is specified. With gcc 3.x, unless the output filename is specified with -o, it produces foo.o regardless of whether or not -Zomf is used. This means that -o $ at has to be added to a couple spots in the Perl build machinery for gcc 3.x. h~ **= Email 9 ==========================** Date: Mon, 31 Mar 2003 19:07:32 +0000 From: John Poltorak Subject: Nistime NISTIME is an Open Source program for updating your PC clock from a list of time servers. It's available here with included source:- http://hobbes.nmsu.edu/pub/os2/apps/internet/time/nistime2.zip Unfortunately it only comes with a Makefile for VAC++. Can anyone convert it so it works with gcc ? -- John **= Email 10 ==========================** Date: Mon, 31 Mar 2003 19:58:04 +0000 From: John Poltorak Subject: Re: Building Perl with gcc v3.2.1 On Tue, Apr 01, 2003 at 12:27:25AM +1000, Andrew MacIntyre wrote: > On Mon, 31 Mar 2003, John Poltorak wrote: > > Were you asking if AndyZ's gcc 3.2.1 could produce OMF objects? I'm not all that well clued up on these things, but I thought there was a problem in creating OBJ files callled .obj, which, AIUI is what Perl expects. > I was able to build Python 2.3a2 (which uses an OMF DLL) with it with only > 1 problem:- I needed to recompile my DB 1.85 library. Have you tried building the latest DB (4.1.25) ? > Performance was pretty good, though better with -O2 than anything higher. > > -- > 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 > -- John **= Email 11 ==========================** Date: Mon, 31 Mar 2003 20:19:33 -0800 From: "Dave and Natalie" Subject: Re: BSD installations [was: Building Python] On Mon, 31 Mar 2003 11:03:20 +0200 (CEST), Stefan Neis wrote: >On Sun, 30 Mar 2003, Tobias Huerlimann wrote: > >> I have to admit that the fdisk/disklabel steps (the first >> two major parts of the OpenBSD install script) can be nasty if one's doing >> that for the first time. > >That's exactly where I lost hours (particularaly because I had to restart >from scratch, when my partioning turned out to be "suboptimal") while on >FreeBSD I could just choose "set reasonable default values" and those >steps were done within seconds. So how do the BSDs play with other OS and bootmanager? Dave **= Email 12 ==========================** Date: Mon, 31 Mar 2003 21:09:33 +0100 From: Andreas Buening Subject: Re: Strange Makefile entry for M4 John Poltorak wrote: > > When building m4 there is a strange looking command executed as part of > make install... This is what actually occurs:- > > /bin/sh ./../mkinstalldirs /usr/local/bin > u:/unixos2/bin/install.exe m4.exe /usr/local/bin/`echo m4.exe | sed 's,x,x,'` > make[1]: Leaving directory `U:/unixos2/workdir/m4-1.4/src' > > The Makefile contains:- > > transform = s,x,x, > ... > ... > install: all > $(mkinstalldirs) $(bindir) > $(INSTALL_PROGRAM) m4$(EXEEXT) $(bindir)/`echo m4$(EXEEXT) | sed '$(transform)'` This is part of the --program-transform-name feature. That's a no op in your case. > I haven't seen anything like this before and don't understand what is > going on. Can anyone explain it? > > m4.exe does not get installed in the target directory. Do you have a m4.exe in the source directory? Bye, Andreas -- One OS to rule them all, One OS to find them, One OS to bring them all and in the darkness bind them In the Land of Mordor where the Shadows lie. **= Email 13 ==========================** Date: Mon, 31 Mar 2003 21:22:05 +0000 From: John Poltorak Subject: Re: Nistime On Mon, Mar 31, 2003 at 10:45:21PM +0100, Tobias Huerlimann wrote: > On Mon, 31 Mar 2003 19:07:32 +0000, John Poltorak wrote: > > > Can anyone convert it so it works with gcc ? > > That's too easy (see small patch and makefile below). Many thanks, I'll see if I can make use of it. > But be aware that the > daytime protocol, which this tool utilizes, is quite old (this program is at > least 10 years old). The NTP protocol is probably a better way to sync time > nowadays. Of course, it would be nice to have an OS/2 port of NTP, but I had no luck when I tried to build it. Feel free to have a try :-)... The source is available here:- http://www.ntp.org > Bye, > Tobias -- John **= Email 14 ==========================** Date: Mon, 31 Mar 2003 22:45:21 +0100 (MEZ) From: "Tobias Huerlimann" Subject: Re: Nistime -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 31 Mar 2003 19:07:32 +0000, John Poltorak wrote: > Can anyone convert it so it works with gcc ? That's too easy (see small patch and makefile below). But be aware that the daytime protocol, which this tool utilizes, is quite old (this program is at least 10 years old). The NTP protocol is probably a better way to sync time nowadays. Bye, Tobias === nistime.diff - Cut here ================================================ - --- nistime.c Mon Mar 31 22:35:36 2003 +++ nistime.patched.c Mon Mar 31 22:35:54 2003 at at -5,7 +5,7 at at /* ------------------------------ */ /* Feature test macros */ /* ------------------------------ */ - -/* #define _POSIX_SOURCE /* Always require POSIX standard */ +/* #define _POSIX_SOURCE Always require POSIX standard */ /* ------------------------------ */ /* Standard include files */ at at -22,7 +22,12 at at #include #include +#ifdef __EMX__ + #include + #include /* For close() */ +#else #include /* Will be OS/2 TCP/IP types.h file */ +#endif #include /* More TCP/IP include files */ #include /* #include */ at at -36,9 +41,14 at at /* My local typedef's and defines */ /* ------------------------------- */ +#ifdef __EMX__ + #define soclose(fd) close(fd) + #define psock_errno(s) perror(s) +#endif + #define panic SysPanic(__FILE__, __LINE__) - -#define NIST_TIME_HOST "time-a.nist.gov" +#define NIST_TIME_HOST "nist.time.gov" #define NIST_TIME_PORT 13 /* specific port */ #define UNIX_EPOCH_MJD 40587 /* UNIX epoch date */ at at -261,7 +271,9 at at -- (7) Close socket and free allocated memory ----------------------------------------------------------------- */ _tzset(); /* Get timezone from TZ */ +#ifndef __EMX__ sock_init(); /* Initialize sockets */ +#endif /* allocate a big message buffer, in case we get an oversize message */ if( (buf = calloc( BUF_SIZE, 1)) == NULL) { === nistime.diff - Cut here ================================================ === Makefile - Cut here ==================================================== TARGET = nistime.exe CC = gcc LD = gcc CFLAGS = -Zmt -Wall -O2 LDFLAGS = -Zexe -Zmt -s LIBS = -lsocket SRCS = nistime.c OBJS = $(SRCS:.c=.o) .SUFFICES: .c .o .c.o: $(CC) $(CFLAGS) -o $ at -c $< all: $(TARGET) clean: rm -f $(TARGET) $(OBJS) core $(TARGET): $(OBJS) $(LD) $(LDFLAGS) -o $ at $(OBJS) $(LIBS) === Makefile - Cut here ==================================================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (OS/2) iD8DBQE+iMUByM3Xd8YJ6q0RAuhgAKCUNStyR3mcfZmwi1S3pmzaczy8EACgm/Ae jA1cRiBb3290Kwnu9Jazjk8= =cQiX -----END PGP SIGNATURE-----