platform/unix.c
changeset 347 56ce50a62241
parent 330 5ca5066cf5ff
child 351 bc4fa7896225
equal deleted inserted replaced
346:504cd139c52a 347:56ce50a62241
    11 #endif
    11 #endif
    12 
    12 
    13 /* BeOS uses beos.cpp and posix.c ... Cygwin and such use win32.c ... */
    13 /* BeOS uses beos.cpp and posix.c ... Cygwin and such use win32.c ... */
    14 #if ((!defined __BEOS__) && (!defined WIN32))
    14 #if ((!defined __BEOS__) && (!defined WIN32))
    15 
    15 
       
    16 #ifdef __FreeBSD__
       
    17 #  if (!defined __BSD__)
       
    18 #    define __BSD__
       
    19 #  endif
       
    20 #endif
       
    21 
    16 #if ((defined __APPLE__) && (defined __MACH__))
    22 #if ((defined __APPLE__) && (defined __MACH__))
    17 #  if (!defined __DARWIN__)
    23 #  if (!defined __BSD__)
    18 #    define __DARWIN__
    24 #    define __BSD__
    19 #  endif
    25 #  endif
    20 #endif
    26 #endif
    21 
    27 
    22 #include <stdio.h>
    28 #include <stdio.h>
    23 #include <stdlib.h>
    29 #include <stdlib.h>
    31 #include <sys/param.h>
    37 #include <sys/param.h>
    32 #include <dirent.h>
    38 #include <dirent.h>
    33 #include <time.h>
    39 #include <time.h>
    34 #include <errno.h>
    40 #include <errno.h>
    35 
    41 
    36 #if (!defined __DARWIN__)
    42 #if (defined __BSD__)
       
    43 #include <sys/ucred.h>
       
    44 #else
    37 #include <mntent.h>
    45 #include <mntent.h>
    38 #else
       
    39 #include <sys/ucred.h>
       
    40 #endif
    46 #endif
    41 
    47 
    42 #include <sys/mount.h>
    48 #include <sys/mount.h>
    43 
    49 
    44 
    50 
    60     return(1);  /* always succeed. */
    66     return(1);  /* always succeed. */
    61 } /* __PHYSFS_platformDeinit */
    67 } /* __PHYSFS_platformDeinit */
    62 
    68 
    63 
    69 
    64 
    70 
    65 #if (defined __DARWIN__)
    71 #if (defined __BSD__)
    66 
    72 
    67 char **__PHYSFS_platformDetectAvailableCDs(void)
    73 char **__PHYSFS_platformDetectAvailableCDs(void)
    68 {
    74 {
    69     char **retval = (char **) malloc(sizeof (char *));
    75     char **retval = (char **) malloc(sizeof (char *));
    70     int cd_count = 1;  /* We count the NULL entry. */
    76     int cd_count = 1;  /* We count the NULL entry. */