Index: trunk/src/formats/md2_loader.cc
===================================================================
--- trunk/src/formats/md2_loader.cc	(revision 203)
+++ trunk/src/formats/md2_loader.cc	(revision 204)
@@ -357,5 +357,5 @@
 	uint32 stats_collision  = 0;
 
-	std::vector< sint32 > index_translation( md2->header.num_vertices, -1 );
+	std::vector< sint32 > index_translation( static_cast< uint32 >( md2->header.num_vertices ), -1 );
 
 	m_new_indexes.clear();
Index: trunk/src/formats/obj_loader.cc
===================================================================
--- trunk/src/formats/obj_loader.cc	(revision 203)
+++ trunk/src/formats/obj_loader.cc	(revision 204)
@@ -130,5 +130,5 @@
 };
 
-std::size_t mesh_obj_reader::add_face( uint32* vi, uint32* ti, uint32* ni, size_t count )
+size_t mesh_obj_reader::add_face( uint32* vi, uint32* ti, uint32* ni, size_t count )
 {
 	if ( count < 3 )
@@ -181,6 +181,6 @@
 	std::vector< vec4 >& tg = m_tangent->get();
 
-	std::size_t count  = vp.size();
-	std::size_t tcount = count / 3;
+	size_t count  = vp.size();
+	size_t tcount = count / 3;
 
 	std::vector< vec3 > tan1( count );
@@ -188,9 +188,9 @@
 	tg.resize( count );
 
-	for (std::size_t a = 0; a < tcount; ++a )
-	{
-		uint32 i1 = a * 3;
-		uint32 i2 = a * 3 + 1;
-		uint32 i3 = a * 3 + 2;
+	for (size_t a = 0; a < tcount; ++a )
+	{
+		size_t i1 = a * 3;
+		size_t i2 = a * 3 + 1;
+		size_t i3 = a * 3 + 2;
 
 		// TODO: simplify
Index: trunk/src/gfx/keyframed_mesh.cc
===================================================================
--- trunk/src/gfx/keyframed_mesh.cc	(revision 203)
+++ trunk/src/gfx/keyframed_mesh.cc	(revision 204)
@@ -58,5 +58,5 @@
 }
 
-uint32 keyframed_mesh::get_max_frames() const
+size_t keyframed_mesh::get_max_frames() const
 {
 	return m_data->get_frame_count();
@@ -122,5 +122,5 @@
 void nv::keyframed_mesh::draw( render_state& rstate )
 {
-	nv::uint32 vtx_count = m_data->get_vertex_count();
+	size_t vtx_count = m_data->get_vertex_count();
 	if ( m_gpu_last_frame != m_last_frame )
 	{
Index: trunk/src/gl/gl_texture2d.cc
===================================================================
--- trunk/src/gl/gl_texture2d.cc	(revision 203)
+++ trunk/src/gl/gl_texture2d.cc	(revision 204)
@@ -44,5 +44,5 @@
 void nv::gl_texture2d::bind( size_t slot )
 {
-	glActiveTexture( GL_TEXTURE0 + slot );
+	glActiveTexture( GL_TEXTURE0 + static_cast< GLenum >( slot ) );
 	glBindTexture( GL_TEXTURE_2D, m_name.get_value() );
 }
Index: trunk/src/gui/gui_style.cc
===================================================================
--- trunk/src/gui/gui_style.cc	(revision 203)
+++ trunk/src/gui/gui_style.cc	(revision 204)
@@ -48,5 +48,5 @@
 	lua::stack_guard guard( m_lua );
 	if ( !resolve( e, entry, LUA_TNUMBER ) ) return false;
-	i = lua_tointeger( m_lua, -1 );
+	i = static_cast< int >( lua_tointeger( m_lua, -1 ) );
 	return true;
 }
Index: trunk/src/lib/gl.cc
===================================================================
--- trunk/src/lib/gl.cc	(revision 203)
+++ trunk/src/lib/gl.cc	(revision 204)
@@ -37,5 +37,5 @@
 		*(void **) (&ext_loader) = gl_library.get("wglGetProcAddress");
 #		define NV_GL_LOAD_EXT( symbol ) *(void **) (&symbol) = ext_loader(#symbol);
-#	elif NV_PLATFORM == NV_LINUX
+#	elif (NV_PLATFORM == NV_LINUX || NV_PLATFORM == NV_APPLE)
 #		define NV_GL_LOAD( symbol ) *(void **) (&symbol) = gl_library.get(#symbol);
 		*(void **) (&ext_loader) = gl_library.get("glXGetProcAddress");
Index: trunk/src/logger.cc
===================================================================
--- trunk/src/logger.cc	(revision 203)
+++ trunk/src/logger.cc	(revision 204)
@@ -229,4 +229,6 @@
 #if NV_PLATFORM == NV_WINDOWS 
 	m_handle = GetStdHandle( STD_OUTPUT_HANDLE );
+#else
+  NV_UNUSED( m_handle );
 #endif
 }
Index: trunk/src/lua/lua_area.cc
===================================================================
--- trunk/src/lua/lua_area.cc	(revision 203)
+++ trunk/src/lua/lua_area.cc	(revision 204)
@@ -194,5 +194,5 @@
 static int nlua_area_corners_closure( lua_State* L )
 {
-	int index = lua_tointeger( L, lua_upvalueindex(2) ) + 1;
+	int index = static_cast< int >( lua_tointeger( L, lua_upvalueindex(2) ) + 1 );
 	lua_pushinteger( L, index );
 	lua_replace( L, lua_upvalueindex(2) ); // update
@@ -223,5 +223,5 @@
 {
 	nv::rectangle* a = nlua_to_parea( L, 1 );
-	a->shrink( lua_tointeger( L, 2 ) );
+	a->shrink( static_cast< int >( lua_tointeger( L, 2 ) ) );
 	return 0;
 }
@@ -230,5 +230,5 @@
 {
 	nv::rectangle* a = nlua_to_parea( L, 1 );
-	nlua_push_area( L, a->shrinked( lua_tointeger( L, 2 ) ) );
+	nlua_push_area( L, a->shrinked( static_cast< int >( lua_tointeger( L, 2 ) ) ) );
 	return 1;
 }
@@ -237,5 +237,5 @@
 {
 	nv::rectangle* a = nlua_to_parea( L, 1 );
-	a->expand( lua_tointeger( L, 2 ) );
+	a->expand( static_cast< int >( lua_tointeger( L, 2 ) ) );
 	return 0;
 }
@@ -244,5 +244,5 @@
 {
 	nv::rectangle* a = nlua_to_parea( L, 1 );
-	nlua_push_area( L, a->expanded( lua_tointeger( L, 2 ) ) );
+	nlua_push_area( L, a->expanded( static_cast< int >( lua_tointeger( L, 2 ) ) ) );
 	return 1;
 }
@@ -327,5 +327,5 @@
 {
 	nv::ivec2 c = nlua_to_coord( L, 1 );
-	int amount = lua_tointeger( L, 1 );
+	int amount = static_cast< int >( lua_tointeger( L, 1 ) );
 	nv::ivec2 shift( amount, amount );
 	nlua_push_area( L, nv::rectangle( c - shift, c + shift ) );
Index: trunk/src/lua/lua_aux.cc
===================================================================
--- trunk/src/lua/lua_aux.cc	(revision 203)
+++ trunk/src/lua/lua_aux.cc	(revision 204)
@@ -91,6 +91,6 @@
 static int nluaaux_math_dieroll( lua_State* L )
 {
-	int dice  = luaL_checkinteger( L,  1 );
-	int sides = luaL_checkinteger( L,  2 );
+	lua_Integer dice  = luaL_checkinteger( L,  1 );
+	lua_Integer sides = luaL_checkinteger( L,  2 );
 	if ( dice < 1 )  luaL_argerror( L, 1, "die count lower than 1!" );
 	if ( sides < 1 ) luaL_argerror( L, 2, "side count lower than 1!" );
@@ -109,5 +109,5 @@
 		if ( lua_gettop( L ) == 1 )
 		{
-			int arg1 = luaL_checkinteger( L, 1 );
+			lua_Integer arg1 = luaL_checkinteger( L, 1 );
 			if ( arg1 < 1 ) arg1 = 1;
 			lua_pushunsigned( L, nv::random::get().urange( 1, static_cast<nv::uint32>( arg1 ) ) );
@@ -115,6 +115,6 @@
 		else
 		{
-			int arg1 = luaL_checkinteger( L, 1 );
-			int arg2 = luaL_checkinteger( L, 2 );
+			int arg1 = static_cast< int >( luaL_checkinteger( L, 1 ) );
+			int arg2 = static_cast< int >( luaL_checkinteger( L, 2 ) );
 			if (arg2 < arg1) std::swap( arg2, arg1 );
 			lua_pushinteger( L, nv::random::get().srange( arg1, arg2 ) );
Index: trunk/src/lua/lua_path.cc
===================================================================
--- trunk/src/lua/lua_path.cc	(revision 203)
+++ trunk/src/lua/lua_path.cc	(revision 204)
@@ -44,5 +44,5 @@
 }
 
-void lua::path::push( uint32 e )
+void lua::path::push( size_t e )
 {
 	m_elements[ m_count ].value  = e;
@@ -51,5 +51,5 @@
 }
 
-void lua::path::push( uint32 start, uint32 length )
+void lua::path::push( size_t start, size_t length )
 {
 	m_elements[ m_count ].value  = start;
@@ -58,5 +58,5 @@
 }
 
-void lua::path::push( const char* p, uint32 length )
+void lua::path::push( const char* p, size_t length )
 {
 	m_elements[ m_count ].value  = m_path.length();
@@ -66,5 +66,5 @@
 }
 
-void lua::path::push( const std::string& s, uint32 length )
+void lua::path::push( const std::string& s, size_t length )
 {
 	m_elements[ m_count ].value  = m_path.length();
Index: trunk/src/lua/lua_state.cc
===================================================================
--- trunk/src/lua/lua_state.cc	(revision 203)
+++ trunk/src/lua/lua_state.cc	(revision 204)
@@ -249,7 +249,7 @@
 {
 	lua_getfield( L->L, -1, element.c_str() );
-	int result = lua_type( L->L, -1 ) == LUA_TNUMBER ? lua_tointeger( L->L, -1 ) : defval;
-	lua_pop( L->L, 1 );
-	return result;
+	lua_Integer result = lua_type( L->L, -1 ) == LUA_TNUMBER ? lua_tointeger( L->L, -1 ) : defval;
+	lua_pop( L->L, 1 );
+	return static_cast< int >( result );
 }
 
