1 /*****************************************************************************
2 * fixups.h: portability fixups included from config.h
3 *****************************************************************************
4 * Copyright © 1998-2007 the VideoLAN project
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
20 *****************************************************************************/
24 * This file is a collection of portability fixes
28 # define strdup vlc_strdup
31 #ifndef HAVE_VASPRINTF
32 # define vasprintf vlc_vasprintf
36 # define asprintf vlc_asprintf
40 # define strndup vlc_strndup
44 # define strlcpy vlc_strlcpy
48 # define atof vlc_atof
53 # define strtof( a, b ) ((float)strtod (a, b))
58 # define atoll vlc_atoll
62 # define strtoll vlc_strtoll
66 # define lldiv vlc_lldiv
70 # define scandir vlc_scandir
71 # define alphasort vlc_alphasort
75 # define getenv vlc_getenv
78 #ifndef HAVE_STRCASECMP
80 # define strcasecmp vlc_strcasecmp
82 # define strcasecmp stricmp
86 #ifndef HAVE_STRNCASECMP
87 # ifndef HAVE_STRNICMP
88 # define strncasecmp vlc_strncasecmp
90 # define strncasecmp strnicmp
94 #ifndef HAVE_STRCASESTR
96 # define strcasestr vlc_strcasestr
98 # define strcasestr stristr