summaryrefslogtreecommitdiff
path: root/x11/xview-lib/patches/patch-ej
blob: 9a307746d14c303869e1a89e6830e12b1673ce2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
$NetBSD: patch-ej,v 1.1 2006/01/05 18:25:57 joerg Exp $

--- lib/libxview/textsw/txt_attr.c.orig	2006-01-04 11:45:39.000000000 +0000
+++ lib/libxview/textsw/txt_attr.c
@@ -14,6 +14,7 @@ static char     sccsid[] = "@(#)txt_attr
  * Attribute set/get routines for text subwindows.
  */
 
+#include <limits.h>
 #include <xview/pkg.h>
 #include <xview/attrol.h>
 #include <xview_private/primal.h>
@@ -79,7 +80,11 @@ set_first(view, error_msg, filename, res
     int             first_line;
     int             all_views;
 {
+#ifdef NAME_MAX
+    char            msg_buf[NAME_MAX + 100];
+#else
     char            msg_buf[MAXNAMLEN + 100];
+#endif
     char           *msg;
     Es_status       load_status;
     Textsw_status   result = TEXTSW_STATUS_OKAY;
@@ -96,7 +101,11 @@ set_first(view, error_msg, filename, res
 #else
     if (filename) {
 #endif
+#ifdef NAME_MAX
+	CHAR            scratch_name[NAME_MAX];
+#else
 	CHAR            scratch_name[MAXNAMLEN];
+#endif
 	Es_handle       new_esh;
 #ifdef OW_I18N
 	char           *filename_mb;