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.2.2.1,1.2.2.2 pos


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/physfs/platform os2.c,1.2.2.1,1.2.2.2 posix.c,1.3.2.1,1.3.2.2 unix.c,1.2.2.1,1.2.2.2 win32.c,1.2.2.1,1.2.2.2 beos.c,1.1.1.1,NONE darwin.c,1.1.1.1,NONE freebsd.c,1.1.1.1,NONE irix.c,1.1.1.1,NONE solaris.c,1.1.1.1,NONE unix_nocdrom.c,1.2.2.1,NONE
Date: Wed, 30 Oct 2002 15:15:21 -0500

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

Modified Files:
      Tag: devel-opengl
        os2.c posix.c unix.c win32.c 
Removed Files:
      Tag: devel-opengl
        beos.c darwin.c freebsd.c irix.c solaris.c unix_nocdrom.c 
Log Message:
- GCC 3.2 compilation fixes
- updated physfs



Index: os2.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/platform/os2.c,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -r1.2.2.1 -r1.2.2.2
*** os2.c       31 Aug 2002 04:01:25 -0000      1.2.2.1
--- os2.c       30 Oct 2002 20:15:18 -0000      1.2.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.3.2.1
retrieving revision 1.3.2.2
diff -C2 -r1.3.2.1 -r1.3.2.2
*** posix.c     31 Aug 2002 04:01:25 -0000      1.3.2.1
--- posix.c     30 Oct 2002 20:15:18 -0000      1.3.2.2
***************
*** 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.2.2.1
retrieving revision 1.2.2.2
diff -C2 -r1.2.2.1 -r1.2.2.2
*** unix.c      31 Aug 2002 04:01:25 -0000      1.2.2.1
--- unix.c      30 Oct 2002 20:15:18 -0000      1.2.2.2
***************
*** 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.2.2.1
retrieving revision 1.2.2.2
diff -C2 -r1.2.2.1 -r1.2.2.2
*** win32.c     31 Aug 2002 04:01:25 -0000      1.2.2.1
--- win32.c     30 Oct 2002 20:15:18 -0000      1.2.2.2
***************
*** 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. */
  

--- beos.c DELETED ---

--- darwin.c DELETED ---

--- freebsd.c DELETED ---

--- irix.c DELETED ---

--- solaris.c DELETED ---

--- unix_nocdrom.c DELETED ---





reply via email to

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