OrionLibC
Barry Using POSIX names for structs 11f4683 (3 years, 1 month ago)
diff --git a/include/dirent.h b/include/dirent.h
index abdad04..d5ddba7 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -17,10 +17,10 @@ enum DirType {
/* Structure for a Directory Entry */
typedef struct dirent {
- ino_t ino;
- enum DirType type;
- size_t namelen;
- char name[];
+ ino_t d_ino;
+ enum DirType d_type;
+ size_t d_namelen;
+ char d_name[];
} DirEnt;
#ifdef __cplusplus
diff --git a/include/grp.h b/include/grp.h
index a6e07d6..2916b68 100644
--- a/include/grp.h
+++ b/include/grp.h
@@ -3,12 +3,12 @@
/* Structure of a group entry */
typedef struct group {
- char *name;
- gid_t gid;
- char **members;
+ char *gr_name;
+ gid_t gr_gid;
+ char **gr_mem;
} Group;
-Group *getgrname(const char *name);
+Group *getgrnam(const char *name);
Group *getgrgid(gid_t gid);
#endif
diff --git a/include/pwd.h b/include/pwd.h
index df872d4..840ef6c 100644
--- a/include/pwd.h
+++ b/include/pwd.h
@@ -5,16 +5,16 @@
/* Structure of a password entry */
typedef struct passwd {
- char *username;
- char *password;
- uid_t uid;
- gid_t gid;
- char *info;
- char *homedir;
- char *shell;
+ char *pw_name;
+ char *pw_passwd;
+ uid_t pw_uid;
+ gid_t pw_gid;
+ char *pw_gecos;
+ char *pw_dir;
+ char *pw_shell;
} Passwd;
-Passwd *getpwname(const char *username);
+Passwd *getpwnam(const char *username);
Passwd *getpwuid(uid_t uid);
#endif
diff --git a/include/sys/stat.h b/include/sys/stat.h
index b83cf2d..4be596e 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -43,12 +43,13 @@
/* Structure for a stat() call */
typedef struct stat {
- ino_t inode;
- mode_t mode;
- nlink_t nlink;
- uid_t uid;
- gid_t gid;
- size_t size;
+ dev_t st_dev;
+ ino_t st_ino;
+ mode_t st_mode;
+ nlink_t st_nlink;
+ uid_t st_uid;
+ gid_t st_gid;
+ size_t st_size;
} Stat;
#ifdef __cplusplus
diff --git a/include/termios.h b/include/termios.h
index 259695b..3f84cf8 100644
--- a/include/termios.h
+++ b/include/termios.h
@@ -17,11 +17,11 @@ enum TTYLineDiscipline {
typedef unsigned int tcflag_t;
/* Terminal I/O Settings */
-typedef struct Termios {
- tcflag_t iflag;
- tcflag_t oflag;
- tcflag_t cflag;
- tcflag_t lflag;
+typedef struct termios {
+ tcflag_t c_iflag;
+ tcflag_t c_oflag;
+ tcflag_t c_cflag;
+ tcflag_t c_lflag;
} Termios;
/* Terminal Window Size */