Ruby: include/ruby/internal/dosish.h File Reference

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

Macros
dosish.h File Reference

Support for so-called dosish systems. More...

Go to the source code of this file.

## Macros
#define | PATH_SEP ":"
| The delimiter of `PATH` environment variable.
#define | PATH_SEP_CHAR PATH_SEP[0]
| Identical to PATH_SEP, except it is of type `char`.
#define | PATH_ENV "PATH"
#define | CASEFOLD_FILESYSTEM 0
| Stone age assumption was that an operating system supports only one file system at a moment.

## Detailed Description

Support for so-called dosish systems.

Author
  Ruby developers ruby-.nosp@m.core.nosp@m.@ruby.nosp@m.-lan.nosp@m.g.org

Copyright
  This file is a part of the programming language Ruby. Permission is hereby granted, to either redistribute and/or modify this file, provided that the conditions mentioned in the file COPYING are met. Consult the file for details.

Warning
  Symbols prefixed with either `RBIMPL` or `rbimpl` are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will.

Note
  To ruby-core: remember that this header can be possibly recursively included from extension libraries written in C++. Do not expect for instance `__VA_ARGS__` is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98.

Definition in file dosish.h.

## Macro Definition Documentation

## ◆ CASEFOLD_FILESYSTEM

#define CASEFOLD_FILESYSTEM 0

Stone age assumption was that an operating system supports only one file system at a moment.

This macro was to detect if such (one and only) file system has case sensitivity. This assumption is largely not true any longer; most operating systems can mount many kinds of file systems side by side. Also there are file systems that do or do not ignore cases depending on configuration (e.g. EXT4's `casefold` feature).

This macro is still used internally (for instance Ruby level constant `File::FNM_SYSCASE` depends on it), but it is basically a wrong idea for you to use it today. Please just find another way.

Definition at line 85 of file dosish.h.

## ◆ PATH_ENV

#define PATH_ENV "PATH"

Deprecated
  This macro once was a thing in the old days, but makes no sense any longer today. Exists here for backwards compatibility only. You can safely forget about it.

Definition at line 63 of file dosish.h.

## ◆ PATH_SEP

#define PATH_SEP ":"

The delimiter of `PATH` environment variable.

Definition at line 45 of file dosish.h.

## ◆ PATH_SEP_CHAR

#define PATH_SEP_CHAR PATH_SEP[0]

Identical to PATH_SEP, except it is of type `char`.

Definition at line 49 of file dosish.h.

Referenced by rb_path_check().