cmogstored 1.8.1 - use default system stack size
[cmogstored.git] / nostd / setproctitle.h
blob9110e75b5480f42ace964f9dee68a2754fa4771d
1 #ifndef BSD_STDLIB_SETPROCTITLE_H
2 #define BSD_STDLIB_SETPROCTITLE_H
4 #ifndef HAVE_SETPROCTITLE
5 #if defined __FreeBSD__ \
6 || defined __NetBSD__ \
7 || defined __OpenBSD__
8 #define HAVE_SETPROCTITLE 1
9 #else
10 #define HAVE_SETPROCTITLE 0
11 #endif
12 #endif
15 #if HAVE_SETPROCTITLE
16 static inline void spt_init(int argc, char *argv[], char *envp[]) {}
17 #else
18 #if __GNUC__
20 void setproctitle(const char *, ...) __attribute__((format (printf, 1, 2)));
22 #else
24 void setproctitle(const char *, ...);
26 #endif
29 * XXX hack for older gcov + gcc. This isn't needed for newer gcov + gcc
30 * in Debian testing/unstable, but gcov/gcc 4.4.5-8 on Debian squeeze
31 * fails to pass argc/argv/envp to ((constructor)) functions when using
32 * gcov.
34 * We'll drop this hack when support for Debian squeeze is terminated
35 * (probably 2014-2015).
37 void spt_init(int argc, char *argv[], char *envp[]);
39 #endif /* !HAVE_SETPROCTITLE */
41 #endif /* BSD_STDLIB_SETPROCTITLE_H */