Commit Graph

639 Commits

Author SHA1 Message Date
Pawel Dziepak 79c9b824e4 libroot: sync() should not return any value 2014-01-16 20:18:22 +01:00
Adrien Destugues 9cdbb95476 Remove comment. 2013-12-21 21:58:28 +01:00
Adrien Destugues c516bac9f4 Revert part of hrev24647
The baudrate constant for MIDI speed was after all the others in BeOS,
and we have to keep them with the same values for things to work.
Moreover, the constants in SerialPort.h were not changed, so everything
was out of sync and all apps using BSerialPort ended up using the wrong
speed.

Add a comment in termios.h to make sure this doesn't happen again.
2013-12-21 20:25:24 +01:00
Pawel Dziepak fd96cf08a7 libroot: Remove _SC_NPROCESSORS_MAX and _SC_CPUID_MAX
_SC_NPROCESSORS_MAX and _SC_CPUID_MAX appear to be supported only by
Solaris. There isn't much point in exposing such values to the userland
anyway.
2013-12-06 21:54:07 +01:00
Ithamar R. Adema d22fdcae7d ARM: remove #warning from public header file
This causes configure of gcc/binutils to fail its test for sys/time.h, which
in turn causes compilation of gcc/binutils to fail.

Found trying to do a @bootstrap-raw build for ARM.
2013-10-28 22:04:00 +01:00
Sam Toyer b236c48e09 Add missing definitions to math.h
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2013-10-01 19:48:51 +02:00
Adrien Destugues 7650931572 Rename parameters to avoid compile error
* warning: declaration of `signal' shadows global declaration
2013-10-01 17:17:28 +02:00
Ingo Weinhold 81291304ad Merge remote-tracking branch 'haiku/master' into package-management
Conflicts:
	build/jam/BuildSetup
	build/jam/HaikuImage
	build/jam/board/sam460ex/BoardSetup
	build/jam/board/verdex/BoardSetup
	data/catalogs/apps/icon-o-matic/fr.catkeys
	src/add-ons/kernel/drivers/audio/hda/hda_codec.cpp
	src/add-ons/kernel/drivers/disk/usb/usb_disk/usb_disk.cpp
	src/apps/debugger/files/FileManager.cpp
	src/apps/debugger/files/FileManager.h
	src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp
	src/apps/haiku-depot/MainWindow.cpp
	src/apps/haiku-depot/MainWindow.h
	src/apps/haiku-depot/Model.cpp
	src/apps/haiku-depot/PackageInfo.h
	src/apps/haiku-depot/PackageInfoListener.h
	src/apps/haiku-depot/PackageInfoView.cpp
	src/apps/haiku-depot/PackageInfoView.h
	src/apps/haiku-depot/PackageListView.cpp
	src/apps/haiku-depot/PackageListView.h
	src/system/kernel/arch/arm/arch_timer.cpp
	src/system/libroot/os/arch/arm/atomic.S
	src/tools/translation/bitsinfo/Jamfile
	src/tools/translation/bmpinfo/Jamfile
	src/tools/translation/tgainfo/Jamfile
2013-09-27 01:55:45 +02:00
Pawel Dziepak afaa6ed4b3 x86[_64]: Randomize initial stack pointer on alternative signal stacks
If the alternate signal stack is used randomize the initial stack
pointer in the same way it is randomized on "normal" thread stacks.
Also, update MINSIGSTKSZ value so that regardless of where the new
stack pointer points to there is at least 4k of stack left.
2013-09-21 21:52:13 +02:00
Pawel Dziepak 4efb0a6d36 posix: Update PTHREAD_STACK_MIN to match MIN_USER_STACK_SIZE
Thanks for pointing this out Pete!
2013-09-17 14:42:04 +02:00
Jérôme Duval 5a2c5827e4 add a constant for 10G base T ethernet. 2013-09-17 14:40:21 +02:00
Pawel Dziepak aca204991f posix: Update PTHREAD_STACK_MIN to match MIN_USER_STACK_SIZE
Thanks for pointing this out Pete!
2013-09-16 23:23:29 +02:00
Jérôme Duval b31f2d53e0 add a constant for 10G base T ethernet. 2013-09-14 18:11:43 +02:00
Ingo Weinhold c625c5fd36 <langinfo.h>/<select.h>: don't use C++ comments 2013-06-12 14:55:16 +02:00
Ingo Weinhold a1832a0e83 <resolv.h>: Make self-contained 2013-06-11 15:23:18 +02:00
Alexander von Gluck IV 88e9c0961a libnetwork: Check for ipv4 flag in resolv.conf
* Add option for forced IPv4 resolution.
* Helps with #8293
* Very slightly modified patch by donn
2013-04-14 17:03:32 -05:00
Landon Fuller 524bb6d3ec Restore FTS_WHITEOUT, guard it with __HAIKU__.
As per Jérôme Duval's code review in issue #9337.
2013-01-11 00:26:48 +01:00
Landon Fuller 4b5a13ab81 Add Haiku support.
This replaces the use of a few BSD-specific functions, as well
as the direct references to _open/_close et-al.

BFS doesn't support the FTS_NOSTAT directory link count optimization,
and no statfs() function is available, so we simply turn that off.
2013-01-11 00:26:48 +01:00
Landon Fuller 7de6d45ca2 Drop in unmodified fts/ftw implementations from FreeBSD HEAD (r245067). 2013-01-11 00:26:47 +01:00
Jérôme Duval ef769e5e87 add declaration of sa_family_t in sys/socket.h
* added missing declaration of sa_family_t in sys/socket.h, this fixes #8731
  thanks to Anarchos for the patch.
* fixed the build of the command ftp
2012-12-28 22:28:13 +01:00
Hamish Morrison d1f280c805 Add support for pthread_attr_get/setguardsize()
* Added the aforementioned functions.
* create_area_etc() now takes a guard size parameter.
* The thread_info::stack_base/end range now refers to the usable range
  only.
2012-12-28 18:02:58 +00:00
Jérôme Duval 00e7904406 include string.h for FD_ZERO in sys/select.h
* sys/select.h was not self contained before, this fixes #9327
* index is defined as a function in string.h, fixed resulting name
  collision in glut_shapes.c
2012-12-28 18:30:03 +01:00
Alex Smith 11c9f9a1d6 Merge branch 'master' into x86_64
Conflicts:
	build/jam/FloppyBootImage
	build/jam/OptionalBuildFeatures
	build/jam/OptionalPackages
	headers/private/shared/cpu_type.h
	src/bin/ps.c
	src/bin/sysinfo.cpp
	src/kits/tracker/PoseView.cpp
	src/preferences/appearance/DecorSettingsView.cpp
	src/preferences/virtualmemory/Settings.cpp
	src/servers/input/AddOnManager.cpp
	src/servers/input/InputServer.cpp
	src/servers/input/InputServerMethod.cpp
	src/system/boot/Jamfile
	src/system/boot/platform/raspberrypi_arm/mmu.cpp
	src/system/boot/platform/u-boot/arch/arm/Jamfile
	src/system/kernel/arch/x86/arch_cpu.cpp
	src/system/kernel/arch/x86/arch_thread.cpp
	src/system/kernel/cache/block_cache.cpp
	src/system/kernel/vm/VMAnonymousCache.cpp
2012-11-18 14:02:07 +00:00
Ithamar R. Adema 63fe8ecdd9 wchar.h: fix header comment style.
Comment uses C++ style, while it can be compiled in a C-only environment. This
broke the ICU cross compilation (done for ARM).
2012-11-16 03:04:26 +01:00
Jerome Duval e634025c06 unistd.h: added noreturn attribute on _exit() 2012-10-27 19:50:26 +02:00
Alex Smith 3fed1a15f5 Get app_server working on x86_64.
With this commit, app_server now compiles and runs at boot! Nothing
particularly interesting happens, just the blue background and a mouse
pointer. Remote backends are broken and not compiled in, see #8834.
Note that it won't be possible to build this quite yet, need to get
the FreeType package uploaded.
2012-08-05 08:46:30 +01:00
Alex Smith c0d28c0199 Implemented signals for x86_64. 2012-07-30 13:52:51 +01:00
Alex Smith 3fde53501d Updated x86_64 fenv.h and added fenv.c. 2012-07-27 15:21:41 +01:00
Alex Smith 82694bd124 Merge branch 'master' into x86_64
Conflicts:
	headers/posix/arch/x86_64/arch_setjmp.h
	src/system/kernel/cache/block_cache.cpp
2012-07-20 18:33:46 +01:00
Matt Madia 173f54f147 Updated copyright in headers. No functional change. 2012-07-19 18:14:06 +00:00
Alex Smith 2f36ef5afe Fixed the x86_64 setjmp implementation.
* typedef for jmp_buf was using int where it should be long.
* setjmp was clearing the buffer pointer rather than the signal mask before
  calling sigsetjmp.
* KDL now works without crashing on x86_64.
2012-07-05 13:52:36 +01:00
Alex Smith 73f27ecd3a Implementations of some libroot functions for x86_64.
These are the functions required by the kernel. These are all full
implementations except for system_time(), which will be implemented later.
2012-06-15 19:57:21 +01:00
Oliver Tappe c9ce04c45e Fix warnings about MB_LEN_MAX being redefined.
* in our limits.h, move #include_next of GCC's limits.h to the end such
  that things defined in it will not disturb our own definitions
2012-02-26 22:45:16 +01:00
Oliver Tappe 752527a8fe Cleanup: correct variable name in mbrtowc() signature. 2012-02-07 21:43:00 +01:00
Oliver Tappe b7417fbec1 Switch wchar from glibc to our own implementations. 2012-01-07 22:02:48 +01:00
Jérôme Duval 90b92dab5c added memrchr to string.h, guarded by __USE_GNU. Also guards strchrnul.
Original patch by Dario Casalinuovo.
BUG: Ticket #8265
2012-01-05 00:17:41 +01:00
Oliver Tappe ec99f3b2a6 Adjust mbstate_t to embed the state of the ICU converter.
* make room in mbstate_t for containing an ICU-converter's state
  (well, in fact the whole converter object)
* adjust libroot's locale add-on to clone converters into a given
  mbstate_t directly
* adjust ICUThreadLocalStorageValue to contain the converter pointer
  instead of a converter-ID (if the converter is related to an
  mbstate_t, it points into the mbstate_t).
* adjust users of converters to directly use converter pointers
  instead of ICUConverterRef
* drop now unused ICUConverterManager and ICUConverterRef
* update gcc4 optional package

This brings our multibyte implementation into a fully working state,
both non-ascii and non-8-bit characters can now be handled normally
in the Terminal, i.e. this finally fixes #6276.

N.B.: Since the size of mbstate_t has changed, everything (including
the compiler!) needs to be rebuilt.
2011-12-15 13:18:11 +01:00
Oliver Tappe cfe553b378 Squash TODO: __STDC_ISO_10646__ is being defined now. 2011-12-12 17:27:41 +01:00
Jérôme Duval 86216323af Fixed math.h part of #2696
* added lgammal_r wrapper
* removed gamma_r and gammaf_r functions from math.h
2011-12-11 12:28:53 +01:00
Oliver Tappe 0f21cf0ca0 Define MB_LEN_MAX to 16.
* we follow glibc's example and allow 16 bytes as maximum multibyte
  character length (ICU's data currently shows an actual maximum
  of 8 bytes)
2011-11-22 17:40:45 +01:00
Oliver Tappe e0eb1d38c4 Let MB_CUR_LEN lookup the actual value.
* instead of yielding 1, MB_CUR_LEN now looks up the correct
  value in the ctype data provided by the locale backend
2011-11-22 17:32:39 +01:00
Oliver Tappe fa02fc6907 Adjust mbstate_t to what we need.
* we maintain the character count and the ID of the corresponding
  ICU converter in mbstate_t
2011-11-22 17:23:04 +01:00
François Revol 02c3d9f5e6 Rename some parameters to avoid "declaration of 'foo' shadows global declaration" warnings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43048 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-31 22:01:29 +00:00
Adrien Destugues a1f2a6b179 Add cfmakeraw. Like cf{get/set}{i/o}speed, it iisn't POSIx standard but is used
often enough and simple enough to write that we should allow it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-16 16:44:17 +00:00
Scott McCreary 3d01f69f9e Fixed open_memstream(), buf was void, opengroup.org shows that it should be char. Fixes #7905.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42618 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-10 19:14:49 +00:00
Ingo Weinhold b353a9a30a ANSI C doesn't like unnamed unions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-17 13:57:30 +00:00
Ingo Weinhold 24df65921b Merged signals-merge branch into trunk with the following changes:
* Reorganized the kernel locking related to threads and teams.
* We now discriminate correctly between process and thread signals. Signal
  handlers have been moved to teams. Fixes #5679.
* Implemented real-time signal support, including signal queuing, SA_SIGINFO
  support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition
  of the real-time signal range. Closes #1935 and #2695.
* Gave SIGBUS a separate signal number. Fixes #6704.
* Implemented <time.h> clock and timer support, and fixed/completed alarm() and
  [set]itimer(). Closes #5682.
* Implemented support for thread cancellation. Closes #5686.
* Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554.
* Lots over smaller more or less related changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-12 00:00:23 +00:00
Oliver Tappe d9a26469df Fix #6969 (hopefully for real this time):
* move all the isw... functions from wchar.h to wctype.h (just following version 7
  of the POSIX base specs)
* remove all declarations from wchar.h that are in wctype.h, too


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 18:44:22 +00:00
Jérôme Duval db61366a55 Patch from Dhruwat Bhagat (bug #7537): Fix "'noreturn' function returns" warning on call to assert(0).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-21 13:15:46 +00:00
Oliver Tappe cb666277a7 Revert part of r41389 that injured binary compatibility (rightly pointed out by Axel)
* length of utsname members must stay at length of 32
This will work just the same for now. When using a DVCS yields longer revisions, we need to adjust AboutSystem to fetch the full revision directly from the ELF section '_haiku_revision' (as found in libroot.so or libbe.so).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41392 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-08 21:51:58 +00:00
Oliver Tappe 6250297a08 Switch haiku-revision from uint32 to string, as that's going to be required soon, no matter if we switch to Git or Mercurial
* increase _SYS_NAMELEN defined in sys/utsname.h to 128 to allow long(ish) revisions
* sHaikuRevision is now a static character array (in both libroot and kernel)
* adjust build tool set_haiku_revision to write the revision as string


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-08 20:02:42 +00:00
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