Commit Graph

46816 Commits

Author SHA1 Message Date
Dario Casalinuovo
aad4b937be media_kit: Add Deprecated.cpp file 2015-12-05 19:04:52 +01:00
Dario Casalinuovo
226be01113 media_kit: General maintainance
* Move !missing_symbols.cpp in the legacy directory.
* Move useless methods in a Deprecated.cpp file.
* SetRealtimeFlags / GetRealtimeFlags are useless, they
don't make sense nowadays.
* The symbols are anyway preserved.
2015-12-05 18:59:38 +01:00
Dario Casalinuovo
2b480e44f3 AddOnManager: Fix logic inversion 2015-12-05 13:16:00 +01:00
Dario Casalinuovo
f798491a8f FFmpegPlugin: Remove forgot variable 2015-12-04 12:18:52 +01:00
Dario Casalinuovo
8cd14ac0cd BMediaEncoder: Style fixes 2015-12-04 01:33:53 +01:00
Dario Casalinuovo
7f3ca22e46 AVCodecEncoder: Solve a crash at personalStudio startup
* This makes the app to start, but it's not enough
to have it show the window.
2015-12-04 01:33:53 +01:00
Dario Casalinuovo
2d50879085 BMediaEncoder: Proper handling of i/o formats 2015-12-04 01:33:52 +01:00
Dario Casalinuovo
3bc039b9f1 media_kit: Add encoding support facilities 2015-12-04 01:33:52 +01:00
Dario Casalinuovo
c3b461d8a9 AVCodecEncoder should not know the format 2015-12-04 01:33:52 +01:00
Dario Casalinuovo
537ea80adf BMediaEncoder: Style fixes 2015-12-04 01:33:51 +01:00
Automatic Committer
504fda3f51 Update pci.ids from pciids.sourceforge.net 2015-12-03 05:20:21 +01:00
Dario Casalinuovo
9bc60a8bc0 BMediaEncoder: Init/Release code cleanup. 2015-12-02 16:08:07 +01:00
Dario Casalinuovo
106539c239 Implement BMediaEncoder::write_chunk 2015-12-02 16:08:07 +01:00
Dario Casalinuovo
2b51499295 Initial implementation of BMediaEncoder
* People interested, please review!
* This is based on the patch from Fredrik Moden which was based on
the Oleg Krysenkov one.
* The original patch has been reworked by myself.
* Adapted the code to work with the new PluginManager API which
differently than before doesn't need to contact the media_server.
2015-12-02 16:08:06 +01:00
Jérôme Duval
0df4a177d7 app_server: declare jam dependecy for AlphaMaskCache to freetype 2015-12-01 02:57:42 +01:00
Dario Casalinuovo
6423f87f9e BMediaRoster: Reference count polishment
* BMediaNode is registering it's presence to the roster.
* Only addons needs their configuration to be saved.
2015-11-28 16:35:06 +01:00
Dario Casalinuovo
d98b8c7c59 BufferCache: More strict validity checks
* This add a debugger call if the BBuffer id is
mismatched at object creation.
2015-11-28 16:35:05 +01:00
Dario Casalinuovo
67060664c9 Allow BMediaRoster to log local nodes
* BMediaRoster is now capable to know which nodes are
instantiated in this team. This is also a first step to make
them survive after media_server crashes.
* A control at BMediaRoster::Quit can notify if all nodes
were correctly released. Ideally at this point the local nodes
list should be empty.
2015-11-28 16:35:04 +01:00
Dario Casalinuovo
05962bb1e1 Add a way to register loopers for quit
* BApplication can now take the job to quit a BLooper at
the application quit. It's rejecting requests from windows too.
* BMediaRoster is using now this service in conjunction with the
MediaRosterUndertaker.
* The BeBook specify that we should have a valid BApplication
before to instantiate the BMediaRoster. While in theory we should
add a debugger call when this situation happens, in pratice this
might lead to more problems. For example libraries might use the
media_kit and create a BApplication object, but they aren't
applications, this is a design problem. So I decided to replace it
with a TRACE call for the moment.
2015-11-28 16:35:03 +01:00
Axel Dörfler
893e3de866 mail_daemon: Converted to BServer. 2015-11-28 14:18:18 +01:00
Axel Dörfler
59e6d9d2e2 launch_daemon: Maintain pending jobs for requirements.
* If a requirement cannot be launched, a job is now added to the
  requirement as pending job.
* If the requirement enters the launch queue at a later time, the
  pending job will be put there, too.
2015-11-28 14:00:36 +01:00
Axel Dörfler
236e68efdc launch_daemon: Check requirements before launching a job.
* They were only launched, but we didn't check if we can actually
  launch them.
2015-11-28 14:00:01 +01:00
Axel Dörfler
ea3e5d43d5 passwd: Fixed copy&paste error in error message. 2015-11-28 13:59:19 +01:00
Jérôme Duval
f9422dc81d x86_gcc2: add dependency on ssl libs on haiku.hpkg. 2015-11-28 10:06:46 +01:00
Jérôme Duval
e7e318fc73 haiku-x86: add a dependency on libssl and libcrypt 2015-11-26 18:58:14 +01:00
Automatic Committer
087cbdf98d Update pci.ids from pciids.sourceforge.net 2015-11-26 05:20:22 +01:00
Jessica Hamilton
d5449f12d4 app_server: add another missing dependency on freetype 2015-11-26 14:44:51 +13:00
François Revol
e3c95b5aa1 usb_disk: add icon for mobile phones
Add a match for my Kazam dumb phone, which is not very descriptive...
2015-11-26 01:17:24 +01:00
Jérôme Duval
c5c31f4118 haiku-x86/haiku-x86_gcc2: make some dependencies feature dependent. 2015-11-24 20:20:52 +01:00
François Revol
eff74a3387 usb_disk: use SD card and Memory Stick icons when found
Check for partial matches on the product_name string.

Tested with a USB card reader and an SD card.

Feel free to add icons for Compact Flash and Secure Media and more matches.
2015-11-24 14:30:48 +01:00
François Revol
6c51d2639b usb_disk: use CD icon for optical media
Tested with a CD drive and a USB adapter.
2015-11-24 14:28:30 +01:00
François Revol
ce27a0cc0a usb_disk: add some icons
- CD
- SD
- MemoryStick
2015-11-24 12:26:10 +01:00
Rene Gollent
a9aa59ef7c Debugger: Fix #12499.
DebugReportGenerator/UiUtils:
- When traversing the value node graph, detection of the case of
  an address type with a compound child wasn't taking type modifiers
  into account, leading to it sometimes not traversing down to members
  when it should, and consequently not reporting those members in a debug
  report.
2015-11-23 22:31:01 -05:00
Axel Dörfler
9b9e7ec808 E-mail: Converted auto config window to layout API.
* It still doesn't work correctly yet again, though; the servers cannot
  be configured there.
* I'm leaning towards removing the server configuration there, as they
  can easily changed in the add-on preferences from the same preferences
  application; the way it was done was pretty much a hack. Any hard
  feelings about this?
2015-11-23 21:50:42 +01:00
Jérôme Duval
69a973e2f7 screen_blanker: fix warning. 2015-11-23 20:48:15 +01:00
Jérôme Duval
2bc202c430 XHCI USB: Add port routing for Intel WildcatPoint LP USB.
* from FreeBSD.
2015-11-23 20:47:15 +01:00
Jérôme Duval
95c8163a16 Add Hangul and Hangul_Hanja keycodes for korean keyboards.
* map both keys on USB keyboards. Untested.
2015-11-23 20:04:22 +01:00
Jérôme Duval
3dd0c8198e PackageRules: use valid macro names in defines. 2015-11-23 18:16:08 +01:00
Simon South
dbf060a3f7 libroot: Add brk() and sbrk().
This commit replaces the placeholder implementation of sbrk(), which
operated on a process' heap, with real implementations of brk() and
sbrk() that adjust a process' program break.

* unistd.h: Add standard definitions of brk() and sbrk(); include
  stdint.h for intptr_t.
* thread.cpp: Recognize RLIMIT_AS and RLIMIT_DATA resource limits
  (both currently unlimited); order limit identifiers alphabetically.
