W3
This commit is contained in:
+22
-1
@@ -1,7 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#if defined(__UCE_WASM_CORE__) || defined(__UCE_WASM_UNIT__)
|
||||
#ifndef LOCK_SH
|
||||
#define LOCK_SH 1
|
||||
#define LOCK_EX 2
|
||||
#define LOCK_UN 8
|
||||
#endif
|
||||
#ifndef SIGABRT
|
||||
#define SIGABRT 6
|
||||
#endif
|
||||
#ifndef SIGSEGV
|
||||
#define SIGSEGV 11
|
||||
#endif
|
||||
typedef int pid_t;
|
||||
extern "C" {
|
||||
int raise(int);
|
||||
unsigned int sleep(unsigned int seconds);
|
||||
int usleep(unsigned int usec);
|
||||
}
|
||||
#else
|
||||
#include <sys/file.h>
|
||||
#include <signal.h>
|
||||
#endif
|
||||
#include <ctime>
|
||||
#include <sstream>
|
||||
|
||||
String shell_exec(String cmd);
|
||||
@@ -22,7 +43,7 @@ String file_get_contents(String file_name);
|
||||
bool file_put_contents(String file_name, String content);
|
||||
bool file_append_contents(String file_name, String content);
|
||||
template <typename... Ts>
|
||||
bool file_append(String file_name, Ts... args)
|
||||
inline bool file_append(String file_name, Ts... args)
|
||||
{
|
||||
std::ostringstream out;
|
||||
((out << args), ...);
|
||||
|
||||
Reference in New Issue
Block a user