Commit Graph

7998 Commits

Author SHA1 Message Date
Tim J. Robbins
02f4f60ad5 Convert the Big5, EUC, MSKanji and UTF-8 encoding methods to implement
mbrtowc() and wcrtomb() directly. GB18030, GBK and UTF2 are left
unconverted; GB18030 will be done eventually, but GBK and UTF2 may just
be removed, as they are subsets of GB18030 and UTF-8 respectively.
2003-11-02 10:09:33 +00:00
Marcel Moolenaar
0d7c0ed330 Turn Write_Disk() into a stub for now. It needs to be rewritten to
write out a GPT and not a MBR.
2003-11-02 08:41:18 +00:00
Marcel Moolenaar
f5ea9b34c6 o Move Int_Open_Disk() from disk.c to open_disk.c for use by all
platforms except ia64 and use Int_Open_Disk() in open_ia64_disk.c
   on ia64. We need to know more than GEOM can provide us so we're
   forced to read from the disk. Move uuid_type() to open_ia64_disk.c
   and remove all references on non-ia64.
o  Pass the GEOM conftxt to Int_Open_Disk() so that only Open_Disk()
   needs to know about GEOM and libdisk can more easily be used with
   media not handled by GEOM.
o  Create an ia64 specific definiton of struct disk on ia64, because
   we don't need/have most of the fields other platforms need and
   other fields not applicable on platforms other than ia64.
o  Do not compile change.c on ia64. It's too PC specific.
o  In Fixup_Names() in create_chunk.c, try all partition numbers
   that are valid for the GPT disk. We have the total number of
   partitions that can be allocated in the disk structure on ia64.
   Also, use the GPT partition naming if we're creating one under
   a chunk of type "whole". It's a GPT partition in that case.
o  In Create_Chunk(), compile-out the PC specific code on ia64 that
   checks BIOS geometry restrictions.
o  In Debug_Disk() in disk.c, dump the ia64 specific fields.
o  Save the partition index in the chunk on ia64 so that we can
   preserve it when we write the data back to disk. This avoids that
   partitions get moved around or swapped after installing FreeBSD,
   which may render a disk unusable.
2003-11-02 08:39:08 +00:00
Marcel Moolenaar
78cb7a7cd0 Do not fill in d_ncylinders, d_ntracks and d_nsectors in the disklabel
on ia64. Not only do we not have a disklabel by default, we also do
not have a notion of cylinders, tracks and sectors.
2003-11-02 08:07:25 +00:00
Marcel Moolenaar
c0c0907820 Compile-out support for allfreebsd, dedicate, sanitize and bios on
ia64. These commands are PC specific and not supported.
2003-11-02 08:01:18 +00:00
Marcel Moolenaar
aff198c706 Turn Track_Aligned(), Prev_Track_Aligned(), Next_Track_Aligned(),
Cyl_Aligned(), Prev_Cyl_Aligned() and Next_Cyl_Aligned() into
tautologies on ia64. GPT removes all notion of tracks, heads and
sectors per track, so there are no alignment considerations.
2003-11-02 07:58:19 +00:00
Marcel Moolenaar
03e432ad9c o In Print_Chunk(), don't print the address of the chunk on ia64. It
doesn't have any meaning and only results in lines longer than 80
   characters.
o  In Delete_Chunk2(), also look for chunks of type "part" under
   chunks of type "whole" on ia64. They're not only under chunks of
   type "freebsd" there.
2003-11-02 07:44:59 +00:00
Tim J. Robbins
d390e53270 Remove TODO comment about creating a macro version of towctrans().
Remove unnecessary inclusion of <ctype.h>.
2003-11-01 08:20:58 +00:00
Tim J. Robbins
d86d5b37b7 Fix a typo that caused the optimized single-byte locale path not to be taken. 2003-11-01 08:18:18 +00:00
Tim J. Robbins
bb187251fc Add a manual page for the utrace() system call.
Obtained from:	NetBSD
2003-11-01 05:36:14 +00:00
Tim J. Robbins
d4f6cd06dd Allow mbrtowc() and wcrtomb() to be implemented directly, instead of
as wrappers around the deprecated 4.4BSD rune functions. This paves the
way for state-dependent encodings, which the rune API does not support.
- Add __emulated_sgetrune() and __emulated_sputrune(), which are
  implementations of sgetrune() and sputrune() in terms of
  mbrtowc() and wcrtomb().
- Rename the old rune-wrapper mbrtowc() and wcrtomb() functions to
  __emulated_mbrtowc() and __emulated_wcrtomb().
- Add __mbrtowc and __wcrtomb function pointers, which point to the
  current locale's conversion functions, or the __emulated versions.
- Implement mbrtowc() and wcrtomb() as calls to these function pointers.
- Make the "NONE" encoding implement mbrtowc() and wcrtomb() directly.

