-/* $OpenBSD: getwd.c,v 1.13 2021/12/16 19:12:43 millert Exp $ */
+/* $OpenBSD: getwd.c,v 1.14 2023/05/18 16:11:09 guenther Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
#include <string.h>
#include <unistd.h>
-int __getcwd(char *buf, size_t len);
-PROTO_NORMAL(__getcwd);
-
char *
getwd(char *buf)
{
-/* $OpenBSD: getcwd.c,v 1.21 2016/05/07 19:48:00 guenther Exp $ */
+/* $OpenBSD: getcwd.c,v 1.22 2023/05/18 16:11:09 guenther Exp $ */
/*
* Copyright (c) 2005 Marius Eriksen <marius@openbsd.org>
#include <stdlib.h>
#include <unistd.h>
-int __getcwd(char *buf, size_t len);
-PROTO_NORMAL(__getcwd);
-
char *
getcwd(char *buf, size_t size)
{
-/* $OpenBSD: stdlib.h,v 1.16 2019/05/10 15:03:24 otto Exp $ */
+/* $OpenBSD: stdlib.h,v 1.17 2023/05/18 16:11:09 guenther Exp $ */
/* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */
/*-
extern char **environ;
extern char *__progname;
+int __realpath(const char *pathname, char *resolved);
+
#if 0
/*extern PROTO_NORMAL(suboptarg);*/
#endif
PROTO_NORMAL(__mb_cur_max);
+PROTO_NORMAL(__realpath);
PROTO_STD_DEPRECATED(_Exit);
PROTO_DEPRECATED(a64l);
PROTO_NORMAL(abort);
--- /dev/null
+/* $OpenBSD: event.h,v 1.1 2023/05/18 16:11:09 guenther Exp $ */
+/*
+ * Copyright (c) 2023 Philip Guenther <guenther@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _LIBC_SYS_EVENT_H_
+#define _LIBC_SYS_EVENT_H_
+
+#include_next <sys/event.h>
+
+PROTO_NORMAL(kevent);
+PROTO_NORMAL(kqueue);
+
+#endif /* !_LIBC_SYS_EVENT_H_ */
--- /dev/null
+/* $OpenBSD: shm.h,v 1.1 2023/05/18 16:11:09 guenther Exp $ */
+/*
+ * Copyright (c) 2023 Philip Guenther <guenther@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _LIBC_SYS_SHM_H_
+#define _LIBC_SYS_SHM_H_
+
+#include_next <sys/shm.h>
+
+PROTO_NORMAL(shmat);
+PROTO_NORMAL(shmctl);
+PROTO_NORMAL(shmdt);
+PROTO_NORMAL(shmget);
+
+#endif /* !_LIBC_SYS_SHM_H_ */
-/* $OpenBSD: stat.h,v 1.2 2015/09/14 10:11:54 guenther Exp $ */
+/* $OpenBSD: stat.h,v 1.3 2023/05/18 16:11:09 guenther Exp $ */
/*
* Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
*
#include_next <sys/stat.h>
PROTO_NORMAL(chflags);
+PROTO_NORMAL(chflagsat);
PROTO_NORMAL(chmod);
PROTO_NORMAL(fchflags);
PROTO_NORMAL(fchmod);
-/* $OpenBSD: unistd.h,v 1.11 2018/07/13 09:25:22 beck Exp $ */
+/* $OpenBSD: unistd.h,v 1.12 2023/05/18 16:11:09 guenther Exp $ */
/*
* Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
*
extern int _pagesize;
__END_HIDDEN_DECLS
+/* the real syscall behind getcwd(3) and getwd(3) */
+int __getcwd(char *buf, size_t len);
+
+PROTO_NORMAL(__getcwd);
PROTO_NORMAL(__tfork_thread);
PROTO_NORMAL(_exit);
PROTO_NORMAL(access);
PROTO_NORMAL(getresuid);
PROTO_NORMAL(getsid);
PROTO_NORMAL(getthrid);
+PROTO_NORMAL(getthrname);
PROTO_NORMAL(getuid);
PROTO_DEPRECATED(getusershell);
PROTO_DEPRECATED(getwd);
PROTO_NORMAL(setresuid);
PROTO_NORMAL(setreuid);
PROTO_NORMAL(setsid);
+PROTO_NORMAL(setthrname);
PROTO_NORMAL(setuid);
PROTO_DEPRECATED(setusershell);
/*PROTO_CANCEL(sleep);*/
-/* $OpenBSD: realpath.c,v 1.27 2019/07/05 05:04:26 deraadt Exp $ */
+/* $OpenBSD: realpath.c,v 1.28 2023/05/18 16:11:10 guenther Exp $ */
/*
* Copyright (c) 2019 Bob Beck <beck@openbsd.org>
* Copyright (c) 2019 Theo de Raadt <deraadt@openbsd.org>
#include <syslog.h>
#include <stdarg.h>
-int __realpath(const char *pathname, char *resolved);
-PROTO_NORMAL(__realpath);
-
/*
* wrapper for kernel __realpath
*/