VLC  4.0.0-dev
Data Structures | Macros | Typedefs | Enumerations | Functions
vlc_fixups.h File Reference

This file is a collection of portability fixes. More...

Include dependency graph for vlc_fixups.h:

Go to the source code of this file.

Data Structures

struct  lldiv_t
 
struct  max_align_t
 
struct  pollfd
 
struct  if_nameindex
 
struct  timespec
 
struct  entry
 

Macros

#define VLC_NOTHROW
 
#define TIME_UTC   1
 
#define aligned_free(ptr)   free(ptr)
 
#define LC_ALL_MASK   0
 
#define LC_NUMERIC_MASK   0
 
#define LC_MESSAGES_MASK   0
 
#define LC_GLOBAL_LOCALE   ((locale_t)(uintptr_t)1)
 
#define STATIC_ASSERT_CONCAT_(a, b)   a##b
 
#define STATIC_ASSERT_CONCAT(a, b)   STATIC_ASSERT_CONCAT_(a, b)
 
#define _Static_assert(x, s)   extern char STATIC_ASSERT_CONCAT(static_assert_, __LINE__)[sizeof(struct { unsigned:-!(x); })]
 
#define static_assert   _Static_assert
 
#define _(str)   vlc_gettext (str)
 
#define N_(str)   gettext_noop (str)
 
#define gettext_noop(str)   (str)
 
#define POLLIN   (POLLRDNORM|POLLRDBAND)
 
#define POLLOUT   (POLLWRNORM|POLLWRBAND)
 
#define if_nameindex()   (errno = ENOBUFS, NULL)
 
#define if_freenameindex(list)   (void)0
 
#define nanf(tagp)   NAN
 

Typedefs

typedef void * locale_t
 
typedef struct entry ENTRY
 

Enumerations

enum  {
  POLLERR =0x1, POLLHUP =0x2, POLLNVAL =0x4, POLLWRNORM =0x10,
  POLLWRBAND =0x20, POLLRDNORM =0x100, POLLRDBAND =0x200, POLLPRI =0x400
}
 
enum  ACTION { FIND, ENTER }
 
enum  VISIT { preorder, postorder, endorder, leaf }
 

Functions

int asprintf (char **, const char *,...)
 
void flockfile (FILE *)
 
void funlockfile (FILE *)
 
int getc_unlocked (FILE *)
 
int getchar_unlocked (void)
 
int putc_unlocked (int, FILE *)
 
int putchar_unlocked (int)
 
ssize_t getdelim (char **, size_t *, int, FILE *)
 
ssize_t getline (char **, size_t *, FILE *)
 
void rewind (FILE *)
 
int vasprintf (char **, const char *, va_list)
 
void * memrchr (const void *, int, size_t)
 
int strcasecmp (const char *, const char *)
 
char * strcasestr (const char *, const char *)
 
char * strdup (const char *)
 
int strverscmp (const char *, const char *)
 
size_t strnlen (const char *, size_t)
 
char * strnstr (const char *, const char *, size_t)
 
char * strndup (const char *, size_t)
 
size_t strlcpy (char *, const char *, size_t)
 
char * strsep (char **, const char *)
 
char * strtok_r (char *, const char *, char **)
 
double atof (const char *)
 
long long atoll (const char *)
 
lldiv_t lldiv (long long, long long)
 
float strtof (const char *, char **)
 
long long int strtoll (const char *, char **, int)
 
struct tm * gmtime_r (const time_t *, struct tm *)
 
struct tm * localtime_r (const time_t *, struct tm *)
 
time_t timegm (struct tm *)
 
int timespec_get (struct timespec *, int)
 
int gettimeofday (struct timeval *, struct timezone *)
 
pid_t getpid (void)
 
int fsync (int fd)
 
long pathconf (const char *path, int name)
 
int() dirfd (DIR *)
 
DIR * fdopendir (int)
 
static char * getenv (const char *name)
 
int setenv (const char *, const char *, int)
 
int unsetenv (const char *)
 
int posix_memalign (void **, size_t, size_t)
 
void * aligned_alloc (size_t, size_t)
 
