1 #ifndef __OSXPLATFORM_H__
2 #define __OSXPLATFORM_H__
4 * Copyright (C) 2005-2013 Team XBMC
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, or (at your option)
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 XBMC; see the file COPYING. If not, see
19 * <http://www.gnu.org/licenses/>.
23 // This is a catch all for GNU routines that do not exist under OSX.
28 #endif /* __cplusplus */
30 size_t strnlen(const char *s, size_t n);
31 char* strndup(char const *s, size_t n);
32 int gethostbyname_r(const char *name, struct hostent *ret, char *buf,
33 size_t buflen, struct hostent **result, int *h_errnop);
37 #endif /* __cplusplus */
39 /* getdelim.h --- Prototype for replacement getdelim function.
40 Copyright (C) 2005 Free Software Foundation, Inc.
42 This program is free software; you can redistribute it and/or
43 modify it under the terms of the GNU General Public License as
44 published by the Free Software Foundation; either version 2, or (at
45 your option) any later version.
47 This program is distributed in the hope that it will be useful, but
48 WITHOUT ANY WARRANTY; without even the implied warranty of
49 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
50 General Public License for more details.
52 You should have received a copy of the GNU General Public License
53 along with this program; if not, write to the Free Software
54 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
57 /* Written by Simon Josefsson. */
60 # include <sys/types.h>
64 #endif /* __cplusplus */
66 ssize_t getdelim(char **lineptr, size_t *n, int delimiter, FILE *stream);
67 ssize_t getline (char **lineptr, size_t *n, FILE *stream);
68 int strverscmp (const char *s1, const char *s2);
72 #endif /* __cplusplus */