[Libguestfs] [PATCH v2 0/4] New getprogname module

Pino Toscano ptoscano at redhat.com
Thu Aug 18 13:10:13 UTC 2016


Hi,

as discussed in [1], this series adds a new getprogname module.
All it does is providing a getprogname function, much like what is
found on e.g. *BSD systems, and using it in gnulib instead of progname.
Also, using it explicitly by modules avoids gnulib users the need of
either use the progname module (GPL), or to provide program_name (and
call set_program_name manually, which is not always doable).

Caveat: the progname is left as it is, so set_program_name will still
affect program_name but not what error will use.

(Please note it's my first big patch to gnulib, so bear with me for
anything wrong/missing.)

[1] http://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00048.html


Changes from v1:
- rebased, updating ChangeLog date

Pino Toscano (4):
  getprogname: new module
  Port modules to use getprogname explicitly
  Port tests away from progname
  main.mk: remove sc_program_name

 ChangeLog                            | 162 +++++++++++++++++++++++++++++++++++
 cfg.mk                               |   1 -
 lib/argmatch.c                       |  12 +--
 lib/c-stack.c                        |   5 +-
 lib/chdir-long.c                     |   3 -
 lib/error.c                          |   6 +-
 lib/euidaccess.c                     |   3 -
 lib/getprogname.c                    |  45 ++++++++++
 lib/getprogname.h                    |  34 ++++++++
 lib/git-merge-changelog.c            |  11 +--
 lib/group-member.c                   |   4 -
 m4/getprogname.m4                    |  13 +++
 modules/acl-tests                    |   1 -
 modules/argmatch-tests               |   1 -
 modules/argp-tests                   |   1 -
 modules/argp-version-etc-tests       |   1 -
 modules/array-list-tests             |   1 -
 modules/array-oset-tests             |   1 -
 modules/avltree-list-tests           |   1 -
 modules/avltree-oset-tests           |   1 -
 modules/avltreehash-list-tests       |   1 -
 modules/c-stack                      |   1 +
 modules/carray-list-tests            |   1 -
 modules/copy-file-tests              |   1 -
 modules/error                        |   1 +
 modules/exclude-tests                |   1 -
 modules/fchownat-tests               |   1 -
 modules/fdopendir-tests              |   1 -
 modules/filenamecat-tests            |   1 -
 modules/fstatat-tests                |   1 -
 modules/fstrcmp-tests                |   1 -
 modules/getprogname                  |  28 ++++++
 modules/git-merge-changelog          |   2 +-
 modules/linked-list-tests            |   1 -
 modules/linkedhash-list-tests        |   1 -
 modules/mkdirat-tests                |   1 -
 modules/nonblocking-pipe-tests       |   1 -
 modules/nonblocking-socket-tests     |   1 -
 modules/obstack-printf-tests         |   1 -
 modules/openat-tests                 |   1 -
 modules/parse-datetime-tests         |   1 -
 modules/pipe-filter-gi-tests         |   1 -
 modules/pipe-filter-ii-tests         |   1 -
 modules/quotearg-simple-tests        |   1 -
 modules/quotearg-tests               |   1 -
 modules/rbtree-list-tests            |   1 -
 modules/rbtree-oset-tests            |   1 -
 modules/rbtreehash-list-tests        |   1 -
 modules/spawn-pipe-tests             |   1 -
 modules/system-quote-tests           |   1 -
 modules/uniname/uniname-tests        |   1 -
 modules/uninorm/nfc-tests            |   1 -
 modules/uninorm/nfd-tests            |   1 -
 modules/uninorm/nfkc-tests           |   1 -
 modules/uninorm/nfkd-tests           |   1 -
 modules/unistdio/u16-vsnprintf-tests |   1 -
 modules/unistdio/u16-vsprintf-tests  |   1 -
 modules/unistdio/u32-vsnprintf-tests |   1 -
 modules/unistdio/u32-vsprintf-tests  |   1 -
 modules/unistdio/u8-vsnprintf-tests  |   1 -
 modules/unistdio/u8-vsprintf-tests   |   1 -
 modules/unistdio/ulc-vsnprintf-tests |   1 -
 modules/unistdio/ulc-vsprintf-tests  |   1 -
 modules/unlinkat-tests               |   1 -
 modules/version-etc-tests            |   1 -
 modules/xalloc-die-tests             |   1 -
 modules/xmemdup0-tests               |   1 -
 modules/xprintf-posix-tests          |   1 -
 modules/xvasprintf-tests             |   1 -
 tests/test-argmatch.c                |   3 -
 tests/test-argp-version-etc.c        |   2 -
 tests/test-argp.c                    |   3 -
 tests/test-argv-iter.c               |   1 -
 tests/test-array_list.c              |   3 -
 tests/test-array_oset.c              |   3 -
 tests/test-avltree_list.c            |   3 -
 tests/test-avltree_oset.c            |   3 -
 tests/test-avltreehash_list.c        |   3 -
 tests/test-c-stack.c                 |   3 -
 tests/test-carray_list.c             |   3 -
 tests/test-closein.c                 |   3 -
 tests/test-copy-acl.c                |   3 -
 tests/test-copy-file.c               |   3 -
 tests/test-exclude.c                 |   3 -
 tests/test-fchownat.c                |   3 -
 tests/test-fdopendir.c               |   3 -
 tests/test-filenamecat.c             |   3 -
 tests/test-fstatat.c                 |   3 -
 tests/test-fstrcmp.c                 |   3 -
 tests/test-linked_list.c             |   3 -
 tests/test-linkedhash_list.c         |   3 -
 tests/test-mkdirat.c                 |   3 -
 tests/test-nonblocking-pipe-main.c   |   3 -
 tests/test-nonblocking-socket-main.c |   3 -
 tests/test-obstack-printf.c          |   3 -
 tests/test-openat.c                  |   3 -
 tests/test-parse-datetime.c          |   3 -
 tests/test-pipe-filter-gi1.c         |   3 -
 tests/test-pipe-filter-gi2-main.c    |   3 -
 tests/test-pipe-filter-ii1.c         |   3 -
 tests/test-pipe-filter-ii2-main.c    |   3 -
 tests/test-quotearg-simple.c         |   3 -
 tests/test-quotearg.c                |   3 -
 tests/test-rbtree_list.c             |   3 -
 tests/test-rbtree_oset.c             |   3 -
 tests/test-rbtreehash_list.c         |   3 -
 tests/test-sameacls.c                |   3 -
 tests/test-set-mode-acl.c            |   3 -
 tests/test-spawn-pipe-main.c         |   3 -
 tests/test-system-quote-main.c       |   3 -
 tests/test-unlinkat.c                |   3 -
 tests/test-version-etc.c             |   2 -
 tests/test-xalloc-die.c              |   2 -
 tests/test-xfprintf-posix.c          |   3 -
 tests/test-xmemdup0.c                |   3 -
 tests/test-xprintf-posix.c           |   3 -
 tests/test-xstrtol.c                 |   3 -
 tests/test-xvasprintf.c              |   3 -
 tests/test-yesno.c                   |   3 -
 tests/uniname/test-uninames.c        |   3 -
 tests/uninorm/test-u32-nfc-big.c     |   2 -
 tests/uninorm/test-u32-nfd-big.c     |   2 -
 tests/uninorm/test-u32-nfkc-big.c    |   2 -
 tests/uninorm/test-u32-nfkd-big.c    |   2 -
 tests/unistdio/test-u16-vsnprintf1.c |   3 -
 tests/unistdio/test-u16-vsprintf1.c  |   3 -
 tests/unistdio/test-u32-vsnprintf1.c |   3 -
 tests/unistdio/test-u32-vsprintf1.c  |   3 -
 tests/unistdio/test-u8-vsnprintf1.c  |   3 -
 tests/unistdio/test-u8-vsprintf1.c   |   3 -
 tests/unistdio/test-ulc-vsnprintf1.c |   3 -
 tests/unistdio/test-ulc-vsprintf1.c  |   3 -
 top/maint.mk                         |   9 --
 133 files changed, 297 insertions(+), 276 deletions(-)
 create mode 100644 lib/getprogname.c
 create mode 100644 lib/getprogname.h
 create mode 100644 m4/getprogname.m4
 create mode 100644 modules/getprogname

-- 
2.7.4




More information about the Libguestfs mailing list