Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jun 1998 00:59:21 -0400 (EDT)
From:      CyberPeasant <djv@bedford.net>
To:        jef53313@bayou.uh.edu
Cc:        questions@FreeBSD.ORG
Subject:   Re: Problem in time.h?
Message-ID:  <199806130459.AAA21310@lucy.bedford.net>
In-Reply-To: <Pine.LNX.3.96.980612180256.5044B-100000@sdf.lonestar.org> from Jonathan Fosburgh at "Jun 12, 98 06:06:28 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Jonathan Fosburgh wrote:
> I recently built the plplot port. I won't go into the myriad tcl problems,
> which I will try to figure out later, but several of the files complained
> about /usr/include/time.h. The error was that there was a syntax error
> before char on line 145. The line begins "const char ..." I commented this
> out and it worked fine. Anyone know what is up? First time I have
> encountered this problem over roughly 9 months of using FreeBSD. I am
> running 2.2.6.
> 

Gee,

[root@lucy /root]# uname -a
FreeBSD lucy.loco.net 2.2.6-RELEASE FreeBSD 2.2.6-RELEASE #5: Wed Jun 10 21:33:45 EDT 1998     root@castor.loco.net:/usr/src/sys/compile/LUCY  i386
[root@lucy /root]# wc /usr/include/time.h
     123     660    4363 /usr/include/time.h
[root@lucy /root]# 

Hmm.

[root@lucy /root]# grep -2 -n "^const char" /usr/include/time.h
113-
114-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
115:const char *strptime __P((const char *, const char *, struct tm *));
116-char *timezone __P((int, int));
117-void tzsetwall __P((void));
[root@lucy /root]# 

Well, I've seen these errors (mysterious syntax errors) arise from
bad memory. Really.

It helps if you say what the actual error message was.  See if it's
repeatable, too.

Consider the possibility that the /error might be in the application/
rather than in an extremely well-exercised header file. (Like my
recent errorless make world :)

My rough hipshot is that the app is declaring strptime as
	extern char *strptime....

I.e. missing the const, probably in some config.h kind of file.

That would be a /bad app/, report it to the port owner, if this is
the case.

Dave
-- 
   "Microsoft Windows NT Server is the most secure network operating
    system available." ... "Windows NT Server is completely secure and 
    has been evaluated by the NCSC as such."
	               --- http://www.microsoft.com/security
Damn, some people think this is a plug for NT. Incredible.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806130459.AAA21310>