windows: fix mingw32 build, define JOB_OBJECT_XXX

mingw32 doesn't have the JOB_OBJECT_XXX defines. Provide them ourselves
when they are not already defined.

This is possibly only an issue with older versions of mingw32 because
mingw-w64 2.0 _does_ export the defines.
This commit is contained in:
Yasuhiro Matsumoto 2013-08-01 21:51:15 +09:00 committed by Ben Noordhuis
parent 4bdb7d837a
commit bfa3e28b0d

View File

@ -4073,6 +4073,25 @@
((NTSTATUS) (error)) : ((NTSTATUS) (((error) & 0x0000FFFF) | \
(FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_WARNING)))
#ifndef JOB_OBJECT_LIMIT_PROCESS_MEMORY
# define JOB_OBJECT_LIMIT_PROCESS_MEMORY 0x00000100
#endif
#ifndef JOB_OBJECT_LIMIT_JOB_MEMORY
# define JOB_OBJECT_LIMIT_JOB_MEMORY 0x00000200
#endif
#ifndef JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION
# define JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION 0x00000400
#endif
#ifndef JOB_OBJECT_LIMIT_BREAKAWAY_OK
# define JOB_OBJECT_LIMIT_BREAKAWAY_OK 0x00000800
#endif
#ifndef JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK
# define JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK 0x00001000
#endif
#ifndef JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
# define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE 0x00002000
#endif
/* from ntifs.h */
/* MinGW already has it, mingw-w64 does not. */
#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)