Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C library #604

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions compiler/posixc/include/aros/posixc/sys/stat.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ __BEGIN_DECLS
int chmod(const char *path, mode_t mode);
int fchmod(int fildes, mode_t mode);
/* NOTIMPL int fchmodat(int, const char *, mode_t, int); */
#if !defined(NO_POSIX_WRAPPERS)
int __posixc_fstat(int fd, struct stat *sb);
int fstat64(int fd, struct stat64 *sb);
#if defined(__USE_FILE_OFFSET64)
Expand All @@ -152,8 +153,12 @@ static __inline__ int fstat(int fd, struct stat *sb)
return __posixc_fstat(fd, sb);
}
#endif
#else /* NO_POSIX_WRAPPERS */
int fstat(int fd, struct stat *sb);
#endif /* NO_POSIX_WRAPPERS */
/* NOTIMPL int fstatat(int, const char *restrict, struct stat *restrict, int); */
/* NOTIMPL int futimens(int, const struct timespec [2]); */
#if !defined(NO_POSIX_WRAPPERS)
int __posixc_lstat(const char * restrict path, struct stat * restrict sb);
int lstat64(const char * restrict path, struct stat64 * restrict sb);
#if defined(__USE_FILE_OFFSET64)
Expand All @@ -168,12 +173,16 @@ static __inline__ int lstat(const char * restrict path, struct stat * restrict
return __posixc_lstat(path, sb);
}
#endif
#else /* NO_POSIX_WRAPPERS */
int lstat(const char * restrict path, struct stat * restrict sb);
#endif /* NO_POSIX_WRAPPERS */
int mkdir(const char *path, mode_t mode);
/* NOTIMPL int mkdirat(int, const char *, mode_t); */
/* NOTIMPL int mkfifo(const char *path, mode_t mode); */
/* NOTIMPL int mkfifoat(int, const char *, mode_t); */
int mknod(const char *path, mode_t mode, dev_t dev);
/* NOTIMPL int mknodat(int, const char *, mode_t, dev_t); */
#if !defined(NO_POSIX_WRAPPERS)
int __posixc_stat(const char * restrict path, struct stat * restrict sb);
int stat64(const char * restrict path, struct stat64 * restrict sb);
#if defined(__USE_FILE_OFFSET64)
Expand All @@ -188,6 +197,9 @@ static __inline__ int stat(const char * restrict path, struct stat * restrict s
return __posixc_stat(path, sb);
}
#endif
#else /* NO_POSIX_WRAPPERS */
int stat(const char * restrict path, struct stat * restrict sb);
#endif /* NO_POSIX_WRAPPERS */
mode_t umask(mode_t numask);
/* NOTIMPL int utimensat(int, const char *, const struct timespec [2], int); */

Expand Down
10 changes: 7 additions & 3 deletions compiler/posixc/include/aros/types/ino_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@

#include <aros/cpu.h>

#if (__WORDSIZE==64)
typedef signed AROS_64BIT_TYPE __ino_t;
#else
typedef signed AROS_32BIT_TYPE __ino_t;
#endif
typedef signed AROS_64BIT_TYPE __ino64_t;

#if defined(__USE_XOPEN)
# if !defined(__ino_t_defined)
/* NOTIMPL # if !defined(__USE_FILE_OFFSET64) */
# if !defined(__USE_FILE_OFFSET64)
typedef __ino_t ino_t;
/* NOTIMPL # else
# else
typedef __ino64_t ino_t;
# endif */
# endif
# define __ino_t_defined
# endif
# if defined(__USE_LARGEFILE64) && !defined(__ino64_t_defined)
Expand Down
9 changes: 9 additions & 0 deletions compiler/stdc/include/aros/types/fpos_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@

#include <aros/cpu.h>

#if (__WORDSIZE==64)
typedef unsigned AROS_64BIT_TYPE __fpos_t;
#else
typedef unsigned AROS_32BIT_TYPE __fpos_t;
#endif
typedef unsigned AROS_64BIT_TYPE __fpos64_t;

#if !defined(__fpos_t_defined)
Expand All @@ -22,4 +26,9 @@ typedef __fpos64_t fpos_t;
# define __fpos_t_defined
#endif

#if defined(__USE_LARGEFILE64) && !defined(__fpos64_t_defined)
# define __fpos64_t_defined
typedef __fpos64_t fpos64_t;
#endif

#endif /* _AROS_TYPES_FPOS_T_H */
7 changes: 6 additions & 1 deletion compiler/stdc/include/aros/types/time_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@

#include <aros/cpu.h>

typedef signed AROS_32BIT_TYPE time_t;
typedef signed AROS_32BIT_TYPE __time_t;

#if !defined(__time_t_defined)
typedef __time_t time_t;
# define __time_t_defined
#endif

#endif /* _AROS_TYPES_TIME_T_H */