Przeglądaj źródła

BCB11 has strtoumax

Source commit: 8f39df83ecbe435ec1c30cda1bedf1ccbe0eb773
Martin Prikryl 7 miesięcy temu
rodzic
commit
23f7ce72d8
3 zmienionych plików z 1 dodań i 12 usunięć
  1. 0 10
      source/core/PuttyIntf.cpp
  2. 1 0
      source/putty/defs.h
  3. 0 2
      source/putty/windows/platform.h

+ 0 - 10
source/core/PuttyIntf.cpp

@@ -338,16 +338,6 @@ size_t banner(Seat * seat, const void * data, size_t len)
   return 0; // PuTTY never uses the value
 }
 //---------------------------------------------------------------------------
-uintmax_t strtoumax(const char *nptr, char **endptr, int base)
-{
-  if (DebugAlwaysFalse(endptr != NULL) ||
-      DebugAlwaysFalse(base != 10))
-  {
-    Abort();
-  }
-  return StrToInt64(UnicodeString(AnsiString(nptr)));
-}
-//---------------------------------------------------------------------------
 static void SSHFatalError(const char * Format, va_list Param)
 {
   char Buf[200];

+ 1 - 0
source/putty/defs.h

@@ -17,6 +17,7 @@
 #define HAVE_CMAKE_H 0
 #define HAVE_NO_STDINT_H 0
 #define HAVE_ARM_DIT 0
+#define HAVE_STRTOUMAX 1
 #endif
 
 #ifndef WINSCP

+ 0 - 2
source/putty/windows/platform.h

@@ -136,13 +136,11 @@ struct FontSpec *fontspec_new(
 #define LONG_PTR LONG
 #endif
 
-#ifndef WINSCP
 #if !HAVE_STRTOUMAX
 /* Work around lack of strtoumax in older MSVC libraries */
 static inline uintmax_t strtoumax(const char *nptr, char **endptr, int base)
 { return _strtoui64(nptr, endptr, base); }
 #endif
-#endif
 
 typedef INT_PTR (*ShinyDlgProc)(HWND hwnd, UINT msg, WPARAM wParam,
                                 LPARAM lParam, void *ctx);