Skip to content

Commit 68e9ee2

Browse files
committed
#96 - vio limits
1 parent abfbe9e commit 68e9ee2

File tree

10 files changed

+701
-202
lines changed

10 files changed

+701
-202
lines changed

mcwin32/libw32/dirent.h

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef LIBW32_DIRENT_H_INCLUDED
22
#define LIBW32_DIRENT_H_INCLUDED
33
#include <edidentifier.h>
4-
__CIDENT_RCSID(gr_libw32_dirent_h,"$Id: dirent.h,v 1.20 2025/03/06 16:59:45 cvsuser Exp $")
4+
__CIDENT_RCSID(gr_libw32_dirent_h,"$Id: dirent.h,v 1.22 2025/03/12 16:08:09 cvsuser Exp $")
55
__CPRAGMA_ONCE
66

77
/* -*- mode: c; indent-width: 4; -*- */
@@ -77,6 +77,12 @@ struct dirent {
7777
#define _DIRENT_HAVE_D_TYPE /* BSD extension */
7878
#endif
7979

80+
#ifndef _GENERIC_DIRSIZ
81+
#define _GENERIC_DIRLEN(__namlen) \
82+
((offsetof(struct dirent, d_name) + ((__namlen) * sizeof(char)) + 1 + 7) & ~7)
83+
#define _GENERIC_DIRSIZ(dp) _GENERIC_DIRLEN((dp)->d_namlen)
84+
#endif
85+
8086
#if defined(_POSIX_SOURCE) && !defined(_DIRENT_SOURCE)
8187
time_t d_reserved1;
8288
time_t d_reserved2;
@@ -109,6 +115,13 @@ struct _wdirent {
109115
unsigned long d_fileno; /* File number directory */
110116
unsigned short d_reclen; /* Length of this record, in bytes */
111117
unsigned short d_namlen; /* Length of string in d_name, excluding terminating null; in characters. */
118+
119+
#ifndef _GENERIC_WDIRSIZ
120+
#define _GENERIC_WDIRLEN(__namlen) \
121+
((offsetof(struct dirent, d_name) + ((__namlen) * sizeof(wchar_t)) + 1 + 7) & ~7)
122+
#define _GENERIC_WDIRSIZ(dp) _GENERIC_WDIRLEN((dp)->d_namlen)
123+
#endif
124+
112125
#if defined(_POSIX_SOURCE) && !defined(_DIRENT_SOURCE)
113126
time_t d_reserved1;
114127
time_t d_reserved2;
@@ -229,12 +242,12 @@ LIBW32_API void _wseekdir __P((_WDIR *, long));
229242
LIBW32_API long _wtelldir __P((_WDIR *));
230243
LIBW32_API int _wreaddir_r __P((_WDIR *, struct _wdirent *, struct _wdirent **)); /*deprecated*/
231244

232-
//LIBW32_API int alphasort __P((const void *, const void *));
233-
//LIBW32_API int scandir __P((void));
234-
//LIBW32_API int getdirentries __P((int, char *, int, long *));
245+
LIBW32_API int alphasort __P((const struct dirent **, const struct dirent **));
246+
LIBW32_API int scandir __P((const char *, struct dirent ***,
247+
int (*sel)(const struct dirent *), int (*compar)(const struct dirent **, const struct dirent **)));
248+
235249
#endif /*_POSIX_SOURCE*/
236250

237251
__END_DECLS
238252

239253
#endif /*LIBW32_DIRENT_H_INCLUDED*/
240-

mcwin32/libw32/sys/statfs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef LIBW32_SYS_STATFS_H_INCLUDED
22
#define LIBW32_SYS_STATFS_H_INCLUDED
33
#include <edidentifier.h>
4-
__CIDENT_RCSID(gr_libw32_sys_statfs_h,"$Id: statfs.h,v 1.12 2025/03/08 16:40:00 cvsuser Exp $")
4+
__CIDENT_RCSID(gr_libw32_sys_statfs_h,"$Id: statfs.h,v 1.13 2025/03/12 17:38:50 cvsuser Exp $")
55
__CPRAGMA_ONCE
66

77
/* -*- mode: c; indent-width: 4; -*- */
@@ -45,7 +45,7 @@ __CPRAGMA_ONCE
4545
#define MNAMELEN 90 /* length of buffer for returned name */
4646

4747
typedef struct fsid { /* file system id type */
48-
unsigned long val[2];
48+
unsigned long val[2];
4949
} fsid_t;
5050

5151
struct statfs {

0 commit comments

Comments
 (0)