git-svn: trunk@2874
Tomasz Kojm authored on 2007/02/28 11:44:23... | ... |
@@ -29,8 +29,6 @@ clamav_milter_SOURCES = \ |
29 | 29 |
$(top_srcdir)/shared/output.h \ |
30 | 30 |
$(top_srcdir)/shared/getopt.c \ |
31 | 31 |
$(top_srcdir)/shared/getopt.h \ |
32 |
- $(top_srcdir)/shared/memory.c \ |
|
33 |
- $(top_srcdir)/shared/memory.h \ |
|
34 | 32 |
$(top_srcdir)/shared/misc.c \ |
35 | 33 |
$(top_srcdir)/shared/misc.h \ |
36 | 34 |
$(top_srcdir)/shared/network.c \ |
... | ... |
@@ -73,15 +73,13 @@ PROGRAMS = $(sbin_PROGRAMS) |
73 | 73 |
am__clamav_milter_SOURCES_DIST = $(top_srcdir)/shared/cfgparser.c \ |
74 | 74 |
$(top_srcdir)/shared/cfgparser.h $(top_srcdir)/shared/output.c \ |
75 | 75 |
$(top_srcdir)/shared/output.h $(top_srcdir)/shared/getopt.c \ |
76 |
- $(top_srcdir)/shared/getopt.h $(top_srcdir)/shared/memory.c \ |
|
77 |
- $(top_srcdir)/shared/memory.h $(top_srcdir)/shared/misc.c \ |
|
76 |
+ $(top_srcdir)/shared/getopt.h $(top_srcdir)/shared/misc.c \ |
|
78 | 77 |
$(top_srcdir)/shared/misc.h $(top_srcdir)/shared/network.c \ |
79 | 78 |
$(top_srcdir)/shared/network.h clamav-milter.c |
80 | 79 |
@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@am_clamav_milter_OBJECTS = \ |
81 | 80 |
@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ cfgparser.$(OBJEXT) \ |
82 | 81 |
@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ output.$(OBJEXT) \ |
83 | 82 |
@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ getopt.$(OBJEXT) \ |
84 |
-@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ memory.$(OBJEXT) \ |
|
85 | 83 |
@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ misc.$(OBJEXT) \ |
86 | 84 |
@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ network.$(OBJEXT) \ |
87 | 85 |
@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ clamav-milter.$(OBJEXT) |
... | ... |
@@ -238,8 +236,6 @@ target_vendor = @target_vendor@ |
238 | 238 |
@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ $(top_srcdir)/shared/output.h \ |
239 | 239 |
@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ $(top_srcdir)/shared/getopt.c \ |
240 | 240 |
@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ $(top_srcdir)/shared/getopt.h \ |
241 |
-@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ $(top_srcdir)/shared/memory.c \ |
|
242 |
-@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ $(top_srcdir)/shared/memory.h \ |
|
243 | 241 |
@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ $(top_srcdir)/shared/misc.c \ |
244 | 242 |
@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ $(top_srcdir)/shared/misc.h \ |
245 | 243 |
@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ $(top_srcdir)/shared/network.c \ |
... | ... |
@@ -323,7 +319,6 @@ distclean-compile: |
323 | 323 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfgparser.Po@am__quote@ |
324 | 324 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clamav-milter.Po@am__quote@ |
325 | 325 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ |
326 |
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@ |
|
327 | 326 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ |
328 | 327 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network.Po@am__quote@ |
329 | 328 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output.Po@am__quote@ |
... | ... |
@@ -391,20 +386,6 @@ getopt.obj: $(top_srcdir)/shared/getopt.c |
391 | 391 |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
392 | 392 |
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getopt.obj `if test -f '$(top_srcdir)/shared/getopt.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/getopt.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/getopt.c'; fi` |
393 | 393 |
|
394 |
-memory.o: $(top_srcdir)/shared/memory.c |
|
395 |
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.o -MD -MP -MF "$(DEPDIR)/memory.Tpo" -c -o memory.o `test -f '$(top_srcdir)/shared/memory.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/memory.c; \ |
|
396 |
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memory.Tpo" "$(DEPDIR)/memory.Po"; else rm -f "$(DEPDIR)/memory.Tpo"; exit 1; fi |
|
397 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/shared/memory.c' object='memory.o' libtool=no @AMDEPBACKSLASH@ |
|
398 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
399 |
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.o `test -f '$(top_srcdir)/shared/memory.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/memory.c |
|
400 |
- |
|
401 |
-memory.obj: $(top_srcdir)/shared/memory.c |
|
402 |
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.obj -MD -MP -MF "$(DEPDIR)/memory.Tpo" -c -o memory.obj `if test -f '$(top_srcdir)/shared/memory.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/memory.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/memory.c'; fi`; \ |
|
403 |
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memory.Tpo" "$(DEPDIR)/memory.Po"; else rm -f "$(DEPDIR)/memory.Tpo"; exit 1; fi |
|
404 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/shared/memory.c' object='memory.obj' libtool=no @AMDEPBACKSLASH@ |
|
405 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
406 |
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.obj `if test -f '$(top_srcdir)/shared/memory.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/memory.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/memory.c'; fi` |
|
407 |
- |
|
408 | 394 |
misc.o: $(top_srcdir)/shared/misc.c |
409 | 395 |
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT misc.o -MD -MP -MF "$(DEPDIR)/misc.Tpo" -c -o misc.o `test -f '$(top_srcdir)/shared/misc.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/misc.c; \ |
410 | 396 |
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/misc.Tpo" "$(DEPDIR)/misc.Po"; else rm -f "$(DEPDIR)/misc.Tpo"; exit 1; fi |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
# |
2 |
-# Copyright (C) 2006 Tomasz Kojm <tkojm@clamav.net> |
|
2 |
+# Copyright (C) 2006 - 2007 Tomasz Kojm <tkojm@clamav.net> |
|
3 | 3 |
# |
4 | 4 |
# This program is free software; you can redistribute it and/or modify |
5 | 5 |
# it under the terms of the GNU General Public License as published by |
... | ... |
@@ -21,8 +21,6 @@ bin_PROGRAMS = clamconf |
21 | 21 |
clamconf_SOURCES = \ |
22 | 22 |
$(top_srcdir)/shared/cfgparser.c \ |
23 | 23 |
$(top_srcdir)/shared/cfgparser.h \ |
24 |
- $(top_srcdir)/shared/memory.c \ |
|
25 |
- $(top_srcdir)/shared/memory.h \ |
|
26 | 24 |
$(top_srcdir)/shared/misc.c \ |
27 | 25 |
$(top_srcdir)/shared/misc.h \ |
28 | 26 |
$(top_srcdir)/shared/getopt.c \ |
... | ... |
@@ -15,7 +15,7 @@ |
15 | 15 |
@SET_MAKE@ |
16 | 16 |
|
17 | 17 |
# |
18 |
-# Copyright (C) 2006 Tomasz Kojm <tkojm@clamav.net> |
|
18 |
+# Copyright (C) 2006 - 2007 Tomasz Kojm <tkojm@clamav.net> |
|
19 | 19 |
# |
20 | 20 |
# This program is free software; you can redistribute it and/or modify |
21 | 21 |
# it under the terms of the GNU General Public License as published by |
... | ... |
@@ -69,8 +69,8 @@ CONFIG_CLEAN_FILES = |
69 | 69 |
am__installdirs = "$(DESTDIR)$(bindir)" |
70 | 70 |
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) |
71 | 71 |
PROGRAMS = $(bin_PROGRAMS) |
72 |
-am_clamconf_OBJECTS = cfgparser.$(OBJEXT) memory.$(OBJEXT) \ |
|
73 |
- misc.$(OBJEXT) getopt.$(OBJEXT) clamconf.$(OBJEXT) |
|
72 |
+am_clamconf_OBJECTS = cfgparser.$(OBJEXT) misc.$(OBJEXT) \ |
|
73 |
+ getopt.$(OBJEXT) clamconf.$(OBJEXT) |
|
74 | 74 |
clamconf_OBJECTS = $(am_clamconf_OBJECTS) |
75 | 75 |
clamconf_LDADD = $(LDADD) |
76 | 76 |
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) |
... | ... |
@@ -217,8 +217,6 @@ target_vendor = @target_vendor@ |
217 | 217 |
clamconf_SOURCES = \ |
218 | 218 |
$(top_srcdir)/shared/cfgparser.c \ |
219 | 219 |
$(top_srcdir)/shared/cfgparser.h \ |
220 |
- $(top_srcdir)/shared/memory.c \ |
|
221 |
- $(top_srcdir)/shared/memory.h \ |
|
222 | 220 |
$(top_srcdir)/shared/misc.c \ |
223 | 221 |
$(top_srcdir)/shared/misc.h \ |
224 | 222 |
$(top_srcdir)/shared/getopt.c \ |
... | ... |
@@ -300,7 +298,6 @@ distclean-compile: |
300 | 300 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfgparser.Po@am__quote@ |
301 | 301 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clamconf.Po@am__quote@ |
302 | 302 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ |
303 |
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@ |
|
304 | 303 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ |
305 | 304 |
|
306 | 305 |
.c.o: |
... | ... |
@@ -338,20 +335,6 @@ cfgparser.obj: $(top_srcdir)/shared/cfgparser.c |
338 | 338 |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
339 | 339 |
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfgparser.obj `if test -f '$(top_srcdir)/shared/cfgparser.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/cfgparser.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/cfgparser.c'; fi` |
340 | 340 |
|
341 |
-memory.o: $(top_srcdir)/shared/memory.c |
|
342 |
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.o -MD -MP -MF "$(DEPDIR)/memory.Tpo" -c -o memory.o `test -f '$(top_srcdir)/shared/memory.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/memory.c; \ |
|
343 |
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memory.Tpo" "$(DEPDIR)/memory.Po"; else rm -f "$(DEPDIR)/memory.Tpo"; exit 1; fi |
|
344 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/shared/memory.c' object='memory.o' libtool=no @AMDEPBACKSLASH@ |
|
345 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
346 |
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.o `test -f '$(top_srcdir)/shared/memory.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/memory.c |
|
347 |
- |
|
348 |
-memory.obj: $(top_srcdir)/shared/memory.c |
|
349 |
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.obj -MD -MP -MF "$(DEPDIR)/memory.Tpo" -c -o memory.obj `if test -f '$(top_srcdir)/shared/memory.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/memory.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/memory.c'; fi`; \ |
|
350 |
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memory.Tpo" "$(DEPDIR)/memory.Po"; else rm -f "$(DEPDIR)/memory.Tpo"; exit 1; fi |
|
351 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/shared/memory.c' object='memory.obj' libtool=no @AMDEPBACKSLASH@ |
|
352 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
353 |
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.obj `if test -f '$(top_srcdir)/shared/memory.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/memory.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/memory.c'; fi` |
|
354 |
- |
|
355 | 341 |
misc.o: $(top_srcdir)/shared/misc.c |
356 | 342 |
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT misc.o -MD -MP -MF "$(DEPDIR)/misc.Tpo" -c -o misc.o `test -f '$(top_srcdir)/shared/misc.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/misc.c; \ |
357 | 343 |
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/misc.Tpo" "$(DEPDIR)/misc.Po"; else rm -f "$(DEPDIR)/misc.Tpo"; exit 1; fi |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
# |
2 |
-# Copyright (C) 2002 - 2006 Tomasz Kojm <tkojm@clamav.net> |
|
2 |
+# Copyright (C) 2002 - 2007 Tomasz Kojm <tkojm@clamav.net> |
|
3 | 3 |
# |
4 | 4 |
# This program is free software; you can redistribute it and/or modify |
5 | 5 |
# it under the terms of the GNU General Public License as published by |
... | ... |
@@ -27,8 +27,6 @@ clamd_SOURCES = \ |
27 | 27 |
$(top_srcdir)/shared/cfgparser.h \ |
28 | 28 |
$(top_srcdir)/shared/getopt.c \ |
29 | 29 |
$(top_srcdir)/shared/getopt.h \ |
30 |
- $(top_srcdir)/shared/memory.c \ |
|
31 |
- $(top_srcdir)/shared/memory.h \ |
|
32 | 30 |
$(top_srcdir)/shared/misc.c \ |
33 | 31 |
$(top_srcdir)/shared/misc.h \ |
34 | 32 |
$(top_srcdir)/shared/network.c \ |
... | ... |
@@ -15,7 +15,7 @@ |
15 | 15 |
@SET_MAKE@ |
16 | 16 |
|
17 | 17 |
# |
18 |
-# Copyright (C) 2002 - 2006 Tomasz Kojm <tkojm@clamav.net> |
|
18 |
+# Copyright (C) 2002 - 2007 Tomasz Kojm <tkojm@clamav.net> |
|
19 | 19 |
# |
20 | 20 |
# This program is free software; you can redistribute it and/or modify |
21 | 21 |
# it under the terms of the GNU General Public License as published by |
... | ... |
@@ -72,8 +72,7 @@ PROGRAMS = $(sbin_PROGRAMS) |
72 | 72 |
am__clamd_SOURCES_DIST = $(top_srcdir)/shared/output.c \ |
73 | 73 |
$(top_srcdir)/shared/output.h $(top_srcdir)/shared/cfgparser.c \ |
74 | 74 |
$(top_srcdir)/shared/cfgparser.h $(top_srcdir)/shared/getopt.c \ |
75 |
- $(top_srcdir)/shared/getopt.h $(top_srcdir)/shared/memory.c \ |
|
76 |
- $(top_srcdir)/shared/memory.h $(top_srcdir)/shared/misc.c \ |
|
75 |
+ $(top_srcdir)/shared/getopt.h $(top_srcdir)/shared/misc.c \ |
|
77 | 76 |
$(top_srcdir)/shared/misc.h $(top_srcdir)/shared/network.c \ |
78 | 77 |
$(top_srcdir)/shared/network.h $(top_srcdir)/shared/options.c \ |
79 | 78 |
$(top_srcdir)/shared/options.h clamd.c tcpserver.c tcpserver.h \ |
... | ... |
@@ -84,13 +83,12 @@ am__clamd_SOURCES_DIST = $(top_srcdir)/shared/output.c \ |
84 | 84 |
dazukoio_xp.h shared.h |
85 | 85 |
@BUILD_CLAMD_TRUE@am_clamd_OBJECTS = output.$(OBJEXT) \ |
86 | 86 |
@BUILD_CLAMD_TRUE@ cfgparser.$(OBJEXT) getopt.$(OBJEXT) \ |
87 |
-@BUILD_CLAMD_TRUE@ memory.$(OBJEXT) misc.$(OBJEXT) \ |
|
88 |
-@BUILD_CLAMD_TRUE@ network.$(OBJEXT) options.$(OBJEXT) \ |
|
89 |
-@BUILD_CLAMD_TRUE@ clamd.$(OBJEXT) tcpserver.$(OBJEXT) \ |
|
90 |
-@BUILD_CLAMD_TRUE@ localserver.$(OBJEXT) session.$(OBJEXT) \ |
|
91 |
-@BUILD_CLAMD_TRUE@ thrmgr.$(OBJEXT) server-th.$(OBJEXT) \ |
|
92 |
-@BUILD_CLAMD_TRUE@ scanner.$(OBJEXT) others.$(OBJEXT) \ |
|
93 |
-@BUILD_CLAMD_TRUE@ clamuko.$(OBJEXT) \ |
|
87 |
+@BUILD_CLAMD_TRUE@ misc.$(OBJEXT) network.$(OBJEXT) \ |
|
88 |
+@BUILD_CLAMD_TRUE@ options.$(OBJEXT) clamd.$(OBJEXT) \ |
|
89 |
+@BUILD_CLAMD_TRUE@ tcpserver.$(OBJEXT) localserver.$(OBJEXT) \ |
|
90 |
+@BUILD_CLAMD_TRUE@ session.$(OBJEXT) thrmgr.$(OBJEXT) \ |
|
91 |
+@BUILD_CLAMD_TRUE@ server-th.$(OBJEXT) scanner.$(OBJEXT) \ |
|
92 |
+@BUILD_CLAMD_TRUE@ others.$(OBJEXT) clamuko.$(OBJEXT) \ |
|
94 | 93 |
@BUILD_CLAMD_TRUE@ dazukoio_compat12.$(OBJEXT) \ |
95 | 94 |
@BUILD_CLAMD_TRUE@ dazukoio.$(OBJEXT) |
96 | 95 |
clamd_OBJECTS = $(am_clamd_OBJECTS) |
... | ... |
@@ -243,8 +241,6 @@ target_vendor = @target_vendor@ |
243 | 243 |
@BUILD_CLAMD_TRUE@ $(top_srcdir)/shared/cfgparser.h \ |
244 | 244 |
@BUILD_CLAMD_TRUE@ $(top_srcdir)/shared/getopt.c \ |
245 | 245 |
@BUILD_CLAMD_TRUE@ $(top_srcdir)/shared/getopt.h \ |
246 |
-@BUILD_CLAMD_TRUE@ $(top_srcdir)/shared/memory.c \ |
|
247 |
-@BUILD_CLAMD_TRUE@ $(top_srcdir)/shared/memory.h \ |
|
248 | 246 |
@BUILD_CLAMD_TRUE@ $(top_srcdir)/shared/misc.c \ |
249 | 247 |
@BUILD_CLAMD_TRUE@ $(top_srcdir)/shared/misc.h \ |
250 | 248 |
@BUILD_CLAMD_TRUE@ $(top_srcdir)/shared/network.c \ |
... | ... |
@@ -355,7 +351,6 @@ distclean-compile: |
355 | 355 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dazukoio_compat12.Po@am__quote@ |
356 | 356 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ |
357 | 357 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localserver.Po@am__quote@ |
358 |
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@ |
|
359 | 358 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ |
360 | 359 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network.Po@am__quote@ |
361 | 360 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options.Po@am__quote@ |
... | ... |
@@ -430,20 +425,6 @@ getopt.obj: $(top_srcdir)/shared/getopt.c |
430 | 430 |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
431 | 431 |
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getopt.obj `if test -f '$(top_srcdir)/shared/getopt.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/getopt.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/getopt.c'; fi` |
432 | 432 |
|
433 |
-memory.o: $(top_srcdir)/shared/memory.c |
|
434 |
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.o -MD -MP -MF "$(DEPDIR)/memory.Tpo" -c -o memory.o `test -f '$(top_srcdir)/shared/memory.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/memory.c; \ |
|
435 |
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memory.Tpo" "$(DEPDIR)/memory.Po"; else rm -f "$(DEPDIR)/memory.Tpo"; exit 1; fi |
|
436 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/shared/memory.c' object='memory.o' libtool=no @AMDEPBACKSLASH@ |
|
437 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
438 |
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.o `test -f '$(top_srcdir)/shared/memory.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/memory.c |
|
439 |
- |
|
440 |
-memory.obj: $(top_srcdir)/shared/memory.c |
|
441 |
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.obj -MD -MP -MF "$(DEPDIR)/memory.Tpo" -c -o memory.obj `if test -f '$(top_srcdir)/shared/memory.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/memory.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/memory.c'; fi`; \ |
|
442 |
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memory.Tpo" "$(DEPDIR)/memory.Po"; else rm -f "$(DEPDIR)/memory.Tpo"; exit 1; fi |
|
443 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/shared/memory.c' object='memory.obj' libtool=no @AMDEPBACKSLASH@ |
|
444 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
445 |
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.obj `if test -f '$(top_srcdir)/shared/memory.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/memory.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/memory.c'; fi` |
|
446 |
- |
|
447 | 433 |
misc.o: $(top_srcdir)/shared/misc.c |
448 | 434 |
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT misc.o -MD -MP -MF "$(DEPDIR)/misc.Tpo" -c -o misc.o `test -f '$(top_srcdir)/shared/misc.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/misc.c; \ |
449 | 435 |
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/misc.Tpo" "$(DEPDIR)/misc.Po"; else rm -f "$(DEPDIR)/misc.Tpo"; exit 1; fi |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
/* |
2 |
- * Copyright (C) 2002 - 2005 Tomasz Kojm <tkojm@clamav.net> |
|
2 |
+ * Copyright (C) 2002 - 2007 Tomasz Kojm <tkojm@clamav.net> |
|
3 | 3 |
* |
4 | 4 |
* This program is free software; you can redistribute it and/or modify |
5 | 5 |
* it under the terms of the GNU General Public License as published by |
... | ... |
@@ -77,7 +77,6 @@ |
77 | 77 |
#endif /* HAVE_POLL_H */ |
78 | 78 |
#endif /* HAVE_POLL */ |
79 | 79 |
|
80 |
-#include "shared/memory.h" |
|
81 | 80 |
#include "shared/cfgparser.h" |
82 | 81 |
#include "shared/output.h" |
83 | 82 |
|
... | ... |
@@ -115,7 +114,7 @@ void virusaction(const char *filename, const char *virname, const struct cfgstru |
115 | 115 |
cmd = strdup(cpt->strarg); |
116 | 116 |
|
117 | 117 |
if((pt = strstr(cmd, "%v"))) { |
118 |
- buffer = (char *) mcalloc(strlen(cmd) + strlen(virname) + 10, sizeof(char)); |
|
118 |
+ buffer = (char *) malloc(strlen(cmd) + strlen(virname) + 10); |
|
119 | 119 |
*pt = 0; pt += 2; |
120 | 120 |
strcpy(buffer, cmd); |
121 | 121 |
strcat(buffer, virname); |
... | ... |
@@ -124,20 +123,19 @@ void virusaction(const char *filename, const char *virname, const struct cfgstru |
124 | 124 |
cmd = strdup(buffer); |
125 | 125 |
free(buffer); |
126 | 126 |
} |
127 |
- |
|
127 |
+ |
|
128 | 128 |
/* Allocate env vars.. to be portable env vars should not be freed */ |
129 |
- buffer = (char *) mcalloc(strlen(ENV_FILE) + strlen(filename) + 2, sizeof(char)); |
|
129 |
+ buffer = (char *) malloc(strlen(ENV_FILE) + strlen(filename) + 2); |
|
130 | 130 |
sprintf(buffer, "%s=%s", ENV_FILE, filename); |
131 | 131 |
putenv(buffer); |
132 | 132 |
|
133 |
- buffer = (char *) mcalloc(strlen(ENV_VIRUS) + strlen(virname) + 2, sizeof(char)); |
|
133 |
+ buffer = (char *) malloc(strlen(ENV_VIRUS) + strlen(virname) + 2); |
|
134 | 134 |
sprintf(buffer, "%s=%s", ENV_VIRUS, virname); |
135 | 135 |
putenv(buffer); |
136 |
- |
|
137 |
- |
|
136 |
+ |
|
138 | 137 |
/* WARNING: this is uninterruptable ! */ |
139 | 138 |
exit(system(cmd)); |
140 |
- |
|
139 |
+ |
|
141 | 140 |
/* The below is not reached but is here for completeness to remind |
142 | 141 |
maintainers that this buffer is still allocated.. */ |
143 | 142 |
free(cmd); |
... | ... |
@@ -160,7 +158,7 @@ int poll_fds(int *fds, int nfds, int timeout_sec, int check_signals) |
160 | 160 |
struct pollfd *poll_data = poll_1; |
161 | 161 |
|
162 | 162 |
if (nfds>1) { |
163 |
- poll_data = mmalloc(nfds*sizeof(*poll_data)); |
|
163 |
+ poll_data = malloc(nfds*sizeof(*poll_data)); |
|
164 | 164 |
if(!poll_data) { |
165 | 165 |
logg("!poll_fds: Can't allocate memory for poll_data\n"); |
166 | 166 |
return -1; |
... | ... |
@@ -56,7 +56,6 @@ |
56 | 56 |
#include "libclamav/others.h" |
57 | 57 |
|
58 | 58 |
#include "shared/cfgparser.h" |
59 |
-#include "shared/memory.h" |
|
60 | 59 |
#include "shared/output.h" |
61 | 60 |
#include "shared/misc.h" |
62 | 61 |
|
... | ... |
@@ -152,7 +151,7 @@ static int dirscan(const char *dirname, const char **virname, unsigned long int |
152 | 152 |
{ |
153 | 153 |
if(strcmp(dent->d_name, ".") && strcmp(dent->d_name, "..")) { |
154 | 154 |
/* build the full name */ |
155 |
- fname = (char *) mcalloc(strlen(dirname) + strlen(dent->d_name) + 2, sizeof(char)); |
|
155 |
+ fname = (char *) malloc(strlen(dirname) + strlen(dent->d_name) + 2); |
|
156 | 156 |
if(!fname) { |
157 | 157 |
logg("!Can't allocate memory for fname\n"); |
158 | 158 |
closedir(dd); |
... | ... |
@@ -180,7 +179,7 @@ static int dirscan(const char *dirname, const char **virname, unsigned long int |
180 | 180 |
{ |
181 | 181 |
if(type == TYPE_MULTISCAN) { |
182 | 182 |
|
183 |
- scandata = (struct multi_tag *) mmalloc(sizeof(struct multi_tag)); |
|
183 |
+ scandata = (struct multi_tag *) malloc(sizeof(struct multi_tag)); |
|
184 | 184 |
if(!scandata) { |
185 | 185 |
logg("!Can't allocate memory for scandata\n"); |
186 | 186 |
free(fname); |
... | ... |
@@ -42,7 +42,6 @@ |
42 | 42 |
|
43 | 43 |
#include "libclamav/clamav.h" |
44 | 44 |
|
45 |
-#include "shared/memory.h" |
|
46 | 45 |
#include "shared/output.h" |
47 | 46 |
|
48 | 47 |
#include "server.h" |
... | ... |
@@ -210,7 +209,7 @@ static struct cl_engine *reload_db(struct cl_engine *engine, unsigned int dbopti |
210 | 210 |
logg("Reading databases from %s\n", dbdir); |
211 | 211 |
|
212 | 212 |
if(dbstat == NULL) { |
213 |
- dbstat = (struct cl_stat *) mmalloc(sizeof(struct cl_stat)); |
|
213 |
+ dbstat = (struct cl_stat *) malloc(sizeof(struct cl_stat)); |
|
214 | 214 |
if(!dbstat) { |
215 | 215 |
logg("!Can't allocate memory for dbstat\n"); |
216 | 216 |
*ret = 1; |
... | ... |
@@ -467,7 +466,7 @@ int acceptloop_th(int *socketds, int nsockets, struct cl_engine *engine, unsigne |
467 | 467 |
pthread_attr_init(&clamuko_attr); |
468 | 468 |
pthread_attr_setdetachstate(&clamuko_attr, PTHREAD_CREATE_JOINABLE); |
469 | 469 |
|
470 |
- tharg = (struct thrarg *) mmalloc(sizeof(struct thrarg)); |
|
470 |
+ tharg = (struct thrarg *) malloc(sizeof(struct thrarg)); |
|
471 | 471 |
tharg->copt = copt; |
472 | 472 |
tharg->engine = engine; |
473 | 473 |
tharg->limits = &limits; |
... | ... |
@@ -573,7 +572,7 @@ int acceptloop_th(int *socketds, int nsockets, struct cl_engine *engine, unsigne |
573 | 573 |
} |
574 | 574 |
|
575 | 575 |
if (!progexit && new_sd >= 0) { |
576 |
- client_conn = (client_conn_t *) mmalloc(sizeof(struct client_conn_tag)); |
|
576 |
+ client_conn = (client_conn_t *) malloc(sizeof(struct client_conn_tag)); |
|
577 | 577 |
client_conn->sd = new_sd; |
578 | 578 |
client_conn->options = options; |
579 | 579 |
client_conn->copt = copt; |
... | ... |
@@ -46,7 +46,6 @@ |
46 | 46 |
#include "libclamav/str.h" |
47 | 47 |
|
48 | 48 |
#include "shared/cfgparser.h" |
49 |
-#include "shared/memory.h" |
|
50 | 49 |
#include "shared/output.h" |
51 | 50 |
#include "shared/misc.h" |
52 | 51 |
|
... | ... |
@@ -110,7 +109,7 @@ int command(int desc, const struct cl_engine *engine, const struct cl_limits *li |
110 | 110 |
struct stat foo; |
111 | 111 |
|
112 | 112 |
|
113 |
- if(!(path = mmalloc(strlen(dbdir) + 30))) { |
|
113 |
+ if(!(path = malloc(strlen(dbdir) + 30))) { |
|
114 | 114 |
mdprintf(desc, "Memory allocation error - SHUTDOWN forced\n"); |
115 | 115 |
return COMMAND_SHUTDOWN; |
116 | 116 |
} |
... | ... |
@@ -26,7 +26,6 @@ |
26 | 26 |
#include <time.h> |
27 | 27 |
#include <errno.h> |
28 | 28 |
|
29 |
-#include "shared/memory.h" |
|
30 | 29 |
#include "shared/output.h" |
31 | 30 |
|
32 | 31 |
#include "thrmgr.h" |
... | ... |
@@ -39,7 +38,7 @@ static work_queue_t *work_queue_new(void) |
39 | 39 |
{ |
40 | 40 |
work_queue_t *work_q; |
41 | 41 |
|
42 |
- work_q = (work_queue_t *) mmalloc(sizeof(work_queue_t)); |
|
42 |
+ work_q = (work_queue_t *) malloc(sizeof(work_queue_t)); |
|
43 | 43 |
if (!work_q) { |
44 | 44 |
return NULL; |
45 | 45 |
} |
... | ... |
@@ -56,7 +55,7 @@ static int work_queue_add(work_queue_t *work_q, void *data) |
56 | 56 |
if (!work_q) { |
57 | 57 |
return FALSE; |
58 | 58 |
} |
59 |
- work_item = (work_item_t *) mmalloc(sizeof(work_item_t)); |
|
59 |
+ work_item = (work_item_t *) malloc(sizeof(work_item_t)); |
|
60 | 60 |
if (!work_item) { |
61 | 61 |
return FALSE; |
62 | 62 |
} |
... | ... |
@@ -142,7 +141,7 @@ threadpool_t *thrmgr_new(int max_threads, int idle_timeout, void (*handler)(void |
142 | 142 |
return NULL; |
143 | 143 |
} |
144 | 144 |
|
145 |
- threadpool = (threadpool_t *) mmalloc(sizeof(threadpool_t)); |
|
145 |
+ threadpool = (threadpool_t *) malloc(sizeof(threadpool_t)); |
|
146 | 146 |
if (!threadpool) { |
147 | 147 |
return NULL; |
148 | 148 |
} |
... | ... |
@@ -25,8 +25,6 @@ clamdscan_SOURCES = \ |
25 | 25 |
$(top_srcdir)/shared/output.h \ |
26 | 26 |
$(top_srcdir)/shared/cfgparser.c \ |
27 | 27 |
$(top_srcdir)/shared/cfgparser.h \ |
28 |
- $(top_srcdir)/shared/memory.c \ |
|
29 |
- $(top_srcdir)/shared/memory.h \ |
|
30 | 28 |
$(top_srcdir)/shared/misc.c \ |
31 | 29 |
$(top_srcdir)/shared/misc.h \ |
32 | 30 |
$(top_srcdir)/shared/getopt.c \ |
... | ... |
@@ -71,17 +71,15 @@ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) |
71 | 71 |
PROGRAMS = $(bin_PROGRAMS) |
72 | 72 |
am__clamdscan_SOURCES_DIST = $(top_srcdir)/shared/output.c \ |
73 | 73 |
$(top_srcdir)/shared/output.h $(top_srcdir)/shared/cfgparser.c \ |
74 |
- $(top_srcdir)/shared/cfgparser.h $(top_srcdir)/shared/memory.c \ |
|
75 |
- $(top_srcdir)/shared/memory.h $(top_srcdir)/shared/misc.c \ |
|
74 |
+ $(top_srcdir)/shared/cfgparser.h $(top_srcdir)/shared/misc.c \ |
|
76 | 75 |
$(top_srcdir)/shared/misc.h $(top_srcdir)/shared/getopt.c \ |
77 | 76 |
$(top_srcdir)/shared/getopt.h $(top_srcdir)/shared/options.c \ |
78 | 77 |
$(top_srcdir)/shared/options.h clamdscan.c client.c client.h \ |
79 | 78 |
defaults.h |
80 | 79 |
@BUILD_CLAMD_TRUE@am_clamdscan_OBJECTS = output.$(OBJEXT) \ |
81 |
-@BUILD_CLAMD_TRUE@ cfgparser.$(OBJEXT) memory.$(OBJEXT) \ |
|
82 |
-@BUILD_CLAMD_TRUE@ misc.$(OBJEXT) getopt.$(OBJEXT) \ |
|
83 |
-@BUILD_CLAMD_TRUE@ options.$(OBJEXT) clamdscan.$(OBJEXT) \ |
|
84 |
-@BUILD_CLAMD_TRUE@ client.$(OBJEXT) |
|
80 |
+@BUILD_CLAMD_TRUE@ cfgparser.$(OBJEXT) misc.$(OBJEXT) \ |
|
81 |
+@BUILD_CLAMD_TRUE@ getopt.$(OBJEXT) options.$(OBJEXT) \ |
|
82 |
+@BUILD_CLAMD_TRUE@ clamdscan.$(OBJEXT) client.$(OBJEXT) |
|
85 | 83 |
clamdscan_OBJECTS = $(am_clamdscan_OBJECTS) |
86 | 84 |
clamdscan_LDADD = $(LDADD) |
87 | 85 |
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) |
... | ... |
@@ -230,8 +228,6 @@ target_vendor = @target_vendor@ |
230 | 230 |
@BUILD_CLAMD_TRUE@ $(top_srcdir)/shared/output.h \ |
231 | 231 |
@BUILD_CLAMD_TRUE@ $(top_srcdir)/shared/cfgparser.c \ |
232 | 232 |
@BUILD_CLAMD_TRUE@ $(top_srcdir)/shared/cfgparser.h \ |
233 |
-@BUILD_CLAMD_TRUE@ $(top_srcdir)/shared/memory.c \ |
|
234 |
-@BUILD_CLAMD_TRUE@ $(top_srcdir)/shared/memory.h \ |
|
235 | 233 |
@BUILD_CLAMD_TRUE@ $(top_srcdir)/shared/misc.c \ |
236 | 234 |
@BUILD_CLAMD_TRUE@ $(top_srcdir)/shared/misc.h \ |
237 | 235 |
@BUILD_CLAMD_TRUE@ $(top_srcdir)/shared/getopt.c \ |
... | ... |
@@ -319,7 +315,6 @@ distclean-compile: |
319 | 319 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clamdscan.Po@am__quote@ |
320 | 320 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Po@am__quote@ |
321 | 321 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ |
322 |
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@ |
|
323 | 322 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ |
324 | 323 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options.Po@am__quote@ |
325 | 324 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output.Po@am__quote@ |
... | ... |
@@ -373,20 +368,6 @@ cfgparser.obj: $(top_srcdir)/shared/cfgparser.c |
373 | 373 |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
374 | 374 |
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfgparser.obj `if test -f '$(top_srcdir)/shared/cfgparser.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/cfgparser.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/cfgparser.c'; fi` |
375 | 375 |
|
376 |
-memory.o: $(top_srcdir)/shared/memory.c |
|
377 |
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.o -MD -MP -MF "$(DEPDIR)/memory.Tpo" -c -o memory.o `test -f '$(top_srcdir)/shared/memory.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/memory.c; \ |
|
378 |
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memory.Tpo" "$(DEPDIR)/memory.Po"; else rm -f "$(DEPDIR)/memory.Tpo"; exit 1; fi |
|
379 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/shared/memory.c' object='memory.o' libtool=no @AMDEPBACKSLASH@ |
|
380 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
381 |
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.o `test -f '$(top_srcdir)/shared/memory.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/memory.c |
|
382 |
- |
|
383 |
-memory.obj: $(top_srcdir)/shared/memory.c |
|
384 |
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.obj -MD -MP -MF "$(DEPDIR)/memory.Tpo" -c -o memory.obj `if test -f '$(top_srcdir)/shared/memory.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/memory.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/memory.c'; fi`; \ |
|
385 |
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memory.Tpo" "$(DEPDIR)/memory.Po"; else rm -f "$(DEPDIR)/memory.Tpo"; exit 1; fi |
|
386 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/shared/memory.c' object='memory.obj' libtool=no @AMDEPBACKSLASH@ |
|
387 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
388 |
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.obj `if test -f '$(top_srcdir)/shared/memory.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/memory.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/memory.c'; fi` |
|
389 |
- |
|
390 | 376 |
misc.o: $(top_srcdir)/shared/misc.c |
391 | 377 |
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT misc.o -MD -MP -MF "$(DEPDIR)/misc.Tpo" -c -o misc.o `test -f '$(top_srcdir)/shared/misc.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/misc.c; \ |
392 | 378 |
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/misc.Tpo" "$(DEPDIR)/misc.Po"; else rm -f "$(DEPDIR)/misc.Tpo"; exit 1; fi |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
/* |
2 |
- * Copyright (C) 2002 - 2006 Tomasz Kojm <tkojm@clamav.net> |
|
2 |
+ * Copyright (C) 2002 - 2007 Tomasz Kojm <tkojm@clamav.net> |
|
3 | 3 |
* |
4 | 4 |
* This program is free software; you can redistribute it and/or modify |
5 | 5 |
* it under the terms of the GNU General Public License as published by |
... | ... |
@@ -42,7 +42,6 @@ |
42 | 42 |
#include "defaults.h" |
43 | 43 |
#include "options.h" |
44 | 44 |
#include "cfgparser.h" |
45 |
-#include "memory.h" |
|
46 | 45 |
#include "output.h" |
47 | 46 |
#include "misc.h" |
48 | 47 |
#include "str.h" |
... | ... |
@@ -125,7 +124,7 @@ static int dsfile(int sockd, const char *scantype, const char *filename, const s |
125 | 125 |
char *scancmd; |
126 | 126 |
|
127 | 127 |
|
128 |
- scancmd = mcalloc(strlen(filename) + 20, sizeof(char)); |
|
128 |
+ scancmd = malloc(strlen(filename) + 20); |
|
129 | 129 |
sprintf(scancmd, "%s %s", scantype, filename); |
130 | 130 |
|
131 | 131 |
if(write(sockd, scancmd, strlen(scancmd)) <= 0) { |
... | ... |
@@ -295,7 +294,7 @@ static char *abpath(const char *filename) |
295 | 295 |
perror(filename); |
296 | 296 |
return NULL; |
297 | 297 |
} else { |
298 |
- fullpath = mcalloc(200 + strlen(filename) + 10, sizeof(char)); |
|
298 |
+ fullpath = malloc(200 + strlen(filename) + 10); |
|
299 | 299 |
#ifdef C_CYGWIN |
300 | 300 |
sprintf(fullpath, "%s", filename); |
301 | 301 |
#else |
... | ... |
@@ -539,7 +538,7 @@ void move_infected(const char *filename, const struct optstruct *opt) |
539 | 539 |
|
540 | 540 |
movefilename_size = sizeof(char) * (strlen(movedir) + strlen(tmp) + sizeof(numext) + 2); |
541 | 541 |
|
542 |
- if(!(movefilename = mmalloc(movefilename_size))) { |
|
542 |
+ if(!(movefilename = malloc(movefilename_size))) { |
|
543 | 543 |
logg("^Memory allocation error\n"); |
544 | 544 |
exit(2); |
545 | 545 |
} |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
# |
2 |
-# Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net> |
|
2 |
+# Copyright (C) 2002 - 2007 Tomasz Kojm <tkojm@clamav.net> |
|
3 | 3 |
# Fixes by Arkadiusz Miskiewicz <misiek@pld.org.pl> |
4 | 4 |
# |
5 | 5 |
# This program is free software; you can redistribute it and/or modify |
... | ... |
@@ -24,8 +24,6 @@ clamscan_SOURCES = \ |
24 | 24 |
$(top_srcdir)/shared/output.h \ |
25 | 25 |
$(top_srcdir)/shared/getopt.c \ |
26 | 26 |
$(top_srcdir)/shared/getopt.h \ |
27 |
- $(top_srcdir)/shared/memory.c \ |
|
28 |
- $(top_srcdir)/shared/memory.h \ |
|
29 | 27 |
$(top_srcdir)/shared/cfgparser.c \ |
30 | 28 |
$(top_srcdir)/shared/cfgparser.h \ |
31 | 29 |
$(top_srcdir)/shared/misc.c \ |
... | ... |
@@ -15,7 +15,7 @@ |
15 | 15 |
@SET_MAKE@ |
16 | 16 |
|
17 | 17 |
# |
18 |
-# Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net> |
|
18 |
+# Copyright (C) 2002 - 2007 Tomasz Kojm <tkojm@clamav.net> |
|
19 | 19 |
# Fixes by Arkadiusz Miskiewicz <misiek@pld.org.pl> |
20 | 20 |
# |
21 | 21 |
# This program is free software; you can redistribute it and/or modify |
... | ... |
@@ -71,9 +71,9 @@ am__installdirs = "$(DESTDIR)$(bindir)" |
71 | 71 |
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) |
72 | 72 |
PROGRAMS = $(bin_PROGRAMS) |
73 | 73 |
am_clamscan_OBJECTS = output.$(OBJEXT) getopt.$(OBJEXT) \ |
74 |
- memory.$(OBJEXT) cfgparser.$(OBJEXT) misc.$(OBJEXT) \ |
|
75 |
- options.$(OBJEXT) clamscan.$(OBJEXT) others.$(OBJEXT) \ |
|
76 |
- manager.$(OBJEXT) treewalk.$(OBJEXT) |
|
74 |
+ cfgparser.$(OBJEXT) misc.$(OBJEXT) options.$(OBJEXT) \ |
|
75 |
+ clamscan.$(OBJEXT) others.$(OBJEXT) manager.$(OBJEXT) \ |
|
76 |
+ treewalk.$(OBJEXT) |
|
77 | 77 |
clamscan_OBJECTS = $(am_clamscan_OBJECTS) |
78 | 78 |
clamscan_LDADD = $(LDADD) |
79 | 79 |
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) |
... | ... |
@@ -222,8 +222,6 @@ clamscan_SOURCES = \ |
222 | 222 |
$(top_srcdir)/shared/output.h \ |
223 | 223 |
$(top_srcdir)/shared/getopt.c \ |
224 | 224 |
$(top_srcdir)/shared/getopt.h \ |
225 |
- $(top_srcdir)/shared/memory.c \ |
|
226 |
- $(top_srcdir)/shared/memory.h \ |
|
227 | 225 |
$(top_srcdir)/shared/cfgparser.c \ |
228 | 226 |
$(top_srcdir)/shared/cfgparser.h \ |
229 | 227 |
$(top_srcdir)/shared/misc.c \ |
... | ... |
@@ -316,7 +314,6 @@ distclean-compile: |
316 | 316 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clamscan.Po@am__quote@ |
317 | 317 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ |
318 | 318 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/manager.Po@am__quote@ |
319 |
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@ |
|
320 | 319 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ |
321 | 320 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options.Po@am__quote@ |
322 | 321 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/others.Po@am__quote@ |
... | ... |
@@ -372,20 +369,6 @@ getopt.obj: $(top_srcdir)/shared/getopt.c |
372 | 372 |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
373 | 373 |
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getopt.obj `if test -f '$(top_srcdir)/shared/getopt.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/getopt.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/getopt.c'; fi` |
374 | 374 |
|
375 |
-memory.o: $(top_srcdir)/shared/memory.c |
|
376 |
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.o -MD -MP -MF "$(DEPDIR)/memory.Tpo" -c -o memory.o `test -f '$(top_srcdir)/shared/memory.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/memory.c; \ |
|
377 |
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memory.Tpo" "$(DEPDIR)/memory.Po"; else rm -f "$(DEPDIR)/memory.Tpo"; exit 1; fi |
|
378 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/shared/memory.c' object='memory.o' libtool=no @AMDEPBACKSLASH@ |
|
379 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
380 |
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.o `test -f '$(top_srcdir)/shared/memory.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/memory.c |
|
381 |
- |
|
382 |
-memory.obj: $(top_srcdir)/shared/memory.c |
|
383 |
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.obj -MD -MP -MF "$(DEPDIR)/memory.Tpo" -c -o memory.obj `if test -f '$(top_srcdir)/shared/memory.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/memory.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/memory.c'; fi`; \ |
|
384 |
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memory.Tpo" "$(DEPDIR)/memory.Po"; else rm -f "$(DEPDIR)/memory.Tpo"; exit 1; fi |
|
385 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/shared/memory.c' object='memory.obj' libtool=no @AMDEPBACKSLASH@ |
|
386 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
387 |
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.obj `if test -f '$(top_srcdir)/shared/memory.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/memory.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/memory.c'; fi` |
|
388 |
- |
|
389 | 375 |
cfgparser.o: $(top_srcdir)/shared/cfgparser.c |
390 | 376 |
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfgparser.o -MD -MP -MF "$(DEPDIR)/cfgparser.Tpo" -c -o cfgparser.o `test -f '$(top_srcdir)/shared/cfgparser.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/cfgparser.c; \ |
391 | 377 |
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/cfgparser.Tpo" "$(DEPDIR)/cfgparser.Po"; else rm -f "$(DEPDIR)/cfgparser.Tpo"; exit 1; fi |
... | ... |
@@ -55,7 +55,6 @@ |
55 | 55 |
#include "global.h" |
56 | 56 |
|
57 | 57 |
#include "shared/options.h" |
58 |
-#include "shared/memory.h" |
|
59 | 58 |
#include "shared/output.h" |
60 | 59 |
#include "shared/misc.h" |
61 | 60 |
|
... | ... |
@@ -229,7 +228,7 @@ int scanmanager(const struct optstruct *opt) |
229 | 229 |
char *cpy, *ptr; |
230 | 230 |
ptr = opt_arg(opt, "max-space"); |
231 | 231 |
if(tolower(ptr[strlen(ptr) - 1]) == 'm') { |
232 |
- cpy = mcalloc(strlen(ptr), sizeof(char)); |
|
232 |
+ cpy = malloc(strlen(ptr)); |
|
233 | 233 |
strncpy(cpy, ptr, strlen(ptr) - 1); |
234 | 234 |
limits.maxfilesize = atoi(cpy) * 1024 * 1024; |
235 | 235 |
free(cpy); |
... | ... |
@@ -356,7 +355,7 @@ int scanmanager(const struct optstruct *opt) |
356 | 356 |
logg("!Can't get absolute pathname of current working directory\n"); |
357 | 357 |
return 57; |
358 | 358 |
} else { |
359 |
- fullpath = mcalloc(512, sizeof(char)); |
|
359 |
+ fullpath = malloc(512); |
|
360 | 360 |
#ifdef NO_SNPRINTF |
361 | 361 |
sprintf(fullpath, "%s/%s", cwd, thefilename); |
362 | 362 |
#else |
... | ... |
@@ -434,7 +433,7 @@ static int clamav_unpack(const char *prog, char **args, const char *tmpdir, cons |
434 | 434 |
char *cpy, *ptr; |
435 | 435 |
ptr = opt_arg(opt, "max-space"); |
436 | 436 |
if(tolower(ptr[strlen(ptr) - 1]) == 'm') { /* megabytes */ |
437 |
- cpy = mcalloc(strlen(ptr), sizeof(char)); |
|
437 |
+ cpy = malloc(strlen(ptr)); |
|
438 | 438 |
strncpy(cpy, ptr, strlen(ptr) - 1); |
439 | 439 |
maxspace = atoi(cpy) * 1024; |
440 | 440 |
free(cpy); |
... | ... |
@@ -554,8 +553,8 @@ static void move_infected(const char *filename, const struct optstruct *opt) |
554 | 554 |
|
555 | 555 |
movefilename_size = sizeof(char) * (strlen(movedir) + strlen(tmp) + sizeof(numext) + 2); |
556 | 556 |
|
557 |
- if(!(movefilename = mmalloc(movefilename_size))) { |
|
558 |
- logg("!mmalloc() failed\n"); |
|
557 |
+ if(!(movefilename = malloc(movefilename_size))) { |
|
558 |
+ logg("!malloc() failed\n"); |
|
559 | 559 |
exit(71); |
560 | 560 |
} |
561 | 561 |
|
... | ... |
@@ -900,7 +899,7 @@ static int scandenied(const char *filename, struct cl_engine *engine, const stru |
900 | 900 |
exit(63); /* critical */ |
901 | 901 |
} |
902 | 902 |
|
903 |
- tmpfile = (char *) mcalloc(strlen(gendir) + strlen(filename) + 10, sizeof(char)); |
|
903 |
+ tmpfile = (char *) malloc(strlen(gendir) + strlen(filename) + 10); |
|
904 | 904 |
pt = strrchr(filename, '/'); |
905 | 905 |
if(!pt) |
906 | 906 |
pt = (char *) filename; |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
/* |
2 |
- * Copyright (C) 2002 - 2005 Tomasz Kojm <tkojm@clamav.net> |
|
2 |
+ * Copyright (C) 2002 - 2007 Tomasz Kojm <tkojm@clamav.net> |
|
3 | 3 |
* |
4 | 4 |
* This program is free software; you can redistribute it and/or modify |
5 | 5 |
* it under the terms of the GNU General Public License as published by |
... | ... |
@@ -49,7 +49,6 @@ |
49 | 49 |
#include "treewalk.h" |
50 | 50 |
|
51 | 51 |
#include "shared/options.h" |
52 |
-#include "shared/memory.h" |
|
53 | 52 |
#include "shared/output.h" |
54 | 53 |
#include "shared/misc.h" |
55 | 54 |
|
... | ... |
@@ -116,7 +115,7 @@ int treewalk(const char *dirname, struct cl_engine *engine, const struct passwd |
116 | 116 |
{ |
117 | 117 |
if(strcmp(dent->d_name, ".") && strcmp(dent->d_name, "..")) { |
118 | 118 |
/* build the full name */ |
119 |
- fname = mcalloc(strlen(dirname) + strlen(dent->d_name) + 2, sizeof(char)); |
|
119 |
+ fname = malloc(strlen(dirname) + strlen(dent->d_name) + 2); |
|
120 | 120 |
sprintf(fname, "%s/%s", dirname, dent->d_name); |
121 | 121 |
|
122 | 122 |
/* stat the file */ |
... | ... |
@@ -220,7 +219,7 @@ int fixperms(const char *dirname) |
220 | 220 |
{ |
221 | 221 |
if(strcmp(dent->d_name, ".") && strcmp(dent->d_name, "..")) { |
222 | 222 |
/* build full name */ |
223 |
- fname = mcalloc(strlen(dirname) + strlen(dent->d_name) + 2, sizeof(char)); |
|
223 |
+ fname = malloc(strlen(dirname) + strlen(dent->d_name) + 2); |
|
224 | 224 |
sprintf(fname, "%s/%s", dirname, dent->d_name); |
225 | 225 |
|
226 | 226 |
/* stat the file */ |
... | ... |
@@ -268,7 +267,7 @@ int du(const char *dirname, struct s_du *n) |
268 | 268 |
n->files++; |
269 | 269 |
|
270 | 270 |
/* build the full name */ |
271 |
- fname = mcalloc(strlen(dirname) + strlen(dent->d_name) + 2, sizeof(char)); |
|
271 |
+ fname = malloc(strlen(dirname) + strlen(dent->d_name) + 2); |
|
272 | 272 |
sprintf(fname, "%s/%s", dirname, dent->d_name); |
273 | 273 |
|
274 | 274 |
/* stat the file */ |
... | ... |
@@ -26,8 +26,6 @@ freshclam_SOURCES = \ |
26 | 26 |
$(top_srcdir)/shared/cfgparser.h \ |
27 | 27 |
$(top_srcdir)/shared/getopt.c \ |
28 | 28 |
$(top_srcdir)/shared/getopt.h \ |
29 |
- $(top_srcdir)/shared/memory.c \ |
|
30 |
- $(top_srcdir)/shared/memory.h \ |
|
31 | 29 |
$(top_srcdir)/shared/misc.c \ |
32 | 30 |
$(top_srcdir)/shared/misc.h \ |
33 | 31 |
$(top_srcdir)/shared/options.c \ |
... | ... |
@@ -71,10 +71,10 @@ am__installdirs = "$(DESTDIR)$(bindir)" |
71 | 71 |
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) |
72 | 72 |
PROGRAMS = $(bin_PROGRAMS) |
73 | 73 |
am_freshclam_OBJECTS = output.$(OBJEXT) cfgparser.$(OBJEXT) \ |
74 |
- getopt.$(OBJEXT) memory.$(OBJEXT) misc.$(OBJEXT) \ |
|
75 |
- options.$(OBJEXT) cdiff.$(OBJEXT) freshclam.$(OBJEXT) \ |
|
76 |
- manager.$(OBJEXT) notify.$(OBJEXT) dns.$(OBJEXT) \ |
|
77 |
- execute.$(OBJEXT) nonblock.$(OBJEXT) mirman.$(OBJEXT) |
|
74 |
+ getopt.$(OBJEXT) misc.$(OBJEXT) options.$(OBJEXT) \ |
|
75 |
+ cdiff.$(OBJEXT) freshclam.$(OBJEXT) manager.$(OBJEXT) \ |
|
76 |
+ notify.$(OBJEXT) dns.$(OBJEXT) execute.$(OBJEXT) \ |
|
77 |
+ nonblock.$(OBJEXT) mirman.$(OBJEXT) |
|
78 | 78 |
freshclam_OBJECTS = $(am_freshclam_OBJECTS) |
79 | 79 |
freshclam_LDADD = $(LDADD) |
80 | 80 |
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) |
... | ... |
@@ -225,8 +225,6 @@ freshclam_SOURCES = \ |
225 | 225 |
$(top_srcdir)/shared/cfgparser.h \ |
226 | 226 |
$(top_srcdir)/shared/getopt.c \ |
227 | 227 |
$(top_srcdir)/shared/getopt.h \ |
228 |
- $(top_srcdir)/shared/memory.c \ |
|
229 |
- $(top_srcdir)/shared/memory.h \ |
|
230 | 228 |
$(top_srcdir)/shared/misc.c \ |
231 | 229 |
$(top_srcdir)/shared/misc.h \ |
232 | 230 |
$(top_srcdir)/shared/options.c \ |
... | ... |
@@ -326,7 +324,6 @@ distclean-compile: |
326 | 326 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freshclam.Po@am__quote@ |
327 | 327 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ |
328 | 328 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/manager.Po@am__quote@ |
329 |
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@ |
|
330 | 329 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mirman.Po@am__quote@ |
331 | 330 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ |
332 | 331 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonblock.Po@am__quote@ |
... | ... |
@@ -397,20 +394,6 @@ getopt.obj: $(top_srcdir)/shared/getopt.c |
397 | 397 |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
398 | 398 |
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getopt.obj `if test -f '$(top_srcdir)/shared/getopt.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/getopt.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/getopt.c'; fi` |
399 | 399 |
|
400 |
-memory.o: $(top_srcdir)/shared/memory.c |
|
401 |
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.o -MD -MP -MF "$(DEPDIR)/memory.Tpo" -c -o memory.o `test -f '$(top_srcdir)/shared/memory.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/memory.c; \ |
|
402 |
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memory.Tpo" "$(DEPDIR)/memory.Po"; else rm -f "$(DEPDIR)/memory.Tpo"; exit 1; fi |
|
403 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/shared/memory.c' object='memory.o' libtool=no @AMDEPBACKSLASH@ |
|
404 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
405 |
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.o `test -f '$(top_srcdir)/shared/memory.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/memory.c |
|
406 |
- |
|
407 |
-memory.obj: $(top_srcdir)/shared/memory.c |
|
408 |
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.obj -MD -MP -MF "$(DEPDIR)/memory.Tpo" -c -o memory.obj `if test -f '$(top_srcdir)/shared/memory.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/memory.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/memory.c'; fi`; \ |
|
409 |
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memory.Tpo" "$(DEPDIR)/memory.Po"; else rm -f "$(DEPDIR)/memory.Tpo"; exit 1; fi |
|
410 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/shared/memory.c' object='memory.obj' libtool=no @AMDEPBACKSLASH@ |
|
411 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
412 |
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.obj `if test -f '$(top_srcdir)/shared/memory.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/memory.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/memory.c'; fi` |
|
413 |
- |
|
414 | 400 |
misc.o: $(top_srcdir)/shared/misc.c |
415 | 401 |
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT misc.o -MD -MP -MF "$(DEPDIR)/misc.Tpo" -c -o misc.o `test -f '$(top_srcdir)/shared/misc.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/misc.c; \ |
416 | 402 |
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/misc.Tpo" "$(DEPDIR)/misc.Po"; else rm -f "$(DEPDIR)/misc.Tpo"; exit 1; fi |
... | ... |
@@ -35,7 +35,6 @@ |
35 | 35 |
#include <resolv.h> |
36 | 36 |
#include <sys/types.h> |
37 | 37 |
|
38 |
-#include "shared/memory.h" |
|
39 | 38 |
#include "shared/output.h" |
40 | 39 |
|
41 | 40 |
#include "dns.h" |
... | ... |
@@ -118,7 +117,7 @@ char *txtquery(const char *domain, unsigned int *ttl) |
118 | 118 |
return NULL; |
119 | 119 |
} |
120 | 120 |
|
121 |
- if(!(txt = mmalloc(txtlen + 1))) |
|
121 |
+ if(!(txt = malloc(txtlen + 1))) |
|
122 | 122 |
return NULL; |
123 | 123 |
|
124 | 124 |
pt++; |
... | ... |
@@ -140,7 +139,6 @@ char *txtquery(const char *domain, unsigned int *ttl) |
140 | 140 |
#include <string.h> |
141 | 141 |
#include <windows.h> |
142 | 142 |
#include <windns.h> |
143 |
-#include "shared/memory.h" |
|
144 | 143 |
#include "shared/output.h" |
145 | 144 |
|
146 | 145 |
char *txtquery(const char *domain, unsigned int *ttl) |
... | ... |
@@ -155,7 +153,7 @@ char *txtquery(const char *domain, unsigned int *ttl) |
155 | 155 |
return NULL; |
156 | 156 |
|
157 | 157 |
if((pDnsRecord->Data.TXT.dwStringCount > 0) && pDnsRecord->Data.TXT.pStringArray[0]) { |
158 |
- txt = mmalloc(strlen(pDnsRecord->Data.TXT.pStringArray[0]) + 1); |
|
158 |
+ txt = malloc(strlen(pDnsRecord->Data.TXT.pStringArray[0]) + 1); |
|
159 | 159 |
if(txt) |
160 | 160 |
strcpy(txt, pDnsRecord->Data.TXT.pStringArray[0]); |
161 | 161 |
*ttl = pDnsRecord->dwTtl; |
... | ... |
@@ -62,7 +62,6 @@ |
62 | 62 |
#include "shared/cfgparser.h" |
63 | 63 |
#include "shared/output.h" |
64 | 64 |
#include "shared/misc.h" |
65 |
-#include "shared/memory.h" |
|
66 | 65 |
#include "shared/cdiff.h" |
67 | 66 |
|
68 | 67 |
#include "libclamav/clamav.h" |
... | ... |
@@ -284,14 +283,14 @@ static char *proxyauth(const char *user, const char *pass) |
284 | 284 |
char *buf, *userpass, *auth; |
285 | 285 |
|
286 | 286 |
|
287 |
- userpass = mmalloc(strlen(user) + strlen(pass) + 2); |
|
287 |
+ userpass = malloc(strlen(user) + strlen(pass) + 2); |
|
288 | 288 |
if(!userpass) { |
289 | 289 |
logg("!proxyauth: Can't allocate memory for 'userpass'\n"); |
290 | 290 |
return NULL; |
291 | 291 |
} |
292 | 292 |
sprintf(userpass, "%s:%s", user, pass); |
293 | 293 |
|
294 |
- buf = mmalloc((strlen(pass) + strlen(user)) * 2 + 4); |
|
294 |
+ buf = malloc((strlen(pass) + strlen(user)) * 2 + 4); |
|
295 | 295 |
if(!buf) { |
296 | 296 |
logg("!proxyauth: Can't allocate memory for 'buf'\n"); |
297 | 297 |
free(userpass); |
... | ... |
@@ -301,7 +300,7 @@ static char *proxyauth(const char *user, const char *pass) |
301 | 301 |
len = fmt_base64(buf, userpass, strlen(userpass)); |
302 | 302 |
free(userpass); |
303 | 303 |
buf[len] = '\0'; |
304 |
- auth = mmalloc(strlen(buf) + 30); |
|
304 |
+ auth = malloc(strlen(buf) + 30); |
|
305 | 305 |
if(!auth) { |
306 | 306 |
logg("!proxyauth: Can't allocate memory for 'authorization'\n"); |
307 | 307 |
return NULL; |
... | ... |
@@ -326,7 +325,7 @@ static struct cl_cvd *remote_cvdhead(const char *file, const char *hostname, cha |
326 | 326 |
|
327 | 327 |
|
328 | 328 |
if(proxy) { |
329 |
- remotename = mmalloc(strlen(hostname) + 8); |
|
329 |
+ remotename = malloc(strlen(hostname) + 8); |
|
330 | 330 |
if(!remotename) { |
331 | 331 |
logg("!remote_cvdhead: Can't allocate memory for 'remotename'\n"); |
332 | 332 |
return NULL; |
... | ... |
@@ -491,7 +490,7 @@ static int getfile(const char *srcfile, const char *destfile, const char *hostna |
491 | 491 |
|
492 | 492 |
|
493 | 493 |
if(proxy) { |
494 |
- remotename = mmalloc(strlen(hostname) + 8); |
|
494 |
+ remotename = malloc(strlen(hostname) + 8); |
|
495 | 495 |
if(!remotename) { |
496 | 496 |
logg("!getfile: Can't allocate memory for 'remotename'\n"); |
497 | 497 |
return 75; /* FIXME */ |
... | ... |
@@ -1229,7 +1228,7 @@ int downloadmanager(const struct cfgstruct *copt, const struct optstruct *opt, c |
1229 | 1229 |
char *cmd = strdup(arg); |
1230 | 1230 |
|
1231 | 1231 |
if((pt = strstr(cmd, "%v")) && newver && isdigit(*newver)) { |
1232 |
- char *buffer = (char *) mcalloc(strlen(cmd) + strlen(newver) + 10, sizeof(char)); |
|
1232 |
+ char *buffer = (char *) malloc(strlen(cmd) + strlen(newver) + 10); |
|
1233 | 1233 |
|
1234 | 1234 |
if(!buffer) { |
1235 | 1235 |
logg("!downloadmanager: Can't allocate memory for buffer\n"); |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
/* |
2 |
- * Copyright (C) 2006 Tomasz Kojm <tkojm@clamav.net> |
|
2 |
+ * Copyright (C) 2006 - 2007 Tomasz Kojm <tkojm@clamav.net> |
|
3 | 3 |
* |
4 | 4 |
* This program is free software; you can redistribute it and/or modify |
5 | 5 |
* it under the terms of the GNU General Public License as published by |
... | ... |
@@ -29,7 +29,6 @@ |
29 | 29 |
#include <sys/stat.h> |
30 | 30 |
#include <unistd.h> |
31 | 31 |
|
32 |
-#include "shared/memory.h" |
|
33 | 32 |
#include "shared/misc.h" |
34 | 33 |
#include "shared/output.h" |
35 | 34 |
#include "shared/cdiff.h" |
... | ... |
@@ -154,7 +153,7 @@ static char *cdiff_token(const char *line, unsigned int token, unsigned int last |
154 | 154 |
if(i == j) |
155 | 155 |
return NULL; |
156 | 156 |
|
157 |
- buffer = mmalloc(j - i + 1); |
|
157 |
+ buffer = malloc(j - i + 1); |
|
158 | 158 |
if(!buffer) |
159 | 159 |
return NULL; |
160 | 160 |
|
... | ... |
@@ -204,7 +203,7 @@ static int cdiff_cmd_add(const char *cmdstr, struct cdiff_ctx *ctx) |
204 | 204 |
return -1; |
205 | 205 |
} |
206 | 206 |
|
207 |
- new = mcalloc(1, sizeof(struct cdiff_node)); |
|
207 |
+ new = (struct cdiff_node *) calloc(1, sizeof(struct cdiff_node)); |
|
208 | 208 |
if(!new) { |
209 | 209 |
logg("!cdiff_cmd_add: Can't allocate memory for cdiff_node\n"); |
210 | 210 |
free(sig); |
... | ... |
@@ -241,7 +240,7 @@ static int cdiff_cmd_del(const char *cmdstr, struct cdiff_ctx *ctx) |
241 | 241 |
return -1; |
242 | 242 |
} |
243 | 243 |
|
244 |
- new = mcalloc(1, sizeof(struct cdiff_node)); |
|
244 |
+ new = (struct cdiff_node *) calloc(1, sizeof(struct cdiff_node)); |
|
245 | 245 |
if(!new) { |
246 | 246 |
logg("!cdiff_cmd_del: Can't allocate memory for cdiff_node\n"); |
247 | 247 |
free(arg); |
... | ... |
@@ -304,7 +303,7 @@ static int cdiff_cmd_xchg(const char *cmdstr, struct cdiff_ctx *ctx) |
304 | 304 |
return -1; |
305 | 305 |
} |
306 | 306 |
|
307 |
- new = mcalloc(1, sizeof(struct cdiff_node)); |
|
307 |
+ new = (struct cdiff_node *) calloc(1, sizeof(struct cdiff_node)); |
|
308 | 308 |
if(!new) { |
309 | 309 |
logg("!cdiff_cmd_xchg: Can't allocate memory for cdiff_node\n"); |
310 | 310 |
free(arg); |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
/* |
2 |
- * Copyright (C) 2002 - 2005 Tomasz Kojm <tkojm@clamav.net> |
|
2 |
+ * Copyright (C) 2002 - 2007 Tomasz Kojm <tkojm@clamav.net> |
|
3 | 3 |
* |
4 | 4 |
* This program is free software; you can redistribute it and/or modify |
5 | 5 |
* it under the terms of the GNU General Public License as published by |
... | ... |
@@ -27,7 +27,6 @@ |
27 | 27 |
#include <ctype.h> |
28 | 28 |
|
29 | 29 |
#include "shared/cfgparser.h" |
30 |
-#include "shared/memory.h" |
|
31 | 30 |
#include "shared/misc.h" |
32 | 31 |
|
33 | 32 |
#include "libclamav/str.h" |
... | ... |
@@ -286,7 +285,7 @@ struct cfgstruct *getcfg(const char *cfgfile, int verbose) |
286 | 286 |
} |
287 | 287 |
ctype = tolower(arg[strlen(arg) - 1]); |
288 | 288 |
if(ctype == 'm' || ctype == 'k') { |
289 |
- char *cpy = (char *) mcalloc(strlen(arg), sizeof(char)); |
|
289 |
+ char *cpy = (char *) malloc(strlen(arg)); |
|
290 | 290 |
strncpy(cpy, arg, strlen(arg) - 1); |
291 | 291 |
if(!isnumb(cpy)) { |
292 | 292 |
if(verbose) |
... | ... |
@@ -441,7 +440,7 @@ static int regcfg(struct cfgstruct **copt, const char *optname, char *strarg, in |
441 | 441 |
struct cfgstruct *newnode, *pt; |
442 | 442 |
|
443 | 443 |
|
444 |
- newnode = (struct cfgstruct *) mmalloc(sizeof(struct cfgstruct)); |
|
444 |
+ newnode = (struct cfgstruct *) malloc(sizeof(struct cfgstruct)); |
|
445 | 445 |
|
446 | 446 |
if(!newnode) |
447 | 447 |
return -1; |
448 | 448 |
deleted file mode 100644 |
... | ... |
@@ -1,49 +0,0 @@ |
1 |
-/* |
|
2 |
- * Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net> |
|
3 |
- * |
|
4 |
- * This program is free software; you can redistribute it and/or modify |
|
5 |
- * it under the terms of the GNU General Public License as published by |
|
6 |
- * the Free Software Foundation; either version 2 of the License, or |
|
7 |
- * (at your option) any later version. |
|
8 |
- * |
|
9 |
- * This program is distributed in the hope that it will be useful, |
|
10 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
- * GNU General Public License for more details. |
|
13 |
- * |
|
14 |
- * You should have received a copy of the GNU General Public License |
|
15 |
- * along with this program; if not, write to the Free Software |
|
16 |
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
17 |
- * MA 02110-1301, USA. |
|
18 |
- */ |
|
19 |
- |
|
20 |
-#include <stdio.h> |
|
21 |
-#include <stdlib.h> |
|
22 |
-#include <unistd.h> |
|
23 |
-#include "memory.h" |
|
24 |
- |
|
25 |
-void *mmalloc(size_t size) |
|
26 |
-{ |
|
27 |
- void *alloc; |
|
28 |
- |
|
29 |
- alloc = malloc(size); |
|
30 |
- |
|
31 |
- if(!alloc) { |
|
32 |
- fprintf(stderr, "CRITICAL: Can't allocate memory (%ld bytes).\n", (long int) size); |
|
33 |
- _exit(71); |
|
34 |
- return NULL; /* shut up gcc */ |
|
35 |
- } else return alloc; |
|
36 |
-} |
|
37 |
- |
|
38 |
-void *mcalloc(size_t nmemb, size_t size) |
|
39 |
-{ |
|
40 |
- void *alloc; |
|
41 |
- |
|
42 |
- alloc = calloc(nmemb, size); |
|
43 |
- |
|
44 |
- if(!alloc) { |
|
45 |
- fprintf(stderr, "CRITICAL: Can't allocate memory (%ld bytes).\n", (long int) nmemb * size); |
|
46 |
- _exit(70); |
|
47 |
- return NULL; |
|
48 |
- } else return alloc; |
|
49 |
-} |
50 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,28 +0,0 @@ |
1 |
-/* |
|
2 |
- * Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net> |
|
3 |
- * |
|
4 |
- * This program is free software; you can redistribute it and/or modify |
|
5 |
- * it under the terms of the GNU General Public License as published by |
|
6 |
- * the Free Software Foundation; either version 2 of the License, or |
|
7 |
- * (at your option) any later version. |
|
8 |
- * |
|
9 |
- * This program is distributed in the hope that it will be useful, |
|
10 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
- * GNU General Public License for more details. |
|
13 |
- * |
|
14 |
- * You should have received a copy of the GNU General Public License |
|
15 |
- * along with this program; if not, write to the Free Software |
|
16 |
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
17 |
- * MA 02110-1301, USA. |
|
18 |
- */ |
|
19 |
- |
|
20 |
-#ifndef __MEMORY_H |
|
21 |
-#define __MEMORY_H |
|
22 |
- |
|
23 |
-#include <stdlib.h> |
|
24 |
- |
|
25 |
-void *mmalloc(size_t size); |
|
26 |
-void *mcalloc(size_t nmemb, size_t size); |
|
27 |
- |
|
28 |
-#endif |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
/* |
2 |
- * Copyright (C) 2004 - 2005 Tomasz Kojm <tkojm@clamav.net> |
|
2 |
+ * Copyright (C) 2004 - 2007 Tomasz Kojm <tkojm@clamav.net> |
|
3 | 3 |
* |
4 | 4 |
* This program is free software; you can redistribute it and/or modify |
5 | 5 |
* it under the terms of the GNU General Public License as published by |
... | ... |
@@ -38,7 +38,6 @@ |
38 | 38 |
#include <errno.h> |
39 | 39 |
|
40 | 40 |
#include "shared/cfgparser.h" |
41 |
-#include "shared/memory.h" |
|
42 | 41 |
#include "shared/output.h" |
43 | 42 |
|
44 | 43 |
#include "libclamav/clamav.h" |
... | ... |
@@ -69,7 +68,7 @@ char *freshdbdir(void) |
69 | 69 |
if((copt = getcfg(CONFDIR"/clamd.conf", 0))) { |
70 | 70 |
if((cpt = cfgopt(copt, "DatabaseDirectory"))->enabled || (cpt = cfgopt(copt, "DataDirectory"))->enabled) { |
71 | 71 |
if(strcmp(dbdir, cpt->strarg)) { |
72 |
- char *daily = (char *) mmalloc(strlen(cpt->strarg) + strlen(dbdir) + 30); |
|
72 |
+ char *daily = (char *) malloc(strlen(cpt->strarg) + strlen(dbdir) + 30); |
|
73 | 73 |
sprintf(daily, "%s/daily.cvd", cpt->strarg); |
74 | 74 |
if(stat(daily, &foo) == -1) |
75 | 75 |
sprintf(daily, "%s/daily.inc/daily.info", cpt->strarg); |
... | ... |
@@ -113,7 +112,7 @@ void print_version(void) |
113 | 113 |
|
114 | 114 |
|
115 | 115 |
dbdir = freshdbdir(); |
116 |
- if(!(path = mmalloc(strlen(dbdir) + 30))) { |
|
116 |
+ if(!(path = malloc(strlen(dbdir) + 30))) { |
|
117 | 117 |
free(dbdir); |
118 | 118 |
return; |
119 | 119 |
} |
... | ... |
@@ -29,7 +29,6 @@ |
29 | 29 |
#include "getopt.h" |
30 | 30 |
|
31 | 31 |
#include "options.h" |
32 |
-#include "memory.h" |
|
33 | 32 |
#include "output.h" |
34 | 33 |
|
35 | 34 |
|
... | ... |
@@ -70,18 +69,18 @@ static int register_option(struct optstruct *opt, const char *optlong, char opts |
70 | 70 |
} |
71 | 71 |
} |
72 | 72 |
|
73 |
- newnode = (struct optnode *) mmalloc(sizeof(struct optnode)); |
|
73 |
+ newnode = (struct optnode *) malloc(sizeof(struct optnode)); |
|
74 | 74 |
if(!newnode) { |
75 |
- mprintf("!register_long_option: mmalloc failed\n"); |
|
75 |
+ mprintf("!register_long_option: malloc failed\n"); |
|
76 | 76 |
return -1; |
77 | 77 |
} |
78 | 78 |
|
79 | 79 |
newnode->optshort = optshort; |
80 | 80 |
|
81 | 81 |
if(optarg) { |
82 |
- newnode->optarg = (char *) mcalloc(strlen(optarg) + 1, sizeof(char)); |
|
82 |
+ newnode->optarg = (char *) malloc(strlen(optarg) + 1); |
|
83 | 83 |
if(!newnode->optarg) { |
84 |
- mprintf("!register_long_option: mcalloc failed\n"); |
|
84 |
+ mprintf("!register_long_option: malloc failed\n"); |
|
85 | 85 |
free(newnode); |
86 | 86 |
return -1; |
87 | 87 |
} |
... | ... |
@@ -89,9 +88,9 @@ static int register_option(struct optstruct *opt, const char *optlong, char opts |
89 | 89 |
} else |
90 | 90 |
newnode->optarg = NULL; |
91 | 91 |
|
92 |
- newnode->optlong = (char *) mcalloc(strlen(longname) + 1, sizeof(char)); |
|
92 |
+ newnode->optlong = (char *) malloc(strlen(longname) + 1); |
|
93 | 93 |
if(!newnode->optlong) { |
94 |
- mprintf("ERROR: register_long_option: mcalloc failed\n"); |
|
94 |
+ mprintf("ERROR: register_long_option: malloc failed\n"); |
|
95 | 95 |
free(newnode->optarg); |
96 | 96 |
free(newnode); |
97 | 97 |
return -1; |
... | ... |
@@ -134,9 +133,9 @@ struct optstruct *opt_parse(int argc, char * const *argv, const char *getopt_sho |
134 | 134 |
const char *longname; |
135 | 135 |
|
136 | 136 |
|
137 |
- opt = (struct optstruct *) mcalloc(1, sizeof(struct optstruct)); |
|
137 |
+ opt = (struct optstruct *) calloc(1, sizeof(struct optstruct)); |
|
138 | 138 |
if(!opt) { |
139 |
- mprintf("!opt_parse: mcalloc failed\n"); |
|
139 |
+ mprintf("!opt_parse: calloc failed\n"); |
|
140 | 140 |
return NULL; |
141 | 141 |
} |
142 | 142 |
|
... | ... |
@@ -183,9 +182,9 @@ struct optstruct *opt_parse(int argc, char * const *argv, const char *getopt_sho |
183 | 183 |
len += strlen(argv[i]); |
184 | 184 |
|
185 | 185 |
len += argc - optind - 1; |
186 |
- opt->filename = (char *) mcalloc(len + 64, sizeof(char)); |
|
186 |
+ opt->filename = (char *) calloc(len + 64, sizeof(char)); |
|
187 | 187 |
if(!opt->filename) { |
188 |
- mprintf("!opt_parse: mcalloc failed\n"); |
|
188 |
+ mprintf("!opt_parse: calloc failed\n"); |
|
189 | 189 |
opt_free(opt); |
190 | 190 |
return NULL; |
191 | 191 |
} |
... | ... |
@@ -42,7 +42,6 @@ |
42 | 42 |
#endif |
43 | 43 |
|
44 | 44 |
#include "output.h" |
45 |
-#include "memory.h" |
|
46 | 45 |
|
47 | 46 |
#ifdef CL_NOTHREADS |
48 | 47 |
#undef CL_THREAD_SAFE |
... | ... |
@@ -180,7 +179,7 @@ int logg(const char *str, ...) |
180 | 180 |
if(logg_time && ((*str != '*') || logg_verbose)) { |
181 | 181 |
time(&currtime); |
182 | 182 |
pt = ctime(&currtime); |
183 |
- timestr = mcalloc(strlen(pt), sizeof(char)); |
|
183 |
+ timestr = malloc(strlen(pt)); |
|
184 | 184 |
strncpy(timestr, pt, strlen(pt) - 1); |
185 | 185 |
fprintf(logg_fd, "%s -> ", timestr); |
186 | 186 |
free(timestr); |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
# |
2 |
-# Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net> |
|
2 |
+# Copyright (C) 2002 - 2007 Tomasz Kojm <tkojm@clamav.net> |
|
3 | 3 |
# |
4 | 4 |
# This program is free software; you can redistribute it and/or modify |
5 | 5 |
# it under the terms of the GNU General Public License as published by |
... | ... |
@@ -23,8 +23,6 @@ sigtool_SOURCES = \ |
23 | 23 |
$(top_srcdir)/shared/output.h \ |
24 | 24 |
$(top_srcdir)/shared/getopt.c \ |
25 | 25 |
$(top_srcdir)/shared/getopt.h \ |
26 |
- $(top_srcdir)/shared/memory.c \ |
|
27 |
- $(top_srcdir)/shared/memory.h \ |
|
28 | 26 |
$(top_srcdir)/shared/cfgparser.c \ |
29 | 27 |
$(top_srcdir)/shared/cfgparser.h \ |
30 | 28 |
$(top_srcdir)/shared/misc.c \ |
... | ... |
@@ -15,7 +15,7 @@ |
15 | 15 |
@SET_MAKE@ |
16 | 16 |
|
17 | 17 |
# |
18 |
-# Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net> |
|
18 |
+# Copyright (C) 2002 - 2007 Tomasz Kojm <tkojm@clamav.net> |
|
19 | 19 |
# |
20 | 20 |
# This program is free software; you can redistribute it and/or modify |
21 | 21 |
# it under the terms of the GNU General Public License as published by |
... | ... |
@@ -70,9 +70,8 @@ am__installdirs = "$(DESTDIR)$(bindir)" |
70 | 70 |
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) |
71 | 71 |
PROGRAMS = $(bin_PROGRAMS) |
72 | 72 |
am_sigtool_OBJECTS = output.$(OBJEXT) getopt.$(OBJEXT) \ |
73 |
- memory.$(OBJEXT) cfgparser.$(OBJEXT) misc.$(OBJEXT) \ |
|
74 |
- options.$(OBJEXT) cdiff.$(OBJEXT) vba.$(OBJEXT) \ |
|
75 |
- sigtool.$(OBJEXT) |
|
73 |
+ cfgparser.$(OBJEXT) misc.$(OBJEXT) options.$(OBJEXT) \ |
|
74 |
+ cdiff.$(OBJEXT) vba.$(OBJEXT) sigtool.$(OBJEXT) |
|
76 | 75 |
sigtool_OBJECTS = $(am_sigtool_OBJECTS) |
77 | 76 |
sigtool_LDADD = $(LDADD) |
78 | 77 |
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) |
... | ... |
@@ -223,8 +222,6 @@ sigtool_SOURCES = \ |
223 | 223 |
$(top_srcdir)/shared/output.h \ |
224 | 224 |
$(top_srcdir)/shared/getopt.c \ |
225 | 225 |
$(top_srcdir)/shared/getopt.h \ |
226 |
- $(top_srcdir)/shared/memory.c \ |
|
227 |
- $(top_srcdir)/shared/memory.h \ |
|
228 | 226 |
$(top_srcdir)/shared/cfgparser.c \ |
229 | 227 |
$(top_srcdir)/shared/cfgparser.h \ |
230 | 228 |
$(top_srcdir)/shared/misc.c \ |
... | ... |
@@ -312,7 +309,6 @@ distclean-compile: |
312 | 312 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdiff.Po@am__quote@ |
313 | 313 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfgparser.Po@am__quote@ |
314 | 314 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ |
315 |
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@ |
|
316 | 315 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ |
317 | 316 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options.Po@am__quote@ |
318 | 317 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output.Po@am__quote@ |
... | ... |
@@ -368,20 +364,6 @@ getopt.obj: $(top_srcdir)/shared/getopt.c |
368 | 368 |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
369 | 369 |
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getopt.obj `if test -f '$(top_srcdir)/shared/getopt.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/getopt.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/getopt.c'; fi` |
370 | 370 |
|
371 |
-memory.o: $(top_srcdir)/shared/memory.c |
|
372 |
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.o -MD -MP -MF "$(DEPDIR)/memory.Tpo" -c -o memory.o `test -f '$(top_srcdir)/shared/memory.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/memory.c; \ |
|
373 |
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memory.Tpo" "$(DEPDIR)/memory.Po"; else rm -f "$(DEPDIR)/memory.Tpo"; exit 1; fi |
|
374 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/shared/memory.c' object='memory.o' libtool=no @AMDEPBACKSLASH@ |
|
375 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
376 |
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.o `test -f '$(top_srcdir)/shared/memory.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/memory.c |
|
377 |
- |
|
378 |
-memory.obj: $(top_srcdir)/shared/memory.c |
|
379 |
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.obj -MD -MP -MF "$(DEPDIR)/memory.Tpo" -c -o memory.obj `if test -f '$(top_srcdir)/shared/memory.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/memory.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/memory.c'; fi`; \ |
|
380 |
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/memory.Tpo" "$(DEPDIR)/memory.Po"; else rm -f "$(DEPDIR)/memory.Tpo"; exit 1; fi |
|
381 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/shared/memory.c' object='memory.obj' libtool=no @AMDEPBACKSLASH@ |
|
382 |
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
383 |
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.obj `if test -f '$(top_srcdir)/shared/memory.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/memory.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/memory.c'; fi` |
|
384 |
- |
|
385 | 371 |
cfgparser.o: $(top_srcdir)/shared/cfgparser.c |
386 | 372 |
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfgparser.o -MD -MP -MF "$(DEPDIR)/cfgparser.Tpo" -c -o cfgparser.o `test -f '$(top_srcdir)/shared/cfgparser.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/cfgparser.c; \ |
387 | 373 |
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/cfgparser.Tpo" "$(DEPDIR)/cfgparser.Po"; else rm -f "$(DEPDIR)/cfgparser.Tpo"; exit 1; fi |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
/* |
2 |
- * Copyright (C) 2002 - 2006 Tomasz Kojm <tkojm@clamav.net> |
|
2 |
+ * Copyright (C) 2002 - 2007 Tomasz Kojm <tkojm@clamav.net> |
|
3 | 3 |
* |
4 | 4 |
* This program is free software; you can redistribute it and/or modify |
5 | 5 |
* it under the terms of the GNU General Public License as published by |
... | ... |
@@ -46,7 +46,6 @@ |
46 | 46 |
#include "vba.h" |
47 | 47 |
|
48 | 48 |
#include "shared/options.h" |
49 |
-#include "shared/memory.h" |
|
50 | 49 |
#include "shared/output.h" |
51 | 50 |
#include "shared/cfgparser.h" |
52 | 51 |
#include "shared/misc.h" |
... | ... |
@@ -935,7 +934,7 @@ static int unpack(struct optstruct *opt) |
935 | 935 |
|
936 | 936 |
if(opt_check(opt, "unpack-current")) { |
937 | 937 |
dbdir = freshdbdir(); |
938 |
- name = mcalloc(strlen(dbdir) + strlen(opt_arg(opt, "unpack-current")) + 32, sizeof(char)); |
|
938 |
+ name = malloc(strlen(dbdir) + strlen(opt_arg(opt, "unpack-current")) + 32); |
|
939 | 939 |
sprintf(name, "%s/%s.inc", dbdir, opt_arg(opt, "unpack-current")); |
940 | 940 |
if(stat(name, &sb) != -1) { |
941 | 941 |
|
... | ... |
@@ -1033,8 +1032,7 @@ static int listdir(const char *dirname) |
1033 | 1033 |
cli_strbcasestr(dent->d_name, ".inc") || |
1034 | 1034 |
cli_strbcasestr(dent->d_name, ".cvd"))) { |
1035 | 1035 |
|
1036 |
- dbfile = (char *) mcalloc(strlen(dent->d_name) + strlen(dirname) + 2, sizeof(char)); |
|
1037 |
- |
|
1036 |
+ dbfile = (char *) malloc(strlen(dent->d_name) + strlen(dirname) + 2); |
|
1038 | 1037 |
if(!dbfile) { |
1039 | 1038 |
mprintf("!listdir: Can't allocate memory for dbfile\n"); |
1040 | 1039 |
closedir(dd); |
... | ... |
@@ -1078,7 +1076,7 @@ static int listdb(const char *filename) |
1078 | 1078 |
return -1; |
1079 | 1079 |
} |
1080 | 1080 |
|
1081 |
- if(!(buffer = (char *) mcalloc(FILEBUFF, 1))) { |
|
1081 |
+ if(!(buffer = (char *) malloc(FILEBUFF))) { |
|
1082 | 1082 |
mprintf("!listdb: Can't allocate memory for buffer\n"); |
1083 | 1083 |
fclose(fd); |
1084 | 1084 |
return -1; |