All of this emulation mess will be removed, together with rune support,
in FreeBSD 6.
2003-11-01 05:13:13 +00:00
Tim J. Robbins
1e8742e9cd Don't bother passing a freshly-zeroed mbstate to mbsrtowcs() etc.
when the current implementation won't use it, anyway. Just pass NULL.
This will need to be changed when state-dependent encodings are
supported, but there's no need to take the performance hit
in the meantime.
2003-10-31 13:29:00 +00:00
Tim J. Robbins
cf651e6b5c Implement fgetrune(), fungetrune() and fputrune() as wrappers around
fgetwc(), ungetwc() and fputwc().
2003-10-31 10:55:19 +00:00
Hajimu UMEMOTO
4c6867a867 add destination address selection described in RFC3484.
in KAME implementation, even when no policy is installed
into kernel, getaddrinfo(3) sorts addresses.  Since it
causes POLA violation, I modified to don't sort addresses
when no policy is installed into kernel,

Obtained from:	KAME
2003-10-30 17:36:53 +00:00
Poul-Henning Kamp
b778a32374 Add '#' to the characters VIS_GLOB encodes. This fixes a bug in mtree. 2003-10-30 12:41:50 +00:00
Poul-Henning Kamp
347fb1d46e Add a new flag to vis(3): VIS_GLOB which encodes the glob(3) magic
characters '*', '?' and '['.
2003-10-30 10:40:49 +00:00
Hidetoshi Shimokawa
7928124aa5 Allow to specify a character special device as a core file.
This enable us to use /dev/fwmem* as a core file.
e.g.
	ps -M /dev/fwmem0.0 -N kernel.debug
	dmesg -M /dev/fwmem0.0 -N kernel.debug
	gdb -k -c /dev/fwmem0.0 kernel.debug
You need to set target EUI64 in hw.firewire.fwmem.eui64_hi/lo before
opening the device. On the target arch, (PCI) bus address must be
equivalent to physical address.
(We cannot use this for sparc64 because of IOMMU.)

No objection in: -audit
2003-10-29 14:02:16 +00:00
Tim J. Robbins
d210c39f49 Remove __NETBSD_SYSCALLS. 2003-10-29 10:55:56 +00:00
Tim J. Robbins
4539e95a0f Remove incomplete support for running FreeBSD userland on old NetBSD kernels
lacking the issetugid() and utrace() syscalls.
2003-10-29 10:45:01 +00:00
Martin Blapp
f4a180cc7b Make this part identical with NetBSD: Use recvlen instead of inlen.
No functionality change.

Obtained from:	NetBSD
2003-10-29 09:25:07 +00:00
Martin Blapp
b6c452a8fd Don't compare NULL against a character.
Obtained from:	NetBSD
2003-10-29 09:22:49 +00:00
Martin Blapp
74a482551f Don't use NULL to compare against a char.
Obtained from:	NetBSD
2003-10-29 09:20:33 +00:00
Martin Blapp
2ad99b72ee Don't use NULL to compare against a character.
Obtained from:	NetBSD
2003-10-29 09:18:44 +00:00
Peter Wemm
dc196afb2e Don peril sensitive (ie: bikeshed sensitive) sunglasses and quietly
send strhash(3) off to sleep with the fishes.  Nothing in our tree uses it.
It has no documentation.  It is nonstandard and in spite of the filename
strhash.c and strhash.h, it lives in application namespace by providing
compulsory global symbols hash_create()/hash_destroy()/hash_search()/
hash_traverse()/hash_purge()/hash_stats() regardless of whether you
#include <strhash.h> or not.  If it turns out that there is a huge
application for this after all, I can repocopy it somewhere safer and
we can revive it elsewhere.  But please, not in libc!
2003-10-28 22:36:54 +00:00
David Schultz
7a773faadc Fix a problem where libm compiled under 5.X would depend on features
that are only in libc.so.5.  This broke some 4.X applications linked
to libm and run under 5.X.

Background:
In C99, isinf() and isnan() cannot be implemented as regular
functions.  We use macros that call libc functions in 5.X, but for
libm-internal use, we need to use the old versions until the next
time libm's major version number is bumped.

Submitted by:	bde
Reported by:	imp, kris
2003-10-27 01:28:07 +00:00
Hajimu UMEMOTO
9713f5c170 - errx() doesn't need `\n'.
- use %u for unsigned variable.

Obtained from:	KAME
2003-10-26 12:00:27 +00:00
Hajimu UMEMOTO
69d79fc421 revert previous change. we don't need to include types.h. 2003-10-26 11:11:13 +00:00
Peter Wemm
62537aaa17 Preserve the constness of the value argument passed to env_setenv() as
it gets passed through the filter functions.
2003-10-26 04:04:12 +00:00
Peter Wemm
a352421215 Pacify gcc about casting pointers to integers (for the lowest few bits). 2003-10-26 03:55:58 +00:00
Peter Wemm
05bcd1d098 (mostly) Clean up some const warnings here. The code takes some liberties
because it is the originator of various const strings and knows that they
came from malloc.
2003-10-26 03:51:47 +00:00
Peter Wemm
4f75936922 clnt_call takes args of type xdrproc_t. 2003-10-26 03:43:35 +00:00
Poul-Henning Kamp
ba5455f25c Consistently cast to (u_char *) when filling with junk. 2003-10-25 23:47:33 +00:00
Dag-Erling Smørgrav
2a063d30f6 Better safe than clever.
Submitted by:	das
2003-10-25 19:53:28 +00:00
Dag-Erling Smørgrav
801517fd4e Document fabsl(3).
Submitted by:	Stefan Farfeleder <stefan@fafoe.narf.at>
2003-10-25 13:45:11 +00:00
Poul-Henning Kamp
ea0ae15a06 Style changes. Inching closer to convergence with OpenBSD. 2003-10-25 12:56:51 +00:00
Dag-Erling Smørgrav
e334ea2edc - fabsl.c should be named s_fabsl.c for consistency with libmsun's
documented naming scheme (unfortunately the documentation isn't in the
   tree as far as I can tell); no repocopy is required as there is no
   history to preserve.

 - replace simple and almost-correct implementation with slightly hackish
   but definitely correct implementation (tested on i386, alpha, sparc64)
   which requires pulling in fpmath.h and the MD _fpmath.h from libc.

 - try not to make a mess of the Makefile in the process.

 - enterprising minds are encouraged to implement more C99 long double
   functions.
2003-10-25 09:32:18 +00:00
Hajimu UMEMOTO
8827557e37 according to RFC3542 10.5, the 5th argment of inet6_opt_next()
is not size_t but socklen_t.

Reported by:	tinderbox
2003-10-25 06:51:23 +00:00
Ken Smith
13b5f02d60 - fix description of what processes SIGCONT can be sent to
PR:		docs/58413
Reviewed by:	rwatson
Approved by:	blackend (mentor)
2003-10-24 21:20:26 +00:00
Hajimu UMEMOTO
bf838688af oops, revert previous change to getaddrinfo.c. This is not related
to RFC3493.  The previous change was related to RFC3484 (Default
Address Selection for IPv6), and it will come later.
2003-10-24 18:43:24 +00:00
Hajimu UMEMOTO
f95d46333d Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542
(aka RFC2292bis).  Though I believe this commit doesn't break
backward compatibility againt existing binaries, it breaks
backward compatibility of API.
Now, the applications which use Advanced Sockets API such as
telnet, ping6, mld6query and traceroute6 use RFC3542 API.

Obtained from:	KAME
2003-10-24 18:26:30 +00:00
Hajimu UMEMOTO
688a5c3ea3 reorder functions to be in sync with KAME. 2003-10-23 14:32:03 +00:00
Hajimu UMEMOTO
37b3e94167 EAI_ADDRFAMILY and EAI_NODATA was deprecated in RFC3493
(aka RFC2553bis).  Now, getaddrinfo(3) returns EAI_NONAME
instead of EAI_NODATA.  Our getaddrinfo(3) nor getnameinfo(3)
didn't use EAI_ADDRFAMILY.

Obtained from:	KAME
2003-10-23 13:55:36 +00:00
Hajimu UMEMOTO
3d82ba4313 preparation for RFC3493. EAI_NODATA was deprecated. 2003-10-23 13:50:01 +00:00
Dag-Erling Smørgrav
4318dce616 Connect fabsl.c to the build. 2003-10-23 08:23:51 +00:00
Dag-Erling Smørgrav
29bd23abf0 Add prototypes for all long double functions in C99. Leave them all
#if 0'd out, except for fabsl(3) which I've implemented.
2003-10-23 08:23:38 +00:00
Dag-Erling Smørgrav
017e4316ae Implement fabsl(3), allowing the world to build with -fno-builtin. 2003-10-23 08:20:47 +00:00
Peter Wemm
d1a499ad2a Use amd64_set_fsbase() instead of calling sysarch() directly. 2003-10-23 06:12:57 +00:00
Peter Wemm
d9484cc915 Add implementations of amd64_[gs]et_[fg]sbase(). 2003-10-23 06:07:09 +00:00
Hajimu UMEMOTO
3b1a779723 oops, gai_strerror must return default value when error code
isn't found in ai_errlist.
2003-10-22 16:53:21 +00:00
Hajimu UMEMOTO
b29ec00b70 make ai_errlist struct. this is preparation for RFC3493
(EAI_NODATA is depricated).

Obtained from:	KAME
2003-10-22 15:41:38 +00:00