* arch-specific.cpp: Remove sbrk_hook().
* malloc_debug_api.cpp: Remove sbrk_hook().
* unistd/Jamfile: Build brk.c instead of sbrk.c.
* unistd/brk.c: Add.
* unistd/sbrk.c: Delete (placeholder implementation).
* libroot_stubs.c: Remove sbrk_hook().
* libroot_stubs_legacy.c: Remove sbrk_hook().
* src/tests/.../posix/Jamfile: Build brk_test.c.
* brk_test.c: Add (simple unit test that demonstrates behaviour of
  sbrk()).

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2015-11-22 17:59:22 +01:00
Jérôme Duval
d8e8078b3f net_server: warning on delete of address of a reference.
* fixes #12244.
2015-11-22 11:51:56 +01:00
Jérôme Duval
b8c67b27cc haiku-x86_64: make some dependencies feature dependent. 2015-11-22 11:47:29 +01:00
Axel Dörfler
62eec60079 SMTP works again.
* The message to send the mails never made it to the add-on looper.
* Mail protocol threads now have names.
* Added a "public" BOutboundMailProtocol::SendMessages() call that sends
  itself a message (even the correct one this time).
2015-11-22 11:35:17 +01:00
Axel Dörfler
0295da8893 Mail: Set min size in prefs instead of some random number.
* Since min/max size of the menu had contradicting values at larger font
  sizes, the layout was confused.
2015-11-22 11:34:45 +01:00
Axel Dörfler
04f969a596 BWindow::MoveOnScreen(): Need to use inner frame for resize.
* This caused the window to grow each time.
* This was especially noticeable at applications that store their
  size on quit, and restore it on start.
* This fixes bug #12456.
2015-11-22 11:33:49 +01:00
Jérôme Duval
56a0f2b3be haiku-x86_64: add a dependency on libssl and libcrypto
* this should be feature dependent though.
2015-11-21 12:22:16 +01:00
Jérôme Duval
946163e318 ffmpeg: fix x86_64 build. 2015-11-21 12:01:01 +01:00
Jérôme Duval
af585d0361 pkgman search: Add --requirements option 2015-11-20 20:55:12 +01:00
Jessica Hamilton
08006f7c8f efi_gpt: properly fix block offset calculations for partition entries
In 2346363b, had corrected the offset writing to the disk, but missed
correcting the offset for reading from the entries struct.

Instead of writing a block, just write the single entry, simplifying
the offset logic considerably.
2015-11-20 20:26:45 +13:00
Adrien Destugues
856cc59e58 AVCodecDecoder: use swresample to interleave audio channels.
Some codecs will always output audio in planar mode no matter what we
request. This is the case for example with AAC used for youtube. We now
use swresample to convert from planar to packed format.

Note that since swresample does its own buffering, we could probably do
away with some of the code that handled buffering before, making the
audio pipeline simpler and faster.

Fixes audio in youtube, but now the video plays at 2x speed. It seems
something is wrong with the timestamps. Possible things to investigate:
* why do we use the packet dts instead of the pts from the frames anyway?
* the pts and pkt_dts are in "stream time_base units". We seem to assume
  microseconds for audio but this is probably not the case. Or did I
  miss where the conversion is done?
2015-11-19 22:53:22 +01:00
Automatic Committer
235725ef91 Update pci.ids from pciids.sourceforge.net 2015-11-19 05:20:23 +01:00
Julian Harnath
ff535a92ce app_server: declare jam dependecy for Layers to freetype 2015-11-18 14:58:47 +01:00
Julian Harnath
b0f4e518cd app_server: fix gcc4 build 2015-11-18 14:58:29 +01:00
Julian Harnath
718f352859 app_server: bitmap interpolation; fix out-of-bounds access
* Optimized code path for bitmap drawing with bilinear interpolation
  scaling was assuming that source bitmap is always at least 2 rows
  in size.

* Fixes #12469: in webkit, scaled 1-pixel-high bitmaps often occur.
  If the bitmap allocation is by chance aligned to a page end, access
  to the non-existant second row crashes app_server.
2015-11-18 14:40:17 +01:00
Julian Harnath
345d9bb4a2 test_app_server: fix build 2015-11-18 14:04:19 +01:00
Jessica Hamilton
823513263e WebPositive: fix count of pagesCreated when starting up.
With the new session restore code in WebPositive, it would
restore the session and then open an extra window on top, as
the pagesCreated counter did not add the new window(s) to the
counter, only new tabs.
2015-11-18 11:02:04 +13:00
Axel Dörfler
7125795f6a E-mail: Fixed initial window size.
* It did not take the height-for-width view into account.
* However, the explicitly set preferred size seems to be ignored.
2015-11-16 20:44:56 +01:00
Axel Dörfler
670cfb15a5 BWindow: lock the looper in some new methods.
* This makes it more convenient to call them from someplace else, and
  follows the design used in the rest of the implementation.
2015-11-16 20:43:20 +01:00
Axel Dörfler
67c3eeebdc Mail: sizing/placing cleanup.
* Don't set a default fixed font size - just use the default fixed font.
* The preferences and signature window no longer have a default size,
  and position, either. Instead, they are placed over the active window.
* Fixed spacing in the preferences window.
* Converted the signature window to use the layout API.
* Minor cleanup.
2015-11-16 20:39:47 +01:00
Axel Dörfler
65484549f0 libunwind: Fixed build warning. 2015-11-16 20:37:18 +01:00
Axel Dörfler
28da8a4c90 Mail: corrected spacing after window spacing change.
* The button panel shouldn't be indented at all.
* The header panel was intented twice, once by the surrounding layout,
  once by its own.
2015-11-16 20:35:04 +01:00
Julian Harnath
3c9d8d6460 app_server: fix race condition in alpha mask cloning
* Add a lock which is acquired when reattaching/regenerating masks,
  and also acquired for a cached mask before making a clone of it,
  to prevent the clone from having an inconsistent state in
  concurrent edge cases.

* Maybe fixes #12469
2015-11-15 22:05:26 +01:00
Jérôme Duval
ac7f52fc91 app_server: fix x86_64 build. 2015-11-14 19:37:59 +01:00
Jérôme Duval
81768f44e7 XHCI USB: include in the Haiku package, only enabled two devices
for now.
2015-11-14 19:37:59 +01:00
Adrien Destugues
894640da2d ffmpeg: recognize planar audio and request packed instead
* Our media kit is designed to work with packed audio: which means the
  samples from different channels are interleaved in a single stream
* Old ffmpeg versions also used this, but they now switched to the
  planar format, where each channel is stored separately.
* Fortunately, we can request ffmpeg to use the packed format. We
  actually already tried to do that, but the API for requesting a sample
  format has also changed.
* Finally, we didn't recognize the packed format reported by the codecs,
  which in some cases could lead to 16/32 bit mismatches on top of the
  planar/packed mixup.

