Skip to content
Skip to link menu
Trinity API Reference
Trinity API Reference
tdeinit
tdeinit
tdeinit
setproctitle.h
1
/*
2
* Copyright (c) 1998 Sendmail, Inc. All rights reserved.
3
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
4
* Copyright (c) 1988, 1993
5
* The Regents of the University of California. All rights reserved.
6
*
7
* By using this file, you agree to the terms and conditions set
8
* forth in the LICENSE file which can be found at the top level of
9
* the sendmail distribution.
10
*
11
* A copy of the above mentioned LICENSE file can be found in
12
* LICENSE.setproctitle.
13
*
14
* Ported for use with KDE by Waldo Bastian <bastian@kde.org>
15
*/
16
17
#ifndef _SETPROCTITLE_H_
18
#define _SETPROCTITLE_H_
19
20
#ifdef _AIX3
21
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
22
#endif
23
24
#ifdef _AIX4
25
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
26
#endif
27
28
#ifdef AIX
/* AIX/RT compiler pre-defines this */
29
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
30
#endif
31
32
/*
33
** Apple Rhapsody
34
** Contributed by Wilfredo Sanchez <wsanchez@apple.com>
35
*/
36
37
#ifdef __APPLE__
38
# define SPT_TYPE SPT_PSSTRINGS
39
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
40
#endif
41
42
#if defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__)
43
# define SPT_TYPE SPT_PSSTRINGS
/* use PS_STRINGS pointer */
44
#endif
45
46
#ifdef __bsdi__
47
# if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312
48
/* version 1.1 or later */
49
# undef SPT_TYPE
50
# define SPT_TYPE SPT_BUILTIN
/* setproctitle is in libc */
51
# else
52
/* version 1.0 or earlier */
53
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
54
# endif
55
#endif
56
57
#if defined(__QNX__)
58
# define SPT_TYPE SPT_REUSEARGV
59
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
60
#endif
61
62
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
63
# if defined(__NetBSD__) || defined(__DragonFly__)
64
# undef SPT_TYPE
65
# define SPT_TYPE SPT_BUILTIN
/* setproctitle is in libc */
66
# endif
67
# if defined(__FreeBSD__)
68
# undef SPT_TYPE
69
# if __FreeBSD__ >= 2
70
# include <osreldate.h>
71
# if __FreeBSD_version >= 199512
/* 2.2-current when it appeared */
72
# include <sys/types.h>
73
# include <libutil.h>
74
# define SPT_TYPE SPT_BUILTIN
75
# endif
76
# endif
77
# ifndef SPT_TYPE
78
# define SPT_TYPE SPT_REUSEARGV
79
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
80
# endif
81
# endif
82
# if defined(__OpenBSD__)
83
# undef SPT_TYPE
84
# define SPT_TYPE SPT_BUILTIN
/* setproctitle is in libc */
85
# endif
86
#endif
87
88
#ifdef __GNU_HURD__
89
# define SPT_TYPE SPT_CHANGEARGV
90
#endif
91
92
/* SCO UNIX 3.2v4.2/Open Desktop 3.0 */
93
#ifdef _SCO_unix_4_2
94
# define _SCO_unix_
95
#endif
96
97
/* SCO UNIX 3.2v4.0 Open Desktop 2.0 and earlier */
98
#ifdef _SCO_unix_
99
# define SPT_TYPE SPT_SCO
/* write kernel u. area */
100
#endif
101
102
103
#ifdef __linux__
104
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
105
#endif
106
107
#ifdef _SEQUENT_
108
# define SPT_TYPE SPT_NONE
/* don't use setproctitle */
109
#endif
110
111
#ifdef apollo
112
# define SPT_TYPE SPT_NONE
/* don't use setproctitle */
113
#endif
114
115
#ifdef __svr5__
116
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
117
#endif
118
119
#ifdef NCR_MP_RAS2
120
# define SPT_TYPE SPT_NONE
121
#endif
122
123
#ifdef NCR_MP_RAS3
124
# define SPT_TYPE SPT_NONE
125
#endif
126
127
#ifdef sony_news
128
# ifndef __svr4
129
# ifndef SPT_TYPE
130
# define SPT_TYPE SPT_SYSMIPS
/* use sysmips() (OS 6.0.2 or later) */
131
# endif
132
# endif
133
#endif
134
135
136
extern
void
tdeinit_initsetproctitle(
int
,
char
**,
char
**);
137
extern
void
tdeinit_setproctitle(
const
char
*, ...)
138
#ifdef __GNUC__
139
__attribute__ (( format ( printf, 1, 2 ) ) )
140
#endif
141
;
142
143
#endif
144
tdeinit
Skip menu "tdeinit"
Main Page
File List
Related Pages
tdeinit
Skip menu "tdeinit"
arts
dcop
dnssd
interfaces
kspeech
interface
library
tdetexteditor
kate
kded
kdoctools
kimgio
kjs
libtdemid
libtdescreensaver
tdeabc
tdecmshell
tdecore
tdefx
tdehtml
tdeinit
tdeio
bookmarks
httpfilter
kpasswdserver
kssl
tdefile
tdeio
tdeioexec
tdeioslave
http
tdemdi
tdemdi
tdenewstuff
tdeparts
tdeprint
tderandr
tderesources
tdespell2
tdesu
tdeui
tdeunittest
tdeutils
tdewallet