LibC: Rewrite all the headers.

We now have more or less posix issue 2018 conforming libc headers.

This was a really time consuming and boring operation but it had to
be done.

Now we get to actually start implementing libc :)
This commit is contained in:
Bananymous
2023-05-26 22:21:07 +03:00
parent faa7bc6043
commit faf14b880e
91 changed files with 4402 additions and 596 deletions

25
libc/include/net/if.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef _NET_IF_H
#define _NET_IF_H 1
// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/net_if.h.html
#include <sys/cdefs.h>
#define IF_NAMESIZE 16
__BEGIN_DECLS
struct if_nameindex
{
unsigned if_index; /* Numeric index of the interface. */
char* if_name; /* Null-terminated name of the interface. */
};
void if_freenameindex(struct if_nameindex* ptr);
char* if_indextoname(unsigned ifindex, char* ifname);
struct if_nameindex* if_nameindex(void);
unsigned if_nametoindex(const char* ifname);
__END_DECLS
#endif