update NAME_MAX block and add workaround for HP-UX

git-svn: trunk@2879
remotes/push_mirror/metadata
Tomasz Kojm 18 years ago
parent e475362063
commit 7d34797b7d
  1. 5
      ChangeLog
  2. 13
      libclamav/others.c
  3. 7
      libclamav/others.h
  4. 13
      libclamav/scanners.c

@ -1,3 +1,8 @@
Wed Feb 28 23:40:04 CET 2007 (tk)
---------------------------------
* libclamav/others.h: update NAME_MAX block and add workaround for HP-UX
(bb#367)
Wed Feb 28 21:55:22 CET 2007 (tk)
---------------------------------
* libclamav/unrar/unrar.c: fix leak in cli_unrar_extract_next_prepare (bb#352)

@ -72,19 +72,6 @@ static pthread_mutex_t cli_gentempname_mutex = PTHREAD_MUTEX_INITIALIZER;
#include "md5.h"
#include "cltypes.h"
/* Maximum filenames under various systems - njh */
#ifndef NAME_MAX /* e.g. Linux */
# ifdef MAXNAMELEN /* e.g. Solaris */
# define NAME_MAX MAXNAMELEN
# else
# ifdef FILENAME_MAX /* e.g. SCO */
# define NAME_MAX FILENAME_MAX
# else
# define NAME_MAX 256
# endif
# endif
#endif
#ifndef O_BINARY
#define O_BINARY 0
#endif

@ -53,10 +53,17 @@
# else
# ifdef FILENAME_MAX /* e.g. SCO */
# define NAME_MAX FILENAME_MAX
# else
# define NAME_MAX 256
# endif
# endif
#endif
#if NAME_MAX < 256
#undef NAME_MAX
#define NAME_MAX 256
#endif
/* internal clamav context */
typedef struct {
const char **virname;

@ -101,19 +101,6 @@ extern short cli_leavetemps_flag;
#include <stddef.h>
#endif
/* Maximum filenames under various systems - njh */
#ifndef NAME_MAX /* e.g. Linux */
# ifdef MAXNAMELEN /* e.g. Solaris */
# define NAME_MAX MAXNAMELEN
# else
# ifdef FILENAME_MAX /* e.g. SCO */
# define NAME_MAX FILENAME_MAX
# else
# define NAME_MAX 256
# endif
# endif
#endif
#define MAX_MAIL_RECURSION 15
static int cli_scanfile(const char *filename, cli_ctx *ctx);

Loading…
Cancel
Save