Rizin
unix-like reverse engineering framework and cli tools
sysdep.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 1995-2018 Free Software Foundation, Inc.
2
// SPDX-License-Identifier: GPL-3.0-or-later
3
4
/* Random host-dependent support code.
5
Copyright (C) 1995-2018 Free Software Foundation, Inc.
6
Written by Ken Raeburn.
7
8
This file is part of the GNU opcodes library.
9
10
This library is free software; you can redistribute it and/or modify
11
it under the terms of the GNU General Public License as published by
12
the Free Software Foundation; either version 3, or (at your option)
13
any later version.
14
15
It is distributed in the hope that it will be useful, but WITHOUT
16
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
18
License for more details.
19
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, write to the Free Software
22
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
23
MA 02110-1301, USA. */
24
25
26
/* Do system-dependent stuff, mainly driven by autoconf-detected info.
27
28
Well, some generic common stuff is done here too, like including
29
ansidecl.h. That's because the .h files in bfd/hosts files I'm
30
trying to replace often did that. If it can be dropped from this
31
file (check in a non-ANSI environment!), it should be. */
32
33
#ifdef PACKAGE
34
#error sysdep.h must be included in lieu of config.h
35
#endif
36
37
// #include "config.h"
38
39
#include "ansidecl.h"
40
41
#ifdef HAVE_STDLIB_H
42
#include <stdlib.h>
43
#endif
44
45
#ifdef STRING_WITH_STRINGS
46
#include <string.h>
47
#include <strings.h>
48
#else
49
#ifdef HAVE_STRING_H
50
#include <string.h>
51
#else
52
#ifdef HAVE_STRINGS_H
53
#include <strings.h>
54
#endif
55
#endif
56
#endif
57
58
#if !HAVE_DECL_STPCPY
59
extern
char
*
stpcpy
(
char
*__dest,
const
char
*__src);
60
#endif
61
62
#define opcodes_error_handler _bfd_error_handler
63
64
/* Use sigsetjmp/siglongjmp without saving the signal mask if possible.
65
It is faster than setjmp/longjmp on systems where the signal mask is
66
saved. */
67
68
#if defined(HAVE_SIGSETJMP)
69
#define OPCODES_SIGJMP_BUF sigjmp_buf
70
#define OPCODES_SIGSETJMP(buf) sigsetjmp((buf), 0)
71
#define OPCODES_SIGLONGJMP(buf,val) siglongjmp((buf), (val))
72
#else
73
#define OPCODES_SIGJMP_BUF jmp_buf
74
#define OPCODES_SIGSETJMP(buf) setjmp(buf)
75
#define OPCODES_SIGLONGJMP(buf,val) longjmp((buf), (val))
76
#endif
stpcpy
char * stpcpy(char *__dest, const char *__src)
librz
asm
arch
arm
aarch64
sysdep.h
Generated by
1.9.1