* Copyright 2001-2019 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Ingo Weinhold, bonefish@users.sf.net
* Jacob Secunda
*/
#include <string.h>
#include <sys/utsname.h>
#include <AppMisc.h>
#include <Entry.h>
#include <image.h>
#include <OS.h>
namespace BPrivate {
\param ref A pointer to a pre-allocated entry_ref to be initialized
to an entry_ref referring to the application's executable.
\param traverse If \c true, the function traverses symbolic links.
\return
- \c B_OK: Everything went fine.
- \c B_BAD_VALUE: \c NULL \a ref.
- another error code
*/
status_t
get_app_ref(entry_ref *ref, bool traverse)
{
return B_ERROR;
}
This is a runtime check for components compiled only once for both
BeOS and Haiku and nevertheless need to behave differently on the two
systems, like the registrar, which uses another MIME database directory
under BeOS.
\return \c true, if we're running under Haiku, \c false otherwise.
*/
bool
is_running_on_haiku()
{
struct utsname info;
return (uname(&info) == 0 && strcmp(info.sysname, "Haiku") == 0);
}
}