Commit Graph

54 Commits

Author SHA1 Message Date
Bruce Evans
a461908da4 Handle machine-dependent (stdlib) sources more automatically.
This fixes bugs in the manual handling.  abs.[cS] was handled too
specially and the wrong (.c) variant for each of div.[cS], labs.[cS]
and ldiv.[cS] was added to SRCS.  This caused the .c variant to be
used if `depend' was made and the .S version to be used otherwise.
1997-10-16 14:58:30 +00:00
Bruce Evans
1cbbb1ba4b Removed bogus .PATH statement. 1997-10-16 14:41:25 +00:00
Bruce Evans
da16ae8684 Removed the subdirectory paths from the definitions of MAN[1-9]. They
were a workaround for limitations in bsd.man.mk that were fixed about
2 years ago.
1997-10-16 14:26:13 +00:00
Bruce Evans
ae80efa54f Handle machine-dependent (m-d) (string) sources more automatically.
The names of m-d variants are now added (manually) to MDSRCS instead
of to SRCS, and the names of all machine-independent (m-i) variants
that can reasonably be replaced by an m-d variant are now added
(manually) to MISRCS instead of to SRCS, so that a simple substitution
can be used to discard the unused m-i variants.  MISRCS is potentially
all m-i sources, but the substitution is too simple to be fast, so
MISRCS should be kept reasonably small.

libc/Makefile.inc:
Do the substitution.

libc/i386/string/Makefile.inc:
Add to MDSRCS instead of to SRCS.  Add the names of all sources in this
directory, but no others.

libc/string/Makefile.inc
Add to MISRCS instead of to SRCS.  Add the names of all sources in this
directory.  Don't use (broken) explicit rules for special cases.
1997-10-16 13:46:50 +00:00
Bruce Evans
b2fad8ae7a Moved `SRCS+= frexp.c' to the correct Makefile.inc.
Sorted SRCS.
1997-10-14 07:43:33 +00:00
Peter Wemm
65b3003d2d kill the undead 1997-07-13 14:26:00 +00:00
Bruce Evans
362c392f0b This commit was generated by cvs2svn to compensate for changes in r27180,
which included commits to RCS files with non-trunk default branches.
1997-07-03 03:28:27 +00:00
Bruce Evans
5500fdcd4f Import Lite2's src/lib, except for non-i386 machine-dependent directories,
libc/db, libc/gen/crypt.* and libtelnet.  All affected files except 3
unimportant ones have already left the vendor branch.
1997-07-03 03:28:27 +00:00
John Birrell
870039320f Changed all paths to be relative to src/lib instead of src/lib/libc
so that all these makefiles can be used to build libc_r too.

Added .if ${LIB} == "c" tests to restrict man page builds to libc
to avoid needlessly building them with libc_r too.

Split libc Makefile into Makefile and Makefile.inc to allow the
libc_r Makefile to include Makefile.inc too.
1997-05-03 03:50:06 +00:00
Bruce Evans
e23b7f75de Use separate routines for memmove() and memcpy(). This lets me drop
the (buggy) support for alternative entry points.  ALTENTRY() was only
used for memmove().  Optimizing for space was particularly silly because
memcpy() is rarely used (gcc normally inlines it).
Obtained from:	NetBSD
1997-04-20 13:02:48 +00:00
Bruce Evans
8009c566df Use separate routines for memmove() and memcpy(). This lets me drop
the (buggy) support for alternative entry points.  ALTENTRY() was only
used for memmove().  Optimizing for space was particularly silly because
memcpy() is rarely used (gcc normally inlines it).

Obtained from:	NetBSD
1997-04-20 12:46:12 +00:00
Bruce Evans
1c33c5a76b Merged with the 1996/11/12 NetBSD version:
- use a slightly less bogus copyright.  This file was never contributed
  to Berkeley.  It still claims to be copright by the Regents.
- use <machine/asm.h> instead of "DEFS.h".
- use RCSID($Id$) instead of explicit assembly code and messy ifdefs.
  The rcsid won't be put into the object file until we make RCSID()
  non-null.  NetBSD uses a LIBC_SCCS ifdef here.  We used a LIBC_RCS
  instead, but I want RCSID() to be controlled directly by LIBC_RCS
  (actually by LIB_RCS).  This is the only difference with the NetBSD
  version.
- added ifdefs to support generation of memcpy() and memmove().  The
  other changes are "while I'm here" to get this.
- improved style of the copy backwards case.
1997-04-20 12:09:18 +00:00
Bruce Evans
7df534462e Fixed long lines.
Removed unused macros CALL() and ASMSTR.

