Update of /cvsroot/alsa/alsa-driver/include In directory sc8-pr-cvs1:/tmp/cvs-serv30060/include
Modified Files: adriver.h compat_22.h config.h.in Log Message: Added strlcat() and strlcpy() wrapper function. Added snprintf() and vsnprintf() wrapper functions for 2.2 kernels. Improved detection for request_module(). Cleanups in configure.in to retain backward compatibility. Index: adriver.h =================================================================== RCS file: /cvsroot/alsa/alsa-driver/include/adriver.h,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- adriver.h 23 May 2003 11:56:31 -0000 1.50 +++ adriver.h 30 May 2003 12:27:02 -0000 1.51 @@ -50,11 +50,11 @@ #include <linux/module.h> -#if defined(CONFIG_KMOD) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 69) +#ifdef CONFIG_HAVE_OLD_REQUEST_MODULE #include <linux/kmod.h> #undef request_module void snd_compat_request_module(const char *name, ...); -#define request_module snd_compat_request_module +#define request_module(name, args...) snd_compat_request_module(name, ##args) #endif #include <linux/compiler.h> @@ -160,11 +160,19 @@ #define MODULE_LICENSE(license) #endif -/* no vsnprintf yet? */ -/* FIXME: the version number is not sure.. at least it exists already on 2.4.10 */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 10) -#define snprintf(buf,size,fmt,args...) sprintf(buf,fmt,##args) -#define vsnprintf(buf,size,fmt,args) vsprintf(buf,fmt,args) +#ifndef CONFIG_HAVE_STRLCPY +size_t snd_compat_strlcpy(char *dest, const char *src, size_t size); +#define strlcpy(dest, src, size) snd_compat_strlcpy(dest, src, size) +size_t snd_compat_strlcat(char *dest, const char *src, size_t size); +#define strlcat(dest, src, size) snd_compat_strlcat(dest, src, size) +#endif + +#ifndef CONFIG_HAVE_SNPRINTF +#include <stdarg.h> +int snd_compat_snprintf(char * buf, size_t size, const char * fmt, ...); +int snd_compat_vsnprintf(char *buf, size_t size, const char *fmt, va_list args); +#define snprintf(buf,size,fmt,args...) snd_compat_snprintf(buf,size,fmt,##args) +#define vsnprintf(buf,size,fmt,args) snd_compat_vsnprintf(buf,size,fmt,args) #endif #if defined(__alpha__) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 14) Index: compat_22.h =================================================================== RCS file: /cvsroot/alsa/alsa-driver/include/compat_22.h,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- compat_22.h 8 Mar 2003 14:23:04 -0000 1.48 +++ compat_22.h 30 May 2003 12:27:03 -0000 1.49 @@ -86,10 +86,12 @@ do { __restore_flags(flags); } while (0) /* Some distributions use modified kill_fasync */ +#ifdef CONFIG_OLD_KILL_FASYNC #include <linux/fs.h> #undef kill_fasync #define kill_fasync(fp, sig, band) snd_wrapper_kill_fasync(fp, sig, band) void snd_wrapper_kill_fasync(struct fasync_struct **, int, int); +#endif /* this is identical with tq_struct but the "routine" field is renamed to "func" */ struct tasklet_struct { Index: config.h.in =================================================================== RCS file: /cvsroot/alsa/alsa-driver/include/config.h.in,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- config.h.in 7 Apr 2003 09:51:24 -0000 1.21 +++ config.h.in 30 May 2003 12:27:03 -0000 1.22 @@ -4,17 +4,9 @@ #include "config1.h" +/* ALSA section */ #undef CONFIG_SND_VERSION -#undef CONFIG_SND_KERNELDIR -#undef CONFIG_ISAPNP_KERNEL -#undef CONFIG_PNP_KERNEL -#undef CONFIG_ISAPNP -#undef CONFIG_PNP #undef CONFIG_SND_ISA -#undef CONFIG_OLD_KILL_FASYNC -#undef CONFIG_HAVE_DMA_ADDR_T -#undef CONFIG_HAVE_MUTEX_MACROS -#undef CONFIG_HAVE_VMALLOC_TO_PAGE #undef CONFIG_SND_SEQUENCER #undef CONFIG_SND_OSSEMUL #undef CONFIG_SND_MIXER_OSS @@ -28,3 +20,21 @@ #undef CONFIG_SND_BIT32_EMUL_MODULE #undef CONFIG_SND_RTCTIMER_MODULE #undef CONFIG_SND_SEQ_DUMMY_MODULE + +/* build section */ +#undef CONFIG_SND_KERNELDIR +#undef CONFIG_ISAPNP_KERNEL +#undef CONFIG_PNP_KERNEL +#undef CONFIG_ISAPNP +#undef CONFIG_PNP + +/* 2.4 kernels */ +#undef CONFIG_HAVE_OLD_REQUEST_MODULE +#undef CONFIG_HAVE_STRLCPY +#undef CONFIG_HAVE_SNPRINTF +#undef CONFIG_HAVE_VMALLOC_TO_PAGE + +/* 2.2 kernels */ +#undef CONFIG_OLD_KILL_FASYNC +#undef CONFIG_HAVE_DMA_ADDR_T +#undef CONFIG_HAVE_MUTEX_MACROS ------------------------------------------------------- This SF.net email is sponsored by: eBay Get office equipment for less on eBay! http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog