Make bfd_byte an int8_t, flagword a uint32_t
[binutils-gdb.git] / bfd / bfd-in.h
index 82e33d400f3fcc246b2ae7537ca1459385431349..eb6ee9cf816feda94d5b63fa833b88afea855e6d 100644 (file)
@@ -1,6 +1,6 @@
 /* Main header file for the bfd library -- portable access to object files.
 
-   Copyright (C) 1990-2022 Free Software Foundation, Inc.
+   Copyright (C) 1990-2023 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.
 
@@ -115,10 +115,10 @@ typedef uint64_t symvalue;
 
 #else /* not BFD64  */
 
-typedef unsigned long bfd_vma;
-typedef long bfd_signed_vma;
-typedef unsigned long symvalue;
-typedef unsigned long bfd_size_type;
+typedef uint32_t bfd_vma;
+typedef int32_t bfd_signed_vma;
+typedef uint32_t bfd_size_type;
+typedef uint32_t symvalue;
 
 #endif /* not BFD64  */
 
@@ -135,8 +135,8 @@ extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
 
 #define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
 
-typedef unsigned int flagword; /* 32 bits of flags */
-typedef unsigned char bfd_byte;
+typedef uint32_t flagword;     /* 32 bits of flags */
+typedef uint8_t bfd_byte;
 \f
 /* File formats.  */
 
@@ -335,25 +335,6 @@ extern void bfd_hash_traverse
    this size.  */
 extern unsigned long bfd_hash_set_default_size (unsigned long);
 
-/* Types of compressed DWARF debug sections.  */
-enum compressed_debug_section_type
-{
-  COMPRESS_DEBUG_NONE = 0,
-  COMPRESS_DEBUG = 1 << 0,
-  COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1,
-  COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2,
-  COMPRESS_DEBUG_ZSTD = COMPRESS_DEBUG | 1 << 3,
-  COMPRESS_UNKNOWN = 1 << 4
-};
-
-/* Tuple for compressed_debug_section_type and their name.  */
-
-struct compressed_type_tuple
-{
-  enum compressed_debug_section_type type;
-  const char *name;
-};
-
 /* This structure is used to keep track of stabs in sections
    information while linking.  */
 
@@ -384,10 +365,10 @@ extern int bfd_stat (bfd *, struct stat *);
 /* Deprecated old routines.  */
 #if __GNUC__
 #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD)                           \
-  (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__),        \
+  (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __func__),    \
    bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD)                          \
-  (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \
+  (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __func__),   \
    bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #else
 #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD)                           \
@@ -464,12 +445,6 @@ extern void bfd_free_window
   (bfd_window *);
 extern bool bfd_get_file_window
   (bfd *, file_ptr, bfd_size_type, bfd_window *, bool);
-
-
-extern enum compressed_debug_section_type bfd_get_compression_algorithm
-  (const char *);
-extern const char *bfd_get_compression_algorithm_name
-  (enum compressed_debug_section_type);
 \f
 /* Externally visible ELF routines.  */