update jffs2, now it can be built with gcc(NEWLIB is needed!)
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2453 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
3d4e0db73b
commit
564ca94007
@ -68,8 +68,13 @@
|
|||||||
|
|
||||||
#include <stddef.h> // NULL, size_t
|
#include <stddef.h> // NULL, size_t
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#if defined(__GNUC__) && !defined(__CC_ARM)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#else
|
||||||
|
#include <port/sys/types.h>
|
||||||
|
#include <port/fcntl.h>
|
||||||
|
#endif
|
||||||
//#include "os_sys_stat.h"//#include <sys/stat.h>
|
//#include "os_sys_stat.h"//#include <sys/stat.h>
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -16,7 +16,8 @@
|
|||||||
|
|
||||||
#include "cyg/infra/cyg_type.h"
|
#include "cyg/infra/cyg_type.h"
|
||||||
#include "cyg/fileio/fileio.h"
|
#include "cyg/fileio/fileio.h"
|
||||||
#include "codes.h"
|
#include "port/codes.h"
|
||||||
|
#include "port/fcntl.h"
|
||||||
#undef mode_t
|
#undef mode_t
|
||||||
|
|
||||||
#include <dfs_fs.h>
|
#include <dfs_fs.h>
|
||||||
|
@ -1,6 +1,35 @@
|
|||||||
#ifndef CYGONCE_ISO_FCNTL_H
|
#ifndef CYGONCE_ISO_FCNTL_H
|
||||||
#define CYGONCE_ISO_FCNTL_H
|
#define CYGONCE_ISO_FCNTL_H
|
||||||
|
/*------------------------------------------------------------------------*/
|
||||||
|
/* for dfs_jffs2.c */
|
||||||
|
/*------------------------------------------------------------------------*/
|
||||||
|
/* File access modes used for open() and fnctl() */
|
||||||
|
#define JFFS2_O_RDONLY (DFS_O_RDONLY) /* Open for reading only */
|
||||||
|
#define JFFS2_O_WRONLY (DFS_O_WRONLY) /* Open for writing only */
|
||||||
|
#define JFFS2_O_RDWR (DFS_O_RDONLY|DFS_O_WRONLY) /* Open for reading and writing */
|
||||||
|
|
||||||
|
/* File access mode mask */
|
||||||
|
#define JFFS2_O_ACCMODE (DFS_O_RDONLY|DFS_O_RDWR|DFS_O_WRONLY)
|
||||||
|
|
||||||
|
/* open() mode flags */
|
||||||
|
|
||||||
|
#define JFFS2_O_CREAT (DFS_O_CREAT) /* Create file it it does not exist */
|
||||||
|
#define JFFS2_O_EXCL (DFS_O_EXCL) /* Exclusive use */
|
||||||
|
#define JFFS2_O_NOCTTY (DFS_O_NOCTTY) /* Do not assign a controlling terminal */
|
||||||
|
#define JFFS2_O_TRUNC (DFS_O_TRUNC) /* Truncate */
|
||||||
|
|
||||||
|
/* File status flags used for open() and fcntl() */
|
||||||
|
#define JFFS2_O_APPEND (DFS_O_APPEND) /* Set append mode */
|
||||||
|
#define JFFS2_O_DSYNC (DFS_O_DSYNC) /* Synchronized I/O data integrity writes */
|
||||||
|
#define JFFS2_O_NONBLOCK (DFS_O_NONBLOCK)/* No delay */
|
||||||
|
#define JFFS2_O_RSYNC (DFS_O_RSYNC) /* Synchronized read I/O */
|
||||||
|
#define JFFS2_O_SYNC (DFS_O_SYNC) /* Synchronized I/O file integrity writes */
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------*/
|
||||||
|
/* for dfs_jffs2.c */
|
||||||
|
/*------------------------------------------------------------------------*/
|
||||||
|
#if defined(__CC_ARM) || defined(MSVC)
|
||||||
/* File access modes used for open() and fnctl() */
|
/* File access modes used for open() and fnctl() */
|
||||||
#define O_RDONLY (1<<0) /* Open for reading only */
|
#define O_RDONLY (1<<0) /* Open for reading only */
|
||||||
#define O_WRONLY (1<<1) /* Open for writing only */
|
#define O_WRONLY (1<<1) /* Open for writing only */
|
||||||
@ -23,31 +52,7 @@
|
|||||||
#define O_RSYNC (1<<10) /* Synchronized read I/O */
|
#define O_RSYNC (1<<10) /* Synchronized read I/O */
|
||||||
#define O_SYNC (1<<11) /* Synchronized I/O file integrity writes */
|
#define O_SYNC (1<<11) /* Synchronized I/O file integrity writes */
|
||||||
|
|
||||||
/*------------------------------------------------------------------------*/
|
|
||||||
/* for dfs_jffs2.c */
|
|
||||||
/*------------------------------------------------------------------------*/
|
|
||||||
/* File access modes used for open() and fnctl() */
|
|
||||||
#define JFFS2_O_RDONLY (1<<0) /* Open for reading only */
|
|
||||||
#define JFFS2_O_WRONLY (1<<1) /* Open for writing only */
|
|
||||||
#define JFFS2_O_RDWR (O_RDONLY|O_WRONLY) /* Open for reading and writing */
|
|
||||||
|
|
||||||
/* File access mode mask */
|
|
||||||
#define JFFS2_O_ACCMODE (O_RDONLY|O_RDWR|O_WRONLY)
|
|
||||||
|
|
||||||
/* open() mode flags */
|
|
||||||
|
|
||||||
#define JFFS2_O_CREAT (1<<3) /* Create file it it does not exist */
|
|
||||||
#define JFFS2_O_EXCL (1<<4) /* Exclusive use */
|
|
||||||
#define JFFS2_O_NOCTTY (1<<5) /* Do not assign a controlling terminal */
|
|
||||||
#define JFFS2_O_TRUNC (1<<6) /* Truncate */
|
|
||||||
|
|
||||||
/* File status flags used for open() and fcntl() */
|
|
||||||
#define JFFS2_O_APPEND (1<<7) /* Set append mode */
|
|
||||||
#define JFFS2_O_DSYNC (1<<8) /* Synchronized I/O data integrity writes */
|
|
||||||
#define JFFS2_O_NONBLOCK (1<<9) /* No delay */
|
|
||||||
#define JFFS2_O_RSYNC (1<<10) /* Synchronized read I/O */
|
|
||||||
#define JFFS2_O_SYNC (1<<11) /* Synchronized I/O file integrity writes */
|
|
||||||
|
|
||||||
#endif /* CYGONCE_ISO_FCNTL_H multiple inclusion protection */
|
#endif /* CYGONCE_ISO_FCNTL_H multiple inclusion protection */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* EOF fcntl.h */
|
/* EOF fcntl.h */
|
@ -66,9 +66,7 @@
|
|||||||
*/
|
*/
|
||||||
//#define __need_size_t
|
//#define __need_size_t
|
||||||
//#include <stddef.h>
|
//#include <stddef.h>
|
||||||
#include "codes.h"
|
#include "port/codes.h"
|
||||||
|
|
||||||
typedef long ssize_t;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#ifndef dev_t
|
#ifndef dev_t
|
||||||
@ -323,11 +321,15 @@ typedef unsigned long mode_t;
|
|||||||
typedef unsigned int ino_t;
|
typedef unsigned int ino_t;
|
||||||
typedef unsigned int dev_t;
|
typedef unsigned int dev_t;
|
||||||
typedef int time_t;
|
typedef int time_t;
|
||||||
|
typedef long ssize_t;
|
||||||
#elif defined(__CC_ARM)
|
#elif defined(__CC_ARM)
|
||||||
#define mode_t unsigned long
|
#define mode_t unsigned long
|
||||||
typedef unsigned int ino_t;
|
typedef unsigned int ino_t;
|
||||||
typedef unsigned int dev_t;
|
typedef unsigned int dev_t;
|
||||||
|
typedef long ssize_t;
|
||||||
typedef long time_t;
|
typedef long time_t;
|
||||||
|
#elif defined(__GNUC__) && !defined(__CC_ARM)
|
||||||
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct stat {
|
struct stat {
|
@ -1,2 +1,2 @@
|
|||||||
//#include <errno.h>
|
//#include <errno.h>
|
||||||
#include "codes.h" //fixme
|
#include "port/codes.h" //fixme
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define __LINUX_STAT_H__
|
#define __LINUX_STAT_H__
|
||||||
|
|
||||||
|
|
||||||
#include "os_sys_stat.h" //mod by prife
|
#include "port/sys/stat.h" //mod by prife
|
||||||
|
|
||||||
#define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH)
|
#define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH)
|
||||||
#define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH)
|
#define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH)
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
//#else
|
//#else
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
#include "os_sys_stat.h"//#include <sys/types.h>
|
#include "port/sys/stat.h"//#include <sys/types.h>
|
||||||
//#include <fcntl.h>
|
//#include <fcntl.h>
|
||||||
//#include <sys/stat.h>
|
//#include <sys/stat.h>
|
||||||
//#include <errno.h> //fixme
|
//#include <errno.h> //fixme
|
||||||
|
Loading…
x
Reference in New Issue
Block a user