All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Koropoff <bkoropoff@gmail.com>
To: dash@vger.kernel.org
Subject: [PATCH 2/3] Port to AIX
Date: Tue, 18 Jan 2011 21:15:49 -0800	[thread overview]
Message-ID: <1295414149.6486.4.camel@gemini> (raw)
In-Reply-To: <1295413636.4278.28.camel@gemini>

- AIX lacks a WCOREDUMP macro.  It's just used to
  append "(core dumped)" to the crash message, so
  #ifdef around it.

- For some reason, the nl program on AIX defaults
  to not printing line numbers ("-b n"), even though
  the spec says it should default to "-b t".
  Explicitly pass "-b a" for good measure in mkbuiltins.

Signed-off-by: Brian Koropoff <bkoropoff@gmail.com>
---
 src/jobs.c     |    2 ++
 src/mkbuiltins |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/jobs.c b/src/jobs.c
index fdb122a..88b5792 100644
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -431,9 +431,11 @@ sprint_status(char *s, int status, int sigonly)
 #endif
 		}
 		col = fmtstr(s, 32, strsignal(st));
+#ifdef WCOREDUMP
 		if (WCOREDUMP(status)) {
 			col += fmtstr(s + col, 16, " (core dumped)");
 		}
+#endif
 	} else if (!sigonly) {
 		if (st)
 			col = fmtstr(s, 16, "Done(%d)", st);
diff --git a/src/mkbuiltins b/src/mkbuiltins
index bb1e2a4..495274e 100644
--- a/src/mkbuiltins
+++ b/src/mkbuiltins
@@ -99,7 +99,7 @@ cat <<\!
  */
 
 !
-sed 's/	-[a-z]*//' $temp2 | nl -v 0 | LC_COLLATE=C sort -u -k 3,3 |
+sed 's/	-[a-z]*//' $temp2 | nl -b a -v 0 | LC_COLLATE=C sort -u -k 3,3 |
 tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |
 	awk '{	printf "#define %s (builtincmd + %d)\n", $3, $1}'
 printf '\n#define NUMBUILTINS %d\n' $(wc -l < $temp2)
-- 
1.7.1



  parent reply	other threads:[~2011-01-19  5:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19  5:07 Portability patches Brian Koropoff
2011-01-19  5:15 ` [PATCH 1/3] Port to Solaris Brian Koropoff
2011-01-21 13:06   ` Jilles Tjoelker
2011-03-10 12:16     ` Herbert Xu
2011-03-13  1:18       ` Brian Koropoff
2011-03-13  1:25         ` [PATCH] " Brian Koropoff
2011-03-15  7:36           ` Herbert Xu
2011-01-19  5:15 ` Brian Koropoff [this message]
2011-03-10 12:25   ` [PATCH 2/3] Port to AIX Herbert Xu
2011-01-19  5:16 ` [PATCH 3/3] Port to HP-UX Brian Koropoff
2011-03-10 12:26   ` Herbert Xu
2011-03-12 23:54     ` Brian Koropoff
2011-03-15  7:38       ` Herbert Xu

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=1295414149.6486.4.camel@gemini \
    --to=bkoropoff@gmail.com \
    --cc=dash@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.