2014-10-05 16:40 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* src/3rd/tiff/tiff.dif
  * src/3rd/tiff/tiffconf.h
    * do not redefine O_* macros in all *nix builds

  * src/compiler/harbour.yyc
  * src/compiler/harbour.yyh
  * src/macro/macro.yyc
  * src/macro/macro.yyh
    * regenerated with bison 3.0.2.

  * src/rtl/hbcom.c
    ! fixed compilation with OpenWatcom for Linux

  * src/rtl/hbsocket.c
    * pacified warning in OpenWatcom Linux builds

  * src/rtl/hbjson.c
    * own code for conversion integer numbers
This commit is contained in:
Przemysław Czerpak
2014-10-05 16:40:18 +02:00
parent f84a6ff3d4
commit b2b672222e
10 changed files with 3049 additions and 4167 deletions

View File

@@ -10,6 +10,26 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2014-10-05 16:40 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/3rd/tiff/tiff.dif
* src/3rd/tiff/tiffconf.h
* do not redefine O_* macros in all *nix builds
* src/compiler/harbour.yyc
* src/compiler/harbour.yyh
* src/macro/macro.yyc
* src/macro/macro.yyh
* regenerated with bison 3.0.2.
* src/rtl/hbcom.c
! fixed compilation with OpenWatcom for Linux
* src/rtl/hbsocket.c
* pacified warning in OpenWatcom Linux builds
* src/rtl/hbjson.c
* own code for conversion integer numbers
2014-10-05 11:45 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/compiler/harbour.y
* src/macro/macro.y

View File

@@ -687,7 +687,7 @@ diff -urN tiff.orig/tiffconf.h tiff/tiffconf.h
#define PHOTOSHOP_SUPPORT
#define IPTC_SUPPORT
+
+#if ! defined( HB_OS_DARWIN )
+#if ! defined( HB_OS_UNIX )
+#ifndef O_RDONLY
+#define O_RDONLY 0
+#endif

View File

