forked from Imagelibrary/binutils-gdb
PR32243, NAME_MAX does not exist on mingw-w64 without _POSIX_
PR 32243 * dlltool.c: Move forward decls. Delete unnecessary ones. (bfd_errmsg): Delete macro, define as inline function. (PATHMAX): Delete. (NAME_MAX): Define.
This commit is contained in:
@@ -271,16 +271,8 @@
|
|||||||
#define PAGE_MASK ((bfd_vma) (- COFF_PAGE_SIZE))
|
#define PAGE_MASK ((bfd_vma) (- COFF_PAGE_SIZE))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Get current BFD error message. */
|
#ifndef NAME_MAX
|
||||||
#define bfd_get_errmsg() (bfd_errmsg (bfd_get_error ()))
|
#define NAME_MAX 255
|
||||||
|
|
||||||
/* Forward references. */
|
|
||||||
static char *look_for_prog (const char *, const char *, int);
|
|
||||||
static char *deduce_name (const char *);
|
|
||||||
|
|
||||||
#ifdef DLLTOOL_MCORE_ELF
|
|
||||||
static void mcore_elf_cache_filename (const char *);
|
|
||||||
static void mcore_elf_gen_out_file (void);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SYS_WAIT_H
|
#ifdef HAVE_SYS_WAIT_H
|
||||||
@@ -483,9 +475,6 @@ static char * mcore_elf_linker_flags = NULL;
|
|||||||
#define DRECTVE_SECTION_NAME ".drectve"
|
#define DRECTVE_SECTION_NAME ".drectve"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* What's the right name for this ? */
|
|
||||||
#define PATHMAX 250
|
|
||||||
|
|
||||||
/* External name alias numbering starts here. */
|
/* External name alias numbering starts here. */
|
||||||
#define PREFIX_ALIAS_BASE 20000
|
#define PREFIX_ALIAS_BASE 20000
|
||||||
|
|
||||||
@@ -805,8 +794,9 @@ struct string_list
|
|||||||
|
|
||||||
static struct string_list *excludes;
|
static struct string_list *excludes;
|
||||||
|
|
||||||
|
/* Forward references. */
|
||||||
|
static char *deduce_name (const char *);
|
||||||
static const char *xlate (const char *);
|
static const char *xlate (const char *);
|
||||||
static bfd *make_delay_head (void);
|
|
||||||
static void dll_name_list_free_contents (dll_name_list_node_type *);
|
static void dll_name_list_free_contents (dll_name_list_node_type *);
|
||||||
static void identify_search_archive
|
static void identify_search_archive
|
||||||
(bfd *, void (*) (bfd *, bfd *, void *), void *);
|
(bfd *, void (*) (bfd *, bfd *, void *), void *);
|
||||||
@@ -814,6 +804,18 @@ static void identify_search_member (bfd *, bfd *, void *);
|
|||||||
static void identify_search_section (bfd *, asection *, void *);
|
static void identify_search_section (bfd *, asection *, void *);
|
||||||
static void inform (const char *, ...) ATTRIBUTE_PRINTF_1;
|
static void inform (const char *, ...) ATTRIBUTE_PRINTF_1;
|
||||||
|
|
||||||
|
#ifdef DLLTOOL_MCORE_ELF
|
||||||
|
static void mcore_elf_cache_filename (const char *);
|
||||||
|
static void mcore_elf_gen_out_file (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Get current BFD error message. */
|
||||||
|
static inline const char *
|
||||||
|
bfd_get_errmsg (void)
|
||||||
|
{
|
||||||
|
return bfd_errmsg (bfd_get_error ());
|
||||||
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
prefix_encode (char *start, unsigned code)
|
prefix_encode (char *start, unsigned code)
|
||||||
{
|
{
|
||||||
@@ -2778,7 +2780,7 @@ make_head (void)
|
|||||||
return abfd;
|
return abfd;
|
||||||
}
|
}
|
||||||
|
|
||||||
bfd *
|
static bfd *
|
||||||
make_delay_head (void)
|
make_delay_head (void)
|
||||||
{
|
{
|
||||||
FILE *f = fopen (TMP_HEAD_S, FOPEN_WT);
|
FILE *f = fopen (TMP_HEAD_S, FOPEN_WT);
|
||||||
|
|||||||
Reference in New Issue
Block a user