From d3d3cea6bdd53b48fcb09c97f09b56f24d505566 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 29 Dec 2012 00:49:21 +0100 Subject: [PATCH] glibc: Update rpcgen-path.patch --- .../libraries/glibc/2.17/rpcgen-path.patch | 54 +++++++------------ 1 file changed, 18 insertions(+), 36 deletions(-) diff --git a/pkgs/development/libraries/glibc/2.17/rpcgen-path.patch b/pkgs/development/libraries/glibc/2.17/rpcgen-path.patch index fbb03dd5fad..fd81ab5324e 100644 --- a/pkgs/development/libraries/glibc/2.17/rpcgen-path.patch +++ b/pkgs/development/libraries/glibc/2.17/rpcgen-path.patch @@ -1,19 +1,16 @@ -By default, rpcgen(1) looks for cpp(1) from a list of fixed absolute paths -(`/lib/cpp', etc.), which may only be overrided with the `-Y' option. This -patch makes it run any `cpp' command found in $PATH. - ---- glibc-2.7/sunrpc/rpc_main.c 2006-11-10 21:54:46.000000000 +0100 -+++ glibc-2.7/sunrpc/rpc_main.c 2009-04-22 14:32:10.000000000 +0200 -@@ -79,7 +79,7 @@ static const char *cmdname; +diff -ru glibc-2.17-orig/sunrpc/rpc_main.c glibc-2.17/sunrpc/rpc_main.c +--- glibc-2.17-orig/sunrpc/rpc_main.c 2012-12-25 04:02:13.000000000 +0100 ++++ glibc-2.17/sunrpc/rpc_main.c 2012-12-29 00:21:04.124698455 +0100 +@@ -77,7 +77,7 @@ static const char *svcclosetime = "120"; static int cppDefined; /* explicit path for C preprocessor */ --static const char *CPP = SUNOS_CPP; +-static const char *CPP = "/lib/cpp"; +static const char *CPP = "cpp"; static const char CPPFLAGS[] = "-C"; static char *pathbuf; static int cpp_pid; -@@ -108,7 +108,6 @@ static char *extendfile (const char *fil +@@ -106,7 +106,6 @@ static void open_output (const char *infile, const char *outfile); static void add_warning (void); static void clear_args (void); @@ -21,7 +18,7 @@ patch makes it run any `cpp' command found in $PATH. static void open_input (const char *infile, const char *define); static int check_nettype (const char *name, const char *list_to_check[]); static void c_output (const char *infile, const char *define, -@@ -327,31 +326,6 @@ clear_args (void) +@@ -318,25 +317,6 @@ argcount = FIXEDARGS; } @@ -31,29 +28,23 @@ patch makes it run any `cpp' command found in $PATH. -{ - struct stat buf; - -- if (stat (CPP, &buf) < 0) -- { /* /lib/cpp or explicit cpp does not exist */ -- if (cppDefined) -- { -- fprintf (stderr, _ ("cannot find C preprocessor: %s \n"), CPP); -- crash (); -- } -- else -- { /* try the other one */ -- CPP = SVR4_CPP; -- if (stat (CPP, &buf) < 0) -- { /* can't find any cpp */ -- fputs (_ ("cannot find any C preprocessor (cpp)\n"), stdout); -- crash (); -- } -- } +- if (stat (CPP, &buf) == 0) +- return; +- +- if (cppDefined) /* user specified cpp but it does not exist */ +- { +- fprintf (stderr, _ ("cannot find C preprocessor: %s\n"), CPP); +- crash (); - } +- +- /* fall back to system CPP */ +- CPP = "cpp"; -} - /* * Open input file with given define for C-preprocessor */ -@@ -370,7 +344,6 @@ open_input (const char *infile, const ch +@@ -355,7 +335,6 @@ switch (cpp_pid) { case 0: @@ -61,12 +52,3 @@ patch makes it run any `cpp' command found in $PATH. putarg (0, CPP); putarg (1, CPPFLAGS); addarg (define); -@@ -380,7 +353,7 @@ open_input (const char *infile, const ch - close (1); - dup2 (pd[1], 1); - close (pd[0]); -- execv (arglist[0], (char **) arglist); -+ execvp (arglist[0], (char **) arglist); - perror ("execv"); - exit (1); - case -1: