Changeset 3890:bbf415110a11 in roaraudio for libroaross


Ignore:
Timestamp:
05/25/10 13:08:13 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

use support creat() on FreeBSD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroaross/libroaross.c

    r3880 r3890  
    9494#endif 
    9595 
     96#ifdef ROAR_OS_FREEBSD 
     97#define _CREAT_ARG_PATHNAME path 
     98#else 
     99#define _CREAT_ARG_PATHNAME pathname 
     100#endif 
     101 
    96102#ifdef ROAR_OS_NETBSD 
    97103#define IOCTL() int _oss_ioctl __P((int fd, unsigned long com, void *argp)) 
     
    167173 int     (*access)(const char *pathname, int mode); 
    168174 int     (*open64)(const char *__file, int __oflag, ...); 
    169  int     (*creat)(const char *pathname, mode_t mode); 
     175 int     (*creat)(const char *_CREAT_ARG_PATHNAME, mode_t mode); 
    170176 int     (*stat)(const char *path, struct stat *buf); 
    171177 int     (*fstat)(int filedes, struct stat *buf); 
     
    18631869} 
    18641870 
    1865 int creat(const char *pathname, mode_t mode) { 
     1871int creat(const char *_CREAT_ARG_PATHNAME, mode_t mode) { 
    18661872 _init(); 
    18671873 
    1868  if ( _get_device(pathname) != NULL ) { 
     1874 if ( _get_device(_CREAT_ARG_PATHNAME) != NULL ) { 
    18691875  errno = EEXIST; 
    18701876  return -1; 
    18711877 } 
    18721878 
    1873  return _os.creat(pathname, mode); 
     1879 return _os.creat(_CREAT_ARG_PATHNAME, mode); 
    18741880} 
    18751881 
Note: See TracChangeset for help on using the changeset viewer.