Make some headers C89 safe again

- Allows to use FindDirectory.h in C89 sourcecode (no C++ style comments
  allowed)
This commit is contained in:
Adrien Destugues
2016-03-27 16:58:38 +02:00
parent af6cb5f94e
commit 97dfeb9670
3 changed files with 31 additions and 33 deletions
+5 -5
View File
@@ -5,7 +5,7 @@
#ifndef _OS_H
#define _OS_H
//! Kernel specific structures and functions
/** Kernel specific structures and functions */
#include <pthread.h>
#include <stdarg.h>
@@ -87,9 +87,9 @@ typedef struct area_info {
#define B_WRITE_AREA 2
#define B_EXECUTE_AREA 4
#define B_STACK_AREA 8
// "stack" protection is not available on most platforms - it's used
// to only commit memory as needed, and have guard pages at the
// bottom of the stack.
/* "stack" protection is not available on most platforms - it's used
to only commit memory as needed, and have guard pages at the
bottom of the stack. */
extern area_id create_area(const char *name, void **startAddress,
uint32 addressSpec, size_t size, uint32 lock,
@@ -381,7 +381,7 @@ extern bigtime_t system_time(void);
extern nanotime_t system_time_nsecs(void);
/* time since booting in nanoseconds */
// deprecated (is no-op)
/* deprecated (is no-op) */
extern status_t set_timezone(const char *timezone);
/* Alarm */
+15 -17
View File
@@ -34,44 +34,42 @@ typedef struct {
int32 text_size;
int32 data_size;
// Haiku R1 extensions
int32 api_version; // the Haiku API version used by the image
int32 abi; // the Haiku ABI used by the image
/* Haiku R1 extensions */
int32 api_version; /* the Haiku API version used by the image */
int32 abi; /* the Haiku ABI used by the image */
} image_info;
// flags for clear_caches()
/* flags for clear_caches() */
#define B_FLUSH_DCACHE 0x0001 /* data cache */
#define B_FLUSH_ICACHE 0x0004 /* instruction cache */
#define B_INVALIDATE_DCACHE 0x0002
#define B_INVALIDATE_ICACHE 0x0008
// symbol types
/* symbol types */
#define B_SYMBOL_TYPE_DATA 0x1
#define B_SYMBOL_TYPE_TEXT 0x2
#define B_SYMBOL_TYPE_ANY 0x5
// initialization/termination functions of shared objects
/* initialization/termination functions of shared objects */
#define B_INIT_BEFORE_FUNCTION_NAME "initialize_before"
#define B_INIT_AFTER_FUNCTION_NAME "initialize_after"
#define B_TERM_BEFORE_FUNCTION_NAME "terminate_before"
#define B_TERM_AFTER_FUNCTION_NAME "terminate_after"
#define B_APP_IMAGE_SYMBOL ((void*)(addr_t)0)
// value that can be used instead of a pointer to a symbol in the program
// image.
/* value that can be used instead of a pointer to a symbol in the program
image. */
#define B_CURRENT_IMAGE_SYMBOL ((void*)&__haiku_init_before)
// pointer to a symbol in the callers image
/* pointer to a symbol in the callers image */
// flags for _kern_load_image() (private API)
/* flags for _kern_load_image() (private API) */
enum {
B_WAIT_TILL_LOADED = 0x01,
// Wait till the loader has loaded and relocated
// (but not yet initialized) the application
// image and all dependencies. If not supplied,
// the function returns before the loader
// started to do anything at all, i.e. it
// returns success, even if the executable
// doesn't exist.
/* Wait till the loader has loaded and relocated (but not yet
initialized) the application image and all dependencies. If not
supplied, the function returns before the loader started to do
anything at all, i.e. it returns success, even if the executable
doesn't exist. */
};
#ifdef __cplusplus