]> git.pld-linux.org Git - packages/XFree86.git/blob - XFree86-imake-kernel-version.patch
- 4.8.0 (probably the last XFree86 version ever, for comparison and archival reasons)
[packages/XFree86.git] / XFree86-imake-kernel-version.patch
1 diff -ur XFree86-4.0.2/xc/config/imake/Imakefile XFree86-4.0.2.new/xc/config/imake/Imakefile
2 --- XFree86-4.0.2/xc/config/imake/Imakefile     Sat Aug 14 12:49:01 1999
3 +++ XFree86-4.0.2.new/xc/config/imake/Imakefile Sat Dec 23 17:48:28 2000
4 @@ -15,10 +15,14 @@
5  CPP_DEFINES = -DCPP_PROGRAM="\"$(CPP_PROGRAM)\""
6  GCC_COMMAND = $(CC) -fmerge-constants -xc /dev/null -S -o /dev/null 2> /dev/null 1> /dev/null
7  GCC_DEFINES = -DHAS_MERGE_CONSTANTS=`if $(GCC_COMMAND); then echo 1; else echo 0; fi`
8 -DEFINES = $(SIGNAL_DEFINES) $(BOOTSTRAPCFLAGS) $(CPP_DEFINES) $(GCC_DEFINES)
9 +DEFINES = $(SIGNAL_DEFINES) $(BOOTSTRAPCFLAGS) $(CPP_DEFINES) $(GCC_DEFINES) -DDEFAULT_OS_CPU_FROB="\"$(DEFAULT_OS_CPU_FROB)\""
10  
11  #if defined(MacIIArchitecture) || defined(SequentArchitecture) || defined(i386ScoArchitecture)
12  XBSDLIB = /**/
13 +#endif
14 +
15 +#if !defined(DEFAULT_OS_CPU_FROB)
16 +DEFAULT_OS_CPU_FROB = `uname -m`
17  #endif
18  
19  #if !defined(OS2Architecture)
20 diff -ur XFree86-4.0.2/xc/config/imake/Makefile.ini XFree86-4.0.2.new/xc/config/imake/Makefile.ini
21 --- XFree86-4.0.2/xc/config/imake/Makefile.ini  Sat Oct 28 03:15:23 2000
22 +++ XFree86-4.0.2.new/xc/config/imake/Makefile.ini      Sat Dec 23 17:48:37 2000
23 @@ -9,11 +9,15 @@
24  #
25  # $XFree86: xc/config/imake/Makefile.ini,v 3.9 2000/10/26 17:57:45 dawes Exp $
26  
27 +#if !defined(DEFAULT_OS_CPU_FROB)
28 +DEFAULT_OS_CPU_FROB = `uname -m`
29 +#endif
30 +
31  BOOTSTRAPCFLAGS = 
32  CC = cc
33  CDEBUGFLAGS = -O
34  INCLUDES = -I../../include -I../../imports/x11/include/X11
35 -CFLAGS = $(BOOTSTRAPCFLAGS) $(CDEBUGFLAGS) $(INCLUDES)
36 +CFLAGS = $(BOOTSTRAPCFLAGS) $(CDEBUGFLAGS) $(INCLUDES) -DDEFAULT_OS_CPU_FROB="\"$(DEFAULT_OS_CPU_FROB)\""
37  SHELL = /bin/sh
38  RM = rm -f
39  MV = mv
40 diff -ur XFree86-4.0.2/xc/config/imake/imake.c XFree86-4.0.2.new/xc/config/imake/imake.c
41 --- XFree86-4.0.2/xc/config/imake/imake.c       Sat Dec 23 17:53:30 2000
42 +++ XFree86-4.0.2.new/xc/config/imake/imake.c   Sat Dec 23 17:51:03 2000
43 @@ -265,6 +265,8 @@
44  #if defined(linux) || defined(__GNU__)
45  #include <limits.h>
46  #include <stdio.h>
47 +#include <linux/uts.h>
48 +#include <linux/version.h>
49  #endif
50  #ifdef __QNX__
51  #include <unix.h>
52 @@ -1208,57 +1210,19 @@
53  #if !defined(WIN32) && !defined(__EMX__)
54  #if (defined(DEFAULT_OS_NAME) || defined(DEFAULT_OS_MAJOR_REV) || \
55       defined(DEFAULT_OS_MINOR_REV) || defined(DEFAULT_OS_TEENY_REV))
56 -       struct utsname name;
57 -       char buf[SYS_NMLN * 5 + 1];
58  
59 -       /* Obtain the system information. */
60 -       if (uname(&name) < 0)
61 -               LogFatal("Cannot invoke uname", "");
62 -
63 -# ifdef DEFAULT_OS_NAME
64 -       parse_utsname(&name, DEFAULT_OS_NAME, buf, 
65 -                     "Bad DEFAULT_OS_NAME syntax %s");
66 -#  ifdef DEFAULT_OS_NAME_FROB
67 -       DEFAULT_OS_NAME_FROB(buf, sizeof buf);
68 -#  endif
69 -       if (buf[0] != '\0')
70 -               fprintf(inFile, "#define DefaultOSName %s\n", buf);
71 -# endif
72 +       fprintf(inFile, "#define DefaultOSName %s %s %s\n",
73 +               UTS_SYSNAME, UTS_RELEASE, DEFAULT_OS_CPU_FROB);
74  
75 -# ifdef DEFAULT_OS_MAJOR_REV
76 -       parse_utsname(&name, DEFAULT_OS_MAJOR_REV, buf,
77 -                     "Bad DEFAULT_OS_MAJOR_REV syntax %s");
78 -#  ifdef DEFAULT_OS_MAJOR_REV_FROB
79 -       DEFAULT_OS_MAJOR_REV_FROB(buf, sizeof buf);
80 -#  endif
81 -       fprintf(inFile, "#define DefaultOSMajorVersion %s\n",
82 -               *buf ? trim_version(buf) : "0");
83 -# endif
84 +       fprintf(inFile, "#define DefaultOSMajorVersion %d\n",
85 +               LINUX_VERSION_CODE >> 16);
86  
87 -# ifdef DEFAULT_OS_MINOR_REV
88 -       parse_utsname(&name, DEFAULT_OS_MINOR_REV, buf,
89 -                     "Bad DEFAULT_OS_MINOR_REV syntax %s");
90 -#  ifdef DEFAULT_OS_MINOR_REV_FROB
91 -       DEFAULT_OS_MINOR_REV_FROB(buf, sizeof buf);
92 -#  endif
93 -       fprintf(inFile, "#define DefaultOSMinorVersion %s\n",
94 -               *buf ? trim_version(buf) : "0");
95 -# endif
96 +       fprintf(inFile, "#define DefaultOSMinorVersion %d\n",
97 +               (LINUX_VERSION_CODE >> 8) & 0xFF);
98 +
99 +       fprintf(inFile, "#define DefaultOSTeenyVersion %d\n",
100 +               LINUX_VERSION_CODE & 0xFF);
101  
102 -# ifdef DEFAULT_OS_TEENY_REV
103 -       parse_utsname(&name, DEFAULT_OS_TEENY_REV, buf,
104 -                     "Bad DEFAULT_OS_TEENY_REV syntax %s");
105 -#  ifdef DEFAULT_OS_TEENY_REV_FROB
106 -       DEFAULT_OS_TEENY_REV_FROB(buf, sizeof buf);
107 -#  endif
108 -       fprintf(inFile, "#define DefaultOSTeenyVersion %s\n",
109 -               *buf ? trim_version(buf) : "0");
110 -# endif
111 -# ifdef DEFAULT_MACHINE_ARCHITECTURE
112 -       parse_utsname(&name, DEFAULT_MACHINE_ARCHITECTURE, buf, 
113 -                     "Bad DEFAULT_MACHINE_ARCHITECTURE %s");
114 -       fprintf(inFile, "#ifndef %s\n# define %s\n#endif\n", buf, buf);
115 -# endif
116  #endif
117  #ifdef linux
118      get_distrib (inFile);
This page took 0.037904 seconds and 3 git commands to generate.