Commit Graph

9233 Commits

Author SHA1 Message Date
Augustin Cavalier 86c12bf05b kernel: Initialize all fields of rw_lock in RW_LOCK_INITIALIZER.
Spotted by Clang.
2018-12-09 23:01:11 -05:00
Augustin Cavalier 5dd66afb7d headers: Remove some extra semicolons.
Spotted by Clang.
2018-12-09 23:00:47 -05:00
Murai Takashi e28abad762 userlandfs: Fix -Werror=parentheses
Remove unnecessary parentheses in declaration of pointers.
Pointed out by gcc8.

Change-Id: I6f56b12349b6c8433f7ce237f5ce5d7af45bf103
Reviewed-on: https://review.haiku-os.org/750
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Skipp_OSX <jscipione@gmail.com>
2018-12-04 20:46:43 +00:00
Adrien Destugues 151343ebc8 BLooper: API to hijack existing thread.
I need this to use loopers in WebKit, which spawns threads and expects
to be able to turn them into event loops later on.

This is the pattern already used in BApplication, we may as well make it
available elsewhere.

Change-Id: I5939ca89d33cb3bcc92567b302c2038d976af598
Reviewed-on: https://review.haiku-os.org/735
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-12-02 21:36:31 +00:00
Murai Takashi 4c5e5d8b04 tools/locale: Fix using auto_ptr to array.
Use BStackOrHeapArray instead of using auto_ptr to array.

Change-Id: I171cb002829c36ec51ba7d1e387869263e2a40f2
Reviewed-on: https://review.haiku-os.org/745
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-12-02 21:31:26 +00:00
Barrett17 b6802a9530 MetaData: Remove support for uint32 keys
* We try to conform to what ffmpeg does, it is
unuseful to support metadata keys formats which
aren't really used anywhere.
* Add TODO with some infos for future improvements.
2018-12-01 12:30:54 +01:00
Barrett17 a57cf128a6 Codec Kit: Introduce declarative macro with version and name
* Namespaces protect symbols, I didn't consider that when adding
the BCodecKit namespace, so, the AddOnManager complained that
instantiate_plugin() was missing. A macro is introduced that allow
plugins to specify it's className, version and name, this ease
the declaration of the plugin symbols, otherwise the function
should have been declared inside the BCodecKit namespace which
we would like to avoid.
* The code is also more future proof, since in future the AddOn manager
can begin to check for plugin versions.
2018-12-01 11:19:12 +01:00
Murai Takashi f0a1a07c73 RegionSupport: Fix PVS 338-346
Fix 'true / false' value is implicitly cast to the integer type.

Change-Id: I2f72fcd34d2d97d20e2a98ed5efe25919a485c9d
Reviewed-on: https://review.haiku-os.org/739
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-11-30 21:13:14 +00:00
Barrett17 36f94d9e39 Move RawFormats.h to Codec Kit
* This should be probably uniformed with the future
media kit format defs. Not sure why those formats are
separated and used only by the codec kit. Eventually,
if needed can be changed to some name that differentiate
them better than media defs.
2018-11-29 08:06:34 +01:00
Barrett17 278d03da22 media_kit: Remove most private dependencies from codec_kit
* Move to BCodecKit namespace and make extensive use
of BCodecRoster.
* This is a first step in the right direction of
decreasing private dependencies. Some APIs are being
translated to the CodecKit. I am doing an investigation
on which APIs are really used among apps, so that the new
kit can be more slim and oriented toward easy development
and can be extended in the right direction instead to
continue maintaning unuseful code.
* BMediaFormats needs still a bit of love.
* General improvements in style and code maintainability.
2018-11-27 11:38:05 +01:00
Barrett17 fe9542fdb5 BCodecRoster: Add useful functionality from MediaFormats 2018-11-27 11:38:05 +01:00
Barrett17 d33bd9ec7b Codec Kit: Introduce BCodecKit namespace 2018-11-27 11:38:04 +01:00
Nathan Sashihara 247414814e Fix IN6_IS_ADDR_V4MAPPED & IN6_IS_ADDR_V4COMPAT false positives
Change-Id: I71af73718667b800c416e47203f8b9924a1096c4
Reviewed-on: https://review.haiku-os.org/733
Reviewed-by: Rene Gollent <rene@gollent.com>
2018-11-27 02:43:53 +00:00
Barrett17 f20ff4faec CodecRoster: Add GetDecoderInfo 2018-11-26 07:41:27 +01:00
Barrett17 1b96c34179 ChunkProvider/ChunkWriter: Move method to protected
* Remove inline destructor.
2018-11-25 14:07:46 +01:00
Barrett17 ee09c29148 Media Kit: Update private code 2018-11-25 13:02:02 +01:00
Barrett17 be805d02d7 Codec Kit: Rename classes to BFoo pattern 2018-11-25 13:02:02 +01:00
Barrett17 082e4ae4a7 Codec Kit: Rename files 2018-11-25 13:02:02 +01:00
Augustin Cavalier ef593f61a2 ELF: Ignore PT_EH_FRAME and PT_STACK.
This allows Clang builds (linked with our cross binutils) to
at least start runtime_loader and then try to load launch_daemon.
That fails with an infinite loop somewhere...
2018-11-24 21:08:31 -05:00
Augustin Cavalier 807304b100 build: Add basic support for MinGW hosts.
This doesn't fully work yet (the FS code in libroot_build
needs to be adapted, as some of the symlink-related calls
are not available on MinGW), but it gets much further than
the "Cygwin" target did.
2018-11-23 16:24:25 -05:00
Augustin Cavalier 37c106060a build: Remove support for cross-building from Cygwin and SunOS.
These have been broken for a long time. Some Cygwin changes that
are relevant on MinGW are kept here, but users on Windows who
want to build Haiku should probably use WSL at this point.

However, now that we are using relative paths and don't need
to worry about drive path kludges, it's actually possible to
get some host tools built on MinGW. Changes for that coming.
2018-11-23 15:40:50 -05:00
Barrett17 44fc903a8f Codec Kit: Introduce BCodecRoster
* This class include almost everything you need to
manage codecs and iterate over them.
2018-11-22 17:41:26 +01:00
Barrett17 f5a452910a Codec Kit: Add some TODO for the future
* Little beauty fixes included.
2018-11-22 09:48:04 +01:00
Barrett17 06b088bd62 Streamer: Make constructor private 2018-11-22 09:47:12 +01:00
Barrett17 f40547016d Encoder: Make constructor private 2018-11-22 09:47:12 +01:00
Barrett17 c09a589891 Decoder: Make constructor protected 2018-11-22 09:47:12 +01:00
Barrett17 a741fb49a6 Writer: Make constructor and Init protected 2018-11-22 09:47:12 +01:00
Barrett17 75b5f33c19 Reader: Make constructor protected 2018-11-22 09:47:11 +01:00
Barrett17 af34e7abcc Codec Kit: Beauty fixes 2018-11-22 09:47:11 +01:00
Barrett17 608c9d9ae1 Codek Kit: Introduce BMetaData in Writer/MediaWriter
* Remove SetCopyright as well.
2018-11-21 17:22:58 +01:00
Barrett17 3e8f721b3b Codec Kit: Introduce BMetaData in Reader/Extractor
* Remove superfluous Copyright method.
2018-11-21 16:55:02 +01:00
Barrett17 9bbd53a288 BMetaData: Add missing functionality
* Add more metadata keys needed to support ffmpeg.
* Implement methods allowing to embed BMetaData into
BMetaData.
* Add methods to handle more types.
2018-11-21 16:51:19 +01:00
Barrett17 f722040584 BMetaData: Finalize implementation
* Use string keys. I am still convinced we need BValue.
* Use boolean instead of status_t in return, this is
much more handy in pratical use given that there's no
really a status to check.
2018-11-21 12:46:54 +01:00
Zoltán Mizsei c95db88334 sincos, sincof, sincosl declarations in gnu/math.h
Signed-off-by: Zoltán Mizsei <zmizsei@extrowerk.com>

Change-Id: I44b39e8d76dd970e18e285b5d8b9bad715608154
Reviewed-on: https://review.haiku-os.org/715
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-11-19 23:14:51 +00:00
Augustin Cavalier 2897df9676 bluetooth: ioctls always pass size on Haiku. 2018-11-18 14:42:09 -05:00
Barrett17 1f2ddf2fd0 Codec Kit: Initial BMetaData implementation 2018-11-18 16:57:12 +01:00
Barrett17 b4d8bbd540 Codec Kit: Move Managers to private headers
* Those classes are not ready for public consumption. Ideally,
I'd add a well designed BCodecRoster wrapping them. This is part
of the general cleanup I am doing to get the code in a good state
before going to finalize the design.
* I don't plan to reintroduce BMediaFile in the media2 API, and
I'd like to remove any (explicit) usage of entry_refs and things
like that.
* I plan to introduce BMetaData and BMediaFormat which is going
to be different than what we do now.
* We need to explicitly use the mime type when it's available and
it is another design consideration when CodecRoster will be introduced.
2018-11-18 13:15:35 +01:00
Barrett17 3fe994ba28 MediaExtractor: Move stream_info to private 2018-11-18 12:53:14 +01:00
Barrett17 121db87f5f Revert "codec_kit: Remove Perform"
This reverts commit a9ccd74af7.
2018-11-18 12:06:14 +01:00
Augustin Cavalier 9cc0f06a01 kernel: Remove the B_KERNEL_AREA protection flag.
It is now no longer used.
2018-11-17 16:46:49 -05:00
Barrett17 a9ccd74af7 codec_kit: Remove Perform
* Undocumented and apparently unuseful pattern.
2018-11-17 18:42:50 +01:00
Barrett17 9d90a8381d StreamerPlugin: Add ctor 2018-11-17 18:39:39 +01:00
Michael Lotz 2f211cce6d virtio: Replace size return with usedLength in queue_dequeue.
The size was in fact the count of physical entries that were used. That
number must necessarily be the same as the number given when adding to
the queue, so that number isn't really interesting. Consequently none
of the users of that API made use of it.

