This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] to libf2c: #include <sys/types.h> for time_t
- To: gcc-patches at gcc dot gnu dot org
- Subject: [patch] to libf2c: #include <sys/types.h> for time_t
- From: msokolov at ivan dot Harhan dot ORG (Michael Sokolov)
- Date: Sun, 21 Jan 01 15:17:40 PST
Hi there,
The patch below fixes a portability problem in libf2c (libU77 actually). You
have to #include <sys/types.h> on some systems (such as 4.3BSD) to get time_t,
otherwise it won't compile.
Built on vax-dec-bsd with this patch and two others to follow.
--
Michael Sokolov
Public Service Agent
International Engineering and Science Task Force
1351 VINE AVE APT 27 Phone: +1-714-738-5409
FULLERTON CA 92833-4291 USA (home office)
E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP)
2001-01-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
* libU77/ctime_.c: #include <sys/types.h> for time_t.
* libU77/datetime_.c: Likewise.
* libU77/fdate_.c: Likewise.
* libU77/gmtime_.c: Likewise.
* libU77/idate_.c: Likewise.
* libU77/itime_.c: Likewise.
* libU77/ltime_.c: Likewise.
* libU77/sys_clock_.c: Likewise.
* libU77/vxtidate_.c: Likewise.
* libU77/vxttime_.c: Likewise.
Index: libU77/ctime_.c
===================================================================
RCS file: /cvs/gcc/egcs/libf2c/libU77/ctime_.c,v
retrieving revision 1.2
diff -p -r1.2 ctime_.c
*** ctime_.c 1999/09/04 15:09:18 1.2
--- ctime_.c 2001/01/21 23:01:03
*************** Boston, MA 02111-1307, USA. */
*** 19,24 ****
--- 19,25 ----
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+ #include <sys/types.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
Index: libU77/datetime_.c
===================================================================
RCS file: /cvs/gcc/egcs/libf2c/libU77/datetime_.c,v
retrieving revision 1.4
diff -p -r1.4 datetime_.c
*** datetime_.c 1999/10/12 08:39:35 1.4
--- datetime_.c 2001/01/21 23:01:03
*************** Boston, MA 02111-1307, USA. */
*** 20,25 ****
--- 20,26 ----
#include "config.h"
#endif
#include <stdio.h>
+ #include <sys/types.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
Index: libU77/fdate_.c
===================================================================
RCS file: /cvs/gcc/egcs/libf2c/libU77/fdate_.c,v
retrieving revision 1.2
diff -p -r1.2 fdate_.c
*** fdate_.c 1999/09/04 15:09:19 1.2
--- fdate_.c 2001/01/21 23:01:04
*************** Boston, MA 02111-1307, USA. */
*** 20,25 ****
--- 20,26 ----
#include "config.h"
#endif
#include <stdio.h>
+ #include <sys/types.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
Index: libU77/gmtime_.c
===================================================================
RCS file: /cvs/gcc/egcs/libf2c/libU77/gmtime_.c,v
retrieving revision 1.2
diff -p -r1.2 gmtime_.c
*** gmtime_.c 1998/04/27 23:00:10 1.2
--- gmtime_.c 2001/01/21 23:01:04
*************** Boston, MA 02111-1307, USA. */
*** 19,24 ****
--- 19,25 ----
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+ #include <sys/types.h>
/* fixme: do we need to use TM_IN_SYS_TIME? */
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
Index: libU77/idate_.c
===================================================================
RCS file: /cvs/gcc/egcs/libf2c/libU77/idate_.c,v
retrieving revision 1.2
diff -p -r1.2 idate_.c
*** idate_.c 1999/09/04 15:09:19 1.2
--- idate_.c 2001/01/21 23:01:04
*************** Boston, MA 02111-1307, USA. */
*** 20,25 ****
--- 20,26 ----
#include "config.h"
#endif
#include <stdio.h>
+ #include <sys/types.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
Index: libU77/itime_.c
===================================================================
RCS file: /cvs/gcc/egcs/libf2c/libU77/itime_.c,v
retrieving revision 1.2
diff -p -r1.2 itime_.c
*** itime_.c 1999/09/04 15:09:19 1.2
--- itime_.c 2001/01/21 23:01:04
*************** Boston, MA 02111-1307, USA. */
*** 20,25 ****
--- 20,26 ----
#include "config.h"
#endif
#include <stdio.h>
+ #include <sys/types.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
Index: libU77/ltime_.c
===================================================================
RCS file: /cvs/gcc/egcs/libf2c/libU77/ltime_.c,v
retrieving revision 1.2
diff -p -r1.2 ltime_.c
*** ltime_.c 1998/04/27 22:53:54 1.2
--- ltime_.c 2001/01/21 23:01:05
*************** Boston, MA 02111-1307, USA. */
*** 19,24 ****
--- 19,25 ----
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+ #include <sys/types.h>
/* fixme: do we need to use TM_IN_SYS_TIME? */
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
Index: libU77/sys_clock_.c
===================================================================
RCS file: /cvs/gcc/egcs/libf2c/libU77/sys_clock_.c,v
retrieving revision 1.4
diff -p -r1.4 sys_clock_.c
*** sys_clock_.c 1998/09/05 10:47:11 1.4
--- sys_clock_.c 2001/01/21 23:01:05
*************** Boston, MA 02111-1307, USA. */
*** 19,24 ****
--- 19,25 ----
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+ #include <sys/types.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
Index: libU77/vxtidate_.c
===================================================================
RCS file: /cvs/gcc/egcs/libf2c/libU77/vxtidate_.c,v
retrieving revision 1.3
diff -p -r1.3 vxtidate_.c
*** vxtidate_.c 1999/03/05 23:40:12 1.3
--- vxtidate_.c 2001/01/21 23:01:05
*************** Boston, MA 02111-1307, USA. */
*** 20,25 ****
--- 20,26 ----
#include "config.h"
#endif
#include <stdio.h>
+ #include <sys/types.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
Index: libU77/vxttime_.c
===================================================================
RCS file: /cvs/gcc/egcs/libf2c/libU77/vxttime_.c,v
retrieving revision 1.2
diff -p -r1.2 vxttime_.c
*** vxttime_.c 1999/09/04 15:09:19 1.2
--- vxttime_.c 2001/01/21 23:01:05
*************** Boston, MA 02111-1307, USA. */
*** 20,25 ****
--- 20,26 ----
#include "config.h"
#endif
#include <stdio.h>
+ #include <sys/types.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>