VirtualBox

Changeset 2591 in kBuild for trunk/src/kmk/remake.c


Ignore:
Timestamp:
Jun 17, 2012 8:45:31 PM (13 years ago)
Author:
bird
Message:

kmk: Merged in changes from GNU make 3.82. Previous GNU make base version was gnumake-2008-10-28-CVS.

Location:
trunk/src/kmk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk

    • Property svn:ignore
      •  

        old new  
        1313stamp-*
        1414makebook*
         15
        1516.*gdbinit
         17.gdb_history
         18
        1619*.dep
        1720*.dvi
         
        3134*.pg
        3235*.pgs
         36
        3337README
        3438README.DOS
        3539README.W32
         40README.OS2
        3641aclocal.m4
        3742autom4te.cache
         
        5257config.h.W32
        5358config.h-vms
         59
        5460loadavg
        5561loadavg.c
        5662make
         63
        5764.deps
        5865.dep_segment
         66ID
         67TAGS
         68
        5969_*
        6070sun4
         
        7282sol2
        7383i486-linux
         84
        7485customs
         86
        7587install-sh
        7688mkinstalldirs
         89
         90.directive.asc
  • trunk/src/kmk/remake.c

    r2100 r2591  
    11/* Basic dependency engine for GNU Make.
    22Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
    3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
    4 Foundation, Inc.
     31998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
     42010 Free Software Foundation, Inc.
    55This file is part of GNU Make.
    66
     
    9090{
    9191  int t = touch_flag, q = question_flag, n = just_print_flag;
    92   unsigned int j = job_slots;
    9392  int status = -1;
    9493
     
    142141              unsigned int ocommands_started;
    143142              int x;
     143
     144              file->dontcare = g->dontcare;
     145
    144146              check_renamed (file);
    145147              if (rebuilding_makefiles)
     
    215217              any_not_updated |= !file->updated;
    216218
     219              file->dontcare = 0;
     220
    217221              if (stop)
    218222                break;
     
    275279      question_flag = q;
    276280      just_print_flag = n;
    277       job_slots = j;
    278281    }
    279282
     
    308311  if (f->considered == considered)
    309312    {
    310       DBF (DB_VERBOSE, _("Pruning file `%s'.\n"));
    311       return f->command_state == cs_finished ? f->update_status : 0;
     313      /* Check for the case where a target has been tried and failed but
     314         the diagnostics hasn't been issued. If we need the diagnostics
     315         then we will have to continue. */
     316      if (!(f->updated && f->update_status > 0 && !f->dontcare && f->no_diag))
     317        {
     318          DBF (DB_VERBOSE, _("Pruning file `%s'.\n"));
     319          return f->command_state == cs_finished ? f->update_status : 0;
     320        }
    312321    }
    313322
     
    326335      /* If we got an error, don't bother with double_colon etc.  */
    327336      if (status != 0 && !keep_going_flag)
    328         return status;
     337        return status;
    329338
    330339      if (f->command_state == cs_running
     
    358367
    359368static void
    360 complain (const struct file *file)
     369complain (struct file *file)
    361370{
    362371  const char *msg_noparent
     
    365374    = _("%sNo rule to make target `%s', needed by `%s'%s");
    366375
     376  /* If this file has no_diag set then it means we tried to update it
     377     before in the dontcare mode and failed. The target that actually
     378     failed is not necessarily this file but could be one of its direct
     379     or indirect dependencies. So traverse this file's dependencies and
     380     find the one that actually caused the failure. */
     381
     382  struct dep *d;
     383
     384  for (d = file->deps; d != 0; d = d->next)
     385    {
     386      if (d->file->updated && d->file->update_status > 0 && file->no_diag)
     387        {
     388          complain (d->file);
     389          break;
     390        }
     391    }
     392
     393  if (d == 0)
     394    {
     395      /* Didn't find any dependencies to complain about. */
     396
    367397#ifdef KMK
    368   /* jokes */
    369   if (!keep_going_flag && file->parent == 0)
    370     {
    371       const char *msg_joke = 0;
    372       extern struct dep *goals;
    373 
    374       /* classics */
    375       if (!strcmp (file->name, "fire")
    376        || !strcmp (file->name, "Fire"))
    377         msg_joke = "No matches.\n";
    378       else if (!strcmp (file->name, "love")
    379             || !strcmp (file->name, "Love")
    380             || !strcmp (file->name, "peace")
    381             || !strcmp (file->name, "Peace"))
    382         msg_joke = "Not war.\n";
    383       else if (!strcmp (file->name, "war"))
    384         msg_joke = "Don't know how to make war.\n";
    385 
    386       /* http://xkcd.com/149/ - GNU Make bug #23273. */
    387       else if ((   !strcmp (file->name, "me")
    388                 && goals != 0
    389                 && !strcmp (dep_name(goals), "me")
    390                 && goals->next != 0
    391                 && !strcmp (dep_name(goals->next), "a")
    392                 && goals->next->next != 0)
    393             || !strncmp (file->name, "me a ", 5))
    394         msg_joke =
     398      /* jokes */
     399      if (!keep_going_flag && file->parent == 0)
     400        {
     401          const char *msg_joke = 0;
     402          extern struct dep *goals;
     403
     404          /* classics */
     405          if (!strcmp (file->name, "fire")
     406           || !strcmp (file->name, "Fire"))
     407            msg_joke = "No matches.\n";
     408          else if (!strcmp (file->name, "love")
     409                || !strcmp (file->name, "Love")
     410                || !strcmp (file->name, "peace")
     411                || !strcmp (file->name, "Peace"))
     412            msg_joke = "Not war.\n";
     413          else if (!strcmp (file->name, "war"))
     414            msg_joke = "Don't know how to make war.\n";
     415
     416          /* http://xkcd.com/149/ - GNU Make bug #23273. */
     417          else if ((   !strcmp (file->name, "me")
     418                    && goals != 0
     419                    && !strcmp (dep_name(goals), "me")
     420                    && goals->next != 0
     421                    && !strcmp (dep_name(goals->next), "a")
     422                    && goals->next->next != 0)
     423                || !strncmp (file->name, "me a ", 5))
     424            msg_joke =
    395425# ifdef HAVE_UNISTD_H
    396426                   getuid () == 0 ? "Okay.\n" :
    397427# endif
    398                    "What? Make it yourself!\n";
    399       if (msg_joke)
     428                       "What? Make it yourself!\n";
     429          if (msg_joke)
     430            {
     431              fputs (msg_joke, stderr);
     432              die (2);
     433            }
     434        }
     435#endif /* KMK */
     436
     437      if (!keep_going_flag)
    400438        {
    401           fputs (msg_joke, stderr);
    402           die (2);
     439          if (file->parent == 0)
     440            fatal (NILF, msg_noparent, "", file->name, "");
     441
     442          fatal (NILF, msg_parent, "", file->name, file->parent->name, "");
    403443        }
    404     }
    405 #endif /* KMK */
    406 
    407   if (!keep_going_flag)
    408     {
     444
    409445      if (file->parent == 0)
    410         fatal (NILF, msg_noparent, "", file->name, "");
    411 
    412       fatal (NILF, msg_parent, "", file->name, file->parent->name, "");
    413     }
    414 
    415   if (file->parent == 0)
    416     error (NILF, msg_noparent, "*** ", file->name, ".");
    417   else
    418     error (NILF, msg_parent, "*** ", file->name, file->parent->name, ".");
     446        error (NILF, msg_noparent, "*** ", file->name, ".");
     447      else
     448        error (NILF, msg_parent, "*** ", file->name, file->parent->name, ".");
     449
     450      file->no_diag = 0;
     451    }
    419452}
    420453
     
    424457update_file_1 (struct file *file, unsigned int depth)
    425458{
    426   register FILE_TIMESTAMP this_mtime;
     459  FILE_TIMESTAMP this_mtime;
    427460  int noexist, must_make, deps_changed;
    428461  int dep_status = 0;
    429   register struct dep *d, *lastd;
     462  struct file *ofile;
     463  struct dep *d, *ad;
     464  struct dep amake;
    430465  int running = 0;
    431466#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
     467  struct file *org_file = file;
    432468  struct file *f2, *f3;
    433469
     
    438474      DBS (DB_VERBOSE, (_("Considering target file `%s' -> multi head `%s'.\n"),
    439475                          file->name, file->multi_head->name));
    440       file = file->multi_head;
     476      org_file = file = file->multi_head;
    441477    }
    442478  else
     
    451487               _("Recently tried and failed to update file `%s'.\n"));
    452488
    453           /* If the file we tried to make is marked dontcare then no message
     489          /* If the file we tried to make is marked no_diag then no message
    454490             was printed about it when it failed during the makefile rebuild.
    455491             If we're trying to build it again in the normal rebuild, print a
    456492             message now.  */
    457           if (file->dontcare && !rebuilding_makefiles)
    458             {
    459               file->dontcare = 0;
     493          if (file->no_diag && !file->dontcare)
    460494              complain (file);
    461             }
    462495
    463496          return file->update_status;
     
    483516    }
    484517
     518  /* Determine whether the diagnostics will be issued should this update
     519     fail. */
     520  file->no_diag = file->dontcare;
     521
    485522  ++depth;
    486523
    487524  /* Notice recursive update of the same file.  */
    488525  start_updating (file);
     526
     527  /* We might change file if we find a different one via vpath;
     528     remember this one to turn off updating.  */
     529  ofile = file;
    489530
    490531  /* Looking at the file's modtime beforehand allows the possibility
     
    554595    }
    555596
    556   /* Update all non-intermediate files we depend on, if necessary,
    557      and see whether any of them is more recent than this file.
    558      For explicit multitarget rules we must iterate all the output
     597  /* Update all non-intermediate files we depend on, if necessary, and see
     598     whether any of them is more recent than this file.  We need to walk our
     599     deps, AND the deps of any also_make targets to ensure everything happens
     600     in the correct order.
     601
     602     bird: For explicit multitarget rules we must iterate all the output
    559603     files to get the correct picture.  The special .MUST_MAKE
    560      target variable call is also done from this context.  */
     604     target variable call is also done from this context. */
    561605
    562606#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
    563   for (f2 = file; f2; f2 = f2->multi_next)
    564     {
    565       lastd = 0;
    566       d = f2->deps;
    567 #else
    568       lastd = 0;
    569       d = file->deps;
    570 #endif
    571       while (d != 0)
     607 assert (file == org_file);
     608 for (f2 = file; f2; file = f2 = f2->multi_next)
     609 {
     610#endif
     611  amake.file = file;
     612  amake.next = file->also_make;
     613  ad = &amake;
     614  while (ad)
     615    {
     616      struct dep *lastd = 0;
     617
     618      /* Find the deps we're scanning */
     619      d = ad->file->deps;
     620      ad = ad->next;
     621
     622      while (d)
    572623        {
    573624          FILE_TIMESTAMP mtime;
     
    584635#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
    585636              /* silently ignore the order-only dep hack. */
    586               if (f2->multi_maybe && d->file == file)
     637              if (file->multi_maybe && d->file == org_file)
    587638                {
    588639                  lastd = d;
     
    593644
    594645              error (NILF, _("Circular %s <- %s dependency dropped."),
    595 #ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
    596                      f2->name, d->file->name);
    597 #else
    598646                     file->name, d->file->name);
    599 #endif
    600647              /* We cannot free D here because our the caller will still have
    601648                 a reference to it when we were called recursively via
    602649                 check_dep below.  */
    603650              if (lastd == 0)
    604 #ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
    605                 f2->deps = d->next;
    606 #else
    607651                file->deps = d->next;
    608 #endif
    609652              else
    610653                lastd->next = d->next;
     
    613656            }
    614657
    615 #ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
    616           d->file->parent = f2;
    617 #else
    618658          d->file->parent = file;
    619 #endif
    620659          maybe_make = must_make;
    621660
     
    626665              d->file->dontcare = file->dontcare;
    627666            }
    628 
    629667
    630668          dep_status |= check_dep (d->file, depth, this_mtime, &maybe_make);
     
    664702          d = d->next;
    665703        }
     704    }
    666705
    667706#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
    668       if (dep_status != 0 && !keep_going_flag)
    669         break;
    670     }
     707    if (dep_status != 0 && !keep_going_flag)
     708      break;
     709  }
     710  file = org_file;
    671711#endif
    672712
     
    677717# ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
    678718  if (!must_make)
    679     for (f2 = file; f2 && !must_make; f2 = f2->multi_next)
     719    for (f2 = org_file; f2 && !must_make; f2 = f2->multi_next)
    680720      must_make = call_must_make_target_var (f2, depth);
    681721# else
     
    691731    {
    692732#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
    693       for (f2 = file; f2; f2 = f2->multi_next)
    694         for (d = f2->deps; d != 0; d = d->next)
    695 #else
     733      for (file = f2 = org_file; f2; file = f2 = f2->multi_next)
     734#endif
    696735        for (d = file->deps; d != 0; d = d->next)
    697 #endif
    698736          if (d->file->intermediate)
    699737            {
     
    702740              FILE_TIMESTAMP mtime = file_mtime (d->file);
    703741              check_renamed (d->file);
    704 #ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
    705               d->file->parent = f2;
    706 #else
    707742              d->file->parent = file;
    708 #endif
    709743
    710744              /* Inherit dontcare flag from our parent. */
     
    741775
    742776              if (!running)
    743 #ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
    744                 d->changed = ((f2->phony && f2->cmds != 0)
    745 #else
    746777                d->changed = ((file->phony && file->cmds != 0)
    747 #endif
    748778                            || file_mtime (d->file) != mtime);
    749779            }
     780#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
     781      file = org_file;
     782#endif
    750783    }
    751784
    752785  finish_updating (file);
     786  finish_updating (ofile);
    753787
    754788  DBF (DB_VERBOSE, _("Finished prerequisites of target file `%s'.\n"));
     
    797831  deps_changed = 0;
    798832#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
    799   for (f2 = file; f2; f2 = f2->multi_next)
     833  for (file = f2 = org_file; f2; file = f2 = f2->multi_next)
    800834#endif
    801835    for (d = file->deps; d != 0; d = d->next)
     
    803837        FILE_TIMESTAMP d_mtime = file_mtime (d->file);
    804838#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
    805         if (d->file == file && f2->multi_maybe)
     839        if (d->file == file && file->multi_maybe)
    806840          continue;
    807841#endif
     
    858892          }
    859893      }
     894#ifdef CONFIG_WITH_EXPLICIT_MULTITARGET
     895  file = org_file;
     896#endif
    860897
    861898  /* Here depth returns to the value it had when we were called.  */
     
    11701207         would have been updated. */
    11711208
    1172       if (question_flag || just_print_flag || touch_flag)
     1209      if ((question_flag || just_print_flag || touch_flag) && file->cmds)
    11731210        {
    11741211          for (i = file->cmds->ncommand_lines; i > 0; --i)
     
    12781315           FILE_TIMESTAMP this_mtime, int *must_make_ptr)
    12791316{
     1317  struct file *ofile;
    12801318  struct dep *d;
    12811319  int dep_status = 0;
     
    12831321  ++depth;
    12841322  start_updating (file);
     1323
     1324  /* We might change file if we find a different one via vpath;
     1325     remember this one to turn off updating.  */
     1326  ofile = file;
    12851327
    12861328  if (file->phony || !file->intermediate)
     
    13331375             necessary, and see whether any of them is more recent than the
    13341376             file on whose behalf we are checking.  */
    1335           struct dep *lastd;
     1377          struct dep *ld;
    13361378          int deps_running = 0;
    13371379
    1338           /* Reset this target's state so that we check it fresh.  It could be
    1339              that it's already been checked as part of an order-only
    1340              prerequisite and so wasn't rebuilt then, but should be now.
    1341 
    1342              bird: What if we're already running the recipe?  We don't wish
    1343                    it to be started once again do we?  This happens with the
    1344                    SECONDARY Test #9 here now... If the idea is to re-evaluate
    1345                    the target regardless of whether it's running or no, then
    1346                    perhaps saving and restoring is a better idea?
    1347                    See bug #15919.  */
    1348           if (file->command_state != cs_running) /* bird */
     1380          /* If this target is not running, set it's state so that we check it
     1381             fresh.  It could be it was checked as part of an order-only
     1382             prerequisite and so wasn't rebuilt then, but should be now.  */
     1383          if (file->command_state != cs_running)
    13491384            set_command_state (file, cs_not_started);
    13501385
    1351           lastd = 0;
     1386          ld = 0;
    13521387          d = file->deps;
    13531388          while (d != 0)
     
    13591394                  error (NILF, _("Circular %s <- %s dependency dropped."),
    13601395                         file->name, d->file->name);
    1361                   if (lastd == 0)
     1396                  if (ld == 0)
    13621397                    {
    13631398                      file->deps = d->next;
     
    13671402                  else
    13681403                    {
    1369                       lastd->next = d->next;
     1404                      ld->next = d->next;
    13701405                      free_dep (d);
    1371                       d = lastd->next;
     1406                      d = ld->next;
    13721407                    }
    13731408                  continue;
     
    13881423                deps_running = 1;
    13891424
    1390               lastd = d;
     1425              ld = d;
    13911426              d = d->next;
    13921427            }
     
    14011436
    14021437  finish_updating (file);
     1438  finish_updating (ofile);
     1439
    14031440  return dep_status;
    14041441}
     
    15881625        {
    15891626          /* If name_mtime failed, search VPATH.  */
    1590           const char *name = vpath_search (file->name, &mtime);
     1627          const char *name = vpath_search (file->name, &mtime, NULL, NULL);
    15911628          if (name
    15921629              /* Last resort, is it a library (-lxxx)?  */
     
    18391876    };
    18401877
    1841   static char *libpatterns = NULL;
    1842 
    1843   const char *libname = lib+2;  /* Name without the '-l'.  */
     1878  const char *file = 0;
     1879  char *libpatterns;
    18441880  FILE_TIMESTAMP mtime;
    18451881
     
    18481884  const char *p2;
    18491885  unsigned int len;
     1886  unsigned int liblen;
     1887
     1888  /* Information about the earliest (in the vpath sequence) match.  */
     1889  unsigned int best_vpath = 0, best_path = 0; /* bird: gcc maybe used uninitialized (both) */
     1890  unsigned int std_dirs = 0;
    18501891
    18511892  char **dp;
    18521893
    1853   /* If we don't have libpatterns, get it.  */
    1854   if (!libpatterns)
    1855     {
    1856       int save = warn_undefined_variables_flag;
    1857       warn_undefined_variables_flag = 0;
    1858 
    1859       libpatterns = xstrdup (variable_expand ("$(strip $(.LIBPATTERNS))"));
    1860 
    1861       warn_undefined_variables_flag = save;
    1862     }
    1863 
    1864   /* Loop through all the patterns in .LIBPATTERNS, and search on each one.  */
     1894  libpatterns = xstrdup (variable_expand ("$(.LIBPATTERNS)"));
     1895
     1896  /* Skip the '-l'.  */
     1897  lib += 2;
     1898  liblen = strlen (lib);
     1899
     1900  /* Loop through all the patterns in .LIBPATTERNS, and search on each one.
     1901     To implement the linker-compatible behavior we have to search through
     1902     all entries in .LIBPATTERNS and choose the "earliest" one.  */
    18651903  p2 = libpatterns;
    18661904  while ((p = find_next_token (&p2, &len)) != 0)
     
    18721910      const size_t libbuf_offset = libbuf - variable_buffer; /* bird */
    18731911
    1874       /* Expand the pattern using LIBNAME as a replacement.  */
     1912      /* Expand the pattern using LIB as a replacement.  */
    18751913      {
    18761914        char c = p[len];
     
    18811919        if (!p3)
    18821920          {
    1883             /* Give a warning if there is no pattern, then remove the
    1884                pattern so it's ignored next time.  */
     1921            /* Give a warning if there is no pattern.  */
    18851922            error (NILF, _(".LIBPATTERNS element `%s' is not a pattern"), p);
    1886             for (; len; --len, ++p)
    1887               *p = ' ';
    1888             *p = c;
     1923            p[len] = c;
    18891924            continue;
    18901925          }
    18911926        p4 = variable_buffer_output (libbuf, p, p3-p);
    1892         p4 = variable_buffer_output (p4, libname, strlen (libname));
     1927        p4 = variable_buffer_output (p4, lib, liblen);
    18931928        p4 = variable_buffer_output (p4, p3+1, len - (p3-p));
    18941929        p[len] = c;
     
    19021937          if (mtime_ptr != 0)
    19031938            *mtime_ptr = mtime;
    1904           return strcache_add (libbuf);
     1939          file = strcache_add (libbuf);
     1940          /* This by definition will have the best index, so stop now.  */
     1941          break;
    19051942        }
    19061943
     
    19081945
    19091946      {
    1910         const char *file = vpath_search (libbuf, mtime_ptr);
    1911         if (file)
    1912           return file;
     1947        unsigned int vpath_index, path_index;
     1948        const char* f = vpath_search (libbuf, mtime_ptr ? &mtime : NULL,
     1949                                      &vpath_index, &path_index);
     1950        if (f)
     1951          {
     1952            /* If we have a better match, record it.  */
     1953            if (file == 0 ||
     1954                vpath_index < best_vpath ||
     1955                (vpath_index == best_vpath && path_index < best_path))
     1956              {
     1957                file = f;
     1958                best_vpath = vpath_index;
     1959                best_path = path_index;
     1960
     1961                if (mtime_ptr != 0)
     1962                  *mtime_ptr = mtime;
     1963              }
     1964          }
    19131965      }
    19141966
     
    19161968
    19171969      if (!buflen)
    1918         {
    1919           for (dp = dirs; *dp != 0; ++dp)
    1920             {
    1921               int l = strlen (*dp);
    1922               if (l > libdir_maxlen)
    1923                 libdir_maxlen = l;
    1924             }
    1925           buflen = strlen (libbuf);
    1926           buf = xmalloc(libdir_maxlen + buflen + 2);
    1927         }
     1970        {
     1971          for (dp = dirs; *dp != 0; ++dp)
     1972            {
     1973              int l = strlen (*dp);
     1974              if (l > libdir_maxlen)
     1975                libdir_maxlen = l;
     1976              std_dirs++;
     1977            }
     1978          buflen = strlen (libbuf);
     1979          buf = xmalloc(libdir_maxlen + buflen + 2);
     1980        }
    19281981      else if (buflen < strlen (libbuf))
    1929         {
    1930           buflen = strlen (libbuf);
    1931           buf = xrealloc (buf, libdir_maxlen + buflen + 2);
    1932         }
    1933 
    1934       for (dp = dirs; *dp != 0; ++dp)
    1935         {
    1936           sprintf (buf, "%s/%s", *dp, libbuf);
    1937           mtime = name_mtime (buf);
    1938           if (mtime != NONEXISTENT_MTIME)
    1939             {
    1940               if (mtime_ptr != 0)
    1941                 *mtime_ptr = mtime;
    1942               return strcache_add (buf);
    1943             }
    1944         }
    1945     }
    1946 
    1947   return 0;
     1982        {
     1983          buflen = strlen (libbuf);
     1984          buf = xrealloc (buf, libdir_maxlen + buflen + 2);
     1985        }
     1986
     1987      {
     1988        /* Use the last std_dirs index for standard directories. This
     1989           was it will always be greater than the VPATH index.  */
     1990        unsigned int vpath_index = ~((unsigned int)0) - std_dirs;
     1991
     1992        for (dp = dirs; *dp != 0; ++dp)
     1993          {
     1994            sprintf (buf, "%s/%s", *dp, libbuf);
     1995            mtime = name_mtime (buf);
     1996            if (mtime != NONEXISTENT_MTIME)
     1997              {
     1998                if (file == 0 || vpath_index < best_vpath)
     1999                  {
     2000                    file = strcache_add (buf);
     2001                    best_vpath = vpath_index;
     2002
     2003                    if (mtime_ptr != 0)
     2004                      *mtime_ptr = mtime;
     2005                  }
     2006              }
     2007
     2008            vpath_index++;
     2009          }
     2010      }
     2011
     2012    }
     2013
     2014  free (libpatterns);
     2015  return file;
    19482016}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette