From: UnixOS2 Archive To: "UnixOS2 Archive" Date: Wed, 26 Nov 2003 14:16:05 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 252 ************************************************** Tuesday 25 November 2003 Number 252 ************************************************** Subjects for today 1 Re: getopt problem : Henry Sobotka 2 Re: getopt problem : John Poltorak 3 Re: getopt problem : Henry Sobotka 4 Re: getopt problem : John Poltorak 5 Re: conflicting types for `_getcwd2' : Stefan Neis 6 Re: getopt problem : Stefan Neis 7 Re: getopt problem : Stefan Neis 8 libcrypt : John Poltorak 9 libdl : John Poltorak 10 Re: libdl : Stefan Neis 11 Re: libdl : Stefan Neis 12 Re: libdl : John Poltorak 13 Re: Fetchmail : John Poltorak 14 Re: libdl : Yuri Dario" 15 Re: Fetchmail : Yuri Dario" **= Email 1 ==========================** Date: Wed, 26 Nov 2003 02:15:49 -0500 From: Henry Sobotka Subject: Re: getopt problem The missing const is a known EMX bug (see "Bugs" under getopt in the doc) that also appears in Posix/2. You should be able to work around it with: int getopt(nargc,nargv,ostr) int nargc; #ifdef __EMX__ char **nargv; #else char *const *nargv; #endif const char *ostr; You likely also have to similarly deconstify nargv or whatever it's called (presumably) in main(). Ugh^3! h~ **= Email 2 ==========================** Date: Wed, 26 Nov 2003 09:29:25 +0000 From: John Poltorak Subject: Re: getopt problem On Wed, Nov 26, 2003 at 02:15:49AM -0500, Henry Sobotka wrote: > The missing const is a known EMX bug (see "Bugs" under getopt in the > doc) that also appears in Posix/2. > > You should be able to work around it with: > > int > getopt(nargc,nargv,ostr) > int nargc; > #ifdef __EMX__ > char **nargv; > #else > char *const *nargv; > #endif > const char *ostr; > > You likely also have to similarly deconstify nargv or whatever it's > called (presumably) in main(). I really have no idea about how to do this... But have just noticed a section in the program which starts:- #if !SM_CONF_GETOPT /* * Copyright (c) 1985 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ /* ** this version hacked to add `atend' flag to allow state machine ** to reset if invoked by the program to scan args for a 2nd time */ # if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = " at (#)getopt.c 4.3 (Berkeley) 3/9/86"; # endif /* defined(LIBC_SCCS) && !defined(lint) */ /* ** get option letter from argument vector */ # ifdef _CONVEX_SOURCE extern int optind, opterr, optopt; extern char *optarg; # else /* _CONVEX_SOURCE */ int opterr = 1; /* if error message should be printed */ int optind = 1; /* index into parent argv vector */ int optopt = 0; /* character checked for validity */ char *optarg = NULL; /* argument associated with option */ # endif /* _CONVEX_SOURCE */ # define BADCH (int)'?' # define EMSG "" # define tell(s) if (opterr) \ {sm_io_fputs(smioerr, SM_TIME_DEFAULT, *nargv); \ (void) sm_io_fputs(smioerr, SM_TIME_DEFAULT, s); \ (void) sm_io_putc(smioerr, SM_TIME_DEFAULT, optopt); \ (void) sm_io_putc(smioerr, SM_TIME_DEFAULT, '\n'); \ return BADCH;} int getopt(nargc,nargv,ostr) int nargc; char const **nargv; const char *ostr; Is this related to the problem I'm having? > Ugh^3! > > h~ > -- John **= Email 3 ==========================** Date: Wed, 26 Nov 2003 09:55:17 -0500 From: Henry Sobotka Subject: Re: getopt problem Stefan Neis wrote: > > On Wed, 26 Nov 2003, Henry Sobotka wrote: > > > The missing const is a known EMX bug (see "Bugs" under getopt in the > > doc) that also appears in Posix/2. > > Sorry? AFAICS, the const is not missing in Posix/2. My mistake. I was looking at the outdated version I have here. h~ **= Email 4 ==========================** Date: Wed, 26 Nov 2003 10:57:37 +0000 From: John Poltorak Subject: Re: getopt problem On Wed, Nov 26, 2003 at 11:42:05AM +0100, Stefan Neis wrote: > On Wed, 26 Nov 2003, John Poltorak wrote: > > > But have just noticed a section in the program which starts:- > > > > #if !SM_CONF_GETOPT > (snipp) > > int > > getopt(nargc,nargv,ostr) > > int nargc; > > char const **nargv; > > const char *ostr; > > > > Is this related to the problem I'm having? > > Well, I wonder what SM_CONF_GETOPT actually is and why it is not > defined to 1 since you do have getopt ... Maybe someone forgot to mention that it needed setting... I'm trying to build SENDMAIL with an OS/2 Makefile provided. After adding -DSM_CONF_GETOPT to one of the DEFS, it appears to clear up the problem. Thanks for the suggestion. > Regards, > Stefan > -- John **= Email 5 ==========================** Date: Wed, 26 Nov 2003 11:35:11 +0100 (CET) From: Stefan Neis Subject: Re: conflicting types for `_getcwd2' On Tue, 25 Nov 2003, John Poltorak wrote: > Why do I get this:- ? > > > In file included from assert.c:20: > c:\emx\include\stdlib.h:229: conflicting types for `_getcwd2' > c:\emx\include\stdlib.h:163: previous declaration of `_getcwd2' > In file included from assert.c:21: > c:\emx\include\unistd.h:99: conflicting types for `_getcwd2' > c:\emx\include\stdlib.h:229: previous declaration of `_getcwd2' > make: *** [assert.o] Error 1 #define getcwd _getcwd2 // or vice versa #include #include is going to cause that kind of error. Search for the define (possibly hidden in some other header file in the source package) and move it down below those two includes... Regards, Stefan -- Micro$oft is not an answer. It is a question. The answer is 'no'. **= Email 6 ==========================** Date: Wed, 26 Nov 2003 11:39:44 +0100 (CET) From: Stefan Neis Subject: Re: getopt problem On Wed, 26 Nov 2003, Henry Sobotka wrote: > The missing const is a known EMX bug (see "Bugs" under getopt in the > doc) that also appears in Posix/2. Sorry? AFAICS, the const is not missing in Posix/2. Anyway, why not simple solve the problem by removing that wrong declaration from the .c file instead of trying to manually make it compatible with the header file? Regards, Stefan -- Micro$oft is not an answer. It is a question. The answer is 'no'. **= Email 7 ==========================** Date: Wed, 26 Nov 2003 11:42:05 +0100 (CET) From: Stefan Neis Subject: Re: getopt problem On Wed, 26 Nov 2003, John Poltorak wrote: > But have just noticed a section in the program which starts:- > > #if !SM_CONF_GETOPT (snipp) > int > getopt(nargc,nargv,ostr) > int nargc; > char const **nargv; > const char *ostr; > > Is this related to the problem I'm having? Well, I wonder what SM_CONF_GETOPT actually is and why it is not defined to 1 since you do have getopt ... Regards, Stefan **= Email 8 ==========================** Date: Wed, 26 Nov 2003 14:44:52 +0000 From: John Poltorak Subject: libcrypt Does anyone know where I can get a libcrypt? Would it be the same thing as libufc? -- John **= Email 9 ==========================** Date: Wed, 26 Nov 2003 16:23:46 +0000 From: John Poltorak Subject: libdl Has anyone ever come accross a libdl anywhere? -- John **= Email 10 ==========================** Date: Wed, 26 Nov 2003 18:17:46 +0100 (CET) From: Stefan Neis Subject: Re: libdl On Wed, 26 Nov 2003, John Poltorak wrote: > Has anyone ever come accross a libdl anywhere? Lots of them, actually. One version is contained in Posix/2 (included in it's cExt, no need for an extra -ldl). Various other versions probably can be found using Google or something else and searching for dlopen and OS/2. Regards, Stefan -- Micro$oft is not an answer. It is a question. The answer is 'no'. **= Email 11 ==========================** Date: Wed, 26 Nov 2003 18:17:46 +0100 (CET) From: Stefan Neis Subject: Re: libdl On Wed, 26 Nov 2003, John Poltorak wrote: > Has anyone ever come accross a libdl anywhere? Lots of them, actually. One version is contained in Posix/2 (included in it's cExt, no need for an extra -ldl). Various other versions probably can be found using Google or something else and searching for dlopen and OS/2. Regards, Stefan -- Micro$oft is not an answer. It is a question. The answer is 'no'. **= Email 12 ==========================** Date: Wed, 26 Nov 2003 18:49:11 +0000 From: John Poltorak Subject: Re: libdl On Wed, Nov 26, 2003 at 06:17:46PM +0100, Stefan Neis wrote: > On Wed, 26 Nov 2003, John Poltorak wrote: > > > Has anyone ever come accross a libdl anywhere? > > Lots of them, actually. One version is contained in Posix/2 (included > in it's cExt, no need for an extra -ldl). I just want a simple dl.a to drop into a directory and allow me to build Sendmail. I am not using Posix/2 in this instance and fear that doing so at this stage could open up a can of worms. If/when I manage to build it, I'll see if I can use Posix/2 as an alternative. > Various other versions probably can be found using Google or something > else and searching for dlopen and OS/2. I get lots of hits but haven't found anything I can just download. > > Regards, > Stefan > -- > Micro$oft is not an answer. It is a question. The answer is 'no'. > -- John **= Email 13 ==========================** Date: Wed, 26 Nov 2003 18:49:52 +0000 From: John Poltorak Subject: Re: Fetchmail On Wed, Nov 26, 2003 at 06:52:18PM +0100, Yuri Dario wrote: > > > > >Does anyone have any notes for building FETCHMAIL on OS/2? > > recently someone posted something about a recent build on c.o.o.p.*, I sent him my 6.2.1 > patches. Could I have a copy too? > Bye, > > Yuri Dario > > /* > * member of TeamOS/2 - Italy > * http://www.os2power.com/yuri > * http://www.teamos2.it > */ -- John **= Email 14 ==========================** Date: Wed, 26 Nov 2003 18:51:25 +0100 (CET) From: "Yuri Dario" Subject: Re: libdl > >Has anyone ever come accross a libdl anywhere? innotek gcc has a good one. Bye, Yuri Dario /* * member of TeamOS/2 - Italy * http://www.os2power.com/yuri * http://www.teamos2.it */ **= Email 15 ==========================** Date: Wed, 26 Nov 2003 18:52:18 +0100 (CET) From: "Yuri Dario" Subject: Re: Fetchmail > >Does anyone have any notes for building FETCHMAIL on OS/2? recently someone posted something about a recent build on c.o.o.p.*, I sent him my 6.2.1 patches. Bye, Yuri Dario /* * member of TeamOS/2 - Italy * http://www.os2power.com/yuri * http://www.teamos2.it */