# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # dwz # dwz/Makefile # dwz/pkg-descr # dwz/distinfo # dwz/files # dwz/files/patch-Makefile # dwz/files/patch-dwz.c # dwz/files/patch-obstack.c # dwz/files/patch-hashtab.c # dwz/files/patch-obstack.h # dwz/files/patch-sha1.c # dwz/pkg-plist # echo c - dwz mkdir -p dwz > /dev/null 2>&1 echo x - dwz/Makefile sed 's/^X//' >dwz/Makefile << '0e4dfcb0423dfc411c7e38ce7e11eded' X# $FreeBSD$ X XPORTNAME= dwz XDISTVERSION= 0.13 XCATEGORIES= devel XMASTER_SITES= https://sourceware.org/ftp/dwz/releases/ X XMAINTAINER= bcallah@openbsd.org XCOMMENT= DWARF optimization and duplicate removal tool X XLICENSE= GPLv3+ XLICENSE_FILE= ${WRKSRC}/COPYING3 X XWRKSRC= ${WRKDIR}/${PORTNAME} X X.include 0e4dfcb0423dfc411c7e38ce7e11eded echo x - dwz/pkg-descr sed 's/^X//' >dwz/pkg-descr << '1fe219b8000263f7311b29a5321a1680' Xdwz is a program that attempts to optimize DWARF debugging information Xcontained in ELF shared libraries and ELF executables for size, by Xreplacing DWARF information representation with equivalent smaller Xrepresentation where possible and by reducing the amount of duplication Xusing techniques from DWARF standard appendix E - creating XDW_TAG_partial_unit compilation units (CUs) for duplicated information Xand using DW_TAG_imported_unit to import it into each CU that needs it. X XWWW: https://sourceware.org/dwz/ 1fe219b8000263f7311b29a5321a1680 echo x - dwz/distinfo sed 's/^X//' >dwz/distinfo << 'e8fd8a9726a249739b70fa79b451b7d4' XTIMESTAMP = 1586106922 XSHA256 (dwz-0.13.tar.gz) = 05166ad9d3173e92a517ef94aa2b149bca7d717a8c2ea88e28e4e39670c491ec XSIZE (dwz-0.13.tar.gz) = 143279 e8fd8a9726a249739b70fa79b451b7d4 echo c - dwz/files mkdir -p dwz/files > /dev/null 2>&1 echo x - dwz/files/patch-Makefile sed 's/^X//' >dwz/files/patch-Makefile << '67138a84f532a69954b8a56313648a34' X--- Makefile.orig 2019-10-02 10:26:03.011230367 -0400 X+++ Makefile 2020-04-05 14:21:31.102940000 -0400 X@@ -1,22 +1,17 @@ X-ifneq ($(srcdir),) X-VPATH = $(srcdir) X-else X-srcdir=$(shell pwd) X-endif X-CFLAGS = -O2 -g X-DWZ_VERSION := $(shell cat $(srcdir)/VERSION) X-override CFLAGS += -Wall -W -D_FILE_OFFSET_BITS=64 -DDWZ_VERSION='"$(DWZ_VERSION)"' X-prefix = /usr X+srcdir = . X+DWZ_VERSION != cat $(srcdir)/VERSION X+CFLAGS += -D_FILE_OFFSET_BITS=64 -DDWZ_VERSION='"$(DWZ_VERSION)"' X+prefix = ${PREFIX} X exec_prefix = $(prefix) X bindir = $(exec_prefix)/bin X datarootdir = $(prefix)/share X-mandir = $(datarootdir)/man X-OBJECTS = dwz.o hashtab.o sha1.o dwarfnames.o X-dwz: $(OBJECTS) X- $(CC) $(LDFLAGS) -o $@ $^ -lelf X-install: dwz X- install -D dwz $(DESTDIR)$(bindir)/dwz X- install -D -m 644 $(srcdir)/dwz.1 $(DESTDIR)$(mandir)/man1/dwz.1 X+mandir = $(prefix)/man X+OBJECTS = dwz.o hashtab.o sha1.o dwarfnames.o obstack.o X+all: $(OBJECTS) X+ $(CC) $(LDFLAGS) -o dwz ${OBJECTS} -lelf X+install: all X+ install -c -s dwz $(DESTDIR)$(bindir)/dwz X+ install -c -m 644 $(srcdir)/dwz.1 $(DESTDIR)$(mandir)/man1/dwz.1 X clean: X rm -f $(OBJECTS) *~ core* dwz $(TEST_EXECS) $(DWZ_TEST_SOURCES) \ X dwz.log dwz.sum X@@ -51,7 +46,7 @@ DWZ_TEST_SOURCES := $(patsubst %.o,%-for-test.c,$(OBJE X sed 's/__GNUC__/NOT_DEFINED/' $< > $@ X X dwz-for-test: $(DWZ_TEST_SOURCES) X- $(CC) $(DWZ_TEST_SOURCES) -O2 -g -lelf -o $@ -Wall -W -DDEVEL \ X+ $(CC) $(DWZ_TEST_SOURCES) -O2 -g -lelf -o $@ -DDEVEL \ X -D_FILE_OFFSET_BITS=64 -DDWZ_VERSION='"for-test"' -I$(srcdir) X X min: X@@ -84,7 +79,7 @@ varval: X # WARNING: Couldn't find the global config file. X DEJAGNU ?= /dev/null X X-check: dwz $(TEST_EXECS) X+check: all $(TEST_EXECS) X mkdir -p testsuite-bin X cd testsuite-bin; ln -sf $(PWD)/dwz . X export DEJAGNU=$(DEJAGNU); \ 67138a84f532a69954b8a56313648a34 echo x - dwz/files/patch-dwz.c sed 's/^X//' >dwz/files/patch-dwz.c << '29322fd71705fc4876ce72662bf49a63' X--- dwz.c.orig 2019-10-02 10:26:03.015230341 -0400 X+++ dwz.c 2020-04-05 14:12:16.054408000 -0400 X@@ -20,11 +20,11 @@ X X #include X #include X-#include X #include X #include X #include X #include X+#include X #include X #include X #include X@@ -34,7 +34,7 @@ X #include X #include X X-#include X+#include "obstack.h" X X #include X #include "dwarf2.h" X@@ -136,6 +136,29 @@ dwz_oom (void) X longjmp (oom_buf, 1); X } X X+/* error () wrapper based on the Linux manual page at X+ http://man7.org/linux/man-pages/man3/error.3.html. */ X+static void X+error (int status, int errnum, const char *fmt, ...) X+{ X+ va_list ap; X+ X+ fprintf (stderr, "%s: ", getprogname()); X+ if (fmt != NULL) { X+ va_start (ap, fmt); X+ vfprintf (stderr, fmt, ap); X+ va_end (ap); X+ } X+ X+ if (errnum != 0) X+ fprintf (stderr, ": %s", strerror(errnum)); X+ X+ fputc ('\n', stderr); X+ X+ if (status != 0) X+ exit (status); X+} X+ X /* General obstack for struct dw_cu, dw_die, also used for temporary X vectors. */ X static struct obstack ob; X@@ -10300,7 +10323,7 @@ fdopen_dso (int fd, const char *name) X int i; X DSO *dso = NULL; X X- elf = elf_begin (fd, ELF_C_READ_MMAP, NULL); X+ elf = elf_begin (fd, ELF_C_READ, NULL); X if (elf == NULL) X { X error (0, 0, "cannot open ELF file: %s", elf_errmsg (-1)); X@@ -10338,7 +10361,7 @@ fdopen_dso (int fd, const char *name) X goto error_out; X } X X- elf_flagelf (elf, ELF_C_SET, ELF_F_LAYOUT | ELF_F_PERMISSIVE); X+ elf_flagelf (elf, ELF_C_SET, ELF_F_LAYOUT); X X memset (dso, 0, sizeof(DSO)); X dso->elf = elf; X@@ -10829,7 +10852,7 @@ write_dso (DSO *dso, const char *file, struct stat *st X free (shstrtab); X return 1; X } X- elf_flagelf (elf, ELF_C_SET, ELF_F_LAYOUT | ELF_F_PERMISSIVE); X+ elf_flagelf (elf, ELF_C_SET, ELF_F_LAYOUT); X for (i = 0; i < ehdr.e_phnum; ++i) X { X GElf_Phdr *phdr, phdr_mem; X@@ -10902,7 +10925,7 @@ write_dso (DSO *dso, const char *file, struct stat *st X } X } X X- if (elf_update (elf, ELF_C_WRITE_MMAP) == -1) X+ if (elf_update (elf, ELF_C_WRITE) == -1) X { X error (0, 0, "%s: elf_update failed", dso->filename); X unlink (file); X@@ -12089,7 +12112,7 @@ optimize_multifile (void) X error (0, 0, "Could not create new ELF headers"); X goto fail; X } X- elf_flagelf (elf, ELF_C_SET, ELF_F_LAYOUT | ELF_F_PERMISSIVE); X+ elf_flagelf (elf, ELF_C_SET, ELF_F_LAYOUT); X X sha1_init_ctx (&ctx); X for (i = 0; debug_sections[i].name; i++) X@@ -12176,7 +12199,7 @@ optimize_multifile (void) X data->d_off = 0; X data->d_align = 1; X X- if (elf_update (elf, ELF_C_WRITE_MMAP) == -1) X+ if (elf_update (elf, ELF_C_WRITE) == -1) X { X error (0, 0, "%s: elf_update failed", multifile); X goto fail; 29322fd71705fc4876ce72662bf49a63 echo x - dwz/files/patch-obstack.c sed 's/^X//' >dwz/files/patch-obstack.c << 'cd03cb0a8ea1128bfb4281176f5aee83' X--- obstack.c.orig 2020-04-05 14:12:16.123238000 -0400 X+++ obstack.c 2020-04-05 14:12:16.161009000 -0400 X@@ -0,0 +1,511 @@ X+/* obstack.c - subroutines used implicitly by object stack macros X+ Copyright (C) 1988,89,90,91,92,93,94,96,97 Free Software Foundation, Inc. X+ X+ X+ NOTE: This source is derived from an old version taken from the GNU C X+ Library (glibc). X+ X+ This program is free software; you can redistribute it and/or modify it X+ under the terms of the GNU General Public License as published by the X+ Free Software Foundation; either version 2, or (at your option) any X+ later version. X+ X+ This program is distributed in the hope that it will be useful, X+ but WITHOUT ANY WARRANTY; without even the implied warranty of X+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X+ GNU General Public License for more details. X+ X+ You should have received a copy of the GNU General Public License X+ along with this program; if not, write to the Free Software X+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, X+ USA. */ X+ X+#ifdef HAVE_CONFIG_H X+#include X+#endif X+ X+#include "obstack.h" X+ X+/* NOTE BEFORE MODIFYING THIS FILE: This version number must be X+ incremented whenever callers compiled using an old obstack.h can no X+ longer properly call the functions in this obstack.c. */ X+#define OBSTACK_INTERFACE_VERSION 1 X+ X+/* Comment out all this code if we are using the GNU C Library, and are not X+ actually compiling the library itself, and the installed library X+ supports the same library interface we do. This code is part of the GNU X+ C Library, but also included in many other GNU distributions. Compiling X+ and linking in this code is a waste when using the GNU C library X+ (especially if it is a shared library). Rather than having every GNU X+ program understand `configure --with-gnu-libc' and omit the object X+ files, it is simpler to just do this in the source for each such file. */ X+ X+#include /* Random thing to get __GNU_LIBRARY__. */ X+#include X+#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1 X+#include X+#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION X+#define ELIDE_CODE X+#endif X+#endif X+ X+ X+#ifndef ELIDE_CODE X+ X+ X+#define POINTER void * X+ X+/* Determine default alignment. */ X+struct fooalign {char x; double d;}; X+#define DEFAULT_ALIGNMENT \ X+ ((PTR_INT_TYPE) ((char *) &((struct fooalign *) 0)->d - (char *) 0)) X+/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT. X+ But in fact it might be less smart and round addresses to as much as X+ DEFAULT_ROUNDING. So we prepare for it to do that. */ X+union fooround {long x; double d;}; X+#define DEFAULT_ROUNDING (sizeof (union fooround)) X+ X+/* When we copy a long block of data, this is the unit to do it with. X+ On some machines, copying successive ints does not work; X+ in such a case, redefine COPYING_UNIT to `long' (if that works) X+ or `char' as a last resort. */ X+#ifndef COPYING_UNIT X+#define COPYING_UNIT int X+#endif X+ X+ X+/* The functions allocating more room by calling `obstack_chunk_alloc' X+ jump to the handler pointed to by `obstack_alloc_failed_handler'. X+ This variable by default points to the internal function X+ `print_and_abort'. */ X+static void print_and_abort (void); X+void (*obstack_alloc_failed_handler) (void) = print_and_abort; X+ X+/* Exit value used when `print_and_abort' is used. */ X+#if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H X+#include X+#endif X+#ifndef EXIT_FAILURE X+#define EXIT_FAILURE 1 X+#endif X+int obstack_exit_failure = EXIT_FAILURE; X+ X+/* The non-GNU-C macros copy the obstack into this global variable X+ to avoid multiple evaluation. */ X+ X+struct obstack *_obstack; X+ X+/* Define a macro that either calls functions with the traditional malloc/free X+ calling interface, or calls functions with the mmalloc/mfree interface X+ (that adds an extra first argument), based on the state of use_extra_arg. X+ For free, do not use ?:, since some compilers, like the MIPS compilers, X+ do not allow (expr) ? void : void. */ X+ X+#if defined (__STDC__) && __STDC__ X+#define CALL_CHUNKFUN(h, size) \ X+ (((h) -> use_extra_arg) \ X+ ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \ X+ : (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size))) X+ X+#define CALL_FREEFUN(h, old_chunk) \ X+ do { \ X+ if ((h) -> use_extra_arg) \ X+ (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \ X+ else \ X+ (*(void (*) (void *)) (h)->freefun) ((old_chunk)); \ X+ } while (0) X+#else X+#define CALL_CHUNKFUN(h, size) \ X+ (((h) -> use_extra_arg) \ X+ ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \ X+ : (*(struct _obstack_chunk *(*) ()) (h)->chunkfun) ((size))) X+ X+#define CALL_FREEFUN(h, old_chunk) \ X+ do { \ X+ if ((h) -> use_extra_arg) \ X+ (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \ X+ else \ X+ (*(void (*) ()) (h)->freefun) ((old_chunk)); \ X+ } while (0) X+#endif X+ X+ X+/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default). X+ Objects start on multiples of ALIGNMENT (0 means use default). X+ CHUNKFUN is the function to use to allocate chunks, X+ and FREEFUN the function to free them. X+ X+ Return nonzero if successful, zero if out of memory. X+ To recover from an out of memory error, X+ free up some memory, then call this again. */ X+ X+int X+_obstack_begin (struct obstack *h, int size, int alignment, X+ POINTER (*chunkfun) (long), void (*freefun) (void *)) X+{ X+ register struct _obstack_chunk *chunk; /* points to new chunk */ X+ X+ if (alignment == 0) X+ alignment = (int) DEFAULT_ALIGNMENT; X+ if (size == 0) X+ /* Default size is what GNU malloc can fit in a 4096-byte block. */ X+ { X+ /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc. X+ Use the values for range checking, because if range checking is off, X+ the extra bytes won't be missed terribly, but if range checking is on X+ and we used a larger request, a whole extra 4096 bytes would be X+ allocated. X+ X+ These number are irrelevant to the new GNU malloc. I suspect it is X+ less sensitive to the size of the request. */ X+ int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1)) X+ + 4 + DEFAULT_ROUNDING - 1) X+ & ~(DEFAULT_ROUNDING - 1)); X+ size = 4096 - extra; X+ } X+ X+ h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun; X+ h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun; X+ h->chunk_size = size; X+ h->alignment_mask = alignment - 1; X+ h->use_extra_arg = 0; X+ X+ chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size); X+ if (!chunk) X+ (*obstack_alloc_failed_handler) (); X+ h->next_free = h->object_base = chunk->contents; X+ h->chunk_limit = chunk->limit X+ = (char *) chunk + h->chunk_size; X+ chunk->prev = 0; X+ /* The initial chunk now contains no empty object. */ X+ h->maybe_empty_object = 0; X+ h->alloc_failed = 0; X+ return 1; X+} X+ X+int X+_obstack_begin_1 (struct obstack *h, int size, int alignment, X+ POINTER (*chunkfun) (POINTER, long), X+ void (*freefun) (POINTER, POINTER), POINTER arg) X+{ X+ register struct _obstack_chunk *chunk; /* points to new chunk */ X+ X+ if (alignment == 0) X+ alignment = (int) DEFAULT_ALIGNMENT; X+ if (size == 0) X+ /* Default size is what GNU malloc can fit in a 4096-byte block. */ X+ { X+ /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc. X+ Use the values for range checking, because if range checking is off, X+ the extra bytes won't be missed terribly, but if range checking is on X+ and we used a larger request, a whole extra 4096 bytes would be X+ allocated. X+ X+ These number are irrelevant to the new GNU malloc. I suspect it is X+ less sensitive to the size of the request. */ X+ int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1)) X+ + 4 + DEFAULT_ROUNDING - 1) X+ & ~(DEFAULT_ROUNDING - 1)); X+ size = 4096 - extra; X+ } X+ X+ h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun; X+ h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun; X+ h->chunk_size = size; X+ h->alignment_mask = alignment - 1; X+ h->extra_arg = arg; X+ h->use_extra_arg = 1; X+ X+ chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size); X+ if (!chunk) X+ (*obstack_alloc_failed_handler) (); X+ h->next_free = h->object_base = chunk->contents; X+ h->chunk_limit = chunk->limit X+ = (char *) chunk + h->chunk_size; X+ chunk->prev = 0; X+ /* The initial chunk now contains no empty object. */ X+ h->maybe_empty_object = 0; X+ h->alloc_failed = 0; X+ return 1; X+} X+ X+/* Allocate a new current chunk for the obstack *H X+ on the assumption that LENGTH bytes need to be added X+ to the current object, or a new object of length LENGTH allocated. X+ Copies any partial object from the end of the old chunk X+ to the beginning of the new one. */ X+ X+void X+_obstack_newchunk (struct obstack *h, int length) X+{ X+ register struct _obstack_chunk *old_chunk = h->chunk; X+ register struct _obstack_chunk *new_chunk; X+ register long new_size; X+ register long obj_size = h->next_free - h->object_base; X+ register long i; X+ long already; X+ X+ /* Compute size for new chunk. */ X+ new_size = (obj_size + length) + (obj_size >> 3) + 100; X+ if (new_size < h->chunk_size) X+ new_size = h->chunk_size; X+ X+ /* Allocate and initialize the new chunk. */ X+ new_chunk = CALL_CHUNKFUN (h, new_size); X+ if (!new_chunk) X+ (*obstack_alloc_failed_handler) (); X+ h->chunk = new_chunk; X+ new_chunk->prev = old_chunk; X+ new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size; X+ X+ /* Move the existing object to the new chunk. X+ Word at a time is fast and is safe if the object X+ is sufficiently aligned. */ X+ if (h->alignment_mask + 1 >= DEFAULT_ALIGNMENT) X+ { X+ for (i = obj_size / sizeof (COPYING_UNIT) - 1; X+ i >= 0; i--) X+ ((COPYING_UNIT *)new_chunk->contents)[i] X+ = ((COPYING_UNIT *)h->object_base)[i]; X+ /* We used to copy the odd few remaining bytes as one extra COPYING_UNIT, X+ but that can cross a page boundary on a machine X+ which does not do strict alignment for COPYING_UNITS. */ X+ already = obj_size / sizeof (COPYING_UNIT) * sizeof (COPYING_UNIT); X+ } X+ else X+ already = 0; X+ /* Copy remaining bytes one by one. */ X+ for (i = already; i < obj_size; i++) X+ new_chunk->contents[i] = h->object_base[i]; X+ X+ /* If the object just copied was the only data in OLD_CHUNK, X+ free that chunk and remove it from the chain. X+ But not if that chunk might contain an empty object. */ X+ if (h->object_base == old_chunk->contents && ! h->maybe_empty_object) X+ { X+ new_chunk->prev = old_chunk->prev; X+ CALL_FREEFUN (h, old_chunk); X+ } X+ X+ h->object_base = new_chunk->contents; X+ h->next_free = h->object_base + obj_size; X+ /* The new chunk certainly contains no empty object yet. */ X+ h->maybe_empty_object = 0; X+} X+ X+/* Return nonzero if object OBJ has been allocated from obstack H. X+ This is here for debugging. X+ If you use it in a program, you are probably losing. */ X+ X+/* Suppress -Wmissing-prototypes warning. We don't want to declare this in X+ obstack.h because it is just for debugging. */ X+int _obstack_allocated_p (struct obstack *h, POINTER obj); X+ X+int X+_obstack_allocated_p (struct obstack *h, POINTER obj) X+{ X+ register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ X+ register struct _obstack_chunk *plp; /* point to previous chunk if any */ X+ X+ lp = (h)->chunk; X+ /* We use >= rather than > since the object cannot be exactly at X+ the beginning of the chunk but might be an empty object exactly X+ at the end of an adjacent chunk. */ X+ while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj)) X+ { X+ plp = lp->prev; X+ lp = plp; X+ } X+ return lp != 0; X+} X+ X+/* Free objects in obstack H, including OBJ and everything allocate X+ more recently than OBJ. If OBJ is zero, free everything in H. */ X+ X+#undef obstack_free X+ X+/* This function has two names with identical definitions. X+ This is the first one, called from non-ANSI code. */ X+ X+void X+_obstack_free (struct obstack *h, POINTER obj) X+{ X+ register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ X+ register struct _obstack_chunk *plp; /* point to previous chunk if any */ X+ X+ lp = h->chunk; X+ /* We use >= because there cannot be an object at the beginning of a chunk. X+ But there can be an empty object at that address X+ at the end of another chunk. */ X+ while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj)) X+ { X+ plp = lp->prev; X+ CALL_FREEFUN (h, lp); X+ lp = plp; X+ /* If we switch chunks, we can't tell whether the new current X+ chunk contains an empty object, so assume that it may. */ X+ h->maybe_empty_object = 1; X+ } X+ if (lp) X+ { X+ h->object_base = h->next_free = (char *) (obj); X+ h->chunk_limit = lp->limit; X+ h->chunk = lp; X+ } X+ else if (obj != 0) X+ /* obj is not in any of the chunks! */ X+ abort (); X+} X+ X+/* This function is used from ANSI code. */ X+ X+void X+obstack_free (struct obstack *h, POINTER obj) X+{ X+ register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ X+ register struct _obstack_chunk *plp; /* point to previous chunk if any */ X+ X+ lp = h->chunk; X+ /* We use >= because there cannot be an object at the beginning of a chunk. X+ But there can be an empty object at that address X+ at the end of another chunk. */ X+ while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj)) X+ { X+ plp = lp->prev; X+ CALL_FREEFUN (h, lp); X+ lp = plp; X+ /* If we switch chunks, we can't tell whether the new current X+ chunk contains an empty object, so assume that it may. */ X+ h->maybe_empty_object = 1; X+ } X+ if (lp) X+ { X+ h->object_base = h->next_free = (char *) (obj); X+ h->chunk_limit = lp->limit; X+ h->chunk = lp; X+ } X+ else if (obj != 0) X+ /* obj is not in any of the chunks! */ X+ abort (); X+} X+ X+int X+_obstack_memory_used (struct obstack *h) X+{ X+ register struct _obstack_chunk* lp; X+ register int nbytes = 0; X+ X+ for (lp = h->chunk; lp != 0; lp = lp->prev) X+ { X+ nbytes += lp->limit - (char *) lp; X+ } X+ return nbytes; X+} X+ X+/* Define the error handler. */ X+#ifndef _ X+# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC X+# include X+# ifndef _ X+# define _(Str) gettext (Str) X+# endif X+# else X+# define _(Str) (Str) X+# endif X+#endif X+ X+static void X+print_and_abort (void) X+{ X+ fputs (_("memory exhausted\n"), stderr); X+ exit (obstack_exit_failure); X+} X+ X+#if 0 X+/* These are now turned off because the applications do not use it X+ and it uses bcopy via obstack_grow, which causes trouble on sysV. */ X+ X+/* Now define the functional versions of the obstack macros. X+ Define them to simply use the corresponding macros to do the job. */ X+ X+/* The function names appear in parentheses in order to prevent X+ the macro-definitions of the names from being expanded there. */ X+ X+POINTER (obstack_base) (struct obstack *obstack) X+{ X+ return obstack_base (obstack); X+} X+ X+POINTER (obstack_next_free) (struct obstack *obstack) X+{ X+ return obstack_next_free (obstack); X+} X+ X+int (obstack_object_size) (struct obstack *obstack) X+{ X+ return obstack_object_size (obstack); X+} X+ X+int (obstack_room) (struct obstack *obstack) X+{ X+ return obstack_room (obstack); X+} X+ X+int (obstack_make_room) (struct obstack *obstack, int length) X+{ X+ return obstack_make_room (obstack, length); X+} X+ X+void (obstack_grow) (struct obstack *obstack, POINTER pointer, int length) X+{ X+ obstack_grow (obstack, pointer, length); X+} X+ X+void (obstack_grow0) (struct obstack *obstack, POINTER pointer, int length) X+{ X+ obstack_grow0 (obstack, pointer, length); X+} X+ X+void (obstack_1grow) (struct obstack *obstack, int character) X+{ X+ obstack_1grow (obstack, character); X+} X+ X+void (obstack_blank) (struct obstack *obstack, int length) X+{ X+ obstack_blank (obstack, length); X+} X+ X+void (obstack_1grow_fast) (struct obstack *obstack, int character) X+{ X+ obstack_1grow_fast (obstack, character); X+} X+ X+void (obstack_blank_fast) (struct obstack *obstack, int length) X+{ X+ obstack_blank_fast (obstack, length); X+} X+ X+POINTER (obstack_finish) (struct obstack *obstack) X+{ X+ return obstack_finish (obstack); X+} X+ X+POINTER (obstack_alloc) (struct obstack *obstack, int length) X+{ X+ return obstack_alloc (obstack, length); X+} X+ X+POINTER (obstack_copy) (struct obstack *obstack, POINTER pointer, int length) X+{ X+ return obstack_copy (obstack, pointer, length); X+} X+ X+POINTER (obstack_copy0) (struct obstack *obstack, POINTER pointer, int length) X+{ X+ return obstack_copy0 (obstack, pointer, length); X+} X+ X+#endif /* 0 */ X+ X+#endif /* !ELIDE_CODE */ cd03cb0a8ea1128bfb4281176f5aee83 echo x - dwz/files/patch-hashtab.c sed 's/^X//' >dwz/files/patch-hashtab.c << '663292c1dd2182e14be618eb689998ff' X--- hashtab.c.orig 2019-10-02 10:26:03.003230419 -0400 X+++ hashtab.c 2020-04-05 14:12:16.089254000 -0400 X@@ -37,8 +37,8 @@ Boston, MA 02110-1301, USA. */ X #include X #include "hashtab.h" X X-#include X-#if __BYTE_ORDER == __BIG_ENDIAN X+#include X+#if _BYTE_ORDER == _BIG_ENDIAN X # define WORDS_BIGENDIAN 1 X #endif X 663292c1dd2182e14be618eb689998ff echo x - dwz/files/patch-obstack.h sed 's/^X//' >dwz/files/patch-obstack.h << '59cf25a7ac397d66a6fe1ede8c3183f9' X--- obstack.h.orig 2020-04-05 14:12:16.193157000 -0400 X+++ obstack.h 2020-04-05 14:12:16.233805000 -0400 X@@ -0,0 +1,547 @@ X+/* obstack.h - object stack macros X+ Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, X+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 X+ Free Software Foundation, Inc. X+ X+ X+ NOTE: The canonical source of this file is maintained with the GNU C Library. X+ Bugs can be reported to bug-glibc@gnu.org. X+ X+ This program is free software; you can redistribute it and/or modify it X+ under the terms of the GNU General Public License as published by the X+ Free Software Foundation; either version 2, or (at your option) any X+ later version. X+ X+ This program is distributed in the hope that it will be useful, X+ but WITHOUT ANY WARRANTY; without even the implied warranty of X+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X+ GNU General Public License for more details. X+ X+ You should have received a copy of the GNU General Public License X+ along with this program; if not, write to the Free Software X+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, X+ USA. */ X+ X+/* Summary: X+ X+All the apparent functions defined here are macros. The idea X+is that you would use these pre-tested macros to solve a X+very specific set of problems, and they would run fast. X+Caution: no side-effects in arguments please!! They may be X+evaluated MANY times!! X+ X+These macros operate a stack of objects. Each object starts life X+small, and may grow to maturity. (Consider building a word syllable X+by syllable.) An object can move while it is growing. Once it has X+been "finished" it never changes address again. So the "top of the X+stack" is typically an immature growing object, while the rest of the X+stack is of mature, fixed size and fixed address objects. X+ X+These routines grab large chunks of memory, using a function you X+supply, called `obstack_chunk_alloc'. On occasion, they free chunks, X+by calling `obstack_chunk_free'. You must define them and declare X+them before using any obstack macros. X+ X+Each independent stack is represented by a `struct obstack'. X+Each of the obstack macros expects a pointer to such a structure X+as the first argument. X+ X+One motivation for this package is the problem of growing char strings X+in symbol tables. Unless you are "fascist pig with a read-only mind" X+--Gosper's immortal quote from HAKMEM item 154, out of context--you X+would not like to put any arbitrary upper limit on the length of your X+symbols. X+ X+In practice this often means you will build many short symbols and a X+few long symbols. At the time you are reading a symbol you don't know X+how long it is. One traditional method is to read a symbol into a X+buffer, realloc()ating the buffer every time you try to read a symbol X+that is longer than the buffer. This is beaut, but you still will X+want to copy the symbol from the buffer to a more permanent X+symbol-table entry say about half the time. X+ X+With obstacks, you can work differently. Use one obstack for all symbol X+names. As you read a symbol, grow the name in the obstack gradually. X+When the name is complete, finalize it. Then, if the symbol exists already, X+free the newly read name. X+ X+The way we do this is to take a large chunk, allocating memory from X+low addresses. When you want to build a symbol in the chunk you just X+add chars above the current "high water mark" in the chunk. When you X+have finished adding chars, because you got to the end of the symbol, X+you know how long the chars are, and you can create a new object. X+Mostly the chars will not burst over the highest address of the chunk, X+because you would typically expect a chunk to be (say) 100 times as X+long as an average object. X+ X+In case that isn't clear, when we have enough chars to make up X+the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed) X+so we just point to it where it lies. No moving of chars is X+needed and this is the second win: potentially long strings need X+never be explicitly shuffled. Once an object is formed, it does not X+change its address during its lifetime. X+ X+When the chars burst over a chunk boundary, we allocate a larger X+chunk, and then copy the partly formed object from the end of the old X+chunk to the beginning of the new larger chunk. We then carry on X+accreting characters to the end of the object as we normally would. X+ X+A special macro is provided to add a single char at a time to a X+growing object. This allows the use of register variables, which X+break the ordinary 'growth' macro. X+ X+Summary: X+ We allocate large chunks. X+ We carve out one object at a time from the current chunk. X+ Once carved, an object never moves. X+ We are free to append data of any size to the currently X+ growing object. X+ Exactly one object is growing in an obstack at any one time. X+ You can run one obstack per control block. X+ You may have as many control blocks as you dare. X+ Because of the way we do it, you can `unwind' an obstack X+ back to a previous state. (You may remove objects much X+ as you would with a stack.) X+*/ X+ X+ X+/* Don't do the contents of this file more than once. */ X+ X+#ifndef _OBSTACK_H X+#define _OBSTACK_H 1 X+ X+#ifdef __cplusplus X+extern "C" { X+#endif X+ X+/* We use subtraction of (char *) 0 instead of casting to int X+ because on word-addressable machines a simple cast to int X+ may ignore the byte-within-word field of the pointer. */ X+ X+#ifndef __PTR_TO_INT X+# define __PTR_TO_INT(P) ((P) - (char *) 0) X+#endif X+ X+#ifndef __INT_TO_PTR X+# define __INT_TO_PTR(P) ((P) + (char *) 0) X+#endif X+ X+/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is X+ defined, as with GNU C, use that; that way we don't pollute the X+ namespace with 's symbols. Otherwise, if is X+ available, include it and use ptrdiff_t. In traditional C, long is X+ the best that we can do. */ X+ X+#ifdef __PTRDIFF_TYPE__ X+# define PTR_INT_TYPE __PTRDIFF_TYPE__ X+#else X+# ifdef HAVE_STDDEF_H X+# include X+# define PTR_INT_TYPE ptrdiff_t X+# else X+# define PTR_INT_TYPE long X+# endif X+#endif X+ X+#if defined _LIBC || defined HAVE_STRING_H X+# include X+# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N)) X+#else X+# ifdef memcpy X+# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N)) X+# else X+# define _obstack_memcpy(To, From, N) bcopy ((char *)(From), (To), (N)) X+# endif X+#endif X+ X+struct _obstack_chunk /* Lives at front of each chunk. */ X+{ X+ char *limit; /* 1 past end of this chunk */ X+ struct _obstack_chunk *prev; /* address of prior chunk or NULL */ X+ char contents[4]; /* objects begin here */ X+}; X+ X+struct obstack /* control current object in current chunk */ X+{ X+ long chunk_size; /* preferred size to allocate chunks in */ X+ struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */ X+ char *object_base; /* address of object we are building */ X+ char *next_free; /* where to add next char to current object */ X+ char *chunk_limit; /* address of char after current chunk */ X+ PTR_INT_TYPE temp; /* Temporary for some macros. */ X+ int alignment_mask; /* Mask of alignment for each object. */ X+ /* These prototypes vary based on `use_extra_arg', and we use X+ casts to the prototypeless function type in all assignments, X+ but having prototypes here quiets -Wstrict-prototypes. */ X+ struct _obstack_chunk *(*chunkfun) (void *, long); X+ void (*freefun) (void *, struct _obstack_chunk *); X+ void *extra_arg; /* first arg for chunk alloc/dealloc funcs */ X+ unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */ X+ unsigned maybe_empty_object:1;/* There is a possibility that the current X+ chunk contains a zero-length object. This X+ prevents freeing the chunk if we allocate X+ a bigger chunk to replace it. */ X+ unsigned alloc_failed:1; /* No longer used, as we now call the failed X+ handler on error, but retained for binary X+ compatibility. */ X+}; X+ X+/* Declare the external functions we use; they are in obstack.c. */ X+ X+extern void _obstack_newchunk (struct obstack *, int); X+extern void _obstack_free (struct obstack *, void *); X+extern int _obstack_begin (struct obstack *, int, int, X+ void *(*) (long), void (*) (void *)); X+extern int _obstack_begin_1 (struct obstack *, int, int, X+ void *(*) (void *, long), X+ void (*) (void *, void *), void *); X+extern int _obstack_memory_used (struct obstack *); X+ X+/* Do the function-declarations after the structs X+ but before defining the macros. */ X+ X+void obstack_init (struct obstack *obstack); X+ X+void * obstack_alloc (struct obstack *obstack, int size); X+ X+void * obstack_copy (struct obstack *obstack, void *address, int size); X+void * obstack_copy0 (struct obstack *obstack, void *address, int size); X+ X+void obstack_free (struct obstack *obstack, void *block); X+ X+void obstack_blank (struct obstack *obstack, int size); X+ X+void obstack_grow (struct obstack *obstack, void *data, int size); X+void obstack_grow0 (struct obstack *obstack, void *data, int size); X+ X+void obstack_1grow (struct obstack *obstack, int data_char); X+void obstack_ptr_grow (struct obstack *obstack, void *data); X+void obstack_int_grow (struct obstack *obstack, int data); X+ X+void * obstack_finish (struct obstack *obstack); X+ X+int obstack_object_size (struct obstack *obstack); X+ X+int obstack_room (struct obstack *obstack); X+void obstack_make_room (struct obstack *obstack, int size); X+void obstack_1grow_fast (struct obstack *obstack, int data_char); X+void obstack_ptr_grow_fast (struct obstack *obstack, void *data); X+void obstack_int_grow_fast (struct obstack *obstack, int data); X+void obstack_blank_fast (struct obstack *obstack, int size); X+ X+void * obstack_base (struct obstack *obstack); X+void * obstack_next_free (struct obstack *obstack); X+int obstack_alignment_mask (struct obstack *obstack); X+int obstack_chunk_size (struct obstack *obstack); X+int obstack_memory_used (struct obstack *obstack); X+ X+int obstack_printf(struct obstack *obstack, const char *__restrict fmt, ...); X+ X+/* Error handler called when `obstack_chunk_alloc' failed to allocate X+ more memory. This can be set to a user defined function. The X+ default action is to print a message and abort. */ X+extern void (*obstack_alloc_failed_handler) (void); X+ X+/* Exit value used when `print_and_abort' is used. */ X+extern int obstack_exit_failure; X+ X+/* Pointer to beginning of object being allocated or to be allocated next. X+ Note that this might not be the final address of the object X+ because a new chunk might be needed to hold the final size. */ X+ X+#define obstack_base(h) ((h)->object_base) X+ X+/* Size for allocating ordinary chunks. */ X+ X+#define obstack_chunk_size(h) ((h)->chunk_size) X+ X+/* Pointer to next byte not yet allocated in current chunk. */ X+ X+#define obstack_next_free(h) ((h)->next_free) X+ X+/* Mask specifying low bits that should be clear in address of an object. */ X+ X+#define obstack_alignment_mask(h) ((h)->alignment_mask) X+ X+/* To prevent prototype warnings provide complete argument list in X+ standard C version. */ X+# define obstack_init(h) \ X+ _obstack_begin ((h), 0, 0, \ X+ (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free) X+ X+# define obstack_begin(h, size) \ X+ _obstack_begin ((h), (size), 0, \ X+ (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free) X+ X+# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \ X+ _obstack_begin ((h), (size), (alignment), \ X+ (void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun)) X+ X+# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \ X+ _obstack_begin_1 ((h), (size), (alignment), \ X+ (void *(*) (void *, long)) (chunkfun), \ X+ (void (*) (void *, void *)) (freefun), (arg)) X+ X+# define obstack_chunkfun(h, newchunkfun) \ X+ ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun)) X+ X+# define obstack_freefun(h, newfreefun) \ X+ ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun)) X+ X+#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar)) X+ X+#define obstack_blank_fast(h,n) ((h)->next_free += (n)) X+ X+#define obstack_memory_used(h) _obstack_memory_used (h) X+ X+#if defined __GNUC__ && defined __STDC__ && __STDC__ X+/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and X+ does not implement __extension__. But that compiler doesn't define X+ __GNUC_MINOR__. */ X+# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__) X+# define __extension__ X+# endif X+ X+/* For GNU C, if not -traditional, X+ we can define these macros to compute all args only once X+ without using a global variable. X+ Also, we can avoid using the `temp' slot, to make faster code. */ X+ X+# define obstack_object_size(OBSTACK) \ X+ __extension__ \ X+ ({ struct obstack *__o = (OBSTACK); \ X+ (unsigned) (__o->next_free - __o->object_base); }) X+ X+# define obstack_room(OBSTACK) \ X+ __extension__ \ X+ ({ struct obstack *__o = (OBSTACK); \ X+ (unsigned) (__o->chunk_limit - __o->next_free); }) X+ X+# define obstack_make_room(OBSTACK,length) \ X+__extension__ \ X+({ struct obstack *__o = (OBSTACK); \ X+ int __len = (length); \ X+ if (__o->chunk_limit - __o->next_free < __len) \ X+ _obstack_newchunk (__o, __len); \ X+ (void) 0; }) X+ X+# define obstack_empty_p(OBSTACK) \ X+ __extension__ \ X+ ({ struct obstack *__o = (OBSTACK); \ X+ (__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); }) X+ X+# define obstack_grow(OBSTACK,where,length) \ X+__extension__ \ X+({ struct obstack *__o = (OBSTACK); \ X+ int __len = (length); \ X+ if (__o->next_free + __len > __o->chunk_limit) \ X+ _obstack_newchunk (__o, __len); \ X+ _obstack_memcpy (__o->next_free, (where), __len); \ X+ __o->next_free += __len; \ X+ (void) 0; }) X+ X+# define obstack_grow0(OBSTACK,where,length) \ X+__extension__ \ X+({ struct obstack *__o = (OBSTACK); \ X+ int __len = (length); \ X+ if (__o->next_free + __len + 1 > __o->chunk_limit) \ X+ _obstack_newchunk (__o, __len + 1); \ X+ _obstack_memcpy (__o->next_free, (where), __len); \ X+ __o->next_free += __len; \ X+ *(__o->next_free)++ = 0; \ X+ (void) 0; }) X+ X+# define obstack_1grow(OBSTACK,datum) \ X+__extension__ \ X+({ struct obstack *__o = (OBSTACK); \ X+ if (__o->next_free + 1 > __o->chunk_limit) \ X+ _obstack_newchunk (__o, 1); \ X+ obstack_1grow_fast (__o, datum); \ X+ (void) 0; }) X+ X+/* These assume that the obstack alignment is good enough for pointers or ints, X+ and that the data added so far to the current object X+ shares that much alignment. */ X+ X+# define obstack_ptr_grow(OBSTACK,datum) \ X+__extension__ \ X+({ struct obstack *__o = (OBSTACK); \ X+ if (__o->next_free + sizeof (void *) > __o->chunk_limit) \ X+ _obstack_newchunk (__o, sizeof (void *)); \ X+ obstack_ptr_grow_fast (__o, datum); }) X+ X+# define obstack_int_grow(OBSTACK,datum) \ X+__extension__ \ X+({ struct obstack *__o = (OBSTACK); \ X+ if (__o->next_free + sizeof (int) > __o->chunk_limit) \ X+ _obstack_newchunk (__o, sizeof (int)); \ X+ obstack_int_grow_fast (__o, datum); }) X+ X+# define obstack_ptr_grow_fast(OBSTACK,aptr) \ X+__extension__ \ X+({ struct obstack *__o1 = (OBSTACK); \ X+ *(const void **) __o1->next_free = (aptr); \ X+ __o1->next_free += sizeof (const void *); \ X+ (void) 0; }) X+ X+# define obstack_int_grow_fast(OBSTACK,aint) \ X+__extension__ \ X+({ struct obstack *__o1 = (OBSTACK); \ X+ *(int *) __o1->next_free = (aint); \ X+ __o1->next_free += sizeof (int); \ X+ (void) 0; }) X+ X+# define obstack_blank(OBSTACK,length) \ X+__extension__ \ X+({ struct obstack *__o = (OBSTACK); \ X+ int __len = (length); \ X+ if (__o->chunk_limit - __o->next_free < __len) \ X+ _obstack_newchunk (__o, __len); \ X+ obstack_blank_fast (__o, __len); \ X+ (void) 0; }) X+ X+# define obstack_alloc(OBSTACK,length) \ X+__extension__ \ X+({ struct obstack *__h = (OBSTACK); \ X+ obstack_blank (__h, (length)); \ X+ obstack_finish (__h); }) X+ X+# define obstack_copy(OBSTACK,where,length) \ X+__extension__ \ X+({ struct obstack *__h = (OBSTACK); \ X+ obstack_grow (__h, (where), (length)); \ X+ obstack_finish (__h); }) X+ X+# define obstack_copy0(OBSTACK,where,length) \ X+__extension__ \ X+({ struct obstack *__h = (OBSTACK); \ X+ obstack_grow0 (__h, (where), (length)); \ X+ obstack_finish (__h); }) X+ X+/* The local variable is named __o1 to avoid a name conflict X+ when obstack_blank is called. */ X+# define obstack_finish(OBSTACK) \ X+__extension__ \ X+({ struct obstack *__o1 = (OBSTACK); \ X+ void *value; \ X+ value = (void *) __o1->object_base; \ X+ if (__o1->next_free == value) \ X+ __o1->maybe_empty_object = 1; \ X+ __o1->next_free \ X+ = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\ X+ & ~ (__o1->alignment_mask)); \ X+ if (__o1->next_free - (char *)__o1->chunk \ X+ > __o1->chunk_limit - (char *)__o1->chunk) \ X+ __o1->next_free = __o1->chunk_limit; \ X+ __o1->object_base = __o1->next_free; \ X+ value; }) X+ X+# define obstack_free(OBSTACK, OBJ) \ X+__extension__ \ X+({ struct obstack *__o = (OBSTACK); \ X+ void *__obj = (void *) (OBJ); \ X+ if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \ X+ __o->next_free = __o->object_base = (char *) __obj; \ X+ else (obstack_free) (__o, __obj); }) X+ X+#else /* not __GNUC__ or not __STDC__ */ X+ X+# define obstack_object_size(h) \ X+ (unsigned) ((h)->next_free - (h)->object_base) X+ X+# define obstack_room(h) \ X+ (unsigned) ((h)->chunk_limit - (h)->next_free) X+ X+# define obstack_empty_p(h) \ X+ ((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0) X+ X+/* Note that the call to _obstack_newchunk is enclosed in (..., 0) X+ so that we can avoid having void expressions X+ in the arms of the conditional expression. X+ Casting the third operand to void was tried before, X+ but some compilers won't accept it. */ X+ X+# define obstack_make_room(h,length) \ X+( (h)->temp = (length), \ X+ (((h)->next_free + (h)->temp > (h)->chunk_limit) \ X+ ? (_obstack_newchunk ((h), (h)->temp), 0) : 0)) X+ X+# define obstack_grow(h,where,length) \ X+( (h)->temp = (length), \ X+ (((h)->next_free + (h)->temp > (h)->chunk_limit) \ X+ ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \ X+ _obstack_memcpy ((h)->next_free, (where), (h)->temp), \ X+ (h)->next_free += (h)->temp) X+ X+# define obstack_grow0(h,where,length) \ X+( (h)->temp = (length), \ X+ (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \ X+ ? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \ X+ _obstack_memcpy ((h)->next_free, (where), (h)->temp), \ X+ (h)->next_free += (h)->temp, \ X+ *((h)->next_free)++ = 0) X+ X+# define obstack_1grow(h,datum) \ X+( (((h)->next_free + 1 > (h)->chunk_limit) \ X+ ? (_obstack_newchunk ((h), 1), 0) : 0), \ X+ obstack_1grow_fast (h, datum)) X+ X+# define obstack_ptr_grow(h,datum) \ X+( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \ X+ ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \ X+ obstack_ptr_grow_fast (h, datum)) X+ X+# define obstack_int_grow(h,datum) \ X+( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \ X+ ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \ X+ obstack_int_grow_fast (h, datum)) X+ X+# define obstack_ptr_grow_fast(h,aptr) \ X+ (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr)) X+ X+# define obstack_int_grow_fast(h,aint) \ X+ (((int *) ((h)->next_free += sizeof (int)))[-1] = (aptr)) X+ X+# define obstack_blank(h,length) \ X+( (h)->temp = (length), \ X+ (((h)->chunk_limit - (h)->next_free < (h)->temp) \ X+ ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \ X+ obstack_blank_fast (h, (h)->temp)) X+ X+# define obstack_alloc(h,length) \ X+ (obstack_blank ((h), (length)), obstack_finish ((h))) X+ X+# define obstack_copy(h,where,length) \ X+ (obstack_grow ((h), (where), (length)), obstack_finish ((h))) X+ X+# define obstack_copy0(h,where,length) \ X+ (obstack_grow0 ((h), (where), (length)), obstack_finish ((h))) X+ X+# define obstack_finish(h) \ X+( ((h)->next_free == (h)->object_base \ X+ ? (((h)->maybe_empty_object = 1), 0) \ X+ : 0), \ X+ (h)->temp = __PTR_TO_INT ((h)->object_base), \ X+ (h)->next_free \ X+ = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \ X+ & ~ ((h)->alignment_mask)), \ X+ (((h)->next_free - (char *) (h)->chunk \ X+ > (h)->chunk_limit - (char *) (h)->chunk) \ X+ ? ((h)->next_free = (h)->chunk_limit) : 0), \ X+ (h)->object_base = (h)->next_free, \ X+ (void *) __INT_TO_PTR ((h)->temp)) X+ X+# define obstack_free(h,obj) \ X+( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ X+ (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\ X+ ? (((h)->next_free = (h)->object_base \ X+ = (h)->temp + (char *) (h)->chunk), 0) \ X+ : ((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0))) X+ X+#endif /* not __GNUC__ or not __STDC__ */ X+ X+#ifdef __cplusplus X+} /* C++ */ X+#endif X+ X+#endif /* obstack.h */ 59cf25a7ac397d66a6fe1ede8c3183f9 echo x - dwz/files/patch-sha1.c sed 's/^X//' >dwz/files/patch-sha1.c << '114065b272609d65ad29033d793d437d' X--- sha1.c.orig 2019-10-02 10:26:03.003230419 -0400 X+++ sha1.c 2020-04-05 14:12:16.269464000 -0400 X@@ -27,9 +27,9 @@ X X #include X #include X-#include X+#include X X-#if __BYTE_ORDER == __BIG_ENDIAN X+#if _BYTE_ORDER == _BIG_ENDIAN X # define SWAP(n) (n) X #else X # define SWAP(n) \ 114065b272609d65ad29033d793d437d echo x - dwz/pkg-plist sed 's/^X//' >dwz/pkg-plist << '6cd0cf87cf3be2a4e0386bb5e60112da' Xbin/dwz Xman/man1/dwz.1.gz 6cd0cf87cf3be2a4e0386bb5e60112da exit