diff options
author | tnn <tnn@pkgsrc.org> | 2008-02-21 18:57:46 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2008-02-21 18:57:46 +0000 |
commit | a8aa30d6bb06141d697a4dfcbfdd418d9393ca26 (patch) | |
tree | f89bc2d64147f8d54fd7a87c28eb69ff486b7cce /devel/flex/patches | |
parent | 3e2a94e791ed7a93c3ce4cd835789c844526b933 (diff) | |
download | pkgsrc-a8aa30d6bb06141d697a4dfcbfdd418d9393ca26.tar.gz |
Add GNU realloc.c, needed because of AC_FUNC_REALLOC.
Will file a bug upstream.
Diffstat (limited to 'devel/flex/patches')
-rw-r--r-- | devel/flex/patches/patch-aa | 37 | ||||
-rw-r--r-- | devel/flex/patches/patch-ab | 13 |
2 files changed, 50 insertions, 0 deletions
diff --git a/devel/flex/patches/patch-aa b/devel/flex/patches/patch-aa new file mode 100644 index 00000000000..7855e53d5e7 --- /dev/null +++ b/devel/flex/patches/patch-aa @@ -0,0 +1,37 @@ +$NetBSD: patch-aa,v 1.3 2008/02/21 18:57:46 tnn Exp $ + +--- /dev/null 2008-02-21 19:43:14.000000000 +0100 ++++ realloc.c +@@ -0,0 +1,32 @@ ++/* rpl_realloc.c -- a replacement for broken realloc implementations ++ Copyright (C) 2001 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2, or (at your option) ++ any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software Foundation, ++ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ++ ++#include <stdlib.h> ++ ++void * ++rpl_realloc(void *ptr, size_t size) ++{ ++ if (!ptr) ++ return malloc(size); ++ if (!size) ++ { ++ if (ptr) ++ free(ptr); ++ return malloc(size); ++ } ++ return realloc(ptr, size); ++} diff --git a/devel/flex/patches/patch-ab b/devel/flex/patches/patch-ab new file mode 100644 index 00000000000..cd81057db18 --- /dev/null +++ b/devel/flex/patches/patch-ab @@ -0,0 +1,13 @@ +$NetBSD: patch-ab,v 1.3 2008/02/21 18:57:46 tnn Exp $ + +--- Makefile.in.orig 2008-02-21 19:44:15.000000000 +0100 ++++ Makefile.in +@@ -124,7 +124,7 @@ am_flex_OBJECTS = ccl.$(OBJEXT) dfa.$(OB + options.$(OBJEXT) scanopt.$(OBJEXT) buf.$(OBJEXT) \ + tables.$(OBJEXT) tables_shared.$(OBJEXT) filter.$(OBJEXT) \ + regex.$(OBJEXT) +-flex_OBJECTS = $(am_flex_OBJECTS) ++flex_OBJECTS = $(am_flex_OBJECTS) $(LIBOBJS) + flex_LDADD = $(LDADD) + DEFAULT_INCLUDES = -I. -I$(srcdir) -I. + depcomp = $(SHELL) $(top_srcdir)/depcomp |