[WSD] Fix startup issues in free builds where _DllMain was getting inlined,
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 27 Sep 2005 00:42:13 +0000 (00:42 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 27 Sep 2005 00:42:13 +0000 (00:42 +0000)
causing the stack overflow detection to incorrectly fire.

Signed-off-by: Fab Tillier (ftillier@silverstorm.com)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@94 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/wsd/user/ibspdll.c

index 6209647..d0fd7a5 100644 (file)
@@ -55,6 +55,7 @@ uint32_t              g_max_inline = 0xFFFFFFFF;
  *  Description:\r
  *    Provides initialization when the ibspdll DLL is loaded. \r
  */\r
+#pragma auto_inline( off )\r
 static BOOL\r
 _DllMain(\r
        IN                              HINSTANCE                                       hinstDll,\r
@@ -93,7 +94,7 @@ _DllMain(
                IBSP_TRACE( IBSP_DBG_DLL, ("DllMain: DLL_PROCESS_ATTACH\n") );\r
 \r
 #ifdef _DEBUG_\r
-               i = GetEnvironmentVariable( "IBWSD_DBG", env_var, 16 );\r
+               i = GetEnvironmentVariable( "IBWSD_DBG", env_var, sizeof(env_var) );\r
                if( i && i <= 16 )\r
                {\r
                        gdbg_lvl = _tcstoul( env_var, NULL, 16 );\r
@@ -106,7 +107,7 @@ _DllMain(
                /* See if the user wants to disable RDMA reads. */\r
                no_read = GetEnvironmentVariable( "IBWSD_NO_READ", NULL, 0 );\r
 \r
-               i = GetEnvironmentVariable( "IBWSD_INLINE", env_var, 16 );\r
+               i = GetEnvironmentVariable( "IBWSD_INLINE", env_var, sizeof(env_var) );\r
                if( i && i <= 16 )\r
                        g_max_inline = _tcstoul( env_var, NULL, 10 );\r
 \r
@@ -183,6 +184,7 @@ _DllMain(
 \r
        return TRUE;\r
 }\r
+#pragma auto_inline( off )\r
 \r
 \r
 extern BOOL APIENTRY\r