Linuxconf patch
Hi there!!
Here is a patch to make linuxconf work on ia64.
Btw, should I send patches like this to the list, or I'm just filling up your mailboxes?
I'd also like to introduce myself, since I haven't had time to do so before. I've been working in the last two weeks to port Conectiva Linux to ia64. If you know about any way I can help you, or just want to exchange ideas (well, maybe this list is the best place to do this), please, let me know.
Thanks!
Signature · 3 lines
Gustavo Niemeyer [ 2AAC 7928 0FBF 0299 5EB5 60E2 2253 B29A 6664 3A0C ]
askrunlevel/boot.cc +1 -0
@@ -5,6 +5,7 @@ #include <fcntl.h> #include <sys/types.h> #include <time.h> +#include <sys/time.h> #include "askrunlevel.h" #include <misc.h> #include "../paths.h"
fstab/quota.cc +12 -0
@@ -366,6 +366,18 @@ { return syscall(__NR_quotactl, cmd, special, id, addr); } +#elif defined(__ia64__) + #include <asm/unistd.h> + int quotactl(int cmd, const char * special, int id, caddr_t addr) + { + register long r8 asm ("r8"); + asm volatile ("mov r15=%1\n\t" + "break %2" + : "=r"(r8) + : "g"(__NR_quotactl), "g"(__BREAK_SYSCALL), + "r"(cmd), "r"(special), "r"(id), "r"(addr)); + return r8; + } #else #define __LIBRARY__ #include <linux/unistd.h>
help.files/es/drbdconf/Makefile +1 -12
@@ -1,12 +1 @@ -CURDIR=drbdconf -all: doc -DOCS := $(shell cat FILE_LIST) - -include /usr/lib/linuxconf-devel/rules.mak - -doc: - @/usr/lib/linuxconf-devel/sgml_2_help.sh $(DOCS) - -install: - @/usr/lib/linuxconf-devel/install_helps.sh $(CURDIR) $(LIB_LINUXCONF) - +include ../../scripts/help.mak
help.files/es/heartbeatconf/Makefile +1 -12
@@ -1,12 +1 @@ -CURDIR=heartbeatconf -all: doc -DOCS := $(shell cat FILE_LIST) - -include /usr/lib/linuxconf-devel/rules.mak - -doc: - @/usr/lib/linuxconf-devel/sgml_2_help.sh $(DOCS) - -install: - @/usr/lib/linuxconf-devel/install_helps.sh $(CURDIR) $(LIB_LINUXCONF) - +include ../../scripts/help.mak
help.files/es/pslaveconf/Makefile +1 -12
@@ -1,12 +1 @@ -CURDIR=pslaveconf -all: doc -DOCS := $(shell cat FILE_LIST) - -include /usr/lib/linuxconf-devel/rules.mak - -doc: - @/usr/lib/linuxconf-devel/sgml_2_help.sh $(DOCS) - -install: - @/usr/lib/linuxconf-devel/install_helps.sh $(CURDIR) $(LIB_LINUXCONF) - +include ../../scripts/help.mak
help.files/pt/drbdconf/Makefile +1 -12
@@ -1,12 +1 @@ -CURDIR=drbdconf -all: doc -DOCS := $(shell cat FILE_LIST) - -include /usr/lib/linuxconf-devel/rules.mak - -doc: - @/usr/lib/linuxconf-devel/sgml_2_help.sh $(DOCS) - -install: - @/usr/lib/linuxconf-devel/install_helps.sh $(CURDIR) $(LIB_LINUXCONF) - +include ../../scripts/help.mak
help.files/pt/heartbeatconf/Makefile +1 -12
@@ -1,12 +1 @@ -CURDIR=heartbeatconf -all: doc -DOCS := $(shell cat FILE_LIST) - -include /usr/lib/linuxconf-devel/rules.mak - -doc: - @/usr/lib/linuxconf-devel/sgml_2_help.sh $(DOCS) - -install: - @/usr/lib/linuxconf-devel/install_helps.sh $(CURDIR) $(LIB_LINUXCONF) - +include ../../scripts/help.mak
help.files/pt/pslaveconf/Makefile +1 -12
@@ -1,12 +1 @@ -CURDIR=pslaveconf -all: doc -DOCS := $(shell cat FILE_LIST) - -include /usr/lib/linuxconf-devel/rules.mak - -doc: - @/usr/lib/linuxconf-devel/sgml_2_help.sh $(DOCS) - -install: - @/usr/lib/linuxconf-devel/install_helps.sh $(CURDIR) $(LIB_LINUXCONF) - +include ../../scripts/help.mak
help.files/sources/drbdconf/Makefile +1 -12
@@ -1,12 +1 @@ -CURDIR=drbdconf -all: doc -DOCS := $(shell cat FILE_LIST) - -include /usr/lib/linuxconf-devel/rules.mak - -doc: - @/usr/lib/linuxconf-devel/sgml_2_help.sh $(DOCS) - -install: - @/usr/lib/linuxconf-devel/install_helps.sh $(CURDIR) $(LIB_LINUXCONF) - +include ../../scripts/help.mak
help.files/sources/heartbeatconf/Makefile +1 -12
@@ -1,12 +1 @@ -CURDIR=heartbeatconf -all: doc -DOCS := $(shell cat FILE_LIST) - -include /usr/lib/linuxconf-devel/rules.mak - -doc: - @/usr/lib/linuxconf-devel/sgml_2_help.sh $(DOCS) - -install: - @/usr/lib/linuxconf-devel/install_helps.sh $(CURDIR) $(LIB_LINUXCONF) - +include ../../scripts/help.mak
help.files/sources/pslaveconf/Makefile +1 -12
@@ -1,12 +1 @@ -CURDIR=pslaveconf -all: doc -DOCS := $(shell cat FILE_LIST) - -include /usr/lib/linuxconf-devel/rules.mak - -doc: - @/usr/lib/linuxconf-devel/sgml_2_help.sh $(DOCS) - -install: - @/usr/lib/linuxconf-devel/install_helps.sh $(CURDIR) $(LIB_LINUXCONF) - +include ../../scripts/help.mak
libmodules/parsers/isc.cc +1 -1
@@ -66,7 +66,7 @@ if (pt != NULL){ char *start = tmp; while (start < pt){ - if (!isspace(start)) break; + if (!isspace(*start)) break; start++; } if (start == pt){
main/linuxconf.cc +2 -0
@@ -256,6 +256,8 @@ { "Motorola", "mvme" }, { NULL, NULL } }; +#elif defined(__ia64__) + static const char keymap_arch[]="ia64"; #else #error Need a ifdef for your architecture here #endif
modules/Xkbdconf/XFconfig.c +1 -0
@@ -3,6 +3,7 @@#include <stdio.h> #include <stdarg.h> #include <string.h> +#include <stdlib.h> #include <X11/Xlib.h> #include <X11/XKBlib.h> #include <X11/extensions/XKBgeom.h>
modules/mouseconf/mousedetect.c +1 -0
@@ -13,6 +13,7 @@#include <locale.h> #include <libgen.h> */ +#include <string.h> #include <kudzu.h>
rules.mak +1 -1
@@ -55,7 +55,7 @@ WWWBASE=$(HOME)/n/dnshtml WWWTECHBASE=$(WWWBASE)/linuxconf/tech SPEC_FILE = $(shell $(GCC) -v 2>&1 | head -1 | sed 's/^.* //') -LD_LINUX = $(notdir $(shell cat $(SPEC_FILE) | sed -n -e '/:-dynamic-linker/s/^.*:-dynamic-linker \([^}]*\).*/\1/p')) +LD_LINUX = $(patsubst ld-linux%.so.2,ld-linux.so.2,$(notdir $(shell cat $(SPEC_FILE) | sed -n -e '/:-dynamic-linker/s/^.*:-dynamic-linker \([^}]*\).*/\1/p'))) ifeq ($(LD_LINUX),ld-linux.so.2) CRYPTLIB=-lcrypt PAMLIB=-lpam
modules/mouseconf/XFmousereset.c +2 -2
@@ -11,5 +11,5 @@ -// #include <stdlib.h> +#include <stdlib.h> #include <stdio.h> -// #include <string.h> +#include <string.h> #include <X11/Xlib.h>
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Gustavo" = Gustavo Niemeyer <[email protected]> writes:
Gustavo> I'd also like to introduce myself, since I haven't had time Gustavo> to do so before. I've been working in the last two weeks to Gustavo> port Conectiva Linux to ia64. If you know about any way I can Gustavo> help you, or just want to exchange ideas (well, maybe this Gustavo> list is the best place to do this), please, let me know.
Very nice
However, I noticed the following:
fstab/quota.cc +12 -0
@@ -366,6 +366,18 @@ { return syscall(__NR_quotactl, cmd, special, id, addr); } +#elif defined(__ia64__) + #include <asm/unistd.h> + int quotactl(int cmd, const char * special, int id, caddr_t addr) + { + register long r8 asm ("r8"); + asm volatile ("mov r15=%1\n\t" + "break %2" + : "=r"(r8) + : "g"(__NR_quotactl), "g"(__BREAK_SYSCALL), + "r"(cmd), "r"(special), "r"(id), "r"(addr)); + return r8; + }
Please don't inline the syscall like that. We do support syscall() in glibc and it would be nicer (and future compatible) if you use that instead.
Cheers
Jes
[...]
Quoted 3 lines
Please don't inline the syscall like that. We do support
syscall()in glibc and it would be nicer (and future compatible) if you use that instead.
I'll do this. Thanks!
Signature · 3 lines
Gustavo Niemeyer [ 2AAC 7928 0FBF 0299 5EB5 60E2 2253 B29A 6664 3A0C ]
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Jes Sorensen
Jes> Please don't inline the syscall like that. We do support Jes> syscall() in glibc and it would be nicer (and future Jes> compatible) if you use that instead.
Better still: use the libc provided stub when one is available. glibc2.2 already defines quotactl(). I'd recommend to use autoconf to check for quotactl() and fall back on syscall() when it doesn't exist in libc (no need to do this for IA-64 Linux though, as glibc-2.2 already supports this).
--david
PS: It's fine to send such patches to linux-ia64, but I'd also
recommend to directly forward the fixes to the author/maintainer of the program.
Quoted 11 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Jes Sorensen
Jes> Please don't inline the syscall like that. We do support Jes>
syscall()in glibc and it would be nicer (and future Jes> compatible) if you use that instead.Better still: use the libc provided stub when one is available. glibc2.2 already defines
quotactl(). I'd recommend to use autoconf to check forquotactl()and fall back onsyscall()when it doesn't exist in libc (no need to do this for IA-64 Linux though, as glibc-2.2 already supports this).
Linuxconf 1.25r3 already has the fix. It is using quotactl directly. No syscall. I am not supporting libc anymore. This code was old.
Signature · 4 lines
--------------------------------------------------------- Jacques Gelinas <[email protected]> nt2linux: NT to Linux migration kit http://www.solucorp.qc.ca/