[Commits] f39b9e0: MDEV-7526: TokuDB doesn't build on OS X

Vicentiu Ciorbaru vicentiu at mariadb.org
Sat Dec 19 14:17:37 EET 2015


revision-id: f39b9e04db1e71e72bfc19174f257db5147df440 (mariadb-5.5.47-9-gf39b9e0)
parent(s): 64149590c47d1cf6b1b227d8c90bdc23d20a8956
author: Vicențiu Ciorbaru
committer: Vicențiu Ciorbaru
timestamp: 2015-12-19 14:14:16 +0200
message:

MDEV-7526: TokuDB doesn't build on OS X

Removed unused functions from tokudb_dump.cc.

---
 storage/tokudb/ft-index/tools/tokudb_dump.cc | 70 ----------------------------
 1 file changed, 70 deletions(-)

diff --git a/storage/tokudb/ft-index/tools/tokudb_dump.cc b/storage/tokudb/ft-index/tools/tokudb_dump.cc
index 2da50bb..b162c5c 100644
--- a/storage/tokudb/ft-index/tools/tokudb_dump.cc
+++ b/storage/tokudb/ft-index/tools/tokudb_dump.cc
@@ -248,76 +248,6 @@ outputplaintextstring(char* str)
 }
 
 static inline int
-hextoint(int ch)
-{
-   if (ch >= '0' && ch <= '9') {
-      return ch - '0';
-   }
-   if (ch >= 'a' && ch <= 'z') {
-      return ch - 'a' + 10;
-   }
-   if (ch >= 'A' && ch <= 'Z') {
-      return ch - 'A' + 10;
-   }
-   return EOF;
-}
-
-static inline int
-printabletocstring(char* inputstr, char** poutputstr)
-{
-   char highch;
-   char lowch;
-   char nextch;
-   char* cstring;
-
-   assert(inputstr);
-   assert(poutputstr);
-   assert(*poutputstr == NULL);
-
-   cstring = (char*)toku_malloc((strlen(inputstr) + 1) * sizeof(char));
-   if (cstring == NULL) {
-      PRINT_ERROR(errno, "printabletocstring");
-      goto error;
-   }
-
-   for (*poutputstr = cstring; *inputstr != '\0'; inputstr++) {
-      if (*inputstr == '\\') {
-         if ((highch = *++inputstr) == '\\') {
-            *cstring++ = '\\';
-            continue;
-         }
-         if (highch == '\0' || (lowch = *++inputstr) == '\0') {
-            PRINT_ERROR(0, "unexpected end of input data or key/data pair");
-            goto error;
-         }
-         if (!isxdigit(highch)) {
-            PRINT_ERROR(0, "Unexpected '%c' (non-hex) input.\n", highch);
-            goto error;
-         }
-         if (!isxdigit(lowch)) {
-            PRINT_ERROR(0, "Unexpected '%c' (non-hex) input.\n", lowch);
-            goto error;
-         }
-         nextch = (char)((hextoint(highch) << 4) | hextoint(lowch));
-         if (nextch == '\0') {
-            /* Database names are c strings, and cannot have extra NULL terminators. */
-            PRINT_ERROR(0, "Unexpected '\\00' in input.\n");
-            goto error;
-         }
-         *cstring++ = nextch;
-      }
-      else *cstring++ = *inputstr;
-   }
-   /* Terminate the string. */
-   *cstring = '\0';
-   return EXIT_SUCCESS;
-
-error:
-   PRINT_ERROR(0, "Quitting out due to errors.\n");
-   return EXIT_FAILURE;
-}
-
-static inline int
 verify_library_version(void)
 {
    int major;


More information about the commits mailing list