summaryrefslogtreecommitdiff
path: root/src/unistd
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-02-09 15:42:20 -0500
committerJakob Kaivo <jkk@ung.org>2019-02-09 15:42:20 -0500
commita0dd1ebaf7613657a39ca22882ac6eaafa4a932e (patch)
treedc42ba738026d373fde4e6df7913e1bdd3b4ac30 /src/unistd
parent452ac2f7d9d5ecd57e80d95e5752f8c8304ff0b0 (diff)
merge XOPEN identifiers
Diffstat (limited to 'src/unistd')
-rw-r--r--src/unistd/F_LOCK.c6
-rw-r--r--src/unistd/F_TEST.c6
-rw-r--r--src/unistd/F_TLOCK.c5
-rw-r--r--src/unistd/F_ULOCK.c5
-rw-r--r--src/unistd/_POSIX2_LOCALEDEF.c6
-rw-r--r--src/unistd/_SC_ATEXIT_MAX.c6
-rw-r--r--src/unistd/_SC_IOV_MAX.c6
-rw-r--r--src/unistd/_SC_PAGESIZE.c6
-rw-r--r--src/unistd/_SC_PAGE_SIZE.c6
-rw-r--r--src/unistd/_SC_PASS_MAX.c5
-rw-r--r--src/unistd/_SC_XOPEN_CRYPT.c6
-rw-r--r--src/unistd/_SC_XOPEN_ENH_I18N.c6
-rw-r--r--src/unistd/_SC_XOPEN_SHM.c6
-rw-r--r--src/unistd/_SC_XOPEN_UNIX.c6
-rw-r--r--src/unistd/_SC_XOPEN_VERSION.c6
-rw-r--r--src/unistd/_SC_XOPEN_XCU_VERSION.c5
-rw-r--r--src/unistd/_XOPEN_CRYPT.c5
-rw-r--r--src/unistd/_XOPEN_ENH_I18N.c5
-rw-r--r--src/unistd/_XOPEN_SHM.c5
-rw-r--r--src/unistd/_XOPEN_UNIX.c5
-rw-r--r--src/unistd/_XOPEN_VERSION.c17
-rw-r--r--src/unistd/_XOPEN_XCU_VERSION.c5
-rw-r--r--src/unistd/brk.c10
-rw-r--r--src/unistd/chroot.c10
-rw-r--r--src/unistd/crypt.c10
-rw-r--r--src/unistd/cuserid.c30
-rw-r--r--src/unistd/encrypt.c9
-rw-r--r--src/unistd/fchdir.c11
-rw-r--r--src/unistd/fchown.c11
-rw-r--r--src/unistd/fsync.c15
-rw-r--r--src/unistd/ftruncate.c15
-rw-r--r--src/unistd/getdtablesize.c10
-rw-r--r--src/unistd/gethostid.c10
-rw-r--r--src/unistd/getpagesize.c10
-rw-r--r--src/unistd/getpass.c10
-rw-r--r--src/unistd/getpgid.c11
-rw-r--r--src/unistd/getsid.c11
-rw-r--r--src/unistd/getwd.c10
-rw-r--r--src/unistd/lchown.c11
-rw-r--r--src/unistd/lockf.c10
-rw-r--r--src/unistd/nice.c10
-rw-r--r--src/unistd/readlink.c11
-rw-r--r--src/unistd/sbrk.c10
-rw-r--r--src/unistd/setpgrp.c10
-rw-r--r--src/unistd/setregid.c10
-rw-r--r--src/unistd/setreuid.c10
-rw-r--r--src/unistd/swab.c9
-rw-r--r--src/unistd/symlink.c11
-rw-r--r--src/unistd/sync.c9
-rw-r--r--src/unistd/truncate.c11
-rw-r--r--src/unistd/ualarm.c9
-rw-r--r--src/unistd/usleep.c9
-rw-r--r--src/unistd/vfork.c10
53 files changed, 477 insertions, 0 deletions
diff --git a/src/unistd/F_LOCK.c b/src/unistd/F_LOCK.c
new file mode 100644
index 00000000..4c5b496d
--- /dev/null
+++ b/src/unistd/F_LOCK.c
@@ -0,0 +1,6 @@
+#include <unistd.h>
+#define F_LOCK 0
+
+/*
+XOPEN(400)
+*/
diff --git a/src/unistd/F_TEST.c b/src/unistd/F_TEST.c
new file mode 100644
index 00000000..779ee374
--- /dev/null
+++ b/src/unistd/F_TEST.c
@@ -0,0 +1,6 @@
+#include <unistd.h>
+#define F_TEST 1
+/*
+XOPEN(400)
+*/
+
diff --git a/src/unistd/F_TLOCK.c b/src/unistd/F_TLOCK.c
new file mode 100644
index 00000000..71585fbb
--- /dev/null
+++ b/src/unistd/F_TLOCK.c
@@ -0,0 +1,5 @@
+#include <unistd.h>
+#define F_TLOCK 2
+/*
+XOPEN(400)
+*/
diff --git a/src/unistd/F_ULOCK.c b/src/unistd/F_ULOCK.c
new file mode 100644
index 00000000..7625a1eb
--- /dev/null
+++ b/src/unistd/F_ULOCK.c
@@ -0,0 +1,5 @@
+#include <unistd.h>
+#define F_ULOCK 3
+/*
+XOPEN(400)
+*/
diff --git a/src/unistd/_POSIX2_LOCALEDEF.c b/src/unistd/_POSIX2_LOCALEDEF.c
new file mode 100644
index 00000000..ee4b68f7
--- /dev/null
+++ b/src/unistd/_POSIX2_LOCALEDEF.c
@@ -0,0 +1,6 @@
+#include <unistd.h>
+#define _POSIX2_LOCALEDEF 200809L
+/*
+XOPEN(400)
+POSIX(2)
+*/
diff --git a/src/unistd/_SC_ATEXIT_MAX.c b/src/unistd/_SC_ATEXIT_MAX.c
new file mode 100644
index 00000000..f86bc884
--- /dev/null
+++ b/src/unistd/_SC_ATEXIT_MAX.c
@@ -0,0 +1,6 @@
+#include <unistd.h>
+#define _SC_ATEXIT_MAX 21
+/*
+XOPEN(400)
+POSIX(200112)
+*/
diff --git a/src/unistd/_SC_IOV_MAX.c b/src/unistd/_SC_IOV_MAX.c
new file mode 100644
index 00000000..8f80ec2d
--- /dev/null
+++ b/src/unistd/_SC_IOV_MAX.c
@@ -0,0 +1,6 @@
+#include <unistd.h>
+#define _SC_IOV_MAX 38
+/*
+XOPEN(400)
+POSIX(200112)
+*/
diff --git a/src/unistd/_SC_PAGESIZE.c b/src/unistd/_SC_PAGESIZE.c
new file mode 100644
index 00000000..3da891cd
--- /dev/null
+++ b/src/unistd/_SC_PAGESIZE.c
@@ -0,0 +1,6 @@
+#include <unistd.h>
+#define _SC_PAGESIZE /* TODO */
+/*
+XOPEN(400)
+POSIX(200112)
+*/
diff --git a/src/unistd/_SC_PAGE_SIZE.c b/src/unistd/_SC_PAGE_SIZE.c
new file mode 100644
index 00000000..eaee4bd4
--- /dev/null
+++ b/src/unistd/_SC_PAGE_SIZE.c
@@ -0,0 +1,6 @@
+#include <unistd.h>
+#define _SC_PAGE_SIZE 53
+/*
+XOPEN(400)
+POSIX(200112)
+*/
diff --git a/src/unistd/_SC_PASS_MAX.c b/src/unistd/_SC_PASS_MAX.c
new file mode 100644
index 00000000..27350f83
--- /dev/null
+++ b/src/unistd/_SC_PASS_MAX.c
@@ -0,0 +1,5 @@
+#include <unistd.h>
+#define _SC_PASS_MAX /* TODO */
+/*
+XOPEN(4,600)
+*/
diff --git a/src/unistd/_SC_XOPEN_CRYPT.c b/src/unistd/_SC_XOPEN_CRYPT.c
new file mode 100644
index 00000000..e1c4a22e
--- /dev/null
+++ b/src/unistd/_SC_XOPEN_CRYPT.c
@@ -0,0 +1,6 @@
+#include <unistd.h>
+#define _SC_XOPEN_CRYPT 116
+/*
+XOPEN(4)
+POSIX(200112)
+*/
diff --git a/src/unistd/_SC_XOPEN_ENH_I18N.c b/src/unistd/_SC_XOPEN_ENH_I18N.c
new file mode 100644
index 00000000..3cb01df7
--- /dev/null
+++ b/src/unistd/_SC_XOPEN_ENH_I18N.c
@@ -0,0 +1,6 @@
+#include <unistd.h>
+#define _SC_XOPEN_ENH_I18N 117
+/*
+XOPEN(4)
+POSIX(200112)
+*/
diff --git a/src/unistd/_SC_XOPEN_SHM.c b/src/unistd/_SC_XOPEN_SHM.c
new file mode 100644
index 00000000..460c3014
--- /dev/null
+++ b/src/unistd/_SC_XOPEN_SHM.c
@@ -0,0 +1,6 @@
+#include <unistd.h>
+#define _SC_XOPEN_SHM 120
+/*
+XOPEN(4)
+POSIX(200112)
+*/
diff --git a/src/unistd/_SC_XOPEN_UNIX.c b/src/unistd/_SC_XOPEN_UNIX.c
new file mode 100644
index 00000000..fc5dc635
--- /dev/null
+++ b/src/unistd/_SC_XOPEN_UNIX.c
@@ -0,0 +1,6 @@
+#include <unistd.h>
+#define _SC_XOPEN_UNIX 122
+/*
+XOPEN(400)
+POSIX(200112)
+*/
diff --git a/src/unistd/_SC_XOPEN_VERSION.c b/src/unistd/_SC_XOPEN_VERSION.c
new file mode 100644
index 00000000..055f4ee3
--- /dev/null
+++ b/src/unistd/_SC_XOPEN_VERSION.c
@@ -0,0 +1,6 @@
+#include <unistd.h>
+#define _SC_XOPEN_VERSION 124
+/*
+XOPEN(500)
+POSIX(200112)
+*/
diff --git a/src/unistd/_SC_XOPEN_XCU_VERSION.c b/src/unistd/_SC_XOPEN_XCU_VERSION.c
new file mode 100644
index 00000000..00427ace
--- /dev/null
+++ b/src/unistd/_SC_XOPEN_XCU_VERSION.c
@@ -0,0 +1,5 @@
+#include <unistd.h>
+#define _SC_XOPEN_XCU_VERSION /* TODO */
+/*
+XOPEN(500,600)
+*/
diff --git a/src/unistd/_XOPEN_CRYPT.c b/src/unistd/_XOPEN_CRYPT.c
new file mode 100644
index 00000000..639637d6
--- /dev/null
+++ b/src/unistd/_XOPEN_CRYPT.c
@@ -0,0 +1,5 @@
+#include <unistd.h>
+#define _XOPEN_CRYPT _XOPEN_SOURCE
+/*
+XOPEN(4)
+*/
diff --git a/src/unistd/_XOPEN_ENH_I18N.c b/src/unistd/_XOPEN_ENH_I18N.c
new file mode 100644
index 00000000..eb2313f0
--- /dev/null
+++ b/src/unistd/_XOPEN_ENH_I18N.c
@@ -0,0 +1,5 @@
+#include <unistd.h>
+#define _XOPEN_ENH_I18N _XOPEN_SOURCE
+/*
+XOPEN(4)
+*/
diff --git a/src/unistd/_XOPEN_SHM.c b/src/unistd/_XOPEN_SHM.c
new file mode 100644
index 00000000..58881d0a
--- /dev/null
+++ b/src/unistd/_XOPEN_SHM.c
@@ -0,0 +1,5 @@
+#include <unistd.h>
+#define _XOPEN_SHM _XOPEN_SOURCE
+/*
+XOPEN(400)
+*/
diff --git a/src/unistd/_XOPEN_UNIX.c b/src/unistd/_XOPEN_UNIX.c
new file mode 100644
index 00000000..20a1c320
--- /dev/null
+++ b/src/unistd/_XOPEN_UNIX.c
@@ -0,0 +1,5 @@
+#include <unistd.h>
+#define _XOPEN_UNIX /* TODO */
+/*
+XOPEN(400)
+*/
diff --git a/src/unistd/_XOPEN_VERSION.c b/src/unistd/_XOPEN_VERSION.c
new file mode 100644
index 00000000..c2b768ee
--- /dev/null
+++ b/src/unistd/_XOPEN_VERSION.c
@@ -0,0 +1,17 @@
+#include <unistd.h>
+
+#if (defined _XOPEN_SOURCE)
+#if _XOPEN_SOURCE >= 700
+#define _XOPEN_VERSION (700)
+#elif _XOPEN_SOURCE >= 600
+#define _XOPEN_VERSION (600)
+#elif _XOPEN_SOURCE >= 500
+#define _XOPEN_VERSION (500)
+#else
+#define _XOPEN_VERSION (4)
+#endif
+#endif
+
+/*
+XOPEN(4)
+*/
diff --git a/src/unistd/_XOPEN_XCU_VERSION.c b/src/unistd/_XOPEN_XCU_VERSION.c
new file mode 100644
index 00000000..9e86d0a1
--- /dev/null
+++ b/src/unistd/_XOPEN_XCU_VERSION.c
@@ -0,0 +1,5 @@
+#include <unistd.h>
+#define _XOPEN_XCU_VERSION /* TODO */
+/*
+XOPEN(4,600)
+*/
diff --git a/src/unistd/brk.c b/src/unistd/brk.c
new file mode 100644
index 00000000..a836772a
--- /dev/null
+++ b/src/unistd/brk.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+
+int brk(void *addr)
+{
+ return 0;
+}
+
+/*
+XOPEN(400,600)
+*/
diff --git a/src/unistd/chroot.c b/src/unistd/chroot.c
new file mode 100644
index 00000000..84abaeaa
--- /dev/null
+++ b/src/unistd/chroot.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+
+int chroot(const char *path)
+{
+ return 0;
+}
+
+/*
+XOPEN(400,600)
+*/
diff --git a/src/unistd/crypt.c b/src/unistd/crypt.c
new file mode 100644
index 00000000..e1235818
--- /dev/null
+++ b/src/unistd/crypt.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+
+char * crypt( const char *key, const char *salt)
+{
+ return (char*)key;
+}
+
+/*
+XOPEN(4)
+*/
diff --git a/src/unistd/cuserid.c b/src/unistd/cuserid.c
new file mode 100644
index 00000000..1fa65dbe
--- /dev/null
+++ b/src/unistd/cuserid.c
@@ -0,0 +1,30 @@
+#include "stddef.h"
+#include "sys/types.h"
+#include <unistd.h>
+#include "stdio.h"
+#include "string.h"
+#include "pwd.h"
+
+char *cuserid(char *s)
+{
+ static char userid[L_cuserid];
+
+ struct passwd *pwd = getpwuid(geteuid());
+
+ if (s == NULL) {
+ s = userid;
+ }
+
+ if (pwd == NULL) {
+ s[0] = '\0';
+ } else {
+ strcpy(s, pwd->pw_name);
+ }
+
+ return s;
+}
+
+/*
+TODO: verify
+POSIX(1, 199506)
+*/
diff --git a/src/unistd/encrypt.c b/src/unistd/encrypt.c
new file mode 100644
index 00000000..7fa4e7f7
--- /dev/null
+++ b/src/unistd/encrypt.c
@@ -0,0 +1,9 @@
+#include <unistd.h>
+
+void encrypt(char block[64], int edflag)
+{
+}
+
+/*
+XOPEN(4)
+*/
diff --git a/src/unistd/fchdir.c b/src/unistd/fchdir.c
new file mode 100644
index 00000000..433b9a7c
--- /dev/null
+++ b/src/unistd/fchdir.c
@@ -0,0 +1,11 @@
+#include <unistd.h>
+
+int fchdir(int fildes)
+{
+ return fildes;
+}
+
+/*
+XOPEN(400)
+POSIX(200809)
+*/
diff --git a/src/unistd/fchown.c b/src/unistd/fchown.c
new file mode 100644
index 00000000..417def94
--- /dev/null
+++ b/src/unistd/fchown.c
@@ -0,0 +1,11 @@
+#include <unistd.h>
+
+int fchown(int fildes, uid_t owner, gid_t group)
+{
+ return fildes;
+}
+
+/*
+XOPEN(400)
+POSIX(200112)
+*/
diff --git a/src/unistd/fsync.c b/src/unistd/fsync.c
new file mode 100644
index 00000000..35d70cbb
--- /dev/null
+++ b/src/unistd/fsync.c
@@ -0,0 +1,15 @@
+#include <unistd.h>
+#include "__nonstd.h"
+
+int fsync(int fildes)
+{
+ __POSIX_MIN(199309L);
+ __POSIX_OPTION(_FSYNC);
+ __XOPEN_MIN(4);
+ __SC(int, fildes);
+}
+
+/*
+XOPEN(4)
+POSIX(199309)
+*/
diff --git a/src/unistd/ftruncate.c b/src/unistd/ftruncate.c
new file mode 100644
index 00000000..8e6cf27f
--- /dev/null
+++ b/src/unistd/ftruncate.c
@@ -0,0 +1,15 @@
+#include <unistd.h>
+#include "__nonstd.h"
+
+int ftruncate(int fildes, off_t length)
+{
+ __POSIX_MIN(199309L);
+ __POSIX_OPTION_OR(_MAPPED_FILES, _SHARED_MEMORY);
+ __XOPEN_MIN(450);
+ __SC(int, fildes, length);
+}
+
+/*
+XOPEN(400)
+POSIX(199309)
+*/
diff --git a/src/unistd/getdtablesize.c b/src/unistd/getdtablesize.c
new file mode 100644
index 00000000..c1fb323d
--- /dev/null
+++ b/src/unistd/getdtablesize.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+
+int getdtablesize(void)
+{
+ return 0;
+}
+
+/*
+XOPEN(400,600)
+*/
diff --git a/src/unistd/gethostid.c b/src/unistd/gethostid.c
new file mode 100644
index 00000000..6a085885
--- /dev/null
+++ b/src/unistd/gethostid.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+
+long gethostid(void)
+{
+ return 0;
+}
+
+/*
+XOPEN(400)
+*/
diff --git a/src/unistd/getpagesize.c b/src/unistd/getpagesize.c
new file mode 100644
index 00000000..05d4649c
--- /dev/null
+++ b/src/unistd/getpagesize.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+
+int getpagesize(void)
+{
+ return sysconf(_SC_PAGE_SIZE);
+}
+
+/*
+XOPEN(400,600)
+*/
diff --git a/src/unistd/getpass.c b/src/unistd/getpass.c
new file mode 100644
index 00000000..46165742
--- /dev/null
+++ b/src/unistd/getpass.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+
+char *getpass(const char *prompt)
+{
+ return prompt;
+}
+
+/*
+XOPEN(4,600)
+*/
diff --git a/src/unistd/getpgid.c b/src/unistd/getpgid.c
new file mode 100644
index 00000000..a12421af
--- /dev/null
+++ b/src/unistd/getpgid.c
@@ -0,0 +1,11 @@
+#include <unistd.h>
+
+pid_t getpgid(pid_t pid)
+{
+ return pid;
+}
+
+/*
+XOPEN(400)
+POSIX(200809)
+*/
diff --git a/src/unistd/getsid.c b/src/unistd/getsid.c
new file mode 100644
index 00000000..671b19ec
--- /dev/null
+++ b/src/unistd/getsid.c
@@ -0,0 +1,11 @@
+#include <unistd.h>
+
+pid_t getsid(pid_t pid)
+{
+ return pid;
+}
+
+/*
+XOPEN(400)
+POSIX(200809)
+*/
diff --git a/src/unistd/getwd.c b/src/unistd/getwd.c
new file mode 100644
index 00000000..2d8b68a7
--- /dev/null
+++ b/src/unistd/getwd.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+
+char *getwd(char *path_name)
+{
+ return path_name;
+}
+
+/*
+XOPEN(400,700)
+*/
diff --git a/src/unistd/lchown.c b/src/unistd/lchown.c
new file mode 100644
index 00000000..e59adc9a
--- /dev/null
+++ b/src/unistd/lchown.c
@@ -0,0 +1,11 @@
+#include <unistd.h>
+
+int lchown(const char *path, uid_t owner, gid_t group)
+{
+ return 0;
+}
+
+/*
+XOPEN(400)
+POSIX(200809)
+*/
diff --git a/src/unistd/lockf.c b/src/unistd/lockf.c
new file mode 100644
index 00000000..8da34e18
--- /dev/null
+++ b/src/unistd/lockf.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+
+int lockf(int fildes, int function, off_t size)
+{
+ return 0;
+}
+
+/*
+XOPEN(400)
+*/
diff --git a/src/unistd/nice.c b/src/unistd/nice.c
new file mode 100644
index 00000000..b406860c
--- /dev/null
+++ b/src/unistd/nice.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+
+int nice(int incr)
+{
+ return incr;
+}
+
+/*
+XOPEN(4)
+*/
diff --git a/src/unistd/readlink.c b/src/unistd/readlink.c
new file mode 100644
index 00000000..42d5e082
--- /dev/null
+++ b/src/unistd/readlink.c
@@ -0,0 +1,11 @@
+#include <unistd.h>
+
+ssize_t readlink(const char * restrict path, char * restrict buf, size_t bufsize)
+{
+ return 0;
+}
+
+/*
+XOPEN(400)
+POSIX(200112)
+*/
diff --git a/src/unistd/sbrk.c b/src/unistd/sbrk.c
new file mode 100644
index 00000000..69f88cf2
--- /dev/null
+++ b/src/unistd/sbrk.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+
+void *sbrk(int incr)
+{
+ return 0;
+}
+
+/*
+XOPEN(400,600)
+*/
diff --git a/src/unistd/setpgrp.c b/src/unistd/setpgrp.c
new file mode 100644
index 00000000..c36d78b4
--- /dev/null
+++ b/src/unistd/setpgrp.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+
+pid_t setpgrp(void)
+{
+ return 0;
+}
+
+/*
+XOPEN(400)
+*/
diff --git a/src/unistd/setregid.c b/src/unistd/setregid.c
new file mode 100644
index 00000000..bdd92f92
--- /dev/null
+++ b/src/unistd/setregid.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+
+int setregid(gid_t rgid, gid_t egid)
+{
+ return 0;
+}
+
+/*
+XOPEN(400)
+*/
diff --git a/src/unistd/setreuid.c b/src/unistd/setreuid.c
new file mode 100644
index 00000000..97550ec7
--- /dev/null
+++ b/src/unistd/setreuid.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+
+int setreuid(uid_t ruid, uid_t euid)
+{
+ return 0;
+}
+
+/*
+XOPEN(400)
+*/
diff --git a/src/unistd/swab.c b/src/unistd/swab.c
new file mode 100644
index 00000000..7b735b1a
--- /dev/null
+++ b/src/unistd/swab.c
@@ -0,0 +1,9 @@
+#include <unistd.h>
+
+void swab(const void * restrict src, void * restrict dest, ssize_t nbytes)
+{
+}
+
+/*
+XOPEN(4)
+*/
diff --git a/src/unistd/symlink.c b/src/unistd/symlink.c
new file mode 100644
index 00000000..d78fb16a
--- /dev/null
+++ b/src/unistd/symlink.c
@@ -0,0 +1,11 @@
+#include <unistd.h>
+
+int symlink(const char*path1, const char *path2)
+{
+ return 0;
+}
+
+/*
+XOPEN(400)
+POSIX(200112)
+*/
diff --git a/src/unistd/sync.c b/src/unistd/sync.c
new file mode 100644
index 00000000..3f8650e4
--- /dev/null
+++ b/src/unistd/sync.c
@@ -0,0 +1,9 @@
+#include <unistd.h>
+
+void sync(void)
+{
+}
+
+/*
+XOPEN(400)
+*/
diff --git a/src/unistd/truncate.c b/src/unistd/truncate.c
new file mode 100644
index 00000000..578a4faf
--- /dev/null
+++ b/src/unistd/truncate.c
@@ -0,0 +1,11 @@
+#include <unistd.h>
+
+int truncate(const char *path, off_t length)
+{
+ return 0;
+}
+
+/*
+XOPEN(400)
+POSIX(200809)
+*/
diff --git a/src/unistd/ualarm.c b/src/unistd/ualarm.c
new file mode 100644
index 00000000..5db13af6
--- /dev/null
+++ b/src/unistd/ualarm.c
@@ -0,0 +1,9 @@
+#include <unistd.h>
+
+useconds_t ualarm(useconds_t useconds, useconds_t interval)
+{
+}
+
+/*
+XOPEN(400,700)
+*/
diff --git a/src/unistd/usleep.c b/src/unistd/usleep.c
new file mode 100644
index 00000000..947a446f
--- /dev/null
+++ b/src/unistd/usleep.c
@@ -0,0 +1,9 @@
+#include <unistd.h>
+
+int usleep(useconds_t useconds)
+{
+}
+
+/*
+XOPEN(400,700)
+*/
diff --git a/src/unistd/vfork.c b/src/unistd/vfork.c
new file mode 100644
index 00000000..f0acd5d5
--- /dev/null
+++ b/src/unistd/vfork.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+
+pid_t vfork(void)
+{
+ return fork();
+}
+
+/*
+XOPEN(400,700)
+*/