static void freelocale (locale_t loc)
 
static locale_t newlocale (int mask, const char *locale, locale_t base)
 
static locale_t uselocale (locale_t loc)
 
void swab (const void *, void *, ssize_t)
 
int inet_pton (int, const char *, void *)
 
const char * inet_ntop (int, const void *, char *, socklen_t)
 
int poll (struct pollfd *, unsigned, int)
 
ssize_t recvmsg (int, struct msghdr *, int)
 
ssize_t sendmsg (int, const struct msghdr *, int)
 
void * tsearch (const void *key, void **rootp, int(*cmp)(const void *, const void *))
 
void * tfind (const void *key, const void **rootp, int(*cmp)(const void *, const void *))
 
void * tdelete (const void *key, void **rootp, int(*cmp)(const void *, const void *))
 
void twalk (const void *root, void(*action)(const void *nodep, VISIT which, int depth))
 
void * lfind (const void *key, const void *base, size_t *nmemb, size_t size, int(*cmp)(const void *, const void *))
 
void tdestroy (void *root, void(*free_node)(void *nodep))
 
double erand48 (unsigned short subi[3])
 
long jrand48 (unsigned short subi[3])
 
long nrand48 (unsigned short subi[3])
 
void sincos (double, double *, double *)
 
void sincosf (float, float *, float *)
 
char * realpath (const char *restrict pathname, char *restrict resolved_path)
 

Detailed Description

This file is a collection of portability fixes.

Macro Definition Documentation

◆ _

#define _ (   str)    vlc_gettext (str)

◆ _Static_assert

#define _Static_assert (   x,
 
)    extern char STATIC_ASSERT_CONCAT(static_assert_, __LINE__)[sizeof(struct { unsigned:-!(x); })]

◆ aligned_free

#define aligned_free (   ptr)    free(ptr)

◆ gettext_noop

#define gettext_noop (   str)    (str)

◆ if_freenameindex

#define if_freenameindex (   list)    (void)0

◆ if_nameindex

#define if_nameindex ( )    (errno = ENOBUFS, NULL)

◆ LC_ALL_MASK

#define LC_ALL_MASK   0

◆ LC_GLOBAL_LOCALE

#define LC_GLOBAL_LOCALE   ((locale_t)(uintptr_t)1)

◆ LC_MESSAGES_MASK

#define LC_MESSAGES_MASK   0

Referenced by vlc_strerror_l().

◆ LC_NUMERIC_MASK

#define LC_NUMERIC_MASK   0

◆ N_

#define N_ (   str)    gettext_noop (str)

◆ nanf

#define nanf (   tagp)    NAN

◆ POLLIN

#define POLLIN   (POLLRDNORM|POLLRDBAND)

◆ POLLOUT

#define POLLOUT   (POLLWRNORM|POLLWRBAND)

◆ static_assert

#define static_assert   _Static_assert

◆ STATIC_ASSERT_CONCAT

#define STATIC_ASSERT_CONCAT (   a,
 
)    STATIC_ASSERT_CONCAT_(a, b)

◆ STATIC_ASSERT_CONCAT_

#define STATIC_ASSERT_CONCAT_ (   a,
 
)    a##b

◆ TIME_UTC

#define TIME_UTC   1

◆ VLC_NOTHROW

#define VLC_NOTHROW

Typedef Documentation

◆ ENTRY

typedef struct entry ENTRY

◆ locale_t

typedef void* locale_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
POLLERR 
POLLHUP 
POLLNVAL 
POLLWRNORM 
POLLWRBAND 
POLLRDNORM 
POLLRDBAND 
POLLPRI 

◆ ACTION

enum ACTION
Enumerator
FIND 
ENTER 

◆ VISIT

enum VISIT
Enumerator
preorder 
postorder 
endorder 
leaf 

Function Documentation

◆ aligned_alloc()

void* aligned_alloc ( size_t  ,
size_t   
)

◆ asprintf()

int asprintf ( char **  ,
const char *  ,
  ... 
)

