Gentoo Archives: gentoo-commits

From: "Alin Nastac (mrness)" <mrness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-dialup/fbgetty/files: fbgetty-0.1.698-gcc41.patch
Date: Sat, 27 Oct 2007 08:49:11
Message-Id: E1IlhE2-00042A-DE@stork.gentoo.org
1 mrness 07/10/27 08:40:58
2
3 Added: fbgetty-0.1.698-gcc41.patch
4 Log:
5 Fix gcc-4.1 compilation problems (#197045).
6 (Portage version: 2.1.3.9)
7
8 Revision Changes Path
9 1.1 net-dialup/fbgetty/files/fbgetty-0.1.698-gcc41.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dialup/fbgetty/files/fbgetty-0.1.698-gcc41.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dialup/fbgetty/files/fbgetty-0.1.698-gcc41.patch?rev=1.1&content-type=text/plain
13
14 Index: fbgetty-0.1.698-gcc41.patch
15 ===================================================================
16 diff -Nru fbgetty-0.1.698.orig/include/fbgetty/generated/fgoptions.awk fbgetty-0.1.698/include/fbgetty/generated/fgoptions.awk
17 --- fbgetty-0.1.698.orig/include/fbgetty/generated/fgoptions.awk 2001-07-11 23:01:15.000000000 +0300
18 +++ fbgetty-0.1.698/include/fbgetty/generated/fgoptions.awk 2007-10-27 11:29:50.000000000 +0300
19 @@ -45,8 +45,7 @@
20 name = $3;
21 type = $2;
22
23 - printf("#define OFFSET_%s (offsetof(struct fbgetty_options_t, %s))\n", name, name);
24 - printf(" %s %s;\n\n", type, name);
25 + printf(" %s %s;\n", type, name);
26 }
27
28 END {
29 diff -Nru fbgetty-0.1.698.orig/src/options.c fbgetty-0.1.698/src/options.c
30 --- fbgetty-0.1.698.orig/src/options.c 2001-12-17 22:55:42.000000000 +0200
31 +++ fbgetty-0.1.698/src/options.c 2007-10-27 11:32:53.000000000 +0300
32 @@ -27,7 +27,7 @@
33 */
34
35 #include <fbgetty/global.h>
36 -
37 +#include <stddef.h>
38
39 #include <stdio.h>
40 #include <stdlib.h>
41 @@ -141,7 +141,7 @@
42 #define ENV_BINARY 0x04
43 #define ENV_LEDS 0x08
44
45 -#define ENV_ENTRY(name, type, ptr) { name, type, OFFSET_ ## ptr }
46 +#define ENV_ENTRY(name, type, ptr) { name, type, offsetof(struct fbgetty_options_t, ptr) }
47
48 static struct env_entry
49 {
50 @@ -899,20 +899,20 @@
51 }
52 merge_option_list[] =
53 {
54 - { OFFSET_tty_device , MERGE_STR, NULL, -1 },
55 + { offsetof(struct fbgetty_options_t, tty_device) , MERGE_STR, NULL, -1 },
56 #ifdef USE_FRAME_BUFFER
57 - { OFFSET_fb_device, MERGE_STR, NULL, -1 },
58 + { offsetof(struct fbgetty_options_t, fb_device), MERGE_STR, NULL, -1 },
59 #endif
60
61 - { OFFSET_login_program, MERGE_STR, LOGIN_PROGRAM, -1 },
62 - { OFFSET_login_prompt, MERGE_STR, LOGIN_PROMPT, -1 },
63 - { OFFSET_issue_filename, MERGE_STR, ISSUE_FILE, -1 },
64 + { offsetof(struct fbgetty_options_t, login_program), MERGE_STR, LOGIN_PROGRAM, -1 },
65 + { offsetof(struct fbgetty_options_t, login_prompt), MERGE_STR, LOGIN_PROMPT, -1 },
66 + { offsetof(struct fbgetty_options_t, issue_filename), MERGE_STR, ISSUE_FILE, -1 },
67
68 - { OFFSET_login_timeout, MERGE_INT, NULL, LOGIN_TIMEOUT },
69 - { OFFSET_issue_refresh, MERGE_INT, NULL, ISSUE_REFRESH },
70 - { OFFSET_screen_clear, MERGE_INT, NULL, TRUE },
71 + { offsetof(struct fbgetty_options_t, login_timeout), MERGE_INT, NULL, LOGIN_TIMEOUT },
72 + { offsetof(struct fbgetty_options_t, issue_refresh), MERGE_INT, NULL, ISSUE_REFRESH },
73 + { offsetof(struct fbgetty_options_t, screen_clear), MERGE_INT, NULL, TRUE },
74
75 - { OFFSET_leds, MERGE_INT, NULL, 0 },
76 + { offsetof(struct fbgetty_options_t, leds), MERGE_INT, NULL, 0 },
77 { 0, 0, NULL, -1 }
78 };
79
80
81
82
83 --
84 gentoo-commits@g.o mailing list