]>
git.saurik.com Git - apple/boot.git/blob - gen/libsa/libsa.h
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.1 (the "License"). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
14 * The Original Code and all software distributed under the License are
15 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
22 * @APPLE_LICENSE_HEADER_END@
24 /* Exported API for standalone library */
25 #import <mach-o/loader.h>
31 extern char *bcopy(char *src
, char *dst
, int n
);
33 extern void *bsearch(const void *key
, const void *base
, size_t nmemb
, size_t size
, int (*compar
)(const void *, const void *));
35 extern int bzero(char *b
, int length
);
37 extern void *memset(void *s
, int c
, size_t n
);
40 * These are defined internally by GCC
42 * extern void *memcpy(void *dst, const void *src, size_t len);
43 * extern size_t strlen(const char *s);
47 extern struct segment_command
*
48 getsegbynamefromheader(struct mach_header
*mhp
, char *segname
);
49 extern int ptol(char *str
);
54 * extern int setjmp(jmp_buf env);
55 * extern void longjmp( jmp_buf env, int val);
58 extern int slvprintf(char *buffer
, int len
, const char *fmt
, va_list arg
);
59 extern int sprintf(char *s
, const char *format
, ...);
61 extern char *strcat(char *s1
, const char *s2
);
62 extern int strcmp(const char *s1
, const char *s2
);
63 extern char *strcpy(char *s1
, const char *s2
);
64 char *strerror(int errnum
);
65 extern int strncmp(const char *s1
, const char *s2
, size_t n
);
66 extern char *strncpy(char *s1
, const char *s2
, size_t n
);
72 extern unsigned long strtoul(
77 extern int atoi(const char *str
);
80 extern port_t task_self_
;
81 extern kern_return_t
vm_allocate(
82 vm_task_t target_task
,
83 vm_address_t
*address
,
87 extern kern_return_t
vm_deallocate(
88 vm_task_t target_task
,
92 extern kern_return_t
host_info(
95 host_info_t host_info
,
96 unsigned int *host_info_count
98 extern vm_size_t vm_page_size
;
99 extern host_t
host_self(void);
100 extern int getpagesize(void);
101 extern char *mach_error_string(int errnum
);
104 extern void malloc_init(char *start
, int size
, int nodes
);
105 extern void *malloc(size_t size
);
106 extern void free(void *start
);
107 extern void *realloc(void *ptr
, size_t size
);
115 extern int strncasecmp(const char *s1
, const char *s2
, size_t n
);