plugins support requires a Windows equivalent to opendir and friends
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 9 May 2006 21:03:07 +0000 (21:03 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 9 May 2006 21:03:07 +0000 (21:03 +0000)
This patch simply allows krb5 to build once again on Windows.
Windows does not have opendir() and friends.   Instead Win32 API
functions must be used as described in

 http://msdn.microsoft.com/library/en-us/dnucmg/html/UCMGch09.asp

ticket: new
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17992 dc483132-0cff-0310-8789-dd5450dbe970

src/util/support/plugins.c

index 1c6c5338dec7b0c2336f0151e2af245d8529d517..0945d3995ffb1e99ba6dacd309f02494b9011eb1 100644 (file)
@@ -449,7 +449,8 @@ krb5int_open_plugin_dirs (const char * const *dirnames,
             }
         } else {
             /* load all plugins in each directory */
-            DIR *dir = NULL;
+#ifndef _WIN32
+           DIR *dir = NULL;
             
             if (!err) {
                 dir = opendir(dirnames[i]);
@@ -495,6 +496,10 @@ krb5int_open_plugin_dirs (const char * const *dirnames,
             
             if (dir != NULL) { closedir (dir); }
         }
+#else
+       /* Until a Windows implementation of this code is implemented */
+       err = ENOENT;
+#endif /* _WIN32 */
     }
         
     if (err == ENOENT) {