Userspace: Add missing #includes now that AK/StdLibExtras.h is smaller
This commit is contained in:
parent
35d88f536c
commit
37fc6c117c
Notes:
sideshowbarker
2024-07-19 08:50:30 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/37fc6c117c1
44 changed files with 67 additions and 25 deletions
|
@ -35,6 +35,7 @@
|
|||
#include <limits.h>
|
||||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
PropertiesDialog::PropertiesDialog(GUI::FileSystemModel& model, String path, bool disable_rename, Window* parent_window)
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
#include <LibGUI/Window.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
|
|
|
@ -40,13 +40,14 @@
|
|||
#include <LibGUI/ToolBar.h>
|
||||
#include <LibGUI/TreeView.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibMarkdown/MDDocument.h>
|
||||
#include <LibWeb/HtmlView.h>
|
||||
#include <LibWeb/Layout/LayoutNode.h>
|
||||
#include <LibWeb/Parser/CSSParser.h>
|
||||
#include <LibWeb/Parser/HTMLParser.h>
|
||||
#include <LibMarkdown/MDDocument.h>
|
||||
#include <libgen.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include <LibGUI/TextEditor.h>
|
||||
#include <LibGUI/ToolBar.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
HexEditorWidget::HexEditorWidget()
|
||||
{
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include <LibGUI/TextEditor.h>
|
||||
#include <LibGUI/ToolBar.h>
|
||||
#include <LibGfx/Font.h>
|
||||
#include <string.h>
|
||||
|
||||
TextEditorWidget::TextEditorWidget()
|
||||
{
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <string.h>
|
||||
|
||||
class Editor;
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
@ -142,7 +143,7 @@ void TerminalWrapper::run_command(const String& command)
|
|||
|
||||
auto parts = command.split(' ');
|
||||
ASSERT(!parts.is_empty());
|
||||
const char** args = (const char**) calloc(parts.size() + 1, sizeof(const char*));
|
||||
const char** args = (const char**)calloc(parts.size() + 1, sizeof(const char*));
|
||||
for (size_t i = 0; i < parts.size(); i++) {
|
||||
args[i] = parts[i].characters();
|
||||
}
|
||||
|
|
|
@ -27,9 +27,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/SharedBuffer.h>
|
||||
#include <AK/Types.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <AK/SharedBuffer.h>
|
||||
#include <string.h>
|
||||
|
||||
namespace Audio {
|
||||
|
||||
|
@ -126,15 +127,15 @@ public:
|
|||
|
||||
private:
|
||||
explicit Buffer(Vector<Sample>&& samples)
|
||||
: m_buffer(*SharedBuffer::create_with_size(samples.size() * sizeof(Sample))),
|
||||
m_sample_count(samples.size())
|
||||
: m_buffer(*SharedBuffer::create_with_size(samples.size() * sizeof(Sample)))
|
||||
, m_sample_count(samples.size())
|
||||
{
|
||||
memcpy(m_buffer->data(), samples.data(), samples.size() * sizeof(Sample));
|
||||
}
|
||||
|
||||
explicit Buffer(NonnullRefPtr<SharedBuffer>&& buffer, int sample_count)
|
||||
: m_buffer(move(buffer)),
|
||||
m_sample_count(sample_count)
|
||||
: m_buffer(move(buffer))
|
||||
, m_sample_count(sample_count)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <grp.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <serenity.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
// FIXME: Thread safety.
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <getopt.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
namespace Core {
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include <AK/String.h>
|
||||
#include <dirent.h>
|
||||
#include <string.h>
|
||||
|
||||
namespace Core {
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <LibCore/SyscallUtils.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <AK/IPv4Address.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <AK/LogStream.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <mman.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define DYNAMIC_LOAD_DEBUG
|
||||
//#define DYNAMIC_LOAD_VERBOSE
|
||||
|
@ -163,8 +164,7 @@ void ELFDynamicLoader::load_program_headers(const ELFImage& elf_image)
|
|||
text_region_ptr = ®ion;
|
||||
else
|
||||
data_region_ptr = ®ion;
|
||||
}
|
||||
else if (region.is_dynamic()) {
|
||||
} else if (region.is_dynamic()) {
|
||||
dynamic_region_desired_vaddr = region.desired_load_address();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <LibELF/ELFDynamicObject.h>
|
||||
#include <LibELF/exec_elf.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
static const char* name_for_dtag(Elf32_Sword d_tag);
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Memory.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibELF/ELFImage.h>
|
||||
|
||||
|
|
|
@ -26,13 +26,14 @@
|
|||
|
||||
#include "ELFLoader.h"
|
||||
#include <AK/Demangle.h>
|
||||
#include <AK/Memory.h>
|
||||
#include <AK/QuickSort.h>
|
||||
|
||||
#ifdef KERNEL
|
||||
#include <Kernel/VM/MemoryManager.h>
|
||||
#define do_memcpy copy_to_user
|
||||
# include <Kernel/VM/MemoryManager.h>
|
||||
# define do_memcpy copy_to_user
|
||||
#else
|
||||
#define do_memcpy memcpy
|
||||
# define do_memcpy memcpy
|
||||
#endif
|
||||
|
||||
//#define ELFLOADER_DEBUG
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include <LibGUI/SortingProxyModel.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
#include <LibGUI/ToolBar.h>
|
||||
#include <string.h>
|
||||
|
||||
namespace GUI {
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Memory.h>
|
||||
#include <AK/SharedBuffer.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
*/
|
||||
|
||||
#include "Font.h"
|
||||
#include "Emoji.h"
|
||||
#include "Bitmap.h"
|
||||
#include "Emoji.h"
|
||||
#include <AK/BufferStream.h>
|
||||
#include <AK/MappedFile.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
|
@ -35,9 +35,10 @@
|
|||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace Gfx {
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <AK/NonnullOwnPtrVector.h>
|
||||
#include <LibGfx/GIFLoader.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
namespace Gfx {
|
||||
|
||||
|
|
|
@ -25,10 +25,11 @@
|
|||
*/
|
||||
|
||||
#include "Painter.h"
|
||||
#include "Bitmap.h"
|
||||
#include "Emoji.h"
|
||||
#include "Font.h"
|
||||
#include "Bitmap.h"
|
||||
#include <AK/Assertions.h>
|
||||
#include <AK/Memory.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/Utf8View.h>
|
||||
|
@ -38,15 +39,15 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC optimize("O3")
|
||||
# pragma GCC optimize("O3")
|
||||
#endif
|
||||
|
||||
#ifndef ALWAYS_INLINE
|
||||
#if __has_attribute(always_inline)
|
||||
#define ALWAYS_INLINE __attribute__((always_inline))
|
||||
#else
|
||||
#define ALWAYS_INLINE inline
|
||||
#endif
|
||||
# if __has_attribute(always_inline)
|
||||
# define ALWAYS_INLINE __attribute__((always_inline))
|
||||
# else
|
||||
# define ALWAYS_INLINE inline
|
||||
# endif
|
||||
#endif
|
||||
|
||||
namespace Gfx {
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <AK/Badge.h>
|
||||
#include <AK/SharedBuffer.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
#include <string.h>
|
||||
|
||||
namespace Gfx {
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <AK/Forward.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <LibGfx/Orientation.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace Gfx {
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <LibGfx/Point.h>
|
||||
#include <LibGfx/Size.h>
|
||||
#include <LibGfx/TextAlignment.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace Gfx {
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibMarkdown/MDText.h>
|
||||
#include <string.h>
|
||||
|
||||
static String unescape(const StringView& text)
|
||||
{
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <serenity.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibVT/Terminal.h>
|
||||
#include <string.h>
|
||||
|
||||
//#define TERMINAL_DEBUG
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "Screen.h"
|
||||
#include "Window.h"
|
||||
#include "WindowManager.h"
|
||||
#include <AK/Memory.h>
|
||||
#include <LibCore/Timer.h>
|
||||
#include <LibGfx/Font.h>
|
||||
#include <LibGfx/Painter.h>
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <LibGfx/SystemTheme.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <AK/String.h>
|
||||
#include <LibCore/ElapsedTimer.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void usage(void)
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
const int line_width = 70;
|
||||
|
|
|
@ -29,12 +29,13 @@
|
|||
#include <AK/Types.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibCore/ElapsedTimer.h>
|
||||
#include <fcntl.h>
|
||||
#include <getopt.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
struct Result {
|
||||
u64 write_bps;
|
||||
|
|
|
@ -26,10 +26,10 @@
|
|||
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
int head(const String& filename, bool print_filename, int line_count, int char_count);
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <net/if.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <LibCore/File.h>
|
||||
#include <LibMarkdown/MDDocument.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int parse_options(const StringView& options)
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static int pid_of(const String& process_name, bool single_shot, bool omit_pid, pid_t pid)
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <AK/String.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void handle_sigint(int)
|
||||
|
|
|
@ -24,11 +24,12 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/QuickSort.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
extern "C" int main(int, char**);
|
||||
|
|
Loading…
Add table
Reference in a new issue