home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / p / perl4036.zip / os2 / update.dif < prev   
Text File  |  1993-02-26  |  11KB  |  451 lines

  1. - deleted files:
  2.  
  3. os2/a2p.cs
  4. os2/a2p.def
  5. os2/alarm.c
  6. os2/alarm.h
  7. os2/crypt.c
  8. os2/dir.h
  9. os2/director.c
  10. os2/eg/*.pl
  11. os2/mktemp.c
  12. os2/perl.bad
  13. os2/perl.cs
  14. os2/perldb.dif
  15. os2/perlglob.bad
  16. os2/perlglob.cs
  17. os2/perlglob.def
  18. os2/popen.c
  19.  
  20. - new files:
  21.  
  22. os2/Makefile.a2p
  23. os2/README.OLD
  24. os2/alarm.pl
  25. os2/dump.cmd
  26.  
  27. - replaced files (i.e. new files included in the patch, no diffs):
  28.  
  29. os2/Makefile
  30. os2/README.OS2
  31. os2/config.h
  32. os2/glob.c
  33. os2/os2.c
  34. os2/perl.def
  35.  
  36. diff -cbr orig/doio.c new/doio.c
  37. *** orig/doio.c    Mon Feb 08 21:37:42 1993
  38. --- new/doio.c    Fri Feb 26 13:29:40 1993
  39. ***************
  40. *** 754,760 ****
  41.       if (optype == O_IOCTL)
  42.       retval = ioctl(fileno(stio->ifp), func, s);
  43.       else
  44. ! #ifdef DOSISH
  45.       fatal("fcntl is not implemented");
  46.   #else
  47.   #ifdef HAS_FCNTL
  48. --- 754,760 ----
  49.       if (optype == O_IOCTL)
  50.       retval = ioctl(fileno(stio->ifp), func, s);
  51.       else
  52. ! #ifdef MSDOS
  53.       fatal("fcntl is not implemented");
  54.   #else
  55.   #ifdef HAS_FCNTL
  56. diff -cbr orig/eval.c new/eval.c
  57. *** orig/eval.c    Mon Feb 08 21:37:46 1993
  58. --- new/eval.c    Fri Feb 26 13:40:50 1993
  59. ***************
  60. *** 54,61 ****
  61.   #ifdef I_FCNTL
  62.   #include <fcntl.h>
  63.   #endif
  64. ! #ifdef MSDOS
  65. ! /* I_FCNTL *MUST* not be defined for MS-DOS and OS/2
  66.      but fcntl.h is required for O_BINARY */
  67.   #include <fcntl.h>
  68.   #endif
  69. --- 54,61 ----
  70.   #ifdef I_FCNTL
  71.   #include <fcntl.h>
  72.   #endif
  73. ! #ifdef DOSISH
  74. ! /* I_FCNTL *MUST* not be defined for MS-DOS
  75.      but fcntl.h is required for O_BINARY */
  76.   #include <fcntl.h>
  77.   #endif
  78. ***************
  79. *** 1972,1977 ****
  80. --- 1972,1982 ----
  81.       break;
  82.   #endif
  83.       case O_SYSTEM:
  84. + #ifdef OS2
  85. + #ifdef HAS_FORK
  86. + #undef HAS_FORK
  87. + #endif
  88. + #endif
  89.   #ifdef HAS_FORK
  90.   #ifdef TAINT
  91.       if (arglast[2] - arglast[1] == 1) {
  92. ***************
  93. *** 2247,2253 ****
  94. --- 2252,2262 ----
  95.       taintproper("Insecure dependency in mkdir");
  96.   #endif
  97.   #ifdef HAS_MKDIR
  98. + #if defined(MSDOS) || defined(atarist) /* but not OS2 */
  99. +     value = (double)(mkdir(tmps) >= 0);
  100. + #else
  101.       value = (double)(mkdir(tmps,anum) >= 0);
  102. + #endif
  103.       goto donumset;
  104.   #else
  105.       (void)strcpy(buf,"mkdir ");
  106. diff -cbr orig/os2/suffix.c new/os2/suffix.c
  107. *** orig/os2/suffix.c    Mon Feb 08 21:36:28 1993
  108. --- new/os2/suffix.c    Sun Oct 04 22:03:04 1992
  109. ***************
  110. *** 130,136 ****
  111.   char *s;
  112.   {
  113.       HFILE hf;
  114. !     USHORT usAction;
  115.   
  116.       switch(DosOpen(s, &hf, &usAction, 0L, 0, FILE_OPEN,
  117.       OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE, 0L)) {
  118. --- 130,136 ----
  119.   char *s;
  120.   {
  121.       HFILE hf;
  122. !     UINT usAction;
  123.   
  124.       switch(DosOpen(s, &hf, &usAction, 0L, 0, FILE_OPEN,
  125.       OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE, 0L)) {
  126. diff -cbr orig/perl.c new/perl.c
  127. *** orig/perl.c    Mon Feb 08 21:35:20 1993
  128. --- new/perl.c    Fri Feb 26 13:29:52 1993
  129. ***************
  130. *** 61,66 ****
  131. --- 61,70 ----
  132.   #include "perly.h"
  133.   #include "patchlevel.h"
  134.   
  135. + #ifdef OS2
  136. + #include <fcntl.h>
  137. + #endif
  138.   char *getenv();
  139.   
  140.   #ifdef IAMSUID
  141. ***************
  142. *** 85,93 ****
  143.   static int nrslen = 1;
  144.   
  145.   main(argc,argv,env)
  146. ! register int argc;
  147. ! register char **argv;
  148. ! register char **env;
  149.   {
  150.       register STR *str;
  151.       register char *s;
  152. --- 89,97 ----
  153.   static int nrslen = 1;
  154.   
  155.   main(argc,argv,env)
  156. ! int argc;
  157. ! char **argv;
  158. ! char **env;
  159.   {
  160.       register STR *str;
  161.       register char *s;
  162. ***************
  163. *** 106,111 ****
  164. --- 110,119 ----
  165.   #endif
  166.   #endif
  167.   
  168. + #ifdef OS2
  169. +     os2init(&argc, &argv);
  170. + #endif
  171.       origargv = argv;
  172.       origargc = argc;
  173.       origenviron = environ;
  174. ***************
  175. *** 281,287 ****
  176.       /* open script */
  177.   
  178.       if (scriptname == Nullch)
  179. ! #ifdef MSDOS
  180.       {
  181.       if ( isatty(fileno(stdin)) )
  182.         moreswitches("v");
  183. --- 289,295 ----
  184.       /* open script */
  185.   
  186.       if (scriptname == Nullch)
  187. ! #ifdef DOSISH
  188.       {
  189.       if ( isatty(fileno(stdin)) )
  190.         moreswitches("v");
  191. ***************
  192. *** 290,296 ****
  193.   #else
  194.       scriptname = "-";
  195.   #endif
  196. !     if (dosearch && !index(scriptname, '/') && (s = getenv("PATH"))) {
  197.       char *xfound = Nullch, *xfailed = Nullch;
  198.       int len;
  199.   
  200. --- 298,308 ----
  201.   #else
  202.       scriptname = "-";
  203.   #endif
  204. !     if (dosearch && !index(scriptname, '/')
  205. ! #ifdef DOSISH
  206. !     && !index(scriptname, '\\') && access(scriptname, 0)
  207. ! #endif
  208. !     && (s = getenv("PATH"))) {
  209.       char *xfound = Nullch, *xfailed = Nullch;
  210.       int len;
  211.   
  212. ***************
  213. *** 312,323 ****
  214.   #ifndef DOSISH
  215.           if (len && tokenbuf[len-1] != '/')
  216.   #else
  217. - #ifdef atarist
  218.           if (len && ((tokenbuf[len-1] != '\\') && (tokenbuf[len-1] != '/')))
  219. - #else
  220. -         if (len && tokenbuf[len-1] != '\\')
  221.   #endif
  222. - #endif
  223.           (void)strcat(tokenbuf+len,"/");
  224.           (void)strcat(tokenbuf+len,scriptname);
  225.   #ifdef DEBUGGING
  226. --- 324,331 ----
  227. ***************
  228. *** 357,363 ****
  229.           sprintf(tokenbuf, "%s", cpp);
  230.       str_cat(str,"-I");
  231.       str_cat(str,PRIVLIB);
  232. ! #ifdef MSDOS
  233.       (void)sprintf(buf, "\
  234.   sed %s -e \"/^[^#]/b\" \
  235.    -e \"/^#[     ]*include[     ]/b\" \
  236. --- 365,371 ----
  237.           sprintf(tokenbuf, "%s", cpp);
  238.       str_cat(str,"-I");
  239.       str_cat(str,PRIVLIB);
  240. ! #ifdef DOSISH
  241.       (void)sprintf(buf, "\
  242.   sed %s -e \"/^[^#]/b\" \
  243.    -e \"/^#[     ]*include[     ]/b\" \
  244. ***************
  245. *** 505,511 ****
  246.           if (tmpstatbuf.st_dev != statbuf.st_dev ||
  247.           tmpstatbuf.st_ino != statbuf.st_ino) {
  248.           (void)fclose(rsfp);
  249. !         if (rsfp = mypopen("/bin/mail root","w")) {    /* heh, heh */
  250.               fprintf(rsfp,
  251.   "User %d tried to run dev %d ino %d in place of dev %d ino %d!\n\
  252.   (Filename of set-id script was %s, uid %d gid %d.)\n\nSincerely,\nperl\n",
  253. --- 513,519 ----
  254.           if (tmpstatbuf.st_dev != statbuf.st_dev ||
  255.           tmpstatbuf.st_ino != statbuf.st_ino) {
  256.           (void)fclose(rsfp);
  257. !         if (rsfp = mypopen("mail root","w")) {    /* heh, heh */
  258.               fprintf(rsfp,
  259.   "User %d tried to run dev %d ino %d in place of dev %d ino %d!\n\
  260.   (Filename of set-id script was %s, uid %d gid %d.)\n\nSincerely,\nperl\n",
  261. ***************
  262. *** 1380,1397 ****
  263.   #ifdef MSDOS
  264.       fputs("MS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis\n",
  265.       stdout);
  266.   #ifdef OS2
  267. !         fputs("OS/2 port Copyright (c) 1990, 1991, Raymond Chen, Kai Uwe Rommel\n",
  268.           stdout);
  269.   #endif
  270. - #endif
  271.   #ifdef atarist
  272.           fputs("atariST series port, ++jrb  bammi@cadence.com\n", stdout);
  273.   #endif
  274.       fputs("\n\
  275.   Perl may be copied only under the terms of either the Artistic License or the\n\
  276.   GNU General Public License, which may be found in the Perl 4.0 source kit.\n",stdout);
  277. ! #ifdef MSDOS
  278.           usage(origargv[0]);
  279.   #endif
  280.       exit(0);
  281. --- 1388,1405 ----
  282.   #ifdef MSDOS
  283.       fputs("MS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis\n",
  284.       stdout);
  285. + #endif
  286.   #ifdef OS2
  287. !         fputs("OS/2 port Copyright (c) 1990-1992, Raymond Chen, Kai Uwe Rommel\n",
  288.           stdout);
  289.   #endif
  290.   #ifdef atarist
  291.           fputs("atariST series port, ++jrb  bammi@cadence.com\n", stdout);
  292.   #endif
  293.       fputs("\n\
  294.   Perl may be copied only under the terms of either the Artistic License or the\n\
  295.   GNU General Public License, which may be found in the Perl 4.0 source kit.\n",stdout);
  296. ! #ifdef DOSISH
  297.           usage(origargv[0]);
  298.   #endif
  299.       exit(0);
  300. ***************
  301. *** 1430,1435 ****
  302. --- 1438,1450 ----
  303.       fprintf(stderr, "unexec of %s into %s failed!\n", perlpath, dumpname);
  304.       exit(status);
  305.   #else
  306. + #ifdef OS2
  307. +     int file = open("perldump", O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0666);
  308. +     _core(file);
  309. +     close(file);
  310. +     fprintf(stderr, "Core dumped to file \"perldump\".\n");
  311. +     exit(0);
  312. + #else
  313.   #ifdef DOSISH
  314.       abort();    /* nothing else to do */
  315.   #else /* ! MSDOS */
  316. ***************
  317. *** 1442,1446 ****
  318. --- 1457,1462 ----
  319.       kill(getpid(),SIGABRT);    /* for use with undump */
  320.   #endif /* ! MSDOS */
  321.   #endif
  322. + #endif
  323.   }
  324.   
  325. diff -cbr orig/perl.h new/perl.h
  326. *** orig/perl.h    Mon Feb 08 21:36:00 1993
  327. --- new/perl.h    Fri Feb 26 13:29:54 1993
  328. ***************
  329. *** 63,69 ****
  330.   #endif
  331.   
  332.   /* define this once if either system, instead of cluttering up the src */
  333. ! #if defined(MSDOS) || defined(atarist)
  334.   #define DOSISH 1
  335.   #endif
  336.   
  337. --- 63,69 ----
  338.   #endif
  339.   
  340.   /* define this once if either system, instead of cluttering up the src */
  341. ! #if defined(MSDOS) || defined(atarist) || defined(OS2)
  342.   #define DOSISH 1
  343.   #endif
  344.   
  345. ***************
  346. *** 268,274 ****
  347.   #endif
  348.   
  349.   #include <errno.h>
  350. ! #ifndef MSDOS
  351.   #ifndef errno
  352.   extern int errno;     /* ANSI allows errno to be an lvalue expr */
  353.   #endif
  354. --- 268,274 ----
  355.   #endif
  356.   
  357.   #include <errno.h>
  358. ! #ifndef DOSISH
  359.   #ifndef errno
  360.   extern int errno;     /* ANSI allows errno to be an lvalue expr */
  361.   #endif
  362. ***************
  363. *** 278,285 ****
  364. --- 278,287 ----
  365.   #ifdef HAS_STRERROR
  366.   char *strerror();
  367.   #else
  368. + #ifndef __EMX__
  369.   extern int sys_nerr;
  370.   extern char *sys_errlist[];
  371. + #endif
  372.   #define strerror(e) ((e) < 0 || (e) >= sys_nerr ? "(unknown)" : sys_errlist[e])
  373.   #endif
  374.   #endif
  375. diff -cbr orig/str.c new/str.c
  376. *** orig/str.c    Mon Feb 08 21:35:28 1993
  377. --- new/str.c    Fri Feb 26 13:29:54 1993
  378. ***************
  379. *** 101,107 ****
  380.   char *
  381.   str_grow(str,newlen)
  382.   register STR *str;
  383. ! #ifndef DOSISH
  384.   register int newlen;
  385.   #else
  386.   unsigned long newlen;
  387. --- 101,107 ----
  388.   char *
  389.   str_grow(str,newlen)
  390.   register STR *str;
  391. ! #ifndef MSDOS
  392.   register int newlen;
  393.   #else
  394.   unsigned long newlen;
  395. diff -cbr orig/util.c new/util.c
  396. *** orig/util.c    Mon Feb 08 21:35:26 1993
  397. --- new/util.c    Fri Feb 26 13:29:56 1993
  398. ***************
  399. *** 1133,1139 ****
  400.       else
  401.       Safefree(environ[i]);
  402.       New(904, environ[i], strlen(nam) + strlen(val) + 2, char);
  403. ! #ifndef MSDOS
  404.       (void)sprintf(environ[i],"%s=%s",nam,val);/* all that work just for this */
  405.   #else
  406.       /* MS-DOS requires environment variable names to be in uppercase */
  407. --- 1133,1139 ----
  408.       else
  409.       Safefree(environ[i]);
  410.       New(904, environ[i], strlen(nam) + strlen(val) + 2, char);
  411. ! #ifndef DOSISH
  412.       (void)sprintf(environ[i],"%s=%s",nam,val);/* all that work just for this */
  413.   #else
  414.       /* MS-DOS requires environment variable names to be in uppercase */
  415. ***************
  416. *** 1487,1493 ****
  417.       return fdopen(p[this], mode);
  418.   }
  419.   #else
  420. ! #ifdef atarist
  421.   FILE *popen();
  422.   FILE *
  423.   mypopen(cmd,mode)
  424. --- 1487,1493 ----
  425.       return fdopen(p[this], mode);
  426.   }
  427.   #else
  428. ! #if defined(atarist) || defined(__EMX__)
  429.   FILE *popen();
  430.   FILE *
  431.   mypopen(cmd,mode)
  432. ***************
  433. *** 1645,1651 ****
  434.       return;
  435.   }
  436.   
  437. ! #ifdef atarist
  438.   int pclose();
  439.   int
  440.   mypclose(ptr)
  441. --- 1645,1651 ----
  442.       return;
  443.   }
  444.   
  445. ! #if defined(atarist) || defined(__EMX__)
  446.   int pclose();
  447.   int
  448.   mypclose(ptr)
  449.