This is the mail archive of the cygwin-apps-cvs mailing list for the cygwin-apps project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[login - The unix login(1), tweaked for Cygwin] branch master, updated. 20f203f01d2797f6d463076807078eec0220a559




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/login.git;h=20f203f01d2797f6d463076807078eec0220a559

commit 20f203f01d2797f6d463076807078eec0220a559
Author: Yaakov Selkowitz <yselkowi@redhat.com>
Date:   Thu Dec 21 20:33:45 2017 -0600

    Add meson build infrastructure

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/login.git;h=9055b2bd45ea1e9055b345664dc5424e4f6f1d3c

commit 9055b2bd45ea1e9055b345664dc5424e4f6f1d3c
Author: Yaakov Selkowitz <yselkowi@redhat.com>
Date:   Thu Dec 21 20:31:19 2017 -0600

    Fix implicit declarations
    
    test_winsec.c:53:10: warning: implicit declaration of function â??isprintâ??
    winpriv.c:189:9: warning: implicit declaration of function â??stricmpâ??


Diff:
---
 meson.build   |   22 ++++++++++++++++++++++
 test_winsec.c |    1 +
 winpriv.c     |    2 +-
 3 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..d10004f
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,22 @@
+project('login', 'c',
+        version: '1.11')
+
+cc = meson.get_compiler('c')
+netapi32 = cc.find_library('netapi32')
+
+login_srcs = files('login.c', 'winpriv.c', 'winsec.c')
+login = executable('login', login_srcs,
+                   dependencies: netapi32,
+                   install: true)
+
+lastlog_srcs = files('lastlog.c')
+lastlog = executable('lastlog', lastlog_srcs,
+                     install: true)
+
+mans = files('login.1', 'lastlog.8')
+install_man(mans)
+
+test_winsec_srcs = files('test_winsec.c', 'winsec.c')
+test_winsec = executable('test_winsec', test_winsec_srcs,
+                         dependencies: netapi32)
+test('winsec', test_winsec)
diff --git a/test_winsec.c b/test_winsec.c
index 1e1f895..b6ace0a 100644
--- a/test_winsec.c
+++ b/test_winsec.c
@@ -3,6 +3,7 @@
 #include <syslog.h>
 #include <getopt.h>
 #include <errno.h>
+#include <ctype.h>
 
 extern int currentUserIsLocalSystem ();
 extern int currentUserIsMemberOfLocalAdministrators ();
diff --git a/winpriv.c b/winpriv.c
index a2aa904..8d9237e 100644
--- a/winpriv.c
+++ b/winpriv.c
@@ -186,7 +186,7 @@ testUserRights (LSA_HANDLE hLSA, const char *strUser,
       rightname[wcsrtombs (rightname, &src, len, &mbst)] = '\0';
       for (d = 0; d < intRightsToTestCount; d++)
 	{
-	  if (!stricmp (rightname, strRightsToTest[d]))
+	  if (!strcasecmp (rightname, strRightsToTest[d]))
 	    intMatched++;
 	}
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]