mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Separate headers from source files
The short answer for why we need to do this is so we can consistently do
`#include "nix/..."`. Without this change, there are ways to still make
that work, but they are hacky, and they have downsides such as making it
harder to make sure headers from the wrong Nix library (e..g.
`libnixexpr` headers in `libnixutil`) aren't being used.
The C API alraedy used `nix_api_*`, so its headers are *not* put in
subdirectories accordingly.
Progress on #7876
We resisted doing this for a while because it would be annoying to not
have the header source file pairs close by / easy to change file
path/name from one to the other. But I am ameliorating that with
symlinks in the next commit.
(cherry picked from commit f3e1c47f47
)
This commit is contained in:
parent
c0b219cf46
commit
15658b259f
662 changed files with 2967 additions and 2906 deletions
|
@ -1,4 +1,4 @@
|
|||
#include "environment-variables.hh"
|
||||
#include "nix/environment-variables.hh"
|
||||
|
||||
#ifdef _WIN32
|
||||
# include "processenv.h"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#include "file-system.hh"
|
||||
#include "signals.hh"
|
||||
#include "finally.hh"
|
||||
#include "serialise.hh"
|
||||
#include "windows-error.hh"
|
||||
#include "file-path.hh"
|
||||
#include "nix/file-system.hh"
|
||||
#include "nix/signals.hh"
|
||||
#include "nix/finally.hh"
|
||||
#include "nix/serialise.hh"
|
||||
#include "nix/windows-error.hh"
|
||||
#include "nix/file-path.hh"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <fileapi.h>
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
#include <iostream>
|
||||
#include <locale>
|
||||
|
||||
#include "file-path.hh"
|
||||
#include "file-path-impl.hh"
|
||||
#include "util.hh"
|
||||
#include "nix/file-path.hh"
|
||||
#include "nix/file-path-impl.hh"
|
||||
#include "nix/util.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "file-system.hh"
|
||||
#include "nix/file-system.hh"
|
||||
|
||||
#ifdef _WIN32
|
||||
namespace nix {
|
||||
|
|
9
src/libutil/windows/include/nix/meson.build
Normal file
9
src/libutil/windows/include/nix/meson.build
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Public headers directory
|
||||
|
||||
include_dirs += include_directories('..')
|
||||
|
||||
headers += files(
|
||||
'signals-impl.hh',
|
||||
'windows-async-pipe.hh',
|
||||
'windows-error.hh',
|
||||
)
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
///@file
|
||||
|
||||
#include "types.hh"
|
||||
#include "nix/types.hh"
|
||||
|
||||
namespace nix {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
///@file
|
||||
|
||||
#include "file-descriptor.hh"
|
||||
#include "nix/file-descriptor.hh"
|
||||
#ifdef _WIN32
|
||||
|
||||
namespace nix::windows {
|
|
@ -4,7 +4,7 @@
|
|||
#ifdef _WIN32
|
||||
#include <errhandlingapi.h>
|
||||
|
||||
#include "error.hh"
|
||||
#include "nix/error.hh"
|
||||
|
||||
namespace nix::windows {
|
||||
|
|
@ -11,10 +11,4 @@ sources += files(
|
|||
'windows-error.cc',
|
||||
)
|
||||
|
||||
include_dirs += include_directories('.')
|
||||
|
||||
headers += files(
|
||||
'signals-impl.hh',
|
||||
'windows-async-pipe.hh',
|
||||
'windows-error.hh',
|
||||
)
|
||||
subdir('include/nix')
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#ifdef _WIN32
|
||||
# include <ioapiset.h>
|
||||
# include "windows-error.hh"
|
||||
# include "nix/windows-error.hh"
|
||||
|
||||
# include "logging.hh"
|
||||
# include "util.hh"
|
||||
# include "muxable-pipe.hh"
|
||||
# include "nix/logging.hh"
|
||||
# include "nix/util.hh"
|
||||
# include "nix/muxable-pipe.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
#include <iostream>
|
||||
#include <locale>
|
||||
|
||||
#include "file-path.hh"
|
||||
#include "file-path-impl.hh"
|
||||
#include "util.hh"
|
||||
#include "nix/file-path.hh"
|
||||
#include "nix/file-path-impl.hh"
|
||||
#include "nix/util.hh"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
#include "current-process.hh"
|
||||
#include "environment-variables.hh"
|
||||
#include "error.hh"
|
||||
#include "executable-path.hh"
|
||||
#include "file-descriptor.hh"
|
||||
#include "file-path.hh"
|
||||
#include "signals.hh"
|
||||
#include "processes.hh"
|
||||
#include "finally.hh"
|
||||
#include "serialise.hh"
|
||||
#include "file-system.hh"
|
||||
#include "util.hh"
|
||||
#include "windows-error.hh"
|
||||
#include "nix/current-process.hh"
|
||||
#include "nix/environment-variables.hh"
|
||||
#include "nix/error.hh"
|
||||
#include "nix/executable-path.hh"
|
||||
#include "nix/file-descriptor.hh"
|
||||
#include "nix/file-path.hh"
|
||||
#include "nix/signals.hh"
|
||||
#include "nix/processes.hh"
|
||||
#include "nix/finally.hh"
|
||||
#include "nix/serialise.hh"
|
||||
#include "nix/file-system.hh"
|
||||
#include "nix/util.hh"
|
||||
#include "nix/windows-error.hh"
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstdlib>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "util.hh"
|
||||
#include "users.hh"
|
||||
#include "environment-variables.hh"
|
||||
#include "file-system.hh"
|
||||
#include "windows-error.hh"
|
||||
#include "nix/util.hh"
|
||||
#include "nix/users.hh"
|
||||
#include "nix/environment-variables.hh"
|
||||
#include "nix/file-system.hh"
|
||||
#include "nix/windows-error.hh"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "windows-async-pipe.hh"
|
||||
#include "windows-error.hh"
|
||||
#include "nix/windows-async-pipe.hh"
|
||||
#include "nix/windows-error.hh"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "windows-error.hh"
|
||||
#include "nix/windows-error.hh"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <error.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue