ladybird/Userland/Libraries/LibDl/dlfcn.h
Daniel Bertalan b9c753f6f9 LibC+LibDl: Declare functions taking no arguments as taking void
In C++, a function declaration with an empty parameter list means that
the function takes no arguments. In C, however, it means that the
function takes an unspecified number of parameters.

What we did previously was therefore non-conforming. This caused a
config check to fail in the curl port, as it was able to redeclare
`rand` as taking an int parameter.
2022-01-08 19:22:00 +01:00

33 lines
560 B
C

/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <sys/cdefs.h>
__BEGIN_DECLS
#define RTLD_DEFAULT 0
#define RTLD_LAZY 2
#define RTLD_NOW 4
#define RTLD_GLOBAL 8
#define RTLD_LOCAL 16
typedef struct __Dl_info {
const char* dli_fname;
void* dli_fbase;
const char* dli_sname;
void* dli_saddr;
} Dl_info;
int dlclose(void*);
char* dlerror(void);
void* dlopen(const char*, int);
void* dlsym(void*, const char*);
int dladdr(void*, Dl_info*);
__END_DECLS