Commit Graph

5909 Commits

Author SHA1 Message Date
Adrien Destugues 6c178e1e73 * Add locking system to BCountry to avoid problems with the formatters being deleted while you use them, or created multiple times.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 11:38:37 +00:00
Axel Dörfler d62ee168ed * Corrected naming/visibility of the DatagramSocket methods (protected methods
do not get the '_' prefix, only private ones do).
* Added a "peek" argument to SocketStatus() (and generally renamed "clone" to
  "peek" where it made sense).
* Implemented the base version of SocketStatus() to return the actual socket
  error. This enables returning ICMP errors back to the socket user.
* Other minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37712 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 10:12:06 +00:00
Adrien Destugues f48ad0d968 * Style fixes (some pointed out by Axel, some others by the vim stylechecker).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 16:52:49 +00:00
Adrien Destugues d4f3002de9 * BCountry : add error checking in case the system runs out of memory, cleanup function prototypes (we don't need virtual, this was a leftover of
OpenTracker days)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 16:36:36 +00:00
Adrien Destugues 3bdfd7f340 * BCountry : use lazy initialisation for the date and time formatters, since they are not always used. Makes instancaiating a country faster, and
so, loading the locale preflet is also faster and use less memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37696 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 13:54:53 +00:00
Adrien Destugues a03aca6e06 WIP Timezone support
* BCountry can list the timezones applicable for the country
 * BCountry can give its name (for example France), or LocaleName (french (France)). The second one will later be moved to BLocale class along with 
most of the locale settings ; but this needs a bit of refactoring.
 * The Locale preflet now uses LocaleName instead of Name, since it deals with locales. The time preflet will want only country names, without te 
language information, for example.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 12:47:00 +00:00
Axel Dörfler 74a4c33fda * Implemented a way to preserve header data while passing along a buffer to the
upper layers: you use the store_header() function to mark the header you want
  to preserve. All subsequent remove_header() calls won't claim the actual
  data, but only move the node start around.
* This header can then be restored by restore_header(). However, a call to
  prepend_data() will destroy the stored header. Also, if remove_header() cuts
  off a whole node, restoring the header won't succeed anymore.
* Discarded the no longer needed net_buffer::network_header field.
* Also discarded the hoplimit field which temporarily breaks the IPv6 build
  until Atis reworks it.
* IPv4 now also dumps the IP header in the send path if debug output is enabled.
* icmp_error_reply() might be called so early that the net_buffer's addresses
  do not point to the reply address; this is now detected, and the addresses are
  taken out of the IP header in that case.
* Improved dumping the net_buffer to also include its address, and flags.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 12:26:46 +00:00
Ingo Weinhold 4e08fb8589 Added rw_lock_read_lock_with_timeout().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37680 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 11:10:48 +00:00
Ingo Weinhold b349aae941 Should have been part of r37678. io_request_is_vip() support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 11:09:32 +00:00
Ingo Weinhold 0a1dabca7e Added public io_request_is_vip(), returning whether the given request has the
VIP flag set.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37678 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 11:08:34 +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 eddec292d5 * applied patch by kaliber that fixes more than 100 warnings - thanks a lot!
Closes #6349

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 21:43:20 +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
Adrien Destugues 719313afdd * Missing from the previous commit. Sorry ! Thanks to luroh for watching.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 17:49:00 +00:00
Axel Dörfler 68d1b69012 * Fixed broken decode function. I wonder how that one could have been missed
before...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 16:13:51 +00:00
Adrien Destugues 82a115e8bc * BCountry : add copy constructor and assignment operator
* The locale roster uses them instead of messing with pointers, to avoid ownership problems
 * The Locale preflet works on a copy of the default country instead of altering it directly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 14:09:48 +00:00
Axel Dörfler 1978fb81ee * First part of ICMP support: this is based on the work by Ivo Vachkov (GSoC
2007), and Yin Qiu (GSoC 2008). And even though I needed to rewrite pretty
  much all of it because of the countless bugs and problems it had, it still
  shares the same architectural problems of introducing a domain dependent
  error mechanism to the upper layers, and needing the
  net_buffer::network_header hack. This I will rework later.
* net_buffer's append_size(), and prepend_size() will now gracefully handle
  buffers without a data node.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 12:00:27 +00:00
