From d6e05ecbd78012f78ff90873ee8f8a7aceeebc65 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 11 Nov 1998 05:50:51 +0000 Subject: [PATCH] Update NT4 port. --- clients/tools/ldapdelete.dsp | 4 +- clients/tools/ldapmodify.dsp | 4 +- clients/tools/ldapmodrdn.dsp | 4 +- clients/tools/ldapsearch.dsp | 8 +-- include/ldap.h | 3 +- include/ldap_cdefs.h | 3 +- libraries/liblber/liblber.dsp | 12 ++--- libraries/libldap/apitest.c | 1 + libraries/libldap/apitest.dsp | 89 +++++++++++++++++++++++++++++++++ libraries/libldap/apitest.dsw | 44 ++++++++++++++++ libraries/libldap/init.c | 32 ++++++++---- libraries/libldap/libldap.dsp | 12 ++--- libraries/libldap/sort.c | 4 +- libraries/libldif/libldif.dsp | 14 +++--- libraries/liblutil/getopt.c | 4 +- libraries/liblutil/liblutil.dsp | 16 +++--- 16 files changed, 202 insertions(+), 52 deletions(-) create mode 100644 libraries/libldap/apitest.dsp create mode 100644 libraries/libldap/apitest.dsw diff --git a/clients/tools/ldapdelete.dsp b/clients/tools/ldapdelete.dsp index 2cdee1025d..395ec029fe 100644 --- a/clients/tools/ldapdelete.dsp +++ b/clients/tools/ldapdelete.dsp @@ -51,7 +51,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libldap.lib liblber.lib liblutil.lib ws2_32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 oldap32.lib olber32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "ldapdelete - Win32 Debug" @@ -75,7 +75,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libldap.lib liblber.lib liblutil.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" +# ADD LINK32 oldap32.lib olber32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" !ENDIF diff --git a/clients/tools/ldapmodify.dsp b/clients/tools/ldapmodify.dsp index e50f69b266..a34cb9ccac 100644 --- a/clients/tools/ldapmodify.dsp +++ b/clients/tools/ldapmodify.dsp @@ -51,7 +51,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libldap.lib liblber.lib libldif.lib liblutil.lib ws2_32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "ldapmodify - Win32 Debug" @@ -75,7 +75,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libldap.lib liblber.lib libldif.lib liblutil.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" +# ADD LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" !ENDIF diff --git a/clients/tools/ldapmodrdn.dsp b/clients/tools/ldapmodrdn.dsp index 013f8b682a..d5e6bfdd7b 100644 --- a/clients/tools/ldapmodrdn.dsp +++ b/clients/tools/ldapmodrdn.dsp @@ -51,7 +51,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libldap.lib liblber.lib liblutil.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\libraries\Release" +# ADD LINK32 oldap32.lib olber32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\libraries\Release" !ELSEIF "$(CFG)" == "ldapmodrdn - Win32 Debug" @@ -75,7 +75,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libldap.lib liblber.lib liblutil.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" +# ADD LINK32 oldap32.lib olber32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" !ENDIF diff --git a/clients/tools/ldapsearch.dsp b/clients/tools/ldapsearch.dsp index 4150735c8b..be396ce5e8 100644 --- a/clients/tools/ldapsearch.dsp +++ b/clients/tools/ldapsearch.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /Ze /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -51,7 +51,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libldap.lib liblber.lib liblutil.lib ws2_32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "ldapsearch - Win32 Debug" @@ -67,7 +67,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /Ze /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe @@ -75,7 +75,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libldap.lib liblber.lib libldif.lib liblutil.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" +# ADD LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" !ENDIF diff --git a/include/ldap.h b/include/ldap.h index a5c32e3318..0dc8a50abc 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -692,7 +692,8 @@ LDAP_F void cldap_setretryinfo LDAP_P(( LDAP *ld, int tries, int timeout )); * in sort.c */ LDAP_F int ldap_sort_entries LDAP_P(( LDAP *ld, - LDAPMessage **chain, char *attr, int (*cmp) () )); + LDAPMessage **chain, char *attr, + int (*cmp) LDAP_P((const char *, const char *)) )); LDAP_F int ldap_sort_values LDAP_P(( LDAP *ld, char **vals, int (*cmp) LDAP_P((const void *, const void *)) )); LDAP_F int ldap_sort_strcasecmp LDAP_P(( char **a, char **b )); diff --git a/include/ldap_cdefs.h b/include/ldap_cdefs.h index 2f7ed6e987..000df8830d 100644 --- a/include/ldap_cdefs.h +++ b/include/ldap_cdefs.h @@ -11,7 +11,8 @@ # define LDAP_END_DECL #endif -#if defined(__STDC__) || defined(__cplusplus) +#if defined(__STDC__) || defined(__cplusplus) || \ + (defined(_WIN32) && !defined(NOPROTOTYPES)) /* ANSI C or C++ */ # define LDAP_P(protos) protos # define LDAP_CONCAT1(x,y) x ## y diff --git a/libraries/liblber/liblber.dsp b/libraries/liblber/liblber.dsp index f307c0d8ca..8d1d0bcac1 100644 --- a/libraries/liblber/liblber.dsp +++ b/libraries/liblber/liblber.dsp @@ -35,17 +35,17 @@ CPP=cl.exe # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" +# PROP Output_Dir "..\Release" +# PROP Intermediate_Dir "Release\liblber" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /Ze /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo +# ADD LIB32 /nologo /out:"..\Release\olber32.lib" !ELSEIF "$(CFG)" == "liblber - Win32 Debug" @@ -60,13 +60,13 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Debug\liblber" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /Ze /W3 /GX /Z7 /Od /I "..\..\include" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo +# ADD LIB32 /nologo /out:"..\Debug\olber32.lib" !ENDIF diff --git a/libraries/libldap/apitest.c b/libraries/libldap/apitest.c index 343082d29d..0364b1e378 100644 --- a/libraries/libldap/apitest.c +++ b/libraries/libldap/apitest.c @@ -8,6 +8,7 @@ #include "portable.h" #include +#include #include #include "lber.h" diff --git a/libraries/libldap/apitest.dsp b/libraries/libldap/apitest.dsp new file mode 100644 index 0000000000..2063dd87cb --- /dev/null +++ b/libraries/libldap/apitest.dsp @@ -0,0 +1,89 @@ +# Microsoft Developer Studio Project File - Name="apitest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=apitest - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "apitest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "apitest.mak" CFG="apitest - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apitest - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "apitest - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "apitest - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\Release" +# PROP Intermediate_Dir "Release\apitest" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 oldap32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "apitest - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "apitest_" +# PROP BASE Intermediate_Dir "apitest_" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\Debug" +# PROP Intermediate_Dir "Debug\apitest" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 oldap32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug" + +!ENDIF + +# Begin Target + +# Name "apitest - Win32 Release" +# Name "apitest - Win32 Debug" +# Begin Source File + +SOURCE=.\apitest.c +# End Source File +# End Target +# End Project diff --git a/libraries/libldap/apitest.dsw b/libraries/libldap/apitest.dsw new file mode 100644 index 0000000000..49079d3c40 --- /dev/null +++ b/libraries/libldap/apitest.dsw @@ -0,0 +1,44 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "apitest"=.\apitest.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libldap + End Project Dependency +}}} + +############################################################################### + +Project: "libldap"=.\libldap.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c index da6ed406ce..603e510ba3 100644 --- a/libraries/libldap/init.c +++ b/libraries/libldap/init.c @@ -65,7 +65,6 @@ struct ol_attribute { static void openldap_ldap_init_w_conf(const char *file) { - char buf[MAX_LDAP_ATTR_LEN]; char linebuf[128]; FILE *fp; int i; @@ -166,22 +165,33 @@ static void openldap_ldap_init_w_conf(const char *file) static void openldap_ldap_init_w_userconf(const char *file) { char *home = getenv("HOME"); - char *path = malloc(strlen(home) + strlen(file) + 3); + char *path; + + if (home != NULL) { + path = malloc(strlen(home) + strlen(file) + 3); + } else { + path = malloc(strlen(file) + 3); + } + - /* try ~/file */ - sprintf(path, "%s/%s", home, file); - openldap_ldap_init_w_conf(path); + if(home != NULL && path != NULL) { + /* try ~/file */ + sprintf(path, "%s/%s", home, file); + openldap_ldap_init_w_conf(path); - /* try ~/.file */ - sprintf(path, "%s/.%s", home, file); - openldap_ldap_init_w_conf(path); + /* try ~/.file */ + sprintf(path, "%s/.%s", home, file); + openldap_ldap_init_w_conf(path); + } /* try file */ openldap_ldap_init_w_conf(file); - /* try .file */ - sprintf(path, "%s/.%s", home, file); - openldap_ldap_init_w_conf(path); + if(path == NULL) { + /* try .file */ + sprintf(path, ".%s", file); + openldap_ldap_init_w_conf(path); + } } static void openldap_ldap_init_w_env(const char *prefix) diff --git a/libraries/libldap/libldap.dsp b/libraries/libldap/libldap.dsp index b6842cbd31..9f4c754384 100644 --- a/libraries/libldap/libldap.dsp +++ b/libraries/libldap/libldap.dsp @@ -35,17 +35,17 @@ CPP=cl.exe # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" +# PROP Output_Dir "..\Release" +# PROP Intermediate_Dir "Release\libldap" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /Ze /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo +# ADD LIB32 /nologo /out:"..\Release\oldap32.lib" !ELSEIF "$(CFG)" == "libldap - Win32 Debug" @@ -60,13 +60,13 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Debug\libldap" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /Ze /W3 /GX /Z7 /Od /I "..\..\include" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo +# ADD LIB32 /nologo /out:"..\Debug\oldap32.lib" !ENDIF diff --git a/libraries/libldap/sort.c b/libraries/libldap/sort.c index 7e7eb17447..7771b4b7c0 100644 --- a/libraries/libldap/sort.c +++ b/libraries/libldap/sort.c @@ -21,8 +21,8 @@ #include #include -#include "ldap-int.h" +#include "ldap-int.h" struct entrything { char **et_vals; @@ -78,7 +78,7 @@ ldap_sort_entries( LDAP *ld, LDAPMessage **chain, char *attr, /* NULL => sort by DN */ - int (*cmp) LDAP_P((char *, char *)) + int (*cmp) LDAP_P((const char *, const char *)) ) { int i, count; diff --git a/libraries/libldif/libldif.dsp b/libraries/libldif/libldif.dsp index ebf42f22fc..9eb0fe012f 100644 --- a/libraries/libldif/libldif.dsp +++ b/libraries/libldif/libldif.dsp @@ -35,11 +35,11 @@ CPP=cl.exe # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" +# PROP Output_Dir "..\Release" +# PROP Intermediate_Dir "Release\libldif" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /Ze /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo @@ -56,17 +56,17 @@ LIB32=link.exe -lib # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" +# PROP Output_Dir "..\Debug" +# PROP Intermediate_Dir "Debug\libldif" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /Ze /W3 /GX /Z7 /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\Debug\libldif.lib" +# ADD LIB32 /nologo /out:"..\Debug\oldif32.lib" !ENDIF diff --git a/libraries/liblutil/getopt.c b/libraries/liblutil/getopt.c index d1d1345a64..c69bd17aa1 100644 --- a/libraries/liblutil/getopt.c +++ b/libraries/liblutil/getopt.c @@ -27,7 +27,7 @@ int optind = 1; int optopt; char * optarg; -static void ERR (char ** argv, char * s, char c) +static void ERR (char * const argv[], const char * s, char c) { char errbuf[2]; @@ -44,7 +44,7 @@ printf("DF_TRACE_DEBUG: static void ERR () in getopt.c\n"); } } -int getopt (int argc, char ** argv, char * opts) +int getopt (int argc, char * const argv [], const char * opts) { static int sp = 1, error = (int) '?'; static char sw = '-', eos = '\0', arg = ':'; diff --git a/libraries/liblutil/liblutil.dsp b/libraries/liblutil/liblutil.dsp index 0e5186ac99..7188ca00dc 100644 --- a/libraries/liblutil/liblutil.dsp +++ b/libraries/liblutil/liblutil.dsp @@ -35,11 +35,11 @@ CPP=cl.exe # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" +# PROP Output_Dir "..\Release" +# PROP Intermediate_Dir "Release\liblutil" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /Ze /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo @@ -57,16 +57,16 @@ LIB32=link.exe -lib # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\Debug" -# PROP Intermediate_Dir "Debug" +# PROP Intermediate_Dir "Debug\liblutil" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /Ze /W3 /GX /Z7 /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo +# ADD LIB32 /nologo /out:"..\Debug\olutil32.lib" !ENDIF @@ -80,6 +80,10 @@ SOURCE=.\base64.c # End Source File # Begin Source File +SOURCE="..\..\include\getopt-compat.h" +# End Source File +# Begin Source File + SOURCE=.\getopt.c # End Source File # Begin Source File -- 2.39.5