home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Editores / Perl5 / patches / Curses-1.01-win32.patch next >
Encoding:
Text File  |  1997-08-10  |  4.6 KB  |  127 lines

  1. diff -ur Curses-1.01/Curses.c Curses-1.01-w32/Curses.c
  2. --- Curses-1.01/Curses.c    Fri Jun 06 01:40:50 1997
  3. +++ Curses-1.01-w32/Curses.c    Thu Jun 05 23:39:54 1997
  4. @@ -13,6 +13,10 @@
  5.  #include "perl.h"
  6.  #include "XSUB.h"
  7.  
  8. +#ifdef __PDCURSES__
  9. +#undef SP
  10. +#endif
  11. +
  12.  #define C_XS_VERSION  1.01
  13.  
  14.  typedef WINDOW *Curses;
  15. diff -ur Curses-1.01/Makefile.PL Curses-1.01-w32/Makefile.PL
  16. --- Curses-1.01/Makefile.PL    Fri Jun 06 01:40:50 1997
  17. +++ Curses-1.01-w32/Makefile.PL    Fri Jun 06 02:34:52 1997
  18. @@ -85,6 +85,11 @@
  19.      'default' => 'sysv'
  20.    },
  21.    'vms'       => [ ''                       => 'sys$library:vaxcurse.olb' ],
  22. +  'MSWin32'   =>
  23. +  { 'borland' => [ '-w- -Id:\bc5\include'   => '-Ld:\bc5\lib pdcurses.lib' ],
  24. +    'visualc' => [ ''                       => 'pdcurses' ],
  25. +    'default' => 'visualc'
  26. +  },
  27.    ''          => undef
  28.  };
  29.  
  30. @@ -132,9 +137,11 @@
  31.          exit 1;
  32.      }
  33.  
  34. -    my $lns = $Config{'lns'} || "/bin/cp";
  35. +    my $lns = $Config{'lns'}
  36. +          || ($osname eq 'MSWin32' && "perl -MExtUtils::Command -e cp")
  37. +          || "/bin/cp";
  38.      my $sys = "$lns $source.h c-config.h";
  39. -    if (not $sys =~ m!([^\w/. -])!) {
  40. +    if (not $sys =~ m!([^\\:\w/. -])!) {
  41.          system $sys;
  42.      }
  43.      else {
  44. diff -ur Curses-1.01/test.syms Curses-1.01-w32/test.syms
  45. --- Curses-1.01/test.syms    Fri Jun 06 01:40:50 1997
  46. +++ Curses-1.01-w32/test.syms    Fri Jun 06 01:52:38 1997
  47. @@ -196,6 +196,9 @@
  48.      if ($Config{'osname'} =~ /VMS/) {
  49.      $cmd = "$cc /DEFINE=SYM=\"$_[0]\" $inc testsym.c $ex";
  50.  #    $cmd .= " /nowarnings" unless $opt_v;
  51. +    } elsif ($^O eq 'MSWin32') {
  52. +    $cmd = "$cc -DSYM=\"$_[0]\" $inc testsym.c $ex";
  53. +    $cmd .= " >nul 2>&1" unless $opt_v;
  54.      } else {
  55.      $cmd = "$cc -DSYM=\"$_[0]\" $inc -o testsym testsym.c $ex";
  56.      $cmd .= " >/dev/null 2>&1" unless $opt_v;
  57. @@ -226,6 +229,9 @@
  58.      if ($Config{'osname'} =~ /VMS/) {
  59.      $cmd = "$cc /DEFINE=SYM=\"$_[0]\" $inc testinvd.c $ex";
  60.  #    $cmd .= " /nowarnings" unless $opt_v;
  61. +    } elsif ($^O eq 'MSWin32') {
  62. +    $cmd = "$cc -DSYM=\"$_[0]\" $inc testinvd.c $ex";
  63. +    $cmd .= " >nul 2>&1" unless $opt_v;
  64.      } else {
  65.      $cmd = "$cc -DSYM=\"$_[0]\" $inc -o testinvd testinvd.c $ex";
  66.      $cmd .= " >/dev/null 2>&1" unless $opt_v;
  67. --- /dev/null    Fri Jun 06 02:38:16 1997
  68. +++ Curses-1.01-w32/hints/c-MSWin32.borland.h    Fri Jun 06 02:37:38 1997
  69. @@ -0,0 +1,27 @@
  70. +/* Curses config file for Perl on Win32/PDCurses/BorlandC */
  71. +
  72. +#undef SP    /* in case this gets pulled in after perl.h */
  73. +#include <pdcurses.h>
  74. +
  75. +/* Change each #undef below to #define if the answer to the question
  76. + * beside it is "yes".
  77. + */
  78. +#define  C_LONGNAME    /* Does longname() exist?        */
  79. +#define  C_LONG0ARGS    /* Does longname() take 0 arguments?    */
  80. +#undef  C_LONG2ARGS    /* Does longname() take 2 arguments?    */
  81. +
  82. +#define  C_TOUCHLINE    /* Does touchline() exist?        */
  83. +#define  C_TOUCH3ARGS    /* Does touchline() take 3 arguments?    */
  84. +#undef  C_TOUCH4ARGS    /* Does touchline() take 4 arguments?    */
  85. +
  86. +/* Some Curses include files have problems interacting with perl,
  87. + * some are missing basic functionality, and some just plain do
  88. + * weird things.  Unfortunately, there's no way to anticipate all
  89. + * of the problems the curses include file + "perl.h" might create.
  90. + *
  91. + * If you find that you can't compile Curses.c because of these
  92. + * conflicts, you should insert C code before and after the "include"
  93. + * file above to try and fix the problems.  "See c-sunos.sysv.h"
  94. + * for an example of this.
  95. + */
  96. +
  97. --- /dev/null    Fri Jun 06 02:38:16 1997
  98. +++ Curses-1.01-w32/hints/c-MSWin32.visualc.h    Fri Jun 06 02:38:16 1997
  99. @@ -0,0 +1,27 @@
  100. +/* Curses config file for Perl on Win32/PDCurses/VisualC */
  101. +
  102. +#undef SP    /* in case this gets pulled in after perl.h */
  103. +#include <pdcurses.h>
  104. +
  105. +/* Change each #undef below to #define if the answer to the question
  106. + * beside it is "yes".
  107. + */
  108. +#define  C_LONGNAME    /* Does longname() exist?        */
  109. +#define  C_LONG0ARGS    /* Does longname() take 0 arguments?    */
  110. +#undef  C_LONG2ARGS    /* Does longname() take 2 arguments?    */
  111. +
  112. +#define  C_TOUCHLINE    /* Does touchline() exist?        */
  113. +#define  C_TOUCH3ARGS    /* Does touchline() take 3 arguments?    */
  114. +#undef  C_TOUCH4ARGS    /* Does touchline() take 4 arguments?    */
  115. +
  116. +/* Some Curses include files have problems interacting with perl,
  117. + * some are missing basic functionality, and some just plain do
  118. + * weird things.  Unfortunately, there's no way to anticipate all
  119. + * of the problems the curses include file + "perl.h" might create.
  120. + *
  121. + * If you find that you can't compile Curses.c because of these
  122. + * conflicts, you should insert C code before and after the "include"
  123. + * file above to try and fix the problems.  "See c-sunos.sysv.h"
  124. + * for an example of this.
  125. + */
  126. +
  127.