]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r231079:
authordim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 13 Feb 2012 20:59:58 +0000 (20:59 +0000)
committerdim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 13 Feb 2012 20:59:58 +0000 (20:59 +0000)
commit5d7574a0b90fc18322efaeb7ade1d4da2b233ac3
tree143bce43ee0eba099061daadfa779bc47189ba07
parent020053a34a7bc4749b2829fd6f9c19ffbcbac7dc
MFC r231079:

  Let rpcgen(1) support an environment variable RPCGEN_CPP to find the C
  preprocessor to run.  Previously, it always ran /usr/bin/cpp, unless you
  used the -Y option, and even then you could not set the basename.  It
  also attempted to run /usr/ccs/lib/cpp for SVR4 compatibility, but this
  is obsolete, and has been removed.

  Note that setting RPCGEN_CPP to a command with arguments is supported,
  though the command line parsing is simplistic.  However, setting it to
  e.g. "gcc46 -E" or "clang -E" will lead to problems, because both gcc
  and clang in -E mode will consider files with unknown extensions (such
  as .x) as object files, and attempt to link them.

  This could be worked around by also adding "-x c", but it is much safer
  to set RPCGEN_CPP to e.g. "cpp46" or "clang-cpp" instead.

MFC r231080:

  Amend r231079 by properly shifting up the existing arguments in
  rpc_main.c's insarg() function.  I had forgotten to put this in my patch
  queue, sorry.

  Pointy hat to: me

MFC r231101:

  In usr.bin/rpcgen/rpc_main.c, use execvp(3) instead of execv(3), so
  rpcgen will search the current PATH for the preprocessor.  This makes it
  possible to run a preprocessor built during the cross-tools stage of
  buildworld.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231613 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.bin/rpcgen/rpc_main.c
usr.bin/rpcgen/rpcgen.1