git-svn: trunk@3498
Török Edvin authored on 2008/01/13 06:29:22... | ... |
@@ -1,3 +1,9 @@ |
1 |
+Sat Jan 12 23:00:17 EET 2008 (edwin) |
|
2 |
+------------------------------------ |
|
3 |
+ * libclamav/Makefile.am/in, others.c: Fix build problem on OpenBSD: don't compile in |
|
4 |
+ functions depending on pthreads into libclamav_internal_utils.a, because |
|
5 |
+ clamdscan is compiled without pthreads. |
|
6 |
+ |
|
1 | 7 |
Fri Jan 11 22:50:33 CET 2008 (tk) |
2 | 8 |
--------------------------------- |
3 | 9 |
* libclamav/cvd.c: fix loading of .cld files on some platforms (bb#770) |
... | ... |
@@ -189,12 +189,10 @@ libclamav_la_SOURCES = \ |
189 | 189 |
libclamav_internal_utils_la_SOURCES=str.c \ |
190 | 190 |
str.h \ |
191 | 191 |
others.c \ |
192 |
- others.h \ |
|
193 |
- md5.c \ |
|
194 |
- md5.h |
|
192 |
+ others.h |
|
195 | 193 |
|
196 | 194 |
libclamav_internal_utils_la_LDFLAGS=-static |
197 |
- |
|
195 |
+libclamav_internal_utils_la_CFLAGS=-DCLI_MEMFUNSONLY |
|
198 | 196 |
lib_LTLIBRARIES = libclamav.la |
199 | 197 |
noinst_LTLIBRARIES = libclamav_internal_utils.la |
200 | 198 |
EXTRA_DIST = regex/engine.c libclamav.map |
... | ... |
@@ -94,13 +94,15 @@ libclamav_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ |
94 | 94 |
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ |
95 | 95 |
$(libclamav_la_LDFLAGS) $(LDFLAGS) -o $@ |
96 | 96 |
libclamav_internal_utils_la_LIBADD = |
97 |
-am_libclamav_internal_utils_la_OBJECTS = str.lo others.lo md5.lo |
|
97 |
+am_libclamav_internal_utils_la_OBJECTS = \ |
|
98 |
+ libclamav_internal_utils_la-str.lo \ |
|
99 |
+ libclamav_internal_utils_la-others.lo |
|
98 | 100 |
libclamav_internal_utils_la_OBJECTS = \ |
99 | 101 |
$(am_libclamav_internal_utils_la_OBJECTS) |
100 | 102 |
libclamav_internal_utils_la_LINK = $(LIBTOOL) --tag=CC \ |
101 | 103 |
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ |
102 |
- $(AM_CFLAGS) $(CFLAGS) $(libclamav_internal_utils_la_LDFLAGS) \ |
|
103 |
- $(LDFLAGS) -o $@ |
|
104 |
+ $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) \ |
|
105 |
+ $(libclamav_internal_utils_la_LDFLAGS) $(LDFLAGS) -o $@ |
|
104 | 106 |
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ |
105 | 107 |
depcomp = $(SHELL) $(top_srcdir)/depcomp |
106 | 108 |
am__depfiles_maybe = depfiles |
... | ... |
@@ -411,11 +413,10 @@ libclamav_la_SOURCES = \ |
411 | 411 |
libclamav_internal_utils_la_SOURCES = str.c \ |
412 | 412 |
str.h \ |
413 | 413 |
others.c \ |
414 |
- others.h \ |
|
415 |
- md5.c \ |
|
416 |
- md5.h |
|
414 |
+ others.h |
|
417 | 415 |
|
418 | 416 |
libclamav_internal_utils_la_LDFLAGS = -static |
417 |
+libclamav_internal_utils_la_CFLAGS = -DCLI_MEMFUNSONLY |
|
419 | 418 |
lib_LTLIBRARIES = libclamav.la |
420 | 419 |
noinst_LTLIBRARIES = libclamav_internal_utils.la |
421 | 420 |
EXTRA_DIST = regex/engine.c libclamav.map |
... | ... |
@@ -518,6 +519,8 @@ distclean-compile: |
518 | 518 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htmlnorm.Plo@am__quote@ |
519 | 519 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inflate64.Plo@am__quote@ |
520 | 520 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/is_tar.Plo@am__quote@ |
521 |
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-others.Plo@am__quote@ |
|
522 |
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-str.Plo@am__quote@ |
|
521 | 523 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/line.Plo@am__quote@ |
522 | 524 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzma_iface.Plo@am__quote@ |
523 | 525 |
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matcher-ac.Plo@am__quote@ |
... | ... |
@@ -640,6 +643,20 @@ nulsft.lo: nsis/nulsft.c |
640 | 640 |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
641 | 641 |
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nulsft.lo `test -f 'nsis/nulsft.c' || echo '$(srcdir)/'`nsis/nulsft.c |
642 | 642 |
|
643 |
+libclamav_internal_utils_la-str.lo: str.c |
|
644 |
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-str.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-str.Tpo -c -o libclamav_internal_utils_la-str.lo `test -f 'str.c' || echo '$(srcdir)/'`str.c |
|
645 |
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libclamav_internal_utils_la-str.Tpo $(DEPDIR)/libclamav_internal_utils_la-str.Plo |
|
646 |
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='str.c' object='libclamav_internal_utils_la-str.lo' libtool=yes @AMDEPBACKSLASH@ |
|
647 |
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
648 |
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-str.lo `test -f 'str.c' || echo '$(srcdir)/'`str.c |
|
649 |
+ |
|
650 |
+libclamav_internal_utils_la-others.lo: others.c |
|
651 |
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-others.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-others.Tpo -c -o libclamav_internal_utils_la-others.lo `test -f 'others.c' || echo '$(srcdir)/'`others.c |
|
652 |
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libclamav_internal_utils_la-others.Tpo $(DEPDIR)/libclamav_internal_utils_la-others.Plo |
|
653 |
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='others.c' object='libclamav_internal_utils_la-others.lo' libtool=yes @AMDEPBACKSLASH@ |
|
654 |
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
|
655 |
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-others.lo `test -f 'others.c' || echo '$(srcdir)/'`others.c |
|
656 |
+ |
|
643 | 657 |
mostlyclean-libtool: |
644 | 658 |
-rm -f *.lo |
645 | 659 |
|
... | ... |
@@ -116,6 +116,7 @@ void cli_dbgmsg(const char *str, ...) |
116 | 116 |
} |
117 | 117 |
} |
118 | 118 |
|
119 |
+#ifndef CLI_MEMFUNSONLY |
|
119 | 120 |
void cl_debug(void) |
120 | 121 |
{ |
121 | 122 |
cli_debug_flag = 1; |
... | ... |
@@ -290,6 +291,7 @@ static char *cli_md5buff(const unsigned char *buffer, unsigned int len, unsigned |
290 | 290 |
|
291 | 291 |
return md5str; |
292 | 292 |
} |
293 |
+#endif |
|
293 | 294 |
|
294 | 295 |
void *cli_malloc(size_t size) |
295 | 296 |
{ |
... | ... |
@@ -402,6 +404,7 @@ char *cli_strdup(const char *s) |
402 | 402 |
return alloc; |
403 | 403 |
} |
404 | 404 |
|
405 |
+#ifndef CLI_MEMFUNSONLY |
|
405 | 406 |
unsigned int cli_rndnum(unsigned int max) |
406 | 407 |
{ |
407 | 408 |
if(name_salt[0] == 16) { /* minimizes re-seeding after the first call to cli_gentemp() */ |
... | ... |
@@ -506,6 +509,7 @@ int cli_gentempfd(const char *dir, char **name, int *fd) |
506 | 506 |
|
507 | 507 |
return CL_SUCCESS; |
508 | 508 |
} |
509 |
+#endif |
|
509 | 510 |
|
510 | 511 |
#ifdef C_WINDOWS |
511 | 512 |
/* |