Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
win: the ddk got the NTSTATUS_FROM_WIN32 wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Sep 9, 2011
1 parent cfa1423 commit 12e689d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/win/winapi.h
Expand Up @@ -4069,11 +4069,14 @@
# define STATUS_HASH_NOT_PRESENT ((NTSTATUS) 0xC000A101L)
#endif

#ifndef NTSTATUS_FROM_WIN32
# define NTSTATUS_FROM_WIN32(error) ((NTSTATUS) (error) <= 0 ? \
((NTSTATUS) (error)) : ((NTSTATUS) (((error) & 0x0000FFFF) | \
(FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_ERROR)))
#endif
/* This is not the NTSTATUS_FROM_WIN32 that the DDK provides, because the
/* DDK got it wrong! */
#ifdef NTSTATUS_FROM_WIN32
# undef NTSTATUS_FROM_WIN32
#endif
#define NTSTATUS_FROM_WIN32(error) ((NTSTATUS) (error) <= 0 ? \
((NTSTATUS) (error)) : ((NTSTATUS) (((error) & 0x0000FFFF) | \
(FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_WARNING)))

/* from ntifs.h */
/* MinGW already has it */
Expand Down

0 comments on commit 12e689d

Please sign in to comment.