- cleanup header of the file
- fix fileutils.c warnings
- add _PATH_TMP fallback
Addresses: https://github.com/karelzak/util-linux/issues/931
Signed-off-by: Karel Zak <kzak@redhat.com>
/*
- * Vaguely based on
- * @(#)pathnames.h 5.3 (Berkeley) 5/9/89
- * This code is in the public domain.
+ * No copyright is claimed. This code is in the public domain; do with
+ * it what you wish.
*/
#ifndef PATHNAMES_H
#define PATHNAMES_H
#define _PATH_SHADOW_PASSWD "/etc/shadow"
#define _PATH_SHELLS "/etc/shells"
+#ifndef _PATH_TMP
+# define _PATH_TMP "/tmp/"
+#endif
+
#ifndef _PATH_BTMP
# define _PATH_BTMP "/var/log/btmp"
#endif
#include "nls.h"
#include "strutils.h"
#include "bitops.h"
+#include "pathnames.h"
static int STRTOXX_EXIT_CODE = EXIT_FAILURE;
}
#ifdef TEST_PROGRAM_STRUTILS
+#include <stdio.h>
static int test_strutils_sizes(int argc, char *argv[])
{