posix: sys/stat.h: move declarations to posix_types.h
A number of types such as uid_t, gitd_t, etc, were defined in sys/stat.h to workaround compatibility issues many years ago. Since posix_types.h is slated to become equivalent to sys/types.h in terms of standard headers, move these types to where they belong. For more information, please see https://pubs.opengroup.org/onlinepubs/9699919799/\ basedefs/sys_types.h.html Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This commit is contained in:
parent
81f5205006
commit
6667b500c6
2 changed files with 42 additions and 35 deletions
|
|
@ -21,6 +21,48 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined(_DEV_T_DECLARED) && !defined(__dev_t_defined)
|
||||
typedef int dev_t;
|
||||
#define _DEV_T_DECLARED
|
||||
#define __dev_t_defined
|
||||
#endif
|
||||
|
||||
#if !defined(_INO_T_DECLARED) && !defined(__ino_t_defined)
|
||||
typedef int ino_t;
|
||||
#define _INO_T_DECLARED
|
||||
#define __ino_t_defined
|
||||
#endif
|
||||
|
||||
#if !defined(_NLINK_T_DECLARED) && !defined(__nlink_t_defined)
|
||||
typedef unsigned short nlink_t;
|
||||
#define _NLINK_T_DECLARED
|
||||
#define __nlink_t_defined
|
||||
#endif
|
||||
|
||||
#if !defined(_UID_T_DECLARED) && !defined(__uid_t_defined)
|
||||
typedef unsigned short uid_t;
|
||||
#define _UID_T_DECLARED
|
||||
#define __uid_t_defined
|
||||
#endif
|
||||
|
||||
#if !defined(_GID_T_DECLARED) && !defined(__gid_t_defined)
|
||||
typedef unsigned short gid_t;
|
||||
#define _GID_T_DECLARED
|
||||
#define __gid_t_defined
|
||||
#endif
|
||||
|
||||
#if !defined(_BLKSIZE_T_DECLARED) && !defined(__blksize_t_defined)
|
||||
typedef unsigned long blksize_t;
|
||||
#define _BLKSIZE_T_DECLARED
|
||||
#define __blksize_t_defined
|
||||
#endif
|
||||
|
||||
#if !defined(_BLKCNT_T_DECLARED) && !defined(__blkcnt_t_defined)
|
||||
typedef unsigned long blkcnt_t;
|
||||
#define _BLKCNT_T_DECLARED
|
||||
#define __blkcnt_t_defined
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_ARCMWDT_LIBC)
|
||||
typedef int pid_t;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -39,41 +39,6 @@ extern "C" {
|
|||
|
||||
#include <zephyr/posix/posix_types.h>
|
||||
|
||||
#ifndef _DEV_T_DECLARED
|
||||
typedef int dev_t;
|
||||
#define _DEV_T_DECLARED
|
||||
#endif
|
||||
|
||||
#ifndef _INO_T_DECLARED
|
||||
typedef int ino_t;
|
||||
#define _INO_T_DECLARED
|
||||
#endif
|
||||
|
||||
#ifndef _NLINK_T_DECLARED
|
||||
typedef unsigned short nlink_t;
|
||||
#define _NLINK_T_DECLARED
|
||||
#endif
|
||||
|
||||
#ifndef _UID_T_DECLARED
|
||||
typedef unsigned short uid_t;
|
||||
#define _UID_T_DECLARED
|
||||
#endif
|
||||
|
||||
#ifndef _GID_T_DECLARED
|
||||
typedef unsigned short gid_t;
|
||||
#define _GID_T_DECLARED
|
||||
#endif
|
||||
|
||||
#ifndef _BLKSIZE_T_DECLARED
|
||||
typedef unsigned long blksize_t;
|
||||
#define _BLKSIZE_T_DECLARED
|
||||
#endif
|
||||
|
||||
#ifndef _BLKCNT_T_DECLARED
|
||||
typedef unsigned long blkcnt_t;
|
||||
#define _BLKCNT_T_DECLARED
|
||||
#endif
|
||||
|
||||
/* dj's stat defines _STAT_H_ */
|
||||
#ifndef _STAT_H_
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue