forked from KolibriOS/kolibrios
NewLib:
- Added basic support for dirent.h; - Added memory.h for compatibility; - Added ftruncate() function; - Fixed date and time structures in ksys_file_info_t. git-svn-id: svn://kolibrios.org@9954 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
41
contrib/sdk/sources/newlib/libc/include/dirent.h
Normal file
41
contrib/sdk/sources/newlib/libc/include/dirent.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) KolibriOS team 2024. All rights reserved.
|
||||
* Distributed under terms of the GNU General Public License
|
||||
*/
|
||||
|
||||
#ifndef _DIRENT_H_
|
||||
#define _DIRENT_H_
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/ksys.h>
|
||||
|
||||
_BEGIN_STD_C
|
||||
|
||||
#define DT_UNKNOWN 0
|
||||
#define DT_DIR 4
|
||||
#define DT_REG 8
|
||||
|
||||
struct dirent {
|
||||
ino_t d_ino;
|
||||
unsigned d_type;
|
||||
char d_name[KSYS_FNAME_UTF8_SIZE];
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
char* path;
|
||||
uint32_t pos;
|
||||
struct dirent last_entry;
|
||||
} DIR;
|
||||
|
||||
DIR* _DEFUN(opendir, (name), const char *name);
|
||||
int _DEFUN(closedir, (dirp), register DIR *dirp);
|
||||
void _DEFUN(seekdir, (dirp, loc), DIR *dirp _AND long loc);
|
||||
void _DEFUN(rewinddir, (dirp), DIR *dirp);
|
||||
long _DEFUN(telldir, (dirp), DIR *dirp);
|
||||
|
||||
struct dirent *_DEFUN(readdir, (dirp), register DIR *dirp);
|
||||
|
||||
_END_STD_C
|
||||
|
||||
#endif /* _DIRENT_H_ */
|
Reference in New Issue
Block a user