| 819 | | #ifndef HAVE_STRDUP |
|---|
| 820 | | # define strdup vlc_strdup |
|---|
| 821 | | VLC_EXPORT( char *, vlc_strdup, ( const char *s ) ); |
|---|
| 822 | | #endif |
|---|
| 823 | | |
|---|
| 824 | | #if !defined(HAVE_VASPRINTF) || defined(__APPLE__) || defined(SYS_BEOS) |
|---|
| 825 | | # define vasprintf vlc_vasprintf |
|---|
| 826 | | VLC_EXPORT( int, vlc_vasprintf, (char **, const char *, va_list ) ); |
|---|
| 827 | | #endif |
|---|
| 828 | | |
|---|
| 829 | | #if !defined(HAVE_ASPRINTF) || defined(__APPLE__) || defined(SYS_BEOS) |
|---|
| 830 | | # define asprintf vlc_asprintf |
|---|
| 831 | | VLC_EXPORT( int, vlc_asprintf, (char **, const char *, ... ) ATTRIBUTE_FORMAT( 2, 3 ) ); |
|---|
| 832 | | #endif |
|---|
| 833 | | |
|---|
| 834 | | #ifndef HAVE_STRNDUP |
|---|
| 835 | | # if defined(STRNDUP_IN_GNOME_H) && \ |
|---|
| 836 | | (defined(MODULE_NAME_IS_gnome)||defined(MODULE_NAME_IS_gnome_main)||\ |
|---|
| 837 | | defined(MODULE_NAME_IS_gnome2)||defined(MODULE_NAME_IS_gnome2_main)) |
|---|
| 838 | | /* Do nothing: gnome.h defines strndup for us */ |
|---|
| 839 | | # else |
|---|
| 840 | | # define strndup vlc_strndup |
|---|
| 841 | | VLC_EXPORT( char *, vlc_strndup, ( const char *s, size_t n ) ); |
|---|
| 842 | | # endif |
|---|
| 843 | | #endif |
|---|
| 844 | | |
|---|
| 845 | | #ifndef HAVE_STRLCPY |
|---|
| 846 | | # define strlcpy vlc_strlcpy |
|---|
| 847 | | VLC_EXPORT( size_t, vlc_strlcpy, ( char *, const char *, size_t ) ); |
|---|
| 848 | | #endif |
|---|
| 849 | | |
|---|
| 850 | | #ifndef HAVE_ATOF |
|---|
| 851 | | # define atof vlc_atof |
|---|
| 852 | | VLC_EXPORT( double, vlc_atof, ( const char *nptr ) ); |
|---|
| 853 | | #endif |
|---|
| 854 | | |
|---|
| 855 | | #ifndef HAVE_STRTOF |
|---|
| 856 | | # ifdef HAVE_STRTOD |
|---|
| 857 | | # define strtof strtod |
|---|
| 858 | | # endif |
|---|
| 859 | | #endif |
|---|
| 860 | | |
|---|
| 861 | | #ifndef HAVE_ATOLL |
|---|
| 862 | | # define atoll vlc_atoll |
|---|
| 863 | | VLC_EXPORT( int64_t, vlc_atoll, ( const char *nptr ) ); |
|---|
| 864 | | #endif |
|---|
| 865 | | |
|---|
| 866 | | #ifndef HAVE_STRTOLL |
|---|
| 867 | | # define strtoll vlc_strtoll |
|---|
| 868 | | VLC_EXPORT( int64_t, vlc_strtoll, ( const char *nptr, char **endptr, int base ) ); |
|---|
| 869 | | #endif |
|---|
| | 819 | VLC_EXPORT( char *, vlc_strdup, ( const char *s ) ); |
|---|
| | 820 | VLC_EXPORT( int, vlc_vasprintf, (char **, const char *, va_list ) ); |
|---|
| | 821 | VLC_EXPORT( int, vlc_asprintf, (char **, const char *, ... ) ATTRIBUTE_FORMAT( 2, 3 ) ); |
|---|
| | 822 | VLC_EXPORT( char *, vlc_strndup, ( const char *s, size_t n ) ); |
|---|
| | 823 | VLC_EXPORT( size_t, vlc_strlcpy, ( char *, const char *, size_t ) ); |
|---|
| | 824 | VLC_EXPORT( double, vlc_atof, ( const char *nptr ) ); |
|---|
| | 825 | VLC_EXPORT( int64_t, vlc_atoll, ( const char *nptr ) ); |
|---|
| | 826 | VLC_EXPORT( int64_t, vlc_strtoll, ( const char *nptr, char **endptr, int base ) ); |
|---|
| 877 | | # define lldiv vlc_lldiv |
|---|
| 878 | | VLC_EXPORT( lldiv_t, vlc_lldiv, ( long long numer, long long denom ) ); |
|---|
| 879 | | #endif |
|---|
| 880 | | |
|---|
| 881 | | #ifndef HAVE_SCANDIR |
|---|
| 882 | | # define scandir vlc_scandir |
|---|
| 883 | | # define alphasort vlc_alphasort |
|---|
| 884 | | struct dirent; |
|---|
| 885 | | VLC_EXPORT( int, vlc_scandir, ( const char *name, struct dirent ***namelist, int (*filter) ( const struct dirent * ), int (*compar) ( const struct dirent **, const struct dirent ** ) ) ); |
|---|
| 886 | | VLC_EXPORT( int, vlc_alphasort, ( const struct dirent **a, const struct dirent **b ) ); |
|---|
| 887 | | #endif |
|---|
| 888 | | |
|---|
| 889 | | #ifndef HAVE_GETENV |
|---|
| 890 | | # define getenv vlc_getenv |
|---|
| 891 | | VLC_EXPORT( char *, vlc_getenv, ( const char *name ) ); |
|---|
| 892 | | #endif |
|---|
| 893 | | |
|---|
| 894 | | #ifndef HAVE_STRCASECMP |
|---|
| 895 | | # ifndef HAVE_STRICMP |
|---|
| 896 | | # define strcasecmp vlc_strcasecmp |
|---|
| 897 | | VLC_EXPORT( int, vlc_strcasecmp, ( const char *s1, const char *s2 ) ); |
|---|
| 898 | | # else |
|---|
| 899 | | # define strcasecmp stricmp |
|---|
| 900 | | # endif |
|---|
| 901 | | #endif |
|---|
| 902 | | |
|---|
| 903 | | #ifndef HAVE_STRNCASECMP |
|---|
| 904 | | # ifndef HAVE_STRNICMP |
|---|
| 905 | | # define strncasecmp vlc_strncasecmp |
|---|
| 906 | | VLC_EXPORT( int, vlc_strncasecmp, ( const char *s1, const char *s2, size_t n ) ); |
|---|
| 907 | | # else |
|---|
| 908 | | # define strncasecmp strnicmp |
|---|
| 909 | | # endif |
|---|
| 910 | | #endif |
|---|
| 911 | | |
|---|
| 912 | | #ifndef HAVE_STRCASESTR |
|---|
| 913 | | # ifndef HAVE_STRISTR |
|---|
| 914 | | # define strcasestr vlc_strcasestr |
|---|
| 915 | | VLC_EXPORT( char *, vlc_strcasestr, ( const char *s1, const char *s2 ) ); |
|---|
| 916 | | # else |
|---|
| 917 | | # define strcasestr stristr |
|---|
| 918 | | # endif |
|---|
| 919 | | #endif |
|---|
| | 834 | #endif |
|---|
| | 835 | VLC_EXPORT( lldiv_t, vlc_lldiv, ( long long numer, long long denom ) ); |
|---|
| | 836 | |
|---|
| | 837 | struct dirent; |
|---|
| | 838 | VLC_EXPORT( int, vlc_scandir, ( const char *name, struct dirent ***namelist, int (*filter) ( const struct dirent * ), int (*compar) ( const struct dirent **, const struct dirent ** ) ) ); |
|---|
| | 839 | VLC_EXPORT( int, vlc_alphasort, ( const struct dirent **a, const struct dirent **b ) ); |
|---|
| | 840 | |
|---|
| | 841 | VLC_EXPORT( char *, vlc_getenv, ( const char *name ) ); |
|---|
| | 842 | |
|---|
| | 843 | VLC_EXPORT( int, vlc_strcasecmp, ( const char *s1, const char *s2 ) ); |
|---|
| | 844 | VLC_EXPORT( int, vlc_strncasecmp, ( const char *s1, const char *s2, size_t n ) ); |
|---|
| | 845 | VLC_EXPORT( char *, vlc_strcasestr, ( const char *s1, const char *s2 ) ); |
|---|