[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lost] [Patch] Ein bißchen POSIX für iso9660



+ POSIX: stat.h: S_ISFIFO und S_ISSOCK
+ POSIX: Stub für mktime
Index: trunk/src/modules/include/sys/stat.h
===================================================================
--- trunk.orig/src/modules/include/sys/stat.h
+++ trunk/src/modules/include/sys/stat.h
@@ -65,7 +65,7 @@
 #define S_IFREG 0x2
 
 /// Modus: FIFO
-#define S_FIFO 0x3
+#define S_IFIFO 0x3
 
 /// Modus: Verzeichnis
 #define S_IFDIR 0x4
@@ -88,6 +88,8 @@
 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
 
 /// Spezialdateien aus UNIX
+#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
 
Index: trunk/src/modules/include/time.h
===================================================================
--- trunk.orig/src/modules/include/time.h
+++ trunk/src/modules/include/time.h
@@ -64,6 +64,8 @@ char* asctime(const struct tm* time_ptr)
 struct tm* gmtime(const time_t* time_ptr);
 
 struct tm* localtime(const time_t* time_ptr);
+
+time_t mktime(struct tm* time_ptr);
 #endif
 
 #endif
Index: trunk/src/modules/lib/stdlibc/time.c
===================================================================
--- trunk.orig/src/modules/lib/stdlibc/time.c
+++ trunk/src/modules/lib/stdlibc/time.c
@@ -125,5 +125,13 @@ char* ctime(const time_t* time_ptr)
     return ctime_string;
 }
 
+/**
+ * Unix-Timestamp aus einer tm-Struktur erzeugen
+ */
+time_t mktime(struct tm* time_ptr)
+{
+    return 0;
+}
+
 #endif