Merge pull request #4775 from jmarshallnz/empty_episode_playcount
[vuplus_xbmc] / xbmc / osx / OSXGNUReplacements.h
1 #ifndef __OSXPLATFORM_H__
2 #define __OSXPLATFORM_H__
3 /*
4  *      Copyright (C) 2005-2013 Team XBMC
5  *      http://xbmc.org
6  *
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)
10  *  any later version.
11  *
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.
16  *
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/>.
20  *
21  */
22
23 // This is a catch all for GNU routines that do not exist under OSX.
24 #include <netdb.h>
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* __cplusplus */
29
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);
34
35 #ifdef __cplusplus
36 }
37 #endif /* __cplusplus */
38     
39 /* getdelim.h --- Prototype for replacement getdelim function.
40    Copyright (C) 2005 Free Software Foundation, Inc.
41
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.
46
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.
51
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
55    02110-1301, USA.  */
56
57 /* Written by Simon Josefsson. */
58 # include <stddef.h>
59 # include <stdio.h>
60 # include <sys/types.h>
61
62 #ifdef __cplusplus
63 extern "C" {
64 #endif /* __cplusplus */
65
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);
69
70 #ifdef __cplusplus
71 }
72 #endif /* __cplusplus */
73
74 #endif