MythTV  master
Classes | Macros | Typedefs | Functions
compat.h File Reference
#include <QtGlobal>
#include <sys/param.h>
#include "mythconfig.h"
#include <time.h>
#include <windows.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <cstdio>
Include dependency graph for compat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  statfs
 

Macros

#define close   wsock_close
 
#define NOMINMAX
 
#define fsync(FD)   0
 
#define minor(X)   0
 
#define setenv(x, y, z)   ::SetEnvironmentVariableA(x, y)
 
#define unsetenv(x)   0
 
#define lstat   stat
 
#define nice(x)
 
#define PRIO_PROCESS   0
 
#define setpriority(x, y, z)   ((x) == PRIO_PROCESS && y == 0 ? nice(z) : -1)
 
#define SIGHUP   1
 
#define SIGQUIT   3
 
#define SIGKILL   9
 
#define SIGUSR1   10
 
#define SIGUSR2   12
 
#define SIGPIPE   13
 
#define SIGALRM   14
 
#define SIGCONT   18
 
#define SIGSTOP   19
 
#define O_SYNC   0
 
#define mkfifo(path, mode)
 
#define RTLD_LAZY   0
 
#define dlopen(x, y)   LoadLibraryA((x))
 
#define dlclose(x)   !FreeLibrary((HMODULE)(x))
 
#define dlsym(x, y)   GetProcAddress((HMODULE)(x), (y))
 
#define DLERR_MAX   512
 
#define getuid()   0
 
#define geteuid()   0
 
#define setuid(x)   0
 
#define seteuid(x)   0
 
#define daemon(x, y)   -1
 
#define getloadavg(x, y)   -1
 
#define WIFEXITED(w)   (((w) & 0xff) == 0)
 
#define WIFSIGNALED(w)   (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
 
#define WIFSTOPPED(w)   (((w) & 0xff) == 0x7f)
 
#define WEXITSTATUS(w)   (((w) >> 8) & 0xff)
 
#define WTERMSIG(w)   ((w) & 0x7f)
 
#define LZO_COMPILE_TIME_ASSERT_HEADER(a)
 
#define LZO_COMPILE_TIME_ASSERT(a)
 
#define O_NONBLOCK   04000 /* NOLINT(cppcoreguidelines-macro-usage) */
 

Typedefs

using uint = unsigned int
 

Functions

int statfs (const char *path, struct statfs *buffer)
 
const char * dlerror (void)
 

Macro Definition Documentation

◆ close

#define close   wsock_close

Definition at line 43 of file compat.h.

◆ NOMINMAX

#define NOMINMAX

Definition at line 47 of file compat.h.

◆ fsync

#define fsync (   FD)    0

Definition at line 76 of file compat.h.

◆ minor

#define minor (   X)    0

Definition at line 78 of file compat.h.

◆ setenv

#define setenv (   x,
  y,
 
)    ::SetEnvironmentVariableA(x, y)

Definition at line 89 of file compat.h.

◆ unsetenv

#define unsetenv (   x)    0

Definition at line 90 of file compat.h.

◆ lstat

#define lstat   stat

Definition at line 121 of file compat.h.

◆ nice

#define nice (   x)
Value:
((int)!::SetPriorityClass(\
::GetCurrentProcess(), ((x) < -10) ? \
HIGH_PRIORITY_CLASS : (((x) < 0) ? \
ABOVE_NORMAL_PRIORITY_CLASS : (((x) > 10) ? \
IDLE_PRIORITY_CLASS : (((x) > 0) ? \
BELOW_NORMAL_PRIORITY_CLASS : \
NORMAL_PRIORITY_CLASS)))))

Definition at line 122 of file compat.h.

◆ PRIO_PROCESS

#define PRIO_PROCESS   0

Definition at line 129 of file compat.h.

◆ setpriority

#define setpriority (   x,
  y,
 
)    ((x) == PRIO_PROCESS && y == 0 ? nice(z) : -1)

Definition at line 130 of file compat.h.

◆ SIGHUP

#define SIGHUP   1

Definition at line 134 of file compat.h.

◆ SIGQUIT

#define SIGQUIT   3

Definition at line 135 of file compat.h.

◆ SIGKILL

#define SIGKILL   9

Definition at line 136 of file compat.h.

◆ SIGUSR1

#define SIGUSR1   10

Definition at line 137 of file compat.h.

◆ SIGUSR2

#define SIGUSR2   12

Definition at line 138 of file compat.h.

◆ SIGPIPE

#define SIGPIPE   13

Definition at line 139 of file compat.h.

◆ SIGALRM

#define SIGALRM   14

Definition at line 140 of file compat.h.

◆ SIGCONT

#define SIGCONT   18

Definition at line 141 of file compat.h.

◆ SIGSTOP

#define SIGSTOP   19

Definition at line 142 of file compat.h.

◆ O_SYNC

#define O_SYNC   0

Definition at line 144 of file compat.h.

◆ mkfifo

#define mkfifo (   path,
  mode 
)
Value:
(CreateNamedPipeA(path, PIPE_ACCESS_DUPLEX | WRITE_DAC, \
PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, \
1024, 1024, 10000, nullptr) == INVALID_HANDLE_VALUE ? -1 : 0)

Definition at line 148 of file compat.h.

◆ RTLD_LAZY

#define RTLD_LAZY   0

Definition at line 153 of file compat.h.

◆ dlopen

#define dlopen (   x,
 
)    LoadLibraryA((x))

Definition at line 154 of file compat.h.

◆ dlclose

#define dlclose (   x)    !FreeLibrary((HMODULE)(x))

Definition at line 155 of file compat.h.

◆ dlsym

#define dlsym (   x,
 
)    GetProcAddress((HMODULE)(x), (y))

Definition at line 156 of file compat.h.

◆ DLERR_MAX

#define DLERR_MAX   512

◆ getuid

#define getuid ( )    0

Definition at line 183 of file compat.h.

◆ geteuid

#define geteuid ( )    0

Definition at line 184 of file compat.h.

◆ setuid

#define setuid (   x)    0

Definition at line 185 of file compat.h.

◆ seteuid

#define seteuid (   x)    0

Definition at line 186 of file compat.h.

◆ daemon

#define daemon (   x,
 
)    -1

Definition at line 190 of file compat.h.

◆ getloadavg

#define getloadavg (   x,
 
)    -1

Definition at line 191 of file compat.h.

◆ WIFEXITED

#define WIFEXITED (   w)    (((w) & 0xff) == 0)

Definition at line 194 of file compat.h.

◆ WIFSIGNALED

#define WIFSIGNALED (   w)    (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))

Definition at line 195 of file compat.h.

◆ WIFSTOPPED

#define WIFSTOPPED (   w)    (((w) & 0xff) == 0x7f)

Definition at line 196 of file compat.h.

◆ WEXITSTATUS

#define WEXITSTATUS (   w)    (((w) >> 8) & 0xff)

Definition at line 197 of file compat.h.

◆ WTERMSIG

#define WTERMSIG (   w)    ((w) & 0x7f)

Definition at line 198 of file compat.h.

◆ LZO_COMPILE_TIME_ASSERT_HEADER

#define LZO_COMPILE_TIME_ASSERT_HEADER (   a)

Definition at line 205 of file compat.h.

◆ LZO_COMPILE_TIME_ASSERT

#define LZO_COMPILE_TIME_ASSERT (   a)

Definition at line 211 of file compat.h.

◆ O_NONBLOCK

#define O_NONBLOCK   04000 /* NOLINT(cppcoreguidelines-macro-usage) */

Definition at line 341 of file compat.h.

Typedef Documentation

◆ uint

using uint = unsigned int

Definition at line 81 of file compat.h.

Function Documentation

◆ statfs()

int statfs ( const char *  path,
struct statfs buffer 
)
inline

◆ dlerror()

const char* dlerror ( void  )
inline

Definition at line 160 of file compat.h.

Referenced by MythPlugin::init().