Return the used length instead, which is the way virtio signals how much
valid data resides in the dequeued buffer. This is for example important
to know the frame length of incoming packets in virtio_net.
2018-11-17 00:34:49 +01:00
Alexander von Gluck IV 5bd0fbd13a build: Add riscv architecture
* I mean, qemu 3.0 supports it.
* Nobody get excited, we need all the triplets added to
  our gcc buildtools. clang 7.0 seems to be cool with riscv though.

Change-Id: I17728163e4f28a3c16cee482a253364724b06f3a
2018-11-04 13:47:50 -06:00
Axel Dörfler efafab643c Deskbar: Resizable tray
* Adds max width and height arguments to
  instantiate_deskbar_(item|entry).
* Old applications just stay with a 16x16 scaled icon, though.
* All used apps within the repository are converted to the new call
  besides the input_server input method icon (that will need further
  API changes in the input_server).

Change-Id: I29cc439396917be2c24135888459d31364997dff
Reviewed-on: https://review.haiku-os.org/656
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-04 19:00:49 +00:00
Axel Dörfler 5fd3bc6d2c BDeskbar: Moved constants to shared header
* Instead of duplicating them in different files.
2018-11-03 20:03:15 +00:00
Kacper Kasper 800e6fe412 BStringView: add support for multiline strings
* Actually draw the string at the bottom of the frame.
* Unfortunately BStringList cannot be cached because there is no
  space left in the class.
* Change SGI and PNG translators to use it in place of BTextView.

Change-Id: I07e12bf1a8dc956d18c9624604c7b63453ad15a2
Reviewed-on: https://review.haiku-os.org/620
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-03 16:44:10 +00:00
Barrett17 7257735529 codec_kit: Some more style and cosmetic fixes 2018-10-29 10:15:26 +01:00
Barrett17 8ccd9c0741 codec_kit: Add some padding 2018-10-28 16:14:25 +01:00
Barrett17 4269364345 codec_kit: Cosmetic changes
* Move padding at the bottom.
* Add some missing newline.
* Remove superfluous private statements.
2018-10-28 15:48:48 +01:00
Barrett17 59125d3ced MediaWriter: Private stuff should stay private 2018-10-28 15:31:11 +01:00
Barrett17 e5e2a570ba ReaderPlugin: Private stuff should stay private
* Polishment since we are making this ABI public,
I'd rather remove any previous hack.
2018-10-28 15:25:12 +01:00
Barrett17 df2639bf60 Move adapter_kit API to libcodec.so 2018-10-24 16:12:04 +02:00
Barrett17 1275248a77 codec_kit: First half
* Move all codec stuff into libcodec.so
2018-10-24 16:12:03 +02:00
Jérôme Duval c02c4653c2 virtio: sync ids with Linux.
Change-Id: I1ca852f16e2b8d5d22ebed25b682e56fd934c46c
Reviewed-on: https://review.haiku-os.org/640
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-24 07:36:51 +00:00
Barrett17 62081a2cca audio: Move hmulti_audio driver API to private audio headers
* Fix all drivers to don't access private media headers.
2018-10-23 16:33:19 +02:00
Barrett17 c13b6a683d audio: Move private opensound API to audio private headers 2018-10-23 16:27:29 +02:00
Barrett17 c6be458e6d media: Remove audio_module_driver
* I have not idea what this is for. Seems stuff from a long time ago
when for some reason someone wanted an audio driver implemented in
a kernel module. It is not used anywhere. If someone feels this should
be reverted please let me know and add an explanation.
2018-10-23 16:13:51 +02:00
Barrett17 66741d3615 media: Remove BeOSR3MediaDefs.h
* Fix for cmedia driver included.
2018-10-23 16:08:06 +02:00
Barrett17 804f91e634 media: Remove legacy multi_audio.h 2018-10-23 15:50:27 +02:00
Barrett17 b84955d416 media: Remove debug.h, finalize MediaDebug.h
* Funny rust from 0 AD.
2018-10-23 15:19:14 +02:00
Barrett17 a668e42088 media: Remove OldSoundDriver.h 2018-10-23 13:57:52 +02:00
Leorize 3074920054 posix/pthread.h: mark pthread_exit as noreturn
This should prevents GCC from throwing -Werror=return-type when
pthread_exit is used in place of return

Change-Id: Ied7da58b671e77b53d859b67193259aa78ec27d6
Reviewed-on: https://review.haiku-os.org/632
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-17 19:23:17 +00:00
Andrew Lindesay 15fed7905d Json : Fix String Writer
Tidy-up and correct logic around writing JSON
encoded strings.

related #13832

Change-Id: I1eca33e11dff4457f85a896c02331c1cd9ae1110
Reviewed-on: https://review.haiku-os.org/617
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-06 19:58:35 +00:00
Augustin Cavalier ece593e6cd freebsd11_wlan: Remove the BOSII_* ioctls.
They are not used anywhere (the rest of the stack uses the FreeBSD
ioctls instead), and there has been a TODO to remove them for
quite some time.
2018-10-04 20:07:11 -04:00
CodeforEvolution 106ae4ec35 Remove Curl, Switch to NetApi in Package Kit
Change-Id: I92213ab60dc987175c323d1d9ed11ac8b3517f2f
Reviewed-on: https://review.haiku-os.org/475
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-29 17:23:52 +00:00
Andrew Lindesay a609673ce8 Support : Fixes for Relative URL Handling
When URLs combine a base URL with a relative part, the relative part's
path component was being pre-processed.  This removed any ".." from the
path and in some cases in the unit test cases, the ".." should have been
retained and then only later applied to the base URL.  This changes
fixes this so that the relative part is not pre-processed and is applied
with it's path in a raw state.

