1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-14 23:46:10 +00:00
freebsd-ports/astro/xphoon/files/patch-ac
Hidetoshi Shimokawa 2042bf1384 Fix time() conflicts on alpha.
- disable "long time()"
 - replace long with time_t for time counter.
1999-01-03 09:43:44 +00:00

43 lines
791 B
Plaintext

--- dtime.c.orig Sat Sep 14 14:15:25 1991
+++ dtime.c Sun Jan 3 18:36:48 1999
@@ -26,13 +26,20 @@
#include <sys/timeb.h>
#endif /*SYS5*/
+
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
+#include <sys/param.h>
+#endif
+
+#if !(defined(BSD) && (BSD >= 199306))
extern long time();
struct tm* localtime();
+#endif
struct tws*
dtwstime()
{
- long clock;
+ time_t clock;
(void) time( &clock );
return dlocaltime( &clock );
@@ -40,7 +47,7 @@
struct tws*
dlocaltime( clock )
- long* clock;
+ time_t* clock;
{
register struct tm* tm;
#ifndef SYS5
@@ -48,7 +55,7 @@
#endif not SYS5
static struct tws tw;
- if ( clock == (long*) 0 )
+ if ( clock == (time_t*) 0 )
return (struct tws*) 0;
tw.tw_flags = TW_NULL;