mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 14:56:53 +02:00
124 lines
5.6 KiB
Diff
124 lines
5.6 KiB
Diff
diff --git a/hdf/src/hconv.h b/hdf/src/hconv.h
|
|
index d6a8748..afe33c4 100644
|
|
--- a/hdf/src/hconv.h
|
|
+++ b/hdf/src/hconv.h
|
|
@@ -59,7 +59,7 @@
|
|
/* CONSTANT DEFINITIONS */
|
|
/*****************************************************************************/
|
|
/* Generally Big-Endian machines */
|
|
-#if !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !(defined(__ia64) && !(defined(hpux) || defined(__hpux))) && !defined(__x86_64__) && !defined(__arm__) && !defined(__AARCH64EL__) && !defined(__LITTLE_ENDIAN__)
|
|
+#if !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !(defined(__ia64) && !(defined(hpux) || defined(__hpux))) && !defined(__x86_64__) && !defined(__arm__) && !defined(__AARCH64EL__) && !defined(__LITTLE_ENDIAN__) && !defined(__loongarch64)
|
|
# define UI8_IN DFKnb1b /* Unsigned Integer, 8 bits */
|
|
# define UI8_OUT DFKnb1b
|
|
# define SI16_IN DFKnb2b /* S = Signed */
|
|
diff --git a/hdf/src/hdfi.h b/hdf/src/hdfi.h
|
|
index 27436ff..df8508b 100644
|
|
--- a/hdf/src/hdfi.h
|
|
+++ b/hdf/src/hdfi.h
|
|
@@ -81,6 +81,7 @@
|
|
#define DFMT_LINUX390 0x1111
|
|
#define DFMT_LINUXARM 0x4441
|
|
#define DFMT_LINUXAARCH64 0x4441
|
|
+#define DFMT_LOONGARCH64 0x4441
|
|
|
|
/* I/O library constants */
|
|
#define UNIXUNBUFIO 1
|
|
@@ -675,6 +676,59 @@ typedef int hdf_pint_t; /* 4-byte pointer */
|
|
#endif /* INTEL86 */
|
|
#endif /* !(defined(__APPLE__)) */
|
|
|
|
+/*-----------------------------------------------------*/
|
|
+#if defined (__linux__) && defined (__loongarch64)
|
|
+
|
|
+#ifdef GOT_MACHINE
|
|
+If you get an error on this line more than one machine type has been defined.
|
|
+Please check your Makefile.
|
|
+#endif
|
|
+#define GOT_MACHINE 1
|
|
+
|
|
+#include <fcntl.h>
|
|
+#include <sys/types.h> /* for unbuffered file I/O */
|
|
+#include <sys/stat.h>
|
|
+#include <unistd.h>
|
|
+#include <ctype.h> /* for character macros */
|
|
+
|
|
+#define DF_MT DFMT_LOONGARCH64
|
|
+
|
|
+typedef void VOID;
|
|
+typedef void * VOIDP;
|
|
+typedef char * _fcd;
|
|
+typedef char char8;
|
|
+typedef unsigned char uchar8;
|
|
+typedef signed char int8;
|
|
+typedef unsigned char uint8;
|
|
+typedef short int int16;
|
|
+typedef unsigned short int uint16;
|
|
+typedef int int32;
|
|
+typedef unsigned int uint32;
|
|
+typedef int intn;
|
|
+typedef unsigned int uintn;
|
|
+typedef float float32;
|
|
+typedef double float64;
|
|
+typedef int intf; /* size of INTEGERs in Fortran compiler */
|
|
+typedef long hdf_pint_t; /* an integer the same size as a pointer */
|
|
+#define FNAME_POST_UNDERSCORE
|
|
+#define _fcdtocp(desc) (desc)
|
|
+#define FILELIB UNIXBUFIO
|
|
+
|
|
+#ifndef BIG_LONGS
|
|
+#define BIG_LONGS
|
|
+#endif
|
|
+
|
|
+/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
|
|
+
|
|
+/* Determine the memory manager we are going to use. Valid values are: */
|
|
+/* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
|
|
+/* what each does */
|
|
+#define JMEMSYS MEM_ANSI
|
|
+#define HAVE_STDC
|
|
+#define INCLUDES_ARE_ANSI
|
|
+
|
|
+#endif /* Linux/loongarch64 */
|
|
+
|
|
/*-----------------------------------------------------*/
|
|
#if defined(NEXT) || defined(NeXT)
|
|
|
|
diff --git a/mfhdf/libsrc/netcdf.h.in b/mfhdf/libsrc/netcdf.h.in
|
|
index efe7039..77abcf4 100644
|
|
--- a/mfhdf/libsrc/netcdf.h.in
|
|
+++ b/mfhdf/libsrc/netcdf.h.in
|
|
@@ -293,7 +293,7 @@ typedef double ncdouble;
|
|
/*
|
|
* Variables/attributes of type NC_LONG should use the C type 'nclong'
|
|
*/
|
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__ || defined __loongarch64
|
|
/*
|
|
* LP64 (also known as 4/8/8) denotes long and pointer as 64 bit types.
|
|
* http://www.unix.org/version2/whatsnew/lp64_wp.html
|
|
diff --git a/mfhdf/ncgen/ncgen.l b/mfhdf/ncgen/ncgen.l
|
|
index 6912087..5bf4d4f 100644
|
|
--- a/mfhdf/ncgen/ncgen.l
|
|
+++ b/mfhdf/ncgen/ncgen.l
|
|
@@ -113,7 +113,7 @@ FloatInf|Infinity|Inf { /* float missing values */
|
|
yyerror(errstr);
|
|
}
|
|
|
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || __powerpc64__ || defined __s390x__ || defined __aarch64__
|
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || __powerpc64__ || defined __s390x__ || defined __aarch64__ || defined __loongarch64
|
|
if (dd < INT_MIN || dd > INT_MAX)
|
|
#else
|
|
if (dd < LONG_MIN || dd > LONG_MAX)
|
|
diff --git a/mfhdf/ncgen/ncgenyy.c b/mfhdf/ncgen/ncgenyy.c
|
|
index 559c30b..5a37a99 100644
|
|
--- a/mfhdf/ncgen/ncgenyy.c
|
|
+++ b/mfhdf/ncgen/ncgenyy.c
|
|
@@ -991,7 +991,7 @@ YY_RULE_SETUP
|
|
yyerror(errstr);
|
|
}
|
|
|
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || __powerpc64__ || __s390x__ || defined __aarch64__
|
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || __powerpc64__ || __s390x__ || defined __aarch64__ || defined __loongarch64
|
|
if (dd < INT_MIN || dd > INT_MAX)
|
|
#else
|
|
if (dd < LONG_MIN || dd > LONG_MAX)
|