Commit Graph

8754 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
ed01a58215 Make libalias WARNS?=6-clean. This mostly involves renaming variables
named link, foo_link or link_foo to lnk, foo_lnk or lnk_foo, fixing
signed / unsigned comparisons, and shoving unused function arguments
under the carpet.

I was hoping WARNS?=6 might reveal more serious problems, and perhaps
the source of the -O2 breakage, but found no smoking gun.
2004-07-05 11:10:57 +00:00
Dag-Erling Smørgrav
ffcb611a9d Parenthesize return values. 2004-07-05 10:55:23 +00:00
Dag-Erling Smørgrav
f311ebb4ec Mechanical whitespace cleanup. 2004-07-05 10:53:28 +00:00
Ruslan Ermilov
1af1ea79a8 Markup fixes. 2004-07-05 07:21:55 +00:00
Ruslan Ermilov
9f4d0646c7 Markup fixes. 2004-07-05 06:59:17 +00:00
Ruslan Ermilov
c81fcafd0d Markup fixes. 2004-07-05 06:53:34 +00:00
Ruslan Ermilov
b9384efc1c Markup nits. 2004-07-05 06:39:03 +00:00
Ruslan Ermilov
284fcee0c0 Fixed cross-references in SEE ALSO.
Emininated double space and hard sentence breaks.
2004-07-04 21:15:37 +00:00
Ruslan Ermilov
1c85060a13 Sort SEE ALSO references (in dictionary order, ignoring case). 2004-07-04 20:55:50 +00:00
Colin Percival
0a31135d11 Add commentary explaining why we return EBADF upon attempts to fflush() a
read-only file.

Discussed on:	-current
2004-07-04 20:17:00 +00:00
Marcel Moolenaar
cc7be8dc05 Record the offset of thr_id in the thread structure. Required for
debugging.
2004-07-04 19:07:07 +00:00
Tim Kientzle
98183bf412 Yet another pointy hat: When restoring file flags, it's okay to use the
shared stat buffer, but don't try to access it through an uninitialized
pointer.
2004-07-04 18:28:56 +00:00
Stefan Farfeleder
5908d366fb Consistently use __inline instead of __inline__ as the former is an empty macro
in <sys/cdefs.h> for compilers without support for inline.
2004-07-04 16:11:03 +00:00
Poul-Henning Kamp
e6bbb69149 Add LibAliasOutTry() which checks a packet for a hit in the tables, but
does not create a new entry if none is found.
2004-07-04 12:53:07 +00:00
Juli Mallett
32889325b8 Yes, NgRecvAsciiMsg has the same results as NgRecvAsciiMsg, but it's
much more apt to note that it has the same result as NgRecvMsg.  Make
the manual page less circular in its reference to this fact.
2004-07-04 04:03:37 +00:00
Ruslan Ermilov
a817e9e674 Fixed markup. 2004-07-03 23:14:34 +00:00
Ruslan Ermilov
30950a21e1 Eliminate double whitespace. 2004-07-03 22:30:10 +00:00
Ruslan Ermilov
1a0a934547 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
David Xu
39ba326d65 Follow previous change in makecontext. Use %esi to store next ucp
pointer, here we keep orignal %ebp, so we can see where signal handler
comes in and interrupt normal code.
2004-07-02 23:20:05 +00:00
Ruslan Ermilov
839693c44f Deal with unsafe tab characters. 2004-07-02 19:55:26 +00:00
Ruslan Ermilov
d37ea99837 Removed trailing whitespace. 2004-07-02 19:07:33 +00:00
Ruslan Ermilov
4b6c8c6498 Fixed spelling of the document date. 2004-07-02 18:00:03 +00:00
Ruslan Ermilov
26b6c45a92 Markup tidying. 2004-07-02 16:45:56 +00:00
David Xu
a5a5d84784 Use %esi to store next ucp pointer. Mark end of stack by
setting %ebp to zero, this avoids new gdb to dump a weird
backtrace.
2004-07-02 14:19:44 +00:00
Marcel Moolenaar
cd28f17da2 Change the thread ID (thr_id_t) used for 1:1 threading from being a
pointer to the corresponding struct thread to the thread ID (lwpid_t)
assigned to that thread. The primary reason for this change is that
libthr now internally uses the same ID as the debugger and the kernel
when referencing to a kernel thread. This allows us to implement the
support for debugging without additional translations and/or mappings.

To preserve the ABI, the 1:1 threading syscalls, including the umtx
locking API have not been changed to work on a lwpid_t. Instead the
1:1 threading syscalls operate on long and the umtx locking API has
not been changed except for the contested bit. Previously this was
the least significant bit. Now it's the most significant bit. Since
the contested bit should not be tested by userland, this change is
not expected to be visible. Just to be sure, UMTX_CONTESTED has been
removed from <sys/umtx.h>.

