]> PatchyGit - patchyircd.git/commitdiff
actually include common.h at the top of every file
authorEgor <egor@patchysicp.xyz>
Fri, 13 Jun 2025 06:05:25 +0000 (09:05 +0300)
committerEgor <egor@patchysicp.xyz>
Fri, 13 Jun 2025 06:05:25 +0000 (09:05 +0300)
just to be consistent with pch stuff, even though setpass stuff ideally
should be separate

src/common.h
src/crypt_blowfish.cpp
src/passwd.cpp
src/setpass.cpp
src/util.cpp

index 3092038..da14adc 100644 (file)
@@ -22,6 +22,7 @@
 #include <sys/socket.h>
 #include <sys/time.h>
 #include <sys/wait.h>
+#include <termios.h>
 #include <unistd.h>
 
 /* C++ standard */
index 1aab096..7159654 100644 (file)
@@ -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
index 632f74e..c45a896 100644 (file)
@@ -1,8 +1,6 @@
 // Copyright (c) 2022-2025 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
+#include "common.h"
 #include "passwd.h"
 #include "crypt_blowfish.h"
 char *password_crypt(const char *key, const char *setting)
index 0bab3ac..6638184 100644 (file)
@@ -1,8 +1,6 @@
 // Copyright (c) 2022-2023, 2025 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
-#include <string.h>
-#include <termios.h>
-#include <unistd.h>
+#include "common.h"
 #include "passwd.h"
 
 char *read_password(const char *prompt)
index 6a50c7c..a732aed 100644 (file)
@@ -3,9 +3,6 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 #include "common.h"
 #include "util.h"
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
 static void append_strn(std::vector<char> *v, const char *s, int len) {
        v->insert(v->end(), s, s+len);
 }