The util-linux depends on GNU make.
shlibs/blkid/src/Makefile.am:58: warning: `%'-style pattern rules are a GNU make extension
shlibs/mount/src/Makefile.am:62: warning: `%'-style pattern rules are a GNU make extension
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Solaris lacks err, errx, warn and warnx. This also means the err.h header
doesn't exist. Removed err.h include from all files, and included err.h from
c.h instead if it exists, otherwise alternatives are provided.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Try some replacements, such as getexecname() on Solaris and __progname
on BSDs and Darwin. When not found, base program_invocation_short_name
on the source filename it is used in, as not to require argv[0] to be
passed along. This latter approach is not dynamic, but doesn't require
code changes for all places where program_invocation_short_name is used
now.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
dirfd is not available on Solaris 10, it is available on latest
OpenSolaris releases though. Do some autoconf trickery to determine if
providing an alternative dirfd function is necessary and possible.
shlibs/blkid/src/read.c: Do not define _XOPEN_SOURCE to 600, or DIR will
lose it's dd_fd member again. Rearrange defines and includes to make
sense per comments, and not conflict on Solaris.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
The _IO macro is defined in sys/ioccom.h on various platforms. However,
on Solaris it isn't included by ioctl.h, so include it explicitly if
available.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
To link an object which references socket functions, you need to link
with -lsocket -lnsl on Solaris.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Check for crypt.h existence, and use it if available over using unistd.h
for which a certain feature level has to be set to export a definition
for crypt. On Solaris this set causes a standards conflict in the
headers, because at the time of this check C99 mode is already enabled,
which implies certain standards non-compatible with _XOPEN_SOURCE.
92 #define _XOPEN_SOURCE
93 #include <unistd.h>
configure:16259: gcc -std=gnu99 -c -g -O2 conftest.c >&5
In file included from /usr/include/unistd.h:18,
from conftest.c:93:
/prefix/gentoo/usr/lib/gcc/i386-pc-solaris2.10/4.4.5/include-fixed/sys/feature_tests.h:341:2: error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications and pre-2001 POSIX applications"
configure.ac: improve crypt check
login-utils/my_crypt.h: replace old GNU_LIBRARY check with autoconf
define for crypt.h
[kzak@redhat.com: - remove my_crypt.h]
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
This code is going to be used as mount(8) replacement in the next
major release (2.20). For now this mount(8) implementation does not
support loopdevs initialization.
Signed-off-by: Karel Zak <kzak@redhat.com>
The fallback ignores locales and returns hardcoded static strings. It
should be enough to include "nls.h" to work with nl_langinfo() on all
systems.
Signed-off-by: Karel Zak <kzak@redhat.com>
Some distros install the wide version of ncurses side by side with the
non-wide version and place the wide headers in an ncursesw/ subdir. So
detect that behavior and include the right header with cfdisk.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
The slang/slcurses.h contains
#includes <slang.h>
but we don't use -I/usr/include/slang (and this is also missing in
slang.pc), it means that we have manually include the slang.h file
in our configure script.
Note this is Fedora-12, maybe some others distros have more usable
slang headers...
Signed-off-by: Karel Zak <kzak@redhat.com>
Use --with-utempter to enable utempter support. The libutempter calls
/usr/libexec/utempter/utempter suid helper to update utmp and wtmp
files.
Old version:
$ script
Script started, file is typescript
$ who i am
$ exit
Script done, file is typescript
New version:
$ script
Script started, file is typescript
$ who i am
kzak pts/6 2010-04-29 12:30
$ exit
Script done, file is typescript
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=477753
Signed-off-by: Karel Zak <kzak@redhat.com>
RAID probing of CD/DVD can yield errors because of well-known problem
in reading the end of the disk with some disk/drive combinations.
Borrow CD detection method from udev and skip the RAID tests for
these devices.
[kzak@redhat.com: - check for linux/cdrom.h in ./configure
- add #ifdef around the ioctl call
- call the ioctl for block devices only]
Signed-off-by: Mark Colclough <m.s.colclough@bham.ac.uk>
Signed-off-by: Karel Zak <kzak@redhat.com>
With glibc 2.10 on a 32bits system, fallocate64() function is not
exported. This a problem, since _FILE_OFFSET_BITS is set to 64 and
fallocate() is redirected to fallocate64().
Sadly, AC_CHECK_FUNC() doesn't catch such problem, since it's overriding
the function prototype.
See this for references:
http://sources.redhat.com/ml/libc-hacker/2009-05/msg00003.html
Signed-off-by: Yann Droneaud <yann@droneaud.fr>
The libblkid library uses stat.st_mtine to detect changes on the
device. The last update time of of the device in the cache is stored
as TIME= tag in the /etc/blkid.tab file.
Linux since 2.5.48 supports nanosecond resolution and more precise
time is available in the stat.st_mtim timespec struct.
This patch add microsecond precision to TIME= tag in the cache file,
old format:
TIME="<sec>"
the new format:
TIME="<sec>.<usec>"
This change is backwardly compatible.
Now, the blkid_verify() function checks stat.st_mtime and
stat.st_mtim.tv_nsec/1000.
Test:
# e2label /dev/sdb1 AAAA
old version:
# blkid -s LABEL /dev/sdb1; e2label /dev/sdb1 BBBB; blkid -s LABEL /dev/sdb1
/dev/sdb1: LABEL="AAAA"
/dev/sdb1: LABEL="AAAA"
new version:
# blkid -s LABEL /dev/sdb1; e2label /dev/sdb1 BBBB; blkid -s LABEL /dev/sdb1
/dev/sdb1: LABEL="AAAA"
/dev/sdb1: LABEL="BBBB"
Signed-off-by: Karel Zak <kzak@redhat.com>
Rather than each fs util having its own search policy, unify the paths in
configure and allow them to be tweaked by downstream. In the process,
drop the /etc paths as no one has ever really used these.
[kzak@redhat.com: - backport to autoconf < 2.64
(remove AS_{SET,IF,CASE,APPEND} macros)]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
Read-ahead doesn't work very well on device probing, and can hurt a lot
when we do essentially random accesses on very slow devices. So disable it
if possible.
[kzak@redhat.com: - add posix_fadvise() configure test]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
The fdisksunlabel.c header file is unnecessary for fdisk/fdisksunlabel.h.
Reported-by: Thomas Stalder <thomas@netsolux.ch>
Signed-off-by: Karel Zak <kzak@redhat.com>