📝 change CRLF to LF
This commit is contained in:
parent
476fbdb859
commit
d42e4a5897
|
@ -1,5 +1,11 @@
|
|||
#include "io_lib.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define F_OK 0 // fuck msc
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
namespace nasal {
|
||||
|
||||
const auto file_type_name = "file";
|
||||
|
|
|
@ -4,18 +4,12 @@
|
|||
#include "nasal_gc.h"
|
||||
#include "nasal_builtin.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define F_OK 0 // fuck msc
|
||||
#endif
|
||||
|
||||
namespace nasal {
|
||||
|
||||
void filehandle_destructor(void*);
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
#include <memory>
|
||||
#include <unordered_set>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define F_OK 0 // fuck msc
|
||||
#endif
|
||||
|
||||
namespace nasal {
|
||||
|
||||
linker::linker(): show_path_flag(false), library_loaded(false), this_file("") {
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define F_OK 0
|
||||
#endif
|
||||
|
||||
#include "nasal.h"
|
||||
#include "nasal_ast.h"
|
||||
#include "nasal_lexer.h"
|
||||
|
|
|
@ -76,6 +76,9 @@ void lexer::open(const std::string& file) {
|
|||
}
|
||||
|
||||
// check file exsits and it is a regular file
|
||||
#ifdef _MSC_VER
|
||||
#define S_ISREG(m) (((m)&0xF000)==0x8000)
|
||||
#endif
|
||||
struct stat buffer;
|
||||
if (stat(file.c_str(), &buffer)==0 && !S_ISREG(buffer.st_mode)) {
|
||||
err.err("lexer", "<"+file+"> is not a regular file");
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
#include "nasal.h"
|
||||
#include "nasal_err.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define S_ISREG(m) (((m)&0xF000)==0x8000)
|
||||
#endif
|
||||
|
||||
namespace nasal {
|
||||
|
||||
enum class tok:u32 {
|
||||
|
|
Loading…
Reference in New Issue