Package: xemacs21 / 21.4.22-14~deb8u1

03_hppa_undefined_symbols.dpatch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#! /bin/sh -e
## 03_hppa_undefined_symbols.dpatch by OHURA Makoto <ohura@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix FTBFS problem for hppa. See BTS #133682

if [ $# -lt 1 ]; then
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
    -patch) patch -p1 ${patch_opts} < $0;;
    -unpatch) patch -R -p1 ${patch_opts} < $0;;
    *)
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
        exit 1;;
esac

exit 0

@DPATCH@
Index: xemacs21-21.4.22/configure.in
===================================================================
--- xemacs21-21.4.22.orig/configure.in	2013-11-15 14:19:46.762065047 +0000
+++ xemacs21-21.4.22/configure.in	2013-11-15 14:19:46.758065085 +0000
@@ -888,6 +888,9 @@
   sources may be found."])
     fi
   ;;
+  hppa*-*-linux-gnu* )
+    machine=hp800 opsys=gnu-linux
+  ;;
 
   dnl Otherwise, check if the directory they specified is okay.
   * )
Index: xemacs21-21.4.22/lib-src/gnuclient.c
===================================================================
--- xemacs21-21.4.22.orig/lib-src/gnuclient.c	2013-11-15 14:19:46.762065047 +0000
+++ xemacs21-21.4.22/lib-src/gnuclient.c	2013-11-15 14:19:46.758065085 +0000
@@ -600,7 +600,7 @@
 		strncpy (remotepath, ptr, MAXPATHLEN);
 	    }
 #if 0  /* This is really bogus... re-enable it if you must have it! */
-#if defined (hp9000s300) || defined (hp9000s800)
+#if defined (__hpux)
 	  else if (strcmp (thishost,hostarg))
 	    {	/* try /net/thishost */
 	      strcpy (remotepath, "/net/");		/* (this fails using internet
Index: xemacs21-21.4.22/src/emacs.c
===================================================================
--- xemacs21-21.4.22.orig/src/emacs.c	2013-11-15 14:19:46.762065047 +0000
+++ xemacs21-21.4.22/src/emacs.c	2013-11-15 14:19:46.758065085 +0000
@@ -2368,7 +2368,7 @@
 #if defined (WIN32_NATIVE) || defined (CYGWIN)
   init_win32 ();
 #endif
-#if defined (HAVE_NATIVE_SOUND) && defined (hp9000s800)
+#if defined (HAVE_NATIVE_SOUND) && defined (__hpux)
   init_hpplay ();
 #endif
 #ifdef HAVE_TTY
Index: xemacs21-21.4.22/src/m/hp800.h
===================================================================
--- xemacs21-21.4.22.orig/src/m/hp800.h	2013-11-15 14:19:46.762065047 +0000
+++ xemacs21-21.4.22/src/m/hp800.h	2013-11-15 14:19:46.758065085 +0000
@@ -24,16 +24,8 @@
    operating system this machine is likely to run.
    USUAL-OPSYS="hpux"  */
 
-/* Now define a symbol for the cpu type, if your compiler
-   does not define it automatically:
-   Ones defined so far include vax, m68000, ns16000, pyramid,
-   orion, tahoe, APOLLO and many others */
-#ifndef hp9000s800
-#	define hp9000s800
-#endif
-
 
-#ifdef __hpux
+#if defined(__hpux) || defined(__linux__)
 /* Now define a symbol for the cpu type, if your compiler
    does not define it automatically:
    Ones defined so far include vax, m68000, ns16000, pyramid,
@@ -42,6 +34,15 @@
 #     define hp9000s800
 #endif
 
+#ifdef __linux__
+/* Data type of load average, as read out of kmem.  */
+
+#define LOAD_AVE_TYPE long
+
+/* Convert that into an integer that is 100 for a load average of 1.0  */
+
+#define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
+#else
 /* Data type of load average, as read out of kmem.  */
 
 #define LOAD_AVE_TYPE double
@@ -49,7 +50,7 @@
 /* Convert that into an integer that is 100 for a load average of 1.0  */
 
 #define LOAD_AVE_CVT(x) ((int) (x * 100.0))
-
+#endif
 
 /* Define CANNOT_DUMP on machines where unexec does not work.
    Then the function dump-emacs will not be defined
@@ -57,6 +58,7 @@
 
 #undef CANNOT_DUMP
 
+#ifdef __hpux
 /* Define C_ALLOCA if this machine does not support a true alloca
    and the one written in C should be used instead.
    Define HAVE_ALLOCA to say that the system provides a properly
@@ -82,6 +84,9 @@
 
 #define DATA_START    0x40000000
 #define TEXT_START    0x00000000
+#else
+#define HAVE_ALLOCA
+#endif
 
 #define STACK_DIRECTION 1 
 
@@ -95,6 +100,7 @@
 /* This machine requires completely different unexec code
    which lives in a separate file.  Specify the file name.  */
 
+#ifdef __hpux
 #define UNEXEC "unexhp9k800.o"
 
 #define LIBS_MACHINE
@@ -124,3 +130,4 @@
 #endif
 
 #endif /* __hpux */
+#endif /* __hpux || __linux */
Index: xemacs21-21.4.22/src/sound.c
===================================================================
--- xemacs21-21.4.22.orig/src/sound.c	2013-11-15 14:19:46.762065047 +0000
+++ xemacs21-21.4.22/src/sound.c	2013-11-15 14:19:46.762065047 +0000
@@ -653,7 +653,7 @@
 */ );
   Vnative_sound_only_on_console = Qt;
 
-#if defined (HAVE_NATIVE_SOUND) && defined (hp9000s800)
+#if defined (HAVE_NATIVE_SOUND) && defined (__hpux)
   {
     void vars_of_hpplay (void);
     vars_of_hpplay ();