Reviewed by:	jdp
1997-04-19 17:05:30 +00:00
Bruce Evans
21774a3cea Second stage of moving this to in <machine/asm.h>: just include
<machine/asm.h> here.
1997-04-15 14:18:17 +00:00
Peter Wemm
662909a780 Import CSRG 4.4BSD-Lite2 lib/libc onto vendor branch 1997-03-11 11:29:42 +00:00
Peter Wemm
7e546392b5 Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
Bruce Evans
b416939d71 Moved definitions of PIC macros from SYS.h to DEFS.h so that SYS.h
doesn't need to be included in files that have nothing to do with
syscalls.

Added missing `.text' to START_ENTRY so that ENTRY() works when
invoked in the data section.
1997-02-14 10:57:07 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
John Dyson
c8318ed6c3 Correct a "spelling" error in a comment. 1996-10-31 17:50:45 +00:00
Julian Elischer
5eaf55414c Submitted by: john birell (jb@cimlogic.com.au)
fixups for makefiles
and for Thread-safe sycalls
1996-08-22 04:25:09 +00:00
Julian Elischer
0f7d684755 Submitted by: John Birrell <cimaxp1!jb@werple.net.au>
Here are the diffs for libc_r to get it one step closer to P1003.1c
These make most of the thread/mutex/condvar structures opaque to the
user. There are three functions which have been renamed with _np
suffixes because they are extensions to P1003.1c (I did them for JAVA,
which needs to suspend/resume threads and also start threads suspended).

I've created a new header (pthread_np.h) for the non-POSIX stuff.

The egrep tags stuff in /usr/src/lib/libc_r/Makefile that I uncommented
doesn't work. I think its best to delete it. I don't think libc_r needs
tags anyway, 'cause most of the source is in libc which does have tags.

also:

Here's the first batch of man pages for the thread functions.
The diff to /usr/src/lib/libc_r/Makefile removes some stuff that was
inherited from /usr/src/lib/libc/Makefile that should only be done with
libc.

also:

I should have sent this diff with the pthread(3) man page.
It allows people to type

make -DWANT_LIBC_R world

to get libc_r built with the rest of the world. I put this in the
pthread(3) man page.  The default is still not to build libc_r.


also:
The diff attached adds a pthread(3) man page to /usr/src/share/man/man3.
The idea is that without libc_r installed, this man page will give people
enough info to know that they have to build libc_r.
1996-08-20 08:22:01 +00:00
Jordan K. Hubbard
51295a4d3e General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
1996-07-12 18:57:58 +00:00
Bruce Evans
95c715795a Fixed comparisons so that preposterously large (>= 0x80000000) brk values
aren't silently converted to minbrk.  This stops malloc(INT_MAX) from
dumping core.  Small values are still silently converted.  They should
be an error.  sbrk() doesn't do any range checking or conversions or
overflow checking.

Moved PIC_EPILOGUE invocation to a more natural place where it
obviously doesn't interfere with the comparison.
1996-06-25 18:54:42 +00:00
John Polstra
cbdc4399d2 Fix a bug caused by the collision of a local assembler label with another
use of the same label in a recently-introduced PIC_PROLOGUE.  This
should solve the recent core dumps from pdksh.
1996-05-11 13:28:11 +00:00
Peter Wemm
7f11212ef1 Fix a bogon in the pic + threadsafe version of cerror, it was missing
a PIC_EPILOGUE (leaving an extra long on the stack).

Submitted by: John Polstra <jdp@polstra.com>
1996-05-10 16:43:47 +00:00
Peter Wemm
f1703dfbaa Add support to enable libc to be compiled in ELF format. (#ifdef __ELF__)
In a nutshell, this macroizes the local/global symbol scoping rules
that are different in a.out and ELF.  It also makes the i386 assembler
stubs conform to i386 PIC calling conventions - the a.out ld.so didn't
object, but the ELF one needs it as it implements PIC jumps via PLT's as
well as calls.  The a.out rtld only worked because it was accidently
snooping the grandparent calling function's return address off the stack..

This also affects the libc_r code a little, because of cpp macro nesting.
1996-05-05 07:56:21 +00:00
Peter Wemm
781006180d rfork/minherit glue in libc
man pages adapted from OpenBSD's versions.
1996-02-23 19:56:55 +00:00
Peter Wemm
13295c7f99 Put in missing '_' in call to wrapper _thread_sys_sigsetmask() function. 1996-02-17 12:25:21 +00:00
Julian Elischer
f70177e76e Reviewed by: julian and (hsu?)
Submitted by:	 John Birrel(L?)

changes for threadsafe operations
1996-01-22 00:02:33 +00:00
Peter Wemm
6065a0be11 This commit was generated by cvs2svn to compensate for changes in r13122,
which included commits to RCS files with non-trunk default branches.
1995-12-30 19:02:48 +00:00
Peter Wemm
a5b996a7ec recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
David Greenman
aacd7f348e Be smarter about handling overlapped copies and only go backwards if it
is really necessary. Going backwards on a P6 is much slower than forwards
and it's a little slower on a P5. Also moved the count mask and 'std'
down a few lines - it's a couple percent faster this way on a P5.
1995-12-27 18:47:45 +00:00
Poul-Henning Kamp
fcce81cde3 remove GCC support functions from libc.
Should never have been here in the first place.
1995-10-05 10:24:57 +00:00
Poul-Henning Kamp
bf529a66d9 Calling sbrk(2) with zero argument doesn't need to generate a syscall.
Reviewed by:	bde
1995-10-04 15:58:57 +00:00
Rodney W. Grimes
6c06b4e2aa Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
David Greenman
717d9cdd57 First round of changes to clean up the RCSID mess in libc:
1) Changed LIB_SCCS and SYSLIB_SCCS to LIB_RCS and SYSLIB_RCS.
2) Changed sccsid[] variables to rcsid[]
3) Moved all RCSID strings into .text
4) Converted all SCCSID's to RCS $Id$'s
5) Added missing $Id$'s after copyright.
1995-01-23 01:30:24 +00:00
David Greenman
1504cd6172 (Very) minor improvement from NetBSD/J.T.Conklin. 1995-01-22 22:03:45 +00:00
David Greenman
530eb0c1c4 Added leaner and meaner swab() function by J.T. Conklin. 1995-01-22 21:36:15 +00:00
Bruce Evans
75b6d64b84 fixunsdfsi.S:
Embalm.  Rewrite to do things much the same as gcc-2: use fistpq for speed
and elegance, and mishandle overflow consistently.  __fixunsdfsi() is no
longer called by gcc.
1994-12-27 13:37:38 +00:00
Bruce Evans
08747772a2 sigsetjmp.S:
Remove unnecessary .text statement.
1994-12-27 13:34:04 +00:00
Bruce Evans
1fe9751525 Remove unnecessary .align statement. 1994-12-27 13:33:03 +00:00
Bruce Evans
be0264b945 Fix a spelling error and add a comment about possible improvements. 1994-12-27 13:12:34 +00:00
David Greenman
7e20f2848c Go back to Bruce's fix with a minor change that will allow a NULL string
pointer if len is 0. I should have looked at the revision history - I would
have found that Bruce already fixed the bug with len=0 over a month ago.
Whoever said that the bug was in 2.0 was wrong.
1994-11-25 08:58:53 +00:00
David Greenman
40598ff428 Fixed bugs related to returning NULL if length is zero. 1994-11-25 04:11:19 +00:00
Bruce Evans
b5281b4b2a Fix memchr(p, 0, 0) to return NULL instead of p. 1994-10-27 11:36:11 +00:00
Bruce Evans
1a4206dd85 Reenable sigsetjmp.S. Preserve the FP state. Rearrange offsets
to match setjmp.S.
1994-10-25 14:08:13 +00:00
Jordan K. Hubbard
2494a00b49 This is weird. I *added this*, but it went away again! Ummm.. Mumble.
I'm confused..
Submitted by:	jkh
1994-08-22 09:19:50 +00:00
Jordan K. Hubbard
11841a6877 Put __infinity back here again until someone does the right thing and
repartitions libc into something human again.  I don't have that kind of
time right now myself, unfortunately.
Submitted by:	jkh
1994-08-20 20:16:57 +00:00
David Greenman
c501fb74cf Fixed problem with returning -1 on error when the return value is a
long long. Done by plugging both eax and edx with -1. This will clobber
edx unnecessarily when the return value is only 32bit...though probably
always an okay thing to do, it could stand a better fix.
   This was the cause of gawk being broken (boy was THAT ever a subtle
bug!!!).
1994-08-13 14:00:26 +00:00
Garrett Wollman
2ceb2ce9ee First crack at making libc work with the new make macros. It compiles on
my machine, and a simple static (genassym) and shared (sysctl) executable
both work.  Still to be done: RPCand YP merge.
1994-08-05 01:19:12 +00:00