xref: /netbsd-src/external/gpl3/gdb/dist/gdbsupport/host-defs.h (revision 5ba1f45f2a09259cc846f20c7c5501604d633c90)
18dffb485Schristos /* Basic host-specific definitions for GDB.
2*5ba1f45fSchristos    Copyright (C) 1986-2024 Free Software Foundation, Inc.
38dffb485Schristos 
48dffb485Schristos    This file is part of GDB.
58dffb485Schristos 
68dffb485Schristos    This program is free software; you can redistribute it and/or modify
78dffb485Schristos    it under the terms of the GNU General Public License as published by
88dffb485Schristos    the Free Software Foundation; either version 3 of the License, or
98dffb485Schristos    (at your option) any later version.
108dffb485Schristos 
118dffb485Schristos    This program is distributed in the hope that it will be useful,
128dffb485Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
138dffb485Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
148dffb485Schristos    GNU General Public License for more details.
158dffb485Schristos 
168dffb485Schristos    You should have received a copy of the GNU General Public License
178dffb485Schristos    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
188dffb485Schristos 
198dffb485Schristos #ifndef COMMON_HOST_DEFS_H
208dffb485Schristos #define COMMON_HOST_DEFS_H
218dffb485Schristos 
228dffb485Schristos #include <limits.h>
238dffb485Schristos 
248dffb485Schristos /* Static host-system-dependent parameters for GDB.  */
258dffb485Schristos 
268dffb485Schristos /* * Number of bits in a char or unsigned char for the target machine.
278dffb485Schristos    Just like CHAR_BIT in <limits.h> but describes the target machine.  */
288dffb485Schristos #if !defined (TARGET_CHAR_BIT)
298dffb485Schristos #define TARGET_CHAR_BIT 8
308dffb485Schristos #endif
318dffb485Schristos 
328dffb485Schristos /* * If we picked up a copy of CHAR_BIT from a configuration file
338dffb485Schristos    (which may get it by including <limits.h>) then use it to set
348dffb485Schristos    the number of bits in a host char.  If not, use the same size
358dffb485Schristos    as the target.  */
368dffb485Schristos 
378dffb485Schristos #if defined (CHAR_BIT)
388dffb485Schristos #define HOST_CHAR_BIT CHAR_BIT
398dffb485Schristos #else
408dffb485Schristos #define HOST_CHAR_BIT TARGET_CHAR_BIT
418dffb485Schristos #endif
428dffb485Schristos 
438dffb485Schristos #ifdef __MSDOS__
448dffb485Schristos # define CANT_FORK
458dffb485Schristos # define GLOBAL_CURDIR
468dffb485Schristos # define DIRNAME_SEPARATOR ';'
478dffb485Schristos #endif
488dffb485Schristos 
498dffb485Schristos #if !defined (__CYGWIN__) && defined (_WIN32)
508dffb485Schristos # define DIRNAME_SEPARATOR ';'
518dffb485Schristos #endif
528dffb485Schristos 
538dffb485Schristos #ifndef DIRNAME_SEPARATOR
548dffb485Schristos #define DIRNAME_SEPARATOR ':'
558dffb485Schristos #endif
568dffb485Schristos 
578dffb485Schristos #ifndef SLASH_STRING
588dffb485Schristos #define SLASH_STRING "/"
598dffb485Schristos #endif
608dffb485Schristos 
618dffb485Schristos #endif /* COMMON_HOST_DEFS_H */
62