diff options
author | joerg <joerg@pkgsrc.org> | 2006-01-05 18:25:56 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2006-01-05 18:25:56 +0000 |
commit | 2bbbd70847b9f606c46f5193c569c96f384aae19 (patch) | |
tree | 659ad7ad2255232ad9accf5dbc9b4465f2bf905d | |
parent | b3fb906ebb28f94782914910bd09312ff21e3842 (diff) | |
download | pkgsrc-2bbbd70847b9f606c46f5193c569c96f384aae19.tar.gz |
First try on fixing xview. Fix errno. Add DragonFly support.
Use NAME_MAX when available. Don't try to fake a FILE on DragonFly.
The implementation of textsw_scanf can be improved, it is very
defensively and slow ATM, the snprintf usage should be portable.
Fix a number of prototype mismatches, e.g. variable argument functions
can conflict with K&R prototypes.
Bump revision since the package "compiled" before, e.g. build
errors where ignored.
35 files changed, 952 insertions, 119 deletions
diff --git a/x11/xview-lib/Makefile b/x11/xview-lib/Makefile index 8d2556fc846..a03d389dd41 100644 --- a/x11/xview-lib/Makefile +++ b/x11/xview-lib/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.29 2005/12/05 20:51:20 rillig Exp $ +# $NetBSD: Makefile,v 1.30 2006/01/05 18:25:56 joerg Exp $ DISTNAME= xview3.2p1-X11R6 PKGNAME= xview-lib-3.2.1 -PKGREVISION= 4 +PKGREVISION= 5 CATEGORIES= x11 MASTER_SITES= ${MASTER_SITE_LOCAL} diff --git a/x11/xview-lib/distinfo b/x11/xview-lib/distinfo index 2e03c4603b2..c4da769f578 100644 --- a/x11/xview-lib/distinfo +++ b/x11/xview-lib/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.9 2005/02/23 17:36:26 wiz Exp $ +$NetBSD: distinfo,v 1.10 2006/01/05 18:25:57 joerg Exp $ SHA1 (xview3.2p1-X11R6.tar.gz) = 1cd04231b893c3e6c70b56791d527b498e21a27a RMD160 (xview3.2p1-X11R6.tar.gz) = 2f21b14cb088aec887683bbc6d4ed9a3bc3fe2bb @@ -15,21 +15,21 @@ SHA1 (patch-ai) = 8f1dfe2f952db58f1ce2ddad80efcddc337199b6 SHA1 (patch-aj) = 9acc575fb736b7c4ec6448cab1f98f1ff00ea34e SHA1 (patch-ak) = 5c59e967d89e379108feae01f41c349d13188b11 SHA1 (patch-al) = b5a795c0eef28302276b112ee34feb5dc3fbf460 -SHA1 (patch-am) = 1b9e3bef2b06633fb3511ff567b51251293f60ab -SHA1 (patch-an) = d62ec6aaaf1e8924b12b117c12dae8f9f79c15ff -SHA1 (patch-ao) = 1e2fbe85d98238145fbcf6aec95c449fed66cf7c +SHA1 (patch-am) = e2c403ec892f9da9da910aab95a66298eb98a409 +SHA1 (patch-an) = b918e9d72ba90b1b9099f6610e021c3e85b1e056 +SHA1 (patch-ao) = 07d5522729a526153b8012899f7df03b7b952fd3 SHA1 (patch-ap) = 5458cd0e65dcca28da727d17494350369ece59f0 SHA1 (patch-aq) = 7a13c8cd72b88061308fd85033fe53e1b1b6affe -SHA1 (patch-ar) = ceaa2183c93e39b65ee48e5d13465c841d80e671 +SHA1 (patch-ar) = ebc5412b91216ca3559db9dbbb9f5fe565cf744f SHA1 (patch-as) = 5fefb12b0c5f087d371f8241b028adedd0810435 -SHA1 (patch-at) = af83ab47d41ea040d48bea141a1cf038c500aa94 +SHA1 (patch-at) = 9f0b508e285e80db49b811441264e7042c5f3c51 SHA1 (patch-au) = 4be6221b6b3660d5c74c043b7edf8aae946b7148 SHA1 (patch-av) = fea7e5575fe913dfedbdd1e744ac60b75be737d2 SHA1 (patch-aw) = e848355e0b704bdf6d726dc00cd4a49353e5eddb SHA1 (patch-ax) = a286aade16c09dec32698cb175e5cf4634260b25 SHA1 (patch-ay) = 4ca316c0b53c8624070e9ef106799587cba4dc02 SHA1 (patch-az) = 45e1f2faa2236ababcdda9543be3eb99ea96a44e -SHA1 (patch-ba) = 2da120b088d67b0e9ef8da57997839fb9eb8bbc6 +SHA1 (patch-ba) = 146ca5c3717a1000d48042eaf04b3b1e520469cc SHA1 (patch-bb) = c1e12875a186a54e3ae1b73937dd5138b1d6e369 SHA1 (patch-bc) = fe68f9c615e18efbead4845c982fd5b45ae6f459 SHA1 (patch-bd) = 26bf677853829de6e3890a6878f8eb8c5bdd0acb @@ -69,7 +69,7 @@ SHA1 (patch-ck) = 59b8c342a8bcd32bea0db9003e7da5b7da3d1376 SHA1 (patch-cl) = 6ada5a7257c2495781c805f55e38d4b2b8bcc323 SHA1 (patch-cm) = e743e951a0a4b34a60f091df0e37850bc6dde99e SHA1 (patch-cn) = 86bede62bc40d3213b5e4801f84707bc2088f747 -SHA1 (patch-co) = cd71d4c794a489129c985877ab45753ae139e7ce +SHA1 (patch-co) = 8983ff1dbd11907d9399b2cf497d74378291a4df SHA1 (patch-cp) = d989a4a195622b2aba899d70f1700b602eeb771f SHA1 (patch-cq) = 3d9022971b371500bdf14f800a7e392beefefee0 SHA1 (patch-cr) = 025e5607cd3ecbc0c261f473bf0ddb31e9f70265 @@ -77,31 +77,31 @@ SHA1 (patch-cs) = b4b224a0215dc11e20a1e54588d166a29621a997 SHA1 (patch-ct) = 36d8a2eaeeed831e307e74ccba97007e037b61f2 SHA1 (patch-cu) = ce19d2151f259e0cb5358a0c4350b391da94cbd9 SHA1 (patch-cv) = 56fffeff6ca82ca661ee5ef72deb1d328777fb3e -SHA1 (patch-cw) = ec330b271c23788786ce32941f26d40277d09536 -SHA1 (patch-cx) = 55fb26597f0b6737e157af19ed3752e84d5f71f3 -SHA1 (patch-cy) = 2700e41897de42850073f235040088305e065a07 -SHA1 (patch-cz) = c54892c234cf60032b236515d0fd20c1a02a99fb +SHA1 (patch-cw) = ab33630d7854e7d93190a37d232ea481fc49159c +SHA1 (patch-cx) = 3df44c86e60ed0e542a6746d04695b7e65adca73 +SHA1 (patch-cy) = 5d511a7d6cd4a0aefd0b05e0e1e26b3b8567ec08 +SHA1 (patch-cz) = d772125c6aeebec919bccd083f997cdd425c5a1d SHA1 (patch-da) = 58f289767fd9a6f6a334e0e5a770564b780a1212 SHA1 (patch-db) = 94c13bd10197c4b209a46da3e8008685db22adb6 -SHA1 (patch-dc) = 40274cd5581f626914bef70df477469773557e3d -SHA1 (patch-dd) = baf2201c61088de823bb42f49427b3f53c3c4123 -SHA1 (patch-de) = a06bd0224b4c0de068486851753646e268c27673 -SHA1 (patch-df) = c2af3e6d2f74942ad1dd3d97c0462f7f3ffff793 +SHA1 (patch-dc) = d0240a7a6e330af56167b5707cd91fcade334d5f +SHA1 (patch-dd) = 935f97cffd10b44c5bd7d80e599b3f897d56b049 +SHA1 (patch-de) = 7896d70ab94054d8a77049df47eceb2505c60ed1 +SHA1 (patch-df) = 1140349bd309cfdc43c586e39914b607f2cb8e7a SHA1 (patch-dg) = 1c757673e8d21f90363997f853492c7d98192098 SHA1 (patch-dh) = b0b7c1d3b99991c64e4d70a27f601993baa1f91b SHA1 (patch-di) = da64503892d0e421bce6f8f07da879884a757bcb -SHA1 (patch-dj) = 685901dcf270f9028a67f0a414b5bfb83644657c +SHA1 (patch-dj) = 7b13ec762f5dc0f21a1416c311e20c4ed2b62afc SHA1 (patch-dk) = ed02c7f7aa8ee25c4227843e115689952f765caf SHA1 (patch-dl) = 0aef1fe619dc5ff228d813d816f5e974d49bf829 -SHA1 (patch-dm) = 6d3dfb8ab718bdfacaa59785304d5ae7978d4f9c -SHA1 (patch-dn) = 68b66abb8c0b1c6aebbc8df06c193b2e7f377dcf -SHA1 (patch-do) = 6631be46113498b433b10f8067b0ba8ed0239c5e -SHA1 (patch-dp) = 65d121b240b0454ff40a2b27c8ed95f5527b139a +SHA1 (patch-dm) = 205ac73da2105f82d497279507f93a6ec703a5d0 +SHA1 (patch-dn) = b0ccb6467097b3b1937810d9f1fc6a2b21fbabc2 +SHA1 (patch-do) = 14d0e4cb02758b457b2c78ae1ee5d0899b0faa65 +SHA1 (patch-dp) = 94c78bf81c6125d14df071eb0d2738eef95b5f17 SHA1 (patch-dq) = 951faffa9e5b377f8709c3e155b9bbf36b76e19c -SHA1 (patch-dr) = ec77026b2c8c5339f5121070f03f96d9a7a9c6fd -SHA1 (patch-ds) = 25d7937970d520ddd8ebf3c5260b048769694e1b +SHA1 (patch-dr) = e7c97b18c3b6db18411f86af87f4987f186eb755 +SHA1 (patch-ds) = 9e94de59e2979bd51cab164a4464ae0bdfb4eaa2 SHA1 (patch-dt) = 38168d6d296814f166a528e35cd92c2686e8a98e -SHA1 (patch-du) = 53a9627038f24c135d6808e737bb018a202a7bad +SHA1 (patch-du) = f1ffe17e2aae3199885bb4f2889c6935089f4926 SHA1 (patch-dv) = 7326dba16b9043ede173a9aeaa6eabce4a83c730 SHA1 (patch-dw) = 9002f1f1477d4d8d1e587c19749b01fc46211615 SHA1 (patch-dx) = 3e437213954b74af62045bc0b650ded6be73ed46 @@ -109,4 +109,14 @@ SHA1 (patch-dy) = b336b712f3fb7964ee4a5ed76ec4cab8a5ad72b7 SHA1 (patch-dz) = b8304af8ac019af3224f0df0212e5d4da4226eac SHA1 (patch-ea) = ac9158bfc79aba18b318f1e2e7ac0fa2427cfbec SHA1 (patch-eb) = 05fcefb5b5f0799b92828b72938a57854707a69b +SHA1 (patch-ec) = 76f2a9d23643b4603fffc933c2fd0860fa4c3052 +SHA1 (patch-ed) = 6a377819f933cea63580b82be6328d47376d7b7d +SHA1 (patch-ee) = 1bd444f2e77d0637c86a054e94229cd714ad0875 +SHA1 (patch-ef) = f16205feb29f7ea282e098ad9434f56900d12e02 +SHA1 (patch-eg) = e746accd7d17649d6f7cd7f8195ef2357d231c98 +SHA1 (patch-eh) = 73cc36fe2cba94e9c1fbab06628dfefb90d96994 +SHA1 (patch-ei) = 65e504ea6b78958b5ff3a805559d4429f4f6e798 +SHA1 (patch-ej) = 8eb2a61821f1ebf778ae1fa7a828de3a0b8e2ae6 +SHA1 (patch-ek) = 49c51048cb416e53279d9f319466f5eaf5c28ae0 +SHA1 (patch-el) = 51e1d47e1f42e1cc62d53b1e4c3426b9dbf4a798 SHA1 (patch-fa) = b17b18509017d19e52c1c54416bec24d67ce2b4d diff --git a/x11/xview-lib/patches/patch-am b/x11/xview-lib/patches/patch-am index f5eea6ad7e6..01ea8af66af 100644 --- a/x11/xview-lib/patches/patch-am +++ b/x11/xview-lib/patches/patch-am @@ -1,4 +1,4 @@ -$NetBSD: patch-am,v 1.3 2001/12/20 09:19:55 tron Exp $ +$NetBSD: patch-am,v 1.4 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/io_stream/file_strms.c.orig Tue Jun 29 07:15:07 1993 +++ lib/libxview/io_stream/file_strms.c Thu Dec 20 10:09:16 2001 @@ -6,7 +6,7 @@ $NetBSD: patch-am,v 1.3 2001/12/20 09:19:55 tron Exp $ #define GetFISData struct xv_file_input_stream_data *data = (struct xv_file_input_stream_data*) in->client_data -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) static struct xv_file_input_stream_data { +#else +struct xv_file_input_stream_data { @@ -18,7 +18,7 @@ $NetBSD: patch-am,v 1.3 2001/12/20 09:19:55 tron Exp $ #define GetFOSData struct xv_file_output_stream_data *data = (struct xv_file_output_stream_data*) out->client_data -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) static struct xv_file_output_stream_data { +#else +struct xv_file_output_stream_data { diff --git a/x11/xview-lib/patches/patch-an b/x11/xview-lib/patches/patch-an index 1dc5275eae7..700732443d6 100644 --- a/x11/xview-lib/patches/patch-an +++ b/x11/xview-lib/patches/patch-an @@ -1,4 +1,4 @@ -$NetBSD: patch-an,v 1.3 2001/12/20 09:19:55 tron Exp $ +$NetBSD: patch-an,v 1.4 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/io_stream/othr_strms.c.orig Tue Jun 29 07:15:05 1993 +++ lib/libxview/io_stream/othr_strms.c Thu Dec 20 10:09:16 2001 @@ -6,7 +6,7 @@ $NetBSD: patch-an,v 1.3 2001/12/20 09:19:55 tron Exp $ #define GetFCSData struct xv_filter_comments_stream_data *data = (struct xv_filter_comments_stream_data*) in->client_data -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) static struct xv_filter_comments_stream_data { +#else +struct xv_filter_comments_stream_data { diff --git a/x11/xview-lib/patches/patch-ao b/x11/xview-lib/patches/patch-ao index abef8a0f08d..4db78ab12af 100644 --- a/x11/xview-lib/patches/patch-ao +++ b/x11/xview-lib/patches/patch-ao @@ -1,4 +1,4 @@ -$NetBSD: patch-ao,v 1.2 2001/12/20 09:19:55 tron Exp $ +$NetBSD: patch-ao,v 1.3 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/io_stream/str_strms.c.orig Tue Jun 29 07:15:06 1993 +++ lib/libxview/io_stream/str_strms.c Thu Dec 20 10:09:16 2001 @@ -6,7 +6,7 @@ $NetBSD: patch-ao,v 1.2 2001/12/20 09:19:55 tron Exp $ #define GetSISData struct string_input_stream_data *data = (struct string_input_stream_data*) in->client_data -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) static struct string_input_stream_data { +#else +struct string_input_stream_data { @@ -18,7 +18,7 @@ $NetBSD: patch-ao,v 1.2 2001/12/20 09:19:55 tron Exp $ #define GetSOSData struct string_output_stream_data *data = (struct string_output_stream_data*) out->client_data -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) static struct string_output_stream_data { +#else +struct string_output_stream_data { diff --git a/x11/xview-lib/patches/patch-ar b/x11/xview-lib/patches/patch-ar index b9e9a66847d..20b5df70dbc 100644 --- a/x11/xview-lib/patches/patch-ar +++ b/x11/xview-lib/patches/patch-ar @@ -1,4 +1,4 @@ -$NetBSD: patch-ar,v 1.2 2001/12/20 09:19:56 tron Exp $ +$NetBSD: patch-ar,v 1.3 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/sel/seln_impl.h.orig Tue Jun 29 07:15:25 1993 +++ lib/libxview/sel/seln_impl.h Thu Dec 20 10:09:17 2001 @@ -21,3 +21,14 @@ $NetBSD: patch-ar,v 1.2 2001/12/20 09:19:56 tron Exp $ #endif FILE #include <sys/time.h> #include <sys/types.h> +@@ -27,10 +32,6 @@ + #include <xview/sel_attrs.h> + #include <X11/Xlib.h> + +-extern int errno; +- +- +- + /* + * Procedure IDs for client-module procedures + */ diff --git a/x11/xview-lib/patches/patch-at b/x11/xview-lib/patches/patch-at index d661040521e..35ace1ac800 100644 --- a/x11/xview-lib/patches/patch-at +++ b/x11/xview-lib/patches/patch-at @@ -1,8 +1,8 @@ -$NetBSD: patch-at,v 1.2 2001/12/20 09:19:56 tron Exp $ +$NetBSD: patch-at,v 1.3 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/win/win_input.c.orig Mon Jun 27 00:27:53 1994 +++ lib/libxview/win/win_input.c Thu Dec 20 10:09:19 2001 -@@ -56,6 +56,7 @@ +@@ -56,6 +56,7 @@ static int BlockForEvent(); static int GetButtonEvent(); static int win_translate_KP_keysym(); static int translate_key(); @@ -10,7 +10,7 @@ $NetBSD: patch-at,v 1.2 2001/12/20 09:19:56 tron Exp $ extern struct rectlist *win_get_damage(); extern void server_set_timestamp(); -@@ -853,7 +854,9 @@ +@@ -853,7 +854,9 @@ ContProcess: #ifdef X11R6 /* lumpi@dobag.in-berlin.de */ int ksym_pcc; @@ -21,7 +21,7 @@ $NetBSD: patch-at,v 1.2 2001/12/20 09:19:56 tron Exp $ for (index = 0; index < ksym_pcc; index++) { #else for (index = 0; index < display->keysyms_per_keycode; index++) { -@@ -861,7 +864,7 @@ +@@ -861,7 +864,7 @@ ContProcess: if ((ksym = XLookupKeysym(ek, index)) != NoSymbol) if (IsKeypadKey(ksym)) { /* See if key has been rebound. */ @@ -30,7 +30,15 @@ $NetBSD: patch-at,v 1.2 2001/12/20 09:19:56 tron Exp $ buffer, BUFFERSIZE)) { (void)win_translate_KP_keysym(ksym, buffer); } -@@ -2720,8 +2723,10 @@ +@@ -2341,7 +2344,6 @@ BlockForEvent(display, xevent, usec, pre + int result; + struct timeval timeout; + struct timeval starttime, curtime, diff1, diff2; +- extern int errno; + + timeout.tv_sec = 0; + timeout.tv_usec = usec; +@@ -2720,8 +2722,10 @@ win_translate_KP_keysym(keysym, buffer) * Xlib's. */ @@ -43,7 +51,7 @@ $NetBSD: patch-at,v 1.2 2001/12/20 09:19:56 tron Exp $ static int translate_key(dpy, symbol, modifiers, buffer, nbytes) Display *dpy; -@@ -2731,11 +2736,18 @@ +@@ -2731,11 +2735,18 @@ translate_key(dpy, symbol, modifiers, bu int nbytes; { /* This is _very_ rude ! */ @@ -64,7 +72,7 @@ $NetBSD: patch-at,v 1.2 2001/12/20 09:19:56 tron Exp $ static int translate_key(dpy, symbol, modifiers, buffer, nbytes) Display *dpy; -@@ -2761,4 +2773,4 @@ +@@ -2761,4 +2772,4 @@ translate_key(dpy, symbol, modifiers, bu } return 0; } diff --git a/x11/xview-lib/patches/patch-ba b/x11/xview-lib/patches/patch-ba index 8f976a7e3e1..86dd2ce074a 100644 --- a/x11/xview-lib/patches/patch-ba +++ b/x11/xview-lib/patches/patch-ba @@ -1,8 +1,8 @@ -$NetBSD: patch-ba,v 1.1 2001/12/20 09:19:56 tron Exp $ +$NetBSD: patch-ba,v 1.2 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/selection/sel_util.c.orig Tue Jun 29 07:16:03 1993 +++ lib/libxview/selection/sel_util.c Thu Dec 20 10:09:17 2001 -@@ -23,6 +23,7 @@ +@@ -23,6 +23,7 @@ static void tvdiff(); static void FreeMultiProp(); static int SelMatchReply(); static Sel_req_tbl *SelMatchReqTbl(); @@ -10,7 +10,15 @@ $NetBSD: patch-ba,v 1.1 2001/12/20 09:19:56 tron Exp $ Pkg_private struct timeval * xv_sel_cvt_xtime_to_timeval( XTime ) -@@ -601,7 +602,7 @@ +@@ -510,7 +511,6 @@ char *arg; + int result; + struct timeval timeout; + struct timeval starttime, curtime, diff1, diff2; +- extern int errno; + + timeout.tv_sec = seconds; + timeout.tv_usec = 0; +@@ -601,7 +601,7 @@ Sel_reply_info *reply; reqTbl->reply = reply; reqTbl->next = NULL; (void)XSaveContext( dpy, DefaultRootWindow(dpy),replyCtx, diff --git a/x11/xview-lib/patches/patch-co b/x11/xview-lib/patches/patch-co index 8b1214a7c18..51e2867a10b 100644 --- a/x11/xview-lib/patches/patch-co +++ b/x11/xview-lib/patches/patch-co @@ -1,4 +1,4 @@ -$NetBSD: patch-co,v 1.1 2001/12/20 09:20:03 tron Exp $ +$NetBSD: patch-co,v 1.2 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/ttysw/tty_mapkey.c.orig Tue Jun 29 07:17:20 1993 +++ lib/libxview/ttysw/tty_mapkey.c Thu Dec 20 10:09:19 2001 @@ -7,7 +7,7 @@ $NetBSD: patch-co,v 1.1 2001/12/20 09:20:03 tron Exp $ */ -#ifdef i386 -+#if defined(i386) && !defined (__FreeBSD__) && !defined(__NetBSD__) ++#if defined(i386) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) static void ttysw_arrow_keys_to_string(xv_id, str) unsigned xv_id; diff --git a/x11/xview-lib/patches/patch-cw b/x11/xview-lib/patches/patch-cw index 0cf80eb3fcd..804da95bc16 100644 --- a/x11/xview-lib/patches/patch-cw +++ b/x11/xview-lib/patches/patch-cw @@ -1,8 +1,8 @@ -$NetBSD: patch-cw,v 1.2 2001/12/20 09:22:04 tron Exp $ +$NetBSD: patch-cw,v 1.3 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/textsw/txt_again.c.orig Tue Jun 29 07:17:32 1993 +++ lib/libxview/textsw/txt_again.c Thu Dec 20 10:11:57 2001 -@@ -28,6 +28,8 @@ +@@ -28,6 +28,8 @@ Pkg_private CHAR *STRNCPY(); Pkg_private Es_index textsw_do_input(); Pkg_private Es_index textsw_do_pending_delete(); @@ -11,18 +11,33 @@ $NetBSD: patch-cw,v 1.2 2001/12/20 09:22:04 tron Exp $ string_t null_string = {0, 0, 0}; #define TEXT_DELIMITER "\\" -@@ -182,6 +184,7 @@ +@@ -182,6 +184,7 @@ textsw_string_min_free(ptr_to_string, mi * Following is stolen from 3.2ALPHA sprintf(str, fmt, va_alist) SIDE_EFFECT: * TXTSW_STRING_FREE(ptr_to_string) is modified by this routine. */ -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) #ifndef SVR4 /* VARARGS2 */ -@@ -325,6 +328,31 @@ +@@ -325,6 +328,46 @@ va_dcl #endif /* SVR4 */ ++#elif defined(__DragonFly__) ++static int ++textsw_printf(register string_t *ptr_to_string, char *fmt, ...) ++{ ++ int result; ++ va_list args; ++ ++ VA_START(args, fmt); ++ result = vsnprintf(TXTSW_STRING_FREE(ptr_to_string), ptr_to_string->max_length - TXTSW_STRING_LENGTH(ptr_to_string), fmt, args); ++ if (result >=0) ++ TXTSW_STRING_FREE(ptr_to_string) += result; ++ return(result); ++} ++ ++ +#else /* __FreeBSD__ */ +/*inspiration taken from sprintf.c */ + @@ -51,19 +66,38 @@ $NetBSD: patch-cw,v 1.2 2001/12/20 09:22:04 tron Exp $ static void textsw_record_buf(again, buffer, buffer_length) register string_t *again; -@@ -619,6 +647,8 @@ +@@ -619,6 +662,8 @@ textsw_record_trash_insert(textsw) */ /* VARARGS2 */ -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) + static int #ifdef ANSI_FUNC_PROTO textsw_scanf(register string_t *ptr_to_string, register char *fmt, ...) -@@ -705,6 +735,38 @@ +@@ -705,6 +750,57 @@ va_dcl #endif /* OW_I18N */ } ++#elif defined(__DragonFly__) ++static int ++textsw_scanf(register string_t *ptr_to_string, char *fmt, ...) ++{ ++ va_list args; ++ int result; ++ size_t len = TXTSW_STRING_LENGTH(ptr_to_string); ++ char *str = malloc(len + 1); ++ if (str == NULL) ++ return -1; ++ memcpy(str, TXTSW_STRING_BASE(ptr_to_string), len); ++ str[len] = '\0'; ++ VA_START(args, fmt); ++ result = vsscanf(str, fmt, args); ++ va_end(args); ++ free(str); ++ return(result); ++} ++ +#else /* __FreeBSD__ */ +/*inspiration/code taken from sscanf.c */ + diff --git a/x11/xview-lib/patches/patch-cx b/x11/xview-lib/patches/patch-cx index 4e377342d14..d650952f7af 100644 --- a/x11/xview-lib/patches/patch-cx +++ b/x11/xview-lib/patches/patch-cx @@ -1,8 +1,13 @@ -$NetBSD: patch-cx,v 1.1 2001/12/20 09:20:05 tron Exp $ +$NetBSD: patch-cx,v 1.2 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/textsw/txt_e_menu.c.orig Tue Jun 29 07:17:42 1993 +++ lib/libxview/textsw/txt_e_menu.c Thu Dec 20 10:09:17 2001 -@@ -50,8 +50,12 @@ +@@ -45,13 +45,16 @@ static char sccsid[] = "@(#)txt_e_me + * Declare errno. Some BSD systems do not have errno declared in + * <errno.h> + */ +-extern int errno; + #define ERROR -1 #define MAX_FILES 40 @@ -15,7 +20,7 @@ $NetBSD: patch-cx,v 1.1 2001/12/20 09:20:05 tron Exp $ #define MAXSTRLEN 256 #define MAXARGS 20 -@@ -78,6 +82,8 @@ +@@ -78,6 +81,8 @@ static char *check_filename_locale(); extern int EXTRASMENU_FILENAME_KEY; @@ -24,12 +29,12 @@ $NetBSD: patch-cx,v 1.1 2001/12/20 09:20:05 tron Exp $ Pkg_private char * textsw_get_extras_filename(mi) Menu_item mi; -@@ -136,7 +142,7 @@ +@@ -136,7 +141,7 @@ textsw_get_extras_filename(mi) goto found; } -#ifdef notdef -+#if defined(__FreeBSD__) || defined(__NetBSD__) ++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) /* Gee, still?... We will try the old fashioned way */ (void) sprintf(tmp, "%s/lib/.%s", filename, EXTRASMENU); diff --git a/x11/xview-lib/patches/patch-cy b/x11/xview-lib/patches/patch-cy index fe98709644e..9d4aae8e785 100644 --- a/x11/xview-lib/patches/patch-cy +++ b/x11/xview-lib/patches/patch-cy @@ -1,14 +1,22 @@ -$NetBSD: patch-cy,v 1.2 2004/09/30 20:38:28 kristerw Exp $ +$NetBSD: patch-cy,v 1.3 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/textsw/txt_file.c.orig 1993-06-29 07:17:48.000000000 +0200 +++ lib/libxview/textsw/txt_file.c 2004-09-30 22:24:41.000000000 +0200 -@@ -45,13 +45,27 @@ +@@ -18,6 +18,7 @@ static char sccsid[] = "@(#)txt_file + #include <xview_private/txt_impl.h> + #include <xview_private/ev_impl.h> + #include <xview_private/txt_18impl.h> ++#include <limits.h> + #ifdef SVR4 + #include <dirent.h> + #include <string.h> +@@ -45,13 +46,27 @@ static char sccsid[] = "@(#)txt_file extern CHAR *STRCAT(); extern CHAR *STRNCAT(); -#ifdef SVR4 + -+#if (defined(SVR4) || (__NetBSD_Version__ >= 103080000)) ++#if (defined(SVR4) || (__NetBSD_Version__ >= 103080000)) || defined(__DragonFly__) +#define GETCWD +#endif + @@ -19,7 +27,7 @@ $NetBSD: patch-cy,v 1.2 2004/09/30 20:38:28 kristerw Exp $ -#endif /* SVR4 */ +#endif /* GETCWD */ +#if (defined(BSD) && (BSD >= 199306)) -+#if __NetBSD_Version__ > 103080000 ++#if defined(__DragonFly__) || (defined(__NetBSD__) && __NetBSD_Version__ > 103080000) +#include <errno.h> +#else +extern int errno, sys_nerr; @@ -32,7 +40,19 @@ $NetBSD: patch-cy,v 1.2 2004/09/30 20:38:28 kristerw Exp $ Pkg_private int textsw_change_directory(); Pkg_private void textsw_display(), textsw_display_view_margins(); -@@ -354,21 +368,21 @@ +@@ -314,7 +329,11 @@ textsw_load_selection(folio, locx, locy, + register int locx, locy; + int no_cd; + { ++#ifdef NAME_MAX ++ CHAR filename[NAME_MAX]; ++#else + CHAR filename[MAXNAMLEN]; ++#endif + register int result; + + if (textsw_get_selection_as_filename( +@@ -354,21 +373,21 @@ textsw_full_pathname(name) } #ifdef OW_I18N @@ -58,3 +78,363 @@ $NetBSD: patch-cy,v 1.2 2004/09/30 20:38:28 kristerw Exp $ return (0); #endif /* OW_I18N */ +@@ -459,8 +478,13 @@ textsw_load_file(abstract, filename, res + int reset_views; + int locx, locy; + { ++#ifdef NAME_MAX ++ char notice_msg_buf[NAME_MAX + 100]; ++ CHAR scratch_name[NAME_MAX]; ++#else + char notice_msg_buf[MAXNAMLEN + 100]; + CHAR scratch_name[MAXNAMLEN]; ++#endif + int result; + Es_status status; + Es_handle new_esh; +@@ -546,7 +570,11 @@ textsw_load_file_quietly(abstract, filen + int reset_views; + int locx, locy; + { ++#ifdef NAME_MAX ++ CHAR scratch_name[NAME_MAX]; ++#else + CHAR scratch_name[MAXNAMLEN]; ++#endif + Es_status status; + Es_handle new_esh; + Es_index start_at; +@@ -587,7 +615,11 @@ textsw_save_store_common(folio, output_n + CHAR *output_name; + int reload; + { ++#ifdef NAME_MAX ++ CHAR scratch_name[NAME_MAX]; ++#else + CHAR scratch_name[MAXNAMLEN]; ++#endif + Es_handle new_esh; + register Es_handle output; + Es_status result; +@@ -604,9 +636,16 @@ textsw_save_store_common(folio, output_n + es_destroy(output); + if (folio->checkpoint_name) { + #ifdef OW_I18N ++#ifdef NAME_MAX ++ char temp_mb[NAME_MAX]; ++ ++ (void) wcstombs(temp_mb, folio->checkpoint_name, NAME_MAX); ++#else + char temp_mb[MAXNAMLEN]; + + (void) wcstombs(temp_mb, folio->checkpoint_name, MAXNAMLEN); ++#endif ++ + if (unlink(temp_mb) == -1) { /* } for match */ + #else + if (unlink(folio->checkpoint_name) == -1) { +@@ -733,7 +772,11 @@ textsw_save_internal(folio, error_buf, l + int locx, locy; /* Currently unused */ + { + Pkg_private Es_handle es_file_make_backup(); ++#ifdef NAME_MAX ++ CHAR original_name[NAME_MAX], *name; ++#else + CHAR original_name[MAXNAMLEN], *name; ++#endif + register char *msg; + Es_handle backup, original = ES_NULL; + int status; +@@ -826,10 +869,16 @@ Was the file edited with another editor? + textsw_save_store_common(folio, original_name, RELOAD)) { + case ES_SUCCESS: { + #ifdef OW_I18N ++#ifdef NAME_MAX ++ char original_name_mb[NAME_MAX]; ++ ++ (void) wcstombs(original_name_mb, original_name, NAME_MAX); ++#else + char original_name_mb[MAXNAMLEN]; + + (void) wcstombs(original_name_mb, original_name, MAXNAMLEN); + #endif ++#endif + (void) es_destroy(original); + textsw_notify(folio->first_view, + #ifdef OW_I18N +@@ -868,7 +917,11 @@ textsw_save(abstract, locx, locy) + Textsw abstract; + int locx, locy; + { ++#ifdef NAME_MAX ++ char error_buf[NAME_MAX]; ++#else + char error_buf[MAXNAMLEN + 100]; ++#endif + Es_status status; + Textsw_view_handle view = VIEW_ABS_TO_REP(abstract); + +@@ -969,7 +1022,11 @@ textsw_cd(textsw, locx, locy) + Textsw_folio textsw; + int locx, locy; + { ++#ifdef NAME_MAX ++ CHAR buf[NAME_MAX]; ++#else + CHAR buf[MAXNAMLEN]; ++#endif + + if (0 == textsw_get_selection_as_filename( + textsw, buf, SIZEOF(buf), locx, locy)) { +@@ -988,15 +1045,27 @@ textsw_get_from_file(view, filename, pri + int fd; + Es_status status; + Textsw_status result = TEXTSW_STATUS_CANNOT_INSERT_FROM_FILE; ++#ifdef NAME_MAX ++ CHAR buf[NAME_MAX]; ++#else + CHAR buf[MAXNAMLEN]; ++#endif + + if (!TXTSW_IS_READ_ONLY(folio) && ((int)STRLEN(filename) > 0)) { + STRCPY(buf, filename); + #ifdef OW_I18N ++#ifdef NAME_MAX ++ if (textsw_expand_filename(folio, buf, NAME_MAX, -1, -1) == 0) {/* } */ ++ char buf_mb[NAME_MAX]; ++ ++ (void) wcstombs(buf_mb, buf, NAME_MAX); ++#else + if (textsw_expand_filename(folio, buf, MAXNAMLEN, -1, -1) == 0) {/* } */ + char buf_mb[MAXNAMLEN]; + + (void) wcstombs(buf_mb, buf, MAXNAMLEN); ++#endif ++ + if ((fd = open(buf_mb, 0)) >= 0) { /* } for match */ + textsw_implicit_commit(folio); + #else +@@ -1034,9 +1103,15 @@ textsw_file_stuff(view, locx, locy) + { + Textsw_folio folio = FOLIO_FOR_VIEW(view); + int fd; ++#ifdef NAME_MAX ++ CHAR buf[NAME_MAX]; ++ char msg[NAME_MAX + 100], *sys_msg; ++ char notice_msg1[NAME_MAX + 100]; ++#else + CHAR buf[MAXNAMLEN]; + char msg[MAXNAMLEN + 100], *sys_msg; + char notice_msg1[MAXNAMLEN + 100]; ++#endif + char *notice_msg2; + Es_status status; + int cannot_open = 0; +@@ -1047,9 +1122,15 @@ textsw_file_stuff(view, locx, locy) + if (0 == textsw_get_selection_as_filename( + folio, buf, SIZEOF(buf), locx, locy)) { + #ifdef OW_I18N ++#ifdef NAME_MAX ++ char buf_mb[NAME_MAX]; ++ ++ (void) wcstombs(buf_mb, buf, NAME_MAX); ++#else + char buf_mb[MAXNAMLEN]; + + (void) wcstombs(buf_mb, buf, MAXNAMLEN); ++#endif + if ((fd = open(buf_mb, 0)) < 0) { /* } for match */ + #else + if ((fd = open(buf, 0)) < 0) { +@@ -1141,8 +1222,13 @@ textsw_file_stuff_from_str(view, buf, lo + { + Textsw_folio folio = FOLIO_FOR_VIEW(view); + int fd; ++#ifdef NAME_MAX ++ char msg[NAME_MAX + 100], *sys_msg; ++ char notice_msg1[NAME_MAX + 100]; ++#else + char msg[MAXNAMLEN + 100], *sys_msg; + char notice_msg1[MAXNAMLEN + 100]; ++#endif + char *notice_msg2; + Es_status status; + int cannot_open = 0; +@@ -1150,9 +1236,15 @@ textsw_file_stuff_from_str(view, buf, lo + Xv_Notice text_notice; + Frame frame; + #ifdef OW_I18N ++#ifdef NAME_MAX ++ char buf_mb[NAME_MAX]; ++ ++ (void) wcstombs(buf_mb, buf, NAME_MAX); ++#else + char buf_mb[MAXNAMLEN]; + + (void) wcstombs(buf_mb, buf, MAXNAMLEN); ++#endif + if ((fd = open(buf_mb, 0)) < 0) { /* } for match */ + #else + if ((fd = open(buf, 0)) < 0) { +@@ -1245,9 +1337,15 @@ textsw_store_init(textsw, filename) + { + struct stat stat_buf; + #ifdef OW_I18N ++#ifdef NAME_MAX ++ char filename_mb[NAME_MAX]; ++ ++ (void) wcstombs(filename_mb, filename, NAME_MAX); ++#else + char filename_mb[MAXNAMLEN]; + + (void) wcstombs(filename_mb, filename, MAXNAMLEN); ++#endif + if (stat(filename_mb, &stat_buf) == 0) { /* } for match */ + #else + if (stat(filename, &stat_buf) == 0) { +@@ -1310,10 +1408,16 @@ textsw_process_store_error(textsw, filen + case ES_CANNOT_OVERWRITE: + #ifdef OW_I18N + { ++#ifdef NAME_MAX ++ char filename_mb[NAME_MAX]; ++ ++ (void) wcstombs(filename_mb, filename, NAME_MAX); ++#else + char filename_mb[MAXNAMLEN]; + + (void) wcstombs(filename_mb, filename, MAXNAMLEN); + #endif ++#endif + frame = FRAME_FROM_FOLIO_OR_VIEW(textsw); + text_notice = (Xv_Notice)xv_get(frame, + XV_KEY_DATA, text_notice_key, +@@ -1465,9 +1569,12 @@ textsw_store_file_internal(abstract, fil + if (status == ES_SUCCESS) { + if (textsw->state & TXTSW_STORE_CHANGES_FILE) { + #ifdef OW_I18N +- char filename_mbs[MAXNAMLEN]; ++#ifdef NAME_MAX ++ char filename_mbs[NAME_MAX]; + +- (void) wcstombs(filename_mbs, filename, MAXNAMLEN); ++ (void) wcstombs(filename_mbs, filename, NAME_MAX); ++#else ++#endif + textsw_notify(textsw->first_view, + TEXTSW_ACTION_LOADED_FILE, filename_mbs, + TEXTSW_ACTION_LOADED_FILE_WCS, filename, 0); +@@ -1491,9 +1598,15 @@ textsw_store_file(abstract, filename, lo + int locx, locy; + { + #ifdef OW_I18N ++#ifdef NAME_MAX ++ CHAR filename_wcs[NAME_MAX]; ++ ++ (void) mbstowcs(filename_wcs, filename, NAME_MAX); ++#else + CHAR filename_wcs[MAXNAMLEN]; + + (void) mbstowcs(filename_wcs, filename, MAXNAMLEN); ++#endif + return (textsw_store_file_internal(abstract, filename_wcs, locx, locy)); + #else + return (textsw_store_file_internal(abstract, filename, locx, locy)); +@@ -1516,7 +1629,11 @@ textsw_store_to_selection(textsw, locx, + Textsw_folio textsw; + int locx, locy; + { ++#ifdef NAME_MAX ++ CHAR filename[NAME_MAX]; ++#else + CHAR filename[MAXNAMLEN]; ++#endif + + if (textsw_get_selection_as_filename( + textsw, filename, SIZEOF(filename), locx, locy)) +@@ -1545,11 +1662,19 @@ textsw_reset_2(abstract, locx, locy, pre + #endif /* SVR4 */ + Pkg_private Es_handle es_mem_create(); + Es_handle piece_esh, old_original_esh, new_original_esh; ++ char *temp_name; ++#ifdef NAME_MAX ++#ifdef OW_I18N ++ CHAR *name, save_name[NAME_MAX], scratch_name[NAME_MAX]; ++#else ++ char *name, save_name[NAME_MAX], scratch_name[NAME_MAX]; ++#endif ++#else + #ifdef OW_I18N + CHAR *name, save_name[MAXNAMLEN], scratch_name[MAXNAMLEN]; +- char *temp_name; + #else +- char *name, save_name[MAXNAMLEN], scratch_name[MAXNAMLEN], *temp_name; ++ char *name, save_name[MAXNAMLEN], scratch_name[MAXNAMLEN]; ++#endif + #endif + int status; + Textsw_folio folio = FOLIO_FOR_VIEW(VIEW_ABS_TO_REP(abstract)); +@@ -1591,7 +1716,11 @@ textsw_reset_2(abstract, locx, locy, pre + (char *) window_get(abstract, TEXTSW_TEMP_FILENAME); + if (temp_name) + #ifdef OW_I18N ++#ifdef NAME_MAX ++ (void) mbstowcs(save_name, temp_name, NAME_MAX); ++#else + (void) mbstowcs(save_name, temp_name, MAXNAMLEN); ++#endif + #else + (void) STRCPY(save_name, temp_name); + #endif +@@ -2150,7 +2279,11 @@ textsw_post_error(folio_or_view, locx, l + int locx, locy; /* Unused */ + char *msg1, *msg2; + { ++#ifdef NAME_MAX ++ char buf[NAME_MAX + 1000]; ++#else + char buf[MAXNAMLEN + 1000]; ++#endif + int size_to_use = sizeof(buf); + Frame frame; + Xv_Notice text_notice; +@@ -2226,8 +2359,13 @@ textsw_change_directory(textsw, filename + CHAR *full_pathname_wc; + char filename[MAXPATHLEN]; + #endif ++#ifdef NAME_MAX ++ char msg[NAME_MAX + 100]; ++ char notice_msg[NAME_MAX + 100]; ++#else + char msg[MAXNAMLEN + 100]; + char notice_msg[MAXNAMLEN + 100]; ++#endif + struct stat stat_buf; + int result = 0; + int notice_result; +@@ -2402,8 +2540,13 @@ textsw_checkpoint_internal(folio) + CHAR *name; + if (textsw_file_name(folio, &name) != 0) + return (ES_CANNOT_GET_NAME); ++#ifdef NAME_MAX ++ if ((folio->checkpoint_name = (CHAR *) MALLOC(NAME_MAX)) == 0) ++ return (ES_CANNOT_GET_NAME); ++#else + if ((folio->checkpoint_name = (CHAR *) MALLOC(MAXNAMLEN)) == 0) + return (ES_CANNOT_GET_NAME); ++#endif + #ifdef OW_I18N + (void) SPRINTF(folio->checkpoint_name, "%ws%%%%", name); + #else +@@ -2773,7 +2916,11 @@ textsw_invalid_data_notice(view, filenam + int flag; + { + Xv_Notice text_notice; ++#ifdef NAME_MAX ++ char notice_msg[NAME_MAX + 300]; ++#else + char notice_msg[MAXNAMLEN + 300]; ++#endif + Frame frame = FRAME_FROM_FOLIO_OR_VIEW(view); + + if (flag) { diff --git a/x11/xview-lib/patches/patch-cz b/x11/xview-lib/patches/patch-cz index 6b81f1fd57a..c025db47305 100644 --- a/x11/xview-lib/patches/patch-cz +++ b/x11/xview-lib/patches/patch-cz @@ -1,8 +1,17 @@ -$NetBSD: patch-cz,v 1.1 2001/12/20 09:20:05 tron Exp $ +$NetBSD: patch-cz,v 1.2 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/textsw/txt_input.c.orig Tue Jun 29 07:17:42 1993 +++ lib/libxview/textsw/txt_input.c Thu Dec 20 10:09:17 2001 -@@ -57,6 +57,8 @@ +@@ -40,8 +40,6 @@ static char sccsid[] = "@(#)txt_inpu + #include <stdlib.h> + #endif /* SVR4 */ + +-extern int errno; +- + Pkg_private Xv_Cursor move_cursor, dup_cursor; /* laf */ + Pkg_private void termsw_menu_set(); + Pkg_private Key_map_handle textsw_do_filter(); +@@ -57,6 +55,8 @@ static void textsw_do_undo(); Pkg_private void textsw_implicit_commit_doit(); #endif diff --git a/x11/xview-lib/patches/patch-dc b/x11/xview-lib/patches/patch-dc index 40fe8304fdb..62a7e6c4551 100644 --- a/x11/xview-lib/patches/patch-dc +++ b/x11/xview-lib/patches/patch-dc @@ -1,13 +1,13 @@ -$NetBSD: patch-dc,v 1.1 2001/12/20 09:20:06 tron Exp $ +$NetBSD: patch-dc,v 1.2 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/textsw/txt_putkey.c.orig Tue Jun 29 07:17:41 1993 +++ lib/libxview/textsw/txt_putkey.c Thu Dec 20 10:09:17 2001 -@@ -21,6 +21,8 @@ - - extern int errno; +@@ -19,7 +19,7 @@ static char sccsid[] = "@(#)txt_putk + #include <xview_private/ev_impl.h> + #include <errno.h> +-extern int errno; +static int textsw_do_put(); -+ + Pkg_private Ev_finger_handle ev_add_finger(); Pkg_private int ev_get_selection(); - Pkg_private Es_handle textsw_esh_for_span(); diff --git a/x11/xview-lib/patches/patch-dd b/x11/xview-lib/patches/patch-dd index fda7d5e8aae..ba04fed73f7 100644 --- a/x11/xview-lib/patches/patch-dd +++ b/x11/xview-lib/patches/patch-dd @@ -1,13 +1,13 @@ -$NetBSD: patch-dd,v 1.1 2001/12/20 09:20:06 tron Exp $ +$NetBSD: patch-dd,v 1.2 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/textsw/txt_selsvc.c.orig Sun Jun 26 03:05:23 1994 +++ lib/libxview/textsw/txt_selsvc.c Thu Dec 20 10:09:17 2001 -@@ -24,6 +24,8 @@ +@@ -24,7 +24,7 @@ static char sccsid[] = "@(#)txt_sels #include <stdlib.h> #endif /* SVR4 */ +-extern int errno; +static int textsw_should_ask_seln_svc(); -+ - extern int errno; Pkg_private Es_status es_copy(); + static Seln_result textsw_seln_yield(); diff --git a/x11/xview-lib/patches/patch-de b/x11/xview-lib/patches/patch-de index 63ed0316763..51310191f4e 100644 --- a/x11/xview-lib/patches/patch-de +++ b/x11/xview-lib/patches/patch-de @@ -1,21 +1,29 @@ -$NetBSD: patch-de,v 1.2 2004/09/30 20:38:28 kristerw Exp $ +$NetBSD: patch-de,v 1.3 2006/01/05 18:25:57 joerg Exp $ ---- lib/libxview/textsw/es_file.c.orig 1993-06-29 07:17:34.000000000 +0200 -+++ lib/libxview/textsw/es_file.c 2004-09-30 22:12:38.000000000 +0200 -@@ -88,10 +88,11 @@ - #ifdef SVR4 +--- lib/libxview/textsw/es_file.c.orig 1993-06-29 05:17:34.000000000 +0000 ++++ lib/libxview/textsw/es_file.c +@@ -85,18 +85,15 @@ static char sccsid[] = "@(#)es_file. + + #include <string.h> + #include <fcntl.h> +-#ifdef SVR4 #include <stdlib.h> #include <dirent.h> -+#include <sys/errno.h> - #else - #include <sys/dir.h> -+#include <errno.h> - #endif /* SVR4 */ +-#else +-#include <sys/dir.h> +-#endif /* SVR4 */ -#include <sys/errno.h> ++#include <errno.h> #include <sys/param.h> #include <sys/types.h> #include <sys/stat.h> -@@ -109,9 +110,14 @@ + #include <sys/file.h> + #include <stdio.h> ++#include <limits.h> + #include <xview/pkg.h> + #include <xview/attrol.h> + #include <xview_private/primal.h> +@@ -109,9 +106,14 @@ static char sccsid[] = "@(#)es_file. #include <xview_private/txt_18impl.h> @@ -30,3 +38,97 @@ $NetBSD: patch-de,v 1.2 2004/09/30 20:38:28 kristerw Exp $ static void update_read_buf(); /* update the read buf if overlaps write buf */ static Es_status es_file_commit(); +@@ -330,6 +332,16 @@ es_file_create(name, options, status) + int open_option; + struct stat buf; + Es_status dummy_status; ++#ifdef NAME_MAX ++#ifndef BACKUP_AT_HEAD_OF_LINK ++ char *temp_name, true_name[NAME_MAX]; ++ int link_count, true_name_len; ++#endif ++#ifdef OW_I18N ++ char name[NAME_MAX]; ++ (void) wcstombs(name, name_wc, NAME_MAX); ++#endif /* OW_I18N */ ++#else + #ifndef BACKUP_AT_HEAD_OF_LINK + char *temp_name, true_name[MAXNAMLEN]; + int link_count, true_name_len; +@@ -338,6 +350,7 @@ es_file_create(name, options, status) + char name[MAXNAMLEN]; + (void) wcstombs(name, name_wc, MAXNAMLEN); + #endif /* OW_I18N */ ++#endif + + if (status == 0) + status = &dummy_status; +@@ -1146,9 +1159,16 @@ es_file_copy_status(esh, to) + Es_file_data private = ABS_TO_REP(esh); + int dummy; + #ifdef OW_I18N ++#ifdef NAME_MAX ++ char to_mb[NAME_MAX]; ++ ++ (void) wcstombs(to_mb,to,NAME_MAX); ++#else + char to_mb[MAXNAMLEN]; + + (void) wcstombs(to_mb,to,MAXNAMLEN); ++#endif ++ + return (es_copy_status(to_mb,private->fd, &dummy)); + #else + return (es_copy_status(to, private->fd, &dummy)); +@@ -1163,7 +1183,11 @@ es_file_make_backup(esh, backup_pattern, + /* Currently backup_pattern must be of the form "%s<suffix>" */ + { + register Es_file_data private; ++#ifdef NAME_MAX ++ CHAR backup_name[NAME_MAX]; ++#else + CHAR backup_name[MAXNAMLEN]; ++#endif + int fd, len, retrying = FALSE; + Es_status dummy_status; + Es_handle result; +@@ -1200,9 +1224,15 @@ Retry: + * cannot be overwritten, so try to remove it first. + */ + #ifdef OW_I18N ++#ifdef NAME_MAX ++ char dummy[NAME_MAX]; ++ ++ (void) wcstombs(dummy, backup_name, MAXNAMLEN); ++#else + char dummy[MAXNAMLEN]; + + (void) wcstombs(dummy, backup_name, MAXNAMLEN); ++#endif + if (unlink(dummy) == 0) { /* } for match */ + #else + if (unlink(backup_name) == 0) { +@@ -1239,7 +1269,11 @@ es_file_make_wchar_file(esh, open_option + { + register Es_file_data private; + char *filename; ++#ifdef NAME_MAX ++ char old_filename[NAME_MAX]; ++#else + char old_filename[MAXNAMLEN]; ++#endif + int fd, new_fd, len; + extern int es_mb_to_wc_fd(); + +@@ -1255,7 +1289,11 @@ es_file_make_wchar_file(esh, open_option + + filename = tempnam(NULL,NULL); + ++#ifdef NAME_MAX ++ (void)wcstombs(old_filename, private->name, NAME_MAX); ++#else + (void)wcstombs(old_filename, private->name, MAXNAMLEN); ++#endif + private->skipped = 0; + + if (es_mb_to_wc_fd(old_filename, filename, fd, &private->skipped) == 0) { diff --git a/x11/xview-lib/patches/patch-df b/x11/xview-lib/patches/patch-df index c43b68a4998..142770663de 100644 --- a/x11/xview-lib/patches/patch-df +++ b/x11/xview-lib/patches/patch-df @@ -1,8 +1,12 @@ -$NetBSD: patch-df,v 1.1 2001/12/20 09:20:06 tron Exp $ +$NetBSD: patch-df,v 1.2 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/textsw/txt_filter.c.orig Tue Jun 29 07:17:39 1993 +++ lib/libxview/textsw/txt_filter.c Thu Dec 20 10:09:58 2001 -@@ -31,7 +31,7 @@ +@@ -28,10 +28,11 @@ static char sccsid[] = "@(#)txt_filt + #include <xview_private/txt_18impl.h> + #include <xview/notify.h> + #include <fcntl.h> ++#include <limits.h> #include <signal.h> #include <string.h> @@ -11,3 +15,28 @@ $NetBSD: patch-df,v 1.1 2001/12/20 09:20:06 tron Exp $ #ifdef SVR4 #include <unistd.h> #else +@@ -66,8 +67,8 @@ extern int dtablesize_cache; + (dtablesize_cache?dtablesize_cache:(dtablesize_cache=getdtablesize())) + #endif /* SVR4 */ + +- +-extern int errno; ++static int talk_to_filter(); ++static int start_filter(); + + Xv_public char *xv_getlogindir(); + Pkg_private Es_index textsw_do_input(); +@@ -934,7 +935,12 @@ Pkg_private int + textsw_parse_rc(textsw) + Textsw_folio textsw; + { +- char *base_name = ".textswrc", file_name[MAXNAMLEN], *login_dir; ++ char *base_name = ".textswrc", *login_dir; ++#ifdef NAME_MAX ++ char file_name[NAME_MAX]; ++#else ++ char file_name[MAXNAMLEN]; ++#endif + STREAM *rc_stream = NULL; + STREAM *rc_wo_comments_stream = NULL; + Key_map_handle current_key; diff --git a/x11/xview-lib/patches/patch-dj b/x11/xview-lib/patches/patch-dj index 9363f94d217..b203fdf7c10 100644 --- a/x11/xview-lib/patches/patch-dj +++ b/x11/xview-lib/patches/patch-dj @@ -1,4 +1,4 @@ -$NetBSD: patch-dj,v 1.1 2001/12/20 09:20:07 tron Exp $ +$NetBSD: patch-dj,v 1.2 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/file_chooser/file_list.c.orig Tue Jun 29 07:17:56 1993 +++ lib/libxview/file_chooser/file_list.c Thu Dec 20 10:09:16 2001 @@ -6,7 +6,7 @@ $NetBSD: patch-dj,v 1.1 2001/12/20 09:20:07 tron Exp $ #include <xview_private/flist_impl.h> #include <xview_private/portable.h> -+#if defined(__FreeBSD__) || defined(__NetBSD__) ++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) +#include <regex.h> +#endif @@ -24,7 +24,7 @@ $NetBSD: patch-dj,v 1.1 2001/12/20 09:20:07 tron Exp $ if (status == DESTROY_CLEANUP) { xv_free_ref( private->directory ); xv_free_ref( private->regex_pattern ); -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) xv_free_ref( private->regex_compile ); +#else + xv_free_regex_t( (regex_t *)private->regex_compile ); @@ -37,7 +37,7 @@ $NetBSD: patch-dj,v 1.1 2001/12/20 09:20:07 tron Exp $ #endif /* SVR4 */ - -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) #include <regexp.h> +#endif @@ -46,7 +46,7 @@ $NetBSD: patch-dj,v 1.1 2001/12/20 09:20:07 tron Exp $ flist_compile_regex( private ) File_list_private *private; { -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) char compile_buf[MAXPATHLEN+1]; char *end_ptr; size_t num_bytes; @@ -72,7 +72,7 @@ $NetBSD: patch-dj,v 1.1 2001/12/20 09:20:07 tron Exp $ char *s; File_list_private *private; { -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) return step(s, private->regex_compile); +#else + return !regexec((regex_t *)private->regex_compile, s, 0, NULL, 0); diff --git a/x11/xview-lib/patches/patch-dm b/x11/xview-lib/patches/patch-dm index fd257384cb5..f8562c9aedf 100644 --- a/x11/xview-lib/patches/patch-dm +++ b/x11/xview-lib/patches/patch-dm @@ -1,8 +1,8 @@ -$NetBSD: patch-dm,v 1.1 2001/12/20 09:20:07 tron Exp $ +$NetBSD: patch-dm,v 1.2 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/notify/ndet_loop.c.orig Tue Jun 29 07:18:19 1993 +++ lib/libxview/notify/ndet_loop.c Thu Dec 20 10:09:16 2001 -@@ -14,13 +14,18 @@ +@@ -14,13 +14,18 @@ static char sccsid[] = "@(#)ndet_loo * Ndet_loop.c - Notification loop. */ @@ -13,7 +13,7 @@ $NetBSD: patch-dm,v 1.1 2001/12/20 09:20:07 tron Exp $ #include <xview_private/nint.h> #include <xview_private/ndis.h> /* For ndis_dispatch */ #ifndef SVR4 -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) #include <syscall.h> +#else +#include <sys/syscall.h> @@ -21,7 +21,16 @@ $NetBSD: patch-dm,v 1.1 2001/12/20 09:20:07 tron Exp $ #else SVR4 #include <sys/syscall.h> #include <sys/poll.h> -@@ -224,7 +229,8 @@ +@@ -35,8 +40,6 @@ static char sccsid[] = "@(#)ndet_loo + #include <stdio.h> /* For temp debugging */ + #include <rpc/rpc.h> + +-extern int errno; +- + pkg_private_data u_int ndet_flags = 0; + pkg_private_data NTFY_CLIENT *ndet_clients = 0; + pkg_private_data NTFY_CLIENT *ndet_client_latest = 0; +@@ -224,7 +227,8 @@ notify_start() * will return with an EINTR when a signal arrives while IN * select, not ON THE WAY into select). */ diff --git a/x11/xview-lib/patches/patch-dn b/x11/xview-lib/patches/patch-dn index eb9c51939e9..11b09a52c06 100644 --- a/x11/xview-lib/patches/patch-dn +++ b/x11/xview-lib/patches/patch-dn @@ -1,4 +1,4 @@ -$NetBSD: patch-dn,v 1.1 2001/12/20 09:20:07 tron Exp $ +$NetBSD: patch-dn,v 1.2 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/notify/sys_fcntl.c.orig Tue Jun 29 07:18:17 1993 +++ lib/libxview/notify/sys_fcntl.c Thu Dec 20 10:09:16 2001 @@ -6,7 +6,7 @@ $NetBSD: patch-dn,v 1.1 2001/12/20 09:20:07 tron Exp $ */ #ifndef SVR4 -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) #include <syscall.h> +#else +#include <sys/syscall.h> diff --git a/x11/xview-lib/patches/patch-do b/x11/xview-lib/patches/patch-do index 924a2474c34..5e2a0a74822 100644 --- a/x11/xview-lib/patches/patch-do +++ b/x11/xview-lib/patches/patch-do @@ -1,4 +1,4 @@ -$NetBSD: patch-do,v 1.1 2001/12/20 09:20:07 tron Exp $ +$NetBSD: patch-do,v 1.2 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/notify/sys_read.c.orig Tue Jun 29 07:18:01 1993 +++ lib/libxview/notify/sys_read.c Thu Dec 20 10:09:16 2001 @@ -6,7 +6,7 @@ $NetBSD: patch-do,v 1.1 2001/12/20 09:20:07 tron Exp $ */ #ifndef SVR4 -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) #include <syscall.h> +#else +#include <sys/syscall.h> diff --git a/x11/xview-lib/patches/patch-dp b/x11/xview-lib/patches/patch-dp index 7e68c7302fe..2e4d3235698 100644 --- a/x11/xview-lib/patches/patch-dp +++ b/x11/xview-lib/patches/patch-dp @@ -1,12 +1,12 @@ -$NetBSD: patch-dp,v 1.1 2001/12/20 09:20:07 tron Exp $ +$NetBSD: patch-dp,v 1.2 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/notify/sys_select.c.orig Tue Jun 29 07:18:11 1993 +++ lib/libxview/notify/sys_select.c Thu Dec 20 10:09:16 2001 -@@ -15,7 +15,11 @@ +@@ -15,7 +15,11 @@ static char sccsid[] = "@(#)sys_sele */ #ifndef SVR4 -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) #include <syscall.h> +#else +#include <sys/syscall.h> @@ -14,3 +14,12 @@ $NetBSD: patch-dp,v 1.1 2001/12/20 09:20:07 tron Exp $ #else SVR4 #include <values.h> #include <sys/time.h> +@@ -28,8 +32,6 @@ static char sccsid[] = "@(#)sys_sele + #include <errno.h> /* For debugging */ + #include <stdio.h> /* For debugging */ + +-extern errno; +- + #ifndef NULL + #define NULL 0 + #endif diff --git a/x11/xview-lib/patches/patch-dr b/x11/xview-lib/patches/patch-dr index 4122962e18f..b436daa2f26 100644 --- a/x11/xview-lib/patches/patch-dr +++ b/x11/xview-lib/patches/patch-dr @@ -1,8 +1,8 @@ -$NetBSD: patch-dr,v 1.1 2001/12/20 09:20:08 tron Exp $ +$NetBSD: patch-dr,v 1.2 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/notify/ndet_read.c.orig Tue Jun 29 07:18:04 1993 +++ lib/libxview/notify/ndet_read.c Thu Dec 20 10:09:16 2001 -@@ -15,6 +15,7 @@ +@@ -15,12 +15,12 @@ static char sccsid[] = "@(#)ndet_rea * not already in the middle of it. */ @@ -10,7 +10,13 @@ $NetBSD: patch-dr,v 1.1 2001/12/20 09:20:08 tron Exp $ #include <xview_private/ntfy.h> #include <xview_private/ndet.h> #include <xview_private/ndis.h> /* For ndis_client == NTFY_CLIENT_NULL check */ -@@ -29,11 +30,16 @@ + #include <errno.h> + +-extern errno; + extern int notify_exclude_fd; + + static Notify_value ndet_read_in_func(); +@@ -29,11 +29,16 @@ static int ndet_read_done; static Notify_client ndet_read_nclient = (Notify_client) & ndet_read_done; diff --git a/x11/xview-lib/patches/patch-ds b/x11/xview-lib/patches/patch-ds index 33618860b05..a90bb27d30a 100644 --- a/x11/xview-lib/patches/patch-ds +++ b/x11/xview-lib/patches/patch-ds @@ -1,4 +1,4 @@ -$NetBSD: patch-ds,v 1.1 2001/12/20 09:20:08 tron Exp $ +$NetBSD: patch-ds,v 1.2 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/notify/ntfy.h.orig Tue Jun 29 07:18:14 1993 +++ lib/libxview/notify/ntfy.h Thu Dec 20 10:09:36 2001 @@ -13,7 +13,7 @@ $NetBSD: patch-ds,v 1.1 2001/12/20 09:20:08 tron Exp $ #include <xview/notify.h> /* -@@ -149,7 +153,7 @@ +@@ -149,7 +153,7 @@ typedef struct ntfy_condition { */ typedef struct ntfy_wait3_data { int pid; /* Process waiting for */ @@ -22,7 +22,7 @@ $NetBSD: patch-ds,v 1.1 2001/12/20 09:20:08 tron Exp $ union wait status; /* Return value from wait3 */ #else SVR4 int status; /* Return value from wait3 */ -@@ -184,9 +188,12 @@ +@@ -184,9 +188,12 @@ extern int ntfy_nodes_avail; /* count of extern sigset_t ntfy_sigs_delayed;/* Bit mask of signals received while in critical section */ @@ -30,7 +30,7 @@ $NetBSD: patch-ds,v 1.1 2001/12/20 09:20:08 tron Exp $ +#if defined(SVR4) #define sigisempty(s) (!(((s)->__sigbits[0]) | ((s)->__sigbits[1]) \ | ((s)->__sigbits[2]) | ((s)->__sigbits[3]))) -+#elif defined(__NetBSD__) && (__NetBSD_Version__ > 103080000) ++#elif (defined(__NetBSD__) && (__NetBSD_Version__ > 103080000)) || defined(__DragonFly__) +#define sigisempty(s) (!(((s)->__bits[0]) | ((s)->__bits[1]) \ + | ((s)->__bits[2]) | ((s)->__bits[3]))) #else diff --git a/x11/xview-lib/patches/patch-du b/x11/xview-lib/patches/patch-du index 9f61d292f6e..5a91f112703 100644 --- a/x11/xview-lib/patches/patch-du +++ b/x11/xview-lib/patches/patch-du @@ -1,4 +1,4 @@ -$NetBSD: patch-du,v 1.1 2001/12/20 09:20:08 tron Exp $ +$NetBSD: patch-du,v 1.2 2006/01/05 18:25:57 joerg Exp $ --- lib/libxview/notify/ntfyclient.c.orig Tue Jun 29 07:18:11 1993 +++ lib/libxview/notify/ntfyclient.c Thu Dec 20 10:09:16 2001 @@ -6,7 +6,7 @@ $NetBSD: patch-du,v 1.1 2001/12/20 09:20:08 tron Exp $ #include <xview_private/ntfy.h> #include <xview_private/ndis.h> /* For ndis_default_prioritizer */ #include <xview_private/ndet.h> -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) #include <search.h> +#endif #include <xview_private/portable.h> @@ -16,7 +16,7 @@ $NetBSD: patch-du,v 1.1 2001/12/20 09:20:08 tron Exp $ if (*client_latest && (*client_latest)->nclient == nclient) return (*client_latest); -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) if(( client_list == ndet_clients ) && ndet_clients ) { dummy_client.nclient = nclient; /* Find client */ @@ -35,7 +35,7 @@ $NetBSD: patch-du,v 1.1 2001/12/20 09:20:08 tron Exp $ register NTFY_CLIENT *client; static NTFY_CLIENT *new_client; -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) if( client_list == &ndet_clients ) { if( new_client == NTFY_CLIENT_NULL ) { if ((new_client = ntfy_alloc_client()) == NTFY_CLIENT_NULL) @@ -54,7 +54,7 @@ $NetBSD: patch-du,v 1.1 2001/12/20 09:20:08 tron Exp $ ntfy_remove_condition(client, condition, who); } /* Remove & free client from client_list */ -+#if !defined(__FreeBSD__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) if( client_list == &ndet_clients ) tdelete( client, ndet_root, ndet_compar ); +#endif diff --git a/x11/xview-lib/patches/patch-ec b/x11/xview-lib/patches/patch-ec new file mode 100644 index 00000000000..15d90eedbd7 --- /dev/null +++ b/x11/xview-lib/patches/patch-ec @@ -0,0 +1,25 @@ +$NetBSD: patch-ec,v 1.1 2006/01/05 18:25:57 joerg Exp $ + +--- lib/libxview/misc/gettext.c.orig 1993-06-29 05:16:30.000000000 +0000 ++++ lib/libxview/misc/gettext.c +@@ -8,12 +8,14 @@ static char sccsid[] = "@(#)gettext. + #endif + + #include <xview_private/gettext.h> +- +-char *strdup(); +-char * dgettext(), *bindtextdomain(); +-char *_gettext(); +-char *fgets(), *getenv(); +-caddr_t mmap(); ++#include <string.h> ++#include <stdlib.h> ++#include <sys/types.h> ++#include <sys/mman.h> ++ ++char *bindtextdomain(char *, unsigned char *); ++char *dgettext(char *, char*); ++static char *_gettext(); + + static struct domain_binding *firstbind=0, *lastbind=0; + diff --git a/x11/xview-lib/patches/patch-ed b/x11/xview-lib/patches/patch-ed new file mode 100644 index 00000000000..4b9e8145d57 --- /dev/null +++ b/x11/xview-lib/patches/patch-ed @@ -0,0 +1,13 @@ +$NetBSD: patch-ed,v 1.1 2006/01/05 18:25:57 joerg Exp $ + +--- lib/libxview/notify/ndet_auto.c.orig 2006-01-04 10:32:37.000000000 +0000 ++++ lib/libxview/notify/ndet_auto.c +@@ -25,8 +25,6 @@ static char sccsid[] = "@(#)ndet_aut + #include <stdlib.h> + #endif SVR4 + +-extern errno; +- + pkg_private_data sigset_t ndet_sigs_auto; + pkg_private_data Notify_client ndet_auto_nclient = + (Notify_client) & ndet_sigs_auto; diff --git a/x11/xview-lib/patches/patch-ee b/x11/xview-lib/patches/patch-ee new file mode 100644 index 00000000000..f2b5bc9c311 --- /dev/null +++ b/x11/xview-lib/patches/patch-ee @@ -0,0 +1,12 @@ +$NetBSD: patch-ee,v 1.1 2006/01/05 18:25:57 joerg Exp $ + +--- lib/libxview/sel/seln.c.orig 2006-01-04 10:33:29.000000000 +0000 ++++ lib/libxview/sel/seln.c +@@ -69,7 +69,6 @@ selection_get(sel_read, window) + FILE *file; + int c; + int n; +- extern errno; + + *sel = selnull; + (void) win_lockdata(window); diff --git a/x11/xview-lib/patches/patch-ef b/x11/xview-lib/patches/patch-ef new file mode 100644 index 00000000000..5e80f4e56b6 --- /dev/null +++ b/x11/xview-lib/patches/patch-ef @@ -0,0 +1,12 @@ +$NetBSD: patch-ef,v 1.1 2006/01/05 18:25:57 joerg Exp $ + +--- lib/libxview/win/win_cntral.c.orig 2006-01-04 10:38:51.000000000 +0000 ++++ lib/libxview/win/win_cntral.c +@@ -25,7 +25,6 @@ static char sccsid[] = "@(#)win_cntr + + static Notify_error win_send(); + +-extern int errno; + extern Event xv_last_event; + + void notify_perror(); diff --git a/x11/xview-lib/patches/patch-eg b/x11/xview-lib/patches/patch-eg new file mode 100644 index 00000000000..73418d40a4b --- /dev/null +++ b/x11/xview-lib/patches/patch-eg @@ -0,0 +1,65 @@ +$NetBSD: patch-eg,v 1.1 2006/01/05 18:25:57 joerg Exp $ + +--- lib/libxview/textsw/txt_once.c.orig 2006-01-04 11:09:00.000000000 +0000 ++++ lib/libxview/textsw/txt_once.c +@@ -18,6 +18,7 @@ static char sccsid[] = "@(#)txt_once.c 2 + #include <xview/textsw.h> + #include <xview_private/txt_impl.h> + #include <fcntl.h> ++#include <limits.h> + #include <signal.h> + #include <pixrect/pr_util.h> + +@@ -548,13 +549,21 @@ textsw_init_internal(folio, status, defa + Es_handle ps_esh; + Ei_handle plain_text_eih; + char *name = 0; ++#ifdef NAME_MAX ++ CHAR scratch_name[NAME_MAX]; ++#else + CHAR scratch_name[MAXNAMLEN]; ++#endif + Es_status es_status; + Frame frame; + Xv_Notice text_notice; + extern void textsw_split_init_proc(); + #ifdef OW_I18N ++#ifdef NAME_MAX ++ CHAR name_wc[NAME_MAX]; ++#else + CHAR name_wc[MAXNAMLEN]; ++#endif + #ifdef FULL_R5 + XVaNestedList va_nested_list; + #endif /* FULL_R5 */ +@@ -642,18 +651,30 @@ textsw_init_internal(folio, status, defa + name = (char *) defaults[1]; + #ifdef OW_I18N + if (name) ++#ifdef NAME_MAX ++ (void) mbstowcs(name_wc, name, NAME_MAX); ++#else + (void) mbstowcs(name_wc, name, MAXNAMLEN); + #endif ++#endif + } + + #ifdef OW_I18N + defaults = attr_find(attrs, TEXTSW_FILE_WCS); + if (*defaults) { ++#ifdef NAME_MAX ++ char name_mb[NAME_MAX]; ++#else + char name_mb[MAXNAMLEN]; ++#endif + + ATTR_CONSUME(*defaults); + STRCPY(name_wc, (CHAR *) defaults[1]); ++#ifdef NAME_MAX ++ (void) wcstombs(name_mb, name_wc, NAME_MAX); ++#else + (void) wcstombs(name_mb, name_wc, MAXNAMLEN); ++#endif + name = name_mb; + } + if (name_wc[0] != NULL) { /* } for match */ diff --git a/x11/xview-lib/patches/patch-eh b/x11/xview-lib/patches/patch-eh new file mode 100644 index 00000000000..cd0294587c2 --- /dev/null +++ b/x11/xview-lib/patches/patch-eh @@ -0,0 +1,12 @@ +$NetBSD: patch-eh,v 1.1 2006/01/05 18:25:57 joerg Exp $ + +--- lib/libxview/textsw/txt_event.c.orig 2006-01-04 11:15:27.000000000 +0000 ++++ lib/libxview/textsw/txt_event.c +@@ -22,7 +22,6 @@ static char sccsid[] = "@(#)txt_even + #include <xview_private/win_keymap.h> + + +-extern int errno; + Pkg_private Notify_error win_post_event(); + Pkg_private void ev_blink_caret(); + diff --git a/x11/xview-lib/patches/patch-ei b/x11/xview-lib/patches/patch-ei new file mode 100644 index 00000000000..e9574719128 --- /dev/null +++ b/x11/xview-lib/patches/patch-ei @@ -0,0 +1,13 @@ +$NetBSD: patch-ei,v 1.1 2006/01/05 18:25:57 joerg Exp $ + +--- lib/libxview/textsw/txt_getkey.c.orig 2006-01-04 11:41:31.000000000 +0000 ++++ lib/libxview/textsw/txt_getkey.c +@@ -21,8 +21,6 @@ static char sccsid[] = "@(#)txt_getk + #include <xview_private/ev_impl.h> /* For declaration of ev_add_finder */ + #include <errno.h> + +-extern int errno; +- + static void textsw_do_get(); + Pkg_private Es_index textsw_find_mark_internal(); + Pkg_private Es_index textsw_insert_pieces(); diff --git a/x11/xview-lib/patches/patch-ej b/x11/xview-lib/patches/patch-ej new file mode 100644 index 00000000000..9a307746d14 --- /dev/null +++ b/x11/xview-lib/patches/patch-ej @@ -0,0 +1,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; diff --git a/x11/xview-lib/patches/patch-ek b/x11/xview-lib/patches/patch-ek new file mode 100644 index 00000000000..56d29e172b8 --- /dev/null +++ b/x11/xview-lib/patches/patch-ek @@ -0,0 +1,13 @@ +$NetBSD: patch-ek,v 1.1 2006/01/05 18:25:57 joerg Exp $ + +--- lib/libxview/notify/ndet_wait.c.orig 2006-01-04 11:52:12.000000000 +0000 ++++ lib/libxview/notify/ndet_wait.c +@@ -18,8 +18,6 @@ static char sccsid[] = "@(#)ndet_wai + #include <xview_private/ndet.h> + #include <errno.h> + +-extern errno; +- + pkg_private int + ndet_check_pid(pid) + int pid; diff --git a/x11/xview-lib/patches/patch-el b/x11/xview-lib/patches/patch-el new file mode 100644 index 00000000000..da15f0f0da5 --- /dev/null +++ b/x11/xview-lib/patches/patch-el @@ -0,0 +1,12 @@ +$NetBSD: patch-el,v 1.1 2006/01/05 18:25:57 joerg Exp $ + +--- lib/libxview/notify/ndetselect.c.orig 2006-01-04 11:53:02.000000000 +0000 ++++ lib/libxview/notify/ndetselect.c +@@ -28,7 +28,6 @@ static int ndet_select_nfds, ndet_s + + static Notify_client ndet_select_nclient = (Notify_client) & ndet_select_ibits; + +-extern errno; + extern int notify_exclude_fd; + + extern int |