Added a very preliminary time.h

Removed the bzero()/bcopy() prototypes, and replaced them with macros - we
should decide what to do with them.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1119 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2002-09-23 02:33:02 +00:00
parent 085320eab2
commit 8edc4bb4c8
3 changed files with 25 additions and 2 deletions

View File

@ -46,8 +46,10 @@ extern const char *strerror(int error);
// ToDo: remove bzero(), bcopy() from here - we don't need those
// implementations anyway, since BeOS defines them as macros
// Of course, we could also just keep them (and bcmp() is missing)
extern void *bcopy(void const *source, void *dest, size_t length);
extern void bzero(void *buffer, size_t length);
//extern void *bcopy(void const *source, void *dest, size_t length);
//extern void bzero(void *buffer, size_t length);
#define bcopy(source, dest, length) memcpy(dest, source, length)
#define bzero(buffer, length) memset(buffer, 0, length)
/* non-standard string functions */
extern int strcasecmp(const char *string1, const char *string2);

View File

@ -1,2 +1,3 @@
// ToDo: fix me!
#include <ktypes.h>
#include <time.h>

20
headers/posix/time.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef _TIME_H_
#define _TIME_H_
typedef long clock_t;
typedef long time_t;
#define CLOCKS_PER_SEC 1000
#define CLK_TCK CLOCKS_PER_SEC
#ifdef __cplusplus
extern "C" {
#endif
// ToDo: add function prototypes...
#ifdef __cplusplus
}
#endif
#endif /* _TIME_H_ */