blob: 45c5a21d3a9cde6a5be35396c8055591d0436dd9 [file] [log] [blame]
// Copyright 2016 The Fuchsia Authors
// Copyright (c) 2008-2014 Travis Geiselbrecht
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
#include <stddef.h>
#include <stdint.h>
#include <zircon/compiler.h>
#ifdef _KERNEL
#include <lib/heap.h> // lib/heap provides malloc/free definitions.
long strtol(const char *nptr, char **endptr, int base);
unsigned long int strtoul(const char *nptr, char **endptr, int base);
void abort(void) __attribute__((noreturn));
#define RAND_MAX (0x7fffffff)
int rand(void);
void srand(unsigned int seed);
// Note: POSIX.1 specifies unsigned int, but we use uintptr_t instead.
int rand_r(uintptr_t *seed);