[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] [ANNOUNCE:] leafnode-1.9.12



-----BEGIN PGP SIGNED MESSAGE-----

krasel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx (Cornelius Krasel) writes:

| Ron Rosson wrote:
| 
| > Well I just downloaded it. Here is what happened during the compile,
| > 
| > gcc -c -I. -DHAVE_CONFIG_H -Wall -Wstrict-prototypes
| > -Wmissing-prototypes -g ./nntpd.c
| > /nntpd.c: In function `donewgroups':
| > /nntpd.c:795: invalid operands to binary -
| > *** Error code 1
| > 
| > Stop.

I got the same error on the following system:

$ uname -a
OpenBSD orange 2.6 ORANGE#1 i386
$ gcc -v
gcc version 2.95.1 19990816 (release)

| This is line 795; the underlined part has been added since 1.9.11:
| 
|     age = mktime( &timearray ) - (strstr( arg, "GMT" ) ? timezone : 0);
|                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| 
| I have no idea what your error message could mean. However, upon
| investigation it appears to me that the "timezone" variable is not 
| explicitely declared. It should, however, be declared in <time.h>.
| If this is not the case (or if the type is incorrect: on my Linux
| glibc2.1 system, it is declared as "long int"), the a ? b : 0 construct
| might fail. I have no idea if this could yield your error message.

$ egrep timezone /usr/include/time.h
char    *tm_zone;       /* timezone abbreviation */
char *timezone __P((int, int));

The "timezone" is a function on this system (and same on my
NetBSD-1.4.1/i386 system).

| What does "./configure" say about gmtoff ? On my system, it looks like
| this:
| checking for gmtoff in struct tm... (cached) yes

$ ./configure
..
checking for gmtoff in struct tm... (cached) yes
..

The following patch could fix the problem?
I have no machine running Linux, so I can't test on that platform.

*** nntpd.c	2000/03/29 22:56:39	1.1
- --- nntpd.c	2000/03/29 23:36:33
***************
*** 792,798 ****
      timearray.tm_hour = a / 10000;
      timearray.tm_min  = a % 10000 / 100;
      timearray.tm_sec  = a % 100;
!     age = mktime( &timearray ) - (strstr( arg, "GMT" ) ? timezone : 0);
  
      printf( "231 List of new newsgroups follows\r\n" );
      if ( debugmode )
- --- 792,798 ----
      timearray.tm_hour = a / 10000;
      timearray.tm_min  = a % 10000 / 100;
      timearray.tm_sec  = a % 100;
!     age = mktime( &timearray ) - (strstr( arg, "GMT" ) ? ltime->tm_gmtoff : 0);
  
      printf( "231 List of new newsgroups follows\r\n" );
      if ( debugmode )


| --Cornelius.
| 
| PS: Maybe I've asked you this before: please mail me the man page of
|     ctime(3).

Anyway I have sent it.


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv

iQCVAwUBOOKUjkPp6IK9NdONAQE33AP+PbvwBBgx1273LAJcLJ+ZytS12mdVXoDj
Sdfj4TPVGLwFKP2dUbBVDRqUZi+9n/1xY+Bip5qJ4+xLFba1alCQZl01/IymQF5G
qy9ruk+qdSIW+qx8JVsiXtqVBU90A1Y0i8fcFMv23VdCypr/R5FvRpg6ChrV4Xk8
W7n/E/mxxHI=
=anAr
-----END PGP SIGNATURE-----

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list