home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Atari / Gnu / gmake362.zoo / diffs < prev    next >
Text File  |  1992-07-27  |  13KB  |  579 lines

  1. --- 1.1.1.2.1.1    1991/12/29 16:09:12
  2. +++ arscan.c    1992/01/24 20:00:48
  3. @@ -25,7 +25,11 @@
  4.  #define PORTAR 1
  5.  #endif
  6.  
  7. +#ifdef atarist
  8. +#include <gnu-ar.h>
  9. +#else
  10.  #include <ar.h>
  11. +#endif
  12.  #include <stdio.h>
  13.  #include <sys/types.h>
  14.  #include <sys/stat.h>
  15. --- 1.1.1.2.1.1    1991/12/29 16:09:12
  16. +++ commands.c    1992/01/24 20:00:48
  17. @@ -342,6 +342,7 @@
  18.       int sig;
  19.  {
  20.    signal (sig, SIG_DFL);
  21. +#ifndef atarist
  22.  #ifndef USG
  23.    (void) sigsetmask (0);
  24.  #endif
  25. @@ -387,6 +388,7 @@
  26.      wait_for_children (0, 1);
  27.  
  28.    /* Delete any non-precious intermediate files that were made.  */
  29. +#endif /* atarist */
  30.  
  31.    remove_intermediates (1);
  32.  
  33. --- 1.3.1.1    1991/12/29 16:09:12
  34. +++ default.c    1992/01/24 20:00:48
  35. @@ -28,9 +28,14 @@
  36.     `.s' must come last, so that a `.o' file will be made from
  37.     a `.c' or `.p' or ... file rather than from a .s file.  */
  38.  
  39. +#ifdef atarist
  40.  static char default_suffixes[]
  41. +  = ".out .a .o .c .cc .y .l .s .S .h .info .dvi .tex .texinfo .sh .elc .el";
  42. +#else
  43. +static char default_suffixes[]
  44.    = ".out .a .ln .o .c .cc .C .p .f .F .r .y .l .s .S \
  45.  .mod .sym .def .h .info .dvi .tex .texinfo .texi .cweb .web .sh .elc .el";
  46. +#endif
  47.  
  48.  static struct pspec default_pattern_rules[] =
  49.    {
  50. @@ -48,6 +53,13 @@
  51.  
  52.  static struct pspec default_terminal_rules[] =
  53.    {
  54. +#ifdef atarist
  55. +    /* RCS.  */
  56. +    "%", "RCS/%",        /* This is for RCS 5.6 */
  57. +    "test -f $@ || $(CO) $(COFLAGS) $< $@",
  58. +    "%", "RCS/%,v",
  59. +    "test -f $@ || $(CO) $(COFLAGS) $< $@",
  60. +#else
  61.      /* RCS.  */
  62.      "%", "%,v",
  63.      "test -f $@ || $(CO) $(COFLAGS) $< $@",
  64. @@ -59,6 +71,7 @@
  65.      "$(GET) $(GFLAGS) $<",
  66.      "%", "SCCS/s.%",
  67.      "$(GET) $(GFLAGS) $<",
  68. +#endif
  69.  
  70.      0, 0, 0
  71.    };
  72. --- 1.1.1.3    1991/12/29 16:09:12
  73. +++ dir.c    1992/06/10 20:54:58
  74. @@ -50,6 +50,12 @@
  75.  #define REAL_DIR_ENTRY(dp) (dp->d_ino != 0)
  76.  #endif /* POSIX */
  77.  
  78. +#ifdef atarist
  79. +#define HASH_LIMIT 8    /* only consider this many characters of file names */
  80. +static short _limit = 0;
  81. +#endif
  82. +
  83. +
  84.  /* Hash table of directories.  */
  85.  
  86.  struct directory
  87. @@ -97,12 +103,20 @@
  88.    register char *p;
  89.    register struct directory *dir;
  90.  
  91. +#ifdef atarist
  92. +  for (p = name, _limit = HASH_LIMIT; *p != '\0' && _limit-- > 0; ++p)
  93. +#else
  94.    for (p = name; *p != '\0'; ++p)
  95. +#endif
  96.      HASH (hash, *p);
  97.    hash %= DIRECTORY_BUCKETS;
  98.  
  99.    for (dir = directories[hash]; dir != 0; dir = dir->next)
  100. +#ifdef atarist
  101. +    if (DOS_streq (dir->name, name))
  102. +#else
  103.      if (streq (dir->name, name))
  104. +#endif
  105.        break;
  106.  
  107.    if (dir == 0)
  108. @@ -164,7 +178,11 @@
  109.      /* Checking if the directory exists.  */
  110.      return 1;
  111.  
  112. +#ifdef atarist
  113. +      for (p = filename,_limit = HASH_LIMIT; *p != '\0' && _limit-- > 0; ++p)
  114. +#else
  115.        for (p = filename; *p != '\0'; ++p)
  116. +#endif
  117.      HASH (hash, *p);
  118.        hash %= DIRFILE_BUCKETS;
  119.  
  120. @@ -171,7 +189,11 @@
  121.        /* Search the list of hashed files.  */
  122.  
  123.        for (df = dir->files[hash]; df != 0; df = df->next)
  124. +#ifdef atarist
  125. +    if (DOS_streq (df->name, filename))
  126. +#else
  127.      if (streq (df->name, filename))
  128. +#endif
  129.        return !df->impossible;
  130.      }
  131.  
  132. @@ -191,10 +213,13 @@
  133.        if (!REAL_DIR_ENTRY (d))
  134.      continue;
  135.  
  136. +#ifdef atarist
  137. +      for (i = 0, _limit = HASH_LIMIT; i < D_NAMLEN(d) && _limit-- > 0; ++i)
  138. +#else
  139.        for (i = 0; i < D_NAMLEN(d); ++i)
  140. +#endif
  141.      HASH (newhash, d->d_name[i]);
  142.        newhash %= DIRFILE_BUCKETS;
  143. -
  144.        df = (struct dirfile *) xmalloc (sizeof (struct dirfile));
  145.        df->next = dir->files[newhash];
  146.        dir->files[newhash] = df;
  147. @@ -202,8 +227,13 @@
  148.        df->impossible = 0;
  149.  
  150.        /* Check if the name matches the one we're searching for.  */
  151. -      if (filename != 0
  152. -      && newhash == hash && streq (d->d_name, filename))
  153. +      if (filename != 0 && newhash == hash 
  154. +#ifdef atarist
  155. +      && DOS_streq (d->d_name, filename)
  156. +#else
  157. +      && streq (d->d_name, filename)
  158. +#endif
  159. +                    )
  160.      return 1;
  161.      }
  162.  
  163. @@ -269,7 +299,12 @@
  164.        filename = p = dirend + 1;
  165.      }
  166.  
  167. +#ifdef atarist
  168. +  _limit = HASH_LIMIT;
  169. +  for (hash = 0; *p != '\0' && _limit-- > 0; ++p)
  170. +#else
  171.    for (hash = 0; *p != '\0'; ++p)
  172. +#endif
  173.      HASH (hash, *p);
  174.    hash %= DIRFILE_BUCKETS;
  175.  
  176. @@ -318,12 +353,21 @@
  177.      /* There are no files entered for this directory.  */
  178.      return 0;
  179.  
  180. +#ifdef atarist
  181. +  _limit = HASH_LIMIT;
  182. +  for (hash = 0; *p != '\0' && _limit-- > 0; ++p)
  183. +#else
  184.    for (hash = 0; *p != '\0'; ++p)
  185. +#endif
  186.      HASH (hash, *p);
  187.    hash %= DIRFILE_BUCKETS;
  188.  
  189.    for (next = dir->files[hash]; next != 0; next = next->next)
  190. +#ifdef atarist
  191. +    if (DOS_streq (filename, next->name))
  192. +#else
  193.      if (streq (filename, next->name))
  194. +#endif
  195.        return next->impossible;
  196.  
  197.    return 0;
  198. @@ -399,3 +443,44 @@
  199.      printf ("%u", impossible);
  200.    printf (" impossibilities in %u directories.\n", dirs);
  201.  }
  202. +
  203. +#ifdef atarist
  204. +/* checks to see if two names refer to the same file */
  205. +int DOS_streq(name1, name2)
  206. +char *name1, *name2;
  207. +{
  208. +    static char _name1[64], _name2[64];
  209. +    char *lastslash;
  210. +    extern char *rindex();
  211. +    int i;
  212. +
  213. +    if (!strcmp(name1, name2)) return 1;
  214. +
  215. +    unx2dos(name1, _name1);
  216. +    unx2dos(name2, _name2);
  217. +
  218. +    name1 = rindex(_name1, '\\'); if (!name1) name1 = _name1;
  219. +    name2 = rindex(_name2, '\\'); if (!name2) name2 = _name2;
  220. +    for(i = 8; i>0; i--) {
  221. +        if (*name1 != *name2) return 0;
  222. +        if (*name1 == 0)
  223. +            return 1;
  224. +        if (*name1 == '.')
  225. +            goto doext;
  226. +        name1++; name2++;
  227. +    }
  228. +
  229. +/* now look for extension */
  230. +    while (*name1 && *name1 != '.') name1++;
  231. +    while (*name2 && *name2 != '.') name2++;
  232. +    if (*name1 != *name2) return 0;
  233. +doext:
  234. +    name1++; name2++;
  235. +    for (i = 3; i > 0; i--) {
  236. +        if (*name1 != *name2) return 0;
  237. +        if (!*name1) return 1;
  238. +        name1++; name2++;
  239. +    }
  240. +    return 1;
  241. +}
  242. +#endif /* atarist */
  243. --- 1.1.1.1.1.1    1991/12/29 16:09:12
  244. +++ function.c    1992/01/24 20:00:50
  245. @@ -351,6 +351,9 @@
  246.      else
  247.        error_prefix = "";
  248.  
  249. +#ifdef atarist
  250. +    perror_with_name (error_prefix, "function not allowed under TOS");
  251. +#else
  252.      if (pipe (pipedes) < 0)
  253.        {
  254.          perror_with_name (error_prefix, "pipe");
  255. @@ -444,6 +447,7 @@
  256.  
  257.      pop_signals_blocked_p ();
  258.  
  259. +#endif /* atarist */
  260.      free (text);
  261.      break;
  262.        }
  263. --- 1.1.1.2.1.1    1991/12/29 16:09:12
  264. +++ job.c    1992/01/25 18:06:16
  265. @@ -24,7 +24,11 @@
  266.  #include <errno.h>
  267.  
  268.  /* Default path to search for executables.  */
  269. +#ifdef atarist
  270. +static char default_path[] = ";/bin";
  271. +#else
  272.  static char default_path[] = ":/bin:/usr/bin";
  273. +#endif
  274.  
  275.  /* Default shell to use.  */
  276.  char default_shell[] = "/bin/sh";
  277. @@ -87,10 +91,20 @@
  278.  
  279.  #else    /* WTERMSIG not defined and have <sys/wait.h> or not USG.  */
  280.  
  281. +#ifdef atarist
  282. +#  define WAIT_T int
  283. +#  define WTERMSIG(x) 0
  284. +#  define WCOREDUMP(x) 0
  285. +#  define WEXITSTATUS(x)  x
  286. +#  define WIFSIGNALED(x) (WTERMSIG (x) != 0)
  287. +#  define WIFEXITED(x) (WTERMSIG (x) == 0)
  288. +#  undef WAIT_NOHANG
  289. +#else
  290.  #define WAIT_T union wait
  291.  #define WTERMSIG(x)    ((x).w_termsig)
  292.  #define WCOREDUMP(x)    ((x).w_coredump)
  293.  #define WEXITSTATUS(x)    ((x).w_retcode)
  294. +#endif /* atarist */
  295.  #ifndef    WIFSIGNALED
  296.  #define    WIFSIGNALED(x)    (WTERMSIG(x) != 0)
  297.  #endif
  298. @@ -205,7 +219,9 @@
  299.  #else    /* Not USG.  */
  300.  
  301.    /* Block the signals.  */
  302. +#ifndef atarist
  303.    (void) sigblock (fatal_signal_mask | sigmask (SIGCHLD));
  304. +#endif /* atarist */
  305.  
  306.  #endif
  307.  
  308. @@ -226,7 +242,9 @@
  309.  #else    /* Not USG.  */
  310.  
  311.    /* Unblock the signals.  */
  312. +#ifndef atarist
  313.    (void) sigsetmask (sigblock (0) & ~(fatal_signal_mask | sigmask (SIGCHLD)));
  314. +#endif
  315.  
  316.  #endif
  317.  
  318. @@ -654,6 +672,7 @@
  319.    
  320.    /* Set up a bad standard input that reads from a broken pipe.  */
  321.  
  322. +#ifndef atarist
  323.    if (bad_stdin == -1)
  324.      {
  325.        /* Make a file descriptor that is the read end of a broken pipe.
  326. @@ -667,6 +686,7 @@
  327.        bad_stdin = pd[0];
  328.      }
  329.      }
  330. +#endif
  331.  
  332.    /* Decide whether to give this child the `good' standard input
  333.       (one that points to the terminal or whatever), or the `bad' one
  334. @@ -827,6 +847,7 @@
  335.    if (stdout_fd != 1)
  336.      (void) dup2 (stdout_fd, 1);
  337.  
  338. +#ifndef atarist
  339.    /* Free up file descriptors.  */
  340.    {
  341.      register int d;
  342. @@ -834,6 +855,7 @@
  343.      for (d = 3; d < max; ++d)
  344.        (void) close (d);
  345.    }
  346. +#endif /* atarist */
  347.  
  348.    /* Don't block signals for the new process.  */
  349.    unblock_signals ();
  350. @@ -850,6 +872,60 @@
  351.  search_path (file, path, program)
  352.       char *file, *path, *program;
  353.  {
  354. +#ifdef atarist
  355. +  static char **_extensions = 0, *suff;
  356. +  char *p, *q;
  357. +  int i;
  358. +      
  359. +  if (path == 0 || path[0] == '\0')
  360. +    path = default_path;
  361. +  
  362. +  if ((index (file, '/') != 0) || (index (file, '\\') != 0))
  363. +    {
  364. +      strcpy (program, file);
  365. +      return 1;
  366. +    }
  367. +  else
  368. +  {
  369. +    if (_extensions == 0)
  370. +      {
  371. +    if ((p == (char *) getenv ("SUFF")) != 0 && *p)
  372. +      {
  373. +        suff = (char *) xmalloc (strlen (p) + 1);
  374. +        strcpy (suff, p);
  375. +        for (i = 1, q = suff; *q; q++)
  376. +          if (*q == ',' || *q == ';')
  377. +        i++;
  378. +        _extensions = (char **) xmalloc (i * sizeof (char *));
  379. +        _extensions[0] = suff;
  380. +        for (i = 0, q = suff;  *q; q++)
  381. +          if (*q == ',' || *q == ';')
  382. +        {
  383. +          *q = '\0';
  384. +          _extensions[++i] = q + 1;
  385. +        }
  386. +        _extensions[++i] = 0;
  387. +      }
  388. +    else
  389. +          {
  390. +        _extensions = (char **) xmalloc (5 * sizeof (char *));
  391. +        _extensions[0] = "ttp";
  392. +        _extensions[1] = "tos";
  393. +        _extensions[2] = "prg";
  394. +        _extensions[3] = "app";
  395. +        _extensions[4] = 0;
  396. +      }
  397. +      }
  398. +    p = (char *) findfile (file, path, _extensions);
  399. +    if (p == NULL)
  400. +      return 0;
  401. +    else
  402. +      {
  403. +    strcpy (program, p);
  404. +    return 1;
  405. +      }
  406. +  }
  407. +#else
  408.    if (path == 0 || path[0] == '\0')
  409.      path = default_path;
  410.  
  411. @@ -933,6 +1009,7 @@
  412.      }
  413.  
  414.    return 0;
  415. +#endif /* atarist */
  416.  }
  417.  
  418.  /* Replace the current process with one running the command in ARGV,
  419. @@ -1001,7 +1078,6 @@
  420.            new_argv[1 + argc] = argv[argc];
  421.            --argc;
  422.          }
  423. -
  424.            execve (shell_path, new_argv, envp);
  425.            perror_with_name ("execve: ", shell_path);
  426.          }
  427. @@ -1030,7 +1106,11 @@
  428.       char *line, **restp;
  429.       char *shell, *ifs;
  430.  {
  431. +#ifdef atarist
  432. +  static char sh_chars[] = "#;\"*?[]&|<>(){}$`";
  433. +#else
  434.    static char sh_chars[] = "#;\"*?[]&|<>(){}=$`";
  435. +#endif
  436.    static char *sh_cmds[] = { "cd", "eval", "exec", "exit", "login",
  437.                   "logout", "set", "umask", "wait", "while", "for",
  438.                   "case", "if", ":", ".", "break", "continue",
  439. @@ -1079,6 +1159,7 @@
  440.          instring = 0;
  441.        else
  442.          *ap++ = *p;
  443. +        /* Backslash-newline combinations are eaten.  */
  444.      }
  445.        else if (index (sh_chars, *p) != 0)
  446.      /* Not inside a string, but it's a special char.  */
  447. @@ -1087,8 +1168,11 @@
  448.      /* Not a special char.  */
  449.      switch (*p)
  450.        {
  451. +#ifdef atarist
  452. +      case '@':
  453. +#else
  454.        case '\\':
  455. -        /* Backslash-newline combinations are eaten.  */
  456. +#endif
  457.          if (p[1] != '\0' && p[1] != '\n')
  458.            /* Copy and skip the following char.  */
  459.            *ap++ = *++p;
  460. @@ -1202,7 +1286,11 @@
  461.        if (*p == '\\' || *p == '\''
  462.            || isspace (*p)
  463.            || index (sh_chars, *p) != 0)
  464. +#ifdef atarist
  465. +        *ap++ = '@';
  466. +#else
  467.          *ap++ = '\\';
  468. +#endif
  469.        *ap++ = *p;
  470.      }
  471.        *ap = '\0';
  472. --- 1.1.1.2.1.1    1991/12/29 16:09:12
  473. +++ main.c    1992/01/24 20:00:50
  474. @@ -291,6 +291,10 @@
  475.    struct dep *read_makefiles;
  476.    PATH_VAR (current_directory);
  477.  
  478. +#ifdef atarist
  479. +  _binmode( 0 );
  480. +#endif /* atarist */
  481. +
  482.    default_goal_file = 0;
  483.    reading_filename = 0;
  484.    reading_lineno_ptr = 0;
  485. --- 1.1.1.2.1.1    1991/12/29 16:09:12
  486. +++ misc.c    1992/01/24 20:00:50
  487. @@ -498,6 +498,7 @@
  488.  static void
  489.  init_access ()
  490.  {
  491. +#ifndef atarist
  492.    user_uid = getuid ();
  493.    user_gid = getgid ();
  494.  
  495. @@ -507,6 +508,7 @@
  496.    /* Do these ever fail?  */
  497.    if (user_uid == -1 || user_gid == -1 || make_uid == -1 || make_gid == -1)
  498.      pfatal_with_name ("get{e}[gu]id");
  499. +#endif /* atarist */
  500.  
  501.    current_access = make;
  502.  }
  503. @@ -513,9 +515,16 @@
  504.  
  505.  /* Give the process appropriate permissions for access to
  506.     user data (i.e., to stat files, or to spawn a child process).  */
  507. +#ifdef atarist
  508.  void
  509.  user_access ()
  510.  {
  511. +  current_access = user;
  512. +}
  513. +#else
  514. +void
  515. +user_access ()
  516. +{
  517.    if (!access_inited)
  518.      init_access ();
  519.  
  520. @@ -554,6 +563,7 @@
  521.  
  522.    current_access = user;
  523.  }
  524. +#endif /* atarist */
  525.  
  526.  /* Give the process appropriate permissions for access to
  527.     make data (i.e., the load average).  */
  528. @@ -560,6 +570,7 @@
  529.  void
  530.  make_access ()
  531.  {
  532. +#ifndef atarist
  533.    if (!access_inited)
  534.      init_access ();
  535.  
  536. @@ -579,6 +590,7 @@
  537.    if (setregid (user_gid, make_gid) < 0)
  538.      pfatal_with_name ("setregid");
  539.  #endif
  540. +#endif /* atarist */
  541.  
  542.    current_access = make;
  543.  }
  544. @@ -591,8 +603,10 @@
  545.    /* Set both the real and effective UID and GID to the user's.
  546.       They cannot be changed back to make's.  */
  547.  
  548. +#ifndef atarist
  549.    if (setuid (user_uid) < 0)
  550.      pfatal_with_name ("setuid");
  551.    if (setgid (user_gid) < 0)
  552.      pfatal_with_name ("setgid");
  553. +#endif
  554.  }
  555. --- 1.4    1991/12/29 16:09:12
  556. +++ version.c    1992/01/24 20:00:52
  557. @@ -1,4 +1,4 @@
  558. -char *version_string = "3.62";
  559. +char *version_string = "3.62 atariST";
  560.  
  561.  /*
  562.    Local variables:
  563. --- 1.1.1.3    1991/12/29 16:09:12
  564. +++ make.h    1992/01/24 20:00:50
  565. @@ -219,8 +219,13 @@
  566.  #else
  567.  
  568.  #ifndef    USG
  569. +#ifdef __MINT__
  570. +extern long sigsetmask ();
  571. +extern long sigblock ();
  572. +#else
  573.  extern int sigsetmask ();
  574.  extern int sigblock ();
  575. +#endif
  576.  #endif
  577.  extern int kill ();
  578.  extern void abort (), exit ();
  579.