comparison sources/patches/linux-2.6.28-perl2.patch @ 1231:0a1a177d0e28

Long overdue upgrade to 2.6.35, I'll fix the architectures this breaks later.
author Rob Landley <rob@landley.net>
date Tue, 31 Aug 2010 18:25:34 -0500
parents 4e798d7aa5f9
children
comparison
equal deleted inserted replaced
1230:50015325b804 1231:0a1a177d0e28
11 scripts/Makefile.headersinst | 6 ++-- 11 scripts/Makefile.headersinst | 6 ++--
12 scripts/headers_install.pl | 49 --------------------------------- 12 scripts/headers_install.pl | 49 ---------------------------------
13 scripts/headers_install.sh | 39 ++++++++++++++++++++++++++ 13 scripts/headers_install.sh | 39 ++++++++++++++++++++++++++
14 3 files changed, 42 insertions(+), 52 deletions(-) 14 3 files changed, 42 insertions(+), 52 deletions(-)
15 15
16 diff -ruN linux-2.6.30.old/scripts/headers_install.pl linux-2.6.30/scripts/headers_install.pl
17 --- linux-2.6.30.old/scripts/headers_install.pl 2009-06-09 22:05:27.000000000 -0500
18 +++ linux-2.6.30/scripts/headers_install.pl 1969-12-31 18:00:00.000000000 -0600
19 @@ -1,49 +0,0 @@
20 -#!/usr/bin/perl -w
21 -#
22 -# headers_install prepare the listed header files for use in
23 -# user space and copy the files to their destination.
24 -#
25 -# Usage: headers_install.pl readdir installdir arch [files...]
26 -# readdir: dir to open files
27 -# installdir: dir to install the files
28 -# arch: current architecture
29 -# arch is used to force a reinstallation when the arch
30 -# changes because kbuild then detect a command line change.
31 -# files: list of files to check
32 -#
33 -# Step in preparation for users space:
34 -# 1) Drop all use of compiler.h definitions
35 -# 2) Drop include of compiler.h
36 -# 3) Drop all sections defined out by __KERNEL__ (using unifdef)
37 -
38 -use strict;
39 -
40 -my ($readdir, $installdir, $arch, @files) = @ARGV;
41 -
42 -my $unifdef = "scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__";
43 -
44 -foreach my $file (@files) {
45 - local *INFILE;
46 - local *OUTFILE;
47 - my $tmpfile = "$installdir/$file.tmp";
48 - open(INFILE, "<$readdir/$file")
49 - or die "$readdir/$file: $!\n";
50 - open(OUTFILE, ">$tmpfile") or die "$tmpfile: $!\n";
51 - while (my $line = <INFILE>) {
52 - $line =~ s/([\s(])__user\s/$1/g;
53 - $line =~ s/([\s(])__force\s/$1/g;
54 - $line =~ s/([\s(])__iomem\s/$1/g;
55 - $line =~ s/\s__attribute_const__\s/ /g;
56 - $line =~ s/\s__attribute_const__$//g;
57 - $line =~ s/^#include <linux\/compiler.h>//;
58 - $line =~ s/(^|\s)(inline)\b/$1__$2__/g;
59 - $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g;
60 - $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g;
61 - printf OUTFILE "%s", $line;
62 - }
63 - close OUTFILE;
64 - close INFILE;
65 - system $unifdef . " $tmpfile > $installdir/$file";
66 - unlink $tmpfile;
67 -}
68 -exit 0;
69 diff -ruN linux-2.6.30.old/scripts/headers_install.sh linux-2.6.30/scripts/headers_install.sh 16 diff -ruN linux-2.6.30.old/scripts/headers_install.sh linux-2.6.30/scripts/headers_install.sh
70 --- linux-2.6.30.old/scripts/headers_install.sh 1969-12-31 18:00:00.000000000 -0600 17 --- linux-2.6.30.old/scripts/headers_install.sh 1969-12-31 18:00:00.000000000 -0600
71 +++ linux-2.6.30/scripts/headers_install.sh 2009-06-22 16:21:23.000000000 -0500 18 +++ linux-2.6.30/scripts/headers_install.sh 2009-06-22 16:21:23.000000000 -0500
72 @@ -0,0 +1,39 @@ 19 @@ -0,0 +1,39 @@
73 +#!/bin/sh 20 +#!/bin/sh
130 -$(install-file): scripts/headers_install.pl $(input-files) FORCE 77 -$(install-file): scripts/headers_install.pl $(input-files) FORCE
131 +$(install-file): scripts/headers_install.sh $(input-files) FORCE 78 +$(install-file): scripts/headers_install.sh $(input-files) FORCE
132 $(if $(unwanted),$(call cmd,remove),) 79 $(if $(unwanted),$(call cmd,remove),)
133 $(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@))) 80 $(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
134 $(call if_changed,install) 81 $(call if_changed,install)
82 --- linux/scripts/headers_install.pl 2010-08-01 17:11:14.000000000 -0500
83 +++ /dev/null 2010-07-26 16:01:48.630190848 -0500
84 @@ -1,50 +0,0 @@
85 -#!/usr/bin/perl -w
86 -#
87 -# headers_install prepare the listed header files for use in
88 -# user space and copy the files to their destination.
89 -#
90 -# Usage: headers_install.pl readdir installdir arch [files...]
91 -# readdir: dir to open files
92 -# installdir: dir to install the files
93 -# arch: current architecture
94 -# arch is used to force a reinstallation when the arch
95 -# changes because kbuild then detect a command line change.
96 -# files: list of files to check
97 -#
98 -# Step in preparation for users space:
99 -# 1) Drop all use of compiler.h definitions
100 -# 2) Drop include of compiler.h
101 -# 3) Drop all sections defined out by __KERNEL__ (using unifdef)
102 -
103 -use strict;
104 -
105 -my ($readdir, $installdir, $arch, @files) = @ARGV;
106 -
107 -my $unifdef = "scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__";
108 -
109 -foreach my $file (@files) {
110 - my $tmpfile = "$installdir/$file.tmp";
111 -
112 - open(my $in, '<', "$readdir/$file")
113 - or die "$readdir/$file: $!\n";
114 - open(my $out, '>', $tmpfile)
115 - or die "$tmpfile: $!\n";
116 - while (my $line = <$in>) {
117 - $line =~ s/([\s(])__user\s/$1/g;
118 - $line =~ s/([\s(])__force\s/$1/g;
119 - $line =~ s/([\s(])__iomem\s/$1/g;
120 - $line =~ s/\s__attribute_const__\s/ /g;
121 - $line =~ s/\s__attribute_const__$//g;
122 - $line =~ s/^#include <linux\/compiler.h>//;
123 - $line =~ s/(^|\s)(inline)\b/$1__$2__/g;
124 - $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g;
125 - $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g;
126 - printf {$out} "%s", $line;
127 - }
128 - close $out;
129 - close $in;
130 -
131 - system $unifdef . " $tmpfile > $installdir/$file";
132 - unlink $tmpfile;
133 -}
134 -exit 0;