added OS/2 code into time.c
started writing OS/2 code into pio.c fixed minor issues in fio.c
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: fio.h 396 2011-03-14 15:40:35Z hyunghwan.chung $
|
||||
* $Id: fio.h 402 2011-03-18 15:07:21Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
@ -115,6 +115,7 @@ struct qse_fio_t
|
||||
QSE_DEFINE_COMMON_FIELDS (fio)
|
||||
int errnum;
|
||||
qse_fio_hnd_t handle;
|
||||
int flags; /* extra flags */
|
||||
qse_tio_t* tio;
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: pio.h 287 2009-09-15 10:01:02Z hyunghwan.chung $
|
||||
* $Id: pio.h 402 2011-03-18 15:07:21Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
@ -120,12 +120,20 @@ enum qse_pio_errnum_t
|
||||
};
|
||||
typedef enum qse_pio_errnum_t qse_pio_errnum_t;
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32)
|
||||
/* <winnt.h> => typedef PVOID HANDLE; */
|
||||
typedef void* qse_pio_hnd_t; /**< defines a pipe handle type */
|
||||
typedef void* qse_pio_pid_t; /**< defines a process handle type */
|
||||
# define QSE_PIO_HND_NIL ((qse_pio_hnd_t)QSE_NULL)
|
||||
# define QSE_PIO_PID_NIL ((qse_pio_pid_t)QSE_NULL)
|
||||
#elif defined(__OS2__)
|
||||
/* <os2def.h> => typedef LHANDLE HFILE;
|
||||
typedef LHANDLE PID;
|
||||
typedef unsigned long LHANDLE; */
|
||||
typedef unsigned long qse_pio_hnd_t;
|
||||
typedef unsigned long qse_pio_pid_t;
|
||||
# define QSE_PIO_HND_NIL ((qse_pio_hnd_t)-1)
|
||||
# define QSE_PIO_PID_NIL ((qse_pio_pid_t)-1)
|
||||
#else
|
||||
typedef int qse_pio_hnd_t; /**< defines a pipe handle type */
|
||||
typedef int qse_pio_pid_t; /**< defines a process handle type */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: time.h 356 2010-09-07 12:29:25Z hyunghwan.chung $
|
||||
* $Id: time.h 402 2011-03-18 15:07:21Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
@ -128,7 +128,7 @@ int qse_timegm (
|
||||
* The qse_timelocal() converts broken-down time to numeric time. It is the
|
||||
* inverse of qse_localtime();
|
||||
*/
|
||||
int qse_timelcoal (
|
||||
int qse_timelocal (
|
||||
const qse_btime_t* bt,
|
||||
qse_ntime_t* nt
|
||||
);
|
||||
|
@ -18,39 +18,41 @@
|
||||
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* OS/2 for other platforms than x86?
|
||||
* If so, the endian should be defined selectively
|
||||
*/
|
||||
#define QSE_ENDIAN_LITTLE
|
||||
|
||||
#define QSE_SIZEOF_CHAR 1
|
||||
#define QSE_SIZEOF_SHORT 2
|
||||
#define QSE_SIZEOF_INT 4
|
||||
|
||||
#define QSE_SIZEOF_LONG 4
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# define QSE_SIZEOF_LONG_LONG 8
|
||||
# define QSE_SIZEOF___INT8 0
|
||||
# define QSE_SIZEOF___INT16 0
|
||||
# define QSE_SIZEOF___INT32 0
|
||||
# define QSE_SIZEOF___INT64 0
|
||||
# define QSE_SIZEOF___INT128 0
|
||||
#if defined(__WATCOMC__)
|
||||
# define QSE_SIZEOF_CHAR 1
|
||||
# define QSE_SIZEOF_SHORT 2
|
||||
# define QSE_SIZEOF_INT 4
|
||||
# define QSE_SIZEOF_LONG 4
|
||||
# define QSE_SIZEOF_LONG_LONG 8
|
||||
#
|
||||
# define QSE_SIZEOF_VOID_P 4
|
||||
# define QSE_SIZEOF_FLOAT 4
|
||||
# define QSE_SIZEOF_DOUBLE 8
|
||||
# define QSE_SIZEOF_LONG_DOUBLE 8
|
||||
# define QSE_SIZEOF_WCHAR_T 2
|
||||
#
|
||||
# define QSE_SIZEOF___INT8 1
|
||||
# define QSE_SIZEOF___INT16 2
|
||||
# define QSE_SIZEOF___INT32 4
|
||||
# define QSE_SIZEOF___INT64 8
|
||||
# define QSE_SIZEOF___INT128 0
|
||||
#else
|
||||
# if defined(__WATCOMC__)
|
||||
# define QSE_SIZEOF_LONG_LONG 8
|
||||
# else
|
||||
# define QSE_SIZEOF_LONG_LONG 0
|
||||
# endif
|
||||
# define QSE_SIZEOF___INT8 1
|
||||
# define QSE_SIZEOF___INT16 2
|
||||
# define QSE_SIZEOF___INT32 4
|
||||
# define QSE_SIZEOF___INT64 8
|
||||
# define QSE_SIZEOF___INT128 0
|
||||
# error Define the size of various data types.
|
||||
#endif
|
||||
|
||||
#define QSE_SIZEOF_VOID_P 4
|
||||
#define QSE_SIZEOF_FLOAT 4
|
||||
#define QSE_SIZEOF_DOUBLE 8
|
||||
#define QSE_SIZEOF_LONG_DOUBLE 16
|
||||
#define QSE_SIZEOF_WCHAR_T 2
|
||||
|
||||
#define QSE_SIZEOF_OFF64_T 0
|
||||
#define QSE_SIZEOF_OFF_T 8
|
||||
#define QSE_SIZEOF_OFF_T 8
|
||||
|
||||
/*
|
||||
* OS/2 does not have wchar_t(Unicode) friendly APIs unlike Windows.
|
||||
* You must define which character type to use as a default character here.
|
||||
*
|
||||
* #define QSE_CHAR_IS_WCHAR
|
||||
* #define QSE_CHAR_IS_MCHAR
|
||||
*/
|
||||
#define QSE_CHAR_IS_WCHAR
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: types.h 396 2011-03-14 15:40:35Z hyunghwan.chung $
|
||||
* $Id: types.h 402 2011-03-18 15:07:21Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
@ -34,10 +34,10 @@
|
||||
# include <qse/config.h>
|
||||
#elif defined(_WIN32)
|
||||
# include <qse/conf_msw.h>
|
||||
#elif defined(__OS2__)
|
||||
# include <qse/conf_os2.h>
|
||||
#elif defined(vms) || defined(__vms)
|
||||
# include <qse/conf_vms.h>
|
||||
#elif defined(OS2) || defined(__OS2__)
|
||||
# include <qse/conf_os2.h>
|
||||
#else
|
||||
# error unsupported operating system
|
||||
#endif
|
||||
@ -383,10 +383,10 @@ typedef int qse_mcint_t;
|
||||
typedef int qse_wchar_t;
|
||||
typedef int qse_wcint_t;
|
||||
# else
|
||||
# error no supported data type for wchar_t
|
||||
# error No supported data type for wchar_t
|
||||
# endif
|
||||
#else
|
||||
# error unsupported size of wchar_t
|
||||
# error Unsupported size of wchar_t
|
||||
#endif
|
||||
|
||||
/** @typedef qse_char_t
|
||||
@ -396,33 +396,32 @@ typedef int qse_mcint_t;
|
||||
* The qse_cint_t typep defines a type that can hold a qse_char_t value and
|
||||
* #QSE_CHAR_EOF.
|
||||
*/
|
||||
#if defined(_WIN32) && (defined(UNICODE)||defined(_UNICODE))
|
||||
# define QSE_CHAR_IS_WCHAR
|
||||
#if defined(QSE_CHAR_IS_WCHAR)
|
||||
typedef qse_wchar_t qse_char_t;
|
||||
typedef qse_wcint_t qse_cint_t;
|
||||
#elif defined(__OS2__)
|
||||
# define QSE_CHAR_IS_MCHAR
|
||||
#elif defined(QSE_CHAR_IS_MCHAR)
|
||||
typedef qse_mchar_t qse_char_t;
|
||||
typedef qse_mcint_t qse_cint_t;
|
||||
#else
|
||||
# if defined(QSE_CHAR_IS_MCHAR)
|
||||
typedef qse_mchar_t qse_char_t;
|
||||
typedef qse_mcint_t qse_cint_t;
|
||||
# elif defined(QSE_CHAR_IS_WCHAR)
|
||||
typedef qse_wchar_t qse_char_t;
|
||||
typedef qse_wcint_t qse_cint_t;
|
||||
# elif defined(_MBCS)
|
||||
# define QSE_CHAR_IS_MCHAR
|
||||
typedef qse_mchar_t qse_char_t;
|
||||
typedef qse_mcint_t qse_cint_t;
|
||||
/* If the character type is not determined in the conf_xxx files */
|
||||
|
||||
# if defined(_WIN32)
|
||||
# if defined(UNICODE) || defined(_UNICODE)
|
||||
# define QSE_CHAR_IS_WCHAR
|
||||
typedef qse_wchar_t qse_char_t;
|
||||
typedef qse_wcint_t qse_cint_t;
|
||||
# else
|
||||
# define QSE_CHAR_IS_MCHAR
|
||||
typedef qse_mchar_t qse_char_t;
|
||||
typedef qse_mcint_t qse_cint_t;
|
||||
# endif
|
||||
# else
|
||||
# define QSE_CHAR_IS_WCHAR
|
||||
typedef qse_wchar_t qse_char_t;
|
||||
typedef qse_wcint_t qse_cint_t;
|
||||
# error Cannot determine the character type to use
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(QSE_CHAR_IS_WCHAR) && defined(_WIN32)
|
||||
/* Special definiton to use Unicode APIs on Windows */
|
||||
# ifndef UNICODE
|
||||
# define UNICODE
|
||||
# endif
|
||||
|
Reference in New Issue
Block a user