Commit Graph

538 Commits

Author SHA1 Message Date
Jérôme Duval bee827e203 changed dirfd() to its POSIX signature, without const (see #4947).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-06 21:34:06 +00:00
Oliver Tappe b27cf34dc1 Close #6969 (warning about redundant declarations):
* drop function declarations from wctype.h which are already in wchar.h

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39917 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-21 23:13:47 +00:00
Axel Dörfler 138cfe065f * Changed IFM_GMASK to the same value as in FreeBSD.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-09 00:09:00 +00:00
Michael Lotz deb25b1cc2 Add a few commonly used macros for line state setting/getting.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39759 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-08 00:11:01 +00:00
Philippe Houdoin 42bd140546 Fix _SIZEOF_ADDR_IFREQ() macro definition: there is no ifreq type.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-06 11:33:00 +00:00
François Revol 917c4aeb8d ISO C and POSIX mandate _Exit() in stdlib.h to be the same as _exit().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-28 05:07:53 +00:00
Jérôme Duval 8f9cef36d1 added missing prototypes and moved some around.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39659 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-27 00:07:33 +00:00
Jérôme Duval 93ca791b70 * added math.h missing prototypes like log2f. This fixes #6802.
* whitespace cleanup and renamed log2() to radeon_log2 (conflicts with log2 in math.h)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39620 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 23:42:17 +00:00
Ingo Weinhold 25dc253d6a * Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-22 13:06:36 +00:00
Oliver Tappe bc3791e867 * add symbolic constants for the langinfo constants, as that's what
is required by the POSIX specs (and some perl tests rely on it)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-13 00:22:40 +00:00
Axel Dörfler d72ede75fb * We now use a FreeBSD compatible ifmediareq structure for SIOCIFMEDIA, and
SIOCSIFMEDIA.
* Made sure that the two media ioctls are actually forwarded to the driver.
* Added NetworkDevice.cpp to the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-10 21:44:26 +00:00
Ingo Weinhold 7aff60b7de Patch by Paul Davey with minor style changes by myself: For gcc 4 (and clang)
define the HUGE_VAL and friends macros to the respective __builtin_*()
functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-05 13:20:52 +00:00
Scott McCreary 0fae873352 Updated posix headers to remove commas from copyright line, to match the preferred coding guidelines.
Cleaned up some header style violations, making sure there are two blank lines after the header guards.
This fixes the posix header part of #2191.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-03 21:46:47 +00:00
Ithamar R. Adema a85c91d6f0 * Fix setjmp/jmpbuf_t size so we can finally get to the KDL prompt
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38993 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-18 00:50:59 +00:00
Philippe Houdoin 7fab61455e Apply path by Roy Keene which add IN6_ARE_ADDR_EQUAL() macro specified in RFC 2292.
Issue detected while porting Tcl.
Thanks.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38969 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-14 17:26:59 +00:00
Axel Dörfler 14f487c4de * Removed the non-implemented O_TEMPORARY.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38963 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-13 07:24:14 +00:00
Scott McCreary 8f0c2a388c Removed definitions for O_BINARY and O_TEXT, and patched the few files that used them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-13 06:26:53 +00:00
Axel Dörfler 80c5b9b5ee * Added prototypes for getline(), and getdelim(). This fixes bug #6646.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-04 12:37:48 +00:00
Scott McCreary 88ff3bdb33 Fixed some variable names to fit coding style guidelines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38752 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-21 06:30:21 +00:00
Scott McCreary e4ca362903 Readded parameter names, taking them from the ones used at opengroup, except for sockatmark for which I used descriptor instead of "s".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38712 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-18 22:39:14 +00:00
Scott McCreary bb05c02ef9 Fixed a dummy argument conflict, this was detected when fixing #5784.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38711 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-18 17:26:55 +00:00
Scott McCreary e86eb77b1b Patch from kaliber to a the glibc strtold implentation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-18 16:42:59 +00:00
Scott McCreary 8e19103a0f Applied patch from obache, this partially fixes #5784.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38709 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-18 16:34:30 +00:00
Oliver Tappe 338ddd836f Closing #6499:
* add missing getsubopt() POSIX-function
* added corresponding test


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-14 18:43:24 +00:00
Jérôme Duval 867b56657b use __haiku_addr_t instead of __haiku_uint32
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38098 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-14 11:58:02 +00:00
Jérôme Duval 5091a866ec To be validated as part of bug #6386. Update glibc regex to 2.11, headers/posix/regex.h included. This imposes some changes in some of our sources using the regex.h,
mostly bin tools and mail kit. The use of __USE_GNU macro is needed for instance when the expected regex implementation is the GNU one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-11 16:49:58 +00:00
François Revol 3d08ac9237 Add the fmemopen() and open_memstream() POSIX extensions to libroot. Those can be used to build FILE pointers to in-memory buffers, a possible use would be to make resources available to ported applications. Untested.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37997 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-10 09:56:13 +00:00
Axel Dörfler 1f9c8c4576 * Changed the _SIZEOF_ADDR_IFREQ() macro such that it can be used how we are
using it - hopefully, that is actually correct (it's adopted from FreeBSD).
* Fixed bug that cut off the sockaddr_dl reported by the system, so that DHCP
  wouldn't work anymore (and ifconfig wouldn't show the actual MAC address
  anymore).
* Changed the listing code to actually pad to ifreq size, and leave the length
  of the sockaddr untouched.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-06 12:58:02 +00:00
Oliver Tappe 9d391816b7 * clearified that stime() has nothing to do with timezones
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 21:42:56 +00:00
Oliver Tappe 7e965f506d More consolidation of timezone code:
* dropped DaylightSavingTime from real_time_clock code in kernel, it was
  never really being used for what it meant (and just being referred to by
  gettimeofday(), which put a different meaning to it
* adjusted the syscalls get_timezone() & set_timezone() as well as their callers 
  accordingly
* got rid of get_rtc_info() and rtc_info struct in kernel, as it was only
  being referred to by the FAT add-on and that one (like gettimeofday()) put a
  different meaning to tz_minuteswest. Added a comment to FAT's util.c
  showing a possible solution, should the hardcoded GMT timezone pose a problem.
* fixed declaration of gettimeofday() to match POSIX base specs, issue 7
* changed implementation of gettimeofday() to not bother trying to fill struct
  timezone - it was using wrong values before, anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 23:02:57 +00:00
Axel Dörfler 2b1c0755dd * Renamed the proprietary SIOC_* ioctls to B_SOCKET_* - no reason to pollute
global name space, and have ugly identifiers for nothing :-)
* Added a flags field to struct ifaliasreq. Added flags to mark an alias that
  is currently being configured, or has been automatically configured.
  Those flags aren't used yet, but they will replace IFF_CONFIGURING and
  friends.
* Implemented deleting addresses only from interfaces via ifconfig.
* Added more command aliases for delete to ifconfig ("del", and "delete", for
  more consistency with route).
* Fixed control_routes() to only release a reference to an address if it
  actually got one before.
* If an interface address is deleted, its routes are now removed as well.
* InterfaceAddress now holds a reference to its interface as planned.
* Implemented removing interfaces. Works quite nicely.
* When downing an interface, all of its routes are now removed. When upping
  it again, at least the default routes are added.
* datalink.cpp's get_interface_name_or_index() leaked a reference to the
  interface found.
* SIOCAIFADDR would also leak a reference when new addresses were added.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 15:51:54 +00:00
Axel Dörfler 9d771afb39 * Added Haiku specific socket ioctls to configure the interface aliases:
SIOC_IF_ALIAS_ADD, SIOC_IF_ALIAS_REMOVE, SIOC_IF_ALIAS_GET, SIOC_ALIAS_SET,
  and SIOC_IF_ALIAS_COUNT.
* Implemented all of those new ioctls, though they are yet untested.
* Added ifreq::ifr_data, and removed the hack in the FreeBSD compat if.h
  header.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-29 09:43:08 +00:00
Axel Dörfler 61729d9323 * Reworked the complete stack to allow more than one address per network
interface - this caused quite a number of changes.
* Network interfaces, and its addresses are now reference counted (not yet
  complete, though, InterfaceAddresses need to hold references to their
  interface as well).
* There are two known regressions of this commit that I will fix later:
  - you cannot remove interfaces anymore
  - IPv4 multicast was broken anyway, but now it's disabled, too.
* Moved a device_interfaces.cpp|h out of interfaces.cpp.
* The datalink layer chain is now instantiated per domain per interface,
  not just per interface anymore.
* When a buffer reaches the network layer, it has no known interface yet, ie.
  the ipv4|6|whatever modules need to set this manually.
* Added more debug output, and some new debugger commands, the control option
  is now printed in clear text.
* Added hash_address() function to the address modules. Added "const" to
  set_to_defaults() where needed.
* Fixed net_buffer's restore header functions offset use as reported by Atis.
* Improved buffer dump output, use the domain module to print the address if
  available.
* Moved net_buffer::type into the union, as it's not needed by the upper layers
  anymore.
* Moved IPv6 specific code from {add|remove}_default_route() to where it
  belongs, but disabled it for the time being.
* Completely discarded useless ipv4_datagram module.
* Added ping6 to the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 17:38:23 +00:00
Oliver Tappe c0f9765409 * minor cleanup (whitespace and superfluous include)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37729 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-24 16:04:43 +00:00
Oliver Tappe a3f665982e * reintegrated posix-locale
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37725 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 23:13:00 +00:00
Oliver Tappe bca50be432 Second go at fixing what should have been part of r31927:
* uncommented fwscanf() in wchar.h to make it available
* imported wcsftime() from FreeBSD-8 (which just wraps strftime()), so that we 
  not only declare it, but provide an implementation, too
As a result, the next build of gcc4 should be able to detect full support for wchar_t and in turn activate wchar_t-based template types (like std::wstring).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 17:34:33 +00:00
Oliver Tappe 8ab6671aad * reverted r37669, as gcc4 enables wchar_t-related template types, but
then fails to build them because of wcsftime() missing
Needs more investigation ...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37674 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 00:02:40 +00:00
Oliver Tappe 887a1066e4 Fix that should have been part of r31927:
* uncommented fwscanf() in wchar.h to make it available
As a result, the next build of gcc4 should be able to detect full support for wchar_t and in turn activate wchar_t-based template types (like std::wstring).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 20:11:48 +00:00
Axel Dörfler ca83261dd6 Patch by Atis Elsts with only minor changes by myself:
* Moved ip6.h header from FreeBSD private to posix/netinet.
* Added some more IPv6 support definitions to in.h, and in6.h.
* Added icmp6.h header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-19 15:03:37 +00:00
Fredrik Holmqvist a636d1e365 Patch by kaliber to fix some compiling errors with clang. Removed the #include <iostream> part, but otherwise not modified.
See http://clang.llvm.org/compatibility.html#c++ why it is needed. Note that HashMap.h Key and Value are typenames as well.
Afaict this is correctly done, builds and runs on gcc4. This fixes #5892.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 10:33:24 +00:00
Axel Dörfler 816d81b51b * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 06:52:16 +00:00
Ingo Weinhold 7b2003907a * Replace remaining BeOS int types.
* Removed inclusion of <SupportDefs.h>, respectively replaced it with
  <stdint.h>.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-05 16:11:43 +00:00
Jérôme Duval bafdc02b99 forgot an uint16 type for x86_64
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-04 12:38:45 +00:00
Jérôme Duval 5efd950f28 * followed Ingo's suggestion and used uint*_t types instead of public Haiku types.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-04 12:36:38 +00:00
Jérôme Duval 8386c959c4 Fixes uses of __uint16_t and __uint32_t which we don't define, also fixes the ppc buildtools build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37387 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-04 11:10:28 +00:00
Jérôme Duval 818786a83a Define ssize_t in Haiku headers when building with GCC4 (see also #5719). This could imply a conflict with old gcc4 Haiku builds.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-03 16:39:29 +00:00
François Revol c31429c581 include sys/cdefs.h to hopefully fix building the cross tools for arm & ppc.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37377 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-03 13:45:15 +00:00
Wim van der Meer 2ec871140d Change the tempnam() prototype in stdio.h to match its implementation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37292 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-28 11:11:25 +00:00
Rene Gollent 8154643efe Updated AI_* flags to match up with our implementation. Should fix #3945.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-26 17:50:14 +00:00
Ingo Weinhold ea021b94d8 * Moved phys_addr_t definition to SupportDefs.h.
* Added phys_size_t.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-25 11:18:38 +00:00