Skip to content

Commit 4219afc

Browse files
Thirumalai-ShaktivelShaikh-Ubaid
authored andcommitted
Move stat to utils.h
1 parent 1761077 commit 4219afc

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/lpython/semantics/python_ast_to_asr.cpp

-11
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,6 @@
3434
#include <lpython/parser/parser.h>
3535
#include <libasr/serialization.h>
3636

37-
#include <sys/types.h>
38-
#include <sys/stat.h>
39-
#ifndef _WIN32
40-
#include <unistd.h>
41-
#endif
42-
43-
#ifdef _WIN32
44-
#define stat _stat
45-
#endif
46-
47-
4837
namespace LFortran::LPython {
4938

5039
namespace CastingUtil {

src/lpython/utils.h

+10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44
#include <string>
55
#include <libasr/utils.h>
66

7+
#include <sys/types.h>
8+
#include <sys/stat.h>
9+
#ifndef _WIN32
10+
#include <unistd.h>
11+
#endif
12+
13+
#ifdef _WIN32
14+
#define stat _stat
15+
#endif
16+
717
namespace LFortran {
818

919
void get_executable_path(std::string &executable_path, int &dirname_length);

0 commit comments

Comments
 (0)