mirror of
https://github.com/openbsd/src.git
synced 2024-12-22 07:27:59 -08:00
Add PROTO_NORMAL() declarations for the remaining syscalls, to avoid
future, inadvertant PLT entries. Move the __getcwd and __realpath declarations to hidden/{stdlib,unistd}.h to consolidate and remove duplication. ok tb@ otto@ deraadt@
This commit is contained in:
parent
4f585c7eec
commit
170ca6cd9a
@ -1,4 +1,4 @@
|
||||
/* $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.
|
||||
@ -34,9 +34,6 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int __getcwd(char *buf, size_t len);
|
||||
PROTO_NORMAL(__getcwd);
|
||||
|
||||
char *
|
||||
getwd(char *buf)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $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>
|
||||
@ -21,9 +21,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int __getcwd(char *buf, size_t len);
|
||||
PROTO_NORMAL(__getcwd);
|
||||
|
||||
char *
|
||||
getcwd(char *buf, size_t size)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $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 $ */
|
||||
|
||||
/*-
|
||||
@ -45,11 +45,14 @@ __END_HIDDEN_DECLS
|
||||
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);
|
||||
|
26
lib/libc/hidden/sys/event.h
Normal file
26
lib/libc/hidden/sys/event.h
Normal file
@ -0,0 +1,26 @@
|
||||
/* $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_ */
|
28
lib/libc/hidden/sys/shm.h
Normal file
28
lib/libc/hidden/sys/shm.h
Normal file
@ -0,0 +1,28 @@
|
||||
/* $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_ */
|
@ -1,4 +1,4 @@
|
||||
/* $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>
|
||||
*
|
||||
@ -21,6 +21,7 @@
|
||||
#include_next <sys/stat.h>
|
||||
|
||||
PROTO_NORMAL(chflags);
|
||||
PROTO_NORMAL(chflagsat);
|
||||
PROTO_NORMAL(chmod);
|
||||
PROTO_NORMAL(fchflags);
|
||||
PROTO_NORMAL(fchmod);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $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>
|
||||
*
|
||||
@ -25,6 +25,10 @@ __BEGIN_HIDDEN_DECLS
|
||||
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);
|
||||
@ -87,6 +91,7 @@ PROTO_NORMAL(getresgid);
|
||||
PROTO_NORMAL(getresuid);
|
||||
PROTO_NORMAL(getsid);
|
||||
PROTO_NORMAL(getthrid);
|
||||
PROTO_NORMAL(getthrname);
|
||||
PROTO_NORMAL(getuid);
|
||||
PROTO_DEPRECATED(getusershell);
|
||||
PROTO_DEPRECATED(getwd);
|
||||
@ -142,6 +147,7 @@ PROTO_NORMAL(setresgid);
|
||||
PROTO_NORMAL(setresuid);
|
||||
PROTO_NORMAL(setreuid);
|
||||
PROTO_NORMAL(setsid);
|
||||
PROTO_NORMAL(setthrname);
|
||||
PROTO_NORMAL(setuid);
|
||||
PROTO_DEPRECATED(setusershell);
|
||||
/*PROTO_CANCEL(sleep);*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $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>
|
||||
@ -24,9 +24,6 @@
|
||||
#include <syslog.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
int __realpath(const char *pathname, char *resolved);
|
||||
PROTO_NORMAL(__realpath);
|
||||
|
||||
/*
|
||||
* wrapper for kernel __realpath
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user