@@ -163,7 +163,7 @@
#define PHOTOSHOP_SUPPORT
#define IPTC_SUPPORT
#if ! defined( HB_OS_DARWIN )
#if ! defined( HB_OS_UNIX )
#ifndef O_RDONLY
#define O_RDONLY 0
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 2.5. */
/* A Bison parser, made by GNU Bison 3.0.2. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,133 +30,139 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
FUNCTION = 258,
PROCEDURE = 259,
IDENTIFIER = 260,
RETURN = 261,
NIL = 262,
NUM_DOUBLE = 263,
INASSIGN = 264,
NUM_LONG = 265,
LOCAL = 266,
STATIC = 267,
IIF = 268,
IF = 269,
ELSE = 270,
ELSEIF = 271,
END = 272,
ENDIF = 273,
LITERAL = 274,
TRUEVALUE = 275,
FALSEVALUE = 276,
ANNOUNCE = 277,
EXTERN = 278,
DYNAMIC = 279,
INIT = 280,
EXIT = 281,
AND = 282,
OR = 283,
NOT = 284,
PUBLIC = 285,
EQ = 286,
NE1 = 287,
NE2 = 288,
INC = 289,
DEC = 290,
ALIASOP = 291,
DOCASE = 292,
CASE = 293,
OTHERWISE = 294,
ENDCASE = 295,
ENDDO = 296,
MEMVAR = 297,
WHILE = 298,
LOOP = 299,
FOR = 300,
NEXT = 301,
TO = 302,
STEP = 303,
LE = 304,
GE = 305,
FIELD = 306,
IN = 307,
PARAMETERS = 308,
PLUSEQ = 309,
MINUSEQ = 310,
MULTEQ = 311,
DIVEQ = 312,
POWER = 313,
EXPEQ = 314,
MODEQ = 315,
PRIVATE = 316,
BEGINSEQ = 317,
BREAK = 318,
RECOVER = 319,
RECOVERUSING = 320,
ALWAYS = 321,
ENDSEQ = 322,
DO = 323,
WITH = 324,
SELF = 325,
LINE = 326,
MACROVAR = 327,
MACROTEXT = 328,
AS_ARRAY = 329,
AS_BLOCK = 330,
AS_CHARACTER = 331,
AS_CLASS = 332,
AS_DATE = 333,
AS_LOGICAL = 334,
AS_NUMERIC = 335,
AS_OBJECT = 336,
AS_VARIANT = 337,
DECLARE = 338,
OPTIONAL = 339,
DECLARE_CLASS = 340,
DECLARE_MEMBER = 341,
AS_ARRAY_ARRAY = 342,
AS_BLOCK_ARRAY = 343,
AS_CHARACTER_ARRAY = 344,
AS_CLASS_ARRAY = 345,
AS_DATE_ARRAY = 346,
AS_LOGICAL_ARRAY = 347,
AS_NUMERIC_ARRAY = 348,
AS_OBJECT_ARRAY = 349,
PROCREQ = 350,
CBSTART = 351,
DOIDENT = 352,
FOREACH = 353,
DESCEND = 354,
DOSWITCH = 355,
ENDSWITCH = 356,
WITHOBJECT = 357,
ENDWITH = 358,
NUM_DATE = 359,
TIMESTAMP = 360,
EPSILON = 361,
HASHOP = 362,
THREAD = 363,
POST = 364,
UNARY = 365,
PRE = 366
};
#ifndef YY_HB_COMP_YY_HARBOURY_H_INCLUDED
# define YY_HB_COMP_YY_HARBOURY_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int hb_comp_yydebug;
#endif
/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
FUNCTION = 258,
PROCEDURE = 259,
IDENTIFIER = 260,
RETURN = 261,
NIL = 262,
NUM_DOUBLE = 263,
INASSIGN = 264,
NUM_LONG = 265,
LOCAL = 266,
STATIC = 267,
IIF = 268,
IF = 269,
ELSE = 270,
ELSEIF = 271,
END = 272,
ENDIF = 273,
LITERAL = 274,
TRUEVALUE = 275,
FALSEVALUE = 276,
ANNOUNCE = 277,
EXTERN = 278,
DYNAMIC = 279,
INIT = 280,
EXIT = 281,
AND = 282,
OR = 283,
NOT = 284,
PUBLIC = 285,
EQ = 286,
NE1 = 287,
NE2 = 288,
INC = 289,
DEC = 290,
ALIASOP = 291,
DOCASE = 292,
CASE = 293,
OTHERWISE = 294,
ENDCASE = 295,
ENDDO = 296,
MEMVAR = 297,
WHILE = 298,
LOOP = 299,
FOR = 300,
NEXT = 301,
TO = 302,
STEP = 303,
LE = 304,
GE = 305,
FIELD = 306,
IN = 307,
PARAMETERS = 308,
PLUSEQ = 309,
MINUSEQ = 310,
MULTEQ = 311,
DIVEQ = 312,
POWER = 313,
EXPEQ = 314,
MODEQ = 315,
PRIVATE = 316,
BEGINSEQ = 317,
BREAK = 318,
RECOVER = 319,
RECOVERUSING = 320,
ALWAYS = 321,
ENDSEQ = 322,
DO = 323,
WITH = 324,
SELF = 325,
LINE = 326,
MACROVAR = 327,
MACROTEXT = 328,
AS_ARRAY = 329,
AS_BLOCK = 330,
AS_CHARACTER = 331,
AS_CLASS = 332,
AS_DATE = 333,
AS_LOGICAL = 334,
AS_NUMERIC = 335,
AS_OBJECT = 336,
AS_VARIANT = 337,
DECLARE = 338,
OPTIONAL = 339,
DECLARE_CLASS = 340,
DECLARE_MEMBER = 341,
AS_ARRAY_ARRAY = 342,
AS_BLOCK_ARRAY = 343,
AS_CHARACTER_ARRAY = 344,
AS_CLASS_ARRAY = 345,
AS_DATE_ARRAY = 346,
AS_LOGICAL_ARRAY = 347,
AS_NUMERIC_ARRAY = 348,
AS_OBJECT_ARRAY = 349,
PROCREQ = 350,
CBSTART = 351,
DOIDENT = 352,
FOREACH = 353,
DESCEND = 354,
DOSWITCH = 355,
ENDSWITCH = 356,
WITHOBJECT = 357,
ENDWITH = 358,
NUM_DATE = 359,
TIMESTAMP = 360,
EPSILON = 361,
HASHOP = 362,
THREAD = 363,
POST = 364,
UNARY = 365,
PRE = 366
};
#endif
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
typedef union YYSTYPE YYSTYPE;
union YYSTYPE
{
/* Line 2068 of yacc.c */
#line 121 "harbour.y"
#line 121 "harbour.y" /* yacc.c:1909 */
const char * string; /* to hold a string returned by lex */
int iNumber; /* to hold a temporary integer number */
@@ -195,12 +201,14 @@ typedef union YYSTYPE
} asCodeblock;
PHB_VARTYPE asVarType;
/* Line 2068 of yacc.c */
#line 202 "harboury.h"
} YYSTYPE;
#line 205 "harboury.h" /* yacc.c:1909 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
int hb_comp_yyparse (PHB_COMP pComp);
#endif /* !YY_HB_COMP_YY_HARBOURY_H_INCLUDED */

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 2.5. */
/* A Bison parser, made by GNU Bison 3.0.2. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,62 +30,68 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
IDENTIFIER = 258,
NIL = 259,
NUM_DOUBLE = 260,
INASSIGN = 261,
NUM_LONG = 262,
NUM_DATE = 263,
TIMESTAMP = 264,
IIF = 265,
LITERAL = 266,
TRUEVALUE = 267,
FALSEVALUE = 268,
AND = 269,
OR = 270,
NOT = 271,
EQ = 272,
NE1 = 273,
NE2 = 274,
INC = 275,
DEC = 276,
ALIASOP = 277,
HASHOP = 278,
SELF = 279,
LE = 280,
GE = 281,
FIELD = 282,
MACROVAR = 283,
MACROTEXT = 284,
PLUSEQ = 285,
MINUSEQ = 286,
MULTEQ = 287,
DIVEQ = 288,
POWER = 289,
EXPEQ = 290,
MODEQ = 291,
EPSILON = 292,
POST = 293,
UNARY = 294,
PRE = 295
};
#ifndef YY_HB_MACRO_YY_MACROY_H_INCLUDED
# define YY_HB_MACRO_YY_MACROY_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int hb_macro_yydebug;
#endif
/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
IDENTIFIER = 258,
NIL = 259,
NUM_DOUBLE = 260,
INASSIGN = 261,
NUM_LONG = 262,
NUM_DATE = 263,
TIMESTAMP = 264,
IIF = 265,
LITERAL = 266,
TRUEVALUE = 267,
FALSEVALUE = 268,
AND = 269,
OR = 270,
NOT = 271,
EQ = 272,
NE1 = 273,
NE2 = 274,
INC = 275,
DEC = 276,
ALIASOP = 277,
HASHOP = 278,
SELF = 279,
LE = 280,
GE = 281,
FIELD = 282,
MACROVAR = 283,
MACROTEXT = 284,
PLUSEQ = 285,
MINUSEQ = 286,
MULTEQ = 287,
DIVEQ = 288,
POWER = 289,
EXPEQ = 290,
MODEQ = 291,
EPSILON = 292,
POST = 293,
UNARY = 294,
PRE = 295
};
#endif
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
typedef union YYSTYPE YYSTYPE;
union YYSTYPE
{
/* Line 2068 of yacc.c */
#line 139 "macro.y"
#line 139 "macro.y" /* yacc.c:1909 */
const char * string; /* to hold a string returned by lex */
int iNumber; /* to hold a temporary integer number */
@@ -118,12 +124,14 @@ typedef union YYSTYPE
long time; /* to hold milliseconds */
} valTimeStamp;
/* Line 2068 of yacc.c */
#line 125 "macroy.h"
} YYSTYPE;
#line 128 "macroy.h" /* yacc.c:1909 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
int hb_macro_yyparse (PHB_MACRO pMacro);
#endif /* !YY_HB_MACRO_YY_MACROY_H_INCLUDED */

View File

@@ -100,6 +100,8 @@
# define INCL_DOSDEVICES
# define INCL_DOSDEVIOCTL
# include <os2.h>
#elif defined( HB_OS_LINUX ) && defined( __WATCOMC__ ) && ( __WATCOMC__ <= 1290 )
# include <unistd.h>
#endif
#include "hbapifs.h"

View File

@@ -231,10 +231,19 @@ static void _hb_jsonEncode( PHB_ITEM pValue, PHB_JSON_ENCODE_CTX pCtx,
}
else if( HB_IS_NUMINT( pValue ) )
{
char buf[ 32 ];
char buf[ 24 ];
HB_MAXINT nVal = hb_itemGetNInt( pValue );
HB_BOOL fNeg = nVal < 0;
int i = 0;
hb_snprintf( buf, sizeof( buf ), "%" PFHL "d", hb_itemGetNInt( pValue ) );
_hb_jsonCtxAdd( pCtx, buf, strlen( buf ) );
if( fNeg )
nVal = -nVal;
do
buf[ sizeof( buf ) - ++i ] = ( nVal % 10 ) + '0';
while( ( nVal /= 10 ) != 0 );
if( fNeg )
buf[ sizeof( buf ) - ++i ] = '-';
_hb_jsonCtxAdd( pCtx, &buf[ sizeof( buf ) - i ], i );
}
else if( HB_IS_NUMERIC( pValue ) )
{

View File

@@ -2193,7 +2193,11 @@ int hb_socketBind( HB_SOCKET sd, const void * pSockAddr, unsigned uiLen )
{
int ret;
#if defined( HB_OS_LINUX ) && defined( __WATCOMC__ ) && ( __WATCOMC__ <= 1290 )
ret = bind( sd, ( struct sockaddr * ) pSockAddr, ( socklen_t ) uiLen );
#else
ret = bind( sd, ( const struct sockaddr * ) pSockAddr, ( socklen_t ) uiLen );
#endif
hb_socketSetOsError( ret == 0 ? 0 : HB_SOCK_GETERROR() );
return ret;