Minetest  5.4.0
porting.h File Reference
#include <string>
#include <vector>
#include "irrlicht.h"
#include "irrlichttypes.h"
#include "irrlichttypes_extrabloated.h"
#include "debug.h"
#include "constants.h"
#include "gettime.h"
#include <unistd.h>
#include <cstdint>
#include <sys/time.h>
#include <ctime>
+ Include dependency graph for porting.h:

Go to the source code of this file.

Namespaces

 porting
 

Macros

#define SWPRINTF_CHARSTRING   L"%s"
 
#define sleep_ms(x)   usleep(x*1000)
 
#define ALIGNOF(x)   __alignof__(x)
 
#define strlcpy(d, s, n)   mystrlcpy(d, s, n)
 
#define PADDING(x, y)   ((ALIGNOF(y) - ((uintptr_t)(x) & (ALIGNOF(y) - 1))) & (ALIGNOF(y) - 1))
 

Functions

void porting::signal_handler_init (void)
 
bool * porting::signal_handler_killstatus ()
 
std::string porting::getDataPath (const char *subpath)
 
void porting::migrateCachePath ()
 
void porting::initializePaths ()
 
std::string porting::get_sysinfo ()
 
void porting::os_get_clock (struct timespec *ts)
 
u64 porting::getTimeS ()
 
u64 porting::getTimeMs ()
 
u64 porting::getTimeUs ()
 
u64 porting::getTimeNs ()
 
u64 porting::getTime (TimePrecision prec)
 
u64 porting::getDeltaMs (u64 old_time_ms, u64 new_time_ms)
 Delta calculation function arguments. More...
 
const char * porting::getPlatformName ()
 
bool porting::secure_rand_fill_buf (void *buf, size_t len)
 
void porting::attachOrCreateConsole ()
 
int porting::mt_snprintf (char *buf, const size_t buf_size, const char *fmt,...)
 
bool porting::open_url (const std::string &url)
 Opens URL in default web browser. More...
 
bool porting::open_directory (const std::string &path)
 Opens a directory in the default file manager. More...
 

Macro Definition Documentation

◆ ALIGNOF

#define ALIGNOF (   x)    __alignof__(x)

◆ PADDING

#define PADDING (   x,
 
)    ((ALIGNOF(y) - ((uintptr_t)(x) & (ALIGNOF(y) - 1))) & (ALIGNOF(y) - 1))

◆ sleep_ms

#define sleep_ms (   x)    usleep(x*1000)

◆ strlcpy

#define strlcpy (   d,
  s,
 
)    mystrlcpy(d, s, n)

◆ SWPRINTF_CHARSTRING

#define SWPRINTF_CHARSTRING   L"%s"