Ticket #1634: patch-preview.txt

File patch-preview.txt, 3.5 KB (added by Marco, 2 years ago)

Added by email2trac

Line 
1
2[typo in cygwin compiler macros
3Marco Schmidt <marco.schmidt@gmail.com>**20181117214440
4 Ignore-this: f70f8462669e4901959897c05ccc6d69
5 
6 The cygwin compiler macro is "__CYGWIN__", with two underscores.
7] hunk ./source/daemons/common/procfs.c 368
8    char procnam[128];
9    prstatus_t pr;
10    prpsinfo_t pri;
11-#endif  /* (__linux__ || _CYGWIN__) */
12+#endif  /* (__linux__ || __CYGWIN__) */
13 
14 #if __sun
15    prcred_t proc_cred;
16hunk ./source/daemons/common/procfs.c 524
17       goto return0;
18    }
19 
20-#  endif  /* (__linux__ || _CYGWIN__) */
21+#  endif  /* (__linux__ || __CYGWIN__) */
22 
23    /* try to find a matching job */
24    for (curr=job_list->next; curr != job_list; curr=curr->next) {
25hunk ./source/daemons/common/procfs.c 582
26          INFO((SGE_EVENT, "new process "pid_t_fmt" for job "pid_t_fmt
27                " (utime = %f stime = %f)\n",
28                pr.pr_pid, job_elem->job.jd_jid, utime, stime));
29-#endif  /* (__linux__ || _CYGWIN__) */
30+#endif  /* (__linux__ || __CYGWIN__) */
31       }
32    } else {
33       /* save previous usage data - needed to build delta usage */
34hunk ./source/daemons/common/procfs.c 620
35          }
36       }
37    }
38-#else  /* !(__linux__ || _CYGWIN__) */
39+#else  /* !(__linux__ || __CYGWIN__) */
40    proc_elem->proc.pd_pid    = pr.pr_pid;
41    proc_elem->proc.pd_utime  = pr.pr_utime.tv_sec + pr.pr_utime.tv_nsec*1E-9;
42    proc_elem->proc.pd_stime  = pr.pr_stime.tv_sec + pr.pr_stime.tv_nsec*1E-9;
43hunk ./source/daemons/common/procfs.c 633
44       proc_elem->rss            = pri.pr_rssize * pagesize;
45       proc_elem->proc.pd_pstart = pri.pr_start.tv_sec + pri.pr_start.tv_nsec*1E-9;
46    }
47-#endif  /* (__linux__ || _CYGWIN__) */
48+#endif  /* (__linux__ || __CYGWIN__) */
49 
50    proc_elem->mem =
51          ((proc_elem->proc.pd_stime + proc_elem->proc.pd_utime) - old_time) *
52hunk ./source/daemons/common/procfs.c 668
53    pt_close();
54    DEXIT;
55 }
56-#endif  /* (__linux__ || _CYGWIN__) || __sun */
57+#endif  /* (__linux__ || __CYGWIN__) || __sun */
58 
59hunk ./source/daemons/common/procfs.c 670
60-#if (__linux__ || _CYGWIN__)
61+#if (__linux__ || __CYGWIN__)
62 /* Return in IOCHARS the number of characters of i/o (read and write)
63    for process PROC.  Function value is zero iff the procfs io file is
64    found (which needs CONFIG_TASK_IO_ACCOUNTING=y in the Linux
65hunk ./source/daemons/common/procfs.c 851
66    }
67    DRETURN(true);
68 }
69-#endif  /* (__linux__ || _CYGWIN__) */
70+#endif  /* (__linux__ || __CYGWIN__) */
71 
72 void
73 init_procfs(void)
74hunk ./source/daemons/common/procfs.c 858
75 {
76    DENTER(TOP_LAYER, "init_procfs");
77    if (list) DRETURN_VOID;
78-#if (__linux__ || _CYGWIN__)
79+#if (__linux__ || __CYGWIN__)
80    /* Initialize the tests.  */
81    (void) pss_in_smaps();
82    (void) swap_in_smaps();
83hunk ./source/libs/sgeobj/sge_proc.c 84
84 *******************************************************************************/
85 void gen_procList()
86 {
87-#if (__linux__ || _CYGWIN__)
88+#if (__linux__ || __CYGWIN__)
89    procList = lCreateListHash("procList", PRO_Type, true);
90 #endif
91 }
92hunk ./source/libs/sgeobj/sge_proc.c 101
93 *******************************************************************************/
94 void free_procList()
95 {
96-#if (__linux__ || _CYGWIN__)
97+#if (__linux__ || __CYGWIN__)
98    lFreeList(&procList);
99 #endif
100 }
101hunk ./source/libs/sgeobj/sge_proc.c 119
102 *******************************************************************************/
103 void clean_procList()
104 {
105-#if (__linux__ || _CYGWIN__)
106+#if (__linux__ || __CYGWIN__)
107    lListElem *next = NULL;
108    lListElem *ep = NULL;
109    lCondition *cp = lWhere("%T(%I == %b)", PRO_Type, PRO_run, false);
110