/[gentoo-alt]/trunk/sys-apps/gawk/files/gawk-3.1.3-getpgrp_void.patch
Gentoo

Contents of /trunk/sys-apps/gawk/files/gawk-3.1.3-getpgrp_void.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 242 - (show annotations) (download)
Sun Feb 27 23:26:00 2005 UTC (9 years, 4 months ago) by angusyoung
File size: 1225 byte(s)
Bumped gawk from 3.1.4 to 3.1.4-r4

1 Ripped from Fedora.
2
3 --- gawk-3.1.3/main.c.getpgrp_void 2004-01-26 12:08:26.000000000 +0100
4 +++ gawk-3.1.3/main.c 2004-01-26 12:15:22.000000000 +0100
5 @@ -874,14 +874,11 @@
6
7 PROCINFO_node = install("PROCINFO",
8 node((NODE *) NULL, Node_var_array, (NODE *) NULL));
9 -
10 #ifdef GETPGRP_VOID
11 -#define getpgrp_arg() /* nothing */
12 + value = getpgrp();
13 #else
14 -#define getpgrp_arg() getpid()
15 + value = getpgrp(getpid());
16 #endif
17 -
18 - value = getpgrp(getpgrp_arg());
19 aptr = assoc_lookup(PROCINFO_node, tmp_string("pgrpid", 6), FALSE);
20 *aptr = make_number(value);
21
22 --- gawk-3.1.3/io.c.getpgrp_void 2004-01-26 12:08:36.000000000 +0100
23 +++ gawk-3.1.3/io.c 2004-01-26 12:16:04.000000000 +0100
24 @@ -1422,11 +1422,6 @@
25 return 0;
26 }
27
28 -#ifdef GETPGRP_VOID
29 -#define getpgrp_arg() /* nothing */
30 -#else
31 -#define getpgrp_arg() getpid()
32 -#endif
33
34 /* pidopen --- "open" /dev/pid, /dev/ppid, and /dev/pgrpid */
35
36 @@ -1440,7 +1435,11 @@
37 warning(_("use `PROCINFO[\"%s\"]' instead of `%s'"), cp, name);
38
39 if (name[6] == 'g')
40 +#ifdef GETPGRP_VOID
41 + sprintf(tbuf, "%d\n", (int) getpgrp());
42 +#else
43 sprintf(tbuf, "%d\n", (int) getpgrp(getpgrp_arg()));
44 +#endif
45 else if (name[6] == 'i')
46 sprintf(tbuf, "%d\n", (int) getpid());
47 else

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20