2
$Id: portable.h,v 1.4 2004/11/07 21:13:10 rocky Exp $
4
Copyright (C) Rocky Bernstein <rocky@panix.com>
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
This file contains definitions to fill in for differences or
23
deficiencies to OS or compiler irregularities. If this file is
24
included other routines can be more portable.
27
#ifndef __CDIO_PORTABLE_H__
28
#define __CDIO_PORTABLE_H__
34
#if !defined(HAVE_FTRUNCATE)
35
# if defined ( WIN32 )
36
# define ftruncate chsize
38
#endif /*HAVE_FTRUNCATE*/
40
#if !defined(HAVE_SNPRINTF)
42
# define snprintf _snprintf
44
#endif /*HAVE_SNPRINTF*/
46
#if !defined(HAVE_VSNPRINTF)
48
# define snprintf _vsnprintf
50
#endif /*HAVE_SNPRINTF*/
56
# define _S_IFBLK 0060000 /* Block Special */
57
# define S_ISBLK(x) (x & _S_IFBLK)
61
# define _S_IFCHR 0020000 /* character special */
62
# define S_ISCHR(x) (x & _S_IFCHR)
67
# define BZERO(ptr, size) memset(ptr, 0, size)
69
# define BZERO(ptr, size) bzero(ptr, size)
71
Error -- you need either memset or bzero
74
#endif /* __CDIO_PORTABLE_H__ */