VLC 4.0.0-dev
Loading...
Searching...
No Matches
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
 

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 _(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
 

Enumerations

enum  {
  POLLERR =0x1 , POLLHUP =0x2 , POLLNVAL =0x4 , POLLWRNORM =0x10 ,
  POLLWRBAND =0x20 , POLLRDNORM =0x100 , POLLRDBAND =0x200 , POLLPRI =0x400
}
 
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)
 
ssize_t readv (int, const struct iovec *, int)
 
ssize_t writev (int, const struct iovec *, 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)
 
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, void *const *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))
 
unsigned long getauxval (unsigned long)
 
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)
 
int clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp)
 

Detailed Description

This file is a collection of portability fixes.

Macro Definition Documentation

◆ _

#define _ (   str)    vlc_gettext (str)

◆ 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

◆ 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)

◆ TIME_UTC

#define TIME_UTC   1

◆ VLC_NOTHROW

#define VLC_NOTHROW

Typedef Documentation

◆ locale_t

typedef void* locale_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
POLLERR 
POLLHUP 
POLLNVAL 
POLLWRNORM 
POLLWRBAND 
POLLRDNORM 
POLLRDBAND 
POLLPRI 

◆ 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 access_New(), aout_AddMixModeChoice(), AppendRemapFilter(), ArtCacheGetDirPath(), ArtCacheName(), config_AddIntf(), config_GetAppDir(), config_GetAppDir(), config_GetAppDir(), config_GetConfigFile(), config_GetHomeDir(), config_GetSysPath(), config_GetTypeDir(), config_LoadCmdLine(), config_OpenConfigFile(), config_RemoveIntf(), config_SaveConfigFile(), CreateCacheKey(), DecoderSendSubstream(), demux_NewAdvanced(), DisplayVoutTitle(), download_key(), EsGetTitle(), EsInfoCategoryName(), EsOutProgramGetMetaName(), EsOutProgramGetProgramName(), EsOutProgramMeta(), EsOutSetRecord(), filter_chain_AppendInner(), GetCCDescLocked(), GetDirByItemUIDs(), GetFileByItemUID(), GetTmpFile(), httpd_HandlerCallBack(), httpd_HtmlError(), InitSout(), input_FindArtInCache(), input_item_CreateFilename(), input_item_SetEpg(), input_item_SetEpgOffline(), input_item_SetURI(), input_title_GetName(), InputGetExtraFilesPattern(), InputSourceInit(), LoadSlaves(), paths_to_list(), platform_GetUserDir(), 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_path2uri(), vlc_player_program_DupTitle(), vlc_renderer_item_new(), vlc_uri2path(), vlc_uri_merge_paths(), 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 *  )

◆ clock_nanosleep()

int clock_nanosleep ( clockid_t  clock_id,
int  flags,
const struct timespec rqtp,
struct timespec rmtp 
)

Referenced by vlc_tick_sleep(), and vlc_tick_wait().

◆ 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()

◆ fsync()

int fsync ( int  fd)

Referenced by vlc_trace().

◆ funlockfile()

void funlockfile ( FILE *  )

◆ getauxval()

unsigned long getauxval ( unsigned long  )

◆ getc_unlocked()

int getc_unlocked ( FILE *  )

◆ getchar_unlocked()

int getchar_unlocked ( void  )

◆ getdelim()

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

◆ getenv()

◆ 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()

◆ 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])

◆ poll()

◆ posix_memalign()

int posix_memalign ( void **  ,
size_t  ,
size_t   
)

◆ putc_unlocked()

int putc_unlocked ( int  ,
FILE *   
)

◆ putchar_unlocked()

int putchar_unlocked ( int  )

◆ readv()

ssize_t readv ( int  ,
const struct iovec *  ,
int   
)

Referenced by vlc_readv_i11e().

◆ 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 system_Init().

◆ sincos()

void sincos ( double  ,
double *  ,
double *   
)

◆ sincosf()

void sincosf ( float  ,
float *  ,
float *   
)

◆ strcasecmp()

◆ 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(), AuthGetParamConcat(), AuthGetParamNoQuotesConcat(), ChangeFilters(), config_ChainCreate(), config_ChainDuplicate(), config_GetDataDir(), config_GetDataDir(), config_getDataDirReal(), config_GetGenericDir(), config_GetHomeDir(), config_GetHomeDir(), config_GetHomeDir(), config_GetIntChoices(), config_GetLibDir(), config_GetLibDirRaw(), config_getLibraryDirReal(), config_GetPsz(), config_GetPszChoices(), config_GetSysPath(), config_GetTypeDir(), config_GetUserDir(), config_ListModules(), config_LoadCmdLine(), cookie_default_path(), cookie_parse(), DecoderThread_ProcessSout(), demux_FilterChainNew(), demux_NewAdvanced(), DupString(), es_format_Copy(), EsGetTitle(), EsOutProgramGetProgramName(), EsOutProgramMeta(), EsOutSelectMatchExplicitParams(), 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_GetInfoLocked(), input_item_GetMeta(), input_item_GetMetaExtra(), input_item_GetName(), input_item_GetTitleFbName(), input_item_GetURI(), input_item_SetName(), input_item_SetURI(), input_item_UpdateTracksInfo(), input_resource_RequestSout(), input_SetEsCatIds(), input_SubtitleFile2Uri(), InputSourceInit(), LanguageGetCode(), LanguageGetName(), LanguageSplit(), makeaddrinfo(), Manage(), mrl_Parse(), OpenURL(), rdh_name_from_filename(), se_InitDirectory(), seekpoint_GetName(), sout_AccessOutNew(), sout_NewInstance(), sout_StreamChainNew(), spu_ChangeFilters(), spu_ChangeSources(), spu_PutSubpicture(), stream_AccessNew(), stream_FilterChainNew(), StreamExtractorAttach(), subtitles_Detect(), system_Configure(), text_segment_New(), text_segment_ruby_New(), text_style_Copy(), text_style_Merge(), TwalkGetNames(), update_Download(), var_Change(), var_Create(), 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_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_InsertExtra(), vlc_meta_Merge(), vlc_meta_SetWithPriority(), vlc_mkdir_parent(), vlc_module_store(), vlc_opendir(), vlc_param_SetString(), vlc_path2uri(), vlc_player_program_DupTitle(), vlc_player_SelectTracksByStringIds(), vlc_player_SetRecordingEnabled(), vlc_player_track_priv_New(), vlc_player_track_priv_Update(), vlc_playlist_item_meta_CopyString(), 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_ControlChangeFilters(), vout_OSDEpg(), vout_OSDText(), vout_snapshot_SaveImage(), and xstrdup().

◆ strlcpy()

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

Referenced by AddressCreate().

◆ strndup()

◆ 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 vlc_strtof_c().

◆ 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 *   
)

Referenced by CompareVersionStrings().

◆ 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,
void *const *  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 *  )

◆ uselocale()

◆ vasprintf()

◆ writev()

ssize_t writev ( int  ,
const struct iovec *  ,
int   
)

Referenced by vlc_writev().