OLD | NEW |
1 /* Vector API for GDB. | 1 /* Vector API for GDB. |
2 Copyright (C) 2004-2012 Free Software Foundation, Inc. | 2 Copyright (C) 2004-2012 Free Software Foundation, Inc. |
3 Contributed by Nathan Sidwell <nathan@codesourcery.com> | 3 Contributed by Nathan Sidwell <nathan@codesourcery.com> |
4 | 4 |
5 This file is part of GDB. | 5 This file is part of GDB. |
6 | 6 |
7 This program is free software; you can redistribute it and/or modify | 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 | 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 | 9 the Free Software Foundation; either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
11 | 11 |
12 This program is distributed in the hope that it will be useful, | 12 This program is distributed in the hope that it will be useful, |
13 but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 GNU General Public License for more details. | 15 GNU General Public License for more details. |
16 | 16 |
17 You should have received a copy of the GNU General Public License | 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/>. */ | 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
19 | 19 |
| 20 #ifdef GDBSERVER |
| 21 #include "server.h" |
| 22 #else |
20 #include "defs.h" | 23 #include "defs.h" |
| 24 #endif |
| 25 |
21 #include "vec.h" | 26 #include "vec.h" |
22 | 27 |
23 struct vec_prefix | 28 struct vec_prefix |
24 { | 29 { |
25 unsigned num; | 30 unsigned num; |
26 unsigned alloc; | 31 unsigned alloc; |
27 void *vec[1]; | 32 void *vec[1]; |
28 }; | 33 }; |
29 | 34 |
30 /* Calculate the new ALLOC value, making sure that abs(RESERVE) slots | 35 /* Calculate the new ALLOC value, making sure that abs(RESERVE) slots |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 DEF_VEC_I (int); | 114 DEF_VEC_I (int); |
110 typedef struct X | 115 typedef struct X |
111 { | 116 { |
112 int i; | 117 int i; |
113 } obj_t; | 118 } obj_t; |
114 typedef obj_t *ptr_t; | 119 typedef obj_t *ptr_t; |
115 | 120 |
116 DEF_VEC_P (ptr_t); | 121 DEF_VEC_P (ptr_t); |
117 DEF_VEC_O (obj_t); | 122 DEF_VEC_O (obj_t); |
118 #endif | 123 #endif |
OLD | NEW |