X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_fixups.h;h=e0152fce997b4b9a01a06d28e8c34e821d3b3d83;hb=36ab287e77e9df059f261ed1cfb13fc4674182ec;hp=a223384b8d4555aab2d0d6bda1620f488ea87eb0;hpb=5e39cb277ca9a23a347ea592c4fed1381cb9ec9b;p=vlc diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h index a223384b8d..e0152fce99 100644 --- a/include/vlc_fixups.h +++ b/include/vlc_fixups.h @@ -3,19 +3,19 @@ ***************************************************************************** * Copyright © 1998-2008 the VideoLAN project * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ /** @@ -64,7 +64,8 @@ typedef struct # include /* ssize_t, pid_t */ #endif -#ifndef HAVE_DIRFD +#if !defined (HAVE_DIRFD) || \ + !defined (HAVE_FDOPENDIR) # include #endif @@ -182,12 +183,16 @@ int fsync (int fd); /* dirent.h */ #ifndef HAVE_DIRFD -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__OS2__) #undef dirfd #endif int dirfd (DIR *); #endif +#ifndef HAVE_FDOPENDIR +DIR *fdopendir (int); +#endif + #ifdef __cplusplus } /* extern "C" */ #endif @@ -245,14 +250,11 @@ void swab (const void *, void *, ssize_t); /* Socket stuff */ #ifndef HAVE_INET_PTON -# define inet_pton vlc_inet_pton -#endif - -#ifndef HAVE_INET_NTOP -# define inet_ntop vlc_inet_ntop +int inet_pton(int, const char *, void *); +const char *inet_ntop(int, const void *, char *, int); #endif -#ifndef HAVE_POLL +#ifndef HAVE_STRUCT_POLLFD enum { POLLIN=1, @@ -269,12 +271,12 @@ struct pollfd unsigned events; unsigned revents; }; - +#endif +#ifndef HAVE_POLL # define poll(a, b, c) vlc_poll(a, b, c) #elif defined (HAVE_MAEMO) # include # define poll(a, b, c) vlc_poll(a, b, c) -int vlc_poll (struct pollfd *, unsigned, int); #endif #ifndef HAVE_IF_NAMEINDEX