Referenced by AppendRemapFilter(), ArtCacheGetDirPath(), ArtCacheName(), config_AddIntf(), config_GetAppDir(), config_GetConfigFile(), config_GetHomeDir(), config_GetSysPath(), config_GetTypeDir(), config_GetUserDir(), config_LoadCmdLine(), config_OpenConfigFile(), config_RemoveIntf(), config_SaveConfigFile(), CreateCacheKey(), DisplayVoutTitle(), download_key(), EsGetTitle(), EsInfoCategoryName(), EsOutCreateCCChannels(), EsOutProgramGetMetaName(), EsOutProgramGetProgramName(), EsOutProgramMeta(), EsOutSetRecord(), get_path(), GetDirByItemUIDs(), GetFileByItemUID(), GetTmpFile(), httpd_HtmlError(), input_FindArtInCache(), input_item_CreateFilename(), input_item_SetEpg(), input_item_SetEpgOffline(), input_item_SetURI(), input_title_GetName(), InputGetExtraFilesPattern(), InputSourceInit(), LoadSlaves(), MainLoop(), module_InitStaticModules(), paths_to_list(), print_item(), seekpoint_GetName(), size_str(), sout_stream_url_to_chain(), subtitles_Detect(), update_DownloadReal(), vlc_credential_store(), vlc_getProxyUrl(), vlc_http_auth_FormatAuthorizationHeader(), vlc_http_authority(), vlc_http_cookies_fetch(), vlc_http_msg_add_creds_basic(), vlc_http_msg_vadd_header(), vlc_http_proxy_find(), vlc_http_res_get_redirect(), vlc_http_res_init(), vlc_keycode2str(), vlc_Log(), vlc_path2uri(), vlc_player_program_DupTitle(), vlc_readdir(), vlc_renderer_item_new(), vlc_uri2path(), vlc_uri_merge_paths(), vlm_ControlMediaAdd(), vlm_ControlMediaInstanceStart(), vlm_New(), vout_OSDEpgEvent(), vout_OSDPrintTime(), and vout_snapshot_SaveImage().

◆ atof()

double atof ( const char *  )

Referenced by config_LoadConfigFile().

◆ atoll()

long long atoll ( const char *  )

◆ dirfd()

int() dirfd ( DIR *  )

Referenced by vlc_readdir().

◆ erand48()

double erand48 ( unsigned short  subi[3])

Referenced by vlc_drand48().

◆ fdopendir()

DIR* fdopendir ( int  )

◆ flockfile()

void flockfile ( FILE *  )

◆ freelocale()

static void freelocale ( locale_t  loc)
inlinestatic

◆ fsync()

int fsync ( int  fd)

Referenced by vlc_trace().

◆ funlockfile()

void funlockfile ( FILE *  )

◆ getc_unlocked()

int getc_unlocked ( FILE *  )

◆ getchar_unlocked()

int getchar_unlocked ( void  )

◆ getdelim()

ssize_t getdelim ( char **  ,
size_t *  ,
int  ,
FILE *   
)

◆ getenv()

static char* getenv ( const char *  name)
inlinestatic

◆ getline()

ssize_t getline ( char **  ,
size_t *  ,
FILE *   
)

◆ getpid()

pid_t getpid ( void  )

Referenced by config_SaveConfigFile().

◆ gettimeofday()

int gettimeofday ( struct timeval *  ,
struct timezone *   
)

◆ gmtime_r()

struct tm* gmtime_r ( const time_t *  ,
struct tm *   
)

◆ inet_ntop()

const char* inet_ntop ( int  ,
const void *  ,
char *  ,
socklen_t   
)

◆ inet_pton()

int inet_pton ( int  ,
const char *  ,
void *   
)

◆ jrand48()

long jrand48 ( unsigned short  subi[3])

Referenced by vlc_mrand48().

◆ lfind()

void* lfind ( const void *  key,
const void *  base,
size_t *  nmemb,
size_t  size,
int(*)(const void *, const void *)  cmp 
)

◆ lldiv()

lldiv_t lldiv ( long  long,
long  long 
)

◆ localtime_r()

