optimize header file, now modules could generate smaller dynamic libs.

This commit is contained in:
ValKmjolnir
2022-08-24 22:08:47 +08:00
parent 987d3ce9e2
commit a91826607c
15 changed files with 72 additions and 48 deletions
+22 -6
View File
@@ -1,17 +1,33 @@
#ifndef __NASAL_BUILTIN_H__
#define __NASAL_BUILTIN_H__
#include "nasal_gc.h"
#ifndef _MSC_VER
#include <unistd.h>
#include <dirent.h>
#else
#include <io.h>
#include <direct.h>
#endif
#include <sstream>
#include <cmath>
#include <thread>
#include <sys/stat.h>
#ifdef _WIN32
#include <windows.h>
#else
#include <dlfcn.h>
#include <sys/wait.h>
#endif
#if defined __APPLE__
#include <crt_externs.h>
#define environ (*_NSGetEnviron())
#endif
nas_ref nas_err(const string& err_f,const string& info)
{
std::cerr<<"[vm] "<<err_f<<": "<<info<<"\n";
return {vm_none};
}
void print_core(std::vector<nas_ref>& elems)
{
for(auto& i:elems)