GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#define _GNU_SOURCE 1
+#include "porting.h"
#include <unistd.h>
#include <errno.h>
#include <string.h>
#define PACKAGE "getconf regression test"
#define VERSION ""
-#ifndef _
-# define _
-#endif
-#define error(status, errnum,...) \
- {fprintf(stderr, __VA_ARGS__); exit(status);}
+#define _(x) x
+#define error(status, errnum, fmt, ...) \
+ {fprintf(stderr, fmt "\n", ## __VA_ARGS__); exit(status);}
struct conf
};
static const int nspecs = sizeof (specs) / sizeof (specs[0]);
-#ifdef __UCLIBC_HAS___PROGNAME__
-extern const char *__progname;
-#else
-#define __progname "foo"
+#ifndef __UCLIBC_HAS___PROGNAME__
+static const char *__progname = "getconf";
#endif
-static void
+static attribute_noreturn void
usage (void)
{
fprintf (stderr,
}
-static void
+static attribute_noreturn void
print_all (const char *path)
{
register const struct conf *c;