Merge from coreutils. (same_name): Declare *_basename locals to be `const'. Consolidate declarations and initializations of *_base* locals.