Ignore:
Timestamp:
Jul 31, 2003, 4:45:07 PM (22 years ago)
Author:
bird
Message:

#483: Temporary commit (Again.).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/emxomf/emxomfld.c

    • Property cvs2svn:cvs-rev changed from 1.12 to 1.13
    r487 r488  
    468468   */
    469469
    470 static FILE * find_objlib(char *pszfullname, const char *pszname,
    471                           const char * const *papszexts, int flibhacks)
     470static FILE * find_objlib2(char *pszfullname, const char *pszname, const char * const *papszexts, int flibhacks)
    472471{
    473472  const char *  psz;
     
    544543            phFile = fopen (pszfullname, "rb");
    545544
     545          if (!flibhacks && phFile)
     546            return phFile;
     547
    546548          if (phFile)
    547549            {
     
    556558              } libhdr;
    557559              #pragma pack()
    558               if (!flibhacks)
    559                 return phFile;
    560560              /* For .a libraries we will chech for a valid OMF library header. */
    561561              if (memicmp(pszfullname + strlen(pszfullname) - 2, ".a", 3))
    562562                  return phFile;
    563               if (  fread(&libhdr, 1, sizeof(libhdr), phFile) == sizeof(libhdr)
     563              if (   fread(&libhdr, 1, sizeof(libhdr), phFile) == sizeof(libhdr)
    564564                  && libhdr.rec_type == LIBHDR
    565565                  && libhdr.flags <= 1 /* ASSUME only first bit is used... */
     566                  && !fseek(phFile, 0, SEEK_SET)
    566567                  )
    567568                {
     
    581582
    582583
     584/* Wrapper around find_objlib which fixes the slashes - this looks better imho. */
     585
     586static FILE * find_objlib(char *pszfullname, const char *pszname, const char * const *papszexts, int flibhacks)
     587{
     588    FILE * phFile = find_objlib2(pszfullname, pszname, papszexts, flibhacks);
     589    while ((pszfullname = strchr(pszfullname, '/')) != NULL)
     590        *pszfullname++ = '\\';
     591    return phFile;
     592}
     593
     594
     595
    583596/* Weak prelinking for Method 2 Weak support. */
    584597
     
    588601  PWLD    pwld;
    589602
    590   pwld = wld_create (0);
     603  pwld = wld_create (WLDC_VERBOSE);
    591604  if (pwld)
    592605    {
Note: See TracChangeset for help on using the changeset viewer.