Dan Albert | 2ef012e | 2014-04-08 12:03:21 -0700 | [diff] [blame] | 1 | // -*- C++ -*- |
| 2 | //===----------------------------- stubs.cpp ------------------------------===// |
| 3 | // |
| 4 | // The LLVM Compiler Infrastructure |
| 5 | // |
| 6 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 7 | // Source Licenses. See LICENSE.TXT for details. |
| 8 | // |
| 9 | //===----------------------------------------------------------------------===// |
| 10 | |
| 11 | #ifdef __ANDROID__ |
| 12 | |
| 13 | #ifdef __cplusplus |
| 14 | extern "C" { |
| 15 | #endif |
| 16 | |
| 17 | #include <errno.h> |
| 18 | #include <wchar.h> |
| 19 | |
| 20 | #include <support/android/nl_types.h> |
| 21 | |
| 22 | static void unimplemented_stub(const char* function) { |
| 23 | const char* fmt = "%s(3) is not implemented on Android\n"; |
| 24 | fprintf(stderr, fmt, function); |
| 25 | } |
| 26 | |
| 27 | #define UNIMPLEMENTED unimplemented_stub(__PRETTY_FUNCTION__) |
| 28 | |
Dan Albert | 2ef012e | 2014-04-08 12:03:21 -0700 | [diff] [blame] | 29 | nl_catd catopen(const char *, int) |
| 30 | { |
| 31 | UNIMPLEMENTED; |
| 32 | return (nl_catd)-1; |
| 33 | } |
| 34 | |
| 35 | int catclose(nl_catd) |
| 36 | { |
| 37 | UNIMPLEMENTED; |
| 38 | return -1; |
| 39 | } |
| 40 | |
| 41 | char *catgets(nl_catd, int, int, const char *message) |
| 42 | { |
| 43 | UNIMPLEMENTED; |
| 44 | return (char *)message; |
| 45 | } |
| 46 | |
| 47 | #ifdef __cplusplus |
| 48 | } |
| 49 | #endif |
| 50 | |
| 51 | #endif // __ANDROID__ |