diff options
author | LRN <lrn1986@gmail.com> | 2015-04-20 13:20:21 +0000 |
---|---|---|
committer | LRN <lrn1986@gmail.com> | 2015-04-20 13:20:21 +0000 |
commit | d46e11b6f489e726e9f863e0069c132b8affe63a (patch) | |
tree | 056a27049cb23bb8faf2d418909a4aa10611a9fe /src | |
parent | 4d543bd37dbb28ed956ce490f77c39f14ef9be43 (diff) | |
download | libextractor-d46e11b6f489e726e9f863e0069c132b8affe63a.tar.gz libextractor-d46e11b6f489e726e9f863e0069c132b8affe63a.zip |
Update plibc header to latest svn version
Diffstat (limited to 'src')
-rw-r--r-- | src/include/plibc.h | 75 |
1 files changed, 28 insertions, 47 deletions
diff --git a/src/include/plibc.h b/src/include/plibc.h index 27153b7..c8b6453 100644 --- a/src/include/plibc.h +++ b/src/include/plibc.h | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General Public |
16 | License along with this library; if not, write to the Free Software | 16 | License along with this library; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
18 | */ | 18 | */ |
19 | 19 | ||
20 | /** | 20 | /** |
@@ -22,7 +22,7 @@ | |||
22 | * @brief PlibC header | 22 | * @brief PlibC header |
23 | * @attention This file is usually not installed under Unix, | 23 | * @attention This file is usually not installed under Unix, |
24 | * so ship it with your application | 24 | * so ship it with your application |
25 | * @version $Revision: 151 $ | 25 | * @version $Revision: 158 $ |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #ifndef _PLIBC_H_ | 28 | #ifndef _PLIBC_H_ |
@@ -70,7 +70,7 @@ extern "C" { | |||
70 | /* Convert LARGE_INTEGER to double */ | 70 | /* Convert LARGE_INTEGER to double */ |
71 | #define Li2Double(x) ((double)((x).HighPart) * 4.294967296E9 + \ | 71 | #define Li2Double(x) ((double)((x).HighPart) * 4.294967296E9 + \ |
72 | (double)((x).LowPart)) | 72 | (double)((x).LowPart)) |
73 | #ifndef __MINGW64_VERSION_MAJOR | 73 | #ifndef HAVE_DECL__STATI64 |
74 | struct _stati64 | 74 | struct _stati64 |
75 | { | 75 | { |
76 | _dev_t st_dev; | 76 | _dev_t st_dev; |
@@ -403,49 +403,6 @@ struct statfs | |||
403 | long f_namelen; /* maximum length of filenames */ | 403 | long f_namelen; /* maximum length of filenames */ |
404 | long f_spare[6]; /* spare for later */ | 404 | long f_spare[6]; /* spare for later */ |
405 | }; | 405 | }; |
406 | |||
407 | /* Taken from the Wine project <http://www.winehq.org> | ||
408 | /wine/include/winternl.h */ | ||
409 | enum SYSTEM_INFORMATION_CLASS | ||
410 | { | ||
411 | SystemBasicInformation = 0, | ||
412 | Unknown1, | ||
413 | SystemPerformanceInformation = 2, | ||
414 | SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */ | ||
415 | Unknown4, | ||
416 | SystemProcessInformation = 5, | ||
417 | Unknown6, | ||
418 | Unknown7, | ||
419 | SystemProcessorPerformanceInformation = 8, | ||
420 | Unknown9, | ||
421 | Unknown10, | ||
422 | SystemDriverInformation, | ||
423 | Unknown12, | ||
424 | Unknown13, | ||
425 | Unknown14, | ||
426 | Unknown15, | ||
427 | SystemHandleList, | ||
428 | Unknown17, | ||
429 | Unknown18, | ||
430 | Unknown19, | ||
431 | Unknown20, | ||
432 | SystemCacheInformation, | ||
433 | Unknown22, | ||
434 | SystemInterruptInformation = 23, | ||
435 | SystemExceptionInformation = 33, | ||
436 | SystemRegistryQuotaInformation = 37, | ||
437 | SystemLookasideInformation = 45 | ||
438 | }; | ||
439 | |||
440 | typedef struct | ||
441 | { | ||
442 | LARGE_INTEGER IdleTime; | ||
443 | LARGE_INTEGER KernelTime; | ||
444 | LARGE_INTEGER UserTime; | ||
445 | LARGE_INTEGER Reserved1[2]; | ||
446 | ULONG Reserved2; | ||
447 | } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION; | ||
448 | |||
449 | #define sleep(secs) (Sleep(secs * 1000)) | 406 | #define sleep(secs) (Sleep(secs * 1000)) |
450 | 407 | ||
451 | /*********************** statfs *****************************/ | 408 | /*********************** statfs *****************************/ |
@@ -468,17 +425,39 @@ typedef struct | |||
468 | #define LOCK_UN 8 /* remove lock */ | 425 | #define LOCK_UN 8 /* remove lock */ |
469 | 426 | ||
470 | /* Not supported under MinGW */ | 427 | /* Not supported under MinGW */ |
428 | #ifndef S_IRGRP | ||
471 | #define S_IRGRP 0 | 429 | #define S_IRGRP 0 |
430 | #endif | ||
431 | #ifndef S_IWGRP | ||
472 | #define S_IWGRP 0 | 432 | #define S_IWGRP 0 |
433 | #endif | ||
434 | #ifndef S_IROTH | ||
473 | #define S_IROTH 0 | 435 | #define S_IROTH 0 |
436 | #endif | ||
437 | #ifndef S_IXGRP | ||
474 | #define S_IXGRP 0 | 438 | #define S_IXGRP 0 |
439 | #endif | ||
440 | #ifndef S_IWOTH | ||
475 | #define S_IWOTH 0 | 441 | #define S_IWOTH 0 |
442 | #endif | ||
443 | #ifndef S_IXOTH | ||
476 | #define S_IXOTH 0 | 444 | #define S_IXOTH 0 |
445 | #endif | ||
446 | #ifndef S_ISUID | ||
477 | #define S_ISUID 0 | 447 | #define S_ISUID 0 |
448 | #endif | ||
449 | #ifndef S_ISGID | ||
478 | #define S_ISGID 0 | 450 | #define S_ISGID 0 |
451 | #endif | ||
452 | #ifndef S_ISVTX | ||
479 | #define S_ISVTX 0 | 453 | #define S_ISVTX 0 |
454 | #endif | ||
455 | #ifndef S_IRWXG | ||
480 | #define S_IRWXG 0 | 456 | #define S_IRWXG 0 |
457 | #endif | ||
458 | #ifndef S_IRWXO | ||
481 | #define S_IRWXO 0 | 459 | #define S_IRWXO 0 |
460 | #endif | ||
482 | 461 | ||
483 | #define SHUT_WR SD_SEND | 462 | #define SHUT_WR SD_SEND |
484 | #define SHUT_RD SD_RECEIVE | 463 | #define SHUT_RD SD_RECEIVE |
@@ -517,6 +496,8 @@ unsigned plibc_get_handle_count(); | |||
517 | 496 | ||
518 | typedef void (*TPanicProc) (int, char *); | 497 | typedef void (*TPanicProc) (int, char *); |
519 | void plibc_set_panic_proc(TPanicProc proc); | 498 | void plibc_set_panic_proc(TPanicProc proc); |
499 | void plibc_set_stat_size_size(int iLength); | ||
500 | void plibc_set_stat_time_size(int iLength); | ||
520 | 501 | ||
521 | int flock(int fd, int operation); | 502 | int flock(int fd, int operation); |
522 | int fsync(int fildes); | 503 | int fsync(int fildes); |
@@ -563,7 +544,7 @@ int _win_ftruncate(int fildes, off_t length); | |||
563 | int _win_truncate(const char *fname, int distance); | 544 | int _win_truncate(const char *fname, int distance); |
564 | int _win_kill(pid_t pid, int sig); | 545 | int _win_kill(pid_t pid, int sig); |
565 | int _win_pipe(int *phandles); | 546 | int _win_pipe(int *phandles); |
566 | intptr_t _win_mkfifo(const char *path, mode_t mode); | 547 | int _win_mkfifo(const char *path, mode_t mode); |
567 | int _win_rmdir(const char *path); | 548 | int _win_rmdir(const char *path); |
568 | int _win_access( const char *path, int mode ); | 549 | int _win_access( const char *path, int mode ); |
569 | int _win_chmod(const char *filename, int pmode); | 550 | int _win_chmod(const char *filename, int pmode); |