summaryrefslogtreecommitdiff
path: root/mail/ja-mh/patches/patch-by
blob: a4799de4d81b022f63c4985af0fe70c5b65d02ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$NetBSD: patch-by,v 1.1 2010/09/27 12:01:49 taca Exp $

* Use getcwd for BSD44.

--- sbr/pwd.c.orig	2001-04-02 10:46:53.000000000 +0000
+++ sbr/pwd.c
@@ -36,8 +36,13 @@ char   *pwd () {
 	admonish (NULL, "unable to determine working directory");
 #endif	/* SYS5DIR */
 #else	/* BSD42 */
+#ifndef	BSD44
     if (getwd (curwd) == 0) {
 	admonish (NULLCP, "unable to determine working directory: %s", curwd);
+#else
+    if (getcwd (curwd, MAXPATHLEN) == NULL) {
+	admonish (NULL, "unable to determine working directory");
+#endif
 #endif	/* BSD42 */
 	if (mypath == NULL
 		|| *mypath == 0