Completes Fixes for #14377
Change-Id: I9cebb8599889494e11f40a3b54c87ebca3ed1a21
Reviewed-on: https://review.haiku-os.org/529
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-09-11 18:39:53 +00:00
Augustin Cavalier e282a54db8 BUrl: Remove HAIKU_TARGET_PLATFORM_HAIKU from main header.
These are really only defined during the build of Haiku itself,
so we don't want them in a system header. Since none of these
functions are virtual, leaving them as declared but not defined
should be fine.
2018-09-08 18:56:33 -04:00
Augustin Cavalier e54f86aa6a libshared: Change string_for_rate to use KiB/s instead of Kbps.
string_for_size uses KiB, etc., and so when the two are combined (e.g.
pkgman's progress display), it looked especially strange to have two
different units.
2018-09-02 00:10:30 -04:00
Augustin Cavalier 372195500d Versioning: Add BETA_1 and PRE_BETA_2 version constants.
* PRE_BETA_2 is now the default in master.
 * For libbe: R1/alpha4 used internal=8, but nobody bumped master
   at the same time, so now we are on internal=9.
2018-08-28 00:21:13 -04:00
Jérôme Duval 546fafa0a1 pty.h: fix typo. 2018-08-26 12:02:52 +02:00
Murai Takashi 3bee8ef61d Package Kit: Fix -Wmismatched-tags
Replace class with struct, since BJobStateListener is previously declared
as a struct in Job.h
Pointed by clang  [-Wmismatched-tags]

Change-Id: I75293b48bcb521d25e98702d1fc1e0ab1008d504
Reviewed-on: https://review.haiku-os.org/482
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-25 18:53:32 +00:00
Andrew Lindesay 8f30879b98 Support : Validation for Host Portion of URL
Partly Fixes #14377

Change-Id: Ia611d3653d2c16c6dcdc48ce57bd61bb6e6db366
Reviewed-on: https://review.haiku-os.org/476
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-08-25 18:50:36 +00:00
Murai Takashi 992ba1a5ce Media Kit: Fix -Wmismatched-tags
Replace struct with class, since it is previously declared as a class
in SharedBufferList.h
Pointed by clang  [-Wmismatched-tags]

Change-Id: I3ff4e285862f31a2088a773be2967102bc8b18b6
Reviewed-on: https://review.haiku-os.org/480
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
2018-08-25 15:23:52 +00:00
Augustin Cavalier c7919fc71a packagefs: Move DebugSupport up into the file_systems shared folder.
ramfs will find it useful also.
2018-08-22 19:19:56 -04:00
Augustin Cavalier 47b079afc9 Debug.h: Implement a real STATIC_ASSERT on non-GCC2. 2018-08-22 19:19:54 -04:00
Rene Gollent fc48ae3f80 Debugger: Fix #14375, #12343.
TeamDebugger:
- When a job is aborted, instead of calling into the user interface directly
  to reset the status message, post a message to do so. Also, only post the
  message if we aren't already in a terminating state. Otherwise, if jobs
  were still running while the team debugger is executing its destructor, it
  would attempt to make calls to the already destroyed user interface. This
  bug has likely been with us for quite some time, but was hidden by incorrect
  ref counting in the past (see #12343).
2018-08-20 16:44:20 -04:00
Murai Takashi 92b072972b Packagekit: Fix -Wmismatched-tags
Replace 'class' with 'struct', since they are already defined as 'struct'
in PackageInfoAttributeValue.h
Pointed by clang [-Wmismatched-tags]

Change-Id: I094d32c3444fe4299a3afe0872ade296f92debf9
Reviewed-on: https://review.haiku-os.org/471
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-19 20:36:25 +00:00
Augustin Cavalier fd25b902be BControlLook: Add FBC padding.
Fixes #14295.
2018-08-14 13:54:37 -04:00
Augustin Cavalier 7457ccb4b2 BMessageFormat: Rename to BStringFormat.
The ICU class is named MessageFormat, but on Haiku, it sounds too much
like something related to BMessage (which it isn't in the slightest)
and not part of the Locale system. It works almost entirely with BStrings,
so naming it BStringFormat makes much more sense.

OK'ed by PulkoMandy and Humdinger.
2018-08-13 20:49:00 -04:00
Augustin Cavalier f2015c2f81 boot/platform/cfe: Remove, unused.
All platforms it was theoretically useful for also have U-Boot.
OK'd by mmu_man.
2018-08-11 20:21:12 -04:00
Jérôme Duval 81375d4fbb Package Kit: add Zstd compression.
Change-Id: Idbdb7cf1bde659046a88ea69a76e3b5fc4cd7013
Reviewed-on: https://review.haiku-os.org/323
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2018-08-11 23:10:00 +00:00
Augustin Cavalier f6ff5a9790 headers/private: Fix wrong filemode. 2018-08-08 23:48:37 -04:00
Murai Takashi 410632da71 UserlandFSDefs.h: Fix gcc8 build
Remove index of portInfos[], since gcc8 warns -Werror=array-bounds
in UserlandFSServer::_Announce().

Change-Id: I79c4ee9d7dc301c54454974698ebd88d1a30750a
Reviewed-on: https://review.haiku-os.org/428
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2018-08-06 23:40:54 +00:00
Alexander von Gluck IV 5d0fd0e422 fdt: Major over-haul of fdt
* Consolidate all fdt code into fdt bus_manager
* Build boot and kernel static libraries

Change-Id: I2a69cd7e1f1276999a80734ff12918fd49b599e5
Reviewed-on: https://review.haiku-os.org/440
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2018-08-06 15:46:49 +00:00
Fredrik Holmqvist 04cbc2588e Use fast clearing of visible screen for splash
memset uses rep stosb on x86 during boot, with memory
not set to write-combining, which makes it slow.

Instead we do aligned writes of 2 x four bytes at once.
Only clear the minimum of size and width * height * 4
UEFI framebuffer size can be huge, upto 512MB here,
and rep stosb seems to be around 25-30MB/s

This is written as generic as possible to work on
old compilers and different platforms, without
expecting boot memset to be optimized.

This makes it almost unnoticable compared to not
clearing.
2018-08-03 13:40:04 +02:00
Jaroslaw Pelczar 3a72e3ebee ARM64: Add initial kernel headers
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
aarch64 -> arm64 and coding style fixes by me.
2018-08-02 20:10:13 -04:00
Augustin Cavalier 25cd28e8c1 posix: Add initial ARM64 headers.
Almost directly copied from jpelczar's work.
2018-08-02 19:59:30 -04:00
Augustin Cavalier fb4cc98472 build: Add initial ARM64 target.
It will probably be just stubs for the significant future, but,
here it is anyway.

Regarding the naming: Yes, the official name is "aarch64." However,
Linux, FreeBSD, and Zircon all call it "arm64", and so we will do the same.

I've configured it initially to be a Clang-only port, making no
changes to GCC buildtools whatsoever here. We'll see if that sticks,
however.
2018-08-02 19:48:29 -04:00
Augustin Cavalier edb6d3b17b kernel_cpp: Move the C++14 operator delete out of the header.
It seems not all of the kernel includes this, but some use new/delete
anyway. Further, operator delete[] was not implemented at all.

Possibly fixes the ARM build.
2018-08-01 23:42:24 -04:00
Fredrik Holmqvist 15db6949b6 Don't clear video mem on UEFI, efi video mode refactor
Writes to videomem is slow without memory remapping
Can't do the mapping without leaving UEFI, so skipping
the clear. Afaict it should always be cleared by UEFI

This saves ~10 seconds of booting on my machine
(1920*1080*4 bytes)

EFI video mode (should have been it's own commit)
 * Only do strcmp if there are enough params
 * break when found
2018-08-01 21:12:08 +02:00
Alexander von Gluck IV 605e7eaed3 arch: Cleanup a few typos. Sorry for spam.
Change-Id: Ic2fce841acdee8572005cf2a9710188d03d7cecd
2018-07-31 19:37:01 -05:00
Alexander von Gluck IV 9642f7705b arch: Cleanup of __ARM__ checks
* gcc 7.x defines __arm__ and __ARM__ (and others)
* clang defines __arm__ and __arm
* cleanup a few related ifdef vs if macros

Change-Id: I5da4bafac590f6fa3e10e543688001c2449f840d
2018-07-31 19:12:20 -05:00
Augustin Cavalier b5c220fb7d build: Use BeOSBuildCompatibility on Haiku also.
This forces usage of the libroot_build wrapper functions even on GCC2.
Probably fixes some strange ExtractHPKGArchive failures on Haiku.
2018-07-31 19:50:46 -04:00
waddlesplash fe66a314c8 Revert "BScrollBar: Add lines and dots knob styles to scroll bar"
This reverts commit ec1b18c58a.

This was not well enough reviewed, and it seems that at least some
consumers of the old API (e.g. WebPositive) need more than the new one provides.

Change-Id: Ie7ad1fc70dab889922424298661504b00f66d31d
2018-07-22 18:26:06 +00:00
Jérôme Duval 679518f417 setjmp.h: add noreturn keyword on longjmp variants. 2018-07-21 12:27:27 +02:00
Hrishi Hiraskar bc8427c522 Tracker: Allow add-ons to dynamically extend popup menu.
An add-on may now add custom entries to the popup menu, in order
to provide more than one action.

Change-Id: Ib4726c0c1e70c59e3ba4d752df24b76cfee1c4a4
2018-07-19 14:00:48 +00:00
John Scipione ec1b18c58a BScrollBar: Add lines and dots knob styles to scroll bar
Fixes #9137

Move scroll bar drawing into HaikuControlLook

Added B_SCROLLABLE flag to BControlLook

Update FakeScrollBar in Appearance to also draw using HaikuControlLook.

Focus works on scroll bars again, used by FakeScrollBar... and probably
nowhere else.

Added private _ScrollingEnabled() convenience method to BScrollBar and
use it in a few places making.

Create ScrollBarPrivate.h header to share a couple of scroll bar related
enums with HaikuControlLook that come from BeOS Scroll Bar prefs.

Stuff arrow_direction enum into BScrollBar::Private as it has been
succeeded by a similar enum already present in BControlLook and is only
around now for BScrollBar::Private::DrawScrollBarButton.

Change-Id: Idc31ee41de091ba45ded2f0315a004af00143803
2018-07-16 16:11:46 +00:00
Andrew Lindesay 3b17d8dd7f HaikuDepot / PackageKit: Repositories 'Identifier' URL
Repositories are identified with a 'url' in the
remote 'repo.info' file.  There is also a
'base url' which is the URL locally with which
the system is able to access the repository
data on.  There is some confusion between these
two terms in the source.  This change aims to
separate the two out and consistently name them.
The settings for the repository locally also was
not storing these values and that has been fixed.
Debug info about the repositories also did not
display the two urls consistently and will now
also do so.  Finally, HaikuDepot now correlates
locally configured repositories with the data in
HaikuDepotServer using the identifier URL; this
makes the use of mirrors with HaikuDepot possible.

Fixes #13888
Change-Id: I66dfe589b05c24e1ab123a6945352e0f24b60bf1
2018-07-05 20:06:54 +00:00
Murai Takashi 12ed45b60f Media kit: Suppress -Werror=class-memaccess
* Add media_format::Clear(), media_format::Unflatten().
* Replace memset() with media_format::Clear()
* Replace memcpy() with media_format::Unflatten()

Fix #14156

Change-Id: I38ebc2de4915b954a15b6f4f6b40d016506910e5
2018-07-02 21:14:30 +00:00
Augustin Cavalier f81f6999ee Remove private vmware driver headers.
Not used since the VMware drivers were migrated out of the tree
a few years ago.
2018-06-26 17:23:23 -04:00
Augustin Cavalier f4b42b518a drivers: Deduplify joystick_driver.h.
Now there is only the one copy in headers/private/device.
2018-06-21 18:46:30 -04:00
Augustin Cavalier e4104854c3 if_dl: Increase size of sdl_data from 20 to 46 bytes.
FreeBSD's is presently 46 bytes. CID 1422869 warns that it can get overrun
in if_attach() in copying if_xname which is IF_NAMESIZE bytes (32).

This breaks ABI, but BeOS did not have sockaddr_dl, it is only a modern-GCC
ABI break. Since most applications assume that sockaddr_dl is variable-length
and is null-terminated, as well as not used very often, hopefully this will
require relatively few rebuilds.
2018-06-20 21:26:21 -04:00
Augustin Cavalier 9216fc0178 More class/struct mixup fixes.
Spotted by Clang.
2018-06-18 23:16:50 -04:00
Augustin Cavalier fe17f0df1f scsi: Use _res and not res in MK_ERROR.
Some users of MK_ERROR pass in parameters from a variable called "res",
which is obviously not what they want to do, as that will use this "res"
and not theirs.

Spotted by Clang.
2018-06-18 22:05:45 -04:00
Augustin Cavalier 9ac3062734 kernel: Small fixes for Clang. 2018-06-18 19:32:13 -04:00
Augustin Cavalier 4f7b9506fd Revert the rest of the COMPAT_MODE changes (back to hrev52003.)
This reverts commit 458e758f37.
This reverts commit ce5eb94a82.
This reverts commit aac8d4c317.
This reverts commit c70cba914a.
This reverts commit 2ffbe7aaca
This reverts commit c6e120e2d2.
2018-06-15 00:20:56 -04:00
Augustin Cavalier 513403d420 Revert team and thread changes for COMPAT_MODE (hrev52010 & hrev52011).
This reverts commit c558f9c8fe.
This reverts commit 44f24718b1.
This reverts commit a69cb33030.
This reverts commit 951182620e.

There have been multiple reports that these changes break mounting NTFS partitions
(on all systems, see #14204), and shutting down (on certain systems, see #12405.)
Until they can be fixed, they are being backed out.
2018-06-14 22:25:06 -04:00
Alexander von Gluck IV 7d95ab67ad intel_extreme: Update PCH mask to match new bits
* Missed in 87628f17eb
2018-06-12 14:20:34 -05:00
Jérôme Duval 44f24718b1 kernel/x86_64: add compatibility source files to the build.
* add x86 versions of fnsave frstor.
* add missing declaration for elf32_resolve_symbol().

How-to build a x86_64/x86 bootstrap build:
mkdir generated_bootstrap; cd generated_bootstrap
../configure --bootstrap /dir/to/haikuporter/haikuporter /dir/to/haikuports.cross \
  /dir/to/haikuports --build-cross-tools x86_64 /dir/to/buildtools --build-cross-tools x86 -j8 --use-gcc-pipe
jam -q -sHAIKU_PORTER_EXTRA_OPTIONS="-j8 --sourceforge-mirror=freefr --no-source-packages" @bootstrap-raw

Change-Id: I6eae3653c42a53683ae307107fae595c4b8ebcfb
2018-06-12 17:56:55 +02:00
Jérôme Duval a69cb33030 kernel/x86_64: setup a new thread in compatibility mode.
* define compat_thread_info, compat_rlim_t, compat_rlimit and
compat_thread_creation_attributes to be used when applicable in compatibility
mode.
* handle 32-bit types in _user_spawn_thread(), _user_get_thread_info(),
_user_get_next_thread_info(), _user_getrlimit(), _user_setrlimit(),
other syscalls are compatible as is.
* init TLS for compatibility mode threads.

Change-Id: I483ba95e6198ddac9d240671bcb56fcd2ad831d2
2018-06-12 17:56:55 +02:00
Jérôme Duval 951182620e kernel/x86_64: setup a new team in compatibility mode.
* in load_image_internal(), elf32_load_user_image checks whether the binary
format requires the compatibility mode.
* we then set up the flag THREAD_FLAGS_COMPAT_MODE and the address space size.
* the compatibility mode runtime_loader is hardcoded with x86/runtime_loader.
* if needed, the 64-bit flat_args structure is converted in-place to its 32-bit
layout.
* a 32-bit flat_args isn't handled yet (a 32-bit team execs a 64-bit binary).

Change-Id: Ia6a066bde8d1774d85de29b48dc500e27ae9668f
2018-06-12 17:56:55 +02:00
Jérôme Duval 458e758f37 kernel/x86_64: compatibility syscalls for vm.cpp.
* define compat_area_info to be used when applicable in
compatibility mode.
* handle 32-bit types in _user_reserve_address_range(), _user_get_area_info(),
_user_get_next_area_info(), _user_transfer_area(), _user_clone_area(),
_user_create_area(), _user_map_file(), other syscalls are compatible as is.
* _get_next_area_info() doesn't work well with a 32-bit address cookie (address
could be in 64-bit range). Instead use _compat_get_next_area_info() which uses
the area id as cookie, though the areas are not ordered by address any more.

Change-Id: Ic7519ca8824aa2d534b0f03ea75a1bf6ae321535
2018-06-12 17:56:55 +02:00
Jérôme Duval ce5eb94a82 kernel/x86_64: compatibility syscall for system_info.cpp.
* define compat_system_info to be used in _user_get_system_info() in
compatibility mode.

Change-Id: Ib917d41a3a87155aee9cb536fd09e7231b232bc8
2018-06-12 17:56:55 +02:00
Jérôme Duval aac8d4c317 kernel/x86_64: compatibility syscalls for signal.cpp.
* handle 32-bit types in _user_send_signal(), _user_sigaction(), _user_sigwait(),
_user_set_signal_stack(), _user_restore_signal_frame(), other syscalls are
compatible as is.

Change-Id: I4c8dc47bfa80f36e363d444d2a5a7be6c621606d
2018-06-12 17:56:55 +02:00
Jérôme Duval c70cba914a kernel/x86_64: compatibility syscalls for image.cpp.
* define compat_image_info, compat_extended_image_info
to be used for respective 32-bit types of syscalls in compatibility mode.
* handle 32-bit types in _user_register_image, _user_get_image_info,
_user_get_next_image_info, other syscalls are compatible as is.

Change-Id: Ibbd33e6796208dfa70d869e36bf745bc3e18d330
2018-06-12 15:55:55 +00:00
Jérôme Duval 2ffbe7aaca kernel/x86_64: compatibility syscalls for vfs.cpp.
* define compat_flock, compat_timespec, compat_stat, compat_attr_info,
compat_fs_info, compat_fd_info to be used for respective 32-bit types
of syscalls in compatibility mode.
* handle 32-bit types in common_fcntl(), _user_read_stat(), _user_stat_attr(),
_user_read_index_stat, _user_read_fs_info, _user_write_fs_info,
_user_get_next_fd_info, other syscalls are compatible as is.

Change-Id: I5b372169fe142f67b81fd6c27e0627d5119ba687
2018-06-12 15:55:43 +00:00
Jérôme Duval c6e120e2d2 kernel/x86_64: add setup_compat_signal_frame.
* add compatibility signal types.

Change-Id: I665020234be0ba2ccbb33bdbc338c11a214ab6e8
2018-06-12 15:55:18 +00:00
Alexander von Gluck IV 87628f17eb intel_extreme: Add additional more recent PCH devices
Change-Id: Ib9f7dc187300c9f746bca9fd7f721c1954f5be44
2018-06-11 20:34:14 -05:00
Augustin Cavalier 52d1e93353 Revert "intel_extreme: Broadwell is really Gen7(.5), not 8."
This reverts commit 4f059c1fc5.

From discussion on the mailing list, it seems I was correct the first time
and Broadwell is Gen8. The confusion comes from the SER5/SOC distinction,
which is not in the Linux driver, and I still don't know which one it really
belongs in.
2018-06-05 21:07:59 -04:00
Adrien Destugues 1407e6d7b1 Complete implementation of printer serial transport
- Allow to configure the baudrate (it is set by the printer settings,
  but the transport didn't care)
- Implement reading from the serial port (some printers will need us to
  poll the status and the like, as there is usually no hardware flow
  control)

Change-Id: I70ba2566595d5dfa5eda3d518614db6514cb2398
2018-06-05 21:44:14 +00:00
Augustin Cavalier 4f059c1fc5 intel_extreme: Broadwell is really Gen7(.5), not 8. 2018-06-05 17:27:45 +00:00
Jérôme Duval 9e75e900da kernel: use non-deprecated signatures for new/delete operators.
add posix_memalign(), needed for c++17.
2018-05-28 20:49:15 +02:00
Adrien Destugues 8bca37d604 vfs: Bind flock locks to file descriptors
* File locks created by flock should only apply for the file descriptor
  that was used to lock the file. Another fd on the same file should then
  be denied access (calling flock should fail).
* fcntl based locks, however, are in a separate namespace and are global
  to a team.
* This issue was found when running webkitpy test suite, and should close
  ticket #13795.
* Don't use session or team as comparison in release_advisory_lock(), as
  that information might not be available anymore (e.g. when called from
  Team::~Team()). This fixes #14121.

Change-Id: I9efb96cfcefe7e72b0060220c635a665e7e643cc
Co-authored-by: Axel Dörfler <axeld@pinc-software.de>
2018-05-22 20:29:21 +00:00
Alexander von Gluck IV 7f167d4f4a radeon_hd/dp: Fix bug in lane training. Kudos gcc7
* GCC7's static analysis found this one and it still
  took #gcc and me a while to spot. Nice work gcc7!
* Should help DisplayPort training issues :-)

Change-Id: I9b47f13c95e622a2c08ff329ec9c3fc7e3db493d
2018-05-21 18:02:32 -05:00
waddlesplash 3f9e3b0a62 ICU locale backend: Increase size of fLocaleDescription from 512 to 1024 bytes.
GCC7 gave a Werror that we were snprintf'ing potentially ~860 bytes into
a 512-byte buffer.
2018-05-19 20:44:51 -04:00
Jérôme Duval db9b70ee54 kernel: add a compatibility commpage on x86_64.
* x86 uses a commpage with 32-bit addresses, incompatible with the one used for
x86_64. For this reason, a compatibility commpage is needed to support a 32-bit
userland on x86_64.
* define ADDRESS_TYPE as a macro for addr_t (default) or uint32 (for the 32-bit
commpage).
* team_create_thread_start_internal() will use clone_commpage_area() with
KERNEL_USER_DATA_BASE or clone_commpage_compat_area() with
KERNEL_USER32_DATA_BASE, to setup the correct commpage.
* real_time_clock (in compatibility mode) also updates the compatibility
commpage with real time data.

Change-Id: I61605077ce0beabab4439ef54edd1eae26f26fd2
2018-05-18 05:11:07 +00:00
Jérôme Duval c7c3973e09 kernel: generic user_memcpy now saves the old state.
fixes #14135.
2018-05-16 06:58:33 +00:00
Jérôme Duval a553e95d85 kernel: support elf32 on x86_64.
* define ELF32_COMPAT to enable ELF32 macros.
* add a flag ELF_LOAD_USER_IMAGE_TEST_EXECUTABLE to only check the format.
It will be used by load_image_internal() to check which mode to use when
loading an image.
* in arch_elf_relocate_rel(), switch to elf_addr instead of addr_t, which
would be the wrong size for elf32 on x86_64.
* the ELF compat loader reuses the relevant parts of elf.cpp and arch_elf.cpp,
excluding for instance load_kernel_add_on() or dump functions.

Change-Id: Ifa47334e5adefd45405a823a3accbd12eee5b116
2018-05-15 10:29:00 +00:00
Jérôme Duval 27b32ee02c kernel/x86_64: adjust descriptors tables for compatibility mode.
* also adjust BOOT_GDT_SEGMENT_COUNT for x86, the definition is used by the
boot loader.
* add some 32-bit definitions.
* add a UserTLSDescriptor class, this will be used by 32-bit threads.

Change-Id: I5b1d978969a1ce97091a16c9ec2ad7c0ca831656
2018-05-15 10:27:02 +00:00
Jérôme Duval 630e3f1410 View: move BAffineTransform out of ViewSetStateInfo.
the size of BAffineTransform is architecture dependent, so we transmit
its contents in a standard array instead.

Change-Id: I907110742168846a869a48bb2d116cc5292ec7d0
2018-05-07 07:02:57 +00:00
Jérôme Duval 27bba9c3fe registrar: flat_app_info size was arch dependent.
copy each member of app_info instead.

Change-Id: Ica8d0a195b2dbaaf57d28f2fe2f7efd73c37b2c4
2018-05-05 09:30:08 +00:00
Alexander von Gluck IV dd485ed444 elf: Add aarch64 and riscv defines
* Add some additional defines as well.

Change-Id: I0a40f6b80a634ddaf83a8c22b9726a6e1f49bd34
2018-05-04 18:32:33 +00:00
Alexander Coers c334ab215a cpu_type.h: small fix for CPU detection
* since Core i5/Core i3 can have same model/family/stepping values
  additional string evaluation is needed

This fixes #12695
2018-05-04 06:32:48 +00:00
Niels Sascha Reedijk 2284eb4875 Add ALLPERMS and DEFFILEMODE to enable building on hosts with the musl c library 2018-04-30 11:11:11 +00:00
Augustin Cavalier 648f0d5f08 libroot_build: Properly remap fs_attr_* functions.
This was done using macros before, which isn't the way we have things set up.
In theory that method should work, however if not all consumers include the
libroot_build headers properly, then it breaks in subtle but confusing ways,
which is not what we want at all.

Thanks to Jessica for advice.

Change-Id: Idd45df5547daecf8239932957088da03ddfccf87
2018-04-29 17:25:18 +00:00
Jérôme Duval 61cd7e85d7 virtio: add API to uninit a device.
* free interrupts, free queues, return to init state.
* this will be used by virtio_net on interface uninit.

Change-Id: I7c1e6facc37cf6bfe19628576fdf2c0bac9e5c38
2018-04-26 06:25:41 +00:00
Jérôme Duval 6e82e42859 virtio: refactor to have a handler per queue.
* enable to iterate on available entries in one interrupt call.
* negociate -> negotiate, (void *) -> (void* ), thanks axel and philippe!

Change-Id: Ie2d290797abcbf4c0f3cb5bfff71d091bb800fa6
2018-04-26 06:25:15 +00:00
Axel Dörfler a77aa747ea launch_daemon: Added basic logging facility
* The daemon now stores many events in am internal log.
* You can use "launch_roster log" to retrieve it.
2018-04-25 10:10:43 +02:00
Jérôme Duval 3a764d6a12 kernel: x86: add some msr and cpuid features
* for arch capabilities.
* for spec ctrl and pred cmd.
2018-04-22 18:03:16 +02:00
Michael Lotz 321372e3ef kernel: Make size argument to create_area_etc() size_t.
It was limited to a uint32 and could for example be overflown by the
slab MemoryManager that uses size_t on a 64 bit system.

This aligns the signature with create_area() that already uses size_t
for the size argument.

Note that the function is currently private, so the impact should be
limited.
2018-04-04 00:07:59 +02:00
Andrew Lindesay b45e8b1ef9 HaikuDepot : additional debugging for json-rpc invocations 2018-03-25 05:44:19 +00:00
Augustin Cavalier 61206a24c9 build: Cleanup of libgnuregex usage.
John's revert of my removal commit dragged back a bunch of cygwin/sunos
cruft, as well as re-adding RegExp.cpp to the host libshared, that we don't
need.

Instead, remove this and add libgnuregex_build to just the tools/keymap
link alongside the FreeBSD gnuregex case.
2018-03-07 18:04:31 -05:00
Barrett17 852b62956b MediaClient: Rename IsRunning to IsStarted 2018-03-02 03:58:54 +01:00
Barrett17 a6ac14c71c MediaClient: Add ClientRegistered callback 2018-03-02 03:34:25 +01:00
Barrett17 1c15261f5a MediaConnection: Add connection name handling 2018-03-02 03:18:26 +01:00
Barrett17 83bcc405f3 MediaClientDefs: Cleanup unneded methods 2018-03-02 00:52:33 +01:00
Barrett17 f015d06b84 MediaClient: Remove Preroll and SyncTo 2018-03-01 17:09:24 +01:00
Barrett17 6dc7d85423 MediaConnection: Review format negotiation mechanism 2018-03-01 17:09:24 +01:00
Barrett17 182ec76b44 MediaConnection: Remove format change protocol 2018-03-01 17:09:24 +01:00
Barrett17 7de0fd45cd MediaClient: Add plans for ReadyToRun callback 2018-03-01 17:09:23 +01:00
Barrett17 9ab4c38420 MediaConnection: Add more plans about buffer management 2018-02-27 02:49:50 +01:00
Barrett17 444d8ec0e2 MediaConnection: Hide connection callbacks
* At this point we want to avoid the user calling the callbacks
in the form of BMediaConnection. Instead we force to use the
BMediaInput and BMediaOutput versions.
2018-02-27 02:43:38 +01:00
Barrett17 ff56eda570 MediaConnection: Move buffer management on producer side 2018-02-27 01:50:09 +01:00
Alexander von Gluck IV 3a747315b2 stdlib: Add common bsd mkstemps function
Change-Id: I8c54f4b42e8b41f9a769b8b53f074a307b1a054c
2018-02-26 21:46:25 +00:00
Xiang Fan 46b328f136 wait_for_objects: add macros for output-only select types
Bug: 13965
2018-02-26 10:43:54 +00:00
Barrett17 e74e02ac05 MediaClient: Update docs and add TODOs 2018-02-25 23:44:39 +01:00
Barrett17 9cf18a39cd MediaConnection: BufferSize should be inherited
* While it's trivial for audio to calculate the buffer size,
it isn't the same for video.
2018-02-25 23:44:33 +01:00
Barrett17 78fea9cd2d MediaClient: General cleanup
* We are finally not dependent on media kit definitions.
* Offline mode is not important at this moment.
2018-02-25 23:44:16 +01:00
Barrett17 befa252fbf MediaConnection: Non simple connections should be inherited
* BSimpleMediaConnections are provided for that.
* Make SetOutputEnabled private.
2018-02-24 16:13:34 +01:00
Barrett17 c61ffa962e MediaConnection: Remove latency range interface
* In preparation for the introduction of BMediaGraph.
2018-02-24 15:42:16 +01:00
Barrett17 dc4c49c305 MediaConnection: Introduce Endpoint() method.
* Used to get the other side of a connection when
available.
2018-02-24 15:42:12 +01:00
Barrett17 3b36cb5942 MediaClient: FileInterface is a bad idea, remove TODO 2018-02-24 02:34:38 +01:00
Barrett17 72958d8ba8 MediaClient: Remove SetRunMode 2018-02-24 02:30:40 +01:00
Barrett17 e8bf0f3e72 MediaClient: Reappropriate copyright 2018-02-24 02:23:41 +01:00
John Scipione 940a3a2322 Revert "build/libgnuregex: Remove."
This reverts commit ca087b0532.

Mac OS X requires libgnuregex for Keymap
2018-02-16 16:45:11 -08:00
Rene Gollent 770075026c Debugger: Rework type handlers to allow for custom selection.
TypeHandler:
- Add name field for presentation purposes. Adapt subclasses accordingly.

TypeHandlerRoster:
- Add methods to count and retrieve all type handlers for a given type,
  and adjust CreateValueNode to allow for passing in an explicit handler.
  Adjust callers accordingly.

VariablesViewState:
- Add helpers to store an explicitly chosen type handler for a node.

TypeHandlerMenuItem:
- ActionMenuItem subclass that takes care of reference management
  for its contained type handler.

VariablesView:
- Add context menu for choosing type handlers if applicable. Implement
  support for invoking said type handlers in a similar manner to explicit
  typecasts.
- Adjust saving/restoring the view state so that hidden nodes are taken
  into account as well. This is necessary since it may be the case that
  the handler had to be applied to the hidden child rather than the visible
  node (i.e. the BMessage handler when applied to a pointer to a BMessage).

All together, these changes allow choosing to switch between views of a type
when the Debugger has multiple handlers for it. For example, for BMessages
this allows switching between displaying the raw underlying structure vs
the decoded message content.
2018-02-04 14:13:01 -05:00
Jérôme Duval 401fb209ea kernel: use x2apic on hypervisor, or if already enabled.
* this can be disabled per safe mode setting.
2018-02-04 19:08:53 +01:00
Jérôme Duval 66fa3b1847 kernel: Add set_clac and clear_ac() definitions on non-x86 platforms. 2018-01-31 19:32:46 +01:00
Jérôme Duval 9dd4d2dd05 kernel: support for Intel SMAP and SMEP on x86_64.
SMAP will generated page faults when the kernel tries to access user pages unless overriden.
If SMAP is enabled, the override instructions are written where needed in memory with
binary "altcodepatches".
Support is enabled by default, might be disabled per safemode setting.

Change-Id: Ife26cd765056aeaf65b2ffa3cadd0dcf4e273a96
2018-01-30 20:05:39 +00:00
Axel Dörfler 08a4536b1f BMessage: Added missing [Get|Set]Pointer()
* SetPointer() was declared, but not defined.
2018-01-29 21:43:21 +01:00
Jérôme Duval c8fcb2a04e udis86: Add clac/stac instructions for SMAP.
still in a PR:
e9dfa2d79a
2018-01-22 20:06:55 +01:00
Leorize 1a59e1d91c gnu: introduce memmem(3)
Implementation imported from OpenBSD

Change-Id: If2620dc7ed373650bb3dabb0f22c2cd84b9e0ef9
2018-01-17 19:39:18 +00:00
Jérôme Duval 964fb0c378 kernel: make arch_kernel.h for x86 C safe. 2018-01-17 19:20:59 +01:00
Jérôme Duval 483c45843d kernel: x86: add some more cpuid flags. 2018-01-15 20:18:43 +01:00
Leorize cedb0e1179 uchar: Introduce C11 uchar.h
Currently this implementation only supports UTF-32
2018-01-14 14:42:34 +00:00
Jérôme Duval a2021292d4 kernel: Binary code patches on x86.
This will be used to support SMAP.

Sponsored-by:	https://liberapay.com/korli
2018-01-14 13:20:38 +01:00
Jérôme Duval 0291f00909 udis86: update to current version. 2018-01-13 15:54:21 +01:00
Jérôme Duval 9409021432 kernel: x86: add cpuid feature 7 flags. 2018-01-13 09:33:47 +01:00
Michael Lotz da30fdf96a kernel: Fix overflow in load tracking for very large deltas.
The scheduler uses the load tracking logic to compute the load of
threads to be enqueued into the run queue. The time delta between the
last enqueue and the next enqueue may grow very large for threads
that mostly wait on conditions. In such cases the int "n" period count
variable would become too small and wrap around, leading to an
assertion failure.

For this to happen, the thread in question would have to have slept for
at least ~25 days and then wake up. Threads often affected would be ones
waiting for some other process to end, for example shell threads waiting
for a long running process to exit.

Fixes #13558.
2018-01-05 22:48:56 +01:00
Augustin Cavalier 8a9e1e0d4a Removal of non-Haiku target platform logic from build system (part 1.)
Following recent changes to use libroot_build on Haiku also, it is now
actually impossible to build Haiku components on non-Haiku platforms
(BeOS R5, Dan0, BONE, Zeta), so we can remove any logic related to this.

This is only the first part; still to be removed are:
 * SetSubDirSupportedPlatformsBeOSCompatible
 * HOST_PLATFORM_BEOS_COMPATIBLE
 * TARGET_PLATFORM_BEOS_COMPATIBLE
2017-12-31 16:14:22 -05:00
Augustin Cavalier 03544bf000 libroot_build: Full passthrough to system attributes.
As it turns out, using the xattr emulation layer plus "libgnu"
causes some strange mixups at package build time, and so packages
built with it were winding up with no attributes at all.

So I've just bitten the bullet and written a full passthrough layer
to the system attributes. Verified using a full build of haiku.hpkg
this time ... after a lot of painful debugging of symlink mixups.

Hopefully I am finally rid of this plague...
2017-12-30 16:35:51 -05:00
Augustin Cavalier 699b4bbab9 libroot_build: *Actually* fix attribute usage on Haiku.
To quote jscipione (from 95e8362c52),
"Let me tell you a story about a bug" -- though this tale spans a much
lesser time than that one did.

In 5e19679ea3, I enabled libroot_build for
Haiku, instead of using the system libroot as we had before. There were
a number of bugs introduced along with this that I hadn't fixed (and there
may be more after this), but most of the obvious ones (crashes on x86_64...)
were fixed shortly enough.

Attribute usage, though, was a different story. Unlike most of the POSIX
calls in libroot, which were aliasing system functions no matter what the
platform, the attribute calls were not, as they are specific to Haiku.

Initially I had completely forgot about them, and it wasn't until a few days
later when I noticed that I had an "attributes" directory in my generated
that I realized that the "generic" attribute layer was being used on Haiku.
I attempted a fix for this in 5e19679ea3,
thinking that would clear the problem up, but I didn't actually run a test
beyond seeing that my BuildConfig had been updated properly. In fact,
BuildSetup was hard-wired to not even pass that definition through on
Haiku, and so that commit had in effect caused nothing.

My initial "fix" of just changing BuildSetup then caused a build failure,
as while libroot_build itself compiled, it ran into errors whenever attributes
were used, because in letting the real libroot's attribute calls shine
through, I had bypassed libroot_build's FD emulation/shim layer.

Then I tried and failed at three separate attempts to solve this with code:
 - a version of the "fs_attr_...h" interface for Haiku. This proved possible
   in theory, but in practice I would need to reimplement a lot of attribute
   handling code in it, because all I had access to from there was syscalls.

 - a version of "fs_attr_untyped" that bypassed its reimplementations of
   the "fs*attr" functions for the libroot ones, only using the FD shim layer.
   This proved possibly not even theoretically possible because it would have
   caused preprocessor hell in some of the build headers, and also assumptions
   about how attributes are read were totally different.

 - a completely new "fs_attr_haiku" that was a completely new interface to
   the fs*attr functions. This proved practically impossible because of the
   need to include structures from the system libroot to call out to readdir,
   etc. that attempts to solve would also have caused preprocessor hell.

Then I realized that the Linux xattr emulation library, which I'd used
as a reference when attempting the first solution, was shipped by default
as a system library in all builds of Haiku ... and so I could just tell
fs_attr_untyped to use the Linux xattr handler, and then link against libgnu.

So that is how I arrived at this strange and decidedly unorthodox solution
to a problem of my own creation.
2017-12-29 21:26:00 -05:00
Augustin Cavalier 8d4324628d syslog.h: Add LOG_NFACILITIES, LOG_FACMASK, LOG_FAC.
Not in the POSIX specification, but defined (not behind any guards)
in (at least) FreeBSD, NetBSD, glibc, and macOS.

Found by miqlas and myself while working on porting GNU inetutils.
2017-12-26 17:09:26 -05:00
Augustin Cavalier 3305611025 Mail Kit: Delete now-unused DES implementation. 2017-12-26 13:59:25 -05:00
Augustin Cavalier 95c9effd68 Migrate the BMailComponent docs to the Haiku Book.
I've updated the docs to match the current BMailComponent, documented
new functions, and cleaned up the MailComponent.h file to at least
somewhat match our coding style.

First in a series (there are 3 more old API docs on the Mail Kit in that
"Public API" folder.)
2017-12-25 19:43:51 -05:00
Augustin Cavalier ca087b0532 build/libgnuregex: Remove.
It was needed on macOS for a time when BUrl used regexes for parsing.
Now it does not, and so we can remove libshared's RegExp from build
libshared, and thus also libgnuregex.
2017-12-24 12:27:47 -05:00
Hrishi Hiraskar 226f6c8bf1 Notification_Server: Added ability to choose position of notifications
The feature gives user ability to choose the position of notifications
out of Follow Deskbar, Lower Right, Lower Left, Upper Right and Upper
Left. Fixes #9749 - Notification_Server: add the ability to choose the
position of notifications (easy).

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-12-24 12:02:38 +01:00
Augustin Cavalier add916a765 Restore the "GPL licensing not permitted" in GLUT license headers.
It was originally there but was removed erroneously. The emails in which
we received permission to relicense stated this restriction explicitly.
2017-12-20 19:35:55 -05:00
Augustin Cavalier 0be0fba248 BHttpForm: Clang also uses pair<> now. 2017-12-18 17:58:04 -05:00
Leorize 0006cc3fbf libs/bsd: add explicit_bzero(3)
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-16 12:54:58 -05:00
Leorize 3d61d20742 libs/bsd: add be64dec(3) and be64enc(3)
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-16 12:54:41 -05:00
Leorize 9a1d046775 libs/bsd: add readpassphrase(3)
Imported from freedesktop libbsd project

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-16 12:54:23 -05:00
Augustin Cavalier f0cdb09104 headers/bsd: Add sys/queue.h.
Requested in #12617.
2017-12-14 19:07:04 -05:00
Augustin Cavalier 1465ec71a0 build/kernel: Properly shadow syscall functions.
I didn't notice this in the previous commit because apparently GCC2
just links against libroot's versions of them. On GCC5, however,
the version from libroot_build was used even for calls from libroot itself,
which led to infinite loops and then stack overflows.

So instead we must have the "syscall" functions in libroot_build shadow
the real ones by being named differently, which I did by changing their
prefix from "_kern" to "_kernbuild" via preprocessor macros.

Since the build syscalls.h is now substantially different than the non-
build one (and has not been synchronized in nearly a decade anyway),
I've just stripped out all the syscall defns except for the ones actually used
in the build.

Thanks to kallisti5 for helping me debug and test.
2017-12-13 23:40:05 -05:00
Augustin Cavalier 5e19679ea3 build: Use libroot_build on Haiku.
Previously we just used the system libroot, which of course meant
that when libroot's ABI changed, the build broke. Now we use the full
libroot_build that we do on non-Haiku platforms. The logic for "BeOS-compatible
but not Haiku" does not really apply anymore, so it has been gutted where
appropriate (and libhaikucompat has been decoupled from the build.)

The only caveat here is the change to Errors.h -- we really should be using
the system's one where I included the one from the tree, but for whatever
reason, GCC2 refused to handle the #include_next properly.

Fixes the build breakage of Haiku-on-Haiku by my prior commits (sorry).
2017-12-13 19:47:39 -05:00
Augustin Cavalier 361f980f9d More "missing space after macro; invalid in C++11" error fixes. 2017-12-12 20:08:26 -05:00
Augustin Cavalier 0d020b8298 headers/build: Use the system's types.h on Haiku.
Technically a "hack" (but then again most of the config/build stuff is);
as we need to use the system's config/types.h in order to get stdint
definitions and the like.

Previously there was a config_build directory which allowed the existence
of two types.h -- the system one, and the headers/build one, but seeing
as we only need this to provide Haiku-specific core types on other platforms,
using the system's one should be fine.

Our core type definitions have not changed in some time (and it's unclear
when they would change aside from potential new platforms), breakage of the
Haiku-on-Haiku build due to this should not happen often (if ever.)
2017-12-12 18:51:13 -05:00
Augustin Cavalier 02c9c92ae2 BeBuild: Treat TinyCC as GCC4 ABI.
Since it's just a C compiler "technically" the ABI does not matter,
but since it also can target other ABIs from one toolchain (e.g. x64),
just treat it as GCC4 ABI unilaterally.

Fixes #13847.
2017-12-11 19:28:45 -05:00
Augustin Cavalier 82bffcc3a7 headers/build: Reunify BeBuild.h and related cleanup.
Now that we do not target BeOS and also do not include the main headers
directory when building "build" binaries, we can drop the separate
config_build directory and thus also the separate BeBuild.h, and just
..-include the regular one.

The build BeBuild.h defined empty _IMPEXP_ROOT and _IMPEXP_BE preprocessor
macros that the regular one does not; so I also re-synchronized
headers which used these as needed.
2017-12-11 19:15:47 -05:00
hyche 2b6c2ec390 fs_shell: Added socket filetype.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-10 11:02:59 -05:00
hyche 1750cd1e92 block_cache: Implement cache_has_block_in_transaction function that will check the existence of block in one specific transaction.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-10 11:02:56 -05:00
hyche e715614613 AVLTree: forward LeftMost and RightMost method from AVLTreeBase
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-10 10:56:08 -05:00
Augustin Cavalier 06b79f5509 build/Errors.h: Synchronize with the non-build one.
This file was apparenly based off the BeOS one (as is evidenced
by the "Be Incorporated" copyright ... which is problematic.)
Now it's directly based off of the non-build one.
2017-12-05 18:36:11 -05:00
Augustin Cavalier f1e8af173c net_socket: control op should be uint32.
Where it is called from stack_interface_ioctl, the parameter
is already a uint32 there.

Fixes #13826.
2017-12-03 13:57:26 -05:00
Augustin Cavalier acf02fd2cf locale: Fix another class/struct mixup. 2017-12-03 13:44:30 -05:00
Augustin Cavalier 7c234361eb Fix more class/struct mixups. 2017-12-02 22:24:06 -05:00
Augustin Cavalier bf77c15232 kernel/vm: Correct virtual function declarations.
The base VMCache class changed to the generic_ types with their
introduction in in *2011* (435c43f591),
but these classes were never properly adapted. These functions should not
be called here (they panic() -- but the base class only returns B_ERROR,
so that is a difference at least.)

Found by Clang's -Woverloaded-virtual.
2017-12-02 21:42:50 -05:00
Augustin Cavalier 764c402a69 GraphicsDefs: Revert back to casting structs to integers to compare them.
This reverts commit d3abf525c5.
Clang's warning was a little overzealous; this is not a problem on x86.
2017-12-02 17:36:20 -05:00
Augustin Cavalier 841d719fc8 MediaDefs: May be included as C not C++, so accommodate for that. 2017-12-02 09:32:28 +01:00
Augustin Cavalier 2b1481f0dc Fix a few more miscellaneous (harmless) Clang warnings. 2017-12-02 00:12:51 -05:00
Augustin Cavalier 08ff3a4eea headers/clang: Remove.
Never used, and never will be following previous commit.
2017-12-01 21:16:58 -05:00
Augustin Cavalier 30c9d3c0cc kernel: Correct class/struct mixups.
Almost certainly harmless. Spotted by Clang.
2017-12-01 20:27:15 -05:00
Augustin Cavalier d3abf525c5 GraphicsDefs: Do not cast structs to integers to compare them.
That requires more padding (1 byte vs 4 or 8 depending on integer size),
so just use regular loops and chained ==s.

Caught by Clang. No functional change intended.
2017-12-01 20:26:20 -05:00
Augustin Cavalier be622abddb fluidsynth: Remove from tree.
Not included in the build (or even wired to Jam) since the new package
repo changes merge.
2017-12-01 10:14:45 +01:00
Axel Dörfler e96835a9a4 Added simple test_launch_daemon.
* Expects its config files in /boot/home/test_launch.
* Uses standard I/O, and is always in user mode.
* Also added test_launch_roster command that is able to talk to the test
  server like it does to the real thing.
2017-11-29 17:19:46 +01:00
John Scipione fc23c09758 BDeskbar & Deskbar: export window bool settings to BDeskbar
Add methods to get and set "Always on top", "Auto raise", and "auto hide"
which are all booleans which control aspects of the Deskbar window to
BDeskbar.

Set the bool to the default value initially. Check if sending the
message succeeds, if so check the reply which also fills out the bool.
Don't check to see if reply succeeded because the bool will only be
overwritten if it did.

Follow the BDeskbar convention Is...() for getter, Set...() for setter
e.g IsAlwaysOnTop() is the getter, SetAlwaysOnTop() is the setter.

Define new message constants to call the newly created methods.
Follow BDeskbar convention: 'gtla' is used for getter, 'stla' for setter.
g/s for getter/setter, tla is an all-lowercase code unique to each
getter/setter pair.

Copy/paste these message constants into BarApp.h unchanged. Replace four
letter codes with imported message constants in BarApp.cpp and
BarWindow.cpp. Much nicer than using bare codes.

The new BDeskbar methods are all handled by TBarApp. The getters send
back a reply message containing the bool while the setters fall through
to existing setter cases.
2017-11-27 11:05:22 -08:00
John Scipione f8811591e1 BDeskbar: Style fixes
Update Copyright in cpp, add myself, alphabetize, standardize
Pointer style in cpp
Update some comments
Some 80 char stuff
pragma section headers
whitespace
2017-11-26 20:40:00 -08:00
Jérôme Duval 6ac3a280f4 Add ZstdCompressionAlgorithm.
* kernel lib is decompress only (like zlib).
* expand compression_test for zstd.
2017-11-24 21:35:49 +01:00
Adrien Destugues 8ddec194c6 intel_extreme: backlight control on pre-PCH devices
Thanks to oco for letting me test this on his old laptop.
2017-11-23 23:59:39 +01:00
Adrien Destugues 8903cd4256 Bump MAX_SHADOW_PWD_PASSWORD_LEN
Fixes #13733.

Unlike written in the ticket, the string length is 136 (not 135),
and the code checks for rejects anything greater or equal to the max
value. So set the constant to 137.
2017-11-23 13:00:48 +01:00
Augustin Cavalier 164e4f8de4 intel_extreme: Beginnings of Broadwell support.
At present, does not work (it fails to properly set up interrupts,
resulting in thousands of unhandled ones which all but grinds the system
to a halt) but this at least is some progress.
2017-11-21 23:37:18 +00:00
Adrien Destugues b140a1c340 NetworkAddressResolver: cache needs to be locked
It is not a good idea to have a thread get an address from the request
cache, while another thread is deleting said address as the cache has
grown too large. Add a lock around the cache access to make it safe.
2017-11-21 22:15:32 +01:00
François Revol aef94baf32 ISA: fix ram_address() to use phys_addr_t for completeness
I don't know of any driver actually making use of it, but some weird
architecture might want to emulate an ISA bus to reuse a driver maybe...
2017-11-21 21:44:02 +01:00
François Revol 16bb99fdac PCI: fix ram_address() to use phys_addr_t
Since it handles physical address it should really be this.

It's not like many drivers actually used it anyway. It shouldn't harm
compatibility, drivers calling it with only 32bit would leave garbage in
the higher bits but since on x86 it's a noop anyway, it would end up in
the MSB register tha's ignored because it expects a 32bit result.
2017-11-21 21:44:01 +01:00
Augustin Cavalier 3b3688c7a5 fs_shell: Change {set_}real_time_clock to match the new definitions. 2017-11-21 15:18:11 +01:00
Adrien Destugues 24e63de5d3 Style fix: parameters should have a name. 2017-11-21 12:19:56 +01:00
Adrien Destugues 3a2b67b5ae Support for configuring screen backlight
Accelerant interface:
Introduce new hooks B_SET_BRIGHTNESS and B_GET_BRIGHTNESS. Brightness is
a float in the 0..1 range.

App_server:
Forward brightness things between BScreen and the accelerant.

intel_extreme:
Implement the hooks. Note that this only works for laptop panels, but
the driver will pretend to support it in other cases as well.

Screen preferences:
If the accelerant supports the B_GET_BRIGHTNESS hook, allow to set
brightness with a slider. Otherwise, the slidere is hidden and these
changes aren't visible.
2017-11-21 09:12:18 +01:00
Alexander von Gluck IV a42249db2d arm: Add 8250 omap variant uart driver
* Untested, someone with an omap3,4,5 could though.
2017-11-20 09:16:58 -06:00
Alexander von Gluck IV 1d3d336a97 libbsd: Move lutimes to bsd compat
* Rework be149e8ccf since lutimes isn't posix
2017-11-17 14:27:26 -06:00
Augustin Cavalier 7d8eb4d7f9 time: Address review comments.
* Use ENOSYS not B_DONT_DO_THAT (thanks korli)
 * Use unsigned long not uint64 (thanks axeld)
2017-11-16 20:53:14 +01:00
Alexander von Gluck IV be149e8ccf libroot/posix: Add lutimes for better posix compatibility
* Didn't exist on BeOS, but exists most other places.
* Update times of a file, not following symbolic links.
2017-11-16 00:38:54 -06:00
Augustin Cavalier 9a50e01ea6 set_real_time_clock: Change parameter from uint32 to uint64.
This should have been done along with the time_t change, but I forgot
to check this then.

Technically this breaks ABI against BeOS, but:
  1. BeOS used an int32, so we'd already slightly broken ABI here
  2. Only one thing at HaikuArchives (VMwareAddons) and one recipe at HaikuPorts
     (samba) uses this function at all.

If it turns out some critical BeOS app uses this, then I guess we can enclose
GCC2 guards around it, but since I can't find any evidence of that, I'm
pushing it without them for now.
2017-11-15 18:28:04 +01:00
Augustin Cavalier 581cd2a22d Nuke COMPILE_FOR_R5.
Not used in $long_time, almost certainly broken, so it's just cruft.
2017-11-15 17:52:27 +01:00
Andreas Faerber ce6fdd33ef Detach UDP sockets on cleanup
The UDP service does not own the UDP sockets. When shutting down,
inform the bound sockets that the service is no longer available.
This allows subsequent method calls to error out cleanly.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-11-13 16:48:09 +01:00
Andreas Faerber 74077e46e1 Add net_stack_cleanup()
Add a cleanup function net_stack_cleanup() that calls a new NetStack::ShutDown() method.
Make sure this method works even if the network stack was never initialized.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-11-13 16:47:27 +01:00
John Scipione 6f6c9e0069 BDurationFormat::Format docs, update method params
Also a tiny style fix in the header, put const qualifier
on same line
2017-11-10 14:59:33 -08:00
Jérôme Duval a295d3f46e wait4(): retrieve dead team entries usage information.
* This adds a parameter to the wait_for_child syscall. I extended the test case
to show the actual retrieved information.
* fix #13546
2017-10-10 17:20:46 +02:00
Augustin Cavalier 6aff37d1c7 Move SHA256 class to libroot instead of linking libshared into libroot.
Discussed with PulkoMandy and on the haiku-commits mailing list.

Thanks to @jessicah for compile-testing and fixing 2 small issues I missed.
2017-10-03 20:18:26 -04:00
Augustin Cavalier 9d8a58ea46 nvidia_gpgpu: Remove from tree.
Was nothing but a slightly-stripped version of the nvidia driver,
not touched substantially in nearly 10 years, and the cards it was
originally going to support (but never got anywhere near so) have long since
been deprecated.
2017-09-30 21:27:47 -04:00
Augustin Cavalier db68ff23c6 Interface Kit: Make BControlLook a proper pure-virtual base class.
All of its prior functionality has been moved into HaikuControlLook.
This paves the way for customizeable control looks, which I intend to implement
in the future as part of decorators.

This is being pushed now because libbe ABI was already broken due to the
Notifications changes, so this is riding that so we only have to do a mass
rebuild once.
2017-09-30 21:12:33 -04:00
Augustin Cavalier d52572b31b BControlLook: Make all public methods virtual.
Solves a "TODO before R1". Breaks ABI, but almost nothing outside the
tree uses it.
2017-09-30 21:12:02 -04:00
Alexander von Gluck IV 2da9ebb7f3 radeon_hd: Drop dp config array from dp_info
* Caching these values could result in missed
  state changes.
* We may want to re-implement later.
* Highlights that all DP AUX communication is broken
  during my testing.
2017-09-29 11:10:56 -05:00
Brian Hill 8856b51897 BNotification ABI padding
Add reserved functions and data to avoid future ABI breakage
2017-09-28 22:19:05 -04:00
Brian Hill 6aa0587222 Notifications preflet and notification_server
Notifications preflet:
-Use sliders instead of text fields for width and timeout
-Remove icon size choice (mini icon looks horrible)
-Consolidate both "Enable" checkboxes into one
-Fix Revert button, remove Apply button, add Defaults button
-All changes to settings saved immediately
-Live example notification message shown when settings changes are made
-Add setting for individual apps to specify whether their notifications
	should be muted
-Remove history list (to be implemented later)

BNotification class:
-BNotification records the signature and name of application that
	created it
-New functions to get source application signature and name

Notification Server:
-Notification pop up view layout fixes and bold font size fix
-Remove notifications history from AppUsage class (will be saved in
	cache instead)
-Remove vector of NotificationView objects which isn't needed
-Get source application info from notification object, not the received
	message which is not reliable
2017-09-23 11:41:33 -04:00
Alexander von Gluck IV 4bcba8a84f radeon_hd: Add missing FirePro, Add vega, cleanup names.
* Vega is 100% untested.
* I think AMD is doing away with the DCE version numbers.
2017-09-22 15:58:49 -05:00
Akshay Agarwal 42745b94f8 BDateFormat: Properly map day values to ICU day-of-week.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-09-16 17:42:54 +02:00
Jérôme Duval 2976cf85a4 libroot.so: make first parameter of dladdr() const.
This follows up on a mail from 2011:
https://www.freelists.org/post/haiku-development/Changing-dladdr-to-take-const-void-for-first-parameter
2017-09-15 23:09:24 +02:00
Jérôme Duval ccd42320c4 libroot: add posix_spawn(). 2017-09-12 19:42:57 +02:00
Jessica Hamilton c5e77784a8 compatibility/bsd: add endian.h for BSD extensions. 2017-09-11 07:06:52 +12:00