paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/src/physfs/platform os2.c,1.1.2.1,1.1.2.2 pos


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/physfs/platform os2.c,1.1.2.1,1.1.2.2 posix.c,1.1.2.5,1.1.2.6 unix.c,1.1.1.1.6.7,1.1.1.1.6.8 win32.c,1.1.1.1.6.14,1.1.1.1.6.15 unix_nocdrom.c,1.1.2.1,NONE
Date: Fri, 01 Nov 2002 05:43:40 -0500

Update of /cvsroot/paragui/paragui/src/physfs/platform
In directory subversions:/tmp/cvs-serv8719/src/physfs/platform

Modified Files:
      Tag: devel-1-0
        os2.c posix.c unix.c win32.c 
Removed Files:
      Tag: devel-1-0
        unix_nocdrom.c 
Log Message:
- Borland C++ Builder 6 fixes. Thanks Martin Bickel <address@hidden>
- updated physfs



Index: os2.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/platform/os2.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** os2.c       30 Jul 2002 20:50:27 -0000      1.1.2.1
--- os2.c       1 Nov 2002 10:43:36 -0000       1.1.2.2
***************
*** 271,275 ****
      BAIL_IF_MACRO(os2err(rc) != NO_ERROR, NULL, retval);
  
-     /* !!! FIXME: the a, b, and c drives are almost certainly NOT cdroms... */
      for (i = 0, bit = 1; i < 26; i++, bit <<= 1)
      {
--- 271,274 ----

Index: posix.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/platform/posix.c,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -r1.1.2.5 -r1.1.2.6
*** posix.c     30 Jul 2002 20:50:27 -0000      1.1.2.5
--- posix.c     1 Nov 2002 10:43:36 -0000       1.1.2.6
***************
*** 145,152 ****
  
  
  int __PHYSFS_platformExists(const char *fname)
  {
      struct stat statbuf;
!     return(stat(fname, &statbuf) == 0);
  } /* __PHYSFS_platformExists */
  
--- 145,159 ----
  
  
+ #if (defined __PHYSFS_NO_SYMLINKS__)
+ #define doStat stat
+ #else
+ #define doStat lstat
+ #endif
+ 
  int __PHYSFS_platformExists(const char *fname)
  {
      struct stat statbuf;
!     BAIL_IF_MACRO(doStat(fname, &statbuf) == -1, strerror(errno), 0);
!     return(1);
  } /* __PHYSFS_platformExists */
  
***************
*** 157,172 ****
      return(0);
  #else
- 
      struct stat statbuf;
!     int retval = 0;
! 
!     if (lstat(fname, &statbuf) == 0)
!     {
!         if (S_ISLNK(statbuf.st_mode))
!             retval = 1;
!     } /* if */
!     
!     return(retval);
! 
  #endif
  } /* __PHYSFS_platformIsSymlink */
--- 164,170 ----
      return(0);
  #else
      struct stat statbuf;
!     BAIL_IF_MACRO(lstat(fname, &statbuf) == -1, strerror(errno), 0);
!     return( (S_ISLNK(statbuf.st_mode)) ? 1 : 0 );
  #endif
  } /* __PHYSFS_platformIsSymlink */
***************
*** 176,188 ****
  {
      struct stat statbuf;
!     int retval = 0;
! 
!     if (stat(fname, &statbuf) == 0)
!     {
!         if (S_ISDIR(statbuf.st_mode))
!             retval = 1;
!     } /* if */
!     
!     return(retval);
  } /* __PHYSFS_platformIsDirectory */
  
--- 174,179 ----
  {
      struct stat statbuf;
!     BAIL_IF_MACRO(stat(fname, &statbuf) == -1, strerror(errno), 0);
!     return( (S_ISDIR(statbuf.st_mode)) ? 1 : 0 );
  } /* __PHYSFS_platformIsDirectory */
  

Index: unix.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/platform/unix.c,v
retrieving revision 1.1.1.1.6.7
retrieving revision 1.1.1.1.6.8
diff -C2 -r1.1.1.1.6.7 -r1.1.1.1.6.8
*** unix.c      30 Jul 2002 20:50:27 -0000      1.1.1.1.6.7
--- unix.c      1 Nov 2002 10:43:36 -0000       1.1.1.1.6.8
***************
*** 291,295 ****
  #else
  
! #define PHTREAD_TO_UI64(thr) ((PHYSFS_uint64) (thr))
  
  PHYSFS_uint64 __PHYSFS_platformGetThreadID(void)
--- 291,308 ----
  #else
  
! /* Just in case; this is a panic value. */
! #if ((!defined SIZEOF_INT) || (SIZEOF_INT <= 0))
! #  define SIZEOF_INT 4
! #endif
! 
! #if (SIZEOF_INT == 4)
! #  define PHTREAD_TO_UI64(thr) ( (PHYSFS_uint64) ((PHYSFS_uint32) (thr)) )
! #elif (SIZEOF_INT == 2)
! #  define PHTREAD_TO_UI64(thr) ( (PHYSFS_uint64) ((PHYSFS_uint16) (thr)) )
! #elif (SIZEOF_INT == 1)
! #  define PHTREAD_TO_UI64(thr) ( (PHYSFS_uint64) ((PHYSFS_uint8) (thr)) )
! #else
! #  define PHTREAD_TO_UI64(thr) ((PHYSFS_uint64) (thr))
! #endif
  
  PHYSFS_uint64 __PHYSFS_platformGetThreadID(void)

Index: win32.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/platform/win32.c,v
retrieving revision 1.1.1.1.6.14
retrieving revision 1.1.1.1.6.15
diff -C2 -r1.1.1.1.6.14 -r1.1.1.1.6.15
*** win32.c     30 Jul 2002 20:50:27 -0000      1.1.1.1.6.14
--- win32.c     1 Nov 2002 10:43:36 -0000       1.1.1.1.6.15
***************
*** 126,130 ****
              /* make sure the string was not truncated. */
          if (__PHYSFS_platformStricmp(&retval[buflen - 4], ".exe") != 0)
!             __PHYSFS_setError(ERR_GOTMODFN_TRUNC);
          else
          {
--- 126,130 ----
              /* make sure the string was not truncated. */
          if (__PHYSFS_platformStricmp(&retval[buflen - 4], ".exe") != 0)
!             __PHYSFS_setError(ERR_GETMODFN_TRUNC);
          else
          {
***************
*** 370,374 ****
  int __PHYSFS_platformExists(const char *fname)
  {
!     return(GetFileAttributes(fname) != INVALID_FILE_ATTRIBUTES);
  } /* __PHYSFS_platformExists */
  
--- 370,376 ----
  int __PHYSFS_platformExists(const char *fname)
  {
!     BAIL_IF_MACRO(GetFileAttributes(fname) == INVALID_FILE_ATTRIBUTES,
!                   win32strerror(), 0);
!     return(1);
  } /* __PHYSFS_platformExists */
  
***************
*** 648,652 ****
  static int loadLibraries(void)
  {
!     /* !!! FIXME: Make this table driven? */
      int allNeededLibrariesLoaded = 1;  /* flip to zero as needed. */
  
--- 650,655 ----
  static int loadLibraries(void)
  {
!     /* If this get unwieldy, make it table driven. */
! 
      int allNeededLibrariesLoaded = 1;  /* flip to zero as needed. */
  

--- unix_nocdrom.c DELETED ---





reply via email to

[Prev in Thread] Current Thread [Next in Thread]