Re: Portability of strpbrk

2005-06-23 Thread Larry Jones
Hrvoje Niksic writes:
 
 strpbrk is a BSD 4.3 [1] function apparently also mandated by POSIX,
 C99, and present on Windows and VMS.  Is there a system we care about
 that doesn't have it?

It was also mandated by C89, so probably not.

-Larry Jones

I obey the letter of the law, if not the spirit. -- Calvin


Re: Availability of gettimeofday

2005-05-05 Thread Larry Jones
Hrvoje Niksic writes:
 
 Are there any systems in use today that don't support gettimeofday?

Good question.

 The oldest systems on which I had access in
 mid-90s, such as Ultrix and SunOS 4, all supported it.

That's because gettimeofday is a BSDism and those systems are both
derived from BSD.  If there is a problem, it would be with systems
derived from SysV.

-Larry Jones

I sure like summer vacation. -- Calvin


Re: Build problem: ptimer.c (CVS 1.7), gcc 3.4.3, Tru64 UNIX V5.1B

2005-04-15 Thread Larry Jones
Hrvoje Niksic writes:
 
 I suppose we should then use:
 
 #ifdef _POSIX_TIMERS
 # if _POSIX_TIMERS  0

The usual solution to this problem is:

#if _POSIX_TIMERS - 0  0

That gets the right answer regardless of whether _POSIX_TIMERS is
undefined, defined as nothing, or defined as a number.

-Larry Jones

In a minute, you and I are going to settle this out of doors. -- Calvin


Re: Build problem: ptimer.c (CVS 1.7), gcc 3.4.3, Tru64 UNIX V5.1B

2005-04-15 Thread Larry Jones
Hrvoje Niksic writes:
 
 I guess the defined as nothing case was losing.  BTW does the above
 trick work with KR preprocessors?

Yep.  (That's why it uses - 0 rather than + 0, the latter is only
valid for ANSI C.)

-Larry Jones

It's no fun to play games with a poor sport. -- Calvin


Compile problem with OpenSSL 0.9.5a

2005-04-07 Thread Larry Jones
Trying to compile the current CVS, I get the following compile error:

gcc -I. -I. -I/usr/local/ssl/include   -DHAVE_CONFIG_H 
-DSYSTEM_WGETRC=\/usr/local/etc/wgetrc\ 
-DLOCALEDIR=\/usr/local/share/locale\ -O2 -Wall -Wno-implicit -c http-ntlm.c
http-ntlm.c:50: openssl/md4.h: No such file or directory
*** Error code 1

This system has OpenSSL 0.9.5a installed which doesn't have md4.h
(although it does have md2.h and md5.h).  I realize 0.9.5a is very old,
but you might want to consider beefing up the configure test to make
sure that it has *all* the SSL files it needs before automatically
enabling SSL.  Currently it just looks for ssl.h and rsa.h (which isn't
even used anywhere that I can find) but the code also uses bio.h,
crypto.h, x509.h, err.h, pem.h, rand.h, des.h, md4.h, and md5.h.

-Larry Jones

I can do that!  It's a free country!  I've got my rights! -- Calvin


Re: Comment handling

2003-06-05 Thread Larry Jones
Tony Lewis writes:
 
 The issue we've been discussing is what to do about things that almost
 follow the rules for HTML comments, but don't quite get it right. By
 default, wget ignores legitimate HTML comments.

I think the point of the suggested option was to not even try to
identify HTML comments and thus treat them as ordinary text.

-Larry Jones

I kind of resent the manufacturer's implicit assumption
that this would amuse me. -- Calvin


Re: string comparison macro (was Re: using user-agent to identify for

2003-05-30 Thread Larry Jones
Aaron S. Hawley writes:
 
 shouldn't it be strlen not sizeof?

No.  An array is not converted to a pointer when it is the argument of
sizeof, so sizeof a string literal is the number of bytes in the string
(including the terminating NUL), not the size of a char *.

-Larry Jones

I hate being good. -- Calvin


Re: string comparison macro (was Re: using user-agent to identify

2003-05-30 Thread Larry Jones
Aaron S. Hawley writes:
 
 yeah, i guess that patch is really bad.

Yes, it is.  ;-)

-Larry Jones

Life's a lot more fun when you're not responsible for your actions. -- Calvin