Commit Graph

15 Commits

Author SHA1 Message Date
Alan Modra
e495212d22 Sync libiberty from gcc
Picks up copyright year update and other recent fixes.
2017-01-05 00:03:07 +10:30
Joel Brobecker
519b5f619b libiberty/mkstemps.c: Include <time.h> if <sys/time.h> not available.
Attempting to build libiberty on LynxOS-178 fails trying to compile
mkstemps.c with the following error:

    mkstemps.c:84:18: error: storage size of 'tv' isn't known
       struct timeval tv;
                      ^

This file would normally include <sys/time.h> to get the type's
definition, but unfortunately LynxOS-178 does not want us to use
<sys/time.h>, only <time.h>. The configure script correctly finds
this out and generates a config.h file where HAVE_SYS_TIME_H is
undefined:

/* Define to 1 if you have the <sys/time.h> header file. */
/* #undef HAVE_SYS_TIME_H */

This patch fixes the build issue by falling back on including <time.h>
if <sys/time.h> could not be included (and provided that HAVE_TIME_H
is defined, of course).

libiberty/ChangeLog:

        * mkstemps.c: #include <time.h> if HAVE_TIME_H is defined
        but not HAVE_SYS_TIME_H.
2015-05-08 10:15:28 -07:00
DJ Delorie
8975bb3072 merge from gcc 2008-07-31 22:01:30 +00:00
DJ Delorie
f562800dc4 merge from gcc 2008-07-31 19:06:35 +00:00
DJ Delorie
069c63e246 merge from gcc 2006-05-28 17:49:15 +00:00
DJ Delorie
abf6a75b42 merge from gcc 2005-05-24 21:01:33 +00:00
Nick Clifton
979c05d324 Update the address and phone number of the FSF organization. 2005-05-10 15:33:34 +00:00
DJ Delorie
1e45deed6a merge from gcc 2005-03-28 05:07:08 +00:00
DJ Delorie
25319993a8 merge from gcc 2004-04-29 16:08:50 +00:00
DJ Delorie
cc096b7166 merge from gcc 2002-01-22 20:14:53 +00:00
DJ Delorie
5d852400e9 merge from gcc 2001-10-17 22:35:28 +00:00
DJ Delorie
ba19b94f67 merge from gcc 2001-10-16 02:55:31 +00:00
Jeff Law
b123325783 * cp-demangle.c, mkstemps.c: #include <sys/types.h>. 2000-07-23 15:58:11 +00:00
H.J. Lu
eb383413c2 Synced with libiberty in the gcc repository. 2000-06-15 20:56:25 +00:00
Richard Henderson
252b5132c7 19990502 sourceware import 1999-05-03 07:29:11 +00:00