[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
2.99.34 on AIX (problems). Was: Z-mailer timezone oddity
David Nugent writes:
> On Fri, 2 Aug 1996, Matti Aarnio wrote:
>
> > ... Several thoughts and tests latter ...
> > Now I have autoconfig test for timezonal information, and
> > do use it. Works at OSF/1, and Solaris 2.5.
> > It will report an "Aiee..." if it can't figure out the
> > system timezone method.
>
> I get this message from configure under Linux using libc 5.3.12.
> The "timezone" method in this case uses the extern long timezone
> in <time.h> with no altzone, but right now zmailer has no timezone
> sense at all. :-(
>
> How can I get it to work?
>
> This is with 2.99.34, btw.
I tried to make 2.99.34 on AIX 4.1.1 RS6000/40P (ppc 601) with gcc 2.7.2.
The same "Aiee" message. I fixed it with the following patch:
*** rfc822date.c.orig Fri Aug 2 12:25:42 1996
--- rfc822date.c Sun Aug 4 15:35:18 1996
***************
*** 32,37 ****
--- 32,55 ----
offset = -timezone;
offset /= 60; /* Offset in minutes */
#else
+ #ifdef HAVE_GETTIMEOFDAY /* On AIX 4.1.1 it works, and depends from TZ */
+ { /* On BSD/OS 2.0.1 it always gives UTC */
+ struct timeval s__tv; /* but BSD/OS has tm_gmtoff */
+ struct timezone s__tz;
+ if (gettimeofday(&s__tv, &s__tz) == 0) {
+ offset = - s__tz.tz_minuteswest;
+ switch (s__tz.tz_dsttime) {
+ case DST_USA:
+ offset += 60;
+ case DST_NONE:
+ break;
+ default: /* XXX: Best guess */
+ offset += 60;
+ }
+ }
+ else /* Should never get here - gettimeofday() never fails with
+ correct pointers */
+ #endif
{ /* This is fallback stuff, beware! */
time_t tm;
struct tm ts2;
***************
*** 40,45 ****
--- 58,66 ----
tm = mktime(&ts2);
offset = (tm - *timep) / 60; /* Offset in minutes */
}
+ #ifdef HAVE_GETTIMEOFDAY
+ }
+ #endif
#endif
#endif
sign = offset >= 0;
> Some other things that should probably be fixed; these are with the
For example, AIX doesn't have <sys/fcntl.h> ,
and sysprotos.h includes it:
#ifdef STDC_HEADERS
#include <sys/fcntl.h>
But configure never checks for existence of sys/fcntl.h !
And configure thinks that --without-bundled-libresolv is
--with-bundled-libresolv.
In libsh/interpret.c , line 1917 there is declaration of wait()
(SYSV one, with int parameter, not union). Why???
Then, in libsh/builtins.c there is
int status = 0; /* line 1041 */
and that status later used in WEXITSTATUS macros, which in AIX
with -D_BSD (and, probably, in real BSD) wants union.
Ok, let's try to include -D_BSD only in libresolv/Makefile.in ...
Hmm... smtpserver still doesn't link...
--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Joint stock company "GVC Energeticy", North-Caucasian Branch, Pyatigorsk
Andrew Petrovich Kokarev, postmaster andrew@skfgvc.pyatigorsk.su