This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi all, here's a patch against binutils-2.12 ./bfd/nlmcode.h which fixes a bug in nlmconv not writing correct NLM headers (copyright tag is not shown with NetWare 4.x and up). We use this patch now since binutils-2.9 without any problems; but it would be nice to have it in the sources now. The patch was already sent in ~ Nov 2000, but didnt made it into the sources for whatever reason.... hopefully this time... thanks, Guenter. PS: I'm currently not subscribed to the binutils list; so please reply directly, thanks! # Patch against bintutils-2.12 for displaying the # copyright string properly on all NetWare versions. # (c) Nov-2000 by Gabor Keresztfalvi <keresztg@mail.com> # http://home.sch.bme.hu/~keresztg/novell/howto/NLM-Linux-HOWTO.html # --- nlmcode.h.orig Tue Sep 18 11:57:25 2001 +++ nlmcode.h Mon Apr 1 09:13:49 2002 @@ -719,6 +719,28 @@ return false; } + /* Write out the copyright header if there is one. */ + if (find_nonzero ((PTR) nlm_copyright_header (abfd), + sizeof (Nlm_Internal_Copyright_Header))) + { + Nlm_External_Copyright_Header thdr; + + memcpy (thdr.stamp, "CoPyRiGhT=", 10); + amt = sizeof (thdr.stamp); + if (bfd_bwrite ((PTR) thdr.stamp, amt, abfd) != amt) + return false; + thdr.copyrightMessageLength[0] = + nlm_copyright_header (abfd)->copyrightMessageLength; + amt = 1; + if (bfd_bwrite ((PTR) thdr.copyrightMessageLength, amt, abfd) != amt) + return false; + /* The copyright message is a variable length string. */ + amt = nlm_copyright_header (abfd)->copyrightMessageLength + 1; + if (bfd_bwrite ((PTR) nlm_copyright_header (abfd)->copyrightMessage, + amt, abfd) != amt) + return false; + } + /* Write out the extended header if there is one. */ if (find_nonzero ((PTR) nlm_extended_header (abfd), sizeof (Nlm_Internal_Extended_Header))) @@ -815,28 +837,6 @@ (bfd_byte *) thdr.reserved5); if (bfd_bwrite ((PTR) &thdr, (bfd_size_type) sizeof (thdr), abfd) != sizeof (thdr)) - return false; - } - - /* Write out the copyright header if there is one. */ - if (find_nonzero ((PTR) nlm_copyright_header (abfd), - sizeof (Nlm_Internal_Copyright_Header))) - { - Nlm_External_Copyright_Header thdr; - - memcpy (thdr.stamp, "CoPyRiGhT=", 10); - amt = sizeof (thdr.stamp); - if (bfd_bwrite ((PTR) thdr.stamp, amt, abfd) != amt) - return false; - thdr.copyrightMessageLength[0] = - nlm_copyright_header (abfd)->copyrightMessageLength; - amt = 1; - if (bfd_bwrite ((PTR) thdr.copyrightMessageLength, amt, abfd) != amt) - return false; - /* The copyright message is a variable length string. */ - amt = nlm_copyright_header (abfd)->copyrightMessageLength + 1; - if (bfd_bwrite ((PTR) nlm_copyright_header (abfd)->copyrightMessage, - amt, abfd) != amt) return false; }
Attachment:
nlmcode.h_2.12_patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |