Re: lack or LFS support for fopen in alsa-oss

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Thu, 15 Feb 2007 16:40:17 +0200,
Constantine Gavrilov wrote:
> 
> +#define DSP_OPEN() \
> +{ \
> +	fd = lib_oss_pcm_open(file, oflag); \
> +	if (fd >= 0) { \
> +		int nfds; \
> +		fds[fd] = calloc(sizeof(fd_t), 1); \
> +		if (fds[fd] == NULL) { \
> +			ops[FD_OSS_DSP].close(fd); \
> +			errno = ENOMEM; \
> +			return -1; \
> +		} \
> +		fds[fd]->class = FD_OSS_DSP; \
> +		fds[fd]->oflags = oflag; \
> +		nfds = lib_oss_pcm_poll_fds(fd); \
> +		if (nfds > 0) { \
> +			fds[fd]->poll_fds = nfds; \
> +			poll_fds_add += nfds; \
> +		} \
> +	} \
> +}
> +
> +#define MIXER_OPEN() \
> +{ \
> +	fd = lib_oss_mixer_open(file, oflag); \
> +	if (fd >= 0) { \
> +		fds[fd] = calloc(sizeof(fd_t), 1); \
> +		if (fds[fd] == NULL) { \
> +			ops[FD_OSS_MIXER].close(fd); \
> +			errno = ENOMEM; \
> +			return -1; \
> +		} \
> +		fds[fd]->class = FD_OSS_MIXER; \
> +		fds[fd]->oflags = oflag; \
> +	} \
> +} 

These are not necessarily macros unlike DECL_OPEN.  Static functions
would be much better.  Could you fix it?


Thanks,

Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux