view src/os/win32/ngx_process_cycle.h @ 9314:32a5186a2705

Win32: improved MinGW/MinGW-w64 GCC checks. Previously, __GNUC__ was checked, which is now replaced with __MINGW32__ checks. The difference is that __MINGW32__ is defined when using MinGW (or MinGW-w64) header files regardless of the compiler being used. And, more importantly, it is not defined when Clang is being used (which pretends to be GCC by default) with Windows SDK header files. With this change, it is now possible to compile nginx with native Clang on Windows. This current requires --with-ld-opt="-lkernel32 -luser32" though, since native Clang on Windows uses MSVC linker, which does not link kernel32.lib and user32.lib automatically.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 07 Aug 2024 03:56:59 +0300
parents b4cc553aafeb
children
line wrap: on
line source


/*
 * Copyright (C) Igor Sysoev
 * Copyright (C) Nginx, Inc.
 */


#ifndef _NGX_PROCESS_CYCLE_H_INCLUDED_
#define _NGX_PROCESS_CYCLE_H_INCLUDED_


#include <ngx_config.h>
#include <ngx_core.h>


#define NGX_PROCESS_SINGLE     0
#define NGX_PROCESS_MASTER     1
#define NGX_PROCESS_SIGNALLER  2
#define NGX_PROCESS_WORKER     3


void ngx_master_process_cycle(ngx_cycle_t *cycle);
void ngx_single_process_cycle(ngx_cycle_t *cycle);
void ngx_close_handle(HANDLE h);


extern ngx_uint_t      ngx_process;
extern ngx_uint_t      ngx_worker;
extern ngx_pid_t       ngx_pid;
extern ngx_uint_t      ngx_exiting;

extern sig_atomic_t    ngx_quit;
extern sig_atomic_t    ngx_terminate;
extern sig_atomic_t    ngx_reopen;

extern ngx_uint_t      ngx_inherited;
extern ngx_pid_t       ngx_new_binary;


extern HANDLE          ngx_master_process_event;
extern char            ngx_master_process_event_name[];


#endif /* _NGX_PROCESS_CYCLE_H_INCLUDED_ */