Commit Graph

10682 Commits

Author SHA1 Message Date
kientzle
62b3d9e35c Add archive_write_open_filename()/archive_read_open_filename() as
synonyms for archive_write_open_file()/archive_read_open_file().
The new names are much clearer.
2006-11-15 05:33:38 +00:00
kientzle
8f03f2f27b Style: Use the correct type for a sizeof() variable. 2006-11-15 05:20:14 +00:00
kientzle
8c58f2d4e8 Change the internal API for writing data to an entry; make the
internal format-specific functions return the same as the public
function, so that the public API layer doesn't have to guess the
correct return value.  This addresses an obscure problem that occurs
when someone tries to write more data than the size of the entry (as
indicated in the entry header).  In this case, the return value from
archive_write_data() was incorrect, reflecting the requested write
rather than the amount actually written.

MFC after: 15 days
2006-11-15 05:14:20 +00:00
kientzle
b3076e31d7 No change in functionality, but fill in a missing error
message when reading a truncated tar archive.
2006-11-13 16:50:18 +00:00
ru
8ee020ccf7 Fix minor formatting issues:
- make document title match filename;
- remove hard sentence breaks, whitespace at EOL, and double whitespace;
- sort SEE ALSO xrefs, adding missing section numbers;
- fix a misspelled macro name.
2006-11-13 09:46:16 +00:00
kientzle
341ae2b09b These files no longer use internal APIs, so no longer need to include
archive_private.h.
2006-11-13 00:29:57 +00:00
kientzle
925ac6f1b9 Minor cleanup of the standard read/write I/O modules:
* Use public API, don't access struct archive directly.  (People should be able to copy these into their applications as a template for custom I/O callbacks.)
 * Set "skip" only for regular files.  ("skip" allows the low-level library to catch attempts to add an archive to itself or extract over itself.)
 * Simplify the write_open functions by just calling stat() at the beginning.  Somehow, these functions had acquired some complex logic that tried to avoid the stat() call but never succeeded.

MFC after: 10 days
2006-11-13 00:26:45 +00:00
kientzle
7f111df028 Correctly handle writing very large blocks (>1M) through to a disk
file.  This doesn't happen in normal use, because the file I/O and
decompression layers only pass through smaller blocks.  It can happen
with custom read functions that block I/O in larger blocks.
2006-11-12 23:45:40 +00:00
jkoshy
1d082af7af - Replace the use of DPSRCS with something more appropriate. DPSRCS
is for when you need something in ".depend", but not compiled in.
- Style fixes: Spell ${.OBJDIR} as ".".
- Neaten a comment.

Submitted by:	ru
2006-11-12 18:43:25 +00:00
jkoshy
62913629e6 MFP4: Add an implementation of the ELF(3) and GELF(3) API set.
Bump __FreeBSD_version.

Reviewed by:	jb
2006-11-11 17:16:35 +00:00
davidxu
cc0840138e Move code calculating new inherited priority into single function. 2006-11-11 13:33:47 +00:00
des
cd277df0bb childerr needs to be volatile so gcc won't optimize it away.
PR:		bin/85830
MFC after:	1 week
2006-11-10 23:33:25 +00:00
kientzle
50bb724108 Portability and style fixes:
* Actually use the HAVE_<header>_H macros to conditionally include
    system headers.  They've been defined for a long time, but only
    used in a few places.  Now they're used pretty consistently
    throughout.
  * Fill in a lot of missing casts for conversions from void*.
    Although Standard C doesn't require this, some people have been
    trying to use C++ compilers with this code, and they do require it.

Bit-for-bit, the compiled object files are identical, except for
one assert() whose line number changed, so I'm pretty confident I
didn't break anything.  ;-)
2006-11-10 06:39:46 +00:00
trhodes
a5378c36b6 Add an entry for PT_GETLWPLIST.
Nudged by:	jhb
Reviewed by:	davidxu
2006-11-09 11:27:18 +00:00
cognet
93ee84a578 Cleanup: we always have to use __error() now, and we shouldn't provide a
errno symbol, so completely remove the !_REENTRANT case.

Spotted out by:	ru
2006-11-09 01:28:16 +00:00
ru
adde7c231a Remove a forgotten file. 2006-11-08 21:29:20 +00:00
simon
bee45f8f12 Fix infinite loop in corrupt archives handling in libarchive(3).
Reported by:	rink
Submitted by:	kientzle
Security:	FreeBSD-SA-06:24.libarchive
2006-11-08 14:03:50 +00:00
cognet
367bc6b8e0 Instead of re-implementing hton[ls] and friends for each arch, add a new MI
file, net/ntoh.c, which just implement them using the inline functions from
<sys/endian.h>.

Suggested by:	bde
2006-11-06 22:07:47 +00:00
cognet
55a9fb22cc Provide definitions suitable for arm big-endian. 2006-11-06 20:49:23 +00:00
rwatson
ef1d02698e Remove sys/uio.h include -- this is no longer required by the extattr
system call API.

MFC after:	3 weeks
2006-11-06 15:12:43 +00:00
kientzle
109c8f1daf Eliminate documentation references to a non-existent function. 2006-11-06 00:28:46 +00:00
kientzle
dce2089396 Computing SHLIB_MAJOR is not a good idea. It's really a FreeBSD
system value that has no real relation to the libarchive version.
(Except, of course, that any ABI breakage will force both to be
incremented.)
2006-11-06 00:24:57 +00:00
kientzle
ba33e1d526 Remove an unused declaration. 2006-11-06 00:16:40 +00:00
trhodes
444451185b Fix a typo: "the give login class" to "the given login class."
PR:		75577
Submitted by:	Nobuyuki Koganemaru
2006-11-05 19:00:08 +00:00
lawrance
20a2ef67d2 Document return values for res_query and res_search.
h_errno is not an extern int, just a macro providing an integer lvalue.

