2017-05-02 21:30:46 +00:00
|
|
|
/* -*-comment-start: "//";comment-end:""-*-
|
|
|
|
* Mes --- Maxwell Equations of Software
|
|
|
|
* Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
|
|
|
|
*
|
|
|
|
* This file is part of Mes.
|
|
|
|
*
|
|
|
|
* Mes is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
* your option) any later version.
|
|
|
|
*
|
|
|
|
* Mes is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with Mes. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2017-05-23 05:16:08 +00:00
|
|
|
#ifndef __MES_STDLIB_H
|
|
|
|
#define __MES_STDLIB_H 1
|
2017-05-02 21:30:46 +00:00
|
|
|
|
|
|
|
#if __GNUC__ && POSIX
|
|
|
|
#ifndef _GNU_SOURCE
|
|
|
|
#define _GNU_SOURCE
|
|
|
|
#endif
|
2017-07-23 13:49:03 +00:00
|
|
|
#undef __MES_STDLIB_H
|
2017-05-02 21:30:46 +00:00
|
|
|
#include_next <stdlib.h>
|
|
|
|
#else // !(__GNUC__ && POSIX)
|
|
|
|
|
2017-05-23 05:16:08 +00:00
|
|
|
#ifndef __MES_SIZE_T
|
|
|
|
#define __MES_SIZE_T
|
2017-05-02 21:30:46 +00:00
|
|
|
typedef long size_t;
|
|
|
|
#endif
|
|
|
|
|
2017-05-23 05:16:08 +00:00
|
|
|
int atoi (char const *s);
|
2017-07-24 11:10:27 +00:00
|
|
|
void exit (int);
|
2017-07-24 16:24:51 +00:00
|
|
|
void free (void *ptr);
|
2017-07-24 11:10:27 +00:00
|
|
|
char* getenv (char const* s);
|
2017-05-02 21:30:46 +00:00
|
|
|
void *malloc (size_t);
|
2017-07-24 15:04:11 +00:00
|
|
|
void qsort (void *base, size_t nmemb, size_t size, int (*compar)(void const *, void const *));
|
2017-05-23 05:16:08 +00:00
|
|
|
void *realloc (void *p, size_t size);
|
2017-07-24 15:38:25 +00:00
|
|
|
long strtol (char const *nptr, char **endptr, int base);
|
2017-07-24 16:12:28 +00:00
|
|
|
long long strtoll (char const *nptr, char **endptr, int base);
|
2017-07-24 15:04:11 +00:00
|
|
|
unsigned long strtoul (char const *nptr, char **endptr, int base);
|
2017-07-24 16:08:02 +00:00
|
|
|
unsigned long long strtoull (char const *nptr, char **endptr, int base);
|
2017-05-23 05:16:08 +00:00
|
|
|
|
2017-05-02 21:30:46 +00:00
|
|
|
#endif // !(__GNUC__ && POSIX)
|
|
|
|
|
2017-05-23 05:16:08 +00:00
|
|
|
#endif // __MES_STDLIB_H
|
2017-05-02 21:30:46 +00:00
|
|
|
|