~ubuntu-branches/ubuntu/natty/vlc/natty

« back to all changes in this revision

Viewing changes to include/vlc_fixups.h

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2010-06-25 01:09:16 UTC
  • mfrom: (1.1.30 upstream)
  • Revision ID: james.westby@ubuntu.com-20100625010916-asxhep2mutg6g6pd
Tags: 1.1.0-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - build and install the libx264 plugin
  - add Xb-Npp header to vlc package
  - Add apport hook to include more vlc dependencies in bug reports
* Drop xulrunner patches.
* Drop 502_xulrunner_191.diff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
} lldiv_t;
39
39
#endif
40
40
 
41
 
#ifndef HAVE_REWIND
 
41
#if !defined(HAVE_GETENV) || \
 
42
    !defined(HAVE_USELOCALE)
 
43
# include <stddef.h> /* NULL */
 
44
#endif
 
45
 
 
46
#if !defined (HAVE_REWIND) || \
 
47
    !defined (HAVE_GETDELIM)
42
48
# include <stdio.h> /* FILE */
43
49
#endif
44
50
 
53
59
# include <stdarg.h> /* va_list */
54
60
#endif
55
61
 
 
62
#if !defined (HAVE_GETDELIM) || \
 
63
    !defined (HAVE_GETPID)   || \
 
64
    !defined (HAVE_SWAB)
 
65
# include <sys/types.h> /* ssize_t, pid_t */
 
66
#endif
 
67
 
56
68
#ifdef __cplusplus
57
69
extern "C" {
58
70
#endif
133
145
char *getcwd (char *buf, size_t size);
134
146
#endif
135
147
 
 
148
#ifndef HAVE_GETDELIM
 
149
ssize_t getdelim (char **, size_t *, int, FILE *);
 
150
ssize_t getline (char **, size_t *, FILE *);
 
151
#endif
 
152
 
 
153
#ifndef HAVE_GETPID
 
154
pid_t getpid (void);
 
155
#endif
 
156
 
 
157
#ifndef HAVE_STRTOK_R
 
158
char *strtok_r(char *, const char *, char **);
 
159
#endif
 
160
 
136
161
#ifdef __cplusplus
137
162
} /* extern "C" */
138
163
#endif
153
178
#endif
154
179
 
155
180
#ifndef HAVE_USELOCALE
 
181
#define LC_NUMERIC_MASK  0
 
182
#define LC_MESSAGES_MASK 0
156
183
typedef void *locale_t;
157
 
# define newlocale( a, b, c ) ((locale_t)0)
158
 
# define uselocale( a ) ((locale_t)0)
159
 
# define freelocale( a ) (void)0
 
184
static inline locale_t uselocale(locale_t loc)
 
185
{
 
186
    (void)loc;
 
187
    return NULL;
 
188
}
 
189
static inline void freelocale(locale_t loc)
 
190
{
 
191
    (void)loc;
 
192
}
 
193
static inline locale_t newlocale(int mask, const char * locale, locale_t base)
 
194
{
 
195
    (void)mask; (void)locale; (void)base;
 
196
    return NULL;
 
197
}
160
198
#endif
161
199
 
162
200
#ifdef WIN32
163
201
# include <dirent.h>
164
 
# define opendir Use_utf8_opendir_or_vlc_wopendir_instead!
165
 
# define readdir Use_utf8_readdir_or_vlc_wreaddir_instead!
 
202
# define opendir Use_vlc_opendir_or_vlc_wopendir_instead!
 
203
# define readdir Use_vlc_readdir_or_vlc_wreaddir_instead!
166
204
# define closedir vlc_wclosedir
167
205
#endif
168
206
 
175
213
void swab (const void *, void *, ssize_t);
176
214
#endif
177
215
 
 
216
/* Socket stuff */
 
217
#ifndef HAVE_INET_PTON
 
218
# define inet_pton vlc_inet_pton
 
219
#endif
 
220
 
 
221
#ifndef HAVE_INET_NTOP
 
222
# define inet_ntop vlc_inet_ntop
 
223
#endif
 
224
 
 
225
#ifndef HAVE_POLL
 
226
enum
 
227
{
 
228
    POLLIN=1,
 
229
    POLLOUT=2,
 
230
    POLLPRI=4,
 
231
    POLLERR=8,  // unsupported stub
 
232
    POLLHUP=16, // unsupported stub
 
233
    POLLNVAL=32 // unsupported stub
 
234
};
 
235
 
 
236
struct pollfd
 
237
{
 
238
    int fd;
 
239
    unsigned events;
 
240
    unsigned revents;
 
241
};
 
242
 
 
243
# define poll(a, b, c) vlc_poll(a, b, c)
 
244
#elif defined (HAVE_MAEMO)
 
245
# include <poll.h>
 
246
# define poll(a, b, c) vlc_poll(a, b, c)
 
247
int vlc_poll (struct pollfd *, unsigned, int);
 
248
#endif
 
249
 
 
250
#ifndef HAVE_TDESTROY
 
251
# define tdestroy vlc_tdestroy
 
252
#endif
 
253
 
 
254
/* Random numbers */
 
255
#ifndef HAVE_NRAND48
 
256
double erand48 (unsigned short subi[3]);
 
257
long jrand48 (unsigned short subi[3]);
 
258
long nrand48 (unsigned short subi[3]);
 
259
#endif
 
260
 
178
261
#endif /* !LIBVLC_FIXUPS_H */