This commit is contained in:
udo
2026-06-13 02:07:38 +00:00
parent eb8f303f94
commit 577aae076e
27 changed files with 2937 additions and 21 deletions
+22 -1
View File
@@ -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), ...);