From f03b1f0d44b7b45484b5225e927dfec2998afed7 Mon Sep 17 00:00:00 2001 From: Fred Fish Date: Tue, 20 Jul 1993 22:07:39 +0000 Subject: [PATCH] * libnlm.h (nlm_obj_tdata): Rename hidden struct members to avoid apparent Sun C preprocessor recursion. Fix access macros. * nlmcode.h: Remove spurious '&' before several array references. --- bfd/ChangeLog | 6 ++++++ bfd/libnlm.h | 24 ++++++++++++------------ bfd/nlmcode.h | 8 ++++---- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e91146cf5e7..1de9b39393c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +Tue Jul 20 15:02:23 1993 Fred Fish (fnf@deneb.cygnus.com) + + * libnlm.h (nlm_obj_tdata): Rename hidden struct members to avoid + apparent Sun C preprocessor recursion. Fix access macros. + * nlmcode.h: Remove spurious '&' before several array references. + Tue Jul 20 14:36:27 1993 Jim Kingdon (kingdon@deneb.cygnus.com) * Rename for DOS uniqueness: coff-m68k-un.c -> coff-u68k.c diff --git a/bfd/libnlm.h b/bfd/libnlm.h index 33824b9eba0..eb8d8f5887f 100644 --- a/bfd/libnlm.h +++ b/bfd/libnlm.h @@ -74,21 +74,21 @@ extern boolean bfd_nlm64_set_arch_mach struct nlm_obj_tdata { /* Actual data, but ref like ptr */ - Nlm_Internal_Fixed_Header nlm_fixed_header[1]; - Nlm_Internal_Variable_Header nlm_variable_header[1]; - Nlm_Internal_Version_Header nlm_version_header[1]; - Nlm_Internal_Copyright_Header nlm_copyright_header[1]; - Nlm_Internal_Extended_Header nlm_extended_header[1]; - Nlm_Internal_Custom_Header nlm_custom_header[1]; + Nlm_Internal_Fixed_Header nlm_fixed_hdr[1]; + Nlm_Internal_Variable_Header nlm_variable_hdr[1]; + Nlm_Internal_Version_Header nlm_version_hdr[1]; + Nlm_Internal_Copyright_Header nlm_copyright_hdr[1]; + Nlm_Internal_Extended_Header nlm_extended_hdr[1]; + Nlm_Internal_Custom_Header nlm_custom_hdr[1]; }; #define nlm_tdata(bfd) ((bfd) -> tdata.nlm_obj_data) -#define nlm_fixed_header(bfd) (nlm_tdata(bfd) -> nlm_fixed_header) -#define nlm_variable_header(bfd) (nlm_tdata(bfd) -> nlm_variable_header) -#define nlm_version_header(bfd) (nlm_tdata(bfd) -> nlm_version_header) -#define nlm_copyright_header(bfd) (nlm_tdata(bfd) -> nlm_copyright_header) -#define nlm_extended_header(bfd) (nlm_tdata(bfd) -> nlm_extended_header) -#define nlm_custom_header(bfd) (nlm_tdata(bfd) -> nlm_custom_header) +#define nlm_fixed_header(bfd) (nlm_tdata(bfd) -> nlm_fixed_hdr) +#define nlm_variable_header(bfd) (nlm_tdata(bfd) -> nlm_variable_hdr) +#define nlm_version_header(bfd) (nlm_tdata(bfd) -> nlm_version_hdr) +#define nlm_copyright_header(bfd) (nlm_tdata(bfd) -> nlm_copyright_hdr) +#define nlm_extended_header(bfd) (nlm_tdata(bfd) -> nlm_extended_hdr) +#define nlm_custom_header(bfd) (nlm_tdata(bfd) -> nlm_custom_hdr) /* The NLM code, data, and uninitialized sections have no names defined in the NLM, but bfd wants to give them names, so use the traditional diff --git a/bfd/nlmcode.h b/bfd/nlmcode.h index 127eb9437a1..741fe893067 100644 --- a/bfd/nlmcode.h +++ b/bfd/nlmcode.h @@ -96,7 +96,7 @@ DEFUN (nlm_object_p, (abfd), bfd * abfd) /* Check to see if we have an NLM file by matching the NLM signature. */ - if (strncmp (&x_fxdhdr.signature, NLM_SIGNATURE, NLM_SIGNATURE_SIZE) != 0) + if (strncmp (x_fxdhdr.signature, NLM_SIGNATURE, NLM_SIGNATURE_SIZE) != 0) { wrong: bfd_error = wrong_format; @@ -107,7 +107,7 @@ DEFUN (nlm_object_p, (abfd), bfd * abfd) a sane version number after doing byte swapping appropriate for this XVEC. (Hack alert!) */ - if (get_word (abfd, (bfd_byte *) &x_fxdhdr.version) > 0xFFFF) + if (get_word (abfd, (bfd_byte *) x_fxdhdr.version) > 0xFFFF) { goto wrong; } @@ -269,7 +269,7 @@ DEFUN (nlm_swap_variable_header_in, (abfd), /* Read and convert the stackSize field. */ - if (bfd_read ((PTR) &temp, sizeof (temp), 1, abfd) != sizeof (temp)) + if (bfd_read ((PTR) temp, sizeof (temp), 1, abfd) != sizeof (temp)) { bfd_error = system_call_error; return (false); @@ -278,7 +278,7 @@ DEFUN (nlm_swap_variable_header_in, (abfd), /* Read and convert the reserved field. */ - if (bfd_read ((PTR) &temp, sizeof (temp), 1, abfd) != sizeof (temp)) + if (bfd_read ((PTR) temp, sizeof (temp), 1, abfd) != sizeof (temp)) { bfd_error = system_call_error; return (false); -- 2.30.2