summaryrefslogtreecommitdiffstats
path: root/StdLib/Include
diff options
context:
space:
mode:
Diffstat (limited to 'StdLib/Include')
-rw-r--r--StdLib/Include/errno.h3
-rw-r--r--StdLib/Include/sys/EfiCdefs.h6
-rw-r--r--StdLib/Include/sys/errno.h3
-rw-r--r--StdLib/Include/sys/fcntl.h4
-rw-r--r--StdLib/Include/sys/stat.h39
-rw-r--r--StdLib/Include/wchar.h4
-rw-r--r--StdLib/Include/x86/float.h24
7 files changed, 49 insertions, 34 deletions
diff --git a/StdLib/Include/errno.h b/StdLib/Include/errno.h
index db2eb3c71c..a819d0849c 100644
--- a/StdLib/Include/errno.h
+++ b/StdLib/Include/errno.h
@@ -26,7 +26,7 @@
All macro definitions in this list must begin with the letter 'E'
and be followed by a digit or an uppercase letter.
- Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -46,6 +46,7 @@ extern RETURN_STATUS EFIerrno;
// Define error number in terms of the ENUM in <sys/errno.h>
#define ERESTART -1 /* restart syscall */
+#define ESUCCESS __ESUCCESS /* No Problems */
#define EMINERRORVAL __EMINERRORVAL /* 1 The lowest valid error value */
diff --git a/StdLib/Include/sys/EfiCdefs.h b/StdLib/Include/sys/EfiCdefs.h
index c436ff3659..2fa7ba6ae5 100644
--- a/StdLib/Include/sys/EfiCdefs.h
+++ b/StdLib/Include/sys/EfiCdefs.h
@@ -22,7 +22,7 @@
This file and its contents are inspired by the <sys/cdefs.h> files in Berkeley
Unix. They have been re-implemented to be specific to the EFI environment.
- Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -360,8 +360,8 @@ typedef UINTN EFI_ULONG_T;
#if defined(__GNUC__)
#if __GNUC_PREREQ__(4,4)
/* GCC 4.4 or later */
- typedef INT64 LONGN;
- typedef UINT64 ULONGN;
+ typedef INTN LONGN;
+ typedef UINTN ULONGN;
#else
/* minGW gcc variant */
typedef INT32 LONGN;
diff --git a/StdLib/Include/sys/errno.h b/StdLib/Include/sys/errno.h
index 53c9e6903b..50c5af6630 100644
--- a/StdLib/Include/sys/errno.h
+++ b/StdLib/Include/sys/errno.h
@@ -7,7 +7,7 @@
directives. These default values are specified as an enum in order to ease
the maintenance of the values.
- Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -22,6 +22,7 @@
/* Define the error numbers, sequentially, beginning at 1. */
enum {
+ __ESUCCESS = 0, /* 0 For those rare times one needs to say all is OK */
__EMINERRORVAL = 1, /* The lowest valid error value */
__EPERM = __EMINERRORVAL, /* 1 Operation not permitted */
__ENOENT, /* 2 No such file or directory */
diff --git a/StdLib/Include/sys/fcntl.h b/StdLib/Include/sys/fcntl.h
index 819461b492..dba4d2471e 100644
--- a/StdLib/Include/sys/fcntl.h
+++ b/StdLib/Include/sys/fcntl.h
@@ -2,7 +2,7 @@
This file includes the definitions for open and fcntl described by POSIX
for <fcntl.h>; it also includes related kernel definitions.
- Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made
available under the terms and conditions of the BSD License which
accompanies this distribution. The full text of the license may be found
@@ -70,7 +70,7 @@
#define O_APPEND 0x00000008 ///< set append mode
#define O_CREAT 0x00000200 ///< create if nonexistent
#define O_TRUNC 0x00000400 ///< truncate to zero length
-#define O_EXCL 0x00000800 ///< error if already exists
+#define O_EXCL 0x00000800 ///< Grant EXCLusive access, or error if already exists and O_CREAT
#define O_DIRECTORY 0x00001000 ///< error if path is not a directory
#define O_NOCTTY 0x00002000 ///< Don't make this the controlling TTY
diff --git a/StdLib/Include/sys/stat.h b/StdLib/Include/sys/stat.h
index 12520be83a..83fc58025a 100644
--- a/StdLib/Include/sys/stat.h
+++ b/StdLib/Include/sys/stat.h
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made
available under the terms and conditions of the BSD License that
accompanies this distribution. The full text of the license may be found at
@@ -119,21 +119,24 @@ struct stat {
#define S_EFISHIFT 20 // LS bit of the UEFI attributes
-#define S_IFMT _S_IFMT
-#define S_IFBLK _S_IFBLK
-#define S_IFREG _S_IFREG
-#define S_IFIFO _S_IFIFO
-#define S_IFCHR _S_IFCHR
-#define S_IFDIR _S_IFDIR
-#define S_IFSOCK _S_IFSOCK
+#define S_IFMT _S_IFMT
+#define S_IFIFO _S_IFIFO
+#define S_IFCHR _S_IFCHR
+#define S_IFDIR _S_IFDIR
+#define S_IFBLK _S_IFBLK
+#define S_IFREG _S_IFREG
+#define S_IFSOCK _S_IFSOCK
+#define S_ITTY _S_ITTY
+#define S_IWTTY _S_IWTTY
+#define S_ICONSOLE _S_ICONSOLE
-#define S_ISDIR(m) ((m & _S_IFMT) == _S_IFDIR) ///< directory
+#define S_ISFIFO(m) ((m & _S_IFMT) == _S_IFIFO) ///< fifo
#define S_ISCHR(m) ((m & _S_IFMT) == _S_IFCHR) ///< char special
-#define S_ISREG(m) ((m & _S_IFMT) == _S_IFREG) ///< regular file
+#define S_ISDIR(m) ((m & _S_IFMT) == _S_IFDIR) ///< directory
#define S_ISBLK(m) ((m & _S_IFMT) == _S_IFBLK) ///< block special
+#define S_ISREG(m) ((m & _S_IFMT) == _S_IFREG) ///< regular file
#define S_ISSOCK(m) ((m & _S_IFMT) == _S_IFSOCK) ///< socket
-#define S_ISFIFO(m) ((m & _S_IFMT) == _S_IFIFO) ///< fifo
/* The following three macros have been changed to reflect
access permissions that better reflect the UEFI FAT file system.
@@ -191,8 +194,18 @@ __BEGIN_DECLS
**/
int lstat (const char *, struct stat *);
- /**
- **/
+/** Obtains information about the file pointed to by path.
+
+ Opens the file pointed to by path, calls _EFI_FileInfo with the file's handle,
+ then closes the file.
+
+ @param[in] path Path to the file to obtain information about.
+ @param[out] statbuf Buffer in which the file status is put.
+
+ @retval 0 Successful Completion.
+ @retval -1 An error has occurred and errno has been set to
+ identify the error.
+**/
int stat (const char *, struct stat *);
/**
diff --git a/StdLib/Include/wchar.h b/StdLib/Include/wchar.h
index 2c9ec6e5e7..3acc2a4b8d 100644
--- a/StdLib/Include/wchar.h
+++ b/StdLib/Include/wchar.h
@@ -150,7 +150,7 @@
- WEOF might not be negative.
- mbstate_t objects are not intended to be inspected by programs.
- Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -1089,7 +1089,7 @@ by the value of base, and a final wide string of one or more unrecognized wide
characters, including the terminating null wide character of the input wide string. Then,
they attempt to convert the subject sequence to an integer, and return the result.
- @param[in] Nptr Pointer to the string to convert to a floating-point value.
+ @param[in] Nptr Pointer to the string to convert.
@param[in] EndPtr Optional pointer to an object in which to store a pointer
to the final wide string.
@param[in] Base Base, 0 to 36, of the value represented by the string
diff --git a/StdLib/Include/x86/float.h b/StdLib/Include/x86/float.h
index 72ed758718..5086dfadcb 100644
--- a/StdLib/Include/x86/float.h
+++ b/StdLib/Include/x86/float.h
@@ -1,5 +1,5 @@
/** @file
- Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -13,22 +13,22 @@
#ifndef _X86_FLOAT_H_
#define _X86_FLOAT_H_
-#if 0 /* Force all compilers to have the same limits */
-/* long double and double are the same in Microsoft compilers. */
+/* long double and double are the same in Microsoft compilers.
+ In GCC long double is fully supported.
+*/
#if !defined(_MSC_VER) /* Non-Microsoft compiler specifics. */
- #define LDBL_MANT_DIG 64
- #define LDBL_EPSILON 1.0842021724855044340E-19L
- #define LDBL_DIG 18
- #define LDBL_MIN_EXP (-16381)
- #define LDBL_MIN 3.3621031431120935063E-4932L
+ #define LDBL_MANT_DIG 64
+ #define LDBL_EPSILON 1.0842021724855044340E-19L
+ #define LDBL_DIG 18
+ #define LDBL_MIN_EXP (-16381)
+ #define LDBL_MIN 3.3621031431120935063E-4932L
#define LDBL_MIN_10_EXP (-4931)
- #define LDBL_MAX_EXP 16384
- #define LDBL_MAX 1.1897314953572317650E+4932L
+ #define LDBL_MAX_EXP 16384
+ #define LDBL_MAX 1.1897314953572317650E+4932L
#define LDBL_MAX_10_EXP 4932
- #define DECIMAL_DIG 21
+ #define DECIMAL_DIG 21
#endif // !defined(_MSC_VER)
-#endif // if 0
#include <sys/float_ieee754.h>