From: Egor Date: Fri, 13 Jun 2025 06:05:25 +0000 (+0300) Subject: actually include common.h at the top of every file X-Git-Url: https://git.patchysicp.xyz/?a=commitdiff_plain;h=ff7072baa9e4844bfcd1590b13f2730d23ae8115;p=patchyircd.git actually include common.h at the top of every file just to be consistent with pch stuff, even though setpass stuff ideally should be separate --- diff --git a/src/common.h b/src/common.h index 3092038..da14adc 100644 --- a/src/common.h +++ b/src/common.h @@ -22,6 +22,7 @@ #include #include #include +#include #include /* C++ standard */ diff --git a/src/crypt_blowfish.cpp b/src/crypt_blowfish.cpp index 1aab096..7159654 100644 --- a/src/crypt_blowfish.cpp +++ b/src/crypt_blowfish.cpp @@ -1,6 +1,7 @@ // Copyright (c) 1998-2014 Solar Designer // Copyright (c) 2005-2020 Rich Felker, et al. // SPDX-License-Identifier: MIT +#include "common.h" #include "crypt_blowfish.h" /* Modified by Rich Felker in for inclusion in musl libc, based on * Solar Designer's second size-optimized version sent to the musl diff --git a/src/passwd.cpp b/src/passwd.cpp index 632f74e..c45a896 100644 --- a/src/passwd.cpp +++ b/src/passwd.cpp @@ -1,8 +1,6 @@ // Copyright (c) 2022-2025 Egor // SPDX-License-Identifier: GPL-2.0-or-later -#include -#include -#include +#include "common.h" #include "passwd.h" #include "crypt_blowfish.h" char *password_crypt(const char *key, const char *setting) diff --git a/src/setpass.cpp b/src/setpass.cpp index 0bab3ac..6638184 100644 --- a/src/setpass.cpp +++ b/src/setpass.cpp @@ -1,8 +1,6 @@ // Copyright (c) 2022-2023, 2025 Egor // SPDX-License-Identifier: GPL-2.0-or-later -#include -#include -#include +#include "common.h" #include "passwd.h" char *read_password(const char *prompt) diff --git a/src/util.cpp b/src/util.cpp index 6a50c7c..a732aed 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -3,9 +3,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "common.h" #include "util.h" -#include -#include -#include static void append_strn(std::vector *v, const char *s, int len) { v->insert(v->end(), s, s+len); }