summaryrefslogtreecommitdiff
path: root/devel/libmalloc/files/patch-aa
blob: ed3519ea43369688e9e4ff2ce02d325c70d3bf8a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
*** Makefile.orig	Mon Jan  9 08:34:51 1995
--- Makefile	Sun Jan 29 14:16:10 1995
***************
*** 11,18 ****
  # puts malloc.h in $INCDIR.
  #
  
! LIBDIR=$(HOME)/lib/$(ARCH)
! INCDIR=$(HOME)/include
  
  # neutralize SystemV genius
  SHELL=/bin/sh
--- 11,18 ----
  # puts malloc.h in $INCDIR.
  #
  
! LIBDIR=${PREFIX}/lib
! INCDIR=${PREFIX}/include
  
  # neutralize SystemV genius
  SHELL=/bin/sh
***************
*** 46,52 ****
  # -DHAVE_MMAP can be defined for SunOS4.x and other systems
  # that have a general purpose mmap call that allows memory-mapped files.
  #
! NORMALDEFS=-DHAVE_MMAP # -DSTDHEADERS -DSHORTNAMES -DUSESTDIO
  
  # CC = gcc -ansi -Wall -O # -pedantic # add -pedantic if you fixed your includes.
  # SGI needs cc -xansi -D__STDC__ on Irix4.0.5.
--- 46,52 ----
  # -DHAVE_MMAP can be defined for SunOS4.x and other systems
  # that have a general purpose mmap call that allows memory-mapped files.
  #
! NORMALDEFS=-DHAVE_MMAP -DSTDHEADERS # -DSHORTNAMES -DUSESTDIO
  
  # CC = gcc -ansi -Wall -O # -pedantic # add -pedantic if you fixed your includes.
  # SGI needs cc -xansi -D__STDC__ on Irix4.0.5.
***************
*** 62,72 ****
--- 62,75 ----
  RANLIB = ranlib
  
  LDFLAGS=#-Bstatic
+ VERSION=1.18
  
  # only developers should have to change stuff below this line
  
  EXT=_d
  LIBMALLOC=libmalloc$(EXT).a
+ LIBSMALLOC=libmalloc${EXT}.so.${VERSION}
+ 
  PROGS=testmalloc$(EXT) simumalloc$(EXT) teststomp$(EXT) maltrace$(EXT)
  
  DEFINES= $(NORMALDEFS) $(DEBUGDEFS)
***************
*** 108,116 ****
  
  CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(DEFINES)
  
! all: pass clean libmalloc
  
! pass: $(LIBMALLOC) $(PROGS) out$(EXT)
  
  libmalloc:
  	$(MAKE) -f Makefile $(MFLAGS) CC="$(CC)" DEBUGDEFS="$(FASTDEFS)" \
--- 111,126 ----
  
  CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(DEFINES)
  
! .c.o:
! 	${CC} -c ${CFLAGS} $< -o $@
! 	${CC} -c -fpic ${CFLAGS} $< -o shared/$@
! 
! all: mkdir pass clean libmalloc
  
! mkdir:
! 	@mkdir -p shared
! 
! pass: $(LIBMALLOC) $(LIBSMALLOC) $(PROGS) out$(EXT)
  
  libmalloc:
  	$(MAKE) -f Makefile $(MFLAGS) CC="$(CC)" DEBUGDEFS="$(FASTDEFS)" \
***************
*** 134,139 ****
--- 144,155 ----
  	-$(RANLIB) $(LIBMALLOC)
  	touch .lib$(EXT)
  
+ $(LIBSMALLOC): $(OBJS)
+ 	rm -f $(LIBSMALLOC) ${SPLAYOBJ}
+ 	cd splay; $(MAKE) $(MFLAGS) DEFINES="$(DEFINES)" \
+ 		LIBMALLOC=../$(LIBMALLOC) CC="$(CC) -fpic"
+ 	(cd shared; ld -Bshareable -o ../$(LIBSMALLOC) $(OBJS) ../${SPLAYOBJ})
+ 
  $(SPLAYOBJ): .foo
  	cd splay; $(MAKE) $(MFLAGS) DEFINES="$(DEFINES)" \
  		LIBMALLOC=../$(LIBMALLOC) CC="$(CC)"
***************
*** 149,155 ****
  onefile.c: $(SRCS) $(SPLAYSRC)
  	rm -f onefile.c
  	cat $(SRCS) $(SPLAYSRC) | sed '/RCSID/d' > onefile.c
! 	
  .lint: $(SRCS)
  	($(LINT) $(LINTFLAGS) $(DEFINES) $(INCLUDES) $(SRCS); \
  		$(LINT) $(LINTFLAGS) $(DEFINES) $(INCLUDES) -I.. $(SPLAYSRC)) \
--- 165,171 ----
  onefile.c: $(SRCS) $(SPLAYSRC)
  	rm -f onefile.c
  	cat $(SRCS) $(SPLAYSRC) | sed '/RCSID/d' > onefile.c
! 
  .lint: $(SRCS)
  	($(LINT) $(LINTFLAGS) $(DEFINES) $(INCLUDES) $(SRCS); \
  		$(LINT) $(LINTFLAGS) $(DEFINES) $(INCLUDES) -I.. $(SPLAYSRC)) \
***************
*** 163,169 ****
  
  clean:
  	-rm -f *.o \#* *~ core a.out gmon.out mon.out onefile.c *.sL prof.out
! 	cd splay; $(MAKE) clean
  
  veryclean: clean cleanprogs
  	make EXT= cleanprogs
--- 179,186 ----
  
  clean:
  	-rm -f *.o \#* *~ core a.out gmon.out mon.out onefile.c *.sL prof.out
! 	-(cd shared; rm -f *.o \#* *~)
! 	(cd splay; $(MAKE) clean)
  
  veryclean: clean cleanprogs
  	make EXT= cleanprogs
***************
*** 174,181 ****
  	-$(RANLIB) $(LIBDIR)/libmalloc.a
  	install -c -m 644 libmalloc_d.a $(LIBDIR)
  	-$(RANLIB) $(LIBDIR)/libmalloc_d.a
  	install -c -m 644 malloc.h $(INCDIR)
! 	
  .id: $(SRCS)
  	mkid $(SRCS) $(SPLAYSRC) $(HDRS) $(SPLAYHDR)
  	touch .id
--- 191,199 ----
  	-$(RANLIB) $(LIBDIR)/libmalloc.a
  	install -c -m 644 libmalloc_d.a $(LIBDIR)
  	-$(RANLIB) $(LIBDIR)/libmalloc_d.a
+ 	install -c -m 644 ${LIBSMALLOC} $(LIBDIR)
  	install -c -m 644 malloc.h $(INCDIR)
! 
  .id: $(SRCS)
  	mkid $(SRCS) $(SPLAYSRC) $(HDRS) $(SPLAYHDR)
  	touch .id
--- externs.h.orig	Fri Jul 12 13:00:12 1996
+++ externs.h	Fri Jul 12 13:01:21 1996
@@ -39,7 +39,7 @@
 
 extern int fputs proto((const char *, FILE *));
 extern int fflush proto((FILE *));
-extern int setvbuf proto((FILE *, char *, int, memsize_t));
+extern int setvbuf proto((FILE *, char *, int, size_t));
 
 /* Character Handling: <string.h> */