|
@ -1,9 +1,9 @@ |
|
|
diff -u -r ../elfutils-0.166/src/ar.c ./src/ar.c
|
|
|
diff -u -r ../elfutils-0.168/src/ar.c ./src/ar.c
|
|
|
--- ../elfutils-0.166/src/ar.c 2015-11-27 08:36:29.000000000 -0500
|
|
|
--- ../elfutils-0.168/src/ar.c 2016-12-28 04:32:01.000000000 -0500
|
|
|
+++ ./src/ar.c 2016-05-04 14:29:53.035376083 -0400
|
|
|
+++ ./src/ar.c 2017-01-14 19:32:22.921445583 -0500
|
|
|
@@ -1,1536 +1 @@
|
|
|
@@ -1,1528 +1 @@
|
|
|
-/* Create, modify, and extract from archives.
|
|
|
-/* Create, modify, and extract from archives.
|
|
|
- Copyright (C) 2005-2012 Red Hat, Inc.
|
|
|
- Copyright (C) 2005-2012, 2016 Red Hat, Inc.
|
|
|
- This file is part of elfutils.
|
|
|
- This file is part of elfutils.
|
|
|
- Written by Ulrich Drepper <drepper@redhat.com>, 2005.
|
|
|
- Written by Ulrich Drepper <drepper@redhat.com>, 2005.
|
|
|
-
|
|
|
-
|
|
@ -50,7 +50,6 @@ diff -u -r ../elfutils-0.166/src/ar.c ./src/ar.c |
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-/* Name and version of program. */
|
|
|
-/* Name and version of program. */
|
|
|
-static void print_version (FILE *stream, struct argp_state *state);
|
|
|
|
|
|
-ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
|
|
|
-ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
|
|
|
-
|
|
|
-
|
|
|
-/* Prototypes for local functions. */
|
|
|
-/* Prototypes for local functions. */
|
|
@ -281,20 +280,6 @@ diff -u -r ../elfutils-0.166/src/ar.c ./src/ar.c |
|
|
-}
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-/* Print the version information. */
|
|
|
|
|
|
-static void
|
|
|
|
|
|
-print_version (FILE *stream, struct argp_state *state __attribute__ ((unused)))
|
|
|
|
|
|
-{
|
|
|
|
|
|
- fprintf (stream, "ar (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION);
|
|
|
|
|
|
- fprintf (stream, gettext ("\
|
|
|
|
|
|
-Copyright (C) %s Red Hat, Inc.\n\
|
|
|
|
|
|
-This is free software; see the source for copying conditions. There is NO\n\
|
|
|
|
|
|
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
|
|
|
|
|
|
-"), "2012");
|
|
|
|
|
|
- fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
|
|
|
|
|
|
-}
|
|
|
|
|
|
-
|
|
|
|
|
|
-
|
|
|
|
|
|
-/* Handle program arguments. */
|
|
|
-/* Handle program arguments. */
|
|
|
-static error_t
|
|
|
-static error_t
|
|
|
-parse_opt (int key, char *arg __attribute__ ((unused)),
|
|
|
-parse_opt (int key, char *arg __attribute__ ((unused)),
|
|
@ -857,7 +842,10 @@ diff -u -r ../elfutils-0.166/src/ar.c ./src/ar.c |
|
|
- off_t end_off, int newfd)
|
|
|
- off_t end_off, int newfd)
|
|
|
-{
|
|
|
-{
|
|
|
- struct ar_hdr arhdr;
|
|
|
- struct ar_hdr arhdr;
|
|
|
- char tmpbuf[sizeof (arhdr.ar_name) + 1];
|
|
|
- /* The ar_name is not actually zero teminated, but we need that for
|
|
|
|
|
|
- snprintf. Also if the name is too long, then the string starts
|
|
|
|
|
|
- with '/' plus an index off number (decimal). */
|
|
|
|
|
|
- char tmpbuf[sizeof (arhdr.ar_name) + 2];
|
|
|
-
|
|
|
-
|
|
|
- bool changed_header = memb->long_name_off != -1;
|
|
|
- bool changed_header = memb->long_name_off != -1;
|
|
|
- if (changed_header)
|
|
|
- if (changed_header)
|
|
@ -1459,7 +1447,11 @@ diff -u -r ../elfutils-0.166/src/ar.c ./src/ar.c |
|
|
-
|
|
|
-
|
|
|
- /* Create the header. */
|
|
|
- /* Create the header. */
|
|
|
- struct ar_hdr arhdr;
|
|
|
- struct ar_hdr arhdr;
|
|
|
- char tmpbuf[sizeof (arhdr.ar_name) + 1];
|
|
|
- /* The ar_name is not actually zero teminated, but we
|
|
|
|
|
|
- need that for snprintf. Also if the name is too
|
|
|
|
|
|
- long, then the string starts with '/' plus an index
|
|
|
|
|
|
- off number (decimal). */
|
|
|
|
|
|
- char tmpbuf[sizeof (arhdr.ar_name) + 2];
|
|
|
- if (all->long_name_off == -1)
|
|
|
- if (all->long_name_off == -1)
|
|
|
- {
|
|
|
- {
|
|
|
- size_t namelen = strlen (all->name);
|
|
|
- size_t namelen = strlen (all->name);
|
|
@ -1469,7 +1461,7 @@ diff -u -r ../elfutils-0.166/src/ar.c ./src/ar.c |
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- else
|
|
|
- {
|
|
|
- {
|
|
|
- snprintf (tmpbuf, sizeof (arhdr.ar_name) + 1, "/%-*ld",
|
|
|
- snprintf (tmpbuf, sizeof (tmpbuf), "/%-*ld",
|
|
|
- (int) sizeof (arhdr.ar_name), all->long_name_off);
|
|
|
- (int) sizeof (arhdr.ar_name), all->long_name_off);
|
|
|
- memcpy (arhdr.ar_name, tmpbuf, sizeof (arhdr.ar_name));
|
|
|
- memcpy (arhdr.ar_name, tmpbuf, sizeof (arhdr.ar_name));
|
|
|
- }
|
|
|
- }
|
|
|