3 ?RCS: Copyright (c) 2010 H.Merijn Brand
5 ?RCS: You may distribute under the terms of either the GNU General Public
6 ?RCS: License or the Artistic License, as specified in the README file.
8 ?MAKE:d_prctl d_prctl_set_name: Inlibc cat Compile run rm_try
11 ?S: This variable conditionally defines the HAS_PRCTL symbol, which
12 ?S: indicates to the C program that the prctl() routine is available.
13 ?S: Note that there are at least two prctl variants: Linux and Irix.
14 ?S: While they are somewhat similar, they are incompatible.
17 ?S: This variable conditionally defines the HAS_PRCTL_SET_NAME symbol,
18 ?S: which indicates to the C program that the prctl() routine supports
19 ?S: the PR_SET_NAME option.
22 ?C: This symbol, if defined, indicates that the prctl routine is
23 ?C: available to set process title.
24 ?C: Note that there are at least two prctl variants: Linux and Irix.
25 ?C: While they are somewhat similar, they are incompatible.
27 ?C:HAS_PRCTL_SET_NAME:
28 ?C: This symbol, if defined, indicates that the prctl routine is
29 ?C: available to set process title and supports PR_SET_NAME.
31 ?H:#$d_prctl HAS_PRCTL /**/
32 ?H:#$d_prctl_set_name HAS_PRCTL_SET_NAME /**/
40 : see if prctl supports PR_SET_NAME
41 d_prctl_set_name=$undef
48 #include <sys/prctl.h>
50 int main (int argc, char *argv[])
52 return (prctl (PR_SET_NAME, "Test"));
56 if eval $compile_ok && $run ./try; then
57 echo "Your prctl (PR_SET_NAME, ...) works"
58 d_prctl_set_name=$define