patches/uClibc/0.9.30.1/180-getline-conflict.patch
author Johannes Stezenbach <js@sig21.net>
Thu Jul 29 19:30:37 2010 +0200 (2010-07-29)
branch1.7
changeset 2047 ace1d90c9b15
permissions -rw-r--r--
scripts: remove . from $PATH

Add CT_SanitizePath function which removes entries referring to ., /tmp
and non-existing directories from $PATH, and call it early in the
build script.

If . is in PATH, gcc-4.4.4 build breaks:

[ALL ] checking what assembler to use...
/tmp/build/targets/arm-unknown-linux-uclibcgnueabi/build/gcc-core-static/arm-unknown-linux-uclibcgnueabi/bin/as
...
[ALL ] config.status: creating as

i.e. "as" is supposed to be the arm-unknown-linux-uclibcgnueabi cross assembler,
but config.status creates a local "as" script which is calling the
host assembler.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
[Yann E. MORIN: style fixes + explanations]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 20dd8cef1c8adff0aa3e78ae6d7acfbc45ed5a83)
zdevai@1602
     1
--- a/extra/scripts/unifdef.c
zdevai@1602
     2
+++ b/extra/scripts/unifdef.c
zdevai@1602
     3
@@ -206,7 +206,7 @@
zdevai@1602
     4
 static void             error(const char *);
zdevai@1602
     5
 static int              findsym(const char *);
zdevai@1602
     6
 static void             flushline(bool);
zdevai@1602
     7
-static Linetype         getline(void);
zdevai@1602
     8
+static Linetype         get_line(void);
zdevai@1602
     9
 static Linetype         ifeval(const char **);
zdevai@1602
    10
 static void             ignoreoff(void);
zdevai@1602
    11
 static void             ignoreon(void);
zdevai@1602
    12
@@ -512,7 +512,7 @@
zdevai@1602
    13
zdevai@1602
    14
 	for (;;) {
zdevai@1602
    15
 		linenum++;
zdevai@1602
    16
-		lineval = getline();
zdevai@1602
    17
+		lineval = get_line();
zdevai@1602
    18
 		trans_table[ifstate[depth]][lineval]();
zdevai@1602
    19
 		debug("process %s -> %s depth %d",
zdevai@1602
    20
 		    linetype_name[lineval],
zdevai@1602
    21
@@ -526,7 +526,7 @@
zdevai@1602
    22
  * help from skipcomment().
zdevai@1602
    23
  */
zdevai@1602
    24
 static Linetype
zdevai@1602
    25
-getline(void)
zdevai@1602
    26
+get_line(void)
zdevai@1602
    27
 {
zdevai@1602
    28
 	const char *cp;
zdevai@1602
    29
 	int cursym;
zdevai@1602
    30