/[openvortex]/alsa/include/adriver.h
ViewVC logotype

Diff of /alsa/include/adriver.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by vizard, Sat May 31 02:35:15 2003 UTC revision 1.3 by vizard, Sun Jun 15 21:01:32 2003 UTC
# Line 50  Line 50 
50    
51  #include <linux/module.h>  #include <linux/module.h>
52    
53    #ifdef CONFIG_HAVE_OLD_REQUEST_MODULE
54    #include <linux/kmod.h>
55    #undef request_module
56    void snd_compat_request_module(const char *name, ...);
57    #define request_module(name, args...) snd_compat_request_module(name, ##args)
58    #endif
59    
60    #include <linux/compiler.h>
61    #ifndef __user
62    #define __user
63    #endif
64    
65  #ifdef CONFIG_PCI  #ifdef CONFIG_PCI
66  #include <linux/pci.h>  #include <linux/pci.h>
67  #endif  #endif
# Line 105  Line 117 
117          unsigned long name[((bits)+BITS_PER_LONG-1)/BITS_PER_LONG]          unsigned long name[((bits)+BITS_PER_LONG-1)/BITS_PER_LONG]
118  #endif  #endif
119    
120  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 3)  #include <linux/sched.h>
121    #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 3) && !defined(need_resched)
122  #define need_resched() (current->need_resched)  #define need_resched() (current->need_resched)
123  #endif  #endif
124  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 4)  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 4)
# Line 147  static inline struct proc_dir_entry *PDE Line 160  static inline struct proc_dir_entry *PDE
160  #define MODULE_LICENSE(license)  #define MODULE_LICENSE(license)
161  #endif  #endif
162    
163  /* no vsnprintf yet? */  #ifndef CONFIG_HAVE_STRLCPY
164  /* FIXME: the version number is not sure.. at least it exists already on 2.4.10 */  size_t snd_compat_strlcpy(char *dest, const char *src, size_t size);
165  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 10)  #define strlcpy(dest, src, size) snd_compat_strlcpy(dest, src, size)
166  #define snprintf(buf,size,fmt,args...) sprintf(buf,fmt,##args)  size_t snd_compat_strlcat(char *dest, const char *src, size_t size);
167  #define vsnprintf(buf,size,fmt,args) vsprintf(buf,fmt,args)  #define strlcat(dest, src, size) snd_compat_strlcat(dest, src, size)
168    #endif
169    
170    #ifndef CONFIG_HAVE_SNPRINTF
171    #include <stdarg.h>
172    int snd_compat_snprintf(char * buf, size_t size, const char * fmt, ...);
173    int snd_compat_vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
174    #define snprintf(buf,size,fmt,args...) snd_compat_snprintf(buf,size,fmt,##args)
175    #define vsnprintf(buf,size,fmt,args) snd_compat_vsnprintf(buf,size,fmt,args)
176  #endif  #endif
177    
178  #if defined(__alpha__) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 14)  #if defined(__alpha__) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 14)
# Line 168  static inline struct proc_dir_entry *PDE Line 189  static inline struct proc_dir_entry *PDE
189    
190  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 28)  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 28)
191  #include <linux/interrupt.h>  #include <linux/interrupt.h>
 #include <linux/sched.h>  
192  static inline void synchronize_irq_wrapper(unsigned int irq) { synchronize_irq(); }  static inline void synchronize_irq_wrapper(unsigned int irq) { synchronize_irq(); }
193  #undef synchronize_irq  #undef synchronize_irq
194  #define synchronize_irq(irq)    synchronize_irq_wrapper(irq)  #define synchronize_irq(irq)    synchronize_irq_wrapper(irq)
# Line 212  typedef void irqreturn_t; Line 232  typedef void irqreturn_t;
232  #undef devfs_remove  #undef devfs_remove
233  void snd_compat_devfs_remove(const char *fmt, ...);  void snd_compat_devfs_remove(const char *fmt, ...);
234  #define devfs_remove snd_compat_devfs_remove  #define devfs_remove snd_compat_devfs_remove
235    #endif
236  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 67)  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 67)
237  #undef devfs_mk_dir  #undef devfs_mk_dir
238  devfs_handle_t snd_compat_devfs_mk_dir(const char *dir);  int snd_compat_devfs_mk_dir(const char *dir, ...);
239  #define devfs_mk_dir snd_compat_devfs_mk_dir  #define devfs_mk_dir snd_compat_devfs_mk_dir
240  #endif  #undef devfs_mk_cdev
241    int snd_compat_devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...);
242    #define devfs_mk_cdev snd_compat_devfs_mk_cdev
243  #endif  #endif
244  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)
245  static inline void devfs_find_and_unregister (devfs_handle_t dir, const char *name,  static inline void devfs_find_and_unregister (devfs_handle_t dir, const char *name,
# Line 242  static inline void devfs_find_and_unregi Line 265  static inline void devfs_find_and_unregi
265  static inline void devfs_remove(const char *fmt, ...) { }  static inline void devfs_remove(const char *fmt, ...) { }
266  #endif  #endif
267  #undef devfs_mk_dir  #undef devfs_mk_dir
268  #define devfs_mk_dir(dir) do { (void)(dir); } while (0)  #define devfs_mk_dir(dir, args...) do { (void)(dir); } while (0)
269    #undef devfs_mk_cdev
270    #define devfs_mk_cdev(dev, mode, fmt, args...) do { (void)(dev); } while (0)
271  #endif /* CONFIG_DEVFS_FS */  #endif /* CONFIG_DEVFS_FS */
272    
273  /* workarounds for USB API */  /* workarounds for USB API */

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26