mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 19:28:29 +00:00
Remove _Hide keyword
It never did anything and isn't worthwhile as documentation.
This commit is contained in:
parent
4fb6cbc1fe
commit
e0c2b91b3e
131 changed files with 716 additions and 917 deletions
|
@ -583,3 +583,5 @@ void seekdir(DIR *dir, long off) {
|
|||
dir->tell = i;
|
||||
_unlockdir(dir);
|
||||
}
|
||||
|
||||
__weak_reference(readdir, readdir64);
|
||||
|
|
|
@ -17,8 +17,8 @@ struct StdioFlush {
|
|||
FILE *handles_initmem[8];
|
||||
};
|
||||
|
||||
_Hide extern struct StdioFlush __fflush;
|
||||
_Hide extern pthread_mutex_t __fflush_lock_obj;
|
||||
extern struct StdioFlush __fflush;
|
||||
extern pthread_mutex_t __fflush_lock_obj;
|
||||
|
||||
void __fflush_lock(void);
|
||||
void __fflush_unlock(void);
|
||||
|
|
|
@ -777,7 +777,7 @@ haveinc:
|
|||
* @asyncsignalsafe if floating point isn't used
|
||||
* @vforksafe if floating point isn't used
|
||||
*/
|
||||
_Hide int __fmt(void *fn, void *arg, const char *format, va_list va) {
|
||||
int __fmt(void *fn, void *arg, const char *format, va_list va) {
|
||||
long ld;
|
||||
void *p;
|
||||
double x;
|
||||
|
|
|
@ -19,17 +19,12 @@
|
|||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/struct/iovec.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sock/sock.h"
|
||||
#include "libc/stdckdint.h"
|
||||
#include "libc/stdio/internal.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/internal.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/o.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
/**
|
||||
* Reads data from stream.
|
||||
|
|
|
@ -16,18 +16,12 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/internal.h"
|
||||
#include "libc/calls/struct/iovec.h"
|
||||
#include "libc/calls/struct/iovec.internal.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sock/sock.h"
|
||||
#include "libc/stdckdint.h"
|
||||
#include "libc/stdio/internal.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/o.h"
|
||||
|
@ -45,7 +39,7 @@ size_t fwrite_unlocked(const void *data, size_t stride, size_t count, FILE *f) {
|
|||
size_t n, m;
|
||||
const char *p;
|
||||
struct iovec iov[2];
|
||||
if (!stride) {
|
||||
if (!stride || !count) {
|
||||
return 0;
|
||||
}
|
||||
if ((f->iomode & O_ACCMODE) == O_RDONLY) {
|
||||
|
@ -109,7 +103,7 @@ size_t fwrite_unlocked(const void *data, size_t stride, size_t count, FILE *f) {
|
|||
iov[1].iov_base = data;
|
||||
iov[1].iov_len = n;
|
||||
n += f->beg;
|
||||
if (WritevUninterruptible(f->fd, iov, 2) == -1) {
|
||||
if (__robust_writev(f->fd, iov, 2) == -1) {
|
||||
f->state = errno;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
_Hide extern uint64_t g_rando;
|
||||
extern uint64_t g_rando;
|
||||
|
||||
int __fflush_impl(FILE *) _Hide;
|
||||
int __fflush_register(FILE *) _Hide;
|
||||
void __fflush_unregister(FILE *) _Hide;
|
||||
bool __stdio_isok(FILE *) _Hide;
|
||||
FILE *__stdio_alloc(void) _Hide;
|
||||
void __stdio_free(FILE *) _Hide;
|
||||
int __fflush_impl(FILE *);
|
||||
int __fflush_register(FILE *);
|
||||
void __fflush_unregister(FILE *);
|
||||
bool __stdio_isok(FILE *);
|
||||
FILE *__stdio_alloc(void);
|
||||
void __stdio_free(FILE *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
|
|
@ -69,13 +69,14 @@ static int RunFileActions(struct _posix_faction *a) {
|
|||
* @param envp is environment variables, or `environ` if null
|
||||
* @return 0 on success or error number on failure
|
||||
* @see posix_spawnp() for `$PATH` searching
|
||||
* @returnserrno
|
||||
* @tlsrequired
|
||||
* @threadsafe
|
||||
*/
|
||||
int posix_spawn(int *pid, const char *path,
|
||||
const posix_spawn_file_actions_t *file_actions,
|
||||
const posix_spawnattr_t *attrp, char *const argv[],
|
||||
char *const envp[]) {
|
||||
errno_t posix_spawn(int *pid, const char *path,
|
||||
const posix_spawn_file_actions_t *file_actions,
|
||||
const posix_spawnattr_t *attrp, char *const argv[],
|
||||
char *const envp[]) {
|
||||
short flags = 0;
|
||||
sigset_t sigmask;
|
||||
int s, child, policy;
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
/*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-│
|
||||
│vi: set et ft=asm ts=8 tw=8 fenc=utf-8 :vi│
|
||||
╞══════════════════════════════════════════════════════════════════════════════╡
|
||||
│ This is free and unencumbered software released into the public domain. │
|
||||
│ │
|
||||
│ Anyone is free to copy, modify, publish, use, compile, sell, or │
|
||||
│ distribute this software, either in source code form or as a compiled │
|
||||
│ binary, for any purpose, commercial or non-commercial, and by any │
|
||||
│ means. │
|
||||
│ │
|
||||
│ In jurisdictions that recognize copyright laws, the author or authors │
|
||||
│ of this software dedicate any and all copyright interest in the │
|
||||
│ software to the public domain. We make this dedication for the benefit │
|
||||
│ of the public at large and to the detriment of our heirs and │
|
||||
│ successors. We intend this dedication to be an overt act of │
|
||||
│ relinquishment in perpetuity of all present and future rights to this │
|
||||
│ software under copyright law. │
|
||||
│ │
|
||||
│ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, │
|
||||
│ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF │
|
||||
│ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │
|
||||
│ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │
|
||||
│ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │
|
||||
│ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │
|
||||
│ OTHER DEALINGS IN THE SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
|
||||
readdir64:
|
||||
jmp readdir
|
||||
.endfn readdir64,globl
|
|
@ -18,5 +18,5 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/stdio/internal.h"
|
||||
|
||||
char g_stdoutbuf[BUFSIZ] _Hide;
|
||||
char g_stderrbuf[BUFSIZ] _Hide;
|
||||
char g_stdoutbuf[BUFSIZ];
|
||||
char g_stderrbuf[BUFSIZ];
|
||||
|
|
|
@ -8,10 +8,10 @@ struct StrList {
|
|||
char **p;
|
||||
};
|
||||
|
||||
void FreeStrList(struct StrList *) _Hide;
|
||||
int AppendStrList(struct StrList *) _Hide;
|
||||
void SortStrList(struct StrList *) _Hide;
|
||||
int JoinStrList(struct StrList *, char **, uint64_t) _Hide;
|
||||
void FreeStrList(struct StrList *);
|
||||
int AppendStrList(struct StrList *);
|
||||
void SortStrList(struct StrList *);
|
||||
int JoinStrList(struct StrList *, char **, uint64_t);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
|
|
@ -15,7 +15,7 @@ int mkstemp(char *);
|
|||
int mkstemps(char *, int);
|
||||
|
||||
int mkostempsmi(char *, int, unsigned, uint64_t *, int,
|
||||
int (*)(const char *, int, ...)) _Hide dontdiscard;
|
||||
int (*)(const char *, int, ...)) dontdiscard;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/struct/iovec.h"
|
||||
#include "libc/calls/struct/iovec.internal.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
|
@ -43,7 +42,7 @@ static int vdprintf_putc(const char *s, struct VdprintfState *t, size_t n) {
|
|||
iov[0].iov_len = t->n;
|
||||
iov[1].iov_base = s;
|
||||
iov[1].iov_len = n;
|
||||
if (WritevUninterruptible(t->fd, iov, 2) == -1) {
|
||||
if (__robust_writev(t->fd, iov, 2) == -1) {
|
||||
return -1;
|
||||
}
|
||||
t->t += t->n;
|
||||
|
@ -68,7 +67,7 @@ int vdprintf(int fd, const char *fmt, va_list va) {
|
|||
if (t.n) {
|
||||
iov[0].iov_base = t.b;
|
||||
iov[0].iov_len = t.n;
|
||||
if (WritevUninterruptible(t.fd, iov, 1) == -1) {
|
||||
if (__robust_writev(t.fd, iov, 1) == -1) {
|
||||
return -1;
|
||||
}
|
||||
t.t += t.n;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue