rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Sam Roberts <sroberts@uniserve.com>
To: rc <rc@hawkwind.utcs.utoronto.ca>
Subject: building rc on QNX4
Date: Wed, 26 Apr 2000 11:02:31 -0400	[thread overview]
Message-ID: <20000426110230.A12715@localhost> (raw)


rc looks really good to me, so I built it over the weekend, and
I'm starting to use it. I think I've seen a few problems, but I'll
play some more and see what I can turn up, in the meantime, here's
what I had to do to get it to build:

- it has setpgid(), but not setpgrp();
- it also has a utoa in <stdlib.h>, but not with the same args;
- and it's va_list isn't an lvalue.

So, are these patches accpetable? QNX's default bastardized ksh
is ok for interactive use, but not great for programming, and
I don't think I have to bash bash on the rc mailing list... 
(sorry, I couldn't resist ;-)

Also, there's a few things I've always figured should be easy,
like piping fds other than stdout->stdin, that are under rc.

Oh, and QNX also lacks a groff tex formatting system... do you
think you could distribute a pre-processed rc.1 as rc.man, so
it could be read by less? And how about postscript as well
(groff -man rc.1>rc.ps)?

I found a Linux box to format rc.1 on, but...

Anyhow, I'm sure I'll have more questions as I play.

So far so good, and thanks a bunch!
Sam


diff -ur rc-1.6b2-orig/config.h.in rc-1.6b2/config.h.in
--- rc-1.6b2-orig/config.h.in	Wed Oct 13 07:55:03 1999
+++ rc-1.6b2/config.h.in	Tue Apr 25 09:31:27 2000
@@ -107,6 +107,9 @@
 /* Define if you have the mkfifo function.  */
 #undef HAVE_MKFIFO
 
+/* Define if you have the setpgid function.  */
+#undef HAVE_SETPGID
+
 /* Define if you have the setpgrp function.  */
 #undef HAVE_SETPGRP
 
diff -ur rc-1.6b2-orig/configure.in rc-1.6b2/configure.in
--- rc-1.6b2-orig/configure.in	Fri Dec 10 06:25:53 1999
+++ rc-1.6b2/configure.in	Tue Apr 25 09:31:20 2000
@@ -38,7 +38,7 @@
 AC_TYPE_UID_T
 AC_CHECK_TYPE(ssize_t, long)
 
-AC_CHECK_FUNCS(getgroups setpgrp setrlimit strerror)
+AC_CHECK_FUNCS(getgroups setpgrp setpgid setrlimit strerror)
 RC_FUNC_GETGROUPS
 
 RC_FUNC_SIGSETJMP
diff -ur rc-1.6b2-orig/print.c rc-1.6b2/print.c
--- rc-1.6b2-orig/print.c	Thu Aug 19 05:22:03 1999
+++ rc-1.6b2/print.c	Tue Apr 25 09:36:17 2000
@@ -70,9 +70,9 @@
 	return FALSE;
 }
 
-static char *utoa(unsigned long u, char *t, unsigned int radix, const char *digit) {
+static char *utostr(unsigned long u, char *t, unsigned int radix, const char *digit) {
 	if (u >= radix) {
-		t = utoa(u / radix, t, radix, digit);
+		t = utostr(u / radix, t, radix, digit);
 		u %= radix;
 	}
 	*t++ = digit[u];
@@ -120,7 +120,7 @@
 		while (*altform != '\0')
 			prefix[pre++] = *altform++;
 
-	len = utoa(u, number, radix, table[upper]) - number;
+	len = utostr(u, number, radix, table[upper]) - number;
 	if ((flags & FMT_f2set) && (size_t) format->f2 > len)
 		zeroes = format->f2 - len;
 	else
diff -ur rc-1.6b2-orig/proto.h rc-1.6b2/proto.h
--- rc-1.6b2-orig/proto.h	Wed Oct 13 10:57:22 1999
+++ rc-1.6b2/proto.h	Tue Apr 25 09:37:34 2000
@@ -27,7 +27,11 @@
 objects of type va_list.  Of course, most places don't have this yet,
 but where it does exist we need to use it. */
 #ifndef __va_copy
+#ifndef __QNX__
 #define __va_copy(x,y) (x)=(y)
+#else
+#define __va_copy(x,y) x[0]=y[0]
+#endif /* __QNX__ */
 #endif
 
 #if STDC_HEADERS
@@ -84,9 +88,11 @@
 
 #else /* HAVE_SETPGRP */
 
+#ifndef HAVE_SETPGID
 /* Nothing doing. */
 #define setpgid()
 #define tcsetpgrp()
+#endif /* HAVE_SETPGID */
 
 #endif /*HAVE_SETPGRP */
 

-- 
Sam Roberts, sroberts at uniserve dot com, www.emyr.net/Sam


             reply	other threads:[~2000-04-27 16:27 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <sroberts@uniserve.com>
2000-04-26 15:02 ` Sam Roberts [this message]
2000-04-27 16:56   ` Scott Schwartz
2000-04-27 20:41     ` Sam Roberts
2000-04-28  7:28       ` vrl (was: Re: building rc on QNX4) Gert-Jan Vons
2000-04-28 18:38         ` Sam Roberts
2000-05-02  8:16           ` Gert-Jan Vons
2000-04-28 19:03         ` rc not session leader? Sam Roberts
2000-04-27 17:39   ` building rc on QNX4 Carlo Strozzi
2000-05-02 14:41     ` Tim Goodwin
2000-05-04 15:18       ` Carlo Strozzi
2000-05-08  8:29         ` Tim Goodwin
2000-05-08  8:58           ` Chris Siebenmann
2000-05-08  9:15             ` Tim Goodwin
2000-05-08 23:25               ` Stephen Tell
2000-05-10  0:37                 ` builtins Scott Schwartz
2000-05-12  7:22                   ` builtins Carlo Strozzi
2000-05-08 11:50           ` building rc on QNX4 David Luyer
2000-05-08 13:28           ` Carlo Strozzi
2000-05-04  8:45 Byron Rakitzis
2000-05-06 10:28 ` Carlo Strozzi
2000-05-07 17:46   ` Paul Haahr
2000-05-08  8:01     ` Carlo Strozzi
2000-05-06 16:35 ` Jeremy Fitzhardinge
2000-05-04 13:46 Sam Roberts
2000-05-06 21:47 Byron Rakitzis
2000-05-08 10:19 Bengt Kleberg
2000-05-08 15:15 Smarasderagd
2000-05-09  8:22 ` Carlo Strozzi
2000-05-08 15:23 Sam Roberts
2000-05-09  8:25 ` Carlo Strozzi
2000-05-09  4:34 Smarasderagd
2000-05-11 12:26 ` Gert-Jan Vons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000426110230.A12715@localhost \
    --to=sroberts@uniserve.com \
    --cc=rc@hawkwind.utcs.utoronto.ca \
    --subject='Re: building rc on QNX4' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).