summaryrefslogtreecommitdiff
path: root/LibC/stdlib.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-15 12:30:48 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-15 12:30:48 +0100
commit022f7790db45ba61740b41a4807d9b7d2a732916 (patch)
tree1fc8e5883e6beaac1e4d3d3bda1a22b94bd1e792 /LibC/stdlib.h
parentfbcc8ab840aaa212934da0082a039038c8a81e53 (diff)
downloadserenity-022f7790db45ba61740b41a4807d9b7d2a732916.zip
Use modern C++ attributes instead of __attribute__ voodoo.
This is quite nice, although I wish [[gnu::always_inline]] implied inline. Also "gnu::" is kind of a wart, but whatcha gonna do.
Diffstat (limited to 'LibC/stdlib.h')
-rw-r--r--LibC/stdlib.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/LibC/stdlib.h b/LibC/stdlib.h
index bc673b0a02..a07477008f 100644
--- a/LibC/stdlib.h
+++ b/LibC/stdlib.h
@@ -9,16 +9,16 @@ __BEGIN_DECLS
#define EXIT_FAILURE 1
#define MB_CUR_MAX 1
-void* malloc(size_t) __MALLOC;
+[[gnu::malloc, gnu::returns_nonnull, gnu::alloc_size(1)]] void* malloc(size_t);
+[[gnu::malloc, gnu::returns_nonnull, gnu::alloc_size(1, 2)]] void* calloc(size_t nmemb, size_t);
void free(void*);
-void* calloc(size_t nmemb, size_t);
-void* realloc(void *ptr, size_t);
+[[gnu::returns_nonnull]] void* realloc(void *ptr, size_t);
char* getenv(const char* name);
int atoi(const char*);
long atol(const char*);
void qsort(void* base, size_t nmemb, size_t size, int (*compar)(const void *, const void *));
-void exit(int status) __NORETURN;
-void abort() __NORETURN;
+[[noreturn]] void exit(int status);
+[[noreturn]] void abort();
char* ptsname(int fd);
int ptsname_r(int fd, char* buffer, size_t);
int abs(int);