Fixes for non-x86 64bit architectures
This commit is contained in:
parent
f81210a0d9
commit
46cf071149
269
libEMF-lp64.patch
Normal file
269
libEMF-lp64.patch
Normal file
@ -0,0 +1,269 @@
|
|||||||
|
diff --git a/include/libEMF/wine/winnt.h b/include/libEMF/wine/winnt.h
|
||||||
|
index 83109cb..f76c08a 100644
|
||||||
|
--- a/include/libEMF/wine/winnt.h
|
||||||
|
+++ b/include/libEMF/wine/winnt.h
|
||||||
|
@@ -250,7 +250,7 @@ typedef unsigned short WORD, *PWORD, *LPWORD;
|
||||||
|
typedef int INT, *PINT, *LPINT;
|
||||||
|
typedef unsigned int UINT, *PUINT, *LPUINT;
|
||||||
|
/* Not sure this is correct. Probably should depend on the compiler, too. */
|
||||||
|
-#if defined( __x86_64__) || defined(__alpha__)
|
||||||
|
+#if defined( __LP64__) || defined(__alpha__)
|
||||||
|
typedef unsigned int DWORD, *PDWORD, *LPDWORD;
|
||||||
|
typedef unsigned int ULONG, *PULONG, *LPULONG;
|
||||||
|
#else
|
||||||
|
@@ -296,7 +296,7 @@ typedef VOID *PVOID, *LPVOID;
|
||||||
|
typedef BYTE BOOLEAN, *PBOOLEAN;
|
||||||
|
typedef char CHAR, *PCHAR;
|
||||||
|
typedef short SHORT, *PSHORT;
|
||||||
|
-#if defined(__x86_64__) || defined(__alpha__)
|
||||||
|
+#if defined(__LP64__) || defined(__alpha__)
|
||||||
|
typedef int LONG, *PLONG, *LPLONG;
|
||||||
|
#else
|
||||||
|
typedef long LONG, *PLONG, *LPLONG;
|
||||||
|
diff --git a/libemf/libemf.h b/libemf/libemf.h
|
||||||
|
index a376150..9497b6d 100644
|
||||||
|
--- a/libemf/libemf.h
|
||||||
|
+++ b/libemf/libemf.h
|
||||||
|
@@ -340,7 +340,7 @@ namespace EMF {
|
||||||
|
fread( &dword, sizeof(DWORD), 1, fp_ );
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
-#if !defined( __x86_64__ )
|
||||||
|
+#if !defined( __LP64__ )
|
||||||
|
/*!
|
||||||
|
* Output a long int to the stream (swabbed).
|
||||||
|
* \param long long int to output.
|
||||||
|
@@ -410,7 +410,7 @@ namespace EMF {
|
||||||
|
fread( &int_, sizeof(INT), 1, fp_ );
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
-#if !defined(__x86_64__)
|
||||||
|
+#if !defined(__LP64__)
|
||||||
|
/*!
|
||||||
|
* Output a (long) unsigned int to the stream (swabbed).
|
||||||
|
* \param uint (long) unsigned int to output.
|
||||||
|
@@ -985,7 +985,7 @@ namespace EMF {
|
||||||
|
/* Miscellaneous editing routines */
|
||||||
|
inline void edit_rectl ( const char* tag, const RECTL& rectl )
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT = "\t%s\t: (%d, %d) - (%d, %d)\n";
|
||||||
|
#else
|
||||||
|
const char* FMT = "\t%s\t: (%ld, %ld) - (%ld, %ld)\n";
|
||||||
|
@@ -1005,7 +1005,7 @@ namespace EMF {
|
||||||
|
|
||||||
|
inline void edit_color ( const char* tag, const COLORREF& color )
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT = "\t%s\t: R(0x%02x) G(0x%02x) B(0x%02x)\n";
|
||||||
|
#else
|
||||||
|
const char* FMT = "\t%s\t: R(0x%02lx) G(0x%02lx) B(0x%02lx)\n";
|
||||||
|
@@ -1016,7 +1016,7 @@ namespace EMF {
|
||||||
|
|
||||||
|
inline void edit_sizel ( const char* tag, const SIZEL& size )
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT = "\t%s\t: (%d, %d)\n";
|
||||||
|
#else
|
||||||
|
const char* FMT = "\t%s\t: (%ld, %ld)\n";
|
||||||
|
@@ -1026,7 +1026,7 @@ namespace EMF {
|
||||||
|
|
||||||
|
inline void edit_pointl ( const char* tag, const POINTL& point )
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT = "\t%s\t: (%d, %d)\n";
|
||||||
|
#else
|
||||||
|
const char* FMT = "\t%s\t: (%ld, %ld)\n";
|
||||||
|
@@ -1037,7 +1037,7 @@ namespace EMF {
|
||||||
|
inline void edit_pointlarray ( const char* tag, const DWORD cptl,
|
||||||
|
const POINTL* points )
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT0 = "\tcptl%s\t: %d\n";
|
||||||
|
const char* FMT1 = "%d, %d\n";
|
||||||
|
const char* FMT2 = "\t\t%s %d, %d\n";
|
||||||
|
@@ -1102,7 +1102,7 @@ namespace EMF {
|
||||||
|
|
||||||
|
inline void edit_brush_style ( const char* tag, DWORD style )
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT = "unknown(%d)";
|
||||||
|
#else
|
||||||
|
const char* FMT = "unknown(%ld)";
|
||||||
|
@@ -1126,7 +1126,7 @@ namespace EMF {
|
||||||
|
|
||||||
|
inline void edit_brush_hatch ( const char* tag, DWORD hatch )
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT = "unknown(%d)";
|
||||||
|
#else
|
||||||
|
const char* FMT = "unknown(%ld)";
|
||||||
|
@@ -1473,7 +1473,7 @@ namespace EMF {
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT0 = "\tiType\t\t\t: %d\n";
|
||||||
|
const char* FMT1 = "\tnSize\t\t\t: %d\n";
|
||||||
|
const char* FMT2 = "\tnBytes\t\t\t: %d\n";
|
||||||
|
@@ -1855,7 +1855,7 @@ namespace EMF {
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT0 = "\txNum\t: %d\n";
|
||||||
|
const char* FMT1 = "\txDenom\t: %d\n";
|
||||||
|
const char* FMT2 = "\tyNum\t: %d\n";
|
||||||
|
@@ -1993,7 +1993,7 @@ namespace EMF {
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT0 = "\txNum\t: %d\n";
|
||||||
|
const char* FMT1 = "\txDenom\t: %d\n";
|
||||||
|
const char* FMT2 = "\tyNum\t: %d\n";
|
||||||
|
@@ -2069,7 +2069,7 @@ namespace EMF {
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT = "unknown(%d)\n";
|
||||||
|
#else
|
||||||
|
const char* FMT = "unknown(%ld)\n";
|
||||||
|
@@ -2196,7 +2196,7 @@ namespace EMF {
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT = "| unknown bits(0x%x)";
|
||||||
|
#else
|
||||||
|
const char* FMT = "| unknown bits(0x%lx)";
|
||||||
|
@@ -2394,7 +2394,7 @@ namespace EMF {
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT = "unknown(%d)\n";
|
||||||
|
#else
|
||||||
|
const char* FMT = "unknown(%ld)\n";
|
||||||
|
@@ -2460,7 +2460,7 @@ namespace EMF {
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT = "unknown(%d)\n";
|
||||||
|
#else
|
||||||
|
const char* FMT = "unknown(%ld)\n";
|
||||||
|
@@ -2527,7 +2527,7 @@ namespace EMF {
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT = "unknown(%d)\n";
|
||||||
|
#else
|
||||||
|
const char* FMT = "unknown(%ld)\n";
|
||||||
|
@@ -2596,7 +2596,7 @@ namespace EMF {
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT = "\tihObject\t: 0x%x\n";
|
||||||
|
#else
|
||||||
|
const char* FMT = "\tihObject\t: 0x%lx\n";
|
||||||
|
@@ -2654,7 +2654,7 @@ namespace EMF {
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT = "\tihObject\t: 0x%x\n";
|
||||||
|
#else
|
||||||
|
const char* FMT = "\tihObject\t: 0x%lx\n";
|
||||||
|
@@ -3580,7 +3580,7 @@ namespace EMF {
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT0 = "\tnPolys\t\t: %d\n";
|
||||||
|
const char* FMT1 = "\tcptl\t\t: %d\n";
|
||||||
|
const char* FMT2 = "%d\n";
|
||||||
|
@@ -3770,7 +3770,7 @@ namespace EMF {
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT0 = "\tnPolys\t\t: %d\n";
|
||||||
|
const char* FMT1 = "\tcptl\t\t: %d\n";
|
||||||
|
const char* FMT2 = "%d\n";
|
||||||
|
@@ -4575,7 +4575,7 @@ For pstoedit - this is "fixed" now by estimating dx in pstoedit
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT0 = "unknown(%d)\n";
|
||||||
|
const char* FMT1 = "\tptlReference\t: (%d,%d)\n";
|
||||||
|
const char* FMT2 = "\tnChars\t\t: %d\n";
|
||||||
|
@@ -4759,7 +4759,7 @@ For pstoedit - this is "fixed" now by estimating dx in pstoedit
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT0 = "\tihPen\t\t: 0x%x\n";
|
||||||
|
const char* FMT1 = "\tlopn.lopnWidth\t: %d, %d\n";
|
||||||
|
#else
|
||||||
|
@@ -4817,7 +4817,7 @@ For pstoedit - this is "fixed" now by estimating dx in pstoedit
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT0 = "\tihPen\t\t\t: 0x%x\n";
|
||||||
|
const char* FMT1 = "\toffBmi\t\t\t: %d\n";
|
||||||
|
const char* FMT2 = "\tcbBmi\t\t\t: %d\n";
|
||||||
|
@@ -4891,7 +4891,7 @@ For pstoedit - this is "fixed" now by estimating dx in pstoedit
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT = "\tihBrush\t\t: 0x%x\n";
|
||||||
|
#else
|
||||||
|
const char* FMT = "\tihBrush\t\t: 0x%lx\n";
|
||||||
|
@@ -4951,7 +4951,7 @@ For pstoedit - this is "fixed" now by estimating dx in pstoedit
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT0 = "\tihFont\t\t\t: %d\n";
|
||||||
|
const char* FMT1 = "\tlfHeight\t\t: %d\n";
|
||||||
|
const char* FMT2 = "\tlfWidth\t\t\t: %d\n";
|
||||||
|
@@ -5520,7 +5520,7 @@ For pstoedit - this is "fixed" now by estimating dx in pstoedit
|
||||||
|
*/
|
||||||
|
void edit ( void ) const
|
||||||
|
{
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
+#if defined(__LP64__)
|
||||||
|
const char* FMT = "\tiRelative: %d\n";
|
||||||
|
#else
|
||||||
|
const char* FMT = "\tiRelative: %ld\n";
|
@ -2,7 +2,7 @@ Summary: A library for generating Enhanced Metafiles
|
|||||||
Summary(pl): Biblioteka do generowania plików w formacie Enhanced Metafile
|
Summary(pl): Biblioteka do generowania plików w formacie Enhanced Metafile
|
||||||
Name: libEMF
|
Name: libEMF
|
||||||
Version: 1.0.6
|
Version: 1.0.6
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: LGPLv2+ and GPLv2+
|
License: LGPLv2+ and GPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://libemf.sourceforge.net/
|
URL: http://libemf.sourceforge.net/
|
||||||
@ -13,6 +13,7 @@ Patch0: %{name}-amd64.patch
|
|||||||
Patch1: %{name}-axp.patch
|
Patch1: %{name}-axp.patch
|
||||||
Patch2: %{name}-s390.patch
|
Patch2: %{name}-s390.patch
|
||||||
Patch3: %{name}-arm.patch
|
Patch3: %{name}-arm.patch
|
||||||
|
Patch4: %{name}-lp64.patch
|
||||||
BuildRequires: libstdc++-devel
|
BuildRequires: libstdc++-devel
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
|
|
||||||
@ -49,6 +50,7 @@ Pliki nagłówkowe libEMF.
|
|||||||
%patch1 -p1 -b .axp
|
%patch1 -p1 -b .axp
|
||||||
%patch2 -p1 -b .s390
|
%patch2 -p1 -b .s390
|
||||||
%patch3 -p1 -b .arm
|
%patch3 -p1 -b .arm
|
||||||
|
%patch4 -p1 -b .lp64
|
||||||
|
|
||||||
chmod 0644 libemf/libemf.h
|
chmod 0644 libemf/libemf.h
|
||||||
|
|
||||||
@ -90,6 +92,9 @@ make check
|
|||||||
%{_includedir}/libEMF
|
%{_includedir}/libEMF
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 5 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.0.6-2
|
||||||
|
- Fixes for non-x86 64bit architectures
|
||||||
|
|
||||||
* Mon Sep 03 2012 Dominik 'Rathann' Mierzejewski <rpm@greysector.net> 1.0.6-1
|
* Mon Sep 03 2012 Dominik 'Rathann' Mierzejewski <rpm@greysector.net> 1.0.6-1
|
||||||
- updated to 1.0.6
|
- updated to 1.0.6
|
||||||
- updated source URL
|
- updated source URL
|
||||||
|
Loading…
Reference in New Issue
Block a user