]> git.sur5r.net Git - openldap/commitdiff
Moved GetLastErrorString to ntservice.c. I missed it before, thought it
authorHoward Chu <hyc@openldap.org>
Fri, 12 May 2000 23:53:14 +0000 (23:53 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 12 May 2000 23:53:14 +0000 (23:53 +0000)
was unused but it's needed in ntservice.c

libraries/liblber/nt_err.c
libraries/liblutil/ntservice.c

index 78f5aa0cfb64aab45adc5b5380969efe15684fdf..ebcb3bb5f8425df7c683c35d2c8cfb0e3c06cb0f 100644 (file)
@@ -83,30 +83,3 @@ char *ber_pvt_wsa_err2string( int err )
 }
 
 #undef __RETSTR
-
-#if 0  /* No one seems to be using these */
-char *ber_pvt_wsa_last_errstring( void )
-{
-       return ber_pvt_wsa_err2string( WSAGetLastError() );
-}
-
-#include <windows.h>
-
-char *GetErrorString( int err )
-{
-       static char msgBuf[1024];
-
-       FormatMessage(
-               FORMAT_MESSAGE_FROM_SYSTEM,
-               NULL,
-               err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-               msgBuf, 1024, NULL );
-
-       return msgBuf;
-}
-
-char *GetLastErrorString( void )
-{
-       return GetErrorString( GetLastError() );
-}
-#endif
index ce036b4944e110bd6cffb25ab52b47c1ae0cee31..73acdd37544d06a9e3eac216a942b795208a5378 100644 (file)
@@ -43,7 +43,6 @@ ldap_pvt_thread_t             start_status_tid,       stop_status_tid;
 
 void (*stopfunc)(int);
 
-/* in nt_err.c */
 char *GetLastErrorString( void );
 
 int srv_install(LPCTSTR lpszServiceName, LPCTSTR lpszDisplayName,
@@ -429,4 +428,21 @@ void ReportSlapdShutdownComplete(  )
        }
 }
 
+char *GetErrorString( int err )
+{
+       static char msgBuf[1024];
+
+       FormatMessage(
+               FORMAT_MESSAGE_FROM_SYSTEM,
+               NULL,
+               err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+               msgBuf, 1024, NULL );
+
+       return msgBuf;
+}
+
+char *GetLastErrorString( void )
+{
+       return GetErrorString( GetLastError() );
+}
 #endif