File: calendar.c.rej

package info (click to toggle)
bsdmainutils 4.4.0.1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 592 kB
  • ctags: 479
  • sloc: ansic: 5,905; makefile: 126; sh: 116
file content (22 lines) | stat: -rw-r--r-- 688 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
***************
*** 294,300 ****
         int fd, pdes[2];
  
         /* open up calendar file as stdin */
-        if (!freopen("calendar", "r", stdin)) {
                 if (doall)
                         return (NULL);
                 errx(1, "no calendar file.");
--- 294,305 ----
         int fd, pdes[2];
  
         /* open up calendar file as stdin */
+        if (!freopen("calendar", "r", stdin)
+ #ifdef __linux__
+        && !freopen(".calendar", "r", stdin)
+        && (doall || !freopen(_PATH_CALENDAR, "r", stdin))
+ #endif /* __linux__ */
+        ) {
                 if (doall)
                         return (NULL);
                 errx(1, "no calendar file.");