[all] Reference headers in src instead of copying
This is the second of two big changes to clean up includes throughout the project. Since I've started using clangd with Neovim and using VSCode's intellisense, my former strategy of copying all header files into place in `build/include` means that the real files don't show up in `compile_commands.json` and so display many include errors when viewing those header files in those tools. That setup was mostly predicated on a desire to keep directory depths small, but really I don't think paths like `src/libraries/j6/j6` are much better than `src/libraries/j6/include/j6`, and the latter doesn't have the aforementioned issues, and is clearer to the casual observer as well. Some additional changes: - Added a new module flag `copy_headers` for behavior similar to the old style, but placing headers in `$module_dir/include` instead of the global `build/include`. This was needed for external projects that don't follow the same source/headers folder structure - in this case, `zstd`. - There is no longer an associated `headers.*.ninja` for each `module.*.ninja` file, as only parsed headers need to be listed; this functionality has been moved back into the module's ninja file.
This commit is contained in:
28
src/libraries/libc/include/errno.h.cog
Normal file
28
src/libraries/libc/include/errno.h.cog
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
/** \file errno.h
|
||||
* Errors
|
||||
*
|
||||
* This file is part of the C standard library for the jsix operating
|
||||
* system.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
|
||||
/**[[[cog code generation
|
||||
from j6libc import arch_includes
|
||||
|
||||
arch_includes("errno.h")
|
||||
|
||||
]]]*/
|
||||
/*[[[end]]]*/
|
||||
|
||||
#define EDOM 0x800
|
||||
#define EILSEQ 0x801
|
||||
#define ERANGE 0x802
|
||||
#define EINVAL 0x803
|
||||
#define ENOMEM 0x804
|
||||
|
||||
/* vim: set ft=c: */
|
||||
Reference in New Issue
Block a user