Accepting request 162509 from home:k0da:ppc
- src/socket.d (get_hostname): turn into a function and allocate the array in the caller to support gcc 4.7 [patch#3474660] fixes ppc socket.d failing test. (clisp-hostname.patch) OBS-URL: https://build.opensuse.org/request/show/162509 OBS-URL: https://build.opensuse.org/package/show/devel:languages:misc/clisp?expand=0&rev=38
This commit is contained in:
parent
d5a36a868b
commit
bc209281dc
74
clisp-hostname.patch
Normal file
74
clisp-hostname.patch
Normal file
@ -0,0 +1,74 @@
|
||||
--- src/socket.d.orig 2009-10-08 08:45:13.000000000 -0600
|
||||
+++ src/socket.d 2012-01-12 11:22:24.701723636 -0700
|
||||
@@ -57,8 +57,8 @@
|
||||
/* ============ hostnames and IP addresses only (no sockets) ============
|
||||
|
||||
Fetches the machine's host name.
|
||||
- get_hostname(host =);
|
||||
- The name is allocated on the stack, with dynamic extent.
|
||||
+ get_hostname(hostname);
|
||||
+ where hostname is an array of MAXHOSTNAMELEN+1 characters.
|
||||
< const char* host: The host name.
|
||||
(Note: In some cases we could get away with less system calls by simply
|
||||
setting
|
||||
@@ -67,13 +67,12 @@
|
||||
sds: never: you will always get localhost/127.0.0.1 - what's the point? */
|
||||
#if defined(HAVE_GETHOSTNAME)
|
||||
/* present on all supported unix systems and on woe32 */
|
||||
- #define get_hostname(host_assignment) \
|
||||
- do { var char hostname[MAXHOSTNAMELEN+1]; \
|
||||
+ #define get_hostname(hostname) \
|
||||
+ do { \
|
||||
begin_system_call(); \
|
||||
if ( gethostname(&hostname[0],MAXHOSTNAMELEN) <0) { SOCK_error(); } \
|
||||
end_system_call(); \
|
||||
hostname[MAXHOSTNAMELEN] = '\0'; \
|
||||
- host_assignment &hostname[0]; \
|
||||
} while(0)
|
||||
#else
|
||||
#error get_hostname is not defined
|
||||
@@ -207,8 +206,8 @@ LISPFUNN(machine_instance,0)
|
||||
(if (or (null address) (zerop (length address)))
|
||||
hostname
|
||||
(apply #'string-concat hostname " [" (inet-ntop address) "]"))) */
|
||||
- var const char* host;
|
||||
- get_hostname(host =);
|
||||
+ var char host[MAXHOSTNAMELEN+1];
|
||||
+ get_hostname(host);
|
||||
result = asciz_to_string(host,O(misc_encoding)); /* hostname as result */
|
||||
#ifdef HAVE_GETHOSTBYNAME
|
||||
pushSTACK(result); /* hostname as 1st string */
|
||||
@@ -389,8 +388,8 @@ local int resolve_host1 (const void* add
|
||||
modexp struct hostent* resolve_host (object arg) {
|
||||
var struct hostent* he;
|
||||
if (eq(arg,S(Kdefault))) {
|
||||
- var char* host;
|
||||
- get_hostname(host =);
|
||||
+ var char host[MAXHOSTNAMELEN+1];
|
||||
+ get_hostname(host);
|
||||
begin_system_call();
|
||||
he = gethostbyname(host);
|
||||
end_system_call();
|
||||
@@ -724,8 +723,9 @@ global SOCKET connect_to_x_server (const
|
||||
if (conntype == conn_tcp) {
|
||||
var unsigned short port = X_TCP_PORT+display;
|
||||
if (host[0] == '\0') {
|
||||
- get_hostname(host =);
|
||||
- fd = with_host_port(host,port,&connect_to_x_via_ip,NULL);
|
||||
+ var char hostname[MAXHOSTNAMELEN+1];
|
||||
+ get_hostname(hostname);
|
||||
+ fd = with_host_port(hostname,port,&connect_to_x_via_ip,NULL);
|
||||
} else {
|
||||
fd = with_host_port(host,port,&connect_to_x_via_ip,NULL);
|
||||
}
|
||||
@@ -798,8 +798,8 @@ global host_data_t * socket_getlocalname
|
||||
if (socket_getlocalname_aux(socket_handle,hd) == NULL)
|
||||
return NULL;
|
||||
if (resolve_p) { /* Fill in hd->truename. */
|
||||
- var const char* host;
|
||||
- get_hostname(host =); /* was: host = "localhost"; */
|
||||
+ var char host[MAXHOSTNAMELEN+1];
|
||||
+ get_hostname(host); /* was: host = "localhost"; */
|
||||
ASSERT(strlen(host) <= MAXHOSTNAMELEN);
|
||||
strcpy(hd->truename,host);
|
||||
} else {
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 3 17:35:18 UTC 2013 - dvaleev@suse.com
|
||||
|
||||
- src/socket.d (get_hostname): turn into a function and allocate the
|
||||
array in the caller to support gcc 4.7 [patch#3474660]
|
||||
fixes ppc socket.d failing test. (clisp-hostname.patch)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 28 15:03:30 UTC 2012 - toganm@opensuse.org
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package clisp
|
||||
#
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -64,6 +64,8 @@ Patch10: ffcall-1.10+2.43.dif
|
||||
Patch11: fix-build-in-qemu.patch
|
||||
Patch12: clisp-linux.patch
|
||||
Patch13: clisp-glibc-fix.patch
|
||||
#PATCH-FIX-UPSTREAM patch#3474660 changeset 15557 4f5985f83127
|
||||
Patch14: clisp-hostname.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%global vimdir %{_datadir}/vim/site/after/syntax
|
||||
%global xarch ppc64 s390x armv4l
|
||||
@ -113,6 +115,7 @@ contains two nice applications.
|
||||
%if 0%{?suse_version} > 1220
|
||||
%patch13 -p1 -b .glibc
|
||||
%endif
|
||||
%patch14 -p0
|
||||
|
||||
%build
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user