| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #include "linux/types.h" | 
|  | 2 | #include "linux/module.h" | 
|  | 3 |  | 
|  | 4 | /* Some of this are builtin function (some are not but could in the future), | 
|  | 5 | * so I *must* declare good prototypes for them and then EXPORT them. | 
|  | 6 | * The kernel code uses the macro defined by include/linux/string.h, | 
|  | 7 | * so I undef macros; the userspace code does not include that and I | 
|  | 8 | * add an EXPORT for the glibc one.*/ | 
|  | 9 |  | 
|  | 10 | #undef strlen | 
|  | 11 | #undef strstr | 
|  | 12 | #undef memcpy | 
|  | 13 | #undef memset | 
|  | 14 |  | 
|  | 15 | extern size_t strlen(const char *); | 
|  | 16 | extern void *memcpy(void *, const void *, size_t); | 
|  | 17 | extern void *memmove(void *, const void *, size_t); | 
|  | 18 | extern void *memset(void *, int, size_t); | 
|  | 19 | extern int printf(const char *, ...); | 
|  | 20 |  | 
|  | 21 | EXPORT_SYMBOL(strlen); | 
|  | 22 | EXPORT_SYMBOL(memcpy); | 
|  | 23 | EXPORT_SYMBOL(memmove); | 
|  | 24 | EXPORT_SYMBOL(memset); | 
|  | 25 | EXPORT_SYMBOL(printf); | 
|  | 26 |  | 
|  | 27 | EXPORT_SYMBOL(strstr); | 
|  | 28 |  | 
|  | 29 | /* Here, instead, I can provide a fake prototype. Yes, someone cares: genksyms. | 
|  | 30 | * However, the modules will use the CRC defined *here*, no matter if it is | 
|  | 31 | * good; so the versions of these symbols will always match | 
|  | 32 | */ | 
|  | 33 | #define EXPORT_SYMBOL_PROTO(sym)       \ | 
|  | 34 | int sym(void);                  \ | 
|  | 35 | EXPORT_SYMBOL(sym); | 
|  | 36 |  | 
| Paolo 'Blaisorblade' Giarrusso | 74433c0 | 2005-12-29 17:39:59 +0100 | [diff] [blame] | 37 | extern void readdir64(void) __attribute__((weak)); | 
|  | 38 | EXPORT_SYMBOL(readdir64); | 
|  | 39 | extern void truncate64(void) __attribute__((weak)); | 
|  | 40 | EXPORT_SYMBOL(truncate64); | 
|  | 41 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | #ifdef SUBARCH_i386 | 
|  | 43 | EXPORT_SYMBOL(vsyscall_ehdr); | 
|  | 44 | EXPORT_SYMBOL(vsyscall_end); | 
|  | 45 | #endif | 
|  | 46 |  | 
|  | 47 | EXPORT_SYMBOL_PROTO(__errno_location); | 
|  | 48 |  | 
|  | 49 | EXPORT_SYMBOL_PROTO(access); | 
|  | 50 | EXPORT_SYMBOL_PROTO(open); | 
|  | 51 | EXPORT_SYMBOL_PROTO(open64); | 
|  | 52 | EXPORT_SYMBOL_PROTO(close); | 
|  | 53 | EXPORT_SYMBOL_PROTO(read); | 
|  | 54 | EXPORT_SYMBOL_PROTO(write); | 
|  | 55 | EXPORT_SYMBOL_PROTO(dup2); | 
|  | 56 | EXPORT_SYMBOL_PROTO(__xstat); | 
|  | 57 | EXPORT_SYMBOL_PROTO(__lxstat); | 
|  | 58 | EXPORT_SYMBOL_PROTO(__lxstat64); | 
|  | 59 | EXPORT_SYMBOL_PROTO(lseek); | 
|  | 60 | EXPORT_SYMBOL_PROTO(lseek64); | 
|  | 61 | EXPORT_SYMBOL_PROTO(chown); | 
|  | 62 | EXPORT_SYMBOL_PROTO(truncate); | 
|  | 63 | EXPORT_SYMBOL_PROTO(utime); | 
|  | 64 | EXPORT_SYMBOL_PROTO(chmod); | 
|  | 65 | EXPORT_SYMBOL_PROTO(rename); | 
|  | 66 | EXPORT_SYMBOL_PROTO(__xmknod); | 
|  | 67 |  | 
|  | 68 | EXPORT_SYMBOL_PROTO(symlink); | 
|  | 69 | EXPORT_SYMBOL_PROTO(link); | 
|  | 70 | EXPORT_SYMBOL_PROTO(unlink); | 
|  | 71 | EXPORT_SYMBOL_PROTO(readlink); | 
|  | 72 |  | 
|  | 73 | EXPORT_SYMBOL_PROTO(mkdir); | 
|  | 74 | EXPORT_SYMBOL_PROTO(rmdir); | 
|  | 75 | EXPORT_SYMBOL_PROTO(opendir); | 
|  | 76 | EXPORT_SYMBOL_PROTO(readdir); | 
|  | 77 | EXPORT_SYMBOL_PROTO(closedir); | 
|  | 78 | EXPORT_SYMBOL_PROTO(seekdir); | 
|  | 79 | EXPORT_SYMBOL_PROTO(telldir); | 
|  | 80 |  | 
|  | 81 | EXPORT_SYMBOL_PROTO(ioctl); | 
|  | 82 |  | 
|  | 83 | EXPORT_SYMBOL_PROTO(pread64); | 
|  | 84 | EXPORT_SYMBOL_PROTO(pwrite64); | 
|  | 85 |  | 
|  | 86 | EXPORT_SYMBOL_PROTO(statfs); | 
|  | 87 | EXPORT_SYMBOL_PROTO(statfs64); | 
|  | 88 |  | 
|  | 89 | EXPORT_SYMBOL_PROTO(getuid); | 
|  | 90 |  | 
| Paolo 'Blaisorblade' Giarrusso | a2d76bd | 2005-07-28 21:16:15 -0700 | [diff] [blame] | 91 | EXPORT_SYMBOL_PROTO(fsync); | 
|  | 92 | EXPORT_SYMBOL_PROTO(fdatasync); | 
|  | 93 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 94 | /* | 
|  | 95 | * Overrides for Emacs so that we follow Linus's tabbing style. | 
|  | 96 | * Emacs will notice this stuff at the end of the file and automatically | 
|  | 97 | * adjust the settings for this buffer only.  This must remain at the end | 
|  | 98 | * of the file. | 
|  | 99 | * --------------------------------------------------------------------------- | 
|  | 100 | * Local variables: | 
|  | 101 | * c-file-style: "linux" | 
|  | 102 | * End: | 
|  | 103 | */ |