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.

51 lines
1.6 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/x11/xfree86/xconsole-pty.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. --- ./programs/xconsole/xconsole.c.orig Sun Mar 21 08:35:37 1999
  20. +++ ./programs/xconsole/xconsole.c Thu Nov 23 16:15:23 2000
  21. @@ -786,6 +786,21 @@
  22. return 0;
  23. }
  24. #else
  25. +#ifdef __GLIBC__ /* The new way to open a Pseudo Terminal */
  26. + if ((*pty = getpt()) < 0)
  27. + return 1;
  28. + strcpy(ttydev, ptsname(*pty));
  29. + if ((unlockpt(*pty)) < 0) {
  30. + close(*pty);
  31. + return(1);
  32. + }
  33. + if ((grantpt(*pty)) < 0) {
  34. + close(*pty);
  35. + return(1);
  36. + }
  37. + if ((*tty = open (ttydev, O_RDWR)) >= 0)
  38. + return(0);
  39. +#else
  40. strcpy (ttydev, "/dev/ttyxx");
  41. strcpy (ptydev, "/dev/ptyxx");
  42. while (PTYCHAR1[letter]) {
  43. @@ -811,6 +826,7 @@
  44. devindex = 0;
  45. (void) letter++;
  46. }
  47. +#endif
  48. #endif /* sgi else not sgi */
  49. #endif /* CRAY else not CRAY */
  50. #endif /* umips && SYSTYPE_SYSV */