Преглед на файлове

add SEEK_DATA and SEEK_HOLE to unistd.h

these are linux specific constants. glibc exposes them behind
_GNU_SOURCE, but, since SEEK_* is reserved for the implementation, we
can simply define them. furthermore, since they can't be used with
fseek() and other functions that deal with FILE, we don't add them to
stdio.h.
Érico Nogueira преди 3 години
родител
ревизия
cbacd638e3
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      include/unistd.h

+ 2 - 0
include/unistd.h

@@ -14,6 +14,8 @@ extern "C" {
 #define SEEK_SET 0
 #define SEEK_SET 0
 #define SEEK_CUR 1
 #define SEEK_CUR 1
 #define SEEK_END 2
 #define SEEK_END 2
+#define SEEK_DATA 3
+#define SEEK_HOLE 4
 
 
 #if __cplusplus >= 201103L
 #if __cplusplus >= 201103L
 #define NULL nullptr
 #define NULL nullptr