]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - opcodes/sysdep.h
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / opcodes / sysdep.h
CommitLineData
252b5132 1/* Random host-dependent support code.
a2c58332 2 Copyright (C) 1995-2022 Free Software Foundation, Inc.
252b5132
RH
3 Written by Ken Raeburn.
4
9b201bb5 5 This file is part of the GNU opcodes library.
47b0e7ad 6
9b201bb5 7 This library is free software; you can redistribute it and/or modify
47b0e7ad 8 it under the terms of the GNU General Public License as published by
9b201bb5
NC
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
47b0e7ad 11
9b201bb5
NC
12 It is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 License for more details.
47b0e7ad
NC
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20 MA 02110-1301, USA. */
252b5132 21
9b201bb5 22
252b5132
RH
23/* Do system-dependent stuff, mainly driven by autoconf-detected info.
24
25 Well, some generic common stuff is done here too, like including
26 ansidecl.h. That's because the .h files in bfd/hosts files I'm
27 trying to replace often did that. If it can be dropped from this
28 file (check in a non-ANSI environment!), it should be. */
29
df7b86aa
NC
30#ifdef PACKAGE
31#error sysdep.h must be included in lieu of config.h
32#endif
33
252b5132 34#include "config.h"
252b5132 35#include <stdlib.h>
252b5132 36#include <string.h>
ab2af25e 37#include "ansidecl.h"
dabbade6
L
38
39#if !HAVE_DECL_STPCPY
40extern char *stpcpy (char *__dest, const char *__src);
41#endif
8df14d78 42
a6743a54 43#define opcodes_error_handler _bfd_error_handler
a6743a54 44
8df14d78
L
45/* Use sigsetjmp/siglongjmp without saving the signal mask if possible.
46 It is faster than setjmp/longjmp on systems where the signal mask is
47 saved. */
48
49#if defined(HAVE_SIGSETJMP)
50#define OPCODES_SIGJMP_BUF sigjmp_buf
51#define OPCODES_SIGSETJMP(buf) sigsetjmp((buf), 0)
52#define OPCODES_SIGLONGJMP(buf,val) siglongjmp((buf), (val))
53#else
54#define OPCODES_SIGJMP_BUF jmp_buf
55#define OPCODES_SIGSETJMP(buf) setjmp(buf)
56#define OPCODES_SIGLONGJMP(buf,val) longjmp((buf), (val))
57#endif
78933a4a
AM
58
59#define POISON_BFD_BOOLEAN 1