home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / perl / 4922 < prev    next >
Encoding:
Text File  |  1992-07-23  |  4.2 KB  |  139 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!paladin.american.edu!darwin.sura.net!convex!convex!tchrist
  3. From: Tom Christiansen <tchrist@convex.COM>
  4. Subject: Re: PLUM under AIX
  5. Message-ID: <1992Jul23.201941.4927@news.eng.convex.com>
  6. Originator: tchrist@pixel.convex.com
  7. Sender: usenet@news.eng.convex.com (news access account)
  8. Nntp-Posting-Host: pixel.convex.com
  9. Reply-To: tchrist@convex.COM (Tom Christiansen)
  10. Organization: CONVEX Realtime Development, Colorado Springs, CO
  11. References: <1992Jul22.115726@se05.wg2.waii.com>
  12. Date: Thu, 23 Jul 1992 20:19:41 GMT
  13. X-Disclaimer: This message was written by a user at CONVEX Computer
  14.               Corp. The opinions expressed are those of the user and
  15.               not necessarily those of CONVEX.
  16. Lines: 121
  17.  
  18. From the keyboard of acker@se01.wg2.waii.com:
  19. :Has anyone gottten PLUM to work under AIX? I can't get the sysconf.pl
  20. :file right ....
  21.  
  22. Perhaps this will help.  Haven't tried it myself.
  23.  
  24. ------- Forwarded Message
  25.  
  26. Date:         Mon, 20 Jan 92 17:03:09 -0600
  27. From:         Rich Coe IBM Field Quality Programming <ibmsupt!ibmpa!buscfg.austin.ibm.com!rhcoe@uunet.UU.NET>
  28. Subject:      plum blues
  29. To:           tchrist@uunet.UU.NET (Tom Christiansen)
  30.  
  31.  
  32.  
  33.  
  34. Hi Tom.
  35.  
  36. I was trying out your `plum' program and wanted to let you know my
  37. results.
  38.  
  39. environment ibm rs/6000 
  40.  
  41. 1) AIX is a posix based system, so I chose the posix route, rather than
  42.    BSD or svid.  I had to change the values to match my system.
  43.  
  44.    Here's a copy of the sysconf.pl file:
  45.  
  46. # BEGIN IBM RS/6000 short cut config file.  
  47.  
  48. # h2ph generates something like this...
  49.  
  50. sub ICANON  { 0x00000002; }
  51. sub ECHO    { 0x00000008; }
  52. sub VTIME   { 5; }
  53. sub VMIN    { 4; }
  54. sub IEXTEN  { 0x00200000; }
  55.  
  56. sub B1200   { 0x9; }
  57.  
  58.  
  59. # c2ph generates something like this....
  60.  
  61. STRUCT_TERMIOS: {
  62.     package termios;
  63.  
  64.     sub typedef                   { 'L4 C17'; }
  65.  
  66.     sub c_iflag                  {    0; }
  67.     sub c_oflag                  {    1; }
  68.     sub c_cflag                  {    2; }
  69.     sub c_lflag                  {    3; }
  70.     sub c_cc                     {    4; }
  71. }
  72.  
  73. ($SYSTEM, $VENDOR) = (POSIX, IBM);
  74.  
  75. # END IBM RS/6000 short cut config file.  
  76.  
  77. 2) IBM's termios.h (perl termios.ph) resides in "/usr/include", not 
  78.    "/usr/include/sys"; and 'sys/termio.ph' needs to be included to
  79.    get some defines.  I added a config_IBM (see below).  For the time
  80.    being, I neutered the 'sys' in the config_POSIX so that it would load
  81.    termios.
  82.  
  83. sub config_IBM {
  84.     &config_POSIX;
  85.  
  86.     local(@need) = ( TIOCGWINSZ, TCGETA, TCSETA );
  87.  
  88.     require 'sys/termio.ph'                     if &needdef(@need);
  89.     die "require definitions for @need"         if @need = &needdef(@need);
  90.  
  91.     ($GETIOCTL, $SETIOCTL)  = (TCGETA, TCSETA);
  92. }
  93.  
  94. 3) TIOCGWINSZ isn't set to the ioctl value, its set to zero.  I'll have
  95.    to dig into this one.
  96.  
  97. 4) ispeed/ospeed isn't kept in a seperate line in the termios struct
  98.    so I rewrote the lines in `tty_stuff'.
  99. ***************
  100. *** 2223,2230 ****
  101.         $my_erase = pack('c', $termios[&termios'c_cc + &VERASE]);
  102.         $my_kill = pack('c', $termios[&termios'c_cc + &VKILL]);
  103.  
  104. !       $ispeed = $termios[&termios'c_ispeed];
  105. !       $ospeed = $termios[&termios'c_ospeed];
  106.  
  107.       } elsif ($SYSTEM =~ /BSD/i || $VENDOR =~ /Sun/i) {
  108.         local($sgttyb, @sgttyb);
  109. - --- 2222,2233 ----
  110.         $my_erase = pack('c', $termios[&termios'c_cc + &VERASE]);
  111.         $my_kill = pack('c', $termios[&termios'c_cc + &VKILL]);
  112.  
  113. !       if ($VENDOR !~ /IBM/i) {
  114. !           $ispeed = $termios[&termios'c_ispeed];
  115. !           $ospeed = $termios[&termios'c_ospeed];
  116. !       } else {
  117. !           $ispeed = $ospeed = $termios[&termios'c_cflag] & &CBAUD;
  118. !       }
  119.  
  120.       } elsif ($SYSTEM =~ /BSD/i || $VENDOR =~ /Sun/i) {
  121.         local($sgttyb, @sgttyb);
  122.  
  123. 5) For some reason the code doesn't get the terminal in to/out of 
  124.    cbreak mode.  I haven't found out why, yet.
  125.  
  126. Regards, Rich Coe
  127. - -----
  128. UUCP: ...!uunet!ibmsupt!rhcoe                         IBM AIX BOS Field Quality
  129. Internet: rhcoe@aixwiz.austin.ibm.com                 Austin, TX
  130. internal: rhcoe@buscfg.austin.ibm.com                 VNET: rhcoe@ausvmq
  131.  
  132. ------- End of Forwarded Message
  133.  
  134. -- 
  135.     Tom Christiansen      tchrist@convex.com      convex!tchrist
  136.  
  137.  
  138.     A programmer is a machine for converting coffee into code.
  139.