20 #ifndef __GPHOTO2_PORT_PORTABILITY_H__    21 #define __GPHOTO2_PORT_PORTABILITY_H__    23 #ifdef _GPHOTO2_INTERNAL_CODE    25 #if defined(WIN32) && !defined(__WINESRC__)    34 # include <sys/types.h>    35 # include <sys/stat.h>    44 # define strcasecmp             _stricmp    46 #  define snprintf              _snprintf    49 #define __func__ __FUNCTION__    51 typedef SSIZE_T ssize_t;
    57         WIN32_FIND_DATA search;
    66 # define gp_system_dir            GPPORTWINDIR *    67 # define gp_system_dirent         WIN32_FIND_DATA *    68 # define gp_system_dir_delim      '\\'    70 # define sleep(x) usleep((x) * 1000 * 1000)    78 #elif defined(__SOME_OS2_MAGIC_HERE__)    84 # define strcasecmp(foo,bar) stricmp(foo,bar)    85 # define gp_system_dir_delim            '\\'    87 # ifndef GPIO_OS2_INCLUDED    88 #  define GPIO_OS2_INCLUDED    89 #  define IOLIBS getenv("IOLIBS")    91 #  define RTLD_LAZY       0x001    94 #  ifndef HAVE_TERMIOS_H    95 #   define  INCL_DOSDEVIOCTL       96 #   define IOCTL_ASYNC                        0x0001    97 #   define ASYNC_SETBAUDRATE                  0x0041    99 #   define CBAUD   0x0000100f   100 #   define  B0     0x00000000         101 #   define  B50    0x00000001   102 #   define  B75    0x00000002   103 #   define  B110   0x00000003   104 #   define  B134   0x00000004   105 #   define  B150   0x00000005   106 #   define  B200   0x00000006   107 #   define  B300   0x00000007   108 #   define  B600   0x00000008   109 #   define  B1200  0x00000009   110 #   define  B1800  0x0000000a   111 #   define  B2400  0x0000000b   112 #   define  B4800  0x0000000c   113 #   define  B9600  0x0000000d   114 #   define  B19200 0x0000000e   115 #   define  B38400 0x0000000f   118 #   define  CSIZE  0x00000030   119 #   define   CS5   0x00000000   120 #   define   CS6   0x00000010   121 #   define   CS7   0x00000020   122 #   define   CS8   0x00000030   123 #   define CSTOPB  0x00000040   124 #   define CREAD   0x00000080   125 #   define PARENB  0x00000100   126 #   define PARODD  0x00000200   127 #   define HUPCL   0x00000400   128 #   define CLOCAL  0x00000800   129 #   define CBAUDEX 0x00001000   130 #   define  B57600  0x00001001   131 #   define  B115200 0x00001002   132 #   define  B230400 0x00001003   133 #   define  B460800 0x00001004   134 #   define  B76800  0x00001005   135 #   define  B153600 0x00001006   136 #   define  B307200 0x00001007   137 #   define  B614400 0x00001008   138 #   define  B921600 0x00001009   139 #   define  B500000 0x0000100a   140 #   define  B576000 0x0000100b   141 #   define B1000000 0x0000100c   142 #   define B1152000 0x0000100d   143 #   define B1500000 0x0000100e   144 #   define B2000000 0x0000100f   148 #  define CIBAUD  0x100f0000         149 #  define CMSPAR  0x40000000         153 #  define TIOCM_LE        0x001   154 #  define TIOCM_DTR       0x002   155 #  define TIOCM_RTS       0x004   156 #  define TIOCM_ST        0x008   157 #  define TIOCM_SR        0x010   158 #  define TIOCM_CTS       0x020   159 #  define TIOCM_CAR       0x040   160 #  define TIOCM_RNG       0x080   161 #  define TIOCM_DSR       0x100   162 #  define TIOCM_CD        TIOCM_CAR   163 #  define TIOCM_RI        TIOCM_RNG   165 #  define TIOCMBIC        0x06C   166 #  define TIOCMBIS        0x06B   167 #  define TIOCMGET        0x06E   184 #ifndef _XOPEN_SOURCE   185 # define _XOPEN_SOURCE 500   187 # if ((_XOPEN_SOURCE - 0) < 500)   188 #  undef _XOPEN_SOURCE   189 #  define _XOPEN_SOURCE 500   194 # ifndef _POSIX_C_SOURCE   195 #  define _POSIX_C_SOURCE 199309   199 # include <strings.h>   200 # include <sys/types.h>   202 #ifdef HAVE_SYS_PARAM_H   203 # include <sys/param.h>   205 # include <sys/stat.h>   211 # define gp_system_dir           DIR *   213 # define gp_system_dirent        struct dirent *   215 # define gp_system_dir_delim     '/' int gp_system_is_file(const char *filename)
check if passed filename is a file 
Definition: gphoto2-port-portability.c:263
int gp_system_mkdir(const char *dirname)
mkdir UNIX functionality 
Definition: gphoto2-port-portability.c:180
int gp_system_is_dir(const char *dirname)
check if passed filename is a directory 
Definition: gphoto2-port-portability.c:280
gp_system_dir gp_system_opendir(const char *dirname)
opendir UNIX functionality 
Definition: gphoto2-port-portability.c:211
int gp_system_closedir(gp_system_dir dir)
closedir UNIX functionality 
Definition: gphoto2-port-portability.c:249
int gp_system_rmdir(const char *dirname)
rmdir UNIX functionality 
Definition: gphoto2-port-portability.c:194
const char * gp_system_filename(gp_system_dirent de)
retrieve UNIX filename out of a directory entry 
Definition: gphoto2-port-portability.c:237
gp_system_dirent gp_system_readdir(gp_system_dir d)
readdir UNIX functionality 
Definition: gphoto2-port-portability.c:225