adding files for kernel32/crtdll

svn path=/trunk/; revision=178
This commit is contained in:
Rex Jolliff 1999-01-17 17:49:46 +00:00
parent 107f6406fc
commit ac9c590908
3 changed files with 225 additions and 0 deletions

View file

@ -0,0 +1,33 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#ifndef __dj_include_libc_atexit_h__
#define __dj_include_libc_dosexec_h__
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
#ifndef __STRICT_ANSI__
#ifndef _POSIX_SOURCE
struct __atexit {
struct __atexit *__next;
void (*__function)(void);
};
extern struct __atexit *__atexit_ptr;
#endif /* !_POSIX_SOURCE */
#endif /* !__STRICT_ANSI__ */
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
#ifndef __dj_ENFORCE_FUNCTION_CALLS
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
#ifdef __cplusplus
}
#endif
#endif /* __dj_include_libc_dosexec_h__ */

View file

@ -0,0 +1,64 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#ifndef __dj_include_libc_file_h__
#define __dj_include_libc_file_h__
#include <stdio.h>
#include <fcntl.h>
//#include <libc/dosio.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
#ifndef __STRICT_ANSI__
#ifndef _POSIX_SOURCE
#ifndef _IORMONCL
#define _IORMONCL 004000 /* remove on close, for temp files */
#endif
/* if _flag & _IORMONCL, ._name_to_remove needs freeing */
#ifndef _IOUNGETC
#define _IOUNGETC 010000 /* there is an ungetc'ed character in the buffer */
#endif
int _flsbuf(int, FILE*);
int _filbuf(FILE *);
void _fwalk(void (*)(FILE *));
char __is_text_file(FILE *p);
int _doprnt(const char *fmt, va_list args, FILE *f);
int _doscan(FILE *iop, const char *fmt, void **argp);
void *filehnd(int fileno);
int __fileno_dup2( int handle1, int handle2 );
int __fileno_setmode(int _fd, int _newmode);
int __fileno_close(int _fd);
#undef fileno
#define fileno(f) (f->_file)
#undef feof
#define feof(f) (((f)->_flag&_IOEOF)!=0)
#undef ferror
#define ferror(f) (((f)->_flag&_IOERR)!=0)
#endif /* !_POSIX_SOURCE */
#endif /* !__STRICT_ANSI__ */
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
#ifndef __dj_ENFORCE_FUNCTION_CALLS
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
#ifdef __cplusplus
}
#endif
#endif /* __dj_include_libc_file_h__ */

128
reactos/include/sys/stat.h Normal file
View file

@ -0,0 +1,128 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#ifndef __dj_include_sys_stat_h_
#define __dj_include_sys_stat_h_
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
#ifndef __STRICT_ANSI__
#define S_ISBLK(m) (((m) & 0xf000) == 0x1000)
#define S_ISCHR(m) (((m) & 0xf000) == 0x2000)
#define S_ISDIR(m) (((m) & 0xf000) == 0x3000)
#define S_ISFIFO(m) (((m) & 0xf000) == 0x4000)
#define S_ISREG(m) (((m) & 0xf000) == 0x0000)
#define S_ISUID 0x80000000
#define S_ISGID 0x40000000
#define S_IRUSR 00400
#define S_IRGRP 00040
#define S_IROTH 00004
#define S_IWUSR 00200
#define S_IWGRP 00020
#define S_IWOTH 00002
#define S_IXUSR 00100
#define S_IXGRP 00010
#define S_IXOTH 00001
#define S_IRWXU 00700
#define S_IRWXG 00070
#define S_IRWXO 00007
#include <sys/types.h>
#include <internal/types.h>
//#include <sys/djtypes.h>
__DJ_time_t
#undef __DJ_time_t
#define __DJ_time_t
struct stat {
time_t st_atime;
time_t st_ctime;
dev_t st_dev;
gid_t st_gid;
ino_t st_ino;
mode_t st_mode;
time_t st_mtime;
nlink_t st_nlink;
off_t st_size;
off_t st_blksize;
uid_t st_uid;
dev_t st_rdev; /* unused */
};
int chmod(const char *_path, mode_t _mode);
int fstat(int _fildes, struct stat *_buf);
//int mkdir(const char *_path, mode_t _mode);
int mkfifo(const char *_path, mode_t _mode);
int stat(const char *_path, struct stat *_buf);
mode_t umask(mode_t _cmask);
#ifndef _POSIX_SOURCE
/* POSIX.1 doesn't mention these at all */
#define S_IFMT 0xf000
#define S_IFREG 0x0000
#define S_IFBLK 0x1000
#define S_IFCHR 0x2000
#define S_IFDIR 0x3000
#define S_IFIFO 0x4000
#define S_IFFIFO S_IFIFO
#define S_IFLABEL 0x5000
#define S_ISLABEL(m) (((m) & 0xf000) == 0x5000)
void _fixpath(const char *, char *);
unsigned short _get_magic(const char *, int);
int _is_executable(const char *, int, const char *);
int mknod(const char *_path, mode_t _mode, dev_t _dev);
char * _truename(const char *, char *);
/* Bit-mapped variable _djstat_flags describes what expensive
f?stat() features our application needs. If you don't need a
feature, set its bit in the variable. By default, all the
bits are cleared (i.e., you get the most expensive code). */
#define _STAT_INODE 1 /* should we bother getting inode numbers? */
#define _STAT_EXEC_EXT 2 /* get execute bits from file extension? */
#define _STAT_EXEC_MAGIC 4 /* get execute bits from magic signature? */
#define _STAT_DIRSIZE 8 /* compute directory size? */
#define _STAT_ROOT_TIME 0x10 /* try to get root dir time stamp? */
#define _STAT_WRITEBIT 0x20 /* fstat() needs write bit? */
extern unsigned short _djstat_flags;
/* Bit-mapped variable _djstat_fail_bits describes which individual
undocumented features f?stat() failed to use. To get a human-
readable description of the bits, call _djstat_describe_lossage(). */
#define _STFAIL_SDA 1 /* Get SDA call failed */
#define _STFAIL_OSVER 2 /* Unsupported DOS version */
#define _STFAIL_BADSDA 4 /* Bad pointer to SDA */
#define _STFAIL_TRUENAME 8 /* _truename() failed */
#define _STFAIL_HASH 0x10 /* inode defaults to hashing */
#define _STFAIL_LABEL 0x20 /* Root dir, but no volume label */
#define _STFAIL_DCOUNT 0x40 /* dirent_count ridiculously large */
#define _STFAIL_WRITEBIT 0x80 /* fstat() failed to get write access bit */
#define _STFAIL_DEVNO 0x100 /* fstat() failed to get device number */
#define _STFAIL_BADSFT 0x200 /* SFT entry found, but can't be trusted */
#define _STFAIL_SFTIDX 0x400 /* bad SFT index in JFT */
#define _STFAIL_SFTNF 0x800 /* file entry not found in SFT array */
extern unsigned short _djstat_fail_bits;
#endif /* !_POSIX_SOURCE */
#endif /* !__STRICT_ANSI__ */
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
#ifndef __dj_ENFORCE_FUNCTION_CALLS
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
#ifdef __cplusplus
}
#endif
#endif /* !__dj_include_sys_stat_h_ */