mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			Fix C declaration of dir functions and types
This patch fixes the declaration of the DIR type and related functions so that they can be called from C code. This is necessary when enabling functionality that uses the filesystem in mbed TLS.pull/3949/head
							parent
							
								
									cc58a7fb0c
								
							
						
					
					
						commit
						2d0135632d
					
				| 
						 | 
				
			
			@ -50,8 +50,13 @@ typedef int mode_t;     ///< Mode for opening files
 | 
			
		|||
#if __cplusplus
 | 
			
		||||
namespace mbed { class Dir; }
 | 
			
		||||
typedef mbed::Dir DIR;
 | 
			
		||||
#else
 | 
			
		||||
typedef struct Dir DIR;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
    DIR *opendir(const char*);
 | 
			
		||||
    struct dirent *readdir(DIR *);
 | 
			
		||||
    int closedir(DIR*);
 | 
			
		||||
| 
						 | 
				
			
			@ -59,6 +64,7 @@ extern "C" {
 | 
			
		|||
    long telldir(DIR*);
 | 
			
		||||
    void seekdir(DIR*, long);
 | 
			
		||||
    int mkdir(const char *name, mode_t n);
 | 
			
		||||
#if __cplusplus
 | 
			
		||||
};
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue