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 __hpux
21
# define SPT_TYPE SPT_PSTAT
22
#endif
23
24
#ifdef _AIX3
25
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
26
#endif
27
28
#ifdef _AIX4
29
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
30
#endif
31
32
#ifdef AIX
/* AIX/RT compiler pre-defines this */
33
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
34
#endif
35
36
/*
37
** Apple Rhapsody
38
** Contributed by Wilfredo Sanchez <wsanchez@apple.com>
39
*/
40
41
#ifdef __APPLE__
42
# define SPT_TYPE SPT_PSSTRINGS
43
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
44
#endif
45
46
#if defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__)
47
# define SPT_TYPE SPT_PSSTRINGS
/* use PS_STRINGS pointer */
48
#endif
49
50
#ifdef __bsdi__
51
# if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312
52
/* version 1.1 or later */
53
# undef SPT_TYPE
54
# define SPT_TYPE SPT_BUILTIN
/* setproctitle is in libc */
55
# else
56
/* version 1.0 or earlier */
57
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
58
# endif
59
#endif
60
61
#if defined(__QNX__)
62
# define SPT_TYPE SPT_REUSEARGV
63
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
64
#endif
65
66
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
67
# if defined(__NetBSD__) || defined(__DragonFly__)
68
# undef SPT_TYPE
69
# define SPT_TYPE SPT_BUILTIN
/* setproctitle is in libc */
70
# endif
71
# if defined(__FreeBSD__)
72
# undef SPT_TYPE
73
# if __FreeBSD__ >= 2
74
# include <osreldate.h>
75
# if __FreeBSD_version >= 199512
/* 2.2-current when it appeared */
76
# include <sys/types.h>
77
# include <libutil.h>
78
# define SPT_TYPE SPT_BUILTIN
79
# endif
80
# endif
81
# ifndef SPT_TYPE
82
# define SPT_TYPE SPT_REUSEARGV
83
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
84
# endif
85
# endif
86
# if defined(__OpenBSD__)
87
# undef SPT_TYPE
88
# define SPT_TYPE SPT_BUILTIN
/* setproctitle is in libc */
89
# endif
90
#endif
91
92
#ifdef __GNU_HURD__
93
# define SPT_TYPE SPT_CHANGEARGV
94
#endif
95
96
/* SCO UNIX 3.2v4.2/Open Desktop 3.0 */
97
#ifdef _SCO_unix_4_2
98
# define _SCO_unix_
99
#endif
100
101
/* SCO UNIX 3.2v4.0 Open Desktop 2.0 and earlier */
102
#ifdef _SCO_unix_
103
# define SPT_TYPE SPT_SCO
/* write kernel u. area */
104
#endif
105
106
107
#ifdef __linux__
108
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
109
#endif
110
111
#ifdef _SEQUENT_
112
# define SPT_TYPE SPT_NONE
/* don't use setproctitle */
113
#endif
114
115
#ifdef apollo
116
# define SPT_TYPE SPT_NONE
/* don't use setproctitle */
117
#endif
118
119
#ifdef __svr5__
120
# define SPT_PADCHAR '\0'
/* pad process title with nulls */
121
#endif
122
123
#ifdef NCR_MP_RAS2
124
# define SPT_TYPE SPT_NONE
125
#endif
126
127
#ifdef NCR_MP_RAS3
128
# define SPT_TYPE SPT_NONE
129
#endif
130
131
#ifdef sony_news
132
# ifndef __svr4
133
# ifndef SPT_TYPE
134
# define SPT_TYPE SPT_SYSMIPS
/* use sysmips() (OS 6.0.2 or later) */
135
# endif
136
# endif
137
#endif
138
139
140
extern
void
tdeinit_initsetproctitle(
int
,
char
**,
char
**);
141
extern
void
tdeinit_setproctitle(
const
char
*, ...)
142
#ifdef __GNUC__
143
__attribute__ (( format ( printf, 1, 2 ) ) )
144
#endif
145
;
146
147
#endif
148
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