diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-09-18 12:38:43 -0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-09-18 12:38:43 -0400 |
commit | aa34058205434abff09fba1875a34482866850e8 (patch) | |
tree | f0daa085c1d608cfb9e00db08049963bd0dfe135 /pkgs/development/libraries/glibc/2.16/rpcgen-path.patch | |
parent | 375341bd73fb01b7451af750c7e0e86e78fc2b08 (diff) | |
download | nixpkgs-aa34058205434abff09fba1875a34482866850e8.tar nixpkgs-aa34058205434abff09fba1875a34482866850e8.tar.gz nixpkgs-aa34058205434abff09fba1875a34482866850e8.tar.bz2 nixpkgs-aa34058205434abff09fba1875a34482866850e8.tar.lz nixpkgs-aa34058205434abff09fba1875a34482866850e8.tar.xz nixpkgs-aa34058205434abff09fba1875a34482866850e8.tar.zst nixpkgs-aa34058205434abff09fba1875a34482866850e8.zip |
glibc: Update to 2.16
Diffstat (limited to 'pkgs/development/libraries/glibc/2.16/rpcgen-path.patch')
-rw-r--r-- | pkgs/development/libraries/glibc/2.16/rpcgen-path.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/pkgs/development/libraries/glibc/2.16/rpcgen-path.patch b/pkgs/development/libraries/glibc/2.16/rpcgen-path.patch new file mode 100644 index 00000000000..fbb03dd5fad --- /dev/null +++ b/pkgs/development/libraries/glibc/2.16/rpcgen-path.patch @@ -0,0 +1,72 @@ +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; + + static const char *svcclosetime = "120"; + static int cppDefined; /* explicit path for C preprocessor */ +-static const char *CPP = SUNOS_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 + static void open_output (const char *infile, const char *outfile); + static void add_warning (void); + static void clear_args (void); +-static void find_cpp (void); + 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) + argcount = FIXEDARGS; + } + +-/* make sure that a CPP exists */ +-static void +-find_cpp (void) +-{ +- 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 (); +- } +- } +- } +-} +- + /* + * Open input file with given define for C-preprocessor + */ +@@ -370,7 +344,6 @@ open_input (const char *infile, const ch + switch (cpp_pid) + { + case 0: +- find_cpp (); + 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: |