소스 검색

LibC: Define SIZE_MAX

According to the internet, this is a safe way to define SIZE_MAX. There
may be a better way to do it, but this worked for me.
Conrad Pankoff 6 년 전
부모
커밋
c0ba6f69f0
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      Libraries/LibC/stdint.h

+ 2 - 0
Libraries/LibC/stdint.h

@@ -104,4 +104,6 @@ typedef __INTMAX_TYPE__ intmax_t;
 #define INT64_C(x) x##LL
 #define UINT64_C(x) x##ULL
 
+#define SIZE_MAX ((size_t)-1)
+
 __END_DECLS