Reviewed by: mtm@
ABI preservation tested on: i386, ia64
2004-07-02 00:40:07 +00:00
Ruslan Ermilov
862b46f607 Markup, grammar, punctuation. 2004-07-01 18:20:57 +00:00
Ruslan Ermilov
c9a246418d Bumped document date.
Fixed markup.
Fixed examples to match the new API.
2004-07-01 17:51:48 +00:00
Ruslan Ermilov
86ab142d10 Back out last delta, it just unpolitely reverted some local changes. 2004-07-01 17:13:15 +00:00
Tim J. Robbins
30e970d965 Update libstand makefile for zlib 1.2.1. 2004-07-01 00:01:26 +00:00
Tim J. Robbins
9e64ecd96c Update makefile for zlib 1.2.1. 2004-06-30 23:58:22 +00:00
Tim J. Robbins
0b73a4c301 Resolve conflicts. 2004-06-30 23:54:46 +00:00
Tim J. Robbins
1fa1f918ab This commit was generated by cvs2svn to compensate for changes in r131377,
which included commits to RCS files with non-trunk default branches.
2004-06-30 23:43:39 +00:00
Tim J. Robbins
aea8f65dfe Import zlib 1.2.1 (trimmed) 2004-06-30 23:43:39 +00:00
Ruslan Ermilov
33992dc0ed Markup, grammar, and spelling fixes. 2004-06-30 20:09:10 +00:00
Ruslan Ermilov
bd486f888e Fixed a typo. 2004-06-30 19:32:41 +00:00
Mike Makonnen
105711487e When a thread is created suspended have libthr suspend it explicitly
instead of asking the kernel to do it when we create the thread.
2004-06-30 15:57:36 +00:00
Tim J. Robbins
b7114d4a9c Fix typo: WRDE_DOOFS -> WRDE_DOOFFS.
Noticed by:	Stoned Elipot
2004-06-30 13:55:08 +00:00
David Schultz
4f82cb46c4 Implement and document fdim{,f,l}, fmax{,f,l}, and fmin{,f,l}. 2004-06-30 07:04:01 +00:00
Tim Kientzle
5708f1dd7c In case symlinks happen to already be sitting around, be sure to use
chmod() and not lchmod() whenever we know we didn't extract a symlink.
2004-06-30 04:54:07 +00:00
Tim Kientzle
88c3541690 Some implicit dirs were not having the umask correctly
applied to their permissions.  Just calculate the
default dir mode once and use it consistently, rather than
trying to remember to calculate it everywhere it's needed.
2004-06-28 14:12:09 +00:00
David Xu
31681fba00 Remove libpthread_dbg, soon it will be replaced by libthread_db which
is a defacto standard on other UNIX systems.
2004-06-28 12:13:36 +00:00
Tim Kientzle
b3f695b45c Refuse to extract an entry from an archive on top of the archive being read.
(This is the converse of the "don't add an archive to itself".)
2004-06-27 23:36:39 +00:00
Tim Kientzle
b5f1f87711 More cleanup work on permissions restore:
* Rename some variables/functions/etc to try to make things clearer.
  * Add separate flags to control fflag/acl restore
  * Collect metadata restore into a single function for clarity
  * Propagate errors in metadata restore back out to the client
  * Fix some places where errors were being returned when they
    shouldn't and vice-versa
  * Modes are now always restored; ARCHIVE_EXTRACT_PERM just controls
    whether or not umask is obeyed.
  * Restore suid/sgid bits only if user/group matches archive
  * Cache the last stat results to try to reduce the number of stat calls
2004-06-27 23:27:28 +00:00
Tim Kientzle
4660ecd1dc Add two new convenience functions to query the uid/gid from an
archive_entry.

Update the Makefile MLINKS and manpage to bring it up-to-date with
the current status of archive_entry.  At least the manpage actually
lists all of the functions now, even if it doesn't really yet explain
them all.
2004-06-27 23:16:42 +00:00
Tim Kientzle
527b6597a0 Clean up some consistent confusion between "dev" and "rdev."
Mostly, these were being used correctly even though a lot of
variables and function names were mis-named.

In the process, I found and fixed a couple of latent bugs and
added a guard against adding an archive to itself.
2004-06-27 18:38:13 +00:00
Tim Kientzle
406b66ef06 More tweaks to implicit directory creation. Even such abominations as
a/././b/../b/../c/./../d/e/f now work correctly.  And yes, a/b and a/c
both get created in this example; if you want, you can create an
entire dir heirarchy from a tar archive with only one entry.

More tweaks to umask support: umasks are now obeyed for all objects,
not just directories; the umask used is now the one in effect at the
corresponding call to archive_read_extract(), so clients that want to
tinker with umask during extract should get the expected behavior.
2004-06-27 16:44:51 +00:00
Mike Makonnen
03d74100cf Implement pthread_atfork in libthr. This is mostly from deichen's
work in libpthread.

Submitted by: Dan Nelson <dnelson@allantgroup.com>
2004-06-27 10:01:35 +00:00
Mike Makonnen
356c2d4f58 In the case that the global thread list is being re-initialized after
a fork, make sure that the current thread isn't detached and freed. As
a consequence the thread should be inserted into the head of the
active list only once (in the beginning).
2004-06-27 09:53:06 +00:00
Tim Kientzle
30d140332e * The mode for implicitly-created dirs is now 0777 modified by the
umask in effect when the archive is closed
* Correct a typo that broke implicit dir creation for non-directories.

Thanks to: Garret A Wollman for pointing out my umask oversight
2004-06-27 05:59:15 +00:00
Tim Kientzle
6efb916277 Unify mkdirpath (used to automatically create missing parent dirs) and
read_extract_dir (which creates directories in the archive).  This
brings a number of advantages:
 * FINALLY fix the problems creating dirs ending in "/."  <sigh>
 * Missing parent dirs now get created securely, just like explicit dirs.
   (Created 0700 initially, then edited to 0755 at end of extraction.)
 * Eliminate some duplicate code and some weird special cases.

While I'm cleaning, inline the regular-file creation code as well.
2004-06-27 03:19:01 +00:00