2017-05-02 21:30:46 +00:00
|
|
|
/* -*-comment-start: "//";comment-end:""-*-
|
|
|
|
* Mes --- Maxwell Equations of Software
|
2017-11-21 18:22:26 +00:00
|
|
|
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
2017-05-02 21:30:46 +00:00
|
|
|
*
|
|
|
|
* 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-12-05 18:49:37 +00:00
|
|
|
#undef size_t
|
|
|
|
typedef unsigned long size_t;
|
2017-05-02 21:30:46 +00:00
|
|
|
#endif
|
|
|
|
|
2017-05-23 05:16:08 +00:00
|
|
|
int atoi (char const *s);
|
2017-07-25 18:55:45 +00:00
|
|
|
void * calloc (size_t nmemb, size_t size);
|
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);
|
2018-04-29 10:02:23 +00:00
|
|
|
int setenv (char const* s, char const* v, int overwrite_p);
|
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);
|
2018-05-18 13:28:05 +00:00
|
|
|
double strtod (char const *nptr, char **endptr);
|
|
|
|
float strtof (char const *nptr, char **endptr);
|
|
|
|
long double strtold (char const *nptr, char **endptr);
|
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-11-19 13:05:33 +00:00
|
|
|
#define EXIT_FAILURE 1
|
|
|
|
#define EXIT_SUCCESS 0
|
|
|
|
|
2017-11-19 13:06:32 +00:00
|
|
|
#include <endian.h>
|
|
|
|
|
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
|
|
|
|