From f252c29710f71e7c260d9e866c8d4eef885705c3 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 2 Sep 2015 19:45:09 +0200 Subject: fix some warnings and errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- include/stdlib.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'include/stdlib.h') diff --git a/include/stdlib.h b/include/stdlib.h index fd78d27..9340201 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -65,7 +65,8 @@ * @return The quotient in `.quot`, and * the remainder in `.rem`. */ -div_t div(int, int); +div_t div(int, int) + __GCC_ONLY(__attribute__((const))); /** * Perform an integer division and return @@ -76,7 +77,8 @@ div_t div(int, int); * @return The quotient in `.quot`, and * the remainder in `.rem`. */ -ldiv_t ldiv(long, long); +ldiv_t ldiv(long, long) + __GCC_ONLY(__attribute__((const))); /** * Perform an integer division and return @@ -87,7 +89,16 @@ ldiv_t ldiv(long, long); * @return The quotient in `.quot`, and * the remainder in `.rem`. */ -lldiv_t lldiv(long long, long long); +lldiv_t lldiv(long long, long long) + __GCC_ONLY(__attribute__((const))); + + + +/* TODO implement rand-functions */ +#define RAND_MAX 1 +int rand(void); +int rand_r(unsigned int* seed); +void srand(unsigned int seed); -- cgit v1.2.3-70-g09d2