mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

157 lines
5.0 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/blindcoder/kterm/kterm-devfs-aware.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. diff -pruN kterm-6.2.0/Imakefile kterm-6.2.0_new/Imakefile
  23. --- kterm-6.2.0/Imakefile 1996-07-12 07:01:04.000000000 +0200
  24. +++ kterm-6.2.0_new/Imakefile 2003-08-16 15:23:27.000000000 +0200
  25. @@ -21,8 +21,9 @@ XCOMM $Id: Imakefile,v 6.3 1996/07/12 05
  26. #endif
  27. #if UsePUCCPtyd /* turn on in config/site.def */
  28. PUCCPTYDDEF = -DPUCC_PTYD /* does not need to be setuid */
  29. - PTYLIB = -lpucc
  30. + PTYLIBN = -lpucc
  31. #endif
  32. +PTYLIB = $(PTYLIBN) -lutil
  33. OSMAJORVERSION = OSMajorVersion
  34. OSMINORVERSION = OSMinorVersion
  35. diff -pruN kterm-6.2.0/main.c kterm-6.2.0_new/main.c
  36. --- kterm-6.2.0/main.c 2003-08-16 15:25:26.000000000 +0200
  37. +++ kterm-6.2.0_new/main.c 2003-08-16 15:19:35.000000000 +0200
  38. @@ -286,6 +286,7 @@ extern struct utmp *getutid __((struct u
  39. #endif
  40. #include <sys/param.h> /* for NOFILE */
  41. +#include <pty.h>
  42. #ifdef PUCC_PTYD
  43. #include <local/openpty.h>
  44. int Ptyfd;
  45. @@ -1681,109 +1682,8 @@ char *name;
  46. get_pty (pty)
  47. int *pty;
  48. {
  49. -#ifdef __osf__
  50. int tty;
  51. return (openpty(pty, &tty, ttydev, NULL, NULL));
  52. -#endif
  53. -#if defined(SYSV) && defined(i386) && !defined(SVR4)
  54. - /*
  55. - The order of this code is *important*. On SYSV/386 we want to open
  56. - a /dev/ttyp? first if at all possible. If none are available, then
  57. - we'll try to open a /dev/pts??? device.
  58. -
  59. - The reason for this is because /dev/ttyp? works correctly, where
  60. - as /dev/pts??? devices have a number of bugs, (won't update
  61. - screen correcly, will hang -- it more or less works, but you
  62. - really don't want to use it).
  63. -
  64. - Most importantly, for boxes of this nature, one of the major
  65. - "features" is that you can emulate a 8086 by spawning off a UNIX
  66. - program on 80386/80486 in v86 mode. In other words, you can spawn
  67. - off multiple MS-DOS environments. On ISC the program that does
  68. - this is named "vpix." The catcher is that "vpix" will *not* work
  69. - with a /dev/pts??? device, will only work with a /dev/ttyp? device.
  70. -
  71. - Since we can open either a /dev/ttyp? or a /dev/pts??? device,
  72. - the flag "IsPts" is set here so that we know which type of
  73. - device we're dealing with in routine spawn(). That's the reason
  74. - for the "if (IsPts)" statement in spawn(); we have two different
  75. - device types which need to be handled differently.
  76. - */
  77. - if (pty_search(pty) == 0)
  78. - return 0;
  79. -#endif /* SYSV && i386 && !SVR4 */
  80. -#if defined(ATT) && !defined(__sgi)
  81. - if ((*pty = open ("/dev/ptmx", O_RDWR)) < 0) {
  82. - return 1;
  83. - }
  84. -#if defined(SVR4) || defined(i386)
  85. - strcpy(ttydev, ptsname(*pty));
  86. -#if defined (SYSV) && defined(i386) && !defined(SVR4)
  87. - IsPts = True;
  88. -#endif
  89. -#endif
  90. - return 0;
  91. -#else /* ATT else */
  92. -#ifdef AIXV3
  93. - if ((*pty = open ("/dev/ptc", O_RDWR)) < 0) {
  94. - return 1;
  95. - }
  96. - strcpy(ttydev, ttyname(*pty));
  97. - return 0;
  98. -#endif
  99. -#if defined(__sgi) && OSMAJORVERSION >= 4
  100. - {
  101. - char *tty_name;
  102. -
  103. - tty_name = _getpty (pty, O_RDWR, 0622, 0);
  104. - if (tty_name == 0)
  105. - return 1;
  106. - strcpy (ttydev, tty_name);
  107. - return 0;
  108. - }
  109. -#endif
  110. -#ifdef __convex__
  111. - {
  112. - char *pty_name, *getpty();
  113. -
  114. - while ((pty_name = getpty()) != NULL) {
  115. - if ((*pty = open (pty_name, O_RDWR)) >= 0) {
  116. - strcpy(ptydev, pty_name);
  117. - strcpy(ttydev, pty_name);
  118. - ttydev[5] = 't';
  119. - return 0;
  120. - }
  121. - }
  122. - return 1;
  123. - }
  124. -#endif /* __convex__ */
  125. -#ifdef USE_GET_PSEUDOTTY
  126. - return ((*pty = getpseudotty (&ttydev, &ptydev)) >= 0 ? 0 : 1);
  127. -#else
  128. -#if (defined(__sgi) && OSMAJORVERSION < 4) || (defined(umips) && defined (SYSTYPE_SYSV))
  129. - struct stat fstat_buf;
  130. -
  131. - *pty = open ("/dev/ptc", O_RDWR);
  132. - if (*pty < 0 || (fstat (*pty, &fstat_buf)) < 0) {
  133. - return(1);
  134. - }
  135. - sprintf (ttydev, "/dev/ttyq%d", minor(fstat_buf.st_rdev));
  136. -#ifndef __sgi
  137. - sprintf (ptydev, "/dev/ptyq%d", minor(fstat_buf.st_rdev));
  138. - if ((*tty = open (ttydev, O_RDWR)) < 0) {
  139. - close (*pty);
  140. - return(1);
  141. - }
  142. -#endif /* !__sgi */
  143. - /* got one! */
  144. - return(0);
  145. -#else /* __sgi or umips */
  146. -
  147. - return pty_search(pty);
  148. -
  149. -#endif /* __sgi or umips else */
  150. -#endif /* USE_GET_PSEUDOTTY else */
  151. -#endif /* ATT else */
  152. }
  153. /*