diff --git a/clamav-devel/libclamav/blob.c b/clamav-devel/libclamav/blob.c index a88d706f7..040b68005 100644 --- a/clamav-devel/libclamav/blob.c +++ b/clamav-devel/libclamav/blob.c @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -static char const rcsid[] = "$Id: blob.c,v 1.38 2005/03/18 08:34:35 nigelhorne Exp $"; +static char const rcsid[] = "$Id: blob.c,v 1.39 2005/03/20 09:09:25 nigelhorne Exp $"; #if HAVE_CONFIG_H #include "clamav-config.h" @@ -41,21 +41,6 @@ static char const rcsid[] = "$Id: blob.c,v 1.38 2005/03/18 08:34:35 nigelhorne E #define NDEBUG /* map CLAMAV debug onto standard */ #endif -/* Maximum filenames under various systems */ -#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 -#endif - -#endif - -#endif - #ifndef O_BINARY #define O_BINARY 0 #endif diff --git a/clamav-devel/libclamav/blob.h b/clamav-devel/libclamav/blob.h index 11a3848ce..6eb6edee0 100644 --- a/clamav-devel/libclamav/blob.h +++ b/clamav-devel/libclamav/blob.h @@ -63,4 +63,17 @@ const char *fileblobGetFilename(const fileblob *fb); void fileblobAddData(fileblob *fb, const unsigned char *data, size_t len); void sanitiseName(char *name); +/* Maximum filenames under various systems */ +#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 + #endif /*_BLOB_H*/ diff --git a/clamav-devel/libclamav/mbox.c b/clamav-devel/libclamav/mbox.c index cc238d523..bd11ba36b 100644 --- a/clamav-devel/libclamav/mbox.c +++ b/clamav-devel/libclamav/mbox.c @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -static char const rcsid[] = "$Id: mbox.c,v 1.229 2005/03/18 18:12:25 nigelhorne Exp $"; +static char const rcsid[] = "$Id: mbox.c,v 1.230 2005/03/20 09:09:25 nigelhorne Exp $"; #if HAVE_CONFIG_H #include "clamav-config.h" @@ -291,21 +291,6 @@ static const struct tableinit { static pthread_mutex_t tables_mutex = PTHREAD_MUTEX_INITIALIZER; #endif -/* Maximum filenames under various systems */ -#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 -#endif - -#endif - -#endif - #ifndef O_BINARY #define O_BINARY 0 #endif diff --git a/clamav-devel/libclamav/untar.c b/clamav-devel/libclamav/untar.c index e102042f1..f6ca43176 100644 --- a/clamav-devel/libclamav/untar.c +++ b/clamav-devel/libclamav/untar.c @@ -21,6 +21,9 @@ * * Change History: * $Log: untar.c,v $ + * Revision 1.23 2005/03/20 09:09:25 nigelhorne + * Consolidate NAME_MAX + * * Revision 1.22 2005/03/10 08:52:10 nigelhorne * Tidy * @@ -88,7 +91,7 @@ * First draft * */ -static char const rcsid[] = "$Id: untar.c,v 1.22 2005/03/10 08:52:10 nigelhorne Exp $"; +static char const rcsid[] = "$Id: untar.c,v 1.23 2005/03/20 09:09:25 nigelhorne Exp $"; #include #include @@ -106,21 +109,6 @@ static char const rcsid[] = "$Id: untar.c,v 1.22 2005/03/10 08:52:10 nigelhorne #define BLOCKSIZE 512 -/* Maximum filenames under various systems */ -#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 -#endif - -#endif - -#endif - #ifndef O_BINARY #define O_BINARY 0 #endif