diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 11157ee757..6fd0e4c02b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2012-05-18 16:49 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * harbour/include/hbcom.ch + * harbour/src/rtl/hbcom.c + + added two new errors: HB_COM_ERR_ACCESS, HB_COM_ERR_NOCOM + 2012-05-17 14:07 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/hbmk2_qt.hb ! Fix to last fix. diff --git a/harbour/include/hbcom.ch b/harbour/include/hbcom.ch index d3318968bb..9e7455a3ff 100644 --- a/harbour/include/hbcom.ch +++ b/harbour/include/hbcom.ch @@ -127,5 +127,7 @@ #define HB_COM_ERR_ALREADYOPEN 8 #define HB_COM_ERR_IO 9 #define HB_COM_ERR_PIPE 10 +#define HB_COM_ERR_ACCESS 11 +#define HB_COM_ERR_NOCOM 12 #endif /* HB_COM_CH_ */ diff --git a/harbour/src/rtl/hbcom.c b/harbour/src/rtl/hbcom.c index 52b1b95105..c2a72310ba 100644 --- a/harbour/src/rtl/hbcom.c +++ b/harbour/src/rtl/hbcom.c @@ -322,6 +322,12 @@ static void hb_comSetOsError( PHB_COM pCom, HB_BOOL fError ) case EAGAIN: pCom->error = HB_COM_ERR_TIMEOUT; break; + case EACCES: + pCom->error = HB_COM_ERR_ACCESS; + break; + case ENOTTY: + pCom->error = HB_COM_ERR_NOCOM; + break; default: pCom->error = HB_COM_ERR_OTHER; break;