[Top][All Lists]

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

Re: extern char *strptime () on FreeBSD 2.2.8

From: Trond Varslot
Subject: Re: extern char *strptime () on FreeBSD 2.2.8
Date: 07 Feb 2001 19:55:34 +0100

> I've deleted the declaration of strptime from lo-cutils.c but added a
> cast:
>   char *
>   oct_strptime (const char *buf, const char *format, struct tm *tm)
>   {
>     return (char *) strptime (buf, format, tm);
>   }
> Is there any problem with that?

This should be fine also, and probably less of a hack. I will try a
compile tomorrow to make sure.

> BTW, why does FreeBSD declare it as returning const char*?  I don't
> know of any other system that does.  They all provide declarations
> with a non-const return type.

I don't know. Mind you, this is not the case in newer FreeBDSs. Maybe it
is just an error which has been corrected? Anyway, it can't be a
frequent practice, since noone else has complained about it. Free
software usually get a fair amount of beating on various systems. You
have to comply with most standards to not have people complain about

yours sincerely
Trond Varslot.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]