struct tm* localtime_r ( const time_t *  ,
struct tm *   
)

◆ memrchr()

void* memrchr ( const void *  ,
int  ,
size_t   
)

◆ newlocale()

static locale_t newlocale ( int  mask,
const char *  locale,
locale_t  base 
)
inlinestatic

◆ nrand48()

long nrand48 ( unsigned short  subi[3])

◆ pathconf()

long pathconf ( const char *  path,
int  name 
)

Referenced by vlc_getcwd().

◆ poll()

int poll ( struct pollfd ,
unsigned  ,
int   
)

◆ posix_memalign()

int posix_memalign ( void **  ,
size_t  ,
size_t   
)

Referenced by getenv().

◆ putc_unlocked()

int putc_unlocked ( int  ,
FILE *   
)

◆ putchar_unlocked()

int putchar_unlocked ( int  )

◆ realpath()

char* realpath ( const char *restrict  pathname,
char *restrict  resolved_path 
)

◆ recvmsg()

ssize_t recvmsg ( int  ,
struct msghdr *  ,
int   
)

◆ rewind()

void rewind ( FILE *  )

Referenced by config_LoadConfigFile().

◆ sendmsg()

ssize_t sendmsg ( int  ,
const struct msghdr *  ,
int   
)

Referenced by vlc_sendmsg().

◆ setenv()

int setenv ( const char *  ,
const char *  ,
int   
)

Referenced by getenv(), and system_Init().

◆ sincos()

void sincos ( double  ,
double *  ,
double *   
)

◆ sincosf()

void sincosf ( float  ,
float *  ,
float *   
)

◆ strcasecmp()

int strcasecmp ( const char *  ,
const char *   
)

◆ strcasestr()

char* strcasestr ( const char *  ,
const char *   
)

Referenced by input_item_MetaMatch().

◆ strdup()

char* strdup ( const char *  )

Referenced by access_New(), accessNewAttachment(), addons_manager_Gather(), aout_DevicesList(), aout_HotplugNotify(), ArtCacheGetDirPath(), ArtCacheName(), AuthDigest(), AuthGetParam(), AuthGetParamNoQuotes(), config_ChainCreate(), config_ChainDuplicate(), config_GetDataDir(), config_getDataDirReal(), config_GetGenericDir(), config_GetHomeDir(), config_GetIntChoices(), config_GetLibDir(), config_GetLibDirRaw(), config_getLibraryDirReal(), config_GetPszChoices(), config_GetSysPath(), config_GetTypeDir(), config_ListModules(), config_LoadCmdLine(), config_PutPsz(), cookie_default_path(), cookie_parse(), DecoderUpdatePreroll(), demux_FilterChainNew(), demux_NewAdvanced(), DupString(), es_format_Copy(), EsGetTitle(), EsOutProgramGetProgramName(), EsOutProgramMeta(), EsOutSelect(), EsOutVaPrivControlLocked(), get_java_string(), getAppDependentDir(), GetTmpFile(), GetVarSlaves(), hpack_lookup_name(), hpack_lookup_value(), httpd_ClientRecv(), httpd_MsgAdd(), httpd_StreamNew(), httpd_StreamSetHTTPHeaders(), httpd_UrlNew(), info_category_New(), info_New(), input_EsOutTimeshiftNew(), input_item_AddOption(), input_item_CopyOptions(), input_item_GetInfo(), input_item_GetMeta(), input_item_GetName(), input_item_GetTitleFbName(), input_item_GetURI(), input_item_SetName(), input_item_SetURI(), input_SetEsCatIds(), input_SubtitleFile2Uri(), InputGetExtraFilesPattern(), InputSourceInit(), LanguageGetCode(), LanguageGetName(), LanguageSplit(), makeaddrinfo(), Manage(), module_InitStaticModules(), mrl_Parse(), rdh_name_from_filename(), se_InitDirectory(), seekpoint_GetName(), sout_AccessOutNew(), sout_NewInstance(), sout_StreamChainNew(), spu_ChangeFilters(), spu_ChangeSources(), spu_PutSubpicture(), strdupnull(), stream_AccessNew(), stream_FilterChainNew(), StreamExtractorAttach(), subtitles_Detect(), system_Configure(), text_segment_New(), text_segment_ruby_New(), text_style_Copy(), text_style_Merge(), ThreadChangeFilters(), TwalkGetNames(), update_Download(), var_Change(), var_Create(), var_Inherit(), var_OptionParse(), vlc_dialog_id_post_login(), vlc_dictionary_all_keys(), vlc_dictionary_insert_impl_(), vlc_dlerror(), vlc_epg_Duplicate(), vlc_epg_event_Duplicate(), vlc_getProxyUrl(), vlc_http_msg_h2_headers(), vlc_http_msg_vadd_header(), vlc_http_req_create(), vlc_http_res_get_type(), vlc_http_res_init(), vlc_http_res_set_login(), vlc_idna_to_ascii(), vlc_input_attachment_New(), vlc_input_title_Duplicate(), vlc_loaddir(), vlc_meta_AddExtra(), vlc_meta_Merge(), vlc_meta_Set(), vlc_module_store(), vlc_path2uri(), vlc_player_program_DupTitle(), vlc_player_SelectTracksByStringIds(), vlc_player_track_priv_New(), vlc_player_track_priv_Update(), vlc_playlist_item_meta_CopyString(), vlc_plugin_desc_cb(), vlc_rd_probe_add(), vlc_readdir(), vlc_readdir_helper_additem(), vlc_renderer_item_new(), vlc_sd_probe_Add(), vlc_seekpoint_Duplicate(), vlc_stream_AttachmentNew(), vlc_stream_FilterNew(), vlc_strftime(), vlc_uri2path(), vlc_uri_decode_duplicate(), vlc_uri_resolve(), vlc_UrlParseInner(), vlc_vaLogEarly(), vlm_ControlMediaInstanceGets(), vlm_media_Copy(), vlm_MediaInstanceNew(), vout_control_PushString(), vout_OSDEpg(), vout_OSDText(), vout_snapshot_SaveImage(), and xstrdup().

