1 /*
2 Copyright (C) 2015-2021, Dirk Krause
3 SPDX-License-Identifier: BSD-3-Clause
4 */
5 
6 /*
7 	WARNING: This file was generated by the dkct program (see
8 	http://dktools.sourceforge.net/ for details).
9 	Changes you make here will be lost if dkct is run again!
10 	You should modify the original source and run dkct on it.
11 	Original source: dk4getpid.ctr
12 */
13 
14 #ifndef DK4GETPID_H_INCLUDED
15 /** Avoid multiple inclusions. */
16 #define DK4GETPID_H_INCLUDED 1
17 
18 
19 /**	@file
20 	Get process ID.
21 
22 	CRT on Windows: Not used.
23 */
24 
25 #ifndef DK4CONF_H_INCLUDED
26 #if DK4_BUILDING_DKTOOLS4
27 #include "dk4conf.h"
28 #else
29 #include <dktools-4/dk4conf.h>
30 #endif
31 #endif
32 
33 #ifndef DK4TYPES_H_INCLUDED
34 #if DK4_BUILDING_DKTOOLS4
35 #include <libdk4base/dk4types.h>
36 #else
37 #include <dktools-4/dk4types.h>
38 #endif
39 #endif
40 
41 #ifndef DK4ERROR_H_INCLUDED
42 #if DK4_BUILDING_DKTOOLS4
43 #include <libdk4base/dk4error.h>
44 #else
45 #include <dktools-4/dk4error.h>
46 #endif
47 #endif
48 
49 #if DK4_HAVE_SYS_TYPES_H
50 #ifndef SYS_TYPES_H_INCLUDED
51 #include <sys/types.h>
52 #define	SYS_TYPES_H_INCLUDED 1
53 #endif
54 #endif
55 
56 #ifndef STDLIB_H_INCLUDED
57 #include <stdlib.h>
58 #define STDLIB_H_INCLUDED 1
59 #endif
60 
61 #if DK4_ON_WINDOWS
62 /**	Process ID is a DWORD on Windows.
63 */
64 typedef unsigned long	dk4_pid_t;
65 #else
66 /**	Use existing pid_t on other systems.
67 */
68 typedef	pid_t		dk4_pid_t;
69 #endif
70 
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74 
75 /**	Get current process ID.
76 	@return Process ID.
77 */
78 dk4_pid_t
79 dk4getpid(void);
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 
86 
87 
88 #endif
89