Axel Dörfler f6a57629c3 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 11:23:42 +00:00
Axel Dörfler 866e21d3a6 * Moved DatagramSocket::Socket() up to its parent.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 11:22:54 +00:00
Ingo Weinhold 83f46ed6ab file_cache_write() can get a NULL buffer and still a size != 0, which the
request handling wasn't taking into account.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 09:55:04 +00:00
Adrien Destugues 4b37c7f861 * Remove direct access to ICU in locale preflet, use the locale kit instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-20 15:47:16 +00:00
Adrien Destugues fe8d7c0225 * Remove the CatalogStub class and put the Gatcatalog function directly in BLocaleRoster,
* Adjust the B_TRANSLATE macros to take this into account
 * Adjust collectkatkeys to take it into account too
Thanks to Ingo for explaining me all the technical details about hiding things in shared objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-20 11:38:34 +00:00
Ingo Weinhold 814057885c Patch by Alex Wilson:
* Added support for archiving/unarchiving.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37613 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-20 08:28:55 +00:00
Ingo Weinhold 12463fa891 Patch by Alex Wilson: Added archiving/unarchiving support to BSplitView.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37612 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-20 08:24:19 +00:00
Axel Dörfler 8d1485fa06 Work in progress commit by Atis Elsts (I'm posting his ChangeLog comments
directly here), I made only a few style changes:
* introduced 'has_broadcast_address' field in
struct net_address_module_info
 - REVIEW: the name, and the status of this field for UNIX and L2CAP
	families
* ipv6 address family support
* ipv6 address printing	
* ipv6 protocol support	
* ipv6 multicast support
  - TODO: add and remove multicast routes in a more proper way
  - TODO: support MLD
* ipv6 datalink protocol support
* icmpv6 protocol support (EchoRequest and EchoResponse messages)
* ipv6 neigbor discovery protocol support
  (Advertisement and Solicitation messages)
  - TODO: only the very basic support is present,
	the protocol state machine is by no means completed
  - TODO: replying to Solicitation does not work too good ATM
	(visible, when pinging Haiku from outside)
* added Jenkin's hash algorith
* minor changes in existing IPv4 code - cleanup function
	ipv4_get_loopback_address(), written by myself
* add tests: raw, udp, tcp/udp, mullicast sender
* add 'hoplimit' field in struct net_buffer
  - TODO: this is just a hack, more generic approach would be  better.
* add 'receive_data' function pointer in
	struct net_datalink_protocol_module_info
  - TODO: this is also more like a hack, to support information
	passing from ICMPv6 to IPv6_datagram level.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-19 16:55:55 +00:00
