+2009-12-05 Bruno Haible <bruno@clisp.org>
+
+ * lib/progname.h (set_program_name): Clarify specification.
+ * lib/progname.c (set_program_name): Likewise.
+ Reported by Jim Meyering.
+
2009-12-05 Jim Meyering <meyering@redhat.com>
maint.mk: backslash-escape parens in default regexp
/* Program name management.
Copyright (C) 2001-2003, 2005-2009 Free Software Foundation, Inc.
- Written by Bruno Haible <haible@clisp.cons.org>, 2001.
+ Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
To be initialized by main(). */
const char *program_name = NULL;
-/* Set program_name, based on argv[0]. */
+/* Set program_name, based on argv[0].
+ argv0 must be a string allocated with indefinite extent, and must not be
+ modified after this call. */
void
set_program_name (const char *argv0)
{
/* Program name management.
- Copyright (C) 2001-2004, 2006 Free Software Foundation, Inc.
- Written by Bruno Haible <haible@clisp.cons.org>, 2001.
+ Copyright (C) 2001-2004, 2006, 2009 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* String containing name the program is called with. */
extern const char *program_name;
-/* Set program_name, based on argv[0]. */
+/* Set program_name, based on argv[0].
+ argv0 must be a string allocated with indefinite extent, and must not be
+ modified after this call. */
extern void set_program_name (const char *argv0);
#if ENABLE_RELOCATABLE