summaryrefslogtreecommitdiff
path: root/userland/libc/include
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-04-29 18:00:20 +0200
committerAnton Kling <anton@kling.gg>2024-04-29 18:00:20 +0200
commit7d2ab3a71f4bda9d8ee997764d98b29e13a902c5 (patch)
tree6dcdc7a674a8047a2dba3e95d3be91b4e3161bd5 /userland/libc/include
parentd60fa1fc01e600c4a163bbe82fab3f1986cb1476 (diff)
Kernel/Socket: Move sockets back to being file descriptors
Diffstat (limited to 'userland/libc/include')
-rw-r--r--userland/libc/include/math.h14
-rw-r--r--userland/libc/include/signal.h1
-rw-r--r--userland/libc/include/sys/socket.h1
-rw-r--r--userland/libc/include/syscall.h1
4 files changed, 17 insertions, 0 deletions
diff --git a/userland/libc/include/math.h b/userland/libc/include/math.h
index 9d4f4b4..d85b3a0 100644
--- a/userland/libc/include/math.h
+++ b/userland/libc/include/math.h
@@ -1,2 +1,16 @@
#define max(_a, _b) ((_a) > (_b) ? (_a) : (_b))
#define min(_a, _b) ((_a) < (_b) ? (_a) : (_b))
+
+#if 100*__GNUC__+__GNUC_MINOR__ >= 303
+#define NAN __builtin_nanf("")
+#define INFINITY __builtin_inff()
+#else
+#define NAN (0.0f/0.0f)
+#define INFINITY 1e40f
+#endif
+
+#define HUGE_VALF INFINITY
+#define HUGE_VAL ((double)INFINITY)
+#define HUGE_VALL ((long double)INFINITY)
+
+double ldexp(double x, int exp);
diff --git a/userland/libc/include/signal.h b/userland/libc/include/signal.h
index a241015..42702b2 100644
--- a/userland/libc/include/signal.h
+++ b/userland/libc/include/signal.h
@@ -13,6 +13,7 @@
#define SIGKILL 9
#define SIGFPE 10
#define SIGTERM 15
+#define SIG_DFL 16
typedef int pid_t;
typedef int sigset_t;
diff --git a/userland/libc/include/sys/socket.h b/userland/libc/include/sys/socket.h
index 7a2cc23..fb874a1 100644
--- a/userland/libc/include/sys/socket.h
+++ b/userland/libc/include/sys/socket.h
@@ -8,3 +8,4 @@ size_t recvfrom(int socket, void *buffer, size_t length, int flags,
size_t sendto(int socket, const void *message, size_t length, int flags,
const struct sockaddr *dest_addr, socklen_t dest_len);
int listen(int socket, int backlog);
+int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
diff --git a/userland/libc/include/syscall.h b/userland/libc/include/syscall.h
index 201ff3d..f318955 100644
--- a/userland/libc/include/syscall.h
+++ b/userland/libc/include/syscall.h
@@ -59,6 +59,7 @@
#define SYS_MUNMAP 48
#define SYS_OPEN_PROCESS 49
#define SYS_LSEEK 50
+#define SYS_CONNECT 51
int syscall(uint32_t eax, uint32_t ebx, uint32_t ecx, uint32_t edx,
uint32_t esi, uint32_t edi);