platform/posix.c
changeset 644 1cb5533d369c
parent 596 381b6ca0dd85
child 648 5c993684b8f2
equal deleted inserted replaced
643:95824caf2dbf 644:1cb5533d369c
   498     struct stat statbuf;
   498     struct stat statbuf;
   499     BAIL_IF_MACRO(stat(fname, &statbuf) < 0, strerror(errno), -1);
   499     BAIL_IF_MACRO(stat(fname, &statbuf) < 0, strerror(errno), -1);
   500     return statbuf.st_mtime;
   500     return statbuf.st_mtime;
   501 } /* __PHYSFS_platformGetLastModTime */
   501 } /* __PHYSFS_platformGetLastModTime */
   502 
   502 
       
   503 
       
   504 PHYSFS_memhandle __PHYSFS_platformMalloc(size_t s)
       
   505 {
       
   506     assert(sizeof (h) == sizeof (void *));
       
   507     return((PHYSFS_memhandle) malloc(s));
       
   508 } /* __PHYSFS_platformMalloc */
       
   509 
       
   510 
       
   511 PHYSFS_memhandle __PHYSFS_platformRealloc(PHYSFS_memhandle h, size_t s)
       
   512 {
       
   513     return((PHYSFS_memhandle) realloc((void *) h, s));
       
   514 } /* __PHYSFS_platformRealloc */
       
   515 
       
   516 
       
   517 void __PHYSFS_platformFree(PHYSFS_memhandle h)
       
   518 {
       
   519     free((void *) h);
       
   520 } /* __PHYSFS_platformFree */
       
   521 
       
   522 
       
   523 void *__PHYSFS_platformLock(PHYSFS_memhandle h)
       
   524 {
       
   525     return((void *) h);
       
   526 } /* __PHYSFS_platformLock */
       
   527 
       
   528 
       
   529 void __PHYSFS_platformUnlock(PHYSFS_memhandle h)
       
   530 {
       
   531     /* no-op. */
       
   532 } /* __PHYSFS_platformUnlock */
       
   533 
   503 #endif /* !defined WIN32 */
   534 #endif /* !defined WIN32 */
   504 
   535 
   505 /* end of posix.c ... */
   536 /* end of posix.c ... */
   506 
   537