mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 17:02:10 -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
45 lines
705 B
C
45 lines
705 B
C
/*
|
|
* <sys/sendfile.h> wrapper functions.
|
|
*
|
|
* Authors:
|
|
* Jonathan Pryor ([email protected])
|
|
*
|
|
* Copyright (C) 2004 Jonathan Pryor
|
|
*/
|
|
|
|
#include <sys/types.h>
|
|
#include <errno.h>
|
|
|
|
#include "map.h"
|
|
#include "mph.h"
|
|
|
|
#ifdef HAVE_SYS_SENDFILE_H
|
|
#include <sys/sendfile.h>
|
|
#endif /* ndef HAVE_SYS_SENDFILE_H */
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
#ifdef HAVE_SENDFILE
|
|
mph_ssize_t
|
|
Mono_Posix_Syscall_sendfile (int out_fd, int in_fd, mph_off_t *offset, mph_size_t count)
|
|
{
|
|
off_t _offset;
|
|
ssize_t r;
|
|
mph_return_if_off_t_overflow (*offset);
|
|
|
|
_offset = *offset;
|
|
|
|
r = sendfile (out_fd, in_fd, &_offset, (size_t) count);
|
|
|
|
*offset = _offset;
|
|
|
|
return r;
|
|
}
|
|
#endif /* ndef HAVE_SENDFILE */
|
|
|
|
G_END_DECLS
|
|
|
|
/*
|
|
* vim: noexpandtab
|
|
*/
|