mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
stdio.c, stdlib.c, string.c, sys-mman.c, sys-sendfile.c, sys-stat.c, sys-statvfs.c, sys-time.c, sys-xattr.c syslog.c, time.c, unistd.c, utime.c: Remove structure definitions, and use the create-native-map generated definitions within map.h. Update function prototypes to match current map.h declarations. * map.c, map.h: Flush (current create-native-map output). * mph.h: Don't include "map-icalls.h"; "icalls" are now in map.h. * create-native-map.exe: Added; cached version of create-native-map.exe used to update map.c, map.h. (create-native-map.exe source within mono-tools/create-native-map.) * Makefile.am: Added update-create-native-map target to update create-native-map.exe using pkg-config & the create-native-map.pc package. Use create-native-map.exe to generate map.* files instead of make-map.exe. * sys-statvfs.c: Add Mono_Posix_ToStatvfs, Mono_Posix_FromStatvfs exports. svn path=/trunk/mono/; revision=66946
73 lines
1.0 KiB
C
73 lines
1.0 KiB
C
/*
|
|
* <stdlib.h> wrapper functions.
|
|
*
|
|
* Authors:
|
|
* Jonathan Pryor ([email protected])
|
|
*
|
|
* Copyright (C) 2004-2005 Jonathan Pryor
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include "map.h"
|
|
#include "mph.h"
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
gint32
|
|
Mono_Posix_Stdlib_EXIT_FAILURE (void)
|
|
{
|
|
return EXIT_FAILURE;
|
|
}
|
|
|
|
gint32
|
|
Mono_Posix_Stdlib_EXIT_SUCCESS (void)
|
|
{
|
|
return EXIT_SUCCESS;
|
|
}
|
|
|
|
gint32
|
|
Mono_Posix_Stdlib_MB_CUR_MAX (void)
|
|
{
|
|
return MB_CUR_MAX;
|
|
}
|
|
|
|
gint32
|
|
Mono_Posix_Stdlib_RAND_MAX (void)
|
|
{
|
|
return RAND_MAX;
|
|
}
|
|
|
|
void*
|
|
Mono_Posix_Stdlib_calloc (mph_size_t nmemb, mph_size_t size)
|
|
{
|
|
if (mph_have_size_t_overflow(nmemb) || mph_have_size_t_overflow(size))
|
|
return NULL;
|
|
|
|
return calloc ((size_t) nmemb, (size_t) size);
|
|
}
|
|
|
|
void*
|
|
Mono_Posix_Stdlib_malloc (mph_size_t size)
|
|
{
|
|
if (mph_have_size_t_overflow(size))
|
|
return NULL;
|
|
|
|
return malloc ((size_t) size);
|
|
}
|
|
|
|
void*
|
|
Mono_Posix_Stdlib_realloc (void* ptr, mph_size_t size)
|
|
{
|
|
if (mph_have_size_t_overflow(size))
|
|
return NULL;
|
|
|
|
return realloc (ptr, (size_t) size);
|
|
}
|
|
|
|
G_END_DECLS
|
|
|
|
/*
|
|
* vim: noexpandtab
|
|
*/
|