--- include/istream
+++ include/istream
@@ -592,6 +592,25 @@
 #endif
 	
 
+#ifndef __STRICT_ANSI__
+
+//Support for input of long long data types
+
+template <class Ch, class Tr> _UCXXEXPORT basic_istream<Ch,Tr>&
+operator>>(basic_istream<Ch, Tr>& is, signed long long int& n) {
+	typename basic_istream<Ch, Tr>::sentry s(is);
+	__istream_readin<Tr, Ch, signed long long int>::readin(is, n);
+	return is;
+}
+
+template <class Ch, class Tr> _UCXXEXPORT basic_istream<Ch,Tr>&
+operator>>(basic_istream<Ch, Tr>& is, unsigned long long int& n) {
+	typename basic_istream<Ch, Tr>::sentry s(is);
+	__istream_readin<Tr, Ch, unsigned long long int>::readin(is, n);
+	return is;
+}
+
+#endif // __STRICT_ANSI__
 
 }
 
--- include/istream_helpers
+++ include/istream_helpers
@@ -275,6 +275,58 @@
 		}
 	};
 
+#ifndef __STRICT_ANSI__
+	template <class traits> class _UCXXEXPORT __istream_readin<traits, char, long long int>{
+	public:
+		inline static void readin(basic_istream<char, traits >& stream, long long int & var)
+		{
+			basic_string<char, traits > temp;
+			if(stream.flags() & ios_base::dec){
+				temp = _readTokenDecimal( stream);
+				sscanf(temp.c_str(), "%lld", &var );
+			}else{
+				temp = _readToken( stream);
+				if( stream.flags() & ios_base::oct){
+					sscanf(temp.c_str(), "%llo", (unsigned long long int *)(&var) );
+				}else if(stream.flags() & ios_base::hex){
+					if(stream.flags() & ios_base::uppercase){
+						sscanf(temp.c_str(), "%llX", (unsigned long long int *)(&var) );
+					}else{
+						sscanf(temp.c_str(), "%llx", (unsigned long long int *)(&var) );
+					}
+				}else{
+					sscanf(temp.c_str(), "%lli", &var );
+				}
+			}
+		}
+	};
+
+	template <class traits> class _UCXXEXPORT __istream_readin<traits, char, unsigned long long int>{
+	public:
+		inline static void readin(basic_istream<char, traits >& stream, unsigned long long int & var)
+		{
+			basic_string<char, traits > temp;
+			if(stream.flags() & ios_base::dec){
+				temp = _readTokenDecimal( stream);
+				sscanf(temp.c_str(), "%llu", &var );
+			}else{
+				temp = _readToken( stream);
+				if( stream.flags() & ios_base::oct){
+					sscanf(temp.c_str(), "%llo", &var );
+				}else if(stream.flags() & ios_base::hex){
+					if(stream.flags() & ios_base::uppercase){
+						sscanf(temp.c_str(), "%llX", &var );
+					}else{
+						sscanf(temp.c_str(), "%llx", &var);
+					}
+				}else{
+					sscanf(temp.c_str(), "%lli", (long long int *)(&var) );
+				}
+			}
+		}
+	};
+#endif // __STRICT_ANSI__
+
 
 #ifdef __UCLIBCXX_HAS_FLOATS__
 