◆ strlcpy()

size_t strlcpy ( char *  ,
const char *  ,
size_t   
)

Referenced by AddressCreate(), and strcpy_strip_ext().

◆ strndup()

char* strndup ( const char *  ,
size_t   
)

◆ strnlen()

size_t strnlen ( const char *  ,
size_t   
)

◆ strnstr()

char* strnstr ( const char *  ,
const char *  ,
size_t   
)

◆ strsep()

char* strsep ( char **  ,
const char *   
)

◆ strtof()

float strtof ( const char *  ,
char **   
)

Referenced by us_strtof().

◆ strtok_r()

char* strtok_r ( char *  ,
const char *  ,
char **   
)

◆ strtoll()

long long int strtoll ( const char *  ,
char **  ,
int   
)

◆ strverscmp()

int strverscmp ( const char *  ,
const char *   
)

◆ swab()

void swab ( const void *  ,
void *  ,
ssize_t   
)

◆ tdelete()

void* tdelete ( const void *  key,
void **  rootp,
int(*)(const void *, const void *)  cmp 
)

Referenced by var_Destroy().

◆ tdestroy()

void tdestroy ( void *  root,
void(*)(void *nodep)  free_node 
)

◆ tfind()

void* tfind ( const void *  key,
const void **  rootp,
int(*)(const void *, const void *)  cmp 
)

◆ timegm()

time_t timegm ( struct tm *  )

Referenced by vlc_http_mktime().

◆ timespec_get()

int timespec_get ( struct timespec ,
int   
)

◆ tsearch()

void* tsearch ( const void *  key,
void **  rootp,
int(*)(const void *, const void *)  cmp 
)

◆ twalk()

void twalk ( const void *  root,
void(*)(const void *nodep, VISIT which, int depth)  action 
)

◆ unsetenv()

int unsetenv ( const char *  )

Referenced by getenv().

◆ uselocale()

static locale_t uselocale ( locale_t  loc)
inlinestatic

◆ vasprintf()

int vasprintf ( char **  ,
const char *  ,
va_list   
)