8 Star 0 Fork 12

src-openEuler/hdf

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
hdf-ppc64le.patch 3.52 KB
一键复制 编辑 原始数据 按行查看 历史
yangshaoxing 提交于 2021-02-03 15:24 . Log:Package init
diff -up hdf-4.2.10/hdf/src/hconv.h.ppc64le hdf-4.2.10/hdf/src/hconv.h
--- hdf-4.2.10/hdf/src/hconv.h.ppc64le 2014-09-03 20:30:36.598974138 -0600
+++ hdf-4.2.10/hdf/src/hconv.h 2014-09-03 20:30:36.608974327 -0600
@@ -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__)
+#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__)
# define UI8_IN DFKnb1b /* Unsigned Integer, 8 bits */
# define UI8_OUT DFKnb1b
# define SI16_IN DFKnb2b /* S = Signed */
diff -up hdf-4.2.10/hdf/src/hdfi.h.ppc64le hdf-4.2.10/hdf/src/hdfi.h
--- hdf-4.2.10/hdf/src/hdfi.h.ppc64le 2014-09-03 20:30:36.599974157 -0600
+++ hdf-4.2.10/hdf/src/hdfi.h 2014-02-09 19:28:49.000000000 -0700
@@ -75,6 +75,7 @@
#define DFMT_IA64 0x4441
#define DFMT_LINUX64 0x4441
#define DFMT_POWERPC64 0x1111
+#define DFMT_POWERPC64LE 0x4441
#define DFMT_LINUXPPC 0x1111
#define DFMT_LINUXSPARC 0x1111
#define DFMT_LINUX390 0x1111
@@ -922,18 +923,24 @@ typedef int hdf_pint_t;
/*-----------------------------------------------------*/
-/* Power PC 5 64 */
#if defined __powerpc64__
-
+/* powerpc 64 bits */
#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
+#ifdef __LITTLE_ENDIAN__
+/* Power PC 8 64 little endian */
+#define DF_MT DFMT_POWERPC64LE
+#else
+/* Power PC 5 64 */
+#define DF_MT DFMT_POWERPC64
+#endif
+
#include <sys/file.h> /* for unbuffered i/o stuff */
#include <sys/stat.h>
-#define DF_MT DFMT_POWERPC64
typedef void VOID;
typedef void *VOIDP;
typedef char *_fcd;
@@ -969,8 +976,9 @@ typedef long hdf_pint_t;
#define INCLUDES_ARE_ANSI
#endif
+#endif /* powerpc 64 bits */
+
/*-----------------------------------------------------*/
-#endif /*power PC 5 64 */
/* Linux 64 */
#if defined(__linux__) && defined __x86_64__ && !(defined SUN) /* i.e. 64-bit Linux but not SunOS on Intel */
--- hdf-4.2.10/mfhdf/libsrc/xdrposix.c.patched
+++ hdf-4.2.10/mfhdf/libsrc/xdrposix.c
@@ -431,7 +431,7 @@ xdrposix_getlong(xdrs, lp)
#endif
{
unsigned char *up = (unsigned char *)lp ;
-#if (defined AIX5L64 || defined __powerpc64__ || defined __s390x__ || (defined __hpux && __LP64__))
+#if (defined AIX5L64 || (defined __powerpc64__ && !defined __LITTLE_ENDIAN__) || defined __s390x__ || (defined __hpux && __LP64__))
*lp = 0 ;
up += (sizeof(long) - 4) ;
#endif
@@ -458,7 +458,7 @@ xdrposix_putlong(xdrs, lp)
netlong mycopy = htonl(*lp);
up = (unsigned char *)&mycopy;
#endif
-#if (defined AIX5L64 || defined __powerpc64__ || defined __s390x__ || (defined __hpux && __LP64__))
+#if (defined AIX5L64 || (defined __powerpc64__ && !defined __LITTLE_ENDIAN__) || defined __s390x__ || (defined __hpux && __LP64__))
up += (sizeof(long) - 4) ;
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/hdf.git
git@gitee.com:src-openeuler/hdf.git
src-openeuler
hdf
hdf
master

搜索帮助