diff --git a/haiku-apps/pe/patches/pe-2.4.5.patchset b/haiku-apps/pe/patches/pe-2.4.5.patchset index ca58ed3e8c9..e4d3f15d79e 100644 --- a/haiku-apps/pe/patches/pe-2.4.5.patchset +++ b/haiku-apps/pe/patches/pe-2.4.5.patchset @@ -1,4 +1,4 @@ -From afe202899f857db57d64d4f1f0da80da7a69e0e6 Mon Sep 17 00:00:00 2001 +From 49a287197f9161653503f088989184259eb50506 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sun, 18 Oct 2015 14:30:44 +0000 Subject: build fix @@ -18,5 +18,480 @@ index f044b3a..8cff660 100644 inline const char* CLanguageInterface::LineCommentStart() const -- -2.2.2 +2.12.2 + + +From d8b126e80c235ac8a44da7911dd77f925acce71d Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Wed, 7 Jun 2017 21:51:31 +0200 +Subject: Use standard YY_INPUT, revert to int for result. + + +diff --git a/Languages/Sources/Java_Popup.l b/Languages/Sources/Java_Popup.l +index d540bf5..811b5fb 100644 +--- a/Languages/Sources/Java_Popup.l ++++ b/Languages/Sources/Java_Popup.l +@@ -43,14 +43,14 @@ static char *gClassName = NULL; + #undef YY_DECL + #define YY_DECL static int yylex(CLanguageProxy& proxy) + #undef YY_INPUT +-#define YY_INPUT(tok,result,max) GetNextChar(tok, result, max) ++#define YY_INPUT(tok,result,max) result = GetNextChar(tok, max) + #define YY_SKIP_YYWRAP + #undef yywrap + #define yywrap() 1 + #undef ECHO + #define ECHO + +-static void GetNextChar(char *tok, yy_size_t& result, int max); ++static int GetNextChar(char *tok, int max); + static void AddFunction(CLanguageProxy& proxy); + static void AddPrototype(CLanguageProxy& proxy); + static void AddInclude(CLanguageProxy& proxy, char openingquote, char closingquote); +@@ -115,8 +115,9 @@ _EXPORT void ScanForFunctions(CLanguageProxy& proxy) + } + } /* ScanForFunctions */ + +-void GetNextChar(char *tok, yy_size_t& result, int max) ++int GetNextChar(char *tok, int max) + { ++ int result; + int c = gBuf[gIndx++]; + + if (inString) +@@ -132,13 +133,13 @@ void GetNextChar(char *tok, yy_size_t& result, int max) + space++; + } + +- result = yy_size_t(max = std::min(max, space)); ++ result = max = std::min(max, space); + gIndx += 2; + + while (max--) + *tok++ = ' '; + +- return; ++ return result; + } + else if (c == '/' && gBuf[gIndx] == '/') + { +@@ -152,12 +153,12 @@ void GetNextChar(char *tok, yy_size_t& result, int max) + } + while (gIndx < gBufSize && c != '\n'); + +- result = yy_size_t(max = std::min(max, space)); ++ result = max = std::min(max, space); + + while (max--) + *tok++ = ' '; + +- return; ++ return result; + } + else if (c == '\\' && gBuf[gIndx] == '\n') + { +@@ -165,7 +166,7 @@ void GetNextChar(char *tok, yy_size_t& result, int max) + c = ' '; + } + +- result = yy_size_t((gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL); ++ return (gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL; + } /* GetNextChar */ + + static void AddFunction(CLanguageProxy& proxy) +diff --git a/Languages/Sources/Lout_Popup.l b/Languages/Sources/Lout_Popup.l +index 541d07d..7bbd365 100644 +--- a/Languages/Sources/Lout_Popup.l ++++ b/Languages/Sources/Lout_Popup.l +@@ -68,14 +68,14 @@ static bool inString; + #undef YY_DECL + #define YY_DECL static int yylex(CLanguageProxy& proxy) + #undef YY_INPUT +-#define YY_INPUT(tok,result,max) GetNextChar(tok, result, max) ++#define YY_INPUT(tok,result,max) result = GetNextChar(tok, max) + #define YY_SKIP_YYWRAP + #undef yywrap + #define yywrap() 1 + #undef ECHO + #define ECHO + +-static void GetNextChar(char* tok, yy_size_t& result, int max); ++static int GetNextChar(char* tok, int max); + static void AddInclude(CLanguageProxy& proxy, const char ext[]); + static void AddSysDataBase(CLanguageProxy& proxy); + static void AddSysInclude(CLanguageProxy& proxy); +@@ -124,13 +124,14 @@ _EXPORT void ScanForFunctions(CLanguageProxy& proxy) + } + + +-void GetNextChar(char* tok, yy_size_t& result, int max) ++int GetNextChar(char* tok, int max) + { + int c = gBuf[gIndx++]; + + if (inString) + ; + else if (c == '#') { ++ int result; + int space = 0; + + do { +@@ -139,15 +140,15 @@ void GetNextChar(char* tok, yy_size_t& result, int max) + } + while (gIndx < gBufSize && c != '\n'); + +- result = yy_size_t(max = std::min(max, space)); ++ result = max = std::min(max, space); + + while (max--) + *tok++ = ' '; + +- return; ++ return result; + } + +- result = yy_size_t((gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL); ++ return (gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL; + } + + +diff --git a/Languages/Sources/Mathematica_Popup.l b/Languages/Sources/Mathematica_Popup.l +index 88d087a..34a4bd9 100644 +--- a/Languages/Sources/Mathematica_Popup.l ++++ b/Languages/Sources/Mathematica_Popup.l +@@ -42,14 +42,14 @@ static bool inString; + #undef YY_DECL + #define YY_DECL static int yylex(CLanguageProxy& proxy) + #undef YY_INPUT +-#define YY_INPUT(tok,result,max) GetNextChar(tok, result, max) ++#define YY_INPUT(tok,result,max) result = GetNextChar(tok, max) + #define YY_SKIP_YYWRAP + #undef yywrap + #define yywrap() 1 + #undef ECHO + #define ECHO + +-static void GetNextChar(char *tok, yy_size_t& result, int max); ++static int GetNextChar(char *tok, int max); + static void AddFunction(CLanguageProxy& proxy, int level); + static void AddPrototype(CLanguageProxy& proxy); + static void AddInclude(CLanguageProxy& proxy); +@@ -105,7 +105,7 @@ _EXPORT void ScanForFunctions(CLanguageProxy& proxy) + } + } /* ScanForFunctions */ + +-void GetNextChar(char *tok, yy_size_t& result, int max) ++int GetNextChar(char *tok, int max) + { + int c = gBuf[gIndx++]; + +@@ -114,6 +114,7 @@ void GetNextChar(char *tok, yy_size_t& result, int max) + else if (c == '(' && gBuf[gIndx] == '*') + { + int space = 3; ++ int result; + gIndx++; + + while (gIndx < gBufSize && !(gBuf[gIndx] == '*' && gBuf[gIndx + 1] == ')')) +@@ -122,16 +123,16 @@ void GetNextChar(char *tok, yy_size_t& result, int max) + space++; + } + +- result = yy_size_t(max = std::min(max, space)); ++ result = max = std::min(max, space); + gIndx += 2; + + while (max--) + *tok++ = ' '; + +- return; ++ return result; + } + +- result = yy_size_t((gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL); ++ return (gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL; + } /* GetNextChar */ + + static void AddFunction(CLanguageProxy& proxy, int nesting) +diff --git a/Languages/Sources/Oberon_Popup.l b/Languages/Sources/Oberon_Popup.l +index 88d087a..34a4bd9 100644 +--- a/Languages/Sources/Oberon_Popup.l ++++ b/Languages/Sources/Oberon_Popup.l +@@ -42,14 +42,14 @@ static bool inString; + #undef YY_DECL + #define YY_DECL static int yylex(CLanguageProxy& proxy) + #undef YY_INPUT +-#define YY_INPUT(tok,result,max) GetNextChar(tok, result, max) ++#define YY_INPUT(tok,result,max) result = GetNextChar(tok, max) + #define YY_SKIP_YYWRAP + #undef yywrap + #define yywrap() 1 + #undef ECHO + #define ECHO + +-static void GetNextChar(char *tok, yy_size_t& result, int max); ++static int GetNextChar(char *tok, int max); + static void AddFunction(CLanguageProxy& proxy, int level); + static void AddPrototype(CLanguageProxy& proxy); + static void AddInclude(CLanguageProxy& proxy); +@@ -105,7 +105,7 @@ _EXPORT void ScanForFunctions(CLanguageProxy& proxy) + } + } /* ScanForFunctions */ + +-void GetNextChar(char *tok, yy_size_t& result, int max) ++int GetNextChar(char *tok, int max) + { + int c = gBuf[gIndx++]; + +@@ -114,6 +114,7 @@ void GetNextChar(char *tok, yy_size_t& result, int max) + else if (c == '(' && gBuf[gIndx] == '*') + { + int space = 3; ++ int result; + gIndx++; + + while (gIndx < gBufSize && !(gBuf[gIndx] == '*' && gBuf[gIndx + 1] == ')')) +@@ -122,16 +123,16 @@ void GetNextChar(char *tok, yy_size_t& result, int max) + space++; + } + +- result = yy_size_t(max = std::min(max, space)); ++ result = max = std::min(max, space); + gIndx += 2; + + while (max--) + *tok++ = ' '; + +- return; ++ return result; + } + +- result = yy_size_t((gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL); ++ return (gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL; + } /* GetNextChar */ + + static void AddFunction(CLanguageProxy& proxy, int nesting) +diff --git a/Languages/Sources/Perl_Popup.l b/Languages/Sources/Perl_Popup.l +index 2659cca..93c2c4f 100644 +--- a/Languages/Sources/Perl_Popup.l ++++ b/Languages/Sources/Perl_Popup.l +@@ -42,14 +42,14 @@ static bool inString; + #undef YY_DECL + #define YY_DECL static int yylex(CLanguageProxy& proxy) + #undef YY_INPUT +-#define YY_INPUT(tok,result,max) GetNextChar(tok, result, max) ++#define YY_INPUT(tok,result,max) result = GetNextChar(tok, max) + #define YY_SKIP_YYWRAP + #undef yywrap + #define yywrap() 1 + #undef ECHO + #define ECHO + +-static void GetNextChar(char *tok, yy_size_t& result, int max); ++static int GetNextChar(char *tok, int max); + static void AddFunction(CLanguageProxy& proxy); + static void AddInclude(CLanguageProxy& proxy, char openingquote, char closingquote); + %} +@@ -104,7 +104,7 @@ _EXPORT void ScanForFunctions(CLanguageProxy& proxy) + } + } /* ScanForFunctions */ + +-void GetNextChar(char *tok, yy_size_t& result, int max) ++int GetNextChar(char *tok, int max) + { + int c = gBuf[gIndx++]; + +@@ -113,6 +113,7 @@ void GetNextChar(char *tok, yy_size_t& result, int max) + else if (c == '#') + { + int space = 0; ++ int result; + + do + { +@@ -121,15 +122,15 @@ void GetNextChar(char *tok, yy_size_t& result, int max) + } + while (gIndx < gBufSize && c != '\n'); + +- result = yy_size_t(max = std::min(max, space)); ++ result = max = std::min(max, space); + + while (max--) + *tok++ = ' '; + +- return; ++ return result; + } + +- result = yy_size_t((gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL); ++ return (gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL; + } /* GetNextChar */ + + static void AddFunction(CLanguageProxy& proxy) +diff --git a/Languages/Sources/Python_Popup.l b/Languages/Sources/Python_Popup.l +index 5017a78..22ea99f 100644 +--- a/Languages/Sources/Python_Popup.l ++++ b/Languages/Sources/Python_Popup.l +@@ -42,14 +42,14 @@ static bool inString; + #undef YY_DECL + #define YY_DECL static int yylex(CLanguageProxy& proxy) + #undef YY_INPUT +-#define YY_INPUT(tok,result,max) GetNextChar(tok, result, max) ++#define YY_INPUT(tok,result,max) result = GetNextChar(tok, max) + #define YY_SKIP_YYWRAP + #undef yywrap + #define yywrap() 1 + #undef ECHO + #define ECHO + +-static void GetNextChar(char *tok, yy_size_t& result, int max); ++static int GetNextChar(char *tok, int max); + static void AddFunction(CLanguageProxy& proxy); + static void AddInclude(CLanguageProxy& proxy); + static void AddInclude2(CLanguageProxy& proxy); +@@ -104,7 +104,7 @@ _EXPORT void ScanForFunctions(CLanguageProxy& proxy) + } + } /* ScanForFunctions */ + +-void GetNextChar(char *tok, yy_size_t& result, int max) ++int GetNextChar(char *tok, int max) + { + int c = gBuf[gIndx++]; + +@@ -113,6 +113,7 @@ void GetNextChar(char *tok, yy_size_t& result, int max) + else if (c == '#') + { + int space = 0; ++ int result; + + do + { +@@ -121,15 +122,15 @@ void GetNextChar(char *tok, yy_size_t& result, int max) + } + while (gIndx < gBufSize && c != '\n'); + +- result = yy_size_t(max = std::min(max, space)); ++ result = max = std::min(max, space); + + while (max--) + *tok++ = ' '; + +- return; ++ return result; + } + +- result = yy_size_t((gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL); ++ return (gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL; + } /* GetNextChar */ + + static void AddFunction(CLanguageProxy& proxy) +diff --git a/Languages/Sources/Rez_Popup.l b/Languages/Sources/Rez_Popup.l +index 5d84fe4..84d0b19 100644 +--- a/Languages/Sources/Rez_Popup.l ++++ b/Languages/Sources/Rez_Popup.l +@@ -42,14 +42,14 @@ static bool inString; + #undef YY_DECL + #define YY_DECL static int yylex(CLanguageProxy& proxy) + #undef YY_INPUT +-#define YY_INPUT(tok,result,max) GetNextChar(tok, result, max) ++#define YY_INPUT(tok,result,max) result = GetNextChar(tok, max) + #define YY_SKIP_YYWRAP + #undef yywrap + #define yywrap() 1 + #undef ECHO + #define ECHO + +-static void GetNextChar(char *tok, yy_size_t& result, int max); ++static int GetNextChar(char *tok, int max); + static void AddResource(CLanguageProxy& proxy); + static void AddResType(CLanguageProxy& proxy); + static void AddMarker(CLanguageProxy& proxy); +@@ -109,8 +109,9 @@ _EXPORT void ScanForFunctions(CLanguageProxy& proxy) + } + } /* ScanForFunctions */ + +-void GetNextChar(char *tok, yy_size_t& result, int max) ++int GetNextChar(char *tok, int max) + { ++ int result; + int c = gBuf[gIndx++]; + + if (inString) +@@ -126,13 +127,13 @@ void GetNextChar(char *tok, yy_size_t& result, int max) + space++; + } + +- result = yy_size_t(max = std::min(max, space)); ++ result = max = std::min(max, space); + gIndx += 2; + + while (max--) + *tok++ = ' '; + +- return; ++ return result; + } + else if (c == '/' && gBuf[gIndx] == '/') + { +@@ -146,12 +147,12 @@ void GetNextChar(char *tok, yy_size_t& result, int max) + } + while (gIndx < gBufSize && c != '\n'); + +- result = yy_size_t(max = std::min(max, space)); ++ result = max = std::min(max, space); + + while (max--) + *tok++ = ' '; + +- return; ++ return result; + } + else if (c == '\\' && gBuf[gIndx] == '\n') + { +@@ -159,7 +160,7 @@ void GetNextChar(char *tok, yy_size_t& result, int max) + c = ' '; + } + +- result = yy_size_t((gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL); ++ return (gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL; + } /* GetNextChar */ + + static void AddInclude(CLanguageProxy& proxy, char openingquote, char closingquote) +diff --git a/Languages/Sources/Tex_Popup.l b/Languages/Sources/Tex_Popup.l +index d1c2256..705e489 100644 +--- a/Languages/Sources/Tex_Popup.l ++++ b/Languages/Sources/Tex_Popup.l +@@ -44,14 +44,14 @@ static int gBufSize; + #undef YY_DECL + #define YY_DECL static int yylex(CLanguageProxy& proxy) + #undef YY_INPUT +-#define YY_INPUT(tok,result,max) GetNextChar(tok, result, max) ++#define YY_INPUT(tok,result,max) result = GetNextChar(tok, max) + #define YY_SKIP_YYWRAP + #undef yywrap + #define yywrap() 1 + #undef ECHO + #define ECHO + +-static void GetNextChar(char *tok, yy_size_t& result, int max); ++static int GetNextChar(char *tok, int max); + static void Add(int level, CLanguageProxy& proxy, int hasOptional); + %} + +@@ -95,11 +95,11 @@ _EXPORT void ScanForFunctions(CLanguageProxy& proxy) + } + } /* ScanForFunctions */ + +-void GetNextChar(char *tok, yy_size_t& result, int) ++int GetNextChar(char *tok, int) + { + int c = gBuf[gIndx++]; + +- result = yy_size_t((gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL); ++ return (gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL; + } /* GetNextChar */ + + static void Add(int level, CLanguageProxy& proxy, int hasOptional) +-- +2.12.2 diff --git a/haiku-apps/pe/pe-2.4.5.recipe b/haiku-apps/pe/pe-2.4.5.recipe index 51fef8ab251..c4caa5bba4a 100644 --- a/haiku-apps/pe/pe-2.4.5.recipe +++ b/haiku-apps/pe/pe-2.4.5.recipe @@ -15,7 +15,7 @@ SOURCE_URI="https://github.com/HaikuArchives/Pe/archive/fc6e5b6.tar.gz" SOURCE_FILENAME="pe-$portVersion.tar.gz" SOURCE_DIR="Pe-fc6e5b696a09d937c5ee6edc3f9e3440909d53f1" CHECKSUM_SHA256="0d6e795e423c9e8b2a0ae4190bd57dbc618600d374a112fa989e7bbf53f91123" -REVISION="3" +REVISION="4" ARCHITECTURES="x86_gcc2 x86 x86_64" PATCHES="pe-2.4.5.patchset"