summaryrefslogtreecommitdiff
path: root/sysutils/heirloom-doc/patches/patch-at
blob: 428b9787d03bbcd479330e1b8e75dd05478665c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$NetBSD: patch-at,v 1.1.1.1 2011/05/27 22:57:42 cheusov Exp $

Fix for systems having no btowc(3) (Interix-3.5)
--- libuxre/btowc.c.orig	Mon Dec 18 15:22:23 2006
+++ libuxre/btowc.c
@@ -0,0 +1,11 @@
+#include "btowc.h"
+
+#if defined (HAVE_NO_BTOWC)
+wint_t btowc (int c)
+{
+	if (c == EOF || c > 0xFF)
+		return WEOF;
+
+	return (wint_t)c;
+}
+#endif