Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: pty device files.
- X-seq: zsh-workers 11426
 
- From: Tanaka Akira <akr@xxxxxxxx>
 
- To: zsh-workers@xxxxxxxxxxxxxx
 
- Subject: Re: pty device files.
 
- Date: 17 May 2000 12:42:19 +0900
 
- In-reply-to: <E12rn9y-0000b8-00@xxxxxxxxxxxxxxxxxx> (Zefram's message of "Tue, 16 May 2000 20:37:42 +0100 (BST)")
 
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
 
- References: <hvopuqmfjjl.fsf@xxxxxxxxxxxxxxx> <E12rn9y-0000b8-00@xxxxxxxxxxxxxxxxxx>
 
In article <E12rn9y-0000b8-00@xxxxxxxxxxxxxxxxxx>,
  Zefram <zefram@xxxxxxxx> writes:
> >+#elif defined(__FreeBSD__)
> 
> Trivial point: #elif isn't portable enough for us (it's not in some
> K&R preprocessors).  Though I see one has crept into system.h.
I see.
Index: Src/Modules/zpty.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/zpty.c,v
retrieving revision 1.8
diff -u -r1.8 zpty.c
--- Src/Modules/zpty.c	2000/05/16 18:16:20	1.8
+++ Src/Modules/zpty.c	2000/05/17 03:40:01
@@ -213,16 +213,18 @@
 get_pty(int master, int *retfd)
 {
 
-#if defined(__linux)
+#ifdef __linux
     static char char1[] = "abcdefghijklmnopqrstuvwxyz";
     static char char2[] = "0123456789abcdef";
-#elif defined(__FreeBSD__)
+#else /* __linux */
+# ifdef __FreeBSD__
     static char char1[] = "pqrsPQRS";
     static char char2[] = "0123456789abcdefghijklmnopqrstuv";
-#else
+# else /* __FreeBSD__ */
     static char char1[] = "pqrstuvwxyzPQRST";
     static char char2[] = "0123456789abcdef";
-#endif
+# endif /* __FreeBSD__ */
+#endif /* __linux */
 
     static char name[11];
     static int mfd, sfd;
-- 
Tanaka Akira
Messages sorted by:
Reverse Date,
Date,
Thread,
Author