summaryrefslogtreecommitdiff
path: root/uisimulator/common/file.h
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/common/file.h')
-rw-r--r--uisimulator/common/file.h76
1 files changed, 0 insertions, 76 deletions
diff --git a/uisimulator/common/file.h b/uisimulator/common/file.h
deleted file mode 100644
index 7ea59a0b74..0000000000
--- a/uisimulator/common/file.h
+++ /dev/null
@@ -1,76 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Daniel Stenberg <daniel@haxx.se>
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef _SIM_FILE_H_
21#define _SIM_FILE_H_
22
23#ifdef WIN32
24#include <io.h>
25#include <fcntl.h>
26#else
27#include <stdio.h>
28#endif
29
30#include <sys/types.h>
31
32#ifdef WIN32
33#ifndef _commit
34extern int _commit( int handle );
35
36#ifdef _MSC_VER
37typedef unsigned int mode_t;
38#endif
39
40#endif
41#endif
42
43int sim_open(const char *name, int opts);
44int sim_close(int fd);
45int sim_rename(const char *oldpath, const char *newpath);
46off_t sim_filesize(int fd);
47int sim_creat(const char *name, mode_t mode);
48int sim_remove(const char *name);
49
50#ifndef NO_REDEFINES_PLEASE
51#define open(x,y) sim_open(x,y)
52#define close(x) sim_close(x)
53#define filesize(x) sim_filesize(x)
54#define creat(x,y) sim_creat(x,y)
55#define remove(x) sim_remove(x)
56#define rename(x,y) sim_rename(x,y)
57#ifdef WIN32
58#define fsync _commit
59#endif
60#endif
61
62#include "../../firmware/include/file.h"
63
64#ifndef WIN32
65int open(const char* pathname, int flags);
66int close(int fd);
67int printf(const char *format, ...);
68int ftruncate(int fd, off_t length);
69int fsync(int fd);
70
71off_t lseek(int fildes, off_t offset, int whence);
72ssize_t read(int fd, void *buf, size_t count);
73ssize_t write(int fd, const void *buf, size_t count);
74#endif
75
76#endif