PR:		doc/50573
Submitted by:	Ronald F.Guilmette <rfg@monkeys.com>
Reviewed by:	trhodes
MFC after:	3 days
2006-11-04 09:42:22 +00:00
danger
b5fdd84df7 - clock_gettime is in time.h instead of sys/time.h
Approved by: trhodes (mentor), keramida (mentor)
PR: docs/104707
MFC-after: 3 days
2006-11-04 09:35:36 +00:00
kmacy
73954d8d22 - change ABI for user trap handler for sun4v (eventually will sync sparc64 no
hardware set up to test at the moment)

Approved by: scottl (standing in for mentor rwatson)
2006-11-03 23:43:18 +00:00
ru
6332347a51 Replace the SEE ALSO xrefs with a more reasonable set stolen from POSIX. 2006-11-02 14:10:56 +00:00
mjacob
19b599de4a 2nd and final commit that moves us to CAM_NEW_TRAN_CODE
as the default.

Reviewed by multitudes.
2006-11-02 00:54:38 +00:00
pjd
1f52d4e246 Document MNT_GJOURNAL option. 2006-11-01 23:40:44 +00:00
pjd
51fb042070 Implement cgwrite1(3) function which stored a given cylinder group on disk.
Sponsored by:	home.pl
2006-10-31 21:21:48 +00:00
bde
fd31361d3d Backed out rev.1.10 (a special case for amd64). The amd64 mcount code
never needed any frame pointers for itself.
2006-10-28 13:34:35 +00:00
ru
e80cd771cb Add missing markup bits.
Submitted by:	Emil Mikulic
2006-10-28 13:05:10 +00:00
maxim
5c30a548b8 o Fix function name.
Obtained from:	DragonFlyBSD
MFC after:	1 week
2006-10-28 10:53:39 +00:00
jb
f82c799735 Make KSE a kernel option, turned on by default in all GENERIC
kernel configs except sun4v (which doesn't process signals properly
with KSE).

Reviewed by:	davidxu@
2006-10-26 21:42:22 +00:00
ume
89159bd1c6 Merge res_send.c of BIND9 9.3.3rc2 into main chunk. It includes
following fix:

	Retransmission timeouts should be based on which attempt
	it is to the nameserver and not the nameserver itself.

Obtained from:	ISC
MFC after:	3 days
2006-10-24 14:41:43 +00:00
kib
e6083a98d8 Revert the rev. 1.4, it causes breakage on most arches except i386.
Remove the const qualifier from ap argument for __v2printf, that induced
that breakage, and seems to be the real reason for bad code. ap is modified
inside the __v2printf body by va_arg macro.

Pointy hat to:	kib
Approved by:	pjd (mentor)
2006-10-23 07:25:25 +00:00
simon
16797e6408 Minor markup fix: A comma should be seperated by space from macro
argument.  This resulted in "pwritev,()" instead of the intended
"pwritev()," in the output.

MFC after:	3 days
2006-10-21 20:36:50 +00:00
ru
85a0824042 Avoid a potential hard sentence break. 2006-10-21 18:03:53 +00:00
maxim
993b54a4b0 o Fix typo.
Obtained from:	DragonFlyBSD
MFC after:	1 week
2006-10-21 15:12:36 +00:00
kib
3c7ee268c4 Workaround for (what seems to be) compiler error for gcc 3.4.6. On
i386 with default optimization level (-O2), va_list pointer ap in the
__v2printf function is advanced before the use. That cause argument
shift and garbage instead last argument in printf-family when xprintf is
activated.

The nsswitch is easy victim of the bug.

Reviewed by:	kan
Approved by:	kan (mentor)
MFC after:	1 week
2006-10-21 11:49:07 +00:00
davidxu
df52e86556 remove libc_r remanent. 2006-10-20 14:15:42 +00:00
glebius
221ee422f9 Include sys/socket.h to know about sa_family_t. 2006-10-17 16:56:29 +00:00
ache
9a7ddac59a file == NULL:
Issue __sflush() before possible setting O_APPEND mode or ftruncate(),
write to wrong place may occurse oserwise.
Use simplified _sseek() to the start, if no O_APPEND is set, instead
of _fseeko() (_sseek() to the end, if O_APPEND, occurse later, as for
file != NULL).
Don't check seek error return, as original fopen() and freopen() never
does.

file != NULL:
Add missing _sseek() to the end.
2006-10-16 14:31:56 +00:00
ache
98e47524e9 Honor errno obtained from __sflags
Move errno restoring after FUNLOCKFILE in one case
2006-10-16 09:57:15 +00:00
ache
5b6b5391fa Back out ftruncate error handling. There can some file tipes
f.e. sockets when ftruncate normally fail.
2006-10-16 09:39:15 +00:00
ache
ce03393cc5 Do real seek
Catch ftruncate errors

PR:             104295
Submitted by:   ru (seek)
2006-10-15 16:24:31 +00:00
bde
d36e6277cb Moved __BEGIN_DECLS up a little so that it covers __test_sse() and C++
isn't broken,

PR:		104425
2006-10-14 20:35:56 +00:00
davidxu
e8a2970aaf Don't inherit THR_FLAGS_NEED_SUSPEND for child process, child process
only has one thread, setting the flag can cause the thread to be
suspended and no another thread will resume it.
2006-10-14 13:40:08 +00:00
tegge
aa695ee90e Backout unblocking of signal if no threads can currently handle it.
The check for pending signal after direct invocation of signal handler
is sufficient.
2006-10-14 01:11:44 +00:00