git.ucc.asn.au
/
tpg
/
acess2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
41f5d19
)
Usermode/libposix - Stubbed functions for bochs
author
John Hodge
<
[email protected]
>
Sun, 9 Mar 2014 07:14:46 +0000
(15:14 +0800)
committer
John Hodge
<
[email protected]
>
Sun, 9 Mar 2014 07:14:46 +0000
(15:14 +0800)
Usermode/Libraries/libposix.so_src/Makefile
patch
|
blob
|
history
Usermode/Libraries/libposix.so_src/include_exp/sys/types.h
patch
|
blob
|
history
Usermode/Libraries/libposix.so_src/unistd.c
patch
|
blob
|
history
Usermode/Libraries/libposix.so_src/utime.c
[new file with mode: 0644]
patch
|
blob
diff --git
a/Usermode/Libraries/libposix.so_src/Makefile
b/Usermode/Libraries/libposix.so_src/Makefile
index
30c4cd2
..
dcbf8f5
100644
(file)
--- a/
Usermode/Libraries/libposix.so_src/Makefile
+++ b/
Usermode/Libraries/libposix.so_src/Makefile
@@
-11,7
+11,7
@@
LDFLAGS += -soname libposix.so -Map map.txt -lc
OBJ = main.o unistd.o dirent.o stat.o utmpx.o termios.o
\r
OBJ += pwd.o syslog.o sys_time.o sys_ioctl.o sys_resource.o
\r
OBJ += fcntl.o clocks.o sys_wait.o unistd_crypt.o
\r
OBJ = main.o unistd.o dirent.o stat.o utmpx.o termios.o
\r
OBJ += pwd.o syslog.o sys_time.o sys_ioctl.o sys_resource.o
\r
OBJ += fcntl.o clocks.o sys_wait.o unistd_crypt.o
\r
-OBJ += grp.o pty.o mktemp.o
\r
+OBJ += grp.o pty.o mktemp.o
utime.o
\r
DEPFILES := $(OBJ:%.o=%.d)
\r
BIN = libposix.so
\r
\r
DEPFILES := $(OBJ:%.o=%.d)
\r
BIN = libposix.so
\r
\r
diff --git
a/Usermode/Libraries/libposix.so_src/include_exp/sys/types.h
b/Usermode/Libraries/libposix.so_src/include_exp/sys/types.h
index
1223857
..
c94a65a
100644
(file)
--- a/
Usermode/Libraries/libposix.so_src/include_exp/sys/types.h
+++ b/
Usermode/Libraries/libposix.so_src/include_exp/sys/types.h
@@
-5,10
+5,14
@@
#include <stddef.h>
#include <stddef.h>
+#define __USE_BSD 1
+
//typedef signed int ssize_t;
//typedef signed int ssize_t;
-//#ifdef __USE_BSD
+
+#ifdef __USE_BSD
+typedef unsigned long u_long;
typedef unsigned int u_int;
typedef unsigned int u_int;
-
//
#endif
+#endif
typedef struct stat t_fstat;
typedef struct stat t_fstat;
diff --git
a/Usermode/Libraries/libposix.so_src/unistd.c
b/Usermode/Libraries/libposix.so_src/unistd.c
index
64cb70f
..
0f5bb38
100644
(file)
--- a/
Usermode/Libraries/libposix.so_src/unistd.c
+++ b/
Usermode/Libraries/libposix.so_src/unistd.c
@@
-50,6
+50,12
@@
int open(const char *path, int openmode, ...)
return ret;
}
return ret;
}
+int access(const char *path, int openmode)
+{
+ errno = EINVAL;
+ return -1;
+}
+
int creat(const char *path, mode_t mode)
{
// TODO: Make native call to do this cheaper
int creat(const char *path, mode_t mode)
{
// TODO: Make native call to do this cheaper
diff --git a/Usermode/Libraries/libposix.so_src/utime.c
b/Usermode/Libraries/libposix.so_src/utime.c
new file mode 100644
(file)
index 0000000..
de9483a
--- /dev/null
+++ b/
Usermode/Libraries/libposix.so_src/utime.c
@@ -0,0
+1,19
@@
+/*
+ * Acess2 POSIX Emulation Layer
+ * - By John Hodge
+ *
+ * utime.h
+ * -
+ */
+#include <utime.h>
+#include <acess/sys.h>
+
+// === CODE ===
+int utime(const char *filename, const struct utimbuf *times)
+{
+ _SysDebug("TODO: libposix utime('%s', {%lli,%lli})",
+ filename, times->actime, times->modtime
+ );
+ return 0;
+}
+
UCC
git Repository :: git.ucc.asn.au