test public
Dependencies: HttpServer_snapshot_mbed-os
posix_types.h
00001 /******************************************************************************* 00002 * DISCLAIMER 00003 * This software is supplied by Renesas Electronics Corporation and is only 00004 * intended for use with Renesas products. No other uses are authorized. This 00005 * software is owned by Renesas Electronics Corporation and is protected under 00006 * all applicable laws, including copyright laws. 00007 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING 00008 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT 00009 * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 00010 * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. 00011 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS 00012 * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE 00013 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR 00014 * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE 00015 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 00016 * Renesas reserves the right, without notice, to make changes to this software 00017 * and to discontinue the availability of this software. By using this software, 00018 * you agree to the additional terms and conditions found by accessing the 00019 * following link: 00020 * http://www.renesas.com/disclaimer* 00021 * Copyright (C) 2009,2012 Renesas Electronics Corporation. All rights reserved. 00022 *******************************************************************************/ 00023 00024 /****************************************************************************** 00025 * 00026 * V. 2.03.00 00027 * $Rev: $ 00028 * $Date:: $ 00029 * 00030 * Description : POSIX types 00031 * 00032 *****************************************************************************/ 00033 00034 #ifndef POSIXTYPES_H_INCLUDED 00035 #define POSIXTYPES_H_INCLUDED 00036 00037 /*********************************************************************************** 00038 System Includes 00039 ***********************************************************************************/ 00040 00041 00042 /*********************************************************************************** 00043 User Includes 00044 ***********************************************************************************/ 00045 00046 00047 /*********************************************************************************** 00048 Defines 00049 ***********************************************************************************/ 00050 #ifdef __cplusplus 00051 extern "C" { 00052 #endif 00053 00054 /* From <unistd.h> */ 00055 #ifndef SEEK_SET 00056 #define SEEK_SET 0 /* from the biginning of file */ 00057 #define SEEK_CUR 1 /* from the current position in file */ 00058 #define SEEK_END 2 /* from the end of file */ 00059 #endif 00060 00061 /* <unistd.h> POSIX Standard: 2.10 file descriptors for stdin, stdout, 00062 stderr not included with SHC. Therefore defined below. */ 00063 #ifndef STDIN_FILENO 00064 #define STDIN_FILENO (0) 00065 #endif 00066 00067 #ifndef STDOUT_FILENO 00068 #define STDOUT_FILENO (1) 00069 #endif 00070 00071 #ifndef STDERR_FILENO 00072 #define STDERR_FILENO (2) 00073 #endif 00074 00075 00076 /* These values must be as defined under open in the compiler manual 00077 * otherwise the buffered file functions fopen() etc. will not work. 00078 */ 00079 #if(1) /* mbed */ 00080 #define O_ACCMODE_RBSP 00000007 00081 #define O_RDONLY_RBSP 00000001 00082 #define O_WRONLY_RBSP 00000002 00083 #define O_RDWR_RBSP 00000004 00084 #else /* not mbed */ 00085 #define O_ACCMODE 00000007 00086 #define O_RDONLY 00000001 00087 #define O_WRONLY 00000002 00088 #define O_RDWR 00000004 00089 #define O_CREAT 00000010 00090 #define O_EXCL 00000020 00091 #define O_TRUNC 00000040 00092 #define O_APPEND 00002000 00093 #define O_NONBLOCK 00004000 00094 #define O_SYNC 00010000 00095 #endif /* end mbed */ 00096 00097 /*********************************************************************************** 00098 Constant Macros 00099 ***********************************************************************************/ 00100 00101 00102 /*********************************************************************************** 00103 Function Macros 00104 ***********************************************************************************/ 00105 00106 00107 /*********************************************************************************** 00108 Typedefs and Structures 00109 ***********************************************************************************/ 00110 00111 /* The POSIX standard states that:- 00112 mode_t shall be an integer type. 00113 nlink_t, uid_t, gid_t, and id_t shall be integer types. 00114 blkcnt_t and off_t shall be signed integer types. 00115 fsblkcnt_t, fsfilcnt_t, and ino_t shall be defined as unsigned integer types. 00116 size_t shall be an unsigned integer type. 00117 blksize_t, pid_t, and ssize_t shall be signed integer types. 00118 time_t and clock_t shall be integer or real-floating types. 00119 */ 00120 00121 #if(1) /* mbed */ 00122 #ifndef off_t 00123 typedef long off_t; 00124 #endif 00125 #ifndef ssize_t 00126 typedef int ssize_t; 00127 #endif 00128 #else /* not mbed */ 00129 typedef int fsid_t; 00130 typedef long time_t; /* Time in seconds. */ 00131 typedef long long off_t; 00132 typedef unsigned int mode_t; 00133 typedef unsigned int ino_t; 00134 typedef int nlink_t; 00135 typedef int uid_t; 00136 typedef int gid_t; 00137 typedef int dev_t; 00138 typedef int ssize_t; 00139 #endif /* end mbed */ 00140 00141 #if !defined(__cplusplus) && defined(__STRICT_ANSI__) 00142 #if defined (__GNUC__) 00143 typedef unsigned int size_t; 00144 #else /*__GNUC__*/ 00145 typedef unsigned long size_t; 00146 #endif/*__GNUC__*/ 00147 #endif 00148 00149 #ifdef __cplusplus 00150 } 00151 #endif 00152 00153 #endif
Generated on Wed Jul 13 2022 05:33:36 by 1.7.2