diff options
author | Andreas Kling <kling@serenityos.org> | 2021-03-12 17:29:37 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-12 17:29:37 +0100 |
commit | ef1e5db1d063f55e57b1d7623ea7154583fc95ad (patch) | |
tree | fb92514e07f4017cb899258137c817c07da9d5c5 /Userland | |
parent | 423ed5339651a2646c64ee4fd7b3b32bb7f8c942 (diff) | |
download | serenity-ef1e5db1d063f55e57b1d7623ea7154583fc95ad.zip |
Everywhere: Remove klog(), dbg() and purge all LogStream usage :^)
Good-bye LogStream. Long live AK::Format!
Diffstat (limited to 'Userland')
168 files changed, 128 insertions, 255 deletions
diff --git a/Userland/Applications/About/main.cpp b/Userland/Applications/About/main.cpp index 8b03c00f42..803905dc8c 100644 --- a/Userland/Applications/About/main.cpp +++ b/Userland/Applications/About/main.cpp @@ -29,7 +29,7 @@ #include <LibGUI/Icon.h> #include <LibGfx/Bitmap.h> #include <stdio.h> -#include <sys/utsname.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Applications/Browser/main.cpp b/Userland/Applications/Browser/main.cpp index 0440597cae..77a11934d2 100644 --- a/Userland/Applications/Browser/main.cpp +++ b/Userland/Applications/Browser/main.cpp @@ -26,7 +26,6 @@ #include "BookmarksBarWidget.h" #include "Browser.h" -#include "InspectorWidget.h" #include "Tab.h" #include "WindowActions.h" #include <AK/StringBuilder.h> @@ -47,6 +46,7 @@ #include <LibWeb/Loader/ResourceLoader.h> #include <stdio.h> #include <stdlib.h> +#include <unistd.h> namespace Browser { diff --git a/Userland/Applications/Calculator/main.cpp b/Userland/Applications/Calculator/main.cpp index 91ee969d23..79aaab58a4 100644 --- a/Userland/Applications/Calculator/main.cpp +++ b/Userland/Applications/Calculator/main.cpp @@ -34,6 +34,7 @@ #include <LibGUI/Window.h> #include <LibGfx/Bitmap.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Applications/Calendar/main.cpp b/Userland/Applications/Calendar/main.cpp index be1a23f7b3..8406927b7f 100644 --- a/Userland/Applications/Calendar/main.cpp +++ b/Userland/Applications/Calendar/main.cpp @@ -38,9 +38,9 @@ #include <LibGUI/Window.h> #include <LibGfx/Bitmap.h> #include <LibGfx/Color.h> -#include <LibGfx/Font.h> #include <LibGfx/FontDatabase.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Applications/CrashReporter/main.cpp b/Userland/Applications/CrashReporter/main.cpp index 00029f8d22..e1a02b2874 100644 --- a/Userland/Applications/CrashReporter/main.cpp +++ b/Userland/Applications/CrashReporter/main.cpp @@ -48,6 +48,7 @@ #include <LibGUI/Widget.h> #include <LibGUI/Window.h> #include <string.h> +#include <unistd.h> struct TitleAndText { String title; diff --git a/Userland/Applications/Debugger/main.cpp b/Userland/Applications/Debugger/main.cpp index fe91440b87..fa2ec66e67 100644 --- a/Userland/Applications/Debugger/main.cpp +++ b/Userland/Applications/Debugger/main.cpp @@ -27,7 +27,6 @@ #include <AK/Assertions.h> #include <AK/ByteBuffer.h> #include <AK/Demangle.h> -#include <AK/LogStream.h> #include <AK/StringBuilder.h> #include <LibC/sys/arch/i386/regs.h> #include <LibCore/ArgsParser.h> diff --git a/Userland/Applications/DisplaySettings/main.cpp b/Userland/Applications/DisplaySettings/main.cpp index f2dbcc2b33..a7a7a6de7d 100644 --- a/Userland/Applications/DisplaySettings/main.cpp +++ b/Userland/Applications/DisplaySettings/main.cpp @@ -32,10 +32,10 @@ #include <LibGUI/Menu.h> #include <LibGUI/MenuBar.h> #include <LibGUI/TabWidget.h> -#include <LibGUI/Widget.h> #include <LibGUI/Window.h> #include <LibGfx/Bitmap.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Applications/FontEditor/main.cpp b/Userland/Applications/FontEditor/main.cpp index 8a370160bd..61d14248dd 100644 --- a/Userland/Applications/FontEditor/main.cpp +++ b/Userland/Applications/FontEditor/main.cpp @@ -41,6 +41,7 @@ #include <LibGfx/FontDatabase.h> #include <LibGfx/Point.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Applications/Help/main.cpp b/Userland/Applications/Help/main.cpp index 02089b1d59..50d2d816ae 100644 --- a/Userland/Applications/Help/main.cpp +++ b/Userland/Applications/Help/main.cpp @@ -50,6 +50,7 @@ #include <libgen.h> #include <stdio.h> #include <string.h> +#include <unistd.h> int main(int argc, char* argv[]) { diff --git a/Userland/Applications/HexEditor/main.cpp b/Userland/Applications/HexEditor/main.cpp index 5c4a22b20a..f9217af243 100644 --- a/Userland/Applications/HexEditor/main.cpp +++ b/Userland/Applications/HexEditor/main.cpp @@ -29,6 +29,7 @@ #include <LibGUI/MenuBar.h> #include <LibGfx/Bitmap.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Applications/IRCClient/IRCClient.cpp b/Userland/Applications/IRCClient/IRCClient.cpp index 2eb7c03705..910acf91cc 100644 --- a/Userland/Applications/IRCClient/IRCClient.cpp +++ b/Userland/Applications/IRCClient/IRCClient.cpp @@ -39,6 +39,7 @@ #include <pwd.h> #include <stdio.h> #include <strings.h> +#include <unistd.h> enum IRCNumeric { RPL_WELCOME = 1, diff --git a/Userland/Applications/IRCClient/main.cpp b/Userland/Applications/IRCClient/main.cpp index 2cd00843fa..9455089970 100644 --- a/Userland/Applications/IRCClient/main.cpp +++ b/Userland/Applications/IRCClient/main.cpp @@ -30,6 +30,7 @@ #include <LibGUI/Application.h> #include <LibGUI/MessageBox.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Applications/KeyboardMapper/main.cpp b/Userland/Applications/KeyboardMapper/main.cpp index 654eb44fd5..ad719dcbf3 100644 --- a/Userland/Applications/KeyboardMapper/main.cpp +++ b/Userland/Applications/KeyboardMapper/main.cpp @@ -32,6 +32,7 @@ #include <LibGUI/Icon.h> #include <LibGUI/Menu.h> #include <LibGUI/MenuBar.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Applications/PixelPaint/main.cpp b/Userland/Applications/PixelPaint/main.cpp index e7c88d3849..c8efb94830 100644 --- a/Userland/Applications/PixelPaint/main.cpp +++ b/Userland/Applications/PixelPaint/main.cpp @@ -44,14 +44,13 @@ #include <LibGUI/Clipboard.h> #include <LibGUI/FilePicker.h> #include <LibGUI/Icon.h> -#include <LibGUI/Menu.h> #include <LibGUI/MenuBar.h> #include <LibGUI/MessageBox.h> -#include <LibGUI/TableView.h> #include <LibGUI/Window.h> #include <LibGfx/Bitmap.h> #include <LibGfx/Matrix4x4.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Applications/Run/main.cpp b/Userland/Applications/Run/main.cpp index 706215a49c..3513da9d11 100644 --- a/Userland/Applications/Run/main.cpp +++ b/Userland/Applications/Run/main.cpp @@ -24,14 +24,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <AK/LexicalPath.h> +#include "RunWindow.h" #include <AK/StringBuilder.h> -#include <AK/Types.h> -#include <AK/URL.h> #include <LibGUI/Application.h> -#include <string.h> - -#include "RunWindow.h" +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Applications/Serendipity/main.cpp b/Userland/Applications/Serendipity/main.cpp index b176dd12f6..f25bd052cb 100644 --- a/Userland/Applications/Serendipity/main.cpp +++ b/Userland/Applications/Serendipity/main.cpp @@ -28,6 +28,7 @@ #include <LibGUI/Application.h> #include <LibGUI/Icon.h> #include <LibGUI/Window.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Applications/SpaceAnalyzer/main.cpp b/Userland/Applications/SpaceAnalyzer/main.cpp index 9cd199e2a1..50d06bea1d 100644 --- a/Userland/Applications/SpaceAnalyzer/main.cpp +++ b/Userland/Applications/SpaceAnalyzer/main.cpp @@ -43,6 +43,7 @@ #include <LibGUI/MessageBox.h> #include <LibGUI/StatusBar.h> #include <sys/stat.h> +#include <unistd.h> static const char* APP_NAME = "Space Analyzer"; diff --git a/Userland/Applications/Spreadsheet/Spreadsheet.cpp b/Userland/Applications/Spreadsheet/Spreadsheet.cpp index 48bdbc5e97..1ce8c0d3b6 100644 --- a/Userland/Applications/Spreadsheet/Spreadsheet.cpp +++ b/Userland/Applications/Spreadsheet/Spreadsheet.cpp @@ -40,6 +40,7 @@ #include <LibJS/Parser.h> #include <LibJS/Runtime/Function.h> #include <ctype.h> +#include <unistd.h> namespace Spreadsheet { diff --git a/Userland/Applications/Spreadsheet/main.cpp b/Userland/Applications/Spreadsheet/main.cpp index f306531645..805b843365 100644 --- a/Userland/Applications/Spreadsheet/main.cpp +++ b/Userland/Applications/Spreadsheet/main.cpp @@ -33,11 +33,11 @@ #include <LibGUI/Application.h> #include <LibGUI/Clipboard.h> #include <LibGUI/FilePicker.h> -#include <LibGUI/Forward.h> #include <LibGUI/Icon.h> #include <LibGUI/Menu.h> #include <LibGUI/MenuBar.h> #include <LibGUI/Window.h> +#include <unistd.h> int main(int argc, char* argv[]) { diff --git a/Userland/Applications/TextEditor/main.cpp b/Userland/Applications/TextEditor/main.cpp index f549c0564a..0bf5c5c8a5 100644 --- a/Userland/Applications/TextEditor/main.cpp +++ b/Userland/Applications/TextEditor/main.cpp @@ -29,6 +29,7 @@ #include <LibGUI/MenuBar.h> #include <LibGfx/Bitmap.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Applications/ThemeEditor/main.cpp b/Userland/Applications/ThemeEditor/main.cpp index 4daa17488e..2f503e1f4b 100644 --- a/Userland/Applications/ThemeEditor/main.cpp +++ b/Userland/Applications/ThemeEditor/main.cpp @@ -32,6 +32,7 @@ #include <LibGUI/Icon.h> #include <LibGUI/Model.h> #include <LibGUI/Window.h> +#include <unistd.h> class ColorRoleModel final : public GUI::Model { public: diff --git a/Userland/Demos/Cube/Cube.cpp b/Userland/Demos/Cube/Cube.cpp index 6e0fb1e8b5..30088c9607 100644 --- a/Userland/Demos/Cube/Cube.cpp +++ b/Userland/Demos/Cube/Cube.cpp @@ -37,10 +37,9 @@ #include <LibGfx/Bitmap.h> #include <LibGfx/Matrix4x4.h> #include <LibGfx/Vector3.h> -#include <math.h> #include <stdio.h> #include <stdlib.h> -#include <time.h> +#include <unistd.h> const int WIDTH = 200; const int HEIGHT = 200; diff --git a/Userland/Demos/Eyes/main.cpp b/Userland/Demos/Eyes/main.cpp index 3db722a882..5b120ae260 100644 --- a/Userland/Demos/Eyes/main.cpp +++ b/Userland/Demos/Eyes/main.cpp @@ -32,6 +32,7 @@ #include <LibGUI/MenuBar.h> #include <LibGUI/Window.h> #include <LibGfx/Bitmap.h> +#include <unistd.h> int main(int argc, char* argv[]) { diff --git a/Userland/Demos/Fire/Fire.cpp b/Userland/Demos/Fire/Fire.cpp index 03986dea01..c76b3e8bd4 100644 --- a/Userland/Demos/Fire/Fire.cpp +++ b/Userland/Demos/Fire/Fire.cpp @@ -53,6 +53,7 @@ #include <stdio.h> #include <stdlib.h> #include <time.h> +#include <unistd.h> #define FIRE_WIDTH 320 #define FIRE_HEIGHT 168 diff --git a/Userland/Demos/LibGfxDemo/main.cpp b/Userland/Demos/LibGfxDemo/main.cpp index 8d40798e30..2122d40a1a 100644 --- a/Userland/Demos/LibGfxDemo/main.cpp +++ b/Userland/Demos/LibGfxDemo/main.cpp @@ -30,10 +30,10 @@ #include <LibGUI/Widget.h> #include <LibGUI/Window.h> #include <LibGfx/Bitmap.h> -#include <LibGfx/Font.h> #include <LibGfx/FontDatabase.h> #include <LibGfx/Painter.h> #include <LibGfx/Path.h> +#include <unistd.h> const int WIDTH = 780; const int HEIGHT = 600; diff --git a/Userland/Demos/LibGfxScaleDemo/main.cpp b/Userland/Demos/LibGfxScaleDemo/main.cpp index 9a60b911d1..e7763b3e65 100644 --- a/Userland/Demos/LibGfxScaleDemo/main.cpp +++ b/Userland/Demos/LibGfxScaleDemo/main.cpp @@ -31,12 +31,12 @@ #include <LibGUI/Window.h> #include <LibGfx/Bitmap.h> #include <LibGfx/Font.h> -#include <LibGfx/FontDatabase.h> #include <LibGfx/Painter.h> #include <LibGfx/Palette.h> #include <LibGfx/Path.h> #include <LibGfx/SystemTheme.h> #include <LibGfx/WindowTheme.h> +#include <unistd.h> const int WIDTH = 300; const int HEIGHT = 200; diff --git a/Userland/Demos/Mouse/main.cpp b/Userland/Demos/Mouse/main.cpp index 6cd3d20289..547c510469 100644 --- a/Userland/Demos/Mouse/main.cpp +++ b/Userland/Demos/Mouse/main.cpp @@ -36,6 +36,7 @@ #include <LibGUI/Window.h> #include <LibGfx/Bitmap.h> #include <LibGfx/Path.h> +#include <unistd.h> #include <math.h> diff --git a/Userland/Demos/Screensaver/Screensaver.cpp b/Userland/Demos/Screensaver/Screensaver.cpp index 889106f8d7..bf6166a154 100644 --- a/Userland/Demos/Screensaver/Screensaver.cpp +++ b/Userland/Demos/Screensaver/Screensaver.cpp @@ -33,6 +33,7 @@ #include <LibGfx/Bitmap.h> #include <stdio.h> #include <time.h> +#include <unistd.h> class Screensaver final : public GUI::Widget { C_OBJECT(Screensaver) diff --git a/Userland/Demos/WidgetGallery/main.cpp b/Userland/Demos/WidgetGallery/main.cpp index 352b864e7e..63d3aa5a41 100644 --- a/Userland/Demos/WidgetGallery/main.cpp +++ b/Userland/Demos/WidgetGallery/main.cpp @@ -31,6 +31,7 @@ #include <LibGUI/Menu.h> #include <LibGUI/MenuBar.h> #include <LibGUI/Window.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/DevTools/HackStudio/CursorTool.cpp b/Userland/DevTools/HackStudio/CursorTool.cpp index 04f74d526f..de6e74c31c 100644 --- a/Userland/DevTools/HackStudio/CursorTool.cpp +++ b/Userland/DevTools/HackStudio/CursorTool.cpp @@ -29,7 +29,6 @@ #include "FormWidget.h" #include "WidgetTreeModel.h" #include <AK/Debug.h> -#include <AK/LogStream.h> #include <LibGfx/Palette.h> namespace HackStudio { diff --git a/Userland/DevTools/HackStudio/Git/GitWidget.cpp b/Userland/DevTools/HackStudio/Git/GitWidget.cpp index e15583ff8d..c0ef18f00c 100644 --- a/Userland/DevTools/HackStudio/Git/GitWidget.cpp +++ b/Userland/DevTools/HackStudio/Git/GitWidget.cpp @@ -26,7 +26,6 @@ #include "GitWidget.h" #include "GitFilesModel.h" -#include <AK/LogStream.h> #include <LibCore/File.h> #include <LibDiff/Format.h> #include <LibGUI/Application.h> diff --git a/Userland/DevTools/HackStudio/WidgetTool.cpp b/Userland/DevTools/HackStudio/WidgetTool.cpp index 73626ebbf8..a0073c8ede 100644 --- a/Userland/DevTools/HackStudio/WidgetTool.cpp +++ b/Userland/DevTools/HackStudio/WidgetTool.cpp @@ -25,7 +25,7 @@ */ #include "WidgetTool.h" -#include <AK/LogStream.h> +#include <AK/Format.h> namespace HackStudio { diff --git a/Userland/DevTools/Playground/main.cpp b/Userland/DevTools/Playground/main.cpp index e6f7871f5f..dc63bd47b6 100644 --- a/Userland/DevTools/Playground/main.cpp +++ b/Userland/DevTools/Playground/main.cpp @@ -28,7 +28,6 @@ #include <AK/URL.h> #include <LibCore/ArgsParser.h> #include <LibCore/File.h> -#include <LibCore/Property.h> #include <LibDesktop/Launcher.h> #include <LibGUI/Application.h> #include <LibGUI/AutocompleteProvider.h> @@ -45,6 +44,7 @@ #include <LibGUI/TextEditor.h> #include <LibGUI/Window.h> #include <string.h> +#include <unistd.h> namespace { diff --git a/Userland/DevTools/UserspaceEmulator/Emulator.cpp b/Userland/DevTools/UserspaceEmulator/Emulator.cpp index 9ed37961e8..091e77a453 100644 --- a/Userland/DevTools/UserspaceEmulator/Emulator.cpp +++ b/Userland/DevTools/UserspaceEmulator/Emulator.cpp @@ -38,6 +38,7 @@ #include <LibX86/ELFSymbolProvider.h> #include <fcntl.h> #include <syscall.h> +#include <unistd.h> #if defined(__GNUC__) && !defined(__clang__) # pragma GCC optimize("O3") diff --git a/Userland/DevTools/UserspaceEmulator/MallocTracer.cpp b/Userland/DevTools/UserspaceEmulator/MallocTracer.cpp index 0c753d0fdd..2390d255ba 100644 --- a/Userland/DevTools/UserspaceEmulator/MallocTracer.cpp +++ b/Userland/DevTools/UserspaceEmulator/MallocTracer.cpp @@ -28,10 +28,10 @@ #include "Emulator.h" #include "MmapRegion.h" #include <AK/Debug.h> -#include <AK/LogStream.h> #include <AK/TemporaryChange.h> #include <mallocdefs.h> #include <string.h> +#include <unistd.h> namespace UserspaceEmulator { diff --git a/Userland/DevTools/UserspaceEmulator/Report.h b/Userland/DevTools/UserspaceEmulator/Report.h index 96face8914..9d4a01011a 100644 --- a/Userland/DevTools/UserspaceEmulator/Report.h +++ b/Userland/DevTools/UserspaceEmulator/Report.h @@ -26,7 +26,7 @@ #pragma once -#include <AK/LogStream.h> +#include <AK/Format.h> extern bool g_report_to_debug; diff --git a/Userland/DevTools/UserspaceEmulator/SoftCPU.cpp b/Userland/DevTools/UserspaceEmulator/SoftCPU.cpp index 62a975d8f5..3c4fb2fd41 100644 --- a/Userland/DevTools/UserspaceEmulator/SoftCPU.cpp +++ b/Userland/DevTools/UserspaceEmulator/SoftCPU.cpp @@ -31,6 +31,7 @@ #include <math.h> #include <stdio.h> #include <string.h> +#include <unistd.h> #if defined(__GNUC__) && !defined(__clang__) # pragma GCC optimize("O3") diff --git a/Userland/DevTools/UserspaceEmulator/main.cpp b/Userland/DevTools/UserspaceEmulator/main.cpp index 8fff65cd0f..f91d721b41 100644 --- a/Userland/DevTools/UserspaceEmulator/main.cpp +++ b/Userland/DevTools/UserspaceEmulator/main.cpp @@ -25,16 +25,13 @@ */ #include "Emulator.h" -#include "SoftCPU.h" #include <AK/Format.h> #include <AK/LexicalPath.h> -#include <AK/MappedFile.h> #include <AK/StringBuilder.h> #include <LibCore/ArgsParser.h> #include <LibCore/DirIterator.h> -#include <LibELF/Image.h> -#include <getopt.h> #include <pthread.h> +#include <serenity.h> #include <string.h> bool g_report_to_debug = false; diff --git a/Userland/DynamicLoader/main.cpp b/Userland/DynamicLoader/main.cpp index 43545dcd48..0f3685b434 100644 --- a/Userland/DynamicLoader/main.cpp +++ b/Userland/DynamicLoader/main.cpp @@ -24,7 +24,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <AK/LogStream.h> #include <LibC/sys/internals.h> #include <LibC/unistd.h> #include <LibELF/AuxiliaryVector.h> diff --git a/Userland/DynamicLoader/misc.cpp b/Userland/DynamicLoader/misc.cpp index f8f172a7c6..9cc18cab8a 100644 --- a/Userland/DynamicLoader/misc.cpp +++ b/Userland/DynamicLoader/misc.cpp @@ -25,7 +25,7 @@ */ #include "misc.h" -#include "AK/LogStream.h" +#include <AK/Format.h> extern "C" { const char* __cxa_demangle(const char*, void*, void*, int*) diff --git a/Userland/Games/2048/main.cpp b/Userland/Games/2048/main.cpp index 7cf03fde35..d82e42c293 100644 --- a/Userland/Games/2048/main.cpp +++ b/Userland/Games/2048/main.cpp @@ -40,6 +40,7 @@ #include <LibGUI/Window.h> #include <stdio.h> #include <time.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Games/Breakout/Game.cpp b/Userland/Games/Breakout/Game.cpp index c66f45d2b4..1d56509e3b 100644 --- a/Userland/Games/Breakout/Game.cpp +++ b/Userland/Games/Breakout/Game.cpp @@ -31,6 +31,7 @@ #include <LibGUI/Painter.h> #include <LibGfx/Font.h> #include <LibGfx/StandardCursor.h> +#include <unistd.h> namespace Breakout { diff --git a/Userland/Games/Breakout/main.cpp b/Userland/Games/Breakout/main.cpp index 560b7aeaec..c12a9d296f 100644 --- a/Userland/Games/Breakout/main.cpp +++ b/Userland/Games/Breakout/main.cpp @@ -31,6 +31,7 @@ #include <LibGUI/MenuBar.h> #include <LibGUI/Window.h> #include <LibGfx/Bitmap.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Games/Chess/Engine.cpp b/Userland/Games/Chess/Engine.cpp index a0ccc72ba7..e709e319bf 100644 --- a/Userland/Games/Chess/Engine.cpp +++ b/Userland/Games/Chess/Engine.cpp @@ -29,7 +29,7 @@ #include <fcntl.h> #include <spawn.h> #include <stdio.h> -#include <stdlib.h> +#include <unistd.h> Engine::~Engine() { diff --git a/Userland/Games/Chess/main.cpp b/Userland/Games/Chess/main.cpp index 7f01004eaa..540cfe5587 100644 --- a/Userland/Games/Chess/main.cpp +++ b/Userland/Games/Chess/main.cpp @@ -36,6 +36,7 @@ #include <LibGUI/MenuBar.h> #include <LibGUI/MessageBox.h> #include <LibGUI/Window.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Games/Conway/main.cpp b/Userland/Games/Conway/main.cpp index d266d3bfdb..f103cabfbb 100644 --- a/Userland/Games/Conway/main.cpp +++ b/Userland/Games/Conway/main.cpp @@ -31,6 +31,7 @@ #include <LibGUI/MenuBar.h> #include <LibGUI/Window.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Games/Minesweeper/main.cpp b/Userland/Games/Minesweeper/main.cpp index 3247194abc..2541234426 100644 --- a/Userland/Games/Minesweeper/main.cpp +++ b/Userland/Games/Minesweeper/main.cpp @@ -37,6 +37,7 @@ #include <LibGUI/MenuBar.h> #include <LibGUI/Window.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Games/Pong/main.cpp b/Userland/Games/Pong/main.cpp index 0af4776b45..34ebe0f239 100644 --- a/Userland/Games/Pong/main.cpp +++ b/Userland/Games/Pong/main.cpp @@ -32,6 +32,7 @@ #include <LibGUI/MenuBar.h> #include <LibGUI/Window.h> #include <LibGfx/Bitmap.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Games/Snake/main.cpp b/Userland/Games/Snake/main.cpp index a3156c4c38..e48de628c3 100644 --- a/Userland/Games/Snake/main.cpp +++ b/Userland/Games/Snake/main.cpp @@ -35,6 +35,7 @@ #include <LibGUI/MenuBar.h> #include <LibGUI/Window.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Libraries/LibC/cxxabi.cpp b/Userland/Libraries/LibC/cxxabi.cpp index 073956c189..064c39d87d 100644 --- a/Userland/Libraries/LibC/cxxabi.cpp +++ b/Userland/Libraries/LibC/cxxabi.cpp @@ -25,12 +25,13 @@ */ #include <AK/Debug.h> -#include <AK/LogStream.h> +#include <AK/Format.h> #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <sys/internals.h> #include <sys/mman.h> +#include <unistd.h> extern "C" { diff --git a/Userland/Libraries/LibC/dlfcn.cpp b/Userland/Libraries/LibC/dlfcn.cpp index 9565246406..df6d8680ef 100644 --- a/Userland/Libraries/LibC/dlfcn.cpp +++ b/Userland/Libraries/LibC/dlfcn.cpp @@ -29,13 +29,11 @@ #include <AK/RefPtr.h> #include <AK/ScopeGuard.h> #include <AK/String.h> -#include <AK/StringBuilder.h> #include <LibELF/DynamicLoader.h> #include <assert.h> #include <dlfcn.h> #include <fcntl.h> -#include <stdio.h> -#include <stdlib.h> +#include <unistd.h> // NOTE: The string here should never include a trailing newline (according to POSIX) String g_dlerror_msg; diff --git a/Userland/Libraries/LibC/locale.cpp b/Userland/Libraries/LibC/locale.cpp index d4c5401a24..7524d33e8b 100644 --- a/Userland/Libraries/LibC/locale.cpp +++ b/Userland/Libraries/LibC/locale.cpp @@ -24,7 +24,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <AK/LogStream.h> #include <assert.h> #include <locale.h> #include <stdio.h> diff --git a/Userland/Libraries/LibC/malloc.cpp b/Userland/Libraries/LibC/malloc.cpp index 6115e6146a..5df71f1dc7 100644 --- a/Userland/Libraries/LibC/malloc.cpp +++ b/Userland/Libraries/LibC/malloc.cpp @@ -26,7 +26,6 @@ #include <AK/Debug.h> #include <AK/InlineLinkedList.h> -#include <AK/LogStream.h> #include <AK/ScopedValueRollback.h> #include <AK/Vector.h> #include <LibELF/AuxiliaryVector.h> diff --git a/Userland/Libraries/LibC/scanf.cpp b/Userland/Libraries/LibC/scanf.cpp index 13f306d5aa..7e517c970c 100644 --- a/Userland/Libraries/LibC/scanf.cpp +++ b/Userland/Libraries/LibC/scanf.cpp @@ -25,8 +25,8 @@ */ #include <AK/Assertions.h> +#include <AK/Format.h> #include <AK/GenericLexer.h> -#include <AK/LogStream.h> #include <AK/StdLibExtras.h> #include <ctype.h> #include <stdarg.h> diff --git a/Userland/Libraries/LibC/stdio.cpp b/Userland/Libraries/LibC/stdio.cpp index a4d4700818..56e74dd5cb 100644 --- a/Userland/Libraries/LibC/stdio.cpp +++ b/Userland/Libraries/LibC/stdio.cpp @@ -1048,10 +1048,9 @@ void dbgputch(char ch) syscall(SC_dbgputch, ch); } -int dbgputstr(const char* characters, ssize_t length) +void dbgputstr(const char* characters, size_t length) { - int rc = syscall(SC_dbgputstr, characters, length); - __RETURN_WITH_ERRNO(rc, rc, -1); + syscall(SC_dbgputstr, characters, length); } char* tmpnam(char*) diff --git a/Userland/Libraries/LibC/stdio.h b/Userland/Libraries/LibC/stdio.h index cc76741d0b..018c57fe47 100644 --- a/Userland/Libraries/LibC/stdio.h +++ b/Userland/Libraries/LibC/stdio.h @@ -94,7 +94,7 @@ int vsnprintf(char* buffer, size_t, const char* fmt, va_list) __attribute__((for int fprintf(FILE*, const char* fmt, ...) __attribute__((format(printf, 2, 3))); int printf(const char* fmt, ...) __attribute__((format(printf, 1, 2))); void dbgputch(char); -int dbgputstr(const char*, ssize_t); +void dbgputstr(const char*, size_t); int sprintf(char* buffer, const char* fmt, ...) __attribute__((format(printf, 2, 3))); int snprintf(char* buffer, size_t, const char* fmt, ...) __attribute__((format(printf, 3, 4))); int putchar(int ch); diff --git a/Userland/Libraries/LibC/sys/ptrace.cpp b/Userland/Libraries/LibC/sys/ptrace.cpp index f285ef5bb5..b53bb48465 100644 --- a/Userland/Libraries/LibC/sys/ptrace.cpp +++ b/Userland/Libraries/LibC/sys/ptrace.cpp @@ -24,7 +24,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <AK/LogStream.h> #include <errno.h> #include <sys/ptrace.h> #include <syscall.h> diff --git a/Userland/Libraries/LibChess/Chess.cpp b/Userland/Libraries/LibChess/Chess.cpp index 3bce22f647..bc88616055 100644 --- a/Userland/Libraries/LibChess/Chess.cpp +++ b/Userland/Libraries/LibChess/Chess.cpp @@ -25,7 +25,6 @@ */ #include <AK/Assertions.h> -#include <AK/LogStream.h> #include <AK/String.h> #include <AK/StringBuilder.h> #include <AK/Vector.h> diff --git a/Userland/Libraries/LibCompress/Deflate.cpp b/Userland/Libraries/LibCompress/Deflate.cpp index 54f7911ec3..2340630033 100644 --- a/Userland/Libraries/LibCompress/Deflate.cpp +++ b/Userland/Libraries/LibCompress/Deflate.cpp @@ -27,7 +27,6 @@ #include <AK/Array.h> #include <AK/Assertions.h> #include <AK/BinarySearch.h> -#include <AK/LogStream.h> #include <AK/MemoryStream.h> #include <LibCompress/Deflate.h> diff --git a/Userland/Libraries/LibCore/Account.cpp b/Userland/Libraries/LibCore/Account.cpp index efe0120033..1e999d6629 100644 --- a/Userland/Libraries/LibCore/Account.cpp +++ b/Userland/Libraries/LibCore/Account.cpp @@ -29,6 +29,7 @@ #include <AK/ScopeGuard.h> #include <LibCore/Account.h> #include <LibCore/File.h> +#include <errno.h> #include <grp.h> #include <pwd.h> #include <stdio.h> diff --git a/Userland/Libraries/LibCore/Command.cpp b/Userland/Libraries/LibCore/Command.cpp index d75a645777..ea5764bb01 100644 --- a/Userland/Libraries/LibCore/Command.cpp +++ b/Userland/Libraries/LibCore/Command.cpp @@ -26,7 +26,7 @@ #include "Command.h" #include <AK/ByteBuffer.h> -#include <AK/LogStream.h> +#include <AK/Format.h> #include <AK/ScopeGuard.h> #include <LibCore/File.h> #include <fcntl.h> diff --git a/Userland/Libraries/LibCore/DateTime.cpp b/Userland/Libraries/LibCore/DateTime.cpp index 804abac3de..4e9a8ec345 100644 --- a/Userland/Libraries/LibCore/DateTime.cpp +++ b/Userland/Libraries/LibCore/DateTime.cpp @@ -255,9 +255,4 @@ bool DateTime::is_before(const String& other) const return __builtin_strcasecmp(now_string.characters(), other.characters()) < 0; } -const LogStream& operator<<(const LogStream& stream, const DateTime& value) -{ - return stream << value.to_string(); -} - } diff --git a/Userland/Libraries/LibCore/DateTime.h b/Userland/Libraries/LibCore/DateTime.h index 15515cc0fd..9101a9306a 100644 --- a/Userland/Libraries/LibCore/DateTime.h +++ b/Userland/Libraries/LibCore/DateTime.h @@ -69,6 +69,4 @@ private: unsigned m_second { 0 }; }; -const LogStream& operator<<(const LogStream&, const DateTime&); - } diff --git a/Userland/Libraries/LibCore/DirIterator.cpp b/Userland/Libraries/LibCore/DirIterator.cpp index 3dbeecf24f..83d4f32786 100644 --- a/Userland/Libraries/LibCore/DirIterator.cpp +++ b/Userland/Libraries/LibCore/DirIterator.cpp @@ -27,6 +27,7 @@ #include <AK/Vector.h> #include <LibCore/DirIterator.h> #include <errno.h> +#include <unistd.h> namespace Core { diff --git a/Userland/Libraries/LibCore/FileWatcher.cpp b/Userland/Libraries/LibCore/FileWatcher.cpp index 70ed9928bc..46db6686d6 100644 --- a/Userland/Libraries/LibCore/FileWatcher.cpp +++ b/Userland/Libraries/LibCore/FileWatcher.cpp @@ -40,6 +40,7 @@ #include <fcntl.h> #include <string.h> #include <sys/stat.h> +#include <unistd.h> namespace Core { diff --git a/Userland/Libraries/LibCore/GetPassword.cpp b/Userland/Libraries/LibCore/GetPassword.cpp index 88bb27345a..98c3ab0ed3 100644 --- a/Userland/Libraries/LibCore/GetPassword.cpp +++ b/Userland/Libraries/LibCore/GetPassword.cpp @@ -29,6 +29,7 @@ #include <stdio.h> #include <stdlib.h> #include <termios.h> +#include <unistd.h> namespace Core { diff --git a/Userland/Libraries/LibCore/Object.cpp b/Userland/Libraries/LibCore/Object.cpp index 800f557384..854467a356 100644 --- a/Userland/Libraries/LibCore/Object.cpp +++ b/Userland/Libraries/LibCore/Object.cpp @@ -262,9 +262,4 @@ void Object::register_property(const String& name, Function<JsonValue()> getter, m_properties.set(name, make<Property>(name, move(getter), move(setter))); } -const LogStream& operator<<(const LogStream& stream, const Object& object) -{ - return stream << object.class_name() << '{' << &object << '}'; -} - } diff --git a/Userland/Libraries/LibCore/Object.h b/Userland/Libraries/LibCore/Object.h index d5dcefd01f..6295d1d75b 100644 --- a/Userland/Libraries/LibCore/Object.h +++ b/Userland/Libraries/LibCore/Object.h @@ -223,8 +223,6 @@ T* Object::find_descendant_of_type_named(const String& name) requires IsBaseOf<O return found_child; } -const LogStream& operator<<(const LogStream&, const Object&); - #define REGISTER_INT_PROPERTY(property_name, getter, setter) \ register_property( \ property_name, \ diff --git a/Userland/Libraries/LibCore/SocketAddress.cpp b/Userland/Libraries/LibCore/SocketAddress.cpp index d4d451a150..e69de29bb2 100644 --- a/Userland/Libraries/LibCore/SocketAddress.cpp +++ b/Userland/Libraries/LibCore/SocketAddress.cpp @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2020, Andreas Kling <kling@serenityos.org> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <LibCore/SocketAddress.h> - -namespace Core { - -const LogStream& operator<<(const LogStream& stream, const SocketAddress& value) -{ - return stream << value.to_string(); -} - -} diff --git a/Userland/Libraries/LibCore/SocketAddress.h b/Userland/Libraries/LibCore/SocketAddress.h index 695fa361aa..87f7d8b63e 100644 --- a/Userland/Libraries/LibCore/SocketAddress.h +++ b/Userland/Libraries/LibCore/SocketAddress.h @@ -110,8 +110,6 @@ private: String m_local_address; }; -const LogStream& operator<<(const LogStream&, const SocketAddress&); - } template<> diff --git a/Userland/Libraries/LibCore/SyscallUtils.h b/Userland/Libraries/LibCore/SyscallUtils.h index 9fd8009c8b..07ca9f0aa4 100644 --- a/Userland/Libraries/LibCore/SyscallUtils.h +++ b/Userland/Libraries/LibCore/SyscallUtils.h @@ -27,7 +27,6 @@ #pragma once #include <AK/Debug.h> -#include <AK/LogStream.h> #include <AK/StdLibExtras.h> #include <errno.h> #include <string.h> diff --git a/Userland/Libraries/LibCore/TCPServer.cpp b/Userland/Libraries/LibCore/TCPServer.cpp index 79fe6f468e..3d0cc97025 100644 --- a/Userland/Libraries/LibCore/TCPServer.cpp +++ b/Userland/Libraries/LibCore/TCPServer.cpp @@ -31,6 +31,7 @@ #include <LibCore/TCPSocket.h> #include <stdio.h> #include <sys/socket.h> +#include <unistd.h> #ifndef SOCK_NONBLOCK # include <fcntl.h> diff --git a/Userland/Libraries/LibCore/UDPServer.cpp b/Userland/Libraries/LibCore/UDPServer.cpp index fd68490b77..c92aaec399 100644 --- a/Userland/Libraries/LibCore/UDPServer.cpp +++ b/Userland/Libraries/LibCore/UDPServer.cpp @@ -29,6 +29,7 @@ #include <LibCore/Notifier.h> #include <LibCore/UDPServer.h> #include <LibCore/UDPSocket.h> +#include <errno.h> #include <stdio.h> #include <unistd.h> diff --git a/Userland/Libraries/LibCpp/AST.cpp b/Userland/Libraries/LibCpp/AST.cpp index ffb7d6d70b..8c41c596d5 100644 --- a/Userland/Libraries/LibCpp/AST.cpp +++ b/Userland/Libraries/LibCpp/AST.cpp @@ -25,7 +25,6 @@ */ #include "AST.h" -#include "AK/LogStream.h" namespace Cpp { diff --git a/Userland/Libraries/LibCpp/Parser.cpp b/Userland/Libraries/LibCpp/Parser.cpp index 7bbffe7276..6b923d4958 100644 --- a/Userland/Libraries/LibCpp/Parser.cpp +++ b/Userland/Libraries/LibCpp/Parser.cpp @@ -29,7 +29,6 @@ #endif #include "Parser.h" -#include "AK/LogStream.h" #include "AST.h" #include <AK/Debug.h> #include <AK/ScopeGuard.h> diff --git a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h index 753a27c47c..77ed86d634 100644 --- a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h +++ b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h @@ -141,20 +141,6 @@ struct SignedDivisionResult { } -inline const LogStream& -operator<<(const LogStream& stream, const Crypto::SignedBigInteger value) -{ - if (value.is_invalid()) { - stream << "Invalid BigInt"; - return stream; - } - if (value.is_negative()) - stream << "-"; - - stream << value.unsigned_value(); - return stream; -} - inline Crypto::SignedBigInteger operator""_sbigint(const char* string, size_t length) { diff --git a/Userland/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h b/Userland/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h index becae66749..51c1d9f776 100644 --- a/Userland/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h +++ b/Userland/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h @@ -27,7 +27,6 @@ #pragma once #include <AK/ByteBuffer.h> -#include <AK/LogStream.h> #include <AK/Span.h> #include <AK/String.h> #include <AK/Types.h> @@ -131,19 +130,6 @@ struct UnsignedDivisionResult { } -inline const LogStream& -operator<<(const LogStream& stream, const Crypto::UnsignedBigInteger& value) -{ - if (value.is_invalid()) { - stream << "Invalid BigInt"; - return stream; - } - for (int i = value.length() - 1; i >= 0; --i) { - stream << value.words()[i] << "|"; - } - return stream; -} - template<> struct AK::Formatter<Crypto::UnsignedBigInteger> : Formatter<StringView> { void format(FormatBuilder&, const Crypto::UnsignedBigInteger&); diff --git a/Userland/Libraries/LibCrypto/Checksum/CRC32.h b/Userland/Libraries/LibCrypto/Checksum/CRC32.h index df6d17ec16..a3a9b1150e 100644 --- a/Userland/Libraries/LibCrypto/Checksum/CRC32.h +++ b/Userland/Libraries/LibCrypto/Checksum/CRC32.h @@ -26,7 +26,6 @@ #pragma once -#include <AK/LogStream.h> #include <AK/Span.h> #include <AK/Types.h> #include <LibCrypto/Checksum/ChecksumFunction.h> diff --git a/Userland/Libraries/LibELF/DynamicLinker.cpp b/Userland/Libraries/LibELF/DynamicLinker.cpp index 89fa43ac17..a598fe8c56 100644 --- a/Userland/Libraries/LibELF/DynamicLinker.cpp +++ b/Userland/Libraries/LibELF/DynamicLinker.cpp @@ -30,7 +30,6 @@ #include <AK/HashMap.h> #include <AK/HashTable.h> #include <AK/LexicalPath.h> -#include <AK/LogStream.h> #include <AK/NonnullRefPtrVector.h> #include <AK/ScopeGuard.h> #include <LibC/mman.h> diff --git a/Userland/Libraries/LibELF/DynamicLoader.cpp b/Userland/Libraries/LibELF/DynamicLoader.cpp index 682da8642b..b019063911 100644 --- a/Userland/Libraries/LibELF/DynamicLoader.cpp +++ b/Userland/Libraries/LibELF/DynamicLoader.cpp @@ -40,6 +40,7 @@ #include <string.h> #include <sys/mman.h> #include <sys/stat.h> +#include <unistd.h> #ifndef __serenity__ static void* mmap_with_name(void* addr, size_t length, int prot, int flags, int fd, off_t offset, const char*) diff --git a/Userland/Libraries/LibGUI/FileIconProvider.cpp b/Userland/Libraries/LibGUI/FileIconProvider.cpp index ed585e9dc2..a56d638699 100644 --- a/Userland/Libraries/LibGUI/FileIconProvider.cpp +++ b/Userland/Libraries/LibGUI/FileIconProvider.cpp @@ -28,7 +28,6 @@ #include <AK/MappedFile.h> #include <AK/String.h> #include <LibCore/ConfigFile.h> -#include <LibCore/DirIterator.h> #include <LibCore/File.h> #include <LibCore/StandardPaths.h> #include <LibELF/Image.h> @@ -38,6 +37,7 @@ #include <LibGfx/Bitmap.h> #include <LibGfx/PNGLoader.h> #include <sys/stat.h> +#include <unistd.h> namespace GUI { diff --git a/Userland/Libraries/LibGUI/ModelIndex.cpp b/Userland/Libraries/LibGUI/ModelIndex.cpp index 038974d1d4..bde5177596 100644 --- a/Userland/Libraries/LibGUI/ModelIndex.cpp +++ b/Userland/Libraries/LibGUI/ModelIndex.cpp @@ -39,11 +39,4 @@ Variant ModelIndex::data(ModelRole role) const return model()->data(*this, role); } -const LogStream& operator<<(const LogStream& stream, const ModelIndex& value) -{ - if (value.internal_data()) - return stream << String::formatted("ModelIndex({},{},{:p})", value.row(), value.column(), value.internal_data()); - return stream << String::formatted("ModelIndex({},{})", value.row(), value.column()); -} - } diff --git a/Userland/Libraries/LibGUI/ModelIndex.h b/Userland/Libraries/LibGUI/ModelIndex.h index 4d6d49a92b..9a1ff1d6fd 100644 --- a/Userland/Libraries/LibGUI/ModelIndex.h +++ b/Userland/Libraries/LibGUI/ModelIndex.h @@ -76,8 +76,6 @@ private: void* m_internal_data { nullptr }; }; -const LogStream& operator<<(const LogStream&, const ModelIndex&); - } namespace AK { diff --git a/Userland/Libraries/LibGUI/TextPosition.h b/Userland/Libraries/LibGUI/TextPosition.h index 47ccc71e47..c744307d93 100644 --- a/Userland/Libraries/LibGUI/TextPosition.h +++ b/Userland/Libraries/LibGUI/TextPosition.h @@ -26,7 +26,6 @@ #pragma once -#include <AK/LogStream.h> #include <AK/String.h> namespace GUI { @@ -57,13 +56,6 @@ private: size_t m_column { 0xffffffff }; }; -inline const LogStream& operator<<(const LogStream& stream, const TextPosition& value) -{ - if (!value.is_valid()) - return stream << "GUI::TextPosition(Invalid)"; - return stream << String::formatted("({},{})", value.line(), value.column()); -} - } template<> diff --git a/Userland/Libraries/LibGUI/TextRange.h b/Userland/Libraries/LibGUI/TextRange.h index ea6918c0f4..55e5378d52 100644 --- a/Userland/Libraries/LibGUI/TextRange.h +++ b/Userland/Libraries/LibGUI/TextRange.h @@ -26,7 +26,6 @@ #pragma once -#include <AK/LogStream.h> #include <LibGUI/TextPosition.h> namespace GUI { @@ -85,13 +84,6 @@ private: TextPosition m_end; }; -inline const LogStream& operator<<(const LogStream& stream, const TextRange& value) -{ - if (!value.is_valid()) - return stream << "GUI::TextRange(Invalid)"; - return stream << value.start() << '-' << value.end(); -} - } template<> diff --git a/Userland/Libraries/LibGfx/AffineTransform.cpp b/Userland/Libraries/LibGfx/AffineTransform.cpp index 29236b83f0..0f4bca708e 100644 --- a/Userland/Libraries/LibGfx/AffineTransform.cpp +++ b/Userland/Libraries/LibGfx/AffineTransform.cpp @@ -24,7 +24,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <AK/LogStream.h> #include <AK/Optional.h> #include <LibGfx/AffineTransform.h> #include <LibGfx/Rect.h> @@ -158,18 +157,4 @@ IntRect AffineTransform::map(const IntRect& rect) const return enclosing_int_rect(map(FloatRect(rect))); } -const LogStream& operator<<(const LogStream& stream, const AffineTransform& value) -{ - if (value.is_identity()) - return stream << "{ Identity }"; - - return stream << "{ " - << value.a() << ", " - << value.b() << ", " - << value.c() << ", " - << value.d() << ", " - << value.e() << ", " - << value.f() << " }"; -} - } diff --git a/Userland/Libraries/LibGfx/AffineTransform.h b/Userland/Libraries/LibGfx/AffineTransform.h index 41334eb138..3155009e91 100644 --- a/Userland/Libraries/LibGfx/AffineTransform.h +++ b/Userland/Libraries/LibGfx/AffineTransform.h @@ -27,7 +27,6 @@ #pragma once #include <AK/Forward.h> -#include <AK/LogStream.h> #include <LibGfx/Forward.h> namespace Gfx { @@ -76,6 +75,4 @@ private: float m_values[6] { 0 }; }; -const LogStream& operator<<(const LogStream&, const AffineTransform&); - } diff --git a/Userland/Libraries/LibGfx/Color.cpp b/Userland/Libraries/LibGfx/Color.cpp index 20265dc43f..482e0bc0ad 100644 --- a/Userland/Libraries/LibGfx/Color.cpp +++ b/Userland/Libraries/LibGfx/Color.cpp @@ -328,10 +328,6 @@ Optional<Color> Color::from_string(const StringView& string) return Color(r.value(), g.value(), b.value(), a.value()); } -const LogStream& operator<<(const LogStream& stream, Color value) -{ - return stream << value.to_string(); -} } bool IPC::encode(IPC::Encoder& encoder, const Color& color) diff --git a/Userland/Libraries/LibGfx/Color.h b/Userland/Libraries/LibGfx/Color.h index 671c8caf5d..befaa2ed77 100644 --- a/Userland/Libraries/LibGfx/Color.h +++ b/Userland/Libraries/LibGfx/Color.h @@ -404,8 +404,6 @@ inline constexpr Color::Color(NamedColor named) m_value = 0xff000000 | (rgb.r << 16) | (rgb.g << 8) | rgb.b; } -const LogStream& operator<<(const LogStream&, Color); - } using Gfx::Color; diff --git a/Userland/Libraries/LibGfx/Path.h b/Userland/Libraries/LibGfx/Path.h index 81ebf2ccfb..0baf79e308 100644 --- a/Userland/Libraries/LibGfx/Path.h +++ b/Userland/Libraries/LibGfx/Path.h @@ -212,9 +212,4 @@ private: Optional<Gfx::FloatRect> m_bounding_box; }; -inline const LogStream& operator<<(const LogStream& stream, const Path& path) -{ - return stream << path.to_string(); -} - } diff --git a/Userland/Libraries/LibGfx/Point.h b/Userland/Libraries/LibGfx/Point.h index be6a71e149..526cbf6279 100644 --- a/Userland/Libraries/LibGfx/Point.h +++ b/Userland/Libraries/LibGfx/Point.h @@ -228,12 +228,6 @@ private: T m_y { 0 }; }; -template<typename T> -const LogStream& operator<<(const LogStream& stream, const Point<T>& point) -{ - return stream << point.to_string(); -} - using IntPoint = Point<int>; using FloatPoint = Point<float>; diff --git a/Userland/Libraries/LibGfx/Rect.h b/Userland/Libraries/LibGfx/Rect.h index 082b1f7800..4cba04fff0 100644 --- a/Userland/Libraries/LibGfx/Rect.h +++ b/Userland/Libraries/LibGfx/Rect.h @@ -478,12 +478,6 @@ private: Size<T> m_size; }; -template<typename T> -const LogStream& operator<<(const LogStream& stream, const Rect<T>& rect) -{ - return stream << rect.to_string(); -} - using IntRect = Rect<int>; using FloatRect = Rect<float>; diff --git a/Userland/Libraries/LibGfx/Size.h b/Userland/Libraries/LibGfx/Size.h index 67321a4a2d..fd45dd51fb 100644 --- a/Userland/Libraries/LibGfx/Size.h +++ b/Userland/Libraries/LibGfx/Size.h @@ -150,12 +150,6 @@ private: T m_height { 0 }; }; -template<typename T> -const LogStream& operator<<(const LogStream& stream, const Gfx::Size<T>& size) -{ - return stream << size.to_string(); -} - using IntSize = Size<int>; using FloatSize = Size<float>; diff --git a/Userland/Libraries/LibGfx/Triangle.cpp b/Userland/Libraries/LibGfx/Triangle.cpp index d326b59f1c..d45bea096b 100644 --- a/Userland/Libraries/LibGfx/Triangle.cpp +++ b/Userland/Libraries/LibGfx/Triangle.cpp @@ -34,9 +34,4 @@ String Triangle::to_string() const return String::formatted("({},{},{})", m_a, m_b, m_c); } -const LogStream& operator<<(const LogStream& stream, const Triangle& value) -{ - return stream << value.to_string(); -} - } diff --git a/Userland/Libraries/LibGfx/Triangle.h b/Userland/Libraries/LibGfx/Triangle.h index 7d8e69e80d..294a7f914d 100644 --- a/Userland/Libraries/LibGfx/Triangle.h +++ b/Userland/Libraries/LibGfx/Triangle.h @@ -76,6 +76,4 @@ private: IntPoint m_c; }; -const LogStream& operator<<(const LogStream&, const Triangle&); - } diff --git a/Userland/Libraries/LibLine/Editor.cpp b/Userland/Libraries/LibLine/Editor.cpp index 15ec22f05d..aa92c3c73d 100644 --- a/Userland/Libraries/LibLine/Editor.cpp +++ b/Userland/Libraries/LibLine/Editor.cpp @@ -30,6 +30,7 @@ #include <AK/GenericLexer.h> #include <AK/JsonObject.h> #include <AK/ScopeGuard.h> +#include <AK/ScopedValueRollback.h> #include <AK/StringBuilder.h> #include <AK/Utf32View.h> #include <AK/Utf8View.h> @@ -39,6 +40,7 @@ #include <LibCore/File.h> #include <LibCore/Notifier.h> #include <ctype.h> +#include <errno.h> #include <signal.h> #include <stdio.h> #include <sys/ioctl.h> diff --git a/Userland/Libraries/LibLine/InternalFunctions.cpp b/Userland/Libraries/LibLine/InternalFunctions.cpp index 162e01dbee..015754c0b0 100644 --- a/Userland/Libraries/LibLine/InternalFunctions.cpp +++ b/Userland/Libraries/LibLine/InternalFunctions.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <AK/ScopedValueRollback.h> #include <AK/StringBuilder.h> #include <AK/TemporaryChange.h> #include <LibLine/Editor.h> diff --git a/Userland/Libraries/LibRegex/RegexLexer.cpp b/Userland/Libraries/LibRegex/RegexLexer.cpp index c7bd1194c5..8b0b155da3 100644 --- a/Userland/Libraries/LibRegex/RegexLexer.cpp +++ b/Userland/Libraries/LibRegex/RegexLexer.cpp @@ -27,7 +27,6 @@ #include "RegexLexer.h" #include <AK/Assertions.h> #include <AK/Debug.h> -#include <AK/LogStream.h> #include <stdio.h> namespace regex { diff --git a/Userland/Libraries/LibTLS/TLSv12.cpp b/Userland/Libraries/LibTLS/TLSv12.cpp index 587996f662..6b61234b30 100644 --- a/Userland/Libraries/LibTLS/TLSv12.cpp +++ b/Userland/Libraries/LibTLS/TLSv12.cpp @@ -33,6 +33,7 @@ #include <LibCrypto/ASN1/PEM.h> #include <LibCrypto/PK/Code/EMSA_PSS.h> #include <LibTLS/TLSv12.h> +#include <errno.h> #ifndef SOCK_NONBLOCK # include <sys/ioctl.h> diff --git a/Userland/Libraries/LibTTF/Font.cpp b/Userland/Libraries/LibTTF/Font.cpp index 03c6c92cdd..67c85a7767 100644 --- a/Userland/Libraries/LibTTF/Font.cpp +++ b/Userland/Libraries/LibTTF/Font.cpp @@ -26,7 +26,6 @@ #include "AK/ByteBuffer.h" #include <AK/Checked.h> -#include <AK/LogStream.h> #include <AK/Utf32View.h> #include <AK/Utf8View.h> #include <LibCore/File.h> diff --git a/Userland/Libraries/LibTar/TarStream.cpp b/Userland/Libraries/LibTar/TarStream.cpp index 30654dc607..ca4f60ada3 100644 --- a/Userland/Libraries/LibTar/TarStream.cpp +++ b/Userland/Libraries/LibTar/TarStream.cpp @@ -24,7 +24,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <AK/LogStream.h> #include <LibTar/TarStream.h> namespace Tar { diff --git a/Userland/Libraries/LibWeb/CSS/Length.h b/Userland/Libraries/LibWeb/CSS/Length.h index 78ee24f5de..322d741227 100644 --- a/Userland/Libraries/LibWeb/CSS/Length.h +++ b/Userland/Libraries/LibWeb/CSS/Length.h @@ -173,9 +173,4 @@ private: float m_value { 0 }; }; -inline const LogStream& operator<<(const LogStream& stream, const Length& value) -{ - return stream << value.to_string(); -} - } diff --git a/Userland/Libraries/LibWeb/DumpLayoutTree/main.cpp b/Userland/Libraries/LibWeb/DumpLayoutTree/main.cpp index 2ce6a6bd71..10fe41f64a 100644 --- a/Userland/Libraries/LibWeb/DumpLayoutTree/main.cpp +++ b/Userland/Libraries/LibWeb/DumpLayoutTree/main.cpp @@ -30,6 +30,7 @@ #include <LibWeb/Dump.h> #include <LibWeb/InProcessWebView.h> #include <LibWeb/Layout/InitialContainingBlockBox.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/MenuApplets/ClipboardHistory/main.cpp b/Userland/MenuApplets/ClipboardHistory/main.cpp index 6275296745..f6f596cd53 100644 --- a/Userland/MenuApplets/ClipboardHistory/main.cpp +++ b/Userland/MenuApplets/ClipboardHistory/main.cpp @@ -32,6 +32,7 @@ #include <LibGUI/TableView.h> #include <LibGUI/Window.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char* argv[]) { diff --git a/Userland/MenuApplets/UserName/main.cpp b/Userland/MenuApplets/UserName/main.cpp index ac841ae21b..138d2bbc92 100644 --- a/Userland/MenuApplets/UserName/main.cpp +++ b/Userland/MenuApplets/UserName/main.cpp @@ -28,10 +28,10 @@ #include <LibGUI/Painter.h> #include <LibGUI/Widget.h> #include <LibGUI/Window.h> -#include <LibGfx/Font.h> #include <LibGfx/FontDatabase.h> #include <LibGfx/Palette.h> #include <stdio.h> +#include <unistd.h> class UserNameWidget final : public GUI::Widget { C_OBJECT(UserNameWidget) diff --git a/Userland/Services/ChessEngine/main.cpp b/Userland/Services/ChessEngine/main.cpp index 14d7b729a1..aac15d7f71 100644 --- a/Userland/Services/ChessEngine/main.cpp +++ b/Userland/Services/ChessEngine/main.cpp @@ -27,6 +27,7 @@ #include "ChessEngine.h" #include <LibCore/EventLoop.h> #include <LibCore/File.h> +#include <unistd.h> int main() { diff --git a/Userland/Services/DHCPClient/main.cpp b/Userland/Services/DHCPClient/main.cpp index 722cee2b2d..8def7ec954 100644 --- a/Userland/Services/DHCPClient/main.cpp +++ b/Userland/Services/DHCPClient/main.cpp @@ -35,6 +35,7 @@ #include <LibCore/LocalServer.h> #include <stdio.h> #include <string.h> +#include <unistd.h> static u8 mac_part(const Vector<String>& parts, size_t index) { diff --git a/Userland/Services/EchoServer/main.cpp b/Userland/Services/EchoServer/main.cpp index a4136c3df6..188240bbfa 100644 --- a/Userland/Services/EchoServer/main.cpp +++ b/Userland/Services/EchoServer/main.cpp @@ -30,9 +30,9 @@ #include <LibCore/ArgsParser.h> #include <LibCore/EventLoop.h> #include <LibCore/TCPServer.h> -#include <LibCore/TCPSocket.h> #include <stdio.h> #include <stdlib.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Services/LookupServer/main.cpp b/Userland/Services/LookupServer/main.cpp index 4d566ca8a9..855f825a69 100644 --- a/Userland/Services/LookupServer/main.cpp +++ b/Userland/Services/LookupServer/main.cpp @@ -28,6 +28,7 @@ #include <LibCore/EventLoop.h> #include <LibCore/LocalServer.h> #include <stdio.h> +#include <unistd.h> int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv) { diff --git a/Userland/Services/ProtocolServer/Protocol.cpp b/Userland/Services/ProtocolServer/Protocol.cpp index de4a4e8a49..8ff46138e6 100644 --- a/Userland/Services/ProtocolServer/Protocol.cpp +++ b/Userland/Services/ProtocolServer/Protocol.cpp @@ -26,8 +26,10 @@ #include <AK/HashMap.h> #include <ProtocolServer/Protocol.h> +#include <errno.h> #include <fcntl.h> #include <string.h> +#include <unistd.h> namespace ProtocolServer { diff --git a/Userland/Services/Taskbar/main.cpp b/Userland/Services/Taskbar/main.cpp index e6ee5d2b25..f86c0a114b 100644 --- a/Userland/Services/Taskbar/main.cpp +++ b/Userland/Services/Taskbar/main.cpp @@ -30,6 +30,7 @@ #include <signal.h> #include <stdio.h> #include <sys/wait.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Services/TelnetServer/main.cpp b/Userland/Services/TelnetServer/main.cpp index 3adda4b83a..ed7b778647 100644 --- a/Userland/Services/TelnetServer/main.cpp +++ b/Userland/Services/TelnetServer/main.cpp @@ -27,9 +27,7 @@ #include "Client.h" #include <AK/ByteBuffer.h> #include <AK/HashMap.h> -#include <AK/IPv4Address.h> #include <AK/String.h> -#include <AK/StringBuilder.h> #include <AK/Types.h> #include <LibCore/ArgsParser.h> #include <LibCore/EventLoop.h> @@ -39,6 +37,7 @@ #include <stdio.h> #include <stdlib.h> #include <sys/ioctl.h> +#include <unistd.h> static void run_command(int ptm_fd, String command) { diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp index e86f204da8..1a9e46dee4 100644 --- a/Userland/Services/WindowServer/WindowManager.cpp +++ b/Userland/Services/WindowServer/WindowManager.cpp @@ -32,7 +32,6 @@ #include "MenuItem.h" #include "Screen.h" #include "Window.h" -#include <AK/LogStream.h> #include <AK/StdLibExtras.h> #include <AK/Vector.h> #include <LibGfx/Bitmap.h> diff --git a/Userland/Services/WindowServer/main.cpp b/Userland/Services/WindowServer/main.cpp index 6e5898f27c..28957ac75a 100644 --- a/Userland/Services/WindowServer/main.cpp +++ b/Userland/Services/WindowServer/main.cpp @@ -35,6 +35,7 @@ #include <signal.h> #include <stdio.h> #include <string.h> +#include <unistd.h> int main(int, char**) { diff --git a/Userland/Shell/AST.cpp b/Userland/Shell/AST.cpp index e53c2151c1..02c873e241 100644 --- a/Userland/Shell/AST.cpp +++ b/Userland/Shell/AST.cpp @@ -28,13 +28,16 @@ #include "Shell.h" #include <AK/MemoryStream.h> #include <AK/ScopeGuard.h> +#include <AK/ScopedValueRollback.h> #include <AK/String.h> #include <AK/StringBuilder.h> #include <AK/URL.h> #include <LibCore/EventLoop.h> #include <LibCore/File.h> +#include <errno.h> #include <fcntl.h> #include <signal.h> +#include <unistd.h> void AK::Formatter<Shell::AST::Command>::format(FormatBuilder& builder, const Shell::AST::Command& value) { diff --git a/Userland/Shell/Builtin.cpp b/Userland/Shell/Builtin.cpp index 1eada40364..1c79d056e6 100644 --- a/Userland/Shell/Builtin.cpp +++ b/Userland/Shell/Builtin.cpp @@ -31,6 +31,7 @@ #include <LibCore/ArgsParser.h> #include <LibCore/EventLoop.h> #include <LibCore/File.h> +#include <errno.h> #include <inttypes.h> #include <signal.h> #include <sys/wait.h> diff --git a/Userland/Shell/Formatter.cpp b/Userland/Shell/Formatter.cpp index 43f6934011..2d7e0908d5 100644 --- a/Userland/Shell/Formatter.cpp +++ b/Userland/Shell/Formatter.cpp @@ -27,6 +27,7 @@ #include "Formatter.h" #include "AST.h" #include "Parser.h" +#include <AK/ScopedValueRollback.h> #include <AK/TemporaryChange.h> namespace Shell { diff --git a/Userland/Shell/Parser.cpp b/Userland/Shell/Parser.cpp index ab00dee599..c821400eb1 100644 --- a/Userland/Shell/Parser.cpp +++ b/Userland/Shell/Parser.cpp @@ -27,6 +27,7 @@ #include "Parser.h" #include "Shell.h" #include <AK/AllOf.h> +#include <AK/ScopedValueRollback.h> #include <AK/TemporaryChange.h> #include <ctype.h> #include <stdio.h> diff --git a/Userland/Shell/Shell.cpp b/Userland/Shell/Shell.cpp index 2273482d12..8459593fa8 100644 --- a/Userland/Shell/Shell.cpp +++ b/Userland/Shell/Shell.cpp @@ -31,6 +31,7 @@ #include <AK/Function.h> #include <AK/LexicalPath.h> #include <AK/ScopeGuard.h> +#include <AK/ScopedValueRollback.h> #include <AK/StringBuilder.h> #include <AK/TemporaryChange.h> #include <LibCore/ArgsParser.h> diff --git a/Userland/Shell/SyntaxHighlighter.cpp b/Userland/Shell/SyntaxHighlighter.cpp index c0f89613a4..eade317208 100644 --- a/Userland/Shell/SyntaxHighlighter.cpp +++ b/Userland/Shell/SyntaxHighlighter.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <AK/ScopedValueRollback.h> #include <AK/TemporaryChange.h> #include <LibGUI/TextEditor.h> #include <LibGfx/Font.h> diff --git a/Userland/Shell/main.cpp b/Userland/Shell/main.cpp index 581edd93c1..d5eb1bcbb0 100644 --- a/Userland/Shell/main.cpp +++ b/Userland/Shell/main.cpp @@ -24,16 +24,17 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "Execution.h" #include "Shell.h" #include <LibCore/ArgsParser.h> #include <LibCore/Event.h> #include <LibCore/EventLoop.h> #include <LibCore/File.h> +#include <errno.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> RefPtr<Line::Editor> editor; Shell::Shell* s_shell; diff --git a/Userland/Tests/Kernel/kill-pidtid-confusion.cpp b/Userland/Tests/Kernel/kill-pidtid-confusion.cpp index 0357ccdd23..e0fe32d414 100644 --- a/Userland/Tests/Kernel/kill-pidtid-confusion.cpp +++ b/Userland/Tests/Kernel/kill-pidtid-confusion.cpp @@ -25,11 +25,11 @@ */ #include <AK/Assertions.h> -#include <AK/LogStream.h> +#include <AK/Format.h> #include <LibPthread/pthread.h> -#include <fcntl.h> #include <signal.h> #include <stdio.h> +#include <stdlib.h> #include <unistd.h> /* diff --git a/Userland/Tests/Kernel/setpgid-across-sessions-without-leader.cpp b/Userland/Tests/Kernel/setpgid-across-sessions-without-leader.cpp index d13b83a478..540b39d6d3 100644 --- a/Userland/Tests/Kernel/setpgid-across-sessions-without-leader.cpp +++ b/Userland/Tests/Kernel/setpgid-across-sessions-without-leader.cpp @@ -25,7 +25,7 @@ */ #include <AK/Assertions.h> -#include <AK/LogStream.h> +#include <AK/Format.h> #include <fcntl.h> #include <serenity.h> #include <stdio.h> diff --git a/Userland/Tests/LibGfx/font.cpp b/Userland/Tests/LibGfx/font.cpp index a52e6c85eb..b4dfd692b4 100644 --- a/Userland/Tests/LibGfx/font.cpp +++ b/Userland/Tests/LibGfx/font.cpp @@ -28,7 +28,7 @@ #include <LibGfx/FontDatabase.h> #include <stdio.h> #include <stdlib.h> -#include <string.h> +#include <unistd.h> static void test_fontdatabase_get_by_name() { diff --git a/Userland/Utilities/adjtime.cpp b/Userland/Utilities/adjtime.cpp index 810421bc98..5f764f37c6 100644 --- a/Userland/Utilities/adjtime.cpp +++ b/Userland/Utilities/adjtime.cpp @@ -27,6 +27,7 @@ #include <LibCore/ArgsParser.h> #include <math.h> #include <sys/time.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Utilities/base64.cpp b/Userland/Utilities/base64.cpp index 030990c286..b973b3e7dc 100644 --- a/Userland/Utilities/base64.cpp +++ b/Userland/Utilities/base64.cpp @@ -26,12 +26,11 @@ #include <AK/Base64.h> #include <AK/ByteBuffer.h> -#include <AK/String.h> #include <LibCore/ArgsParser.h> #include <LibCore/File.h> #include <stdio.h> -#include <stdlib.h> #include <string.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Utilities/basename.cpp b/Userland/Utilities/basename.cpp index 65862f1072..5152ff847e 100644 --- a/Userland/Utilities/basename.cpp +++ b/Userland/Utilities/basename.cpp @@ -27,6 +27,7 @@ #include <AK/LexicalPath.h> #include <LibCore/ArgsParser.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Utilities/bt.cpp b/Userland/Utilities/bt.cpp index ea6f7fde7d..c2c5f1161a 100644 --- a/Userland/Utilities/bt.cpp +++ b/Userland/Utilities/bt.cpp @@ -25,7 +25,6 @@ */ #include <AK/LexicalPath.h> -#include <AK/LogStream.h> #include <LibCore/ArgsParser.h> #include <LibCore/EventLoop.h> #include <LibCore/File.h> diff --git a/Userland/Utilities/copy.cpp b/Userland/Utilities/copy.cpp index 2295703825..2ddeed72df 100644 --- a/Userland/Utilities/copy.cpp +++ b/Userland/Utilities/copy.cpp @@ -31,8 +31,7 @@ #include <LibCore/File.h> #include <LibGUI/Application.h> #include <LibGUI/Clipboard.h> -#include <stdio.h> -#include <stdlib.h> +#include <unistd.h> struct Options { String data; diff --git a/Userland/Utilities/crash.cpp b/Userland/Utilities/crash.cpp index 1aacf79aa3..cf815442d5 100644 --- a/Userland/Utilities/crash.cpp +++ b/Userland/Utilities/crash.cpp @@ -34,6 +34,7 @@ #include <sys/mman.h> #include <sys/wait.h> #include <syscall.h> +#include <unistd.h> #pragma GCC optimize("O0") diff --git a/Userland/Utilities/date.cpp b/Userland/Utilities/date.cpp index 057112a4c3..2be2adc29f 100644 --- a/Userland/Utilities/date.cpp +++ b/Userland/Utilities/date.cpp @@ -24,13 +24,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <AK/Optional.h> #include <AK/String.h> #include <LibCore/ArgsParser.h> #include <LibCore/DateTime.h> #include <stdio.h> -#include <string.h> #include <time.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Utilities/ddate.cpp b/Userland/Utilities/ddate.cpp index 763a5a3493..8018365a9b 100644 --- a/Userland/Utilities/ddate.cpp +++ b/Userland/Utilities/ddate.cpp @@ -27,6 +27,7 @@ #include <AK/String.h> #include <LibCore/DateTime.h> #include <stdio.h> +#include <unistd.h> class DiscordianDate { public: diff --git a/Userland/Utilities/disasm.cpp b/Userland/Utilities/disasm.cpp index 5f65c484be..b1dac22129 100644 --- a/Userland/Utilities/disasm.cpp +++ b/Userland/Utilities/disasm.cpp @@ -25,7 +25,6 @@ */ #include <AK/Debug.h> -#include <AK/LogStream.h> #include <AK/MappedFile.h> #include <AK/QuickSort.h> #include <AK/Vector.h> @@ -33,7 +32,6 @@ #include <LibELF/Image.h> #include <LibX86/Disassembler.h> #include <LibX86/ELFSymbolProvider.h> -#include <stdio.h> #include <string.h> int main(int argc, char** argv) diff --git a/Userland/Utilities/expr.cpp b/Userland/Utilities/expr.cpp index f96a67c8fa..42df5c5785 100644 --- a/Userland/Utilities/expr.cpp +++ b/Userland/Utilities/expr.cpp @@ -25,7 +25,6 @@ */ #include <AK/GenericLexer.h> -#include <AK/LogStream.h> #include <AK/NonnullOwnPtr.h> #include <AK/OwnPtr.h> #include <AK/Queue.h> diff --git a/Userland/Utilities/fortune.cpp b/Userland/Utilities/fortune.cpp index cbd1ee3315..e911b2a6ed 100644 --- a/Userland/Utilities/fortune.cpp +++ b/Userland/Utilities/fortune.cpp @@ -35,6 +35,7 @@ #include <LibCore/File.h> #include <stdio.h> #include <stdlib.h> +#include <unistd.h> class Quote { public: diff --git a/Userland/Utilities/functrace.cpp b/Userland/Utilities/functrace.cpp index 8cad0b6c8c..1bcbdcbbdb 100644 --- a/Userland/Utilities/functrace.cpp +++ b/Userland/Utilities/functrace.cpp @@ -28,7 +28,6 @@ #include <AK/ByteBuffer.h> #include <AK/Demangle.h> #include <AK/HashMap.h> -#include <AK/LogStream.h> #include <AK/NonnullOwnPtr.h> #include <AK/StringBuilder.h> #include <LibC/sys/arch/i386/regs.h> diff --git a/Userland/Utilities/gml-format.cpp b/Userland/Utilities/gml-format.cpp index 79ce530a32..cc72fffa7d 100644 --- a/Userland/Utilities/gml-format.cpp +++ b/Userland/Utilities/gml-format.cpp @@ -27,6 +27,7 @@ #include <LibCore/ArgsParser.h> #include <LibCore/File.h> #include <LibGUI/GMLFormatter.h> +#include <unistd.h> bool format_file(const StringView&, bool); diff --git a/Userland/Utilities/gron.cpp b/Userland/Utilities/gron.cpp index 38359d515d..5f529b76cb 100644 --- a/Userland/Utilities/gron.cpp +++ b/Userland/Utilities/gron.cpp @@ -32,6 +32,7 @@ #include <LibCore/File.h> #include <stdio.h> #include <string.h> +#include <unistd.h> static bool use_color = false; static void print(const String& name, const JsonValue&, Vector<String>& trail); diff --git a/Userland/Utilities/gunzip.cpp b/Userland/Utilities/gunzip.cpp index 8898cbae15..4f98f67b8e 100644 --- a/Userland/Utilities/gunzip.cpp +++ b/Userland/Utilities/gunzip.cpp @@ -27,6 +27,7 @@ #include <LibCompress/Gzip.h> #include <LibCore/ArgsParser.h> #include <LibCore/FileStream.h> +#include <unistd.h> static void decompress_file(Buffered<Core::InputFileStream>& input_stream, Buffered<Core::OutputFileStream>& output_stream) { diff --git a/Userland/Utilities/head.cpp b/Userland/Utilities/head.cpp index 132df61ee6..8ee9d050f1 100644 --- a/Userland/Utilities/head.cpp +++ b/Userland/Utilities/head.cpp @@ -28,8 +28,8 @@ #include <LibCore/ArgsParser.h> #include <errno.h> #include <stdio.h> -#include <stdlib.h> #include <string.h> +#include <unistd.h> int head(const String& filename, bool print_filename, int line_count, int char_count); diff --git a/Userland/Utilities/hexdump.cpp b/Userland/Utilities/hexdump.cpp index a4c4b04cb8..4547ceaa30 100644 --- a/Userland/Utilities/hexdump.cpp +++ b/Userland/Utilities/hexdump.cpp @@ -25,7 +25,6 @@ */ #include <AK/ByteBuffer.h> -#include <AK/LogStream.h> #include <LibCore/ArgsParser.h> #include <LibCore/File.h> #include <ctype.h> diff --git a/Userland/Utilities/html.cpp b/Userland/Utilities/html.cpp index b6e2524474..ec4da58e4e 100644 --- a/Userland/Utilities/html.cpp +++ b/Userland/Utilities/html.cpp @@ -35,6 +35,7 @@ #include <LibGfx/Bitmap.h> #include <LibWeb/OutOfProcessWebView.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Utilities/ini.cpp b/Userland/Utilities/ini.cpp index 5ac2c445a3..72d8f76f3a 100644 --- a/Userland/Utilities/ini.cpp +++ b/Userland/Utilities/ini.cpp @@ -28,6 +28,7 @@ #include <LibCore/ConfigFile.h> #include <LibCore/File.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Utilities/js.cpp b/Userland/Utilities/js.cpp index 2601ccf5c4..659c5b8c8b 100644 --- a/Userland/Utilities/js.cpp +++ b/Userland/Utilities/js.cpp @@ -58,6 +58,7 @@ #include <fcntl.h> #include <signal.h> #include <stdio.h> +#include <unistd.h> RefPtr<JS::VM> vm; Vector<String> repl_statements; diff --git a/Userland/Utilities/lsirq.cpp b/Userland/Utilities/lsirq.cpp index 82402cc1b8..48cf0a9ed3 100644 --- a/Userland/Utilities/lsirq.cpp +++ b/Userland/Utilities/lsirq.cpp @@ -27,9 +27,9 @@ #include <AK/ByteBuffer.h> #include <AK/JsonArray.h> #include <AK/JsonObject.h> -#include <AK/String.h> #include <LibCore/File.h> #include <stdio.h> +#include <unistd.h> int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv) { diff --git a/Userland/Utilities/lspci.cpp b/Userland/Utilities/lspci.cpp index 1055935c2e..e54e01c2e5 100644 --- a/Userland/Utilities/lspci.cpp +++ b/Userland/Utilities/lspci.cpp @@ -32,6 +32,7 @@ #include <LibCore/File.h> #include <LibPCIDB/Database.h> #include <stdio.h> +#include <unistd.h> static bool flag_show_numerical = false; diff --git a/Userland/Utilities/misbehaving-application.cpp b/Userland/Utilities/misbehaving-application.cpp index cee1ccab1c..1517b95597 100644 --- a/Userland/Utilities/misbehaving-application.cpp +++ b/Userland/Utilities/misbehaving-application.cpp @@ -26,7 +26,7 @@ #include <LibCore/EventLoop.h> #include <LibCore/Timer.h> -#include <stdio.h> +#include <unistd.h> int main(int, char**) { diff --git a/Userland/Utilities/mktemp.cpp b/Userland/Utilities/mktemp.cpp index c1b627ffca..3b6b962690 100644 --- a/Userland/Utilities/mktemp.cpp +++ b/Userland/Utilities/mktemp.cpp @@ -29,6 +29,7 @@ #include <stdio.h> #include <string.h> #include <sys/stat.h> +#include <unistd.h> constexpr const char* default_template = "tmp.XXXXXXXXXX"; diff --git a/Userland/Utilities/mv.cpp b/Userland/Utilities/mv.cpp index 2e7973f84f..41e3b5025d 100644 --- a/Userland/Utilities/mv.cpp +++ b/Userland/Utilities/mv.cpp @@ -30,6 +30,7 @@ #include <LibCore/File.h> #include <stdio.h> #include <sys/stat.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Utilities/pmap.cpp b/Userland/Utilities/pmap.cpp index b752ecb3cb..53fd6016e8 100644 --- a/Userland/Utilities/pmap.cpp +++ b/Userland/Utilities/pmap.cpp @@ -31,6 +31,7 @@ #include <LibCore/ArgsParser.h> #include <LibCore/File.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Utilities/readelf.cpp b/Userland/Utilities/readelf.cpp index 08bd2e6607..c778a408a7 100644 --- a/Userland/Utilities/readelf.cpp +++ b/Userland/Utilities/readelf.cpp @@ -33,6 +33,7 @@ #include <LibELF/Validation.h> #include <ctype.h> #include <stdio.h> +#include <unistd.h> static const char* object_file_type_to_string(Elf32_Half type) { diff --git a/Userland/Utilities/readlink.cpp b/Userland/Utilities/readlink.cpp index de65e6212a..7edb372a19 100644 --- a/Userland/Utilities/readlink.cpp +++ b/Userland/Utilities/readlink.cpp @@ -27,6 +27,7 @@ #include <LibCore/ArgsParser.h> #include <LibCore/File.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Utilities/shuf.cpp b/Userland/Utilities/shuf.cpp index 953323f5a0..9a80f1cb10 100644 --- a/Userland/Utilities/shuf.cpp +++ b/Userland/Utilities/shuf.cpp @@ -29,7 +29,7 @@ #include <errno.h> #include <stdio.h> #include <stdlib.h> -#include <string.h> +#include <unistd.h> int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv) { diff --git a/Userland/Utilities/sort.cpp b/Userland/Utilities/sort.cpp index 34b528f96b..06d0b4ead4 100644 --- a/Userland/Utilities/sort.cpp +++ b/Userland/Utilities/sort.cpp @@ -31,6 +31,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv) { diff --git a/Userland/Utilities/strace.cpp b/Userland/Utilities/strace.cpp index c43f987e51..36188ba098 100644 --- a/Userland/Utilities/strace.cpp +++ b/Userland/Utilities/strace.cpp @@ -25,7 +25,6 @@ */ #include <AK/Assertions.h> -#include <AK/LogStream.h> #include <AK/Types.h> #include <LibC/sys/arch/i386/regs.h> #include <LibCore/ArgsParser.h> diff --git a/Userland/Utilities/syscall.cpp b/Userland/Utilities/syscall.cpp index f5275f75be..381cc534be 100644 --- a/Userland/Utilities/syscall.cpp +++ b/Userland/Utilities/syscall.cpp @@ -26,7 +26,6 @@ #include <AK/Debug.h> #include <AK/Iterator.h> -#include <AK/LogStream.h> #include <AK/Vector.h> #include <LibCore/ArgsParser.h> #include <mman.h> diff --git a/Userland/Utilities/tar.cpp b/Userland/Utilities/tar.cpp index a3ce48d49e..3e74e09042 100644 --- a/Userland/Utilities/tar.cpp +++ b/Userland/Utilities/tar.cpp @@ -24,7 +24,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <AK/LogStream.h> #include <AK/Vector.h> #include <LibCompress/Gzip.h> #include <LibCore/ArgsParser.h> @@ -33,6 +32,7 @@ #include <fcntl.h> #include <stdio.h> #include <sys/stat.h> +#include <unistd.h> constexpr size_t buffer_size = 4096; diff --git a/Userland/Utilities/test-bindtodevice.cpp b/Userland/Utilities/test-bindtodevice.cpp index d96d1e6b29..d9c4f1c24c 100644 --- a/Userland/Utilities/test-bindtodevice.cpp +++ b/Userland/Utilities/test-bindtodevice.cpp @@ -29,9 +29,9 @@ #include <net/if.h> #include <netinet/in.h> #include <stdio.h> -#include <stdlib.h> #include <string.h> #include <sys/socket.h> +#include <unistd.h> static void test_invalid(int); static void test_no_route(int); diff --git a/Userland/Utilities/test-js.cpp b/Userland/Utilities/test-js.cpp index fa763a87e4..09ef8a639e 100644 --- a/Userland/Utilities/test-js.cpp +++ b/Userland/Utilities/test-js.cpp @@ -29,7 +29,6 @@ #include <AK/JsonObject.h> #include <AK/JsonValue.h> #include <AK/LexicalPath.h> -#include <AK/LogStream.h> #include <AK/QuickSort.h> #include <LibCore/ArgsParser.h> #include <LibCore/DirIterator.h> @@ -44,6 +43,7 @@ #include <signal.h> #include <stdlib.h> #include <sys/time.h> +#include <unistd.h> #define TOP_LEVEL_TEST_NAME "__$$TOP_LEVEL$$__" diff --git a/Userland/Utilities/test-pthread.cpp b/Userland/Utilities/test-pthread.cpp index ba56367410..6e2d492e33 100644 --- a/Userland/Utilities/test-pthread.cpp +++ b/Userland/Utilities/test-pthread.cpp @@ -28,6 +28,7 @@ #include <AK/NonnullRefPtrVector.h> #include <LibThread/Thread.h> #include <pthread.h> +#include <unistd.h> static void test_once() { diff --git a/Userland/Utilities/test_efault.cpp b/Userland/Utilities/test_efault.cpp index ba46c8f3f0..fe7507c080 100644 --- a/Userland/Utilities/test_efault.cpp +++ b/Userland/Utilities/test_efault.cpp @@ -88,9 +88,6 @@ int main(int, char**) EXPECT_EFAULT(read, (void*)kernel_address, 1); } - char buffer[4096]; - EXPECT_EFAULT_NO_FD(dbgputstr, buffer, 0xffffff00); - // Test the page just below where the kernel VM begins. u8* jerk_page = (u8*)mmap((void*)(0xc0000000 - PAGE_SIZE), PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_FIXED, 0, 0); VERIFY(jerk_page == (void*)(0xc0000000 - PAGE_SIZE)); diff --git a/Userland/Utilities/test_io.cpp b/Userland/Utilities/test_io.cpp index 404d76f2b9..7384ffa7b8 100644 --- a/Userland/Utilities/test_io.cpp +++ b/Userland/Utilities/test_io.cpp @@ -25,7 +25,6 @@ */ #include <AK/Assertions.h> -#include <AK/LogStream.h> #include <AK/Types.h> #include <LibCore/File.h> #include <fcntl.h> diff --git a/Userland/Utilities/tree.cpp b/Userland/Utilities/tree.cpp index 6fdb2bd9f0..7733914d64 100644 --- a/Userland/Utilities/tree.cpp +++ b/Userland/Utilities/tree.cpp @@ -25,15 +25,16 @@ */ #include <AK/LexicalPath.h> -#include <AK/LogStream.h> #include <AK/QuickSort.h> #include <AK/String.h> #include <AK/StringBuilder.h> #include <AK/Vector.h> #include <LibCore/ArgsParser.h> #include <LibCore/DirIterator.h> +#include <errno.h> #include <stdio.h> #include <sys/stat.h> +#include <unistd.h> static bool flag_show_hidden_files = false; static bool flag_show_only_directories = false; diff --git a/Userland/Utilities/uniq.cpp b/Userland/Utilities/uniq.cpp index 7ace26d21c..118490938e 100644 --- a/Userland/Utilities/uniq.cpp +++ b/Userland/Utilities/uniq.cpp @@ -30,6 +30,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> struct linebuf { char* buf = NULL; diff --git a/Userland/Utilities/utmpupdate.cpp b/Userland/Utilities/utmpupdate.cpp index 17db0f568e..ff9b284c51 100644 --- a/Userland/Utilities/utmpupdate.cpp +++ b/Userland/Utilities/utmpupdate.cpp @@ -30,6 +30,7 @@ #include <LibCore/ArgsParser.h> #include <LibCore/DateTime.h> #include <LibCore/File.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Utilities/wc.cpp b/Userland/Utilities/wc.cpp index cf9fa62d35..912820f995 100644 --- a/Userland/Utilities/wc.cpp +++ b/Userland/Utilities/wc.cpp @@ -31,6 +31,7 @@ #include <ctype.h> #include <stdio.h> #include <sys/stat.h> +#include <unistd.h> struct Count { String name; diff --git a/Userland/Utilities/which.cpp b/Userland/Utilities/which.cpp index e902fae2e7..545addab07 100644 --- a/Userland/Utilities/which.cpp +++ b/Userland/Utilities/which.cpp @@ -27,6 +27,7 @@ #include <LibCore/ArgsParser.h> #include <LibCore/DirIterator.h> #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { diff --git a/Userland/Utilities/xargs.cpp b/Userland/Utilities/xargs.cpp index 8bb7efaaa8..d455e9b897 100644 --- a/Userland/Utilities/xargs.cpp +++ b/Userland/Utilities/xargs.cpp @@ -34,6 +34,7 @@ #include <stdlib.h> #include <string.h> #include <sys/wait.h> +#include <unistd.h> bool run_command(Vector<char*>&& child_argv, bool verbose, bool is_stdin, int devnull_fd); |