1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/cstdlib/LINCSYS/DIRENT.H Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,78 @@
1.4 +/*
1.5 +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +/**
1.24 + @file
1.25 + @publishedAll
1.26 + @released
1.27 +*/
1.28 +
1.29 +#ifndef _SYS_DIRENT_H_
1.30 +#define _SYS_DIRENT_H_
1.31 +
1.32 +#ifdef __cplusplus
1.33 +extern "C" {
1.34 +#endif
1.35 +
1.36 +#include <sys/types.h>
1.37 +
1.38 +typedef struct __EPOC32_DIR DIR;
1.39 +typedef struct __EPOC32_WDIR WDIR;
1.40 +
1.41 +IMPORT_C DIR *opendir (const char *);
1.42 +IMPORT_C WDIR *wopendir (const wchar_t *);
1.43 +IMPORT_C struct dirent *readdir (DIR *);
1.44 +IMPORT_C struct wdirent *wreaddir (WDIR *);
1.45 +IMPORT_C void rewinddir (DIR *);
1.46 +IMPORT_C int closedir (DIR *);
1.47 +IMPORT_C void wrewinddir (WDIR *);
1.48 +IMPORT_C int wclosedir (WDIR *);
1.49 +
1.50 +/**
1.51 +telldir and seekdir aren't required by POSIX
1.52 +*/
1.53 +IMPORT_C off_t telldir(const DIR *);
1.54 +IMPORT_C void seekdir(DIR *,off_t);
1.55 +IMPORT_C off_t wtelldir(const WDIR *);
1.56 +IMPORT_C void wseekdir(WDIR *,off_t);
1.57 +
1.58 +#define __MAXNAMLEN 255
1.59 +
1.60 +#define d_ino d_fileno /* compatibility */
1.61 +
1.62 +struct dirent {
1.63 + unsigned long d_fileno;
1.64 + unsigned short d_namlen;
1.65 + char* d_name;
1.66 +};
1.67 +
1.68 +struct wdirent {
1.69 + unsigned long d_fileno;
1.70 + unsigned short d_namlen;
1.71 + wchar_t* d_name;
1.72 +};
1.73 +
1.74 +#include <sys/reent.h>
1.75 +IMPORT_C DIR *_opendir_r (struct _reent*, const char *);
1.76 +IMPORT_C WDIR *_wopendir_r (struct _reent*, const wchar_t *);
1.77 +IMPORT_C struct dirent *_readdir_r(struct _reent*, DIR *);
1.78 +#ifdef __cplusplus
1.79 +}
1.80 +#endif
1.81 +#endif /* !_SYS_DIRENT_H_ */