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 strnlen vlc_strnlen
48 # define strlcpy vlc_strlcpy
52 # define atof vlc_atof
57 # define strtof( a, b ) ((float)strtod (a, b))
62 # define atoll vlc_atoll
66 # define strtoll vlc_strtoll
70 # define lldiv vlc_lldiv
74 # define scandir vlc_scandir
75 # define alphasort vlc_alphasort
79 # define getenv vlc_getenv
82 #ifndef HAVE_STRCASECMP
84 # define strcasecmp vlc_strcasecmp
86 # define strcasecmp stricmp
90 #ifndef HAVE_STRNCASECMP
91 # ifndef HAVE_STRNICMP
92 # define strncasecmp vlc_strncasecmp
94 # define strncasecmp strnicmp
98 #ifndef HAVE_STRCASESTR
100 # define strcasestr vlc_strcasestr
102 # define strcasestr stristr