15796c8dcSSimon Schubert /* Random host-dependent support code. 2*ef5ccd6cSJohn Marino Copyright 1995, 1997, 2000, 2005, 2007, 2012 Free Software Foundation, Inc. 35796c8dcSSimon Schubert Written by Ken Raeburn. 45796c8dcSSimon Schubert 55796c8dcSSimon Schubert This file is part of the GNU opcodes library. 65796c8dcSSimon Schubert 75796c8dcSSimon Schubert This library is free software; you can redistribute it and/or modify 85796c8dcSSimon Schubert it under the terms of the GNU General Public License as published by 95796c8dcSSimon Schubert the Free Software Foundation; either version 3, or (at your option) 105796c8dcSSimon Schubert any later version. 115796c8dcSSimon Schubert 125796c8dcSSimon Schubert It is distributed in the hope that it will be useful, but WITHOUT 135796c8dcSSimon Schubert ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 145796c8dcSSimon Schubert or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 155796c8dcSSimon Schubert License for more details. 165796c8dcSSimon Schubert 175796c8dcSSimon Schubert You should have received a copy of the GNU General Public License 185796c8dcSSimon Schubert along with this program; if not, write to the Free Software 195796c8dcSSimon Schubert Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 205796c8dcSSimon Schubert MA 02110-1301, USA. */ 215796c8dcSSimon Schubert 225796c8dcSSimon Schubert 235796c8dcSSimon Schubert /* Do system-dependent stuff, mainly driven by autoconf-detected info. 245796c8dcSSimon Schubert 255796c8dcSSimon Schubert Well, some generic common stuff is done here too, like including 265796c8dcSSimon Schubert ansidecl.h. That's because the .h files in bfd/hosts files I'm 275796c8dcSSimon Schubert trying to replace often did that. If it can be dropped from this 285796c8dcSSimon Schubert file (check in a non-ANSI environment!), it should be. */ 295796c8dcSSimon Schubert 30*ef5ccd6cSJohn Marino #ifdef PACKAGE 31*ef5ccd6cSJohn Marino #error sysdep.h must be included in lieu of config.h 32*ef5ccd6cSJohn Marino #endif 33*ef5ccd6cSJohn Marino 345796c8dcSSimon Schubert #include "config.h" 355796c8dcSSimon Schubert 365796c8dcSSimon Schubert #include "ansidecl.h" 375796c8dcSSimon Schubert 385796c8dcSSimon Schubert #ifdef HAVE_STDLIB_H 395796c8dcSSimon Schubert #include <stdlib.h> 405796c8dcSSimon Schubert #endif 415796c8dcSSimon Schubert 42*ef5ccd6cSJohn Marino #ifdef STRING_WITH_STRINGS 43*ef5ccd6cSJohn Marino #include <string.h> 44*ef5ccd6cSJohn Marino #include <strings.h> 45*ef5ccd6cSJohn Marino #else 465796c8dcSSimon Schubert #ifdef HAVE_STRING_H 475796c8dcSSimon Schubert #include <string.h> 485796c8dcSSimon Schubert #else 495796c8dcSSimon Schubert #ifdef HAVE_STRINGS_H 505796c8dcSSimon Schubert #include <strings.h> 515796c8dcSSimon Schubert #endif 525796c8dcSSimon Schubert #endif 53*ef5ccd6cSJohn Marino #endif 545796c8dcSSimon Schubert 555796c8dcSSimon Schubert #if !HAVE_DECL_STPCPY 565796c8dcSSimon Schubert extern char *stpcpy (char *__dest, const char *__src); 575796c8dcSSimon Schubert #endif 58