Fixes audio with ffmpeg 2.8 (ticket #12460)
2015-11-14 19:22:26 +01:00
Julian Harnath
6b56f7d282 app_server: add a few missing std::nothrow 2015-11-14 16:09:54 +01:00
Julian Harnath
b54b3ae511 app_server: add a cache for AlphaMasks
* If the same shape alpha mask is set again and again, we now keep
  the rendered masks in a cache. On certain websites, WebKit sets
  the same shape for clipping hundreds of times, which uses a lot
  of time to render the masks.

* When a shape mask was generated, we put it into AlphaMaskCache.
  The constructor for ShapeAlphaMask is made private and a factory
  method is used for instantiation instead, which transparently
  looks up in the cache whether a suitable mask was already generated
  before (so the entire caching is encapsulated inside the AlphaMask
  class).

* When taking a mask out of the cache, we still create a new
  AlphaMask instance. However, the new instance will share the
  mask bitmap with the previously generated instance (aside from
  the rendering of their bitmap, AlphaMask instances are pretty
  lightweight). Shape masks are only seen as identical when
  their shape is the same, the inverse flag, and they have the
  same parent mask.

* Cache is limited to a fixed size of currently 8 MiB, using a
  simple random replacement scheme. An LRU scheme can be added in
  the future if necessary. Counting of bytes for the cache size
  includes parent masks of masks in the cache, even if the parent
  itself is not cached. A reference counter for "indirect" cache
  references keeps track of which masks are not part of the cache,
  but still need to be added to the cache byte size.

* For now, only for ShapeAlphaMasks, other mask types can be added
  as necessary.
2015-11-14 16:09:52 +01:00
Julian Harnath
10df15449b app_server: plug leak of layers when empty clipping
* If there is an empty clipping region (invalid clipping) for the
  current view, a new layer could still be started, but not ended
  anymore. That's because unlike begin layer, end layer is handled in
  _DispatchViewDrawingMessage (because it can do actual drawing)
  and this method checks whether the clipping is valid and bails out
  if it isn't.

* Add an exception for the AS_VIEW_END_LAYER command code to still
  process it even when the clipping is invalid. The layer itself
  can after all set a valid clipping later on when its command list
  is played back. And even if it doesn't, we still have to play it
  to make sure nested layers are cleaned up.

* Fixes the memory leak in #12460 where webkit creates
  said situation: it had a layer open and then the closing was
  ignored due to empty clipping. All subsequent layer calls created
  nested layers in that one, hundreds of them, and their BPictures
  contained bitmaps, quickly eating up and leaking hundreds of MiB
  in app_server.
2015-11-14 16:09:49 +01:00
Julian Harnath
0fab27a23e app_server: don't ignore invisible layers
* When a layer has opacity 0, we can't just ignore it, we still
  have to play back its picture, even if the drawing will never
  appear on screen. This is because there might be nested layers
  and if they don't get blended, their references are not released.
  Also, it can be argued that state changes in the layer should be
  applied even if the layer is invisible (if we ignore it there,
  it would be inconsistent with other layers).

  This edge case of invisible layers could be optimized further, but
  it is rare enough anyway, so this should do.
2015-11-14 16:09:47 +01:00
Julian Harnath
2193dcd799 app_server: plug DrawState instance leak, other minor fixes
* OffscreenCanvas was not deleting its DrawState. Found thanks to
  the allocation tracking feature in libroot_debug (thanks mmlr!)

* Also a missing nothrow and a missing ref release in an error case
2015-11-14 16:09:45 +01:00
Julian Harnath
bcc5cf7d29 test_app_server: fix use after free
* Caught with libroot_debug
2015-11-14 16:09:43 +01:00
Julian Harnath
e718dc9178 app_server: Clip alpha masks to canvas size
* Making the alpha masks independent of view size is a good thing,
  however it turns out that I was too optimistic about the
  consequences: webkit sometimes sets masks for the whole page, not
  just the currently visible area. E.g. on Github diff views, it
  was seen to set a clipping path which is about 1,000 x 10,000
  pixels in size. Generating these huge masks eats up lots of memory
  and time.

* We now clip the alpha masks to the current view size. This
  introduces a dependency between mask and view again, however a
  weaker one than it used to be before the mask rework. When the
  view is enlarged, and the alpha mask was previously clipped during
  rendering, we regenerate it at the new size. When the view is
  shrunk however, we don't do anything and just keep the
  now larger than necessary mask around (so we don't have to
  regenerate again when the view is subsequently enlarged again --
  except if it then becomes even larger than it used to be).
  Changing the view origin is unaffected and still doesn't cause a
  regenerate.
2015-11-14 16:09:40 +01:00
Adrien Destugues
7460727d4a IP address control: don't try to DNS resolve
* This is used when configuring the DNS client, so resolving will not
  work
* It is supposed to be a control for entering IPs, not domain names.

Fixes #12464.
2015-11-13 21:50:11 +01:00
Adrien Destugues
1f70a8df4b SecureSocket: enable auto retry on connexion re-negociation
This is required to talk with the proxy in Thalys trains.
Now I'm online and I can push this!
2015-11-13 18:25:35 +01:00
Adrien Destugues
2ecff85ce1 HttpRequest: don't send an empty URL for GET request
* The new proxy in Thalys trains doesn't like that.
2015-11-13 18:23:52 +01:00
Adrien Destugues
f86df64b91 Web+: implement a simple session management system.
When quitting the app or closing the last window, all windows and tabs
are stored in a "Session" file. This is reloaded when the browser
starts, allowing to restore all windows and tabs.

Limitations: the page content and navigation history are not saved. The
file is written only at exit so this can't be used for crash recovery
(but you can make a backup of your default session).

Fixes #6680.
2015-11-13 14:32:13 +01:00
Axel Dörfler
be741f6ec1 Minor cleanup of translator roster commit, updated copyright. 2015-11-13 11:37:15 +01:00
Axel Dörfler
07432f3975 AboutSystem: Added Markus Himmel as contributor. 2015-11-13 11:35:15 +01:00
Markus Himmel
a1eccae96f Make sure images containing BTranslators are not unloaded early
When a translator is uninstalled, BTranslatorPrivate::_RemoveTranslators is
called. This method used to unload the image containing the translator after
calling Release() on it resulting in several problems:

- If the translator was still busy, e.g. translating something while being
  installed, it crashed since the image was unloaded even though its refcount
  was larger than 0.
- Applications using code from one of the translators (e.g. its config view)
  would crash when the translator is uninstalled (this is bug #12005).

This problem is now fixed. The roster keeps track of all translators whose
image it manages (even if the translator was already removed from the roster).
It also keeps a refcount to all images. When a translator's refcount drops to
zero and it belonged to a roster at some point, it does not delete itself, but
notifies the roster that it is ready to destruct, which then removes it from
the roster if the translator is still in it, destroys the translator, decrements
the refcount of the image and if the new refcount is zero, unloads the image.
All of this is done in a message handler, since if the translator called
TranslatorDeleted like before, the unloaded image would be referenced when
the stack is walked up.

Finally, the DataTranslations preflet is required to Acquire() the translator
whose config view it is showing, because otherwise its refcount could be reduced
to 0 and the image unloaded. BTranslatorRoster now enables users to acquire a
translator by ID. By the time the translator has to be released, it might not
be part of the roster anymore though. Since BTranslatorRoster tries not to give
out raw pointers to the translators it manages, users who acquire a translator
through a roster now are given a BTranslatorReleaseDelegate, which allows for
releasing the BTranslator exactly once and then self-destructs.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2015-11-13 11:26:53 +01:00
Adrien Destugues
43c2927886 pkgman: show old version when updating packages. 2015-11-13 11:02:49 +01:00
Adrien Destugues
6ae8d586ea Web+: More reasonable default size for cookie manager. 2015-11-12 14:07:28 +01:00
Adrien Destugues
5b7cdbbb23 WebPositive: add a cookie manager.
* Allows you to view and delete cookies.
* The list of domains is hierarchized and collapsed to minimize the
  number of empty entries
* All cookie parameters are shown for each domain: name, path, value,
  expiration date, and known flags.
2015-11-12 10:48:12 +01:00
Adrien Destugues
0b6c189559 BNetworkCookieJar: rework locking
The cookie jar used to be locked whenever an iterator was instanciated.
This didn't work well when using several iterators in the same thread,
because the BLocker then allows all of them to access the list
concurrently.

Rework the locking code to use a more fine grained approach, where the
cookie jar is only locked temporarily by methods which require it. These
methods are the ones which get and put new domain-lists in the jar, as
well as acquiring the locks on the domain-lists.

Each domain-list in the jar is locked using a read/write lock as before.
This means there can be many requests getting cookies for the same
domain in paralel, but only one at a time is allowed to set new cookies.

The iterators keep domain lists they need to access read-locked, as long
as they iterate the cookies for that domain.

A limitation of this approach is that deleting a domain-list when it
becomes empty is difficult. We can live with this, however, the
iteration still works (it just skips empty lists), and the empty lists
will not be stored or restored when archiving the cookie jar.
2015-11-12 10:18:35 +01:00
Automatic Committer
9311f342ef Update pci.ids from pciids.sourceforge.net 2015-11-12 05:20:24 +01:00
Axel Dörfler
93bb55e413 launch_daemon: Fixed resetting launch status, port update.
* _SetLaunchStatus() doesn't allow to set the status to B_NO_INIT
  (and rightly so).
* Therefore, we now reset it manually in Job::TeamDeleted(). This
  fixes restarting things that once ran on demand.
* Also update the port message when the default port changes.
2015-11-11 21:27:49 +01:00
Rene Gollent
190df86bd4 Debugger: Fix handling of pointer fields in messages.
BMessageValueNode:
- When resolving a pointer field, look up the type by the  fully qualified
  name, as that's how it winds up being stored in the lookup map. Also,
  due to gcc omitting the unspecified parent type on such pointers entirely,
  looking them up by base type name this way won't work anyhow.
2015-11-11 15:11:47 -05:00
Axel Dörfler
9e73b62749 launch_daemon: Fixed preregister consequences.
* Since the last change, the user launch_daemon would talk to the
  registrar again.
* However, this also caused BRoster::Launch() to preregister the app,
  which messed up our preallocated port.
* BRoster::Private::Launch() now allows to get the port that the
  registrar created in such a case, and the launch_daemon will now just
  use that one as default port.
* This lets us talk to the Deskbar again, and should fix #12455, as
  well as #12454 (again).
2015-11-11 16:04:02 +01:00
François Revol
bf53f0684f <disk_system>fat: fix gcc4 build
I noticed the syntax for libsupc++ in the BFS Jamfile addon differed but didn't think it mattered.
2015-11-11 15:18:04 +01:00
François Revol
038621114e Add FAT addon for DriveSetup
Tested with a 5MB image, seems to work.

There seems to be an issue with too long names though, or possibly names with spaces.

Also, technically it supports FAT12,16 and 32, so it should probably be renamed
in the interface.

Didn't check how to declare support for more than 1 partition types either.
2015-11-11 14:41:51 +01:00
François Revol
910a2b8c86 fat: Add initialization support
Not much tested yet but it does work on a 5MB image with mkfs.
2015-11-11 14:41:51 +01:00
François Revol
6476935b27 fat: copy over the mkdos sources 2015-11-11 14:41:51 +01:00
Adrien Destugues
e7f7c4b2d3 ffmpeg: add some alternate MIME types to the known demuxers
* These are the standard types used in HTML5 media, tell everyone that
  we can handle them.
* A few more green items in html5test.com, no extra points since none of
  the formats are mandatory however.
2015-11-11 11:58:42 +01:00
Adrien Destugues
f1c1a9dfa8 SecureSocket: stubs for no-openssl version 2015-11-11 01:50:17 +01:00
John Scipione
408a2da5c6 Tracker: Set low color before drawing column name
Fixes #12084
2015-11-10 16:27:41 -08:00
Adrien Destugues
c614961364 Implement CONNECT pass-through for HTTPS proxy
* When using a proxy, HTTPS connexion must still go directly to the
  target website. The proxy can then act as a TCP stream relay and just
  transmit the raw SSL stream between the client and website.
* For this, we ask the proxy sending an HTTP request with the CONNECT
  method. If the proxy supports this, we can then send anything as the
  payload and it will be forwarded.
* Untested, as the network here in Dusseldorf doesn't let me use a
  proxy.

ticket : #10973
2015-11-11 01:16:38 +01:00
Julian Harnath
0a6baa7e74 app_server: gcc4 build fixes 2015-11-10 23:42:43 +01:00
Julian Harnath
25dbf74b8e BView: add methods for affine translation/scaling/rotation
* BView::TranslateBy(), BView::ScaleBy() and BView::RotateBy()
  allow to conveniently modify the current affine transformation.
  This makes it unnecessary to first read the current transform,
  modify it, and then set it again.
  Uses the new Pre...() methods of BAffineTransform.

* Also, remove setting the transform "through" to the BView even
  while recording a BPicture, as this now results in transforms
  being applied more than once.
2015-11-10 23:34:08 +01:00
Julian Harnath
1cde68c5a2 app_server: apply transform to CopyBits
* Apply affine transforms to source and target rects of
  BView::CopyBits(). For now, only if transform is a dilation.
2015-11-10 23:33:58 +01:00
Julian Harnath
4bd6f322bb app_server/Interface Kit: add new clipping API
* Add new clipping API for rectangles (ClipToRect, ClipToInverseRect)
  and shapes (ClipToShape, ClipToInverseShape)

* Works with affine transforms and automatically switches from fast
  region-based clipping to alpha-mask based clipping as necessary.

* Always self-intersecting, i.e. no state push required to further
  narrow down the clipping region. All of the 4 new methods can be
  mixed in any order.
2015-11-10 23:33:54 +01:00
Julian Harnath
23af4ff6ac app_server: finish BShape-based alpha mask generation 2015-11-10 23:12:32 +01:00
Julian Harnath
ab12093685 BShape: move bounding box method to shape_data
* Makes it easier to get the bounding box from inside app_server
2015-11-10 23:12:30 +01:00
Julian Harnath
08135223ce Affine transforms: add method to test for dilation
* Add IsDilation() to BAffineTransform and Transformable which check
  whether the transform is a dilation, i.e. consists of only
  translation and/or scaling
2015-11-10 23:12:28 +01:00
Julian Harnath
6109a2086d Merge branch 'app_server'
Conflicts:
	src/kits/interface/PicturePlayer.cpp
	src/servers/app/ServerPicture.cpp

In addition, the following files were also adapted to master branch
BPicture changes during the merge:
	src/kits/interface/PicturePlayer.h
	src/servers/app/PictureBoundingBoxPlayer.cpp
2015-11-10 23:09:54 +01:00
Rene Gollent
081d56c4d9 Debugger: Fix potential VariablesView crash.
- In some contexts, VariablesView doesn't have an associated thread
  and stack frame, which would lead to a potential crash when resolving
  expression nodes.
2015-11-10 14:38:26 -05:00
Rene Gollent
d6a334fa21 Debugger: Adjust TeamWindow to use ExpressionEvaluationWindow.
- Requesting expression evaluation from the top level menu now
  invokes an expression eval window, rather than the past prompt.

ExpressionPromptWindow:
- Simplify, as it's now strictly used to add persistent expressions.
2015-11-10 14:38:24 -05:00
Rene Gollent
94acd9251e Debugger: Add dedicated expression evaluation window.
- Rather than dropping one-off expression evaluation results into the
  current team's variables view, they will now be handled in a dedicated
  window, which also allows to control the context in which the expression
  is evaluated.
2015-11-10 14:01:15 -05:00
Rene Gollent
b4058de7fe ValueNodeManager: Add flag to control frame variables.
- We now take a flag which determines whether or not to add parameters
  and locals from the frame to the container.
2015-11-10 14:01:14 -05:00
Rene Gollent
be32382a6d Debugger: Adjust initial configuration of VariablesView.
- VariablesView is now passed a ValueNodeManager to use at
  construction time, rather than creating one itself internally.
- Adjust TeamWindow accordingly.
2015-11-10 14:01:12 -05:00
Rene Gollent
90da71b645 VariablesView: Style cleanups. 2015-11-10 14:01:10 -05:00
John Scipione
d3628dcd8f IK: Move CheckNodeIconHintPrivate to Tracker
* Move BPrivate::BNodeInfo::CheckNodeIconHintPrivate() to Tracker's
  Model class.
* Rename HasVectorIconHint(BNode*) to CheckNodeIconHint(BNode*).
  and make it check not only for vector icons but also if you have
  BOTH large and mini icons.
* Replace instances of CheckNodeIconHintPrivate() with the newly
  created CheckNodeIconHint().
2015-11-10 09:15:17 -08:00
Axel Dörfler
70708ef97d launch_daemon: Retrieve default port from monitoring BRoster.
* Instead, we now maintain a default port for a job. For "legacy"
  services, BRoster's B_SOME_APP_LAUNCHED will update it, too.
* This allows to quit Tracker using "launch_roster stop".
* Also, this fixes bug #12249, as we don't use the signature variant of
  creating BMessenger anymore in Job::GetMessenger(). This would call
  into the launch_daemon again, and deadlock.
2015-11-10 15:55:35 +01:00
Adrien Destugues
534d0e6160 SerialConnect: allow to change line terminator
* It can now be used to send AT commands for example, which need \r
  instead of \n.
2015-11-10 09:55:48 +01:00
Adrien Destugues
d3b6b9e5f7 BSecureSocket: use "trusted first" validation algorithm.
* This makes it work with the new ca_root_certificates package.

Fixes #12004.
2015-11-10 09:22:02 +01:00
Axel Dörfler
93c0a5d790 Reworked little endian bitfields a bit.
* Added B_ prefix.
* Renamed 16 bit variants to B_LENDIAN16_*.
* Added 32 bit variants (albeit only 16 of them for now).
* Adjusted headers that were using them.
2015-11-10 08:47:48 +01:00
Michael Lotz
ab306fb8f5 BPathMonitor: Fix locking order reversal introduced in 8599f4b.
The sLocker was used as an outer lock with the sLooper locked within.
The sLocker therefore can't be used within MessageReceived() as that
could lead to deadlocks due to reversal of the locking order.

Instead of two locks, just use locking the looper for all serialization.
While this has a higher overhead to using a BLocker (due to the looper
list locking and lookups) this shouldn't be too problematic.
2015-11-09 23:11:57 +01:00
Jonathan Schleifer
82f5db2e26
More libunwind compilation fixes 2015-11-09 20:00:06 +01:00
Jonathan Schleifer
ab1ac5930b
Fix a typo 2015-11-09 19:56:38 +01:00
Jonathan Schleifer
8e3c9301d9
Add Jamfile for x86 libunwind 2015-11-09 19:06:11 +01:00
Jonathan Schleifer
7a541d13ed
Some progress towards libunwind compiling
* Add main Jamfile
 * Add x86_64 Jamfile
 * Add config.h for Haiku
 * Add defines missing from elf.h
 * Don't include some missing files
2015-11-09 18:16:08 +01:00
Jonathan Schleifer
18941b085c
Import libc++ 2015-11-09 18:02:17 +01:00
Jonathan Schleifer
f2c0917eea
Import libcxxrt 2015-11-09 18:01:58 +01:00
Jonathan Schleifer
d77787f2a4
Import libunwind 2015-11-09 18:01:42 +01:00
Adrien Destugues
3df0df95cd get_package_dependencies: catch and report exceptions
The package kit uses exceptions for error handling, but this tool didn't
catch them so all we got in case of error is "Abort" on the error
output.

Now, the exceptions are caught and reported with the complete error
message.
2015-11-09 12:58:51 +01:00
Adrien Destugues
55af491fde BUrlContext: fix logic reversal in certificate comparison
The Predicate for BObjectList::FindIf must actually be a difference
operator, and return 0 if there is a match.
2015-11-09 11:13:00 +01:00
Adrien Destugues
4849ab6c8b BHttpRequest: add SSL certificate exception management.
When an HTTPS request uses an SSL certificate that OpenSSL considers
untrusted, and the user decides to continue anyway, add the certificate
to an exception list. Match certificates against this list and don't ask
the user again if they are already there.

Fixes #12004. Thanks to markh for the initial patch and peeking into the
WebKit code!
2015-11-09 10:46:58 +01:00
Adrien Destugues
f26dbfe79b BCertificate: build fix. 2015-11-09 00:15:19 +01:00
Adrien Destugues
6c32f50a64 BCertificate: fixup the API
* Add an operator== and a copy constructor
* Make the getters const so they are easier to use
2015-11-08 23:47:29 +01:00
Michael Lotz
ba307a12db vfs: Cleanup: Move functions around for more logical grouping.
Move static internal functions out of the API functions block and drop
their vfs_ prefix and move an API function into the API functions block.
2015-11-08 22:31:56 +01:00
Michael Lotz
c73d13015d kernel: Use anonymous namespaces to avoid type collisions.
The anonymous namespace makes type definitions local to the translation
unit (like static does for objects). For pretty much any type not shared
across multiple files this is what one wants to happen (and might
erroneously expect to happen automatically).

This commit solves some actual collisions that were present:

* The VFS and the rootfs both used an incompatible VnodeHash struct for
  their BOpenHashTable.
* XSI semaphores and message queues both used queued_thread, Ipc and
  IpcHashTableDefinition.

For release builds these did not cause problems as the types were fully
inlined. Debug builds would crash at boot however because parts of a
BOpenHashTable<VnodeHash> from the rootfs meant to operate on struct
rootfs_vnode would be applied to one from the VFS expecting struct
vnode.

As such collisions are violations of the one definition rule, the code
is at fault and unfortunatley the compiler isn't required to diagnose
such problems across translation units (which isn't actually trivial).
This can lead to subtle and hard to debug problems and it's therefore
best to avoid leaking types into the global namespace whenever possible.
2015-11-08 22:31:56 +01:00
Jonathan Schleifer
f7ededa623
shell.S: Add .section .bss to make Clang happy 2015-11-08 16:30:40 +01:00
Jonathan Schleifer
50a1d86c88
byteorder.S: Use flds instead of fld
Clang refuses to guess.
2015-11-08 16:27:31 +01:00
Axel Dörfler
f0e23c2b9b launch_daemon: Fixed missing Event member initialization.
* This fixes targets starting seemingly unconditionally.
2015-11-08 11:41:01 +01:00
Axel Dörfler
f761076be5 launch_daemon: Fixed DemandEvent::ToString().
* Reported "event" instead of "demand".
2015-11-08 11:41:01 +01:00
Adrien Destugues
60572cc8d0 Add a MIME type to network_settings add-ons
* This is required for localization to work.
2015-11-08 09:28:34 +01:00
Adrien Destugues
7218744e73 Network preferences: missing translations.
* Some files with localized items were not added to the jamfile.
2015-11-08 09:22:13 +01:00
François Revol
c4ad6501bc googlefs: provide get_vnode_name
This works around the VFS bug I just fixed. :D
2015-11-08 04:48:51 +01:00
François Revol
3d58615e3a googlefs: make the close/free hooks more robust 2015-11-08 04:48:48 +01:00
François Revol
2e04b3a2b9 googlefs: fix a possible race condition 2015-11-08 04:48:45 +01:00
François Revol
747e0ba247 googlefs: typo 2015-11-08 04:48:42 +01:00
François Revol
5aeaaebad9 googlefs: fix parsed urls
we now get relative URLs it seems...
2015-11-08 04:48:40 +01:00
François Revol
02487f3c4b googlefs: fix parsing 2015-11-08 04:48:37 +01:00
François Revol
26b35e649f googlefs: force disabling HTTP redirection from Google
We don't really handle HTTP REDIRECT...
2015-11-08 04:48:34 +01:00
François Revol
49d3cc2a78 googlefs: error handling
Damn this code is ugly!

Also dump the header we get to /tmp
2015-11-08 04:48:31 +01:00
François Revol
25472bc40a googlefs: update default Google server 2015-11-08 04:48:28 +01:00
François Revol
c518435bb1 VFS: pass correct vnode to fs calls in default get_vnode_name
The opendir and closedir/free_dircookie hooks were called with
mismatched vnode. It seems only googlefs is actually affected by this,
since all other fs without a get_vnode_name just don't are about the
passed vnode arg to closedir and free_dircookie.

Now I should really get some sleep!
2015-11-08 04:32:57 +01:00
François Revol
8f4a653ca6 VFS: typo 2015-11-08 04:32:57 +01:00
Jonathan Schleifer
93bcaf3650
arm/arch_exceptions.S: Replace spsr_all with spsr
After a quick look at binutils, they seem to be equal, however, Clang
does not accept the _all one.
2015-11-08 00:59:18 +01:00
Jonathan Schleifer
15d594cccd
ARM: Add __aeabi_memset and __aeabi_memmove alias 2015-11-08 00:54:32 +01:00
Jonathan Schleifer
d8548e00aa
Fix some more type mismatches with std::{min,max} 2015-11-08 00:44:18 +01:00
Jérôme Duval
6c4cca34c2 glibc: replace extern __inline with __extern_always_inline for x86.
* also update __atan2l for x86, update __FAST_MATH sections.
2015-11-08 00:38:20 +01:00
Jérôme Duval
b49dd60c46 Drop namespace std after 95d4ed6778. 2015-11-08 00:38:19 +01:00
Axel Dörfler
7406866340 launch_roster: The beginnings of a launch_daemon control tool. 2015-11-08 00:09:26 +01:00
Axel Dörfler
b0ecbc13f0 launch_daemon: Refactored some message handlers, more info.
* The info getters will now add a lot more info.
2015-11-08 00:09:26 +01:00
Jonathan Schleifer
c7624537a3
ARM: Alias __aeabi_memcpy to memcpy 2015-11-07 23:11:14 +01:00
Jonathan Schleifer
456150599a
Add __clang__ to a few #ifdefs 2015-11-07 23:02:53 +01:00
Axel Dörfler
5860caae39 launch_daemon: Added basic ability to stop/start jobs via API.
* Stopping a job is very simplistic right now, and will have to be
  extended considerably, probably with its own job.
2015-11-07 21:58:12 +01:00
Axel Dörfler
d8c022250d BMailAccountSettings: use BPathFinder.
* This allows to put add-ons in non-packaged folders, too.
* Also, Set{In|Out}boundAddOn() only ever looked in the system dir.
2015-11-07 20:55:14 +01:00
Jonathan Schleifer
55de0addd5
arm/arch_string.S: Only use sane insns for Clang 2015-11-07 18:29:50 +01:00
Jonathan Schleifer
ed6dfed2a0
Fix a type mismatch for std::min() 2015-11-07 18:16:40 +01:00
Jonathan Schleifer
71e0324992
Move new / delete kernel_cpp.h -> kernel_cpp.cpp
new and delete may not be defined as inline, as Clang loudly complains.
The same is true for static.
2015-11-07 18:16:23 +01:00
Jonathan Schleifer
b310316956
Fix arm/arch_string.S for Clang 2015-11-07 18:08:01 +01:00
Jonathan Schleifer
95d4ed6778
Add missing "using std::nothrow" 2015-11-07 18:08:01 +01:00
Humdinger
ad926b253a Improve/fix tab view layout as discussed
See http://www.freelists.org/post/haiku-development/Unifying-visuals-of-BTabView-usage

Besides the tab bar going the full width of the window, also some
layouting tweaks to several apps and prefs.

Still missing: the first (and last) tabs in the tab bar should be inset by
B_USE_WINDOW_SPACING so the controls in the tab view line up nicely.
I think I remember stippi wanting to look into it... :)
2015-11-07 17:40:24 +01:00
Humdinger
3c5208e439 Improve/fix layout
Some tweaks to the layout of apps/prefs in the course of using
B_USE_WINDOW_SPACING.
2015-11-07 17:40:22 +01:00
Humdinger
c8325bb7d7 Improve layouting of Expander
Especially actually hide the content's scroll view, which
otherwise would peak out if the B_USE_WINDOW_SPACING would
ever be increased.
2015-11-07 17:40:20 +01:00
Humdinger
744a39273b Use templatized version of BLayoutBuilder
...also more B_USE_WINDOW_SPACING
2015-11-07 17:40:18 +01:00
Humdinger
d0ac609964 Use B_USE_WINDOW_SPACING
Use B_USE_WINDOW_SPACING as inset from contents to window border.
Some whitespace cleanup.
2015-11-07 17:40:16 +01:00
Axel Dörfler
d5607aa971 SMTP: properly use const, and extern "C".
* This fixes having it picked up in the mail_daemon. That shouldn't have
  worked in the last three years...
2015-11-07 17:07:06 +01:00
Axel Dörfler
5ab027fdc9 Sudoku: use the layout API.
* This removes the CenteredViewContainer class, as it is no longer
  being used.
* However, it also removes its functionality, ie. the Sudoku view now
  fills the complete window (even without any borders), again.
2015-11-07 17:07:03 +01:00
Axel Dörfler
2e14f933e5 Sudoku: minor cleanup. 2015-11-07 17:07:01 +01:00
Michael Lotz
c869b2bb07 BPathMonitor: Remove unused headers, some whitespace cleanup. 2015-11-07 09:55:04 +01:00
Michael Lotz
8599f4b330 BPathMonitor: Lock on incoming node monitor messages.
The lock was only acquired when paths to watch were added or removed,
protecting the data structures against concurrent modification due
to addition/removal of entries by the API user.

Locking is also required for node monitor messages since these can
trigger the data structures to be modified (due to recursive watching
and new directories becoming available or due to resyncing of modified
ancestor chains).

Previously it was possible to corrupt the data structures when node
monitor messages were received while still starting to watch a directory
structure. This was especially likely in the case of watching devfs
directories, as accessing these can trigger device scanning which in
turn could possibly add new device entries. Either the path monitor
looper or the API user would then trip over the corrupted data
structures.

Probably fixes #11280. Although I was only able to reproduce crashes
on the API side, corruption of the hash tables and corresponding endless
loops are quite plausible.

Possibly also fixes #12412 if the input_server was in the process of
starting to watch entries. It's hard to tell due to the lack of a back
trace but would fit the crashes I was able to reproduce with a synthetic
test case.
2015-11-07 09:52:20 +01:00
Simon South
75c31ae28d system: Build using public elf.h header
Reduce duplication of code by

* Removing from elf_common.h definitions available in os/kernel/elf.h
* Deleting elf32.h and elf64.h
* Renaming elf_common.h to elf_private.h
* Updating source to build using public and private ELF header files
  together

Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2015-11-07 11:49:56 +13:00
Axel Dörfler
e2f83cbd6b launch_daemon: Monitor teams, and restart services.
* Services that end are now automatically restarted.
* However, this is very basic at the moment, there is no throttling,
  and no support for shutting down the system.
2015-11-06 22:50:05 +01:00
Axel Dörfler
d8c0972a81 launch_daemon: Added "setting" condition.
* Moved the mail_daemon to the user startup, and start it only if
  enabled in the settings.
2015-11-06 22:49:17 +01:00
Axel Dörfler
c2f71fa688 launch_daemon: give the main worker thread a different name.
* It's now called "main worker" instead of just worker.
2015-11-06 22:49:10 +01:00
Axel Dörfler
3282b758b0 launch_daemon: Add API to get information on jobs.
* Ie. a listing of all targets/jobs, as well as specific (basic) info
  on each.
* Also added a bit of optional debug output.
* Moved translating the path to launch time -- we should take the job's
  environment into account here at some point.
2015-11-06 22:47:56 +01:00
Automatic Committer
7e45dd1057 Update pci.ids from pciids.sourceforge.net 2015-11-05 05:20:22 +01:00
Michael Lotz
44f5830503 BLocker: Make misuse warning more useful.
Also print the locker sem (for manual name lookup) and the involved
threads. It was also missing the line terminator which messed up the
following output.

Also fix a typo in a comment.
2015-11-04 00:11:17 +01:00
Michael Lotz
1cffe0dc51 BLocker: Fix recursive count for "unusual" use cases.
Since a BLocker can be unlocked from other threads than the one holding
the lock, it can also be further unlocked even when already unlocked.
This caused the recursive count to become negative. The first lock then
needs to reinitialize the count to 1 for the lock balance to work again.

Just incrementing the negative recursive count lead to it never
counting back down from one to zero in the unlock case, which made the
BLocker impossible to unlock.

This makes the Haiku BLocker behave exactly like the BeOS one, including
the negative recursive count and reinitialization, as evidenced by its
debugging features showing the internal counts.

Alternatively to reinitializing the recursive count it could be
prevented from going below zero in the first place, but I don't see why
we should deviate from BeOS there while allowing its awkward unlock
behaviour.

This makes some more exotic use cases work like the BGLView <-> SDL
combination that previously would always just hang. While these abuses
should be reviewed/corrected, just hanging the BLocker doesn't seem
useful.
2015-11-04 00:11:16 +01:00
Michael Lotz
271f422a92 listsem: Clean up format strings to use format macros.
Fixes printing values on x86_64.
2015-11-04 00:11:16 +01:00
John Scipione
f672379ca1 Tracker: Redraw info window when file path changes
The hard work was already being done, we just had to redraw to get the new path.

Fixes #12437
2015-11-03 11:25:04 -08:00
Simon South
6abbd31061 unittests: Build copied BAppTest files
This adds to the "unittests" target a dependency on the
"AppTestRunApp3a" (etc.) files meant to be copied as part of the
BApplication test suite so they are generated when "jam unittests" is
run.

* TestsRules: Add "UnitTestDependency" rule.
* testapps/Jamfile: Make unit tests depend on copied files.

Fixes #12441.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2015-11-01 14:19:04 +01:00
Adrien Destugues
8d314f692b FireWire: gcc5 compatibility.
Fixes #11991.
2015-11-01 14:13:15 +01:00
Adrien Destugues
4e9575976e HaikuWebkit 1.4.13 package.
* There is a small API change, and only the x86_gcc2 package was
  updated. This means the x86 and x86_64 builds are broken until someone
  updates the packages.
* Fix several small bugs, the most important one being that cookies are
  written to disk again.
2015-10-31 09:01:23 +01:00
Humdinger
ec54f923ef Improved description of welcome and userguide packages. 2015-10-30 10:16:52 +01:00
Automatic Committer
786e713583 Update pci.ids from pciids.sourceforge.net 2015-10-29 05:20:25 +01:00
Simon South
874e9521b2 x86_64: Glue code: Keep stack 16-byte-aligned
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2015-10-28 21:24:34 +01:00
Jérôme Duval
6c009cde0b kernel: avoid dprintf messages for known header types we don't use.
* fix a typo in runtime_loader/count_regions().
2015-10-28 21:21:56 +01:00
Simon South
1a28be27e8 Fix unittests build.
Signed-off-by: John Scipione <jscipione@gmail.com>
2015-10-27 10:28:36 -07:00
Simon South
d5447eb9c0 runtime_loader: Do not assume executable has dynamic segment
This prevents a crash when loading a statically linked executable.

Fixes #12287.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2015-10-26 21:23:30 +01:00
Simon South
078b88b12d runtime_loader: Randomly position only relocatable code
The use of an unreliable test for relocatability effectively broke
runtime_loader's support for non-position-independent executables, as it
would insist on randomly positioning these files' segments in memory
anyway causing the program to quickly crash.

With this change runtime_loader uses the object type specified in the
file's header to determine whether its segments can be safely relocated,
restoring support for non-PI executables.

Fixes #12427.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2015-10-26 21:19:25 +01:00
Murai Takashi
1e6dd3feed Fix GCC 5 maybe-uninitialized warnings.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #12020
2015-10-26 21:13:24 +01:00
Murai Takashi
949cf6ac85 Fix GCC 5 build.
* Add -fgnu89-inline flag for libroot/posix/glibc
* Change __GNUC__ == 4 to __GNUC__ >= 4

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #11990, most of the changes had already been done.
2015-10-26 19:05:24 +01:00
Jeroen Oortwijn
fe055bf343 change html output to confirm to XHTML Strict
Several errors in the html output caused WebPositive to not render
the file completely.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #12387.
2015-10-26 18:36:50 +01:00
Adrien Destugues
4286d20b87 intel_extreme: PVS 1765-6: only use bool in conditions
* Style fix, no functional changes.
2015-10-26 18:36:48 +01:00
Adrien Destugues
9e80618520 hda: PVS1619-21: "unsigned < 0" comparisons
* Probably harmless, the overflow on the other side was already checked.
2015-10-26 18:36:45 +01:00
Axel Dörfler
5f2abaf7df launch_daemon: Added network_available event & condition.
* Not yet tested.
2015-10-25 14:41:17 +01:00
Axel Dörfler
2e17b6504f BLaunchRoster::ResetStickyEvent() added.
* Used to unflag sticky events that already have been triggered once.
2015-10-25 14:41:17 +01:00
Humdinger
7c088080ec Split the big userguide package into one per language.
Splitting the almost 70 MiB userguide package into one package per
language at ~4.5 MiB saves time and space when installing/updating.

At the online tool that manages the user guide pages, we have to
make changes to fall back to the online page if you try to switch
to a language you haven't installed locally. See #9322.
2015-10-25 10:20:51 +01:00
Adrien Destugues
96f94789c4 input_server: fix debug build. 2015-10-23 19:31:39 +02:00
John Scipione
c06aefa0ee HaikuDepot: Reset package state on failure
* Save the package state before attempting to install/uninstall the package.
* In the case of failure set the package state back to what it was.
* Use the synchronous version of BAlert so that the package state won't
  change until the user clicks the Close button on the dialog.

Fixes #10838
2015-10-22 10:44:27 -07:00
John Scipione
ae557b7951 HaikuDepot: Style fix, whitespace only 2015-10-22 10:42:21 -07:00
John Scipione
6075d7d09d HaikuDepot: Indentation style fix 2015-10-22 10:27:58 -07:00
John Scipione
95ad2c7563 HaikuDepot: Remove extra ; 2015-10-22 10:27:27 -07:00
John Scipione
7cc5d1688d HaikuDepot: Set B_STOP_ALERT on fatal error BAlerts 2015-10-22 09:57:29 -07:00
Automatic Committer
6d574ebd1b Update pci.ids from pciids.sourceforge.net 2015-10-22 05:20:23 +02:00
Augustin Cavalier
4cb401968e Tracker: Remove needless NULL check before delete.
Thanks John!
2015-10-21 12:55:07 -04:00
Augustin Cavalier
c746acc289 Tracker: Delete own BTextWidgets in BPose destructor.
Fixes a memory leak, and #12393.
2015-10-21 12:01:04 -04:00
John Scipione
d4e348b08e Mail: Implement select all hook for subject
This allows the Cmd+A key shortcut to select all text on
the subject control.  You could already Select All from the
View menu but this is more convinient.

Fixes #12361
2015-10-19 14:13:30 -07:00
John Scipione
b32f138231 Mail: Make AddressTextControl B_NAVIGABLE 2015-10-19 14:13:29 -07:00
John Scipione
a0242c53e2 Mail: Update background color to use setting
Fixes #12360
2015-10-19 14:13:28 -07:00
Axel Dörfler
d9bb9513c5 launch_daemon: "file_exists" now resolves $HOME, and '~'. 2015-10-19 21:22:21 +02:00
Axel Dörfler
4e8fc45146 Deskbar: converted to BServer. 2015-10-19 21:21:56 +02:00
Axel Dörfler
cfe6baf62f cddb_daemon: renamed to cddb_lookup, moved to /src/bin.
* It's now a standard command line tool that is launched automatically
  via the launch_daemon whenver a volume is mounted.
2015-10-19 21:21:21 +02:00
Axel Dörfler
a1406a012e launch_daemon: Increased the number of worker threads.
* Since we're disk bound, and not CPU bound, it doesn't make much sense
  to restrict the number of threads on the number of CPUs.
* It's still not completely independent of the number of CPUs now,
  though: we'll have 3 * CPU count worker threads.
2015-10-18 13:11:26 +02:00
Axel Dörfler
4ae4b3ff57 launch_daemon: Fixed the remaining "operation not allowed" bug.
* This was the harmless part: a job was been requeued that already was
  being launched.
* I was already aware of this one, and only accidentally stumbled over
  the non-harmless case in the JobQueue code when I tried to fix that
  little issue... (ie. never ignore warnings, even if you think you
  know what's going on).
2015-10-18 13:11:26 +02:00
Axel Dörfler
c80084b025 JobQueue: fixed incorrect requeuing.
* A dependent job was requeued even if it wasn't part of the queue
  before. The code relied on dependent jobs being already enqueued;
  but that cannot be guaranteed.
* If a job failed, its dependent jobs are now also set to failed, so
  that they won't be requeued at a later point.
* This caused some of the "Launching xxx failed: Operation not allowed"
  messages in the boot process. Those actually weren't harmless, and
  could mess up the natural job order.
2015-10-18 13:11:26 +02:00
Jérôme Duval
86e23e81b0 midi_server: fix debug build. 2015-10-18 11:42:03 +02:00
Jérôme Duval
d43720add9 Switch to tiff4 as system dependency. 2015-10-18 10:00:02 +02:00
Jérôme Duval
5b3c88f1da Switch to ncurses 6 as system dependency.
* remove traces from libpng (as opposed to libpng16).
2015-10-18 00:44:30 +02:00
Axel Dörfler
0f3fcbe437 launch_daemon: Added volume_mounted event.
* Triggered whenever a volume is mounted (surprise!).
* There is no way to specify which volume you are interested in for now
  (if someone knows a good use case, I'd be willing to add that,
  though :-)).
2015-10-17 14:24:57 +02:00
Axel Dörfler
7cd19b7e5c launch_daemon: Implemented sticky events, and registration.
* Sticky events are events that keep their signal raised, ie. even if
  a job is initialized afterwards, it will still be triggered.
* Consolidated naming for external events.
* Events are now registered once they are actually being used. This
  allows them to allocate the resources they need to do their thing.
2015-10-17 14:16:26 +02:00
Axel Dörfler
5ab2b1457b BJob: Added SetState() method. 2015-10-17 14:16:26 +02:00
Axel Dörfler
e96f5c3330 launch_daemon: Renamed RegisteredEvent to ExternalEventSource.
* With events being registered, this proved to be confusing, and it also
  helps to differentiate between event objects within the daemon, and
  events coming from external sources.
2015-10-17 14:16:25 +02:00
Axel Dörfler
1034412d56 notification_server: Fixed include order. 2015-10-17 14:16:13 +02:00
Alexander von Gluck IV
97aa078ef4 intel_extreme: Intial work for ValleyView support
* No impact to non-ValleyView chipsets
* Bump some register locations for VLV
* Only have HDMI port to test with on my ValleyView GPU
  and our driver seems to be missing all HDMI and
  sideband functionality.
* As ValleyView chipsets seem to be UEFI only, we don't
  have VESA fallback, so this shouldn't cause regressions.
  (unless we get UEFI framebuffer support)
2015-10-15 23:39:31 -05:00
John Scipione
e01bbf955f Tracker: Fix issue with vertical scroll bar border
This issue only manifested itself when the navigation toolbar was shown.

The scrollbar appeared to have no border while the rest did. This issue
manifested when the scrollbar insets were adjusted in hrev49654. The
scroll bar insets were really hiding the bug underlying bug though.

I'll try to explain what was happening and how I fixed it. The PoseView
container, called BorderedView, was showing its top border when the
navigation bar was hidden, and hiding its top border when the navigation
bar was shown.  This (almost) worked because the menu bar provided a
bottom border while the navigation toolbar didn't. However hiding
BorderedView's top border also hid the scroll bar border.

My solution was to draw a bottom border on the navigation toolbar and
then remove the top border from BorderedView unconditionally. So either
the menu bar or the navigation toolbar provides a bottom border and the
BorderedView has no top border.

Fixes #12392
2015-10-14 22:29:52 -07:00
Automatic Committer
e345b60486 Update pci.ids from pciids.sourceforge.net 2015-10-15 05:20:21 +02:00
Alexander von Gluck IV
fc20d30ed6 Notification Server: Build fix, missing stdlib.h for EXIT_ 2015-10-14 18:06:32 -05:00
Alexander von Gluck IV
c6475ba15c ahci: Minor trace cleanup; No functional change 2015-10-14 16:48:16 -05:00
Axel Dörfler
b5e496b575 notification_server: Converted to BServer, launch on demand. 2015-10-14 22:24:19 +02:00
Axel Dörfler
8f27961801 midi_server: Converted to BServer, launched on demand. 2015-10-14 22:24:01 +02:00
Axel Dörfler
83f803c6ff midi_server: cleanup.
* Style cleanup.
* Moved documentation to source file.
* Improved variable/member naming, added '_' prefix for private methods.
2015-10-14 22:23:28 +02:00
John Scipione
8a3ae7a49d Restore the BMenuField label background
Highlighting was added in hrev45983, stopped working in hrev49614, specifically
d891923650.

Add comment to explain what is happening and hopefully deter this from being
removed again in the future.

Fixes #12359
2015-10-14 11:06:55 -07:00
Alexander von Gluck IV
2f6a9c685a ahci: Fix delays with large numbers of empty ports
* Properly flag missing devices
* Do away with shifts and define ssts and sctl masks
* Tested working on 6 different systems with a
  combination of drive configurations.
* Empty media on AHCI devices still cause port change
  storms. (the issue that was attempted fixed in
  5584c22fdd)
2015-10-14 00:06:27 -05:00
Axel Dörfler
37e5a03660 print_server: Converted to launch_daemon, run on demand only.
* Seems to work fine, although it should probably also be triggered when
  there are still jobs in the queue -- someone more knowledgeable might
  want to chime in here, please :-)
* If this turns out to be problematic, we can just drop the "on_demand"
  job config again.
2015-10-13 16:37:38 +02:00
Axel Dörfler
e048384d77 launch_daemon: launching on demand now actually works.
* Was broken in two ways: if only the shortcut "on_demand" was used,
  the event didn't get created at all due to a bug in
  Events::AddOnDemand().
* Furthermore, _LaunchJob() always triggered a demand, but it should
  only do this when not called from a target.
2015-10-13 16:36:58 +02:00
Axel Dörfler
74b10f8e82 print_server: No need to build on BeOS. 2015-10-13 16:36:19 +02:00
Axel Dörfler
6c3e186ceb print_server: minor coding style cleanup. 2015-10-13 16:35:47 +02:00
Dario Casalinuovo
46098852b4 Revert code which got mixed in 782ebbdf93
* Sorry about that.
2015-10-12 13:20:31 +02:00
Dario Casalinuovo
782ebbdf93 Cortex: Check retrieved timesource, fixes #11391 2015-10-12 13:07:53 +02:00
Adrien Destugues
1388211503 Implement stat.st_rdev for block and character devices.
* devfs: set st_rdev to the inode number of the node being queried. This
  may not be the best thing to do, as it does not match what is set in
  st_dev for other files, so it can't be used to find which device
  stores a particular file. I'm not sure if st_rdev is actually used that
  way anywhere, however.
* vfs: do not clobber st_rdev with -1 for "special" (device) files.
  Refactor the code a little so setting the common attributes is done in
  a single place.

Fixes #12390.
2015-10-11 18:26:21 +02:00
Jessica Hamilton
fcad732fcd Revert "makebootable: Add in needed GPT libuuid on cross-platform builds"
This reverts commit 832f090ea8.
2015-10-08 23:37:28 +00:00
Jessica Hamilton
f217aa879b gpt/Header.cpp: also disable UUID code when _USER_MODE defined.
src/tools/makebootable defines _USER_MODE, which we can check
for in gpt/Header.cpp to remove the dependency on libuuid, as
makebootable only needs read-only access to partition maps
anyway.
2015-10-08 23:37:28 +00:00
Jessica Hamilton
f052cd0cce gpt partitioning: properly delete partition entries.
Previously, deleting a partition was lazy and only changed
the partition type to an invalid UUID, and would still
show up as a partition in many partitioning tools.
2015-10-08 23:37:27 +00:00
Simon South
5df5223b4b kernel: Don't send SIGTTOU if calling thread is blocking it
POSIX requires SIGTTOU to be sent to a process in a background process
group that tries to change the foreground process group ID associated
with its controlling terminal, unless the process is ignoring SIGTTOU or
the calling thread is blocking it. Previously the code checked the
former condition but not the latter, making it possible for calls to
tcsetpgrp() to get stuck in a loop and never return.

Should fix #3417.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-10-08 19:25:31 -04:00
Simon South
338fd73327 Debugger: Fix TRACE_LOCALS statement.
- Correct a TRACE_LOCALS statement in ValueWriter.cpp and update it to
  match the current definition of ValuePieceLocation.

Fixes #12411.

Signed-off-by: Rene Gollent <rene@gollent.com>
2015-10-08 18:59:54 -04:00
Rene Gollent
c5271e6b51 makebootable: Fix various build problems.
- Add jamfile for a build variant of libuuid.
- Adjust the build version of makebootable to link to that instead, as it would
  otherwise link in the target platform's version of libuuid_kernel, which
  wasn't necessarily compatible with the build platform's objects (i.e. when
  building a 32-bit Haiku image on a 64-bit host OS), and would consequently
  fail.
2015-10-08 18:57:21 -04:00
Alexander von Gluck IV
832f090ea8 makebootable: Add in needed GPT libuuid on cross-platform builds 2015-10-08 00:09:30 -05:00
Automatic Committer
228e5c39f5 Update pci.ids from pciids.sourceforge.net 2015-10-08 05:20:22 +02:00