Remove the types Dev_t, _mnx_Gui, _mnx_Uid, and similar.
Use ANSI-style function declarations where necessary.
This commit is contained in:
@@ -127,7 +127,7 @@ struct group *getgrent(void)
|
||||
}
|
||||
}
|
||||
|
||||
struct group *getgrgid(_mnx_Gid_t gid)
|
||||
struct group *getgrgid(gid_t gid)
|
||||
/* Return the group file entry belonging to the user-id. */
|
||||
{
|
||||
struct group *gr;
|
||||
|
||||
@@ -120,7 +120,7 @@ struct passwd *getpwent(void)
|
||||
}
|
||||
}
|
||||
|
||||
struct passwd *getpwuid(_mnx_Uid_t uid)
|
||||
struct passwd *getpwuid(uid_t uid)
|
||||
/* Return the password file entry belonging to the user-id. */
|
||||
{
|
||||
struct passwd *pw;
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
#define chmod _chmod
|
||||
#include <sys/stat.h>
|
||||
|
||||
PUBLIC int chmod(name, mode)
|
||||
_CONST char *name;
|
||||
_mnx_Mode_t mode;
|
||||
PUBLIC int chmod(const char *name, mode_t mode)
|
||||
{
|
||||
message m;
|
||||
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
PUBLIC int chown(name, owner, grp)
|
||||
_CONST char *name;
|
||||
_mnx_Uid_t owner;
|
||||
_mnx_Gid_t grp;
|
||||
PUBLIC int chown(const char *name, uid_t owner, gid_t grp)
|
||||
{
|
||||
message m;
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
#define creat _creat
|
||||
#include <fcntl.h>
|
||||
|
||||
PUBLIC int creat(name, mode)
|
||||
_CONST char *name;
|
||||
_mnx_Mode_t mode;
|
||||
PUBLIC int creat(const char *name, mode_t mode)
|
||||
{
|
||||
message m;
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
#define fchmod _fchmod
|
||||
#include <sys/stat.h>
|
||||
|
||||
PUBLIC int fchmod(fd, mode)
|
||||
int fd;
|
||||
_mnx_Mode_t mode;
|
||||
PUBLIC int fchmod(int fd, mode_t mode)
|
||||
{
|
||||
message m;
|
||||
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
PUBLIC int fchown(fd, owner, grp)
|
||||
int fd;
|
||||
_mnx_Uid_t owner;
|
||||
_mnx_Gid_t grp;
|
||||
PUBLIC int fchown(int fd, uid_t owner, gid_t grp)
|
||||
{
|
||||
message m;
|
||||
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
|
||||
PUBLIC int mkdir(name, mode)
|
||||
_CONST char *name;
|
||||
_mnx_Mode_t mode;
|
||||
PUBLIC int mkdir(const char *name, mode_t mode)
|
||||
{
|
||||
message m;
|
||||
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
PUBLIC int mkfifo(name, mode)
|
||||
_CONST char *name;
|
||||
_mnx_Mode_t mode;
|
||||
PUBLIC int mkfifo(const char *name, mode_t mode)
|
||||
{
|
||||
return mknod(name, mode | S_IFIFO, (Dev_t) 0);
|
||||
return mknod(name, mode | S_IFIFO, (dev_t) 0);
|
||||
}
|
||||
|
||||
@@ -4,10 +4,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
PUBLIC int mknod(name, mode, dev)
|
||||
_CONST char *name;
|
||||
_mnx_Mode_t mode;
|
||||
Dev_t dev;
|
||||
PUBLIC int mknod(const char *name, mode_t mode, dev_t dev)
|
||||
{
|
||||
message m;
|
||||
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
#if _ANSI
|
||||
PUBLIC int open(const char *name, int flags, ...)
|
||||
#else
|
||||
PUBLIC int open(name, flags)
|
||||
_CONST char *name;
|
||||
int flags;
|
||||
PUBLIC int open(const char *name, int flags)
|
||||
#endif
|
||||
{
|
||||
va_list argp;
|
||||
@@ -19,7 +17,7 @@ int flags;
|
||||
if (flags & O_CREAT) {
|
||||
m.m1_i1 = strlen(name) + 1;
|
||||
m.m1_i2 = flags;
|
||||
m.m1_i3 = va_arg(argp, _mnx_Mode_t);
|
||||
m.m1_i3 = va_arg(argp, mode_t);
|
||||
m.m1_p1 = (char *) name;
|
||||
} else {
|
||||
_loadname(name, &m);
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#define setegid _setegid
|
||||
#include <unistd.h>
|
||||
|
||||
PUBLIC int setgid(grp)
|
||||
gid_t grp;
|
||||
PUBLIC int setgid(gid_t grp)
|
||||
{
|
||||
message m;
|
||||
|
||||
@@ -12,8 +11,7 @@ gid_t grp;
|
||||
return(_syscall(MM, SETGID, &m));
|
||||
}
|
||||
|
||||
PUBLIC int setegid(grp)
|
||||
gid_t grp;
|
||||
PUBLIC int setegid(gid_t grp)
|
||||
{
|
||||
message m;
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#define seteuid _seteuid
|
||||
#include <unistd.h>
|
||||
|
||||
PUBLIC int setuid(usr)
|
||||
_mnx_Uid_t usr;
|
||||
PUBLIC int setuid(uid_t usr)
|
||||
{
|
||||
message m;
|
||||
|
||||
@@ -12,8 +11,7 @@ _mnx_Uid_t usr;
|
||||
return(_syscall(MM, SETUID, &m));
|
||||
}
|
||||
|
||||
PUBLIC int seteuid(usr)
|
||||
_mnx_Uid_t usr;
|
||||
PUBLIC int seteuid(uid_t usr)
|
||||
{
|
||||
message m;
|
||||
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#define umask _umask
|
||||
#include <sys/stat.h>
|
||||
|
||||
PUBLIC mode_t umask(complmode)
|
||||
_mnx_Mode_t complmode;
|
||||
PUBLIC mode_t umask(mode_t complmode)
|
||||
{
|
||||
message m;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#define O_APPEND 0x040
|
||||
|
||||
int _open(const char *path, int flags);
|
||||
int _creat(const char *path, _mnx_Mode_t mode);
|
||||
int _creat(const char *path, mode_t mode);
|
||||
int _close(int d);
|
||||
|
||||
FILE *
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#define O_APPEND 0x040
|
||||
|
||||
int _open(const char *path, int flags);
|
||||
int _creat(const char *path, _mnx_Mode_t mode);
|
||||
int _creat(const char *path, mode_t mode);
|
||||
int _close(int d);
|
||||
|
||||
FILE *
|
||||
|
||||
Reference in New Issue
Block a user