VLC  4.0.0-dev
vlc_fixups.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * vlc_fixups.h: portability fixups included from config.h
3  *****************************************************************************
4  * Copyright © 1998-2008 the VideoLAN project
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program; if not, write to the Free Software Foundation,
18  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19  *****************************************************************************/
20 
21 /**
22  * \file
23  * This file is a collection of portability fixes
24  */
25 
26 #ifndef LIBVLC_FIXUPS_H
27 # define LIBVLC_FIXUPS_H 1
28 
29 /* needed to detect uClibc */
30 #ifdef HAVE_FEATURES_H
31 #include <features.h>
32 #endif
33 
34 /* C++11 says there's no need to define __STDC_*_MACROS when including
35  * inttypes.h and stdint.h. */
36 #if defined (__cplusplus) && (defined(__MINGW32__) || defined(__UCLIBC__))
37 # ifndef __STDC_FORMAT_MACROS
38 # define __STDC_FORMAT_MACROS 1
39 # endif
40 # ifndef __STDC_CONSTANT_MACROS
41 # define __STDC_CONSTANT_MACROS 1
42 # endif
43 # ifndef __STDC_LIMIT_MACROS
44 # define __STDC_LIMIT_MACROS 1
45 # endif
46 #endif
47 
48 #ifndef __cplusplus
49 # ifdef HAVE_THREADS_H
50 # include <threads.h>
51 # elif !defined(thread_local)
52 # ifdef HAVE_THREAD_LOCAL
53 # define thread_local _Thread_local
54 # elif defined(_MSC_VER)
55 # define thread_local __declspec(thread)
56 # endif
57 # endif
58 #endif
59 
60 #if !defined (HAVE_GMTIME_R) || !defined (HAVE_LOCALTIME_R) \
61  || !defined (HAVE_TIMEGM)
62 # include <time.h> /* time_t */
63 #endif
64 
65 #ifndef HAVE_GETTIMEOFDAY
66 #ifdef _WIN32
67 #include <winsock2.h>
68 #else
69 #include <sys/time.h>
70 #endif
71 #endif
72 
73 #ifndef HAVE_LLDIV
74 typedef struct
75 {
76  long long quot; /* Quotient. */
77  long long rem; /* Remainder. */
79 #endif
80 
81 #if !defined(HAVE_GETENV) || \
82  !defined(HAVE_USELOCALE)
83 # include <stddef.h> /* NULL */
84 #endif
85 
86 #if !defined (HAVE_REWIND) || \
87  !defined (HAVE_GETDELIM)
88 # include <stdio.h> /* FILE */
89 #endif
90 
91 #if !defined (HAVE_ALIGNED_ALLOC) || \
92  !defined (HAVE_MEMRCHR) || \
93  !defined (HAVE_POSIX_MEMALIGN) || \
94  !defined (HAVE_QSORT_R) || \
95  !defined (HAVE_STRLCPY) || \
96  !defined (HAVE_STRNDUP) || \
97  !defined (HAVE_STRNLEN) || \
98  !defined (HAVE_STRNSTR)
99 # include <stddef.h> /* size_t */
100 #endif
101 
102 #ifndef HAVE_VASPRINTF
103 # include <stdarg.h> /* va_list */
104 #endif
105 
106 #if !defined (HAVE_GETDELIM) || \
107  !defined (HAVE_GETPID) || \
108  !defined (HAVE_SWAB)
109 # include <sys/types.h> /* ssize_t, pid_t */
110 #endif
111 
112 #if !defined (HAVE_DIRFD) || \
113  !defined (HAVE_FDOPENDIR)
114 # include <dirent.h>
115 #endif
116 
117 #ifdef __cplusplus
118 # define VLC_NOTHROW throw ()
119 extern "C" {
120 #else
121 # define VLC_NOTHROW
122 #endif
123 
124 /* stddef.h */
125 #if !defined (__cplusplus) && !defined (HAVE_MAX_ALIGN_T)
126 typedef struct {
127  long long ll;
128  long double ld;
130 #endif
131 
132 /* stdio.h */
133 #ifndef HAVE_ASPRINTF
134 int asprintf (char **, const char *, ...);
135 #endif
136 
137 #ifndef HAVE_FLOCKFILE
138 void flockfile (FILE *);
139 void funlockfile (FILE *);
140 int getc_unlocked (FILE *);
141 int getchar_unlocked (void);
142 int putc_unlocked (int, FILE *);
144 #endif
145 
146 #ifndef HAVE_GETDELIM
147 ssize_t getdelim (char **, size_t *, int, FILE *);
148 ssize_t getline (char **, size_t *, FILE *);
149 #endif
150 
151 #ifndef HAVE_REWIND
152 void rewind (FILE *);
153 #endif
154 
155 #ifndef HAVE_VASPRINTF
156 int vasprintf (char **, const char *, va_list);
157 #endif
158 
159 /* string.h */
160 #ifndef HAVE_MEMRCHR
161 void *memrchr(const void *, int, size_t);
162 #endif
163 
164 #ifndef HAVE_STRCASECMP
165 int strcasecmp (const char *, const char *);
166 #endif
167 
168 #ifndef HAVE_STRCASESTR
169 char *strcasestr (const char *, const char *);
170 #endif
171 
172 #ifndef HAVE_STRDUP
173 char *strdup (const char *);
174 #endif
175 
176 #ifndef HAVE_STRVERSCMP
177 int strverscmp (const char *, const char *);
178 #endif
179 
180 #ifndef HAVE_STRNLEN
181 size_t strnlen (const char *, size_t);
182 #endif
183 
184 #ifndef HAVE_STRNSTR
185 char * strnstr (const char *, const char *, size_t);
186 #endif
187 
188 #ifndef HAVE_STRNDUP
189 char *strndup (const char *, size_t);
190 #endif
191 
192 #ifndef HAVE_STRLCPY
193 size_t strlcpy (char *, const char *, size_t);
194 #endif
195 
196 #ifndef HAVE_STRSEP
197 char *strsep (char **, const char *);
198 #endif
199 
200 #ifndef HAVE_STRTOK_R
201 char *strtok_r(char *, const char *, char **);
202 #endif
203 
204 /* stdlib.h */
205 #ifndef HAVE_ATOF
206 #ifndef __ANDROID__
207 double atof (const char *);
208 #endif
209 #endif
210 
211 #ifndef HAVE_ATOLL
212 long long atoll (const char *);
213 #endif
214 
215 #ifndef HAVE_LLDIV
216 lldiv_t lldiv (long long, long long);
217 #endif
218 
219 #ifndef HAVE_STRTOF
220 #ifndef __ANDROID__
221 float strtof (const char *, char **);
222 #endif
223 #endif
224 
225 #ifndef HAVE_STRTOLL
226 long long int strtoll (const char *, char **, int);
227 #endif
228 
229 /* time.h */
230 #ifndef HAVE_GMTIME_R
231 struct tm *gmtime_r (const time_t *, struct tm *);
232 #endif
233 
234 #ifndef HAVE_LOCALTIME_R
235 struct tm *localtime_r (const time_t *, struct tm *);
236 #endif
237 
238 #ifndef HAVE_TIMEGM
239 time_t timegm(struct tm *);
240 #endif
241 
242 #ifndef HAVE_TIMESPEC_GET
243 #define TIME_UTC 1
244 struct timespec;
245 int timespec_get(struct timespec *, int);
246 #endif
247 
248 /* sys/time.h */
249 #ifndef HAVE_GETTIMEOFDAY
250 struct timezone;
251 int gettimeofday(struct timeval *, struct timezone *);
252 #endif
253 
254 /* unistd.h */
255 #ifndef HAVE_GETPID
256 pid_t getpid (void) VLC_NOTHROW;
257 #endif
258 
259 #ifndef HAVE_FSYNC
260 int fsync (int fd);
261 #endif
262 
263 /* dirent.h */
264 #ifndef HAVE_DIRFD
265 int (dirfd) (DIR *);
266 #endif
267 
268 #ifndef HAVE_FDOPENDIR
269 DIR *fdopendir (int);
270 #endif
271 
272 #ifdef __cplusplus
273 } /* extern "C" */
274 #endif
275 
276 /* stdlib.h */
277 #ifndef HAVE_GETENV
278 static inline char *getenv (const char *name)
279 {
280  (void)name;
281  return NULL;
282 }
283 #endif
284 
285 #ifdef __cplusplus
286 extern "C" {
287 #endif
288 
289 #ifndef HAVE_SETENV
290 int setenv (const char *, const char *, int);
291 int unsetenv (const char *);
292 #endif
293 
294 #ifndef HAVE_POSIX_MEMALIGN
295 int posix_memalign(void **, size_t, size_t);
296 #endif
297 
298 #ifndef HAVE_ALIGNED_ALLOC
299 void *aligned_alloc(size_t, size_t);
300 #endif
301 
302 #ifdef __cplusplus
303 } /* extern "C" */
304 #endif
305 
306 #if defined (_WIN32) && defined(__MINGW32__)
307 #define aligned_free(ptr) __mingw_aligned_free(ptr)
308 #elif defined (_WIN32) && defined(_MSC_VER)
309 #define aligned_free(ptr) _aligned_free(ptr)
310 #else
311 #define aligned_free(ptr) free(ptr)
312 #endif
313 
314 #if !defined(HAVE_NEWLOCALE) && defined(HAVE_CXX_LOCALE_T) && defined(__cplusplus)
315 # include <locale>
316 # define HAVE_NEWLOCALE
317 #endif
318 
319 /* locale.h */
320 #ifndef HAVE_USELOCALE
321 # ifndef HAVE_NEWLOCALE
322 # define LC_ALL_MASK 0
323 # define LC_NUMERIC_MASK 0
324 # define LC_MESSAGES_MASK 0
325 # define LC_GLOBAL_LOCALE ((locale_t)(uintptr_t)1)
326 typedef void *locale_t;
327 
328 static inline void freelocale(locale_t loc)
329 {
330  (void)loc;
331 }
332 static inline locale_t newlocale(int mask, const char * locale, locale_t base)
333 {
334  (void)mask; (void)locale; (void)base;
335  return NULL;
336 }
337 # else
338 # include <locale.h>
339 # endif
340 
341 static inline locale_t uselocale(locale_t loc)
342 {
343  (void)loc;
344  return NULL;
345 }
346 #endif
347 
348 #if !defined (HAVE_STATIC_ASSERT) && !defined(__cpp_static_assert)
349 # define STATIC_ASSERT_CONCAT_(a, b) a##b
350 # define STATIC_ASSERT_CONCAT(a, b) STATIC_ASSERT_CONCAT_(a, b)
351 # define _Static_assert(x, s) extern char STATIC_ASSERT_CONCAT(static_assert_, __LINE__)[sizeof(struct { unsigned:-!(x); })]
352 # define static_assert _Static_assert
353 #endif
354 
355 /* libintl support */
356 #define _(str) vlc_gettext (str)
357 #define N_(str) gettext_noop (str)
358 #define gettext_noop(str) (str)
359 
360 #ifdef __cplusplus
361 extern "C" {
362 #endif
363 
364 #ifndef HAVE_SWAB
365 void swab (const void *, void *, ssize_t);
366 #endif
367 
368 /* Socket stuff */
369 #ifndef HAVE_INET_PTON
370 # ifndef _WIN32
371 # include <sys/socket.h>
372 #else
373 typedef int socklen_t;
374 # endif
375 int inet_pton(int, const char *, void *);
376 const char *inet_ntop(int, const void *, char *, socklen_t);
377 #endif
378 
379 #ifndef HAVE_STRUCT_POLLFD
380 enum
381 {
382  POLLERR=0x1,
383  POLLHUP=0x2,
384  POLLNVAL=0x4,
387  POLLRDNORM=0x100,
388  POLLRDBAND=0x200,
389  POLLPRI=0x400,
390 };
391 #define POLLIN (POLLRDNORM|POLLRDBAND)
392 #define POLLOUT (POLLWRNORM|POLLWRBAND)
393 
394 struct pollfd
395 {
396  int fd;
397  short events;
398  short revents;
399 };
400 #endif
401 #ifndef HAVE_POLL
402 struct pollfd;
403 int poll (struct pollfd *, unsigned, int);
404 #endif
405 
406 #ifndef HAVE_IF_NAMEINDEX
407 #include <errno.h>
408 # ifndef HAVE_STRUCT_IF_NAMEINDEX
409 struct if_nameindex
410 {
411  unsigned if_index;
412  char *if_name;
413 };
414 # endif
415 # define if_nameindex() (errno = ENOBUFS, NULL)
416 # define if_freenameindex(list) (void)0
417 #endif
418 
419 #ifndef HAVE_STRUCT_TIMESPEC
420 struct timespec {
421  time_t tv_sec; /* Seconds */
422  long tv_nsec; /* Nanoseconds */
423 };
424 #endif
425 
426 #ifdef _WIN32
427 struct iovec
428 {
429  void *iov_base;
430  size_t iov_len;
431 };
432 #define IOV_MAX 255
433 struct msghdr
434 {
435  void *msg_name;
436  size_t msg_namelen;
437  struct iovec *msg_iov;
438  size_t msg_iovlen;
439  void *msg_control;
440  size_t msg_controllen;
441  int msg_flags;
442 };
443 
444 # ifndef HAVE_IF_NAMETOINDEX
445 # include <stdlib.h> /* a define may change from the real atoi declaration */
446 static inline int if_nametoindex(const char *name)
447 {
448  return atoi(name);
449 }
450 # endif
451 #endif
452 
453 #ifdef _NEWLIB_VERSION
454 #define IOV_MAX 255
455 #endif
456 
457 #ifndef HAVE_RECVMSG
458 struct msghdr;
459 ssize_t recvmsg(int, struct msghdr *, int);
460 #endif
461 
462 #ifndef HAVE_SENDMSG
463 struct msghdr;
464 ssize_t sendmsg(int, const struct msghdr *, int);
465 #endif
466 
467 /* search.h */
468 #ifndef HAVE_SEARCH_H
469 typedef struct entry {
470  char *key;
471  void *data;
473 
474 typedef enum {
477 
478 typedef enum {
483 } VISIT;
484 
485 void *tsearch( const void *key, void **rootp, int(*cmp)(const void *, const void *) );
486 void *tfind( const void *key, void * const *rootp, int(*cmp)(const void *, const void *) );
487 void *tdelete( const void *key, void **rootp, int(*cmp)(const void *, const void *) );
488 void twalk( const void *root, void(*action)(const void *nodep, VISIT which, int depth) );
489 void *lfind( const void *key, const void *base, size_t *nmemb,
490  size_t size, int(*cmp)(const void *, const void *) );
491 #endif /* HAVE_SEARCH_H */
492 
493 #ifdef _WIN64
494 # ifdef HAVE_SEARCH_H
495 # include <search.h>
496 # endif
497 /* the Win32 prototype of lfind() expects an unsigned* for 'nelp' */
498 # define lfind(a,b,c,d,e) \
499  lfind((a),(b), &(unsigned){ (*(c) > UINT_MAX) ? UINT_MAX : *(c) }, (d),(e))
500 #endif /* _WIN64 */
501 
502 #ifndef HAVE_TDESTROY
503 void tdestroy( void *root, void (*free_node)(void *nodep) );
504 #endif
505 
506 /* sys/auxv.h */
507 #ifndef HAVE_GETAUXVAL
508 unsigned long getauxval(unsigned long);
509 #endif
510 
511 /* Random numbers */
512 #ifndef HAVE_NRAND48
513 double erand48 (unsigned short subi[3]);
514 long jrand48 (unsigned short subi[3]);
515 long nrand48 (unsigned short subi[3]);
516 #endif
517 
518 #ifdef __OS2__
519 # undef HAVE_FORK /* Implementation of fork() is imperfect on OS/2 */
520 
521 # define SHUT_RD 0
522 # define SHUT_WR 1
523 # define SHUT_RDWR 2
524 
525 /* GAI error codes */
526 # ifndef EAI_BADFLAGS
527 # define EAI_BADFLAGS -1
528 # endif
529 # ifndef EAI_NONAME
530 # define EAI_NONAME -2
531 # endif
532 # ifndef EAI_AGAIN
533 # define EAI_AGAIN -3
534 # endif
535 # ifndef EAI_FAIL
536 # define EAI_FAIL -4
537 # endif
538 # ifndef EAI_NODATA
539 # define EAI_NODATA -5
540 # endif
541 # ifndef EAI_FAMILY
542 # define EAI_FAMILY -6
543 # endif
544 # ifndef EAI_SOCKTYPE
545 # define EAI_SOCKTYPE -7
546 # endif
547 # ifndef EAI_SERVICE
548 # define EAI_SERVICE -8
549 # endif
550 # ifndef EAI_ADDRFAMILY
551 # define EAI_ADDRFAMILY -9
552 # endif
553 # ifndef EAI_MEMORY
554 # define EAI_MEMORY -10
555 # endif
556 # ifndef EAI_OVERFLOW
557 # define EAI_OVERFLOW -11
558 # endif
559 # ifndef EAI_SYSTEM
560 # define EAI_SYSTEM -12
561 # endif
562 
563 # ifndef NI_NUMERICHOST
564 # define NI_NUMERICHOST 0x01
565 # define NI_NUMERICSERV 0x02
566 # define NI_NOFQDN 0x04
567 # define NI_NAMEREQD 0x08
568 # define NI_DGRAM 0x10
569 # endif
570 
571 # ifndef NI_MAXHOST
572 # define NI_MAXHOST 1025
573 # define NI_MAXSERV 32
574 # endif
575 
576 # define AI_PASSIVE 1
577 # define AI_CANONNAME 2
578 # define AI_NUMERICHOST 4
579 
580 struct addrinfo
581 {
582  int ai_flags;
583  int ai_family;
584  int ai_socktype;
585  int ai_protocol;
586  size_t ai_addrlen;
587  struct sockaddr *ai_addr;
588  char *ai_canonname;
589  struct addrinfo *ai_next;
590 };
591 
592 const char *gai_strerror (int);
593 
594 int getaddrinfo (const char *node, const char *service,
595  const struct addrinfo *hints, struct addrinfo **res);
596 void freeaddrinfo (struct addrinfo *res);
597 int getnameinfo (const struct sockaddr *sa, socklen_t salen,
598  char *host, int hostlen, char *serv, int servlen,
599  int flags);
600 
601 /* OS/2 does not support IPv6, yet. But declare these only for compilation */
602 # include <stdint.h>
603 
604 struct in6_addr
605 {
606  uint8_t s6_addr[16];
607 };
608 
609 struct sockaddr_in6
610 {
611  uint8_t sin6_len;
612  uint8_t sin6_family;
613  uint16_t sin6_port;
614  uint32_t sin6_flowinfo;
615  struct in6_addr sin6_addr;
616  uint32_t sin6_scope_id;
617 };
618 
619 # define IN6_IS_ADDR_MULTICAST(a) (((__const uint8_t *) (a))[0] == 0xff)
620 
621 static const struct in6_addr in6addr_any =
622  { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
623 
624 # include <errno.h>
625 # ifndef EPROTO
626 # define EPROTO (ELAST + 1)
627 # endif
628 
629 # ifndef HAVE_IF_NAMETOINDEX
630 # define if_nametoindex(name) atoi(name)
631 # endif
632 #endif
633 
634 /* math.h */
635 
636 #ifndef HAVE_NANF
637 #define nanf(tagp) NAN
638 #endif
639 
640 #ifndef HAVE_SINCOS
641 void sincos(double, double *, double *);
642 void sincosf(float, float *, float *);
643 #endif
644 
645 #ifndef HAVE_REALPATH
646 char *realpath(const char * restrict pathname, char * restrict resolved_path);
647 #endif
648 
649 /* mingw-w64 has a broken IN6_IS_ADDR_MULTICAST macro */
650 #if defined(_WIN32) && defined(__MINGW64_VERSION_MAJOR)
651 # define IN6_IS_ADDR_MULTICAST IN6_IS_ADDR_MULTICAST
652 #endif
653 
654 #ifdef __APPLE__
655 # define fdatasync fsync
656 
657 # include <time.h>
658 # ifndef TIMER_ABSTIME
659 # define TIMER_ABSTIME 0x01
660 # endif
661 # ifndef CLOCK_REALTIME
662 # define CLOCK_REALTIME 0
663 # endif
664 # ifndef CLOCK_MONOTONIC
665 # define CLOCK_MONOTONIC 6
666 # endif
667 # ifndef HAVE_CLOCK_GETTIME
668 int clock_gettime(clockid_t clock_id, struct timespec *tp);
669 # endif
670 # ifndef HAVE_CLOCK_GETRES
671 int clock_getres(clockid_t clock_id, struct timespec *tp);
672 # endif
673 #endif
674 
675 #ifndef _WIN32
676 # ifndef HAVE_CLOCK_NANOSLEEP
677 # include <time.h>
678 int clock_nanosleep(clockid_t clock_id, int flags,
679  const struct timespec *rqtp, struct timespec *rmtp);
680 # endif
681 #endif
682 
683 #ifdef __cplusplus
684 } /* extern "C" */
685 #endif
686 
687 #if defined(__cplusplus)
688 #ifndef HAVE_CXX_TYPEOF
689 # include <type_traits>
690 # define typeof(t) std::remove_reference<decltype(t)>::type
691 #endif
692 #endif
693 
694 #endif /* !LIBVLC_FIXUPS_H */
const char name[16]
Definition: httpd.c:1267
unsigned short subi[3]
Definition: rand.c:31
int getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res)
Definition: getaddrinfo.c:187
int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, int hostlen, char *serv, int servlen, int flags)
Definition: getaddrinfo.c:49
Definition: fourcc_gen.c:52
char * key
Definition: vlc_fixups.h:471
void * data
Definition: vlc_fixups.h:472
Definition: vlc_fixups.h:411
unsigned if_index
Definition: vlc_fixups.h:412
char * if_name
Definition: vlc_fixups.h:413
Definition: vlc_fixups.h:76
Definition: vlc_fixups.h:127
Definition: vlc_fixups.h:396
int fd
Definition: vlc_fixups.h:397
short revents
Definition: vlc_fixups.h:399
short events
Definition: vlc_fixups.h:398
Definition: vlc_fixups.h:421
long tv_nsec
Definition: vlc_fixups.h:423
time_t tv_sec
Definition: vlc_fixups.h:422
ssize_t recvmsg(int, struct msghdr *, int)
float strtof(const char *, char **)
int inet_pton(int, const char *, void *)
void * lfind(const void *key, const void *base, size_t *nmemb, size_t size, int(*cmp)(const void *, const void *))
int gettimeofday(struct timeval *, struct timezone *)
ssize_t getdelim(char **, size_t *, int, FILE *)
#define VLC_NOTHROW
Definition: vlc_fixups.h:122
char * strcasestr(const char *, const char *)
double erand48(unsigned short subi[3])
int getc_unlocked(FILE *)
static void freelocale(locale_t loc)
Definition: vlc_fixups.h:329
int posix_memalign(void **, size_t, size_t)
lldiv_t lldiv(long long, long long)
void sincos(double, double *, double *)
int putc_unlocked(int, FILE *)
void * tfind(const void *key, void *const *rootp, int(*cmp)(const void *, const void *))
int() dirfd(DIR *)
long nrand48(unsigned short subi[3])
int vasprintf(char **, const char *, va_list)
double atof(const char *)
int putchar_unlocked(int)
static locale_t uselocale(locale_t loc)
Definition: vlc_fixups.h:342
char * strsep(char **, const char *)
void * tsearch(const void *key, void **rootp, int(*cmp)(const void *, const void *))
long long atoll(const char *)
void twalk(const void *root, void(*action)(const void *nodep, VISIT which, int depth))
int setenv(const char *, const char *, int)
int unsetenv(const char *)
void sincosf(float, float *, float *)
time_t timegm(struct tm *)
unsigned long getauxval(unsigned long)
char * strdup(const char *)
const char * inet_ntop(int, const void *, char *, socklen_t)
struct tm * localtime_r(const time_t *, struct tm *)
long jrand48(unsigned short subi[3])
int timespec_get(struct timespec *, int)
size_t strlcpy(char *, const char *, size_t)
ssize_t getline(char **, size_t *, FILE *)
static locale_t newlocale(int mask, const char *locale, locale_t base)
Definition: vlc_fixups.h:333
long long int strtoll(const char *, char **, int)
void swab(const void *, void *, ssize_t)
void * aligned_alloc(size_t, size_t)
int strcasecmp(const char *, const char *)
DIR * fdopendir(int)
int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp)
void * tdelete(const void *key, void **rootp, int(*cmp)(const void *, const void *))
int fsync(int fd)
char * strtok_r(char *, const char *, char **)
void * memrchr(const void *, int, size_t)
void flockfile(FILE *)
char * strnstr(const char *, const char *, size_t)
void * locale_t
Definition: vlc_fixups.h:327
@ POLLRDBAND
Definition: vlc_fixups.h:389
@ POLLWRBAND
Definition: vlc_fixups.h:387
@ POLLPRI
Definition: vlc_fixups.h:390
@ POLLRDNORM
Definition: vlc_fixups.h:388
@ POLLHUP
Definition: vlc_fixups.h:384
@ POLLNVAL
Definition: vlc_fixups.h:385
@ POLLWRNORM
Definition: vlc_fixups.h:386
@ POLLERR
Definition: vlc_fixups.h:383
int poll(struct pollfd *, unsigned, int)
void tdestroy(void *root, void(*free_node)(void *nodep))
pid_t getpid(void)
int strverscmp(const char *, const char *)
ssize_t sendmsg(int, const struct msghdr *, int)
char * realpath(const char *restrict pathname, char *restrict resolved_path)
size_t strnlen(const char *, size_t)
void rewind(FILE *)
VISIT
Definition: vlc_fixups.h:479
@ postorder
Definition: vlc_fixups.h:481
@ leaf
Definition: vlc_fixups.h:483
@ endorder
Definition: vlc_fixups.h:482
@ preorder
Definition: vlc_fixups.h:480
ACTION
Definition: vlc_fixups.h:475
@ FIND
Definition: vlc_fixups.h:476
@ ENTER
Definition: vlc_fixups.h:476
char * strndup(const char *, size_t)
int asprintf(char **, const char *,...)
void funlockfile(FILE *)
struct entry ENTRY
static char * getenv(const char *name)
Definition: vlc_fixups.h:279
int getchar_unlocked(void)
struct tm * gmtime_r(const time_t *, struct tm *)