diff options
author | CohenArthur <arthur.cohen@epita.fr> | 2021-08-06 23:49:47 +0200 |
---|---|---|
committer | CohenArthur <arthur.cohen@epita.fr> | 2021-08-12 16:55:14 +0200 |
commit | b4993a629348279023b2c0159169ed62f10ac453 (patch) | |
tree | a8be78ea928d605ce6ea8f29a896fcbb48f42af4 /gcc/rust/rust-system.h | |
parent | 53756e1a01c7ac93e8467f577f50c491ca4b2525 (diff) | |
download | gcc-b4993a629348279023b2c0159169ed62f10ac453.zip gcc-b4993a629348279023b2c0159169ed62f10ac453.tar.gz gcc-b4993a629348279023b2c0159169ed62f10ac453.tar.bz2 |
module: Add basic filename discovery
Diffstat (limited to 'gcc/rust/rust-system.h')
-rw-r--r-- | gcc/rust/rust-system.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/rust/rust-system.h b/gcc/rust/rust-system.h index d62e676..40bca63 100644 --- a/gcc/rust/rust-system.h +++ b/gcc/rust/rust-system.h @@ -59,6 +59,14 @@ #include "diagnostic-core.h" /* For error_at and friends. */ #include "intl.h" /* For _(). */ +// File separator to use based on whether or not the OS we're working with is +// DOS-based +#if defined(HAVE_DOS_BASED_FILE_SYSTEM) +constexpr static const char *file_separator = "\\"; +#else +constexpr static const char *file_separator = "/"; +#endif /* HAVE_DOS_BASED_FILE_SYSTEM */ + // When using gcc, rust_assert is just gcc_assert. #define rust_assert(EXPR) gcc_assert (EXPR) |