new-op.c: Add comment about -fsanitize=address
[deliverable/binutils-gdb.git] / gdb / common / common-defs.h
CommitLineData
976411d6
GB
1/* Common definitions.
2
618f726f 3 Copyright (C) 1986-2016 Free Software Foundation, Inc.
976411d6
GB
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20#ifndef COMMON_DEFS_H
21#define COMMON_DEFS_H
22
23#include "config.h"
24#ifdef GDBSERVER
25#include "build-gnulib-gdbserver/config.h"
26#else
27#include "build-gnulib/config.h"
28#endif
29
28fe4f87
PA
30/* From:
31 https://www.gnu.org/software/gnulib/manual/html_node/stdint_002eh.html
32
33 "On some hosts that predate C++11, when using C++ one must define
34 __STDC_CONSTANT_MACROS to make visible the definitions of constant
35 macros such as INTMAX_C, and one must define __STDC_LIMIT_MACROS to
36 make visible the definitions of limit macros such as INTMAX_MAX.".
37
38 Must do this before including any system header, since system
39 headers may include stdint.h. */
40#define __STDC_CONSTANT_MACROS 1
41#define __STDC_LIMIT_MACROS 1
42
355e2102 43#include <stdarg.h>
d02f550d 44#include <stdio.h>
d7096f71 45#include <stdlib.h>
8ebb3f56 46#include <stddef.h>
8cc73a39 47#include <stdint.h>
6d3d12eb 48#include <string.h>
8ffc1bb1
EZ
49#ifdef HAVE_STRINGS_H
50#include <strings.h> /* for strcasecmp and strncasecmp */
51#endif
bb974a24 52#include <errno.h>
9c232dda 53#include <alloca.h>
91ee7171 54
0e443c87 55#include "ansidecl.h"
91ee7171
PA
56/* This is defined by ansidecl.h, but we prefer gnulib's version. On
57 MinGW, gnulib might enable __USE_MINGW_ANSI_STDIO, which may or not
58 require use of attribute gnu_printf instead of printf. gnulib
59 checks that at configure time. Since _GL_ATTRIBUTE_FORMAT_PRINTF
60 is compatible with ATTRIBUTE_PRINTF, simply use it. */
61#undef ATTRIBUTE_PRINTF
62#define ATTRIBUTE_PRINTF _GL_ATTRIBUTE_FORMAT_PRINTF
63
b9391142 64#include "libiberty.h"
a5fceff8 65#include "pathmax.h"
cb9f1a9b 66#include "gdb/signals.h"
3995eeee 67#include "gdb_locale.h"
4cb9c816 68#include "ptid.h"
03aef70f 69#include "common-types.h"
e76df0d0 70#include "common-utils.h"
dccbb609 71#include "gdb_assert.h"
ef87c8bb 72#include "errors.h"
f6e94d78 73#include "print-utils.h"
34abf635 74#include "common-debug.h"
6f1947e8 75#include "cleanups.h"
a442d071 76#include "common-exceptions.h"
d02f550d 77
ddb6d633
PA
78#define EXTERN_C extern "C"
79#define EXTERN_C_PUSH extern "C" {
80#define EXTERN_C_POP }
56000a98 81
da804164
PA
82/* Pull in gdb::unique_ptr and gdb::unique_xmalloc_ptr. */
83#include "common/gdb_unique_ptr.h"
84
976411d6 85#endif /* COMMON_DEFS_H */
This page took 0.170789 seconds and 4 git commands to generate.