11da177e4SLinus Torvalds #include "linux/types.h" 21da177e4SLinus Torvalds #include "linux/module.h" 31da177e4SLinus Torvalds 41da177e4SLinus Torvalds /* Some of this are builtin function (some are not but could in the future), 51da177e4SLinus Torvalds * so I *must* declare good prototypes for them and then EXPORT them. 61da177e4SLinus Torvalds * The kernel code uses the macro defined by include/linux/string.h, 71da177e4SLinus Torvalds * so I undef macros; the userspace code does not include that and I 81da177e4SLinus Torvalds * add an EXPORT for the glibc one.*/ 91da177e4SLinus Torvalds 101da177e4SLinus Torvalds #undef strlen 111da177e4SLinus Torvalds #undef strstr 121da177e4SLinus Torvalds #undef memcpy 131da177e4SLinus Torvalds #undef memset 141da177e4SLinus Torvalds 151da177e4SLinus Torvalds extern size_t strlen(const char *); 161da177e4SLinus Torvalds extern void *memcpy(void *, const void *, size_t); 171da177e4SLinus Torvalds extern void *memmove(void *, const void *, size_t); 181da177e4SLinus Torvalds extern void *memset(void *, int, size_t); 191da177e4SLinus Torvalds extern int printf(const char *, ...); 201da177e4SLinus Torvalds 21*7c45ad16SPaolo 'Blaisorblade' Giarrusso /* If they're not defined, the export is included in lib/string.c.*/ 22*7c45ad16SPaolo 'Blaisorblade' Giarrusso #ifdef __HAVE_ARCH_STRLEN 231da177e4SLinus Torvalds EXPORT_SYMBOL(strlen); 24*7c45ad16SPaolo 'Blaisorblade' Giarrusso #endif 25*7c45ad16SPaolo 'Blaisorblade' Giarrusso #ifdef __HAVE_ARCH_STRSTR 26*7c45ad16SPaolo 'Blaisorblade' Giarrusso EXPORT_SYMBOL(strstr); 27*7c45ad16SPaolo 'Blaisorblade' Giarrusso #endif 28*7c45ad16SPaolo 'Blaisorblade' Giarrusso 291da177e4SLinus Torvalds EXPORT_SYMBOL(memcpy); 301da177e4SLinus Torvalds EXPORT_SYMBOL(memmove); 311da177e4SLinus Torvalds EXPORT_SYMBOL(memset); 321da177e4SLinus Torvalds EXPORT_SYMBOL(printf); 331da177e4SLinus Torvalds 341da177e4SLinus Torvalds /* Here, instead, I can provide a fake prototype. Yes, someone cares: genksyms. 351da177e4SLinus Torvalds * However, the modules will use the CRC defined *here*, no matter if it is 361da177e4SLinus Torvalds * good; so the versions of these symbols will always match 371da177e4SLinus Torvalds */ 381da177e4SLinus Torvalds #define EXPORT_SYMBOL_PROTO(sym) \ 391da177e4SLinus Torvalds int sym(void); \ 401da177e4SLinus Torvalds EXPORT_SYMBOL(sym); 411da177e4SLinus Torvalds 4274433c0fSPaolo 'Blaisorblade' Giarrusso extern void readdir64(void) __attribute__((weak)); 4374433c0fSPaolo 'Blaisorblade' Giarrusso EXPORT_SYMBOL(readdir64); 4474433c0fSPaolo 'Blaisorblade' Giarrusso extern void truncate64(void) __attribute__((weak)); 4574433c0fSPaolo 'Blaisorblade' Giarrusso EXPORT_SYMBOL(truncate64); 4674433c0fSPaolo 'Blaisorblade' Giarrusso 471da177e4SLinus Torvalds #ifdef SUBARCH_i386 481da177e4SLinus Torvalds EXPORT_SYMBOL(vsyscall_ehdr); 491da177e4SLinus Torvalds EXPORT_SYMBOL(vsyscall_end); 501da177e4SLinus Torvalds #endif 511da177e4SLinus Torvalds 521da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(__errno_location); 531da177e4SLinus Torvalds 541da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(access); 551da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(open); 561da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(open64); 571da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(close); 581da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(read); 591da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(write); 601da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(dup2); 611da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(__xstat); 621da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(__lxstat); 631da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(__lxstat64); 641da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(lseek); 651da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(lseek64); 661da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(chown); 671da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(truncate); 681da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(utime); 691da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(chmod); 701da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(rename); 711da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(__xmknod); 721da177e4SLinus Torvalds 731da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(symlink); 741da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(link); 751da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(unlink); 761da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(readlink); 771da177e4SLinus Torvalds 781da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(mkdir); 791da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(rmdir); 801da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(opendir); 811da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(readdir); 821da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(closedir); 831da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(seekdir); 841da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(telldir); 851da177e4SLinus Torvalds 861da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(ioctl); 871da177e4SLinus Torvalds 881da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(pread64); 891da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(pwrite64); 901da177e4SLinus Torvalds 911da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(statfs); 921da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(statfs64); 931da177e4SLinus Torvalds 941da177e4SLinus Torvalds EXPORT_SYMBOL_PROTO(getuid); 951da177e4SLinus Torvalds 96a2d76bd8SPaolo 'Blaisorblade' Giarrusso EXPORT_SYMBOL_PROTO(fsync); 97a2d76bd8SPaolo 'Blaisorblade' Giarrusso EXPORT_SYMBOL_PROTO(fdatasync); 98a2d76bd8SPaolo 'Blaisorblade' Giarrusso 991da177e4SLinus Torvalds /* 1001da177e4SLinus Torvalds * Overrides for Emacs so that we follow Linus's tabbing style. 1011da177e4SLinus Torvalds * Emacs will notice this stuff at the end of the file and automatically 1021da177e4SLinus Torvalds * adjust the settings for this buffer only. This must remain at the end 1031da177e4SLinus Torvalds * of the file. 1041da177e4SLinus Torvalds * --------------------------------------------------------------------------- 1051da177e4SLinus Torvalds * Local variables: 1061da177e4SLinus Torvalds * c-file-style: "linux" 1071da177e4SLinus Torvalds * End: 1081da177e4SLinus Torvalds */ 109