Adrien Destugues 3047815036 * Fix \x parsing in collectcatkeys again (thanks to Kaliber)
* Hide the CatalogStub::GetCatalog method so that if liblocalestub.a is missing from a localized image, it will not try to steal the catalog of another one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-19 15:47:06 +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
Adrien Destugues 7af097b973 * Add FormatDate variant returning fields positions and associated DateFields returning their identifiers
* Use them in the time preflet to display and edit the date in a local-aware way


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 12:24:57 +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
Ingo Weinhold 39c72631a3 Patch by Alex Wilson:
* Added archiving/unarchving support.
* Coding style cleanup (some more by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 01:05:28 +00:00
Ingo Weinhold ff626c8e29 Patch by Alex Wilson: Added archiving/unarchiving support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:46:40 +00:00
Ingo Weinhold 3fb74eb796 Patch by Alex Wilson (with minor changes by myself):
* Added support for archiving/unarchiving.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:41:56 +00:00
Ingo Weinhold a3d9e70188 dos2unix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37544 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:20:19 +00:00
Ingo Weinhold 849e11ad8d Patch by Alex Wilson:
* Implemented archiving/unarchiving support.
* Coding style cleanup (some more by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:15:31 +00:00
Ingo Weinhold d1535a45df Patch by Alex Wilson:
* Implemented archiving/unarchiving support.
* Coding style cleanup (some more by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37542 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:09:06 +00:00
Ingo Weinhold 80c2bbd8ae Patch by Alex Wilson (with small style changes by myself): Added support for
archiving/unarchiving.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-16 18:11:24 +00:00
Ingo Weinhold 7ed1644c55 Patch by Alex Wilson:
* Added archiving/unarchiving support.
* Style cleanup (also some by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-16 17:23:15 +00:00
Ingo Weinhold cbac1a2355 Patch by Alex Wilson: Added archiving/unarchiving of layout and layout
related data.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37539 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-16 17:06:55 +00:00
Ingo Weinhold b137ab3eb3 Patch by Alex Wilson (minor changes by myself) related to the new archiving
features:
* Some cosmetic adjustments of the API, like using references instead of
  pointers, argument order, method names, etc.
* Added convenience template methods for archiving and unarchiving to BArchiver
  and BUnarchiver.
* BUnarchiver (respectively the private BUnarchiveManager) explicitly deals with
  object ownership, now. This is necessary since an error while unarchiving
  could leave an already unarchived object without owning object, which would
  result in it being leaked. The BUnarchiver::{Get,Find}Object() methods do now
  have an optional parameter to specify whether object ownership shall be
  transferred.
* Fixed incorrect header guard in headers/private/binary_compatibility/Global.h.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-16 16:49:42 +00:00
Oliver Tappe 7ad694e346 Some more ICU-related improvements:
* updated icu-devel package to 4.4.1
* create appropriate devel lib links when icu-devel is being installed
  (which only works during build, not when using installoptionalpackage)
* dropped ICU headers from repository and instead fetch them from the
  icu-devel package when needed during the build
* adjusted Jamfiles that make use of ICU-headers accordingly (hopefully
  I didn't miss any)
* fixed license in OptionalPackage description of icu packages


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-15 21:23:45 +00:00
Adrien Destugues a7e183f8e5 BDateField is already used in ColumnListView, so use another name for this enum.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-14 19:43:46 +00:00
Adrien Destugues 57500c639c * Allow use of unicode character in time view
* Some support for languages having an order different than H:M:S:AM (like chinese). Does not seem to work too well, but I can't spot what I missed
 * API to get the infos about the type of each field in a time format


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-14 16:43:04 +00:00
Adrien Destugues c96d1da735 * Add an API to get a formatted time along with delimiters for the differrent fields, for further parsing/formatting
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-14 13:20:20 +00:00
Stephan Aßmus b1008df2c2 Patch by Alex Wilson: Added convenience methods for storing BAlignment and BSize
in BMessages. Also added type codes for them in TypeConstants.h. Closes ticket
#6302. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-14 07:02:38 +00:00
Adrien Destugues 5098ba1b94 Update ICU to 4.4
* Remove 4.2 sourcecode
 * ICU is now an optional package (mandatory)
 * Adjust the namespaces and libraries names where needed


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-13 19:04:40 +00:00
Ingo Weinhold b944766870 * Moved the vm_page initialization from vm_page.cpp:vm_page_init() to the new
vm_page::Init().
* Made vm_page::wired_count private and added accessor methods.
* Added VMCache::fWiredPagesCount (the number of wired pages the cache
  contains) and accessor methods.
* Made more use of vm_page::IsMapped().
* vm_copy_on_write_area(): Added vm_page_reservation* parameter that can be
  used to request a special handling for wired pages. If given the wired pages
  are replaced by copies and the original pages are moved to the upper cache.
* vm_copy_area():
  - We don't need to do any wired ranges handling, if the source area is a
    B_SHARED_AREA, since we don't touch the area's mappings in this case.
  - We no longer wait for wired ranges of the concerned areas to disappear.
    Instead we use the new vm_copy_on_write_area() feature and just let it
    copy the wired pages. This fixes #6288, an issue introduced with the use
    of user mutexes in libroot: When executing multiple concurrent fork()s all
    but the first one would wait on the fork mutex, which (being a user mutex)
    would wire a page that the vm_copy_area() of the first fork() would wait
    for.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37460 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-10 15:08:13 +00:00
Axel Dörfler 268317bd9d * Style cleanups.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 16:04:41 +00:00
Adrien Destugues 27d84b482c Patch by Alex Wilson as part of GSoC 2010 : Archiving of Layouted BViews hierarchy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 15:40:49 +00:00
Ingo Weinhold fbb6335d2a Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 15:04:38 +00:00
Ingo Weinhold e5150e2847 Patch by Alex Wilson (compilation fixes by myself): Extended the archiving/
unarchiving protocol to support archival of arbitrary object graphs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 14:54:25 +00:00