retire PUBLIC, PRIVATE and FORWARD

This commit is contained in:
Ben Gras
2012-03-25 20:25:53 +02:00
parent 6a73e85ad1
commit 7336a67dfe
603 changed files with 5776 additions and 5779 deletions

View File

@@ -19,7 +19,7 @@
__weak_alias(sysconf, __sysconf)
#endif
PRIVATE u32_t get_hz(void)
static u32_t get_hz(void)
{
FILE *fp;
u32_t hz;
@@ -38,7 +38,7 @@ PRIVATE u32_t get_hz(void)
return DEFAULT_HZ;
}
PUBLIC long int sysconf(name)
long int sysconf(name)
int name; /* property being inspected */
{
switch(name) {

View File

@@ -8,7 +8,7 @@
__weak_alias(times, _times)
#endif
PUBLIC clock_t times(buf)
clock_t times(buf)
struct tms *buf;
{
message m;

View File

@@ -7,7 +7,7 @@
#include <string.h>
#include <utime.h>
PUBLIC int utime(const char *name, const struct utimbuf *timp)
int utime(const char *name, const struct utimbuf *timp)
{
message m;

View File

@@ -8,7 +8,7 @@
#include <ucontext.h>
#include <unistd.h>
PUBLIC int setmcontext(const mcontext_t *mcp)
int setmcontext(const mcontext_t *mcp)
{
message m;
@@ -18,7 +18,7 @@ PUBLIC int setmcontext(const mcontext_t *mcp)
}
PUBLIC int getmcontext(mcontext_t *mcp)
int getmcontext(mcontext_t *mcp)
{
message m;

View File

@@ -15,7 +15,7 @@ void ctx_start(void (*)(void), int, ...);
/*===========================================================================*
* setuctx *
*===========================================================================*/
PUBLIC int setuctx(const ucontext_t *ucp)
int setuctx(const ucontext_t *ucp)
{
int r;
@@ -42,7 +42,7 @@ PUBLIC int setuctx(const ucontext_t *ucp)
/*===========================================================================*
* getuctx *
*===========================================================================*/
PUBLIC int getuctx(ucontext_t *ucp)
int getuctx(ucontext_t *ucp)
{
int r;
@@ -69,7 +69,7 @@ PUBLIC int getuctx(ucontext_t *ucp)
/*===========================================================================*
* makecontext *
*===========================================================================*/
PUBLIC void makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
void makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
{
va_list ap;
unsigned int *stack_top;
@@ -157,7 +157,7 @@ PUBLIC void makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
/*===========================================================================*
* swapcontext *
*===========================================================================*/
PUBLIC int swapcontext(ucontext_t *oucp, const ucontext_t *ucp)
int swapcontext(ucontext_t *oucp, const ucontext_t *ucp)
{
int r;
@@ -186,7 +186,7 @@ PUBLIC int swapcontext(ucontext_t *oucp, const ucontext_t *ucp)
/*===========================================================================*
* resumecontext *
*===========================================================================*/
PUBLIC void resumecontext(ucontext_t *ucp)
void resumecontext(ucontext_t *ucp)
{
if (ucp->uc_link == NULL) exit(0);

View File

@@ -8,7 +8,7 @@
__weak_alias(access, _access)
#endif
PUBLIC int access(name, mode)
int access(name, mode)
_CONST char *name;
int mode;
{

View File

@@ -19,7 +19,7 @@ extern char *_brksize;
* as with system calls. In this way, if a user inadvertently defines a
* procedure brk, MINIX may continue to work because the true call is _brk.
*/
PUBLIC int brk(addr)
int brk(addr)
void *addr;
{
message m;

View File

@@ -9,7 +9,7 @@ __weak_alias(chdir, _chdir)
__weak_alias(fchdir, _fchdir)
#endif
PUBLIC int chdir(name)
int chdir(name)
_CONST char *name;
{
message m;
@@ -18,7 +18,7 @@ _CONST char *name;
return(_syscall(VFS_PROC_NR, CHDIR, &m));
}
PUBLIC int fchdir(fd)
int fchdir(fd)
int fd;
{
message m;

View File

@@ -8,7 +8,7 @@
__weak_alias(chmod, _chmod)
#endif
PUBLIC int chmod(const char *name, mode_t mode)
int chmod(const char *name, mode_t mode)
{
message m;

View File

@@ -9,7 +9,7 @@
__weak_alias(chown, _chown)
#endif
PUBLIC int chown(const char *name, uid_t owner, gid_t grp)
int chown(const char *name, uid_t owner, gid_t grp)
{
message m;

View File

@@ -8,7 +8,7 @@
__weak_alias(chroot, _chroot)
#endif
PUBLIC int chroot(name)
int chroot(name)
_CONST char *name;
{
message m;

View File

@@ -8,7 +8,7 @@
__weak_alias(close, _close)
#endif
PUBLIC int close(fd)
int close(fd)
int fd;
{
message m;

View File

@@ -9,7 +9,7 @@
__weak_alias(dup, _dup)
#endif
PUBLIC int dup(fd)
int dup(fd)
int fd;
{
return(fcntl(fd, F_DUPFD, 0));

View File

@@ -9,7 +9,7 @@
__weak_alias(dup2, _dup2)
#endif
PUBLIC int dup2(fd, fd2)
int dup2(fd, fd2)
int fd, fd2;
{
/* The behavior of dup2 is defined by POSIX in 6.2.1.2 as almost, but not

View File

@@ -8,7 +8,7 @@
__weak_alias(fchmod, _fchmod)
#endif
PUBLIC int fchmod(int fd, mode_t mode)
int fchmod(int fd, mode_t mode)
{
message m;

View File

@@ -9,7 +9,7 @@
__weak_alias(fchown, _fchown)
#endif
PUBLIC int fchown(int fd, uid_t owner, gid_t grp)
int fchown(int fd, uid_t owner, gid_t grp)
{
message m;

View File

@@ -10,9 +10,9 @@ __weak_alias(fcntl, _fcntl)
#endif
#if _ANSI
PUBLIC int fcntl(int fd, int cmd, ...)
int fcntl(int fd, int cmd, ...)
#else
PUBLIC int fcntl(fd, cmd)
int fcntl(fd, cmd)
int fd;
int cmd;
#endif

View File

@@ -8,7 +8,7 @@
__weak_alias(fork, _fork)
#endif
PUBLIC pid_t fork()
pid_t fork()
{
message m;

View File

@@ -14,7 +14,7 @@
__weak_alias(fpathconf, _fpathconf)
#endif
PUBLIC long fpathconf(fd, name)
long fpathconf(fd, name)
int fd; /* file descriptor being interrogated */
int name; /* property being inspected */
{

View File

@@ -8,7 +8,7 @@
__weak_alias(fsync, _fsync)
#endif
PUBLIC int fsync(int fd)
int fsync(int fd)
{
message m;

View File

@@ -4,7 +4,7 @@
#include <dirent.h>
PUBLIC ssize_t getdents(fd, buffer, nbytes)
ssize_t getdents(fd, buffer, nbytes)
int fd;
char *buffer;
size_t nbytes;

View File

@@ -8,7 +8,7 @@
__weak_alias(getegid, _getegid)
#endif
PUBLIC gid_t getegid()
gid_t getegid()
{
message m;

View File

@@ -8,7 +8,7 @@
__weak_alias(geteuid, _geteuid)
#endif
PUBLIC uid_t geteuid()
uid_t geteuid()
{
message m;

View File

@@ -8,7 +8,7 @@
__weak_alias(getgid, _getgid)
#endif
PUBLIC gid_t getgid()
gid_t getgid()
{
message m;

View File

@@ -13,7 +13,7 @@ __weak_alias(getgroups, _getgroups)
#endif
PUBLIC int getgroups(int ngroups, gid_t *arr)
int getgroups(int ngroups, gid_t *arr)
{
message m;
m.m1_i1 = ngroups;

View File

@@ -8,7 +8,7 @@
__weak_alias(getpgrp, _getpgrp)
#endif
PUBLIC pid_t getpgrp()
pid_t getpgrp()
{
message m;

View File

@@ -8,7 +8,7 @@
__weak_alias(getpid, _getpid)
#endif
PUBLIC pid_t getpid()
pid_t getpid()
{
message m;

View File

@@ -8,7 +8,7 @@
__weak_alias(getppid, _getppid)
#endif
PUBLIC pid_t getppid()
pid_t getppid()
{
message m;

View File

@@ -8,7 +8,7 @@
__weak_alias(getuid, _getuid)
#endif
PUBLIC uid_t getuid()
uid_t getuid()
{
message m;

View File

@@ -8,7 +8,7 @@
__weak_alias(ioctl, _ioctl)
#endif
PUBLIC int ioctl(fd, request, data)
int ioctl(fd, request, data)
int fd;
int request;
void *data;

View File

@@ -8,7 +8,7 @@
__weak_alias(kill, _kill)
#endif
PUBLIC int kill(proc, sig)
int kill(proc, sig)
int proc; /* which process is to be sent the signal */
int sig; /* signal number */
{

View File

@@ -9,7 +9,7 @@
__weak_alias(link, _link)
#endif
PUBLIC int link(const char *name, const char *name2)
int link(const char *name, const char *name2)
{
message m;

View File

@@ -8,7 +8,7 @@
__weak_alias(lseek, _lseek)
#endif
PUBLIC off_t lseek(fd, offset, whence)
off_t lseek(fd, offset, whence)
int fd;
off_t offset;
int whence;

View File

@@ -5,7 +5,7 @@
#include <unistd.h>
#include <minix/u64.h>
PUBLIC int lseek64(fd, offset, whence, newpos)
int lseek64(fd, offset, whence, newpos)
int fd;
u64_t offset;
int whence;

View File

@@ -4,7 +4,7 @@
#include <stdlib.h>
#include <unistd.h>
PUBLIC int closefrom(int fd)
int closefrom(int fd)
{
int f, ok = 0, e = 0;
for(f = fd; f < __MINIX_OPEN_MAX; f++) {

View File

@@ -9,7 +9,7 @@
__weak_alias(mkdir, _mkdir)
#endif
PUBLIC int mkdir(const char *name, mode_t mode)
int mkdir(const char *name, mode_t mode)
{
message m;

View File

@@ -9,7 +9,7 @@
__weak_alias(mkfifo, _mkfifo)
#endif
PUBLIC int mkfifo(const char *name, mode_t mode)
int mkfifo(const char *name, mode_t mode)
{
return mknod(name, mode | S_IFIFO, (dev_t) 0);
}

View File

@@ -7,7 +7,7 @@
#include <unistd.h>
#include <sys/stat.h>
PUBLIC int mknod(const char *name, mode_t mode, dev_t dev)
int mknod(const char *name, mode_t mode, dev_t dev)
{
message m;

View File

@@ -21,7 +21,7 @@ __weak_alias(minix_munmap_text, _minix_munmap_text)
#include <string.h>
#include <errno.h>
PUBLIC void *minix_mmap(void *addr, size_t len, int prot, int flags,
void *minix_mmap(void *addr, size_t len, int prot, int flags,
int fd, off_t offset)
{
message m;
@@ -43,7 +43,7 @@ PUBLIC void *minix_mmap(void *addr, size_t len, int prot, int flags,
return (void *) m.VMM_RETADDR;
}
PUBLIC int minix_munmap(void *addr, size_t len)
int minix_munmap(void *addr, size_t len)
{
message m;
@@ -54,7 +54,7 @@ PUBLIC int minix_munmap(void *addr, size_t len)
}
PUBLIC int minix_munmap_text(void *addr, size_t len)
int minix_munmap_text(void *addr, size_t len)
{
message m;
@@ -64,7 +64,7 @@ PUBLIC int minix_munmap_text(void *addr, size_t len)
return _syscall(VM_PROC_NR, VM_MUNMAP_TEXT, &m);
}
PUBLIC void *vm_remap(endpoint_t d,
void *vm_remap(endpoint_t d,
endpoint_t s,
void *da,
void *sa,
@@ -85,7 +85,7 @@ PUBLIC void *vm_remap(endpoint_t d,
return (void *) m.VMRE_RETA;
}
PUBLIC void *vm_remap_ro(endpoint_t d,
void *vm_remap_ro(endpoint_t d,
endpoint_t s,
void *da,
void *sa,
@@ -106,7 +106,7 @@ PUBLIC void *vm_remap_ro(endpoint_t d,
return (void *) m.VMRE_RETA;
}
PUBLIC int vm_unmap(endpoint_t endpt, void *addr)
int vm_unmap(endpoint_t endpt, void *addr)
{
message m;
@@ -116,7 +116,7 @@ PUBLIC int vm_unmap(endpoint_t endpt, void *addr)
return _syscall(VM_PROC_NR, VM_SHM_UNMAP, &m);
}
PUBLIC unsigned long vm_getphys(int endpt, void *addr)
unsigned long vm_getphys(int endpt, void *addr)
{
message m;
int r;
@@ -130,7 +130,7 @@ PUBLIC unsigned long vm_getphys(int endpt, void *addr)
return m.VMPHYS_RETA;
}
PUBLIC u8_t vm_getrefcount(endpoint_t endpt, void *addr)
u8_t vm_getrefcount(endpoint_t endpt, void *addr)
{
message m;
int r;

View File

@@ -23,7 +23,7 @@ __weak_alias(umount2, _umount2)
static char fspath[] = "/sbin/:/usr/pkg/bin/"; /* Must include trailing '/' */
PRIVATE int rs_down(char *label)
static int rs_down(char *label)
{
char cmd[200];
if(strlen(_PATH_SERVICE)+strlen(label)+50 >= sizeof(cmd))
@@ -32,7 +32,7 @@ PRIVATE int rs_down(char *label)
return system(cmd);
}
PUBLIC int mount(special, name, mountflags, type, args)
int mount(special, name, mountflags, type, args)
char *name, *special, *type, *args;
int mountflags;
{
@@ -163,13 +163,13 @@ int mountflags;
return r;
}
PUBLIC int umount(name)
int umount(name)
_CONST char *name;
{
return umount2(name, 0);
}
PUBLIC int umount2(name, flags)
int umount2(name, flags)
_CONST char *name;
int flags;
{

View File

@@ -11,9 +11,9 @@ __weak_alias(open, _open)
#endif
#if _ANSI
PUBLIC int open(const char *name, int flags, ...)
int open(const char *name, int flags, ...)
#else
PUBLIC int open(const char *name, int flags)
int open(const char *name, int flags)
#endif
{
va_list argp;

View File

@@ -12,7 +12,7 @@
__weak_alias(pathconf, _pathconf)
#endif
PUBLIC long pathconf(path, name)
long pathconf(path, name)
_CONST char *path; /* name of file being interrogated */
int name; /* property being inspected */
{

View File

@@ -10,7 +10,7 @@ __weak_alias(sbrk, _sbrk)
extern char *_brksize;
PUBLIC void *sbrk(incr)
void *sbrk(incr)
intptr_t incr;
{
char *newsize, *oldsize;

View File

@@ -8,7 +8,7 @@
__weak_alias(vfork, _vfork)
#endif
PUBLIC pid_t vfork()
pid_t vfork()
{
message m;