fasttracker2: Removes patches applied upstream.
Part of previous commit that updated to b164.
This commit is contained in:
parent
4903689d1b
commit
8e4963bda9
4 changed files with 0 additions and 182 deletions
|
@ -1,75 +0,0 @@
|
|||
$NetBSD: patch-src_ft2__diskop.c,v 1.6 2019/08/02 16:54:10 fox Exp $
|
||||
|
||||
1. Added <sys/types.h> and <sys/stat.h> before the include of
|
||||
<fts.h>. While fts(3) is not yet standardized by POSIX, NetBSD
|
||||
contains an implementation that was expected to comply with the
|
||||
eventual standard, and fts(3) on NetBSD documents that the above
|
||||
includes are required. Resolves build failure on netbsd-8.
|
||||
|
||||
2. Added SunOS / SmartOS compatibility.
|
||||
|
||||
Note: Contacted the upstream author regarding the patch and awaiting a
|
||||
reply. https://16-bits.org/ft2.php
|
||||
|
||||
--- src/ft2_diskop.c.orig 2019-06-20 21:20:34.000000000 +0000
|
||||
+++ src/ft2_diskop.c
|
||||
@@ -15,6 +15,8 @@
|
||||
#include <direct.h>
|
||||
#include <shlobj.h> // SHGetFolderPathW()
|
||||
#else
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/stat.h>
|
||||
#include <fts.h> // for fts_open() and stuff in recursiveDelete()
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
@@ -1395,6 +1397,10 @@ static int8_t findFirst(DirRec *searchRe
|
||||
int64_t fSize;
|
||||
#endif
|
||||
|
||||
+#if defined(__sun) || defined(sun)
|
||||
+ struct stat s;
|
||||
+#endif
|
||||
+
|
||||
searchRec->nameU = NULL; // this one must be initialized
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -1422,9 +1428,19 @@ static int8_t findFirst(DirRec *searchRe
|
||||
return LFF_SKIP;
|
||||
|
||||
searchRec->filesize = 0;
|
||||
+
|
||||
+#if defined(__sun) || defined(sun)
|
||||
+ stat(fData->d_name, &s);
|
||||
+ searchRec->isDir = (s.st_mode != S_IFDIR) ? true : false;
|
||||
+#else
|
||||
searchRec->isDir = (fData->d_type == DT_DIR) ? true : false;
|
||||
+#endif
|
||||
|
||||
+#if defined(__sun) || defined(sun)
|
||||
+ if (s.st_mode == S_IFLNK)
|
||||
+#else
|
||||
if (fData->d_type == DT_UNKNOWN || fData->d_type == DT_LNK)
|
||||
+#endif
|
||||
{
|
||||
if (stat(fData->d_name, &st) == 0)
|
||||
{
|
||||
@@ -1488,9 +1504,19 @@ static int8_t findNext(DirRec *searchRec
|
||||
return LFF_SKIP;
|
||||
|
||||
searchRec->filesize = 0;
|
||||
+
|
||||
+#if defined(__sun) || defined(sun)
|
||||
+ stat(fData->d_name, &s);
|
||||
+ searchRec->isDir = (s.st_mode != S_IFDIR) ? true : false;
|
||||
+#else
|
||||
searchRec->isDir = (fData->d_type == DT_DIR) ? true : false;
|
||||
+#endif
|
||||
|
||||
+#if defined(__sun) || defined(sun)
|
||||
+ if (s.st_mode == S_IFLNK)
|
||||
+#else
|
||||
if (fData->d_type == DT_UNKNOWN || fData->d_type == DT_LNK)
|
||||
+#endif
|
||||
{
|
||||
if (stat(fData->d_name, &st) == 0)
|
||||
{
|
|
@ -1,25 +0,0 @@
|
|||
$NetBSD: patch-src_ft2__header.h,v 1.3 2019/08/02 16:54:10 fox Exp $
|
||||
|
||||
Add the HAS_SSE macro so that build failures do not occur in i386
|
||||
systems that lack SSE support.
|
||||
|
||||
For example: On i386, the compiler may be targeting a CPU that does
|
||||
not have SSE (e.g., on NetBSD, the i386 target is i486). fasttracker2
|
||||
various assembly pieces that use different CPU features. HAS_SSE macro
|
||||
needs to be set in systems which has these CPU features and compile
|
||||
correctly.
|
||||
|
||||
Note: Contacted the upstream author regarding the patch and awaiting a
|
||||
reply. https://16-bits.org/ft2.php
|
||||
|
||||
--- src/ft2_header.h.orig 2019-07-22 16:21:07.522137321 +0000
|
||||
+++ src/ft2_header.h
|
||||
@@ -77,7 +77,7 @@
|
||||
#define float2int32_round(i, f) (i = _mm_cvt_ss2si(_mm_load_ss(&f)))
|
||||
#define double2int32_round(i, d) (i = _mm_cvtsd_si32(_mm_load_sd(&d)))
|
||||
|
||||
-#elif defined _WIN32 || defined __i386__ // may have SSE and SSE2
|
||||
+#elif defined HAS_SSE && (defined _WIN32 || defined __i386__) // may have SSE and SSE2
|
||||
|
||||
#define float2int32_round(i, f) \
|
||||
if (cpu.hasSSE) \
|
|
@ -1,34 +0,0 @@
|
|||
$NetBSD: patch-src_ft2__sample__ed.c,v 1.4 2019/08/02 17:16:33 fox Exp $
|
||||
|
||||
Add the HAS_SSE macro so that build failures do not occur in i386
|
||||
systems that lack SSE support.
|
||||
|
||||
For example: On i386, the compiler may be targeting a CPU that does
|
||||
not have SSE (e.g., on NetBSD, the i386 target is i486). fasttracker2
|
||||
various assembly pieces that use different CPU features. HAS_SSE macro
|
||||
needs to be set in systems which has these CPU features and compile
|
||||
correctly.
|
||||
|
||||
Note: Contacted the upstream author regarding the patch and awaiting a
|
||||
reply. https://16-bits.org/ft2.php
|
||||
|
||||
--- src/ft2_sample_ed.c.orig 2019-07-22 16:27:23.010951973 +0000
|
||||
+++ src/ft2_sample_ed.c
|
||||
@@ -743,7 +743,7 @@ static void sampleLine(int16_t x1, int16
|
||||
|
||||
static void getMinMax16(const void *p, uint32_t scanLen, int16_t *min16, int16_t *max16)
|
||||
{
|
||||
-#if defined __APPLE__ || defined _WIN32 || defined __i386__ || defined __amd64__
|
||||
+#if defined __APPLE__ || (defined HAS_SSE && (defined _WIN32 || defined __i386)) || defined __amd64__
|
||||
if (cpu.hasSSE2)
|
||||
{
|
||||
/* Taken with permission from the OpenMPT project (and slightly modified).
|
||||
@@ -829,7 +829,7 @@ static void getMinMax16(const void *p, u
|
||||
|
||||
static void getMinMax8(const void *p, uint32_t scanLen, int8_t *min8, int8_t *max8)
|
||||
{
|
||||
-#if defined __APPLE__ || defined _WIN32 || defined __i386__ || defined __amd64__
|
||||
+#if defined __APPLE__ || (defined HAS_SSE && (defined _WIN32 || defined __i386)) || defined __amd64__
|
||||
if (cpu.hasSSE2)
|
||||
{
|
||||
/* Taken with permission from the OpenMPT project (and slightly modified).
|
|
@ -1,48 +0,0 @@
|
|||
$NetBSD: patch-src_ft2__unicode.c,v 1.5 2019/08/02 16:54:10 fox Exp $
|
||||
|
||||
1. Added a type cast to iconv(3) calls to match the prototypes defined
|
||||
in NetBSD's iconv.h.
|
||||
|
||||
2. Added a NetBSD specific iconv_open() call to prevent failures due
|
||||
to mismatches iconv_open() parameters present in GNU iconv(3).
|
||||
|
||||
3. Added support for SunOS / SmartOS compatibility.
|
||||
|
||||
Note: Contacted the upstream author regarding the patch and awaiting a
|
||||
reply. https://16-bits.org/ft2.php
|
||||
|
||||
--- src/ft2_unicode.c.orig 2019-06-18 19:45:46.000000000 +0000
|
||||
+++ src/ft2_unicode.c
|
||||
@@ -271,7 +271,11 @@ char *cp437ToUtf8(char *src)
|
||||
inLen = srcLen;
|
||||
outPtr = outBuf;
|
||||
|
||||
+#if defined(__NetBSD__) || defined(__sun) || defined(sun)
|
||||
+ rc = iconv(cd, (const char **)&inPtr, &inLen, &outPtr, &outLen);
|
||||
+#else
|
||||
rc = iconv(cd, &inPtr, &inLen, &outPtr, &outLen);
|
||||
+#endif
|
||||
iconv(cd, NULL, NULL, &outPtr, &outLen); // flush
|
||||
iconv_close(cd);
|
||||
|
||||
@@ -301,6 +305,8 @@ char *utf8ToCp437(char *src, bool remove
|
||||
|
||||
#ifdef __APPLE__
|
||||
cd = iconv_open("437//TRANSLIT//IGNORE", "UTF-8-MAC");
|
||||
+#elif defined(__NetBSD__) || defined(__sun) || defined(sun)
|
||||
+ cd = iconv_open("437", "UTF-8");
|
||||
#else
|
||||
cd = iconv_open("437//TRANSLIT//IGNORE", "UTF-8");
|
||||
#endif
|
||||
@@ -317,7 +323,11 @@ char *utf8ToCp437(char *src, bool remove
|
||||
inLen = srcLen;
|
||||
outPtr = outBuf;
|
||||
|
||||
+#if defined(__NetBSD__) || defined(__sun) || defined(sun)
|
||||
+ rc = iconv(cd, (const char **)&inPtr, &inLen, &outPtr, &outLen);
|
||||
+#else
|
||||
rc = iconv(cd, &inPtr, &inLen, &outPtr, &outLen);
|
||||
+#endif
|
||||
iconv(cd, NULL, NULL, &outPtr, &outLen); // flush
|
||||
iconv_close(cd);
|
||||
|
Loading…
Reference in a new issue