* assert.cc (__assert): Reduce dependency on newlib.
* exec.cc: Eliminate unnecessary inclusion of ctype.h.
* glob.c: Ditto.
* hinfo.cc: Ditto.
* init.cc: Ditto.
* strace.cc: Ditto.
* tty.cc: Ditto.
* grp.cc (parse_grp): Eliminate atoi.
* passwd.cc (grab_int): Ditto.
* grp.cc (getgroups): Eliminate str{n,}casecmp.
* path.cc (get_raw_device_number): Ditto.
* path.cc (sort_by_native_name): Ditto.
* spawn.cc (iscmd): Ditto.
* uinfo.cc (internal_getlogin): Ditto.
+2000-06-28 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
+
+ * assert.cc (__assert): Reduce dependency on newlib.
+ * exec.cc: Eliminate unnecessary inclusion of ctype.h.
+ * glob.c: Ditto.
+ * hinfo.cc: Ditto.
+ * init.cc: Ditto.
+ * strace.cc: Ditto.
+ * tty.cc: Ditto.
+ * grp.cc (parse_grp): Eliminate atoi.
+ * passwd.cc (grab_int): Ditto.
+ * grp.cc (getgroups): Eliminate str{n,}casecmp.
+ * path.cc (get_raw_device_number): Ditto.
+ * path.cc (sort_by_native_name): Ditto.
+ * spawn.cc (iscmd): Ditto.
+ * uinfo.cc (internal_getlogin): Ditto.
+
Sat Jul 1 11:43:32 2000 Christopher Faylor <cgf@cygnus.com>
* binmode.c (cygwin_premain0): Fix erroneous clearing of bit.
char *buf;
buf = (char *) alloca (100 + strlen (failedexpr));
- siprintf (buf, "Failed assertion\n\t%s\nat line %d of file %s",
+ __small_sprintf (buf, "Failed assertion\n\t%s\nat line %d of file %s",
failedexpr, line, file);
MessageBox (NULL, buf, NULL, MB_OK | MB_ICONERROR | MB_TASKMODAL);
}
else
{
CloseHandle (h);
- (void) fiprintf (stderr,
- "assertion \"%s\" failed: file \"%s\", line %d\n",
- failedexpr, file, line);
+ small_printf ("assertion \"%s\" failed: file \"%s\", line %d\n",
+ failedexpr, file, line);
}
abort ();
#include <sys/socket.h>
#include <stdlib.h>
#include <stdio.h>
-#include <ctype.h>
#include <unistd.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
-#include <ctype.h>
#include <process.h>
#include "winsup.h"
#include <sys/param.h>
#include <sys/stat.h>
-#include <ctype.h>
#include <dirent.h>
#include <errno.h>
#include <glob.h>
if (!strlen (grp.gr_passwd))
grp.gr_passwd = NULL;
- grp.gr_gid = atoi (dp);
+ grp.gr_gid = strtol (dp, NULL, 10);
dp = strchr (dp, ':');
if (dp)
{
}
else if (group_buf[i].gr_mem)
for (int gi = 0; group_buf[i].gr_mem[gi]; ++gi)
- if (! strcasecmp (username, group_buf[i].gr_mem[gi]))
+ if (strcasematch (username, group_buf[i].gr_mem[gi]))
{
if (cnt < gidsetsize)
grouplist[cnt] = group_buf[i].gr_gid;
details. */
#include <stdlib.h>
-#include <ctype.h>
#include "winsup.h"
extern HMODULE cygwin_hmodule;
grab_int (char **p)
{
char *src = *p;
- int val = atoi (src);
+ int val = strtol (src, NULL, 10);
while (*src && *src != ':' && *src != '\n')
src++;
if (*src == ':')
{
DWORD devn = FH_BAD;
- if (strncasecmp (w32path, "\\\\.\\tape", 8) == 0)
+ if (strncasematch (w32path, "\\\\.\\tape", 8))
{
devn = FH_TAPE;
unit = digits (w32path + 8);
// norewind tape devices have leading n in name
- if (! strncasecmp (uxname, "/dev/n", 6))
+ if (strncasematch (uxname, "/dev/n", 6))
unit += 128;
}
else if (isdrive (w32path + 4))
devn = FH_FLOPPY;
unit = tolower (w32path[4]) - 'a';
}
- else if (strncasecmp (w32path, "\\\\.\\physicaldrive", 17) == 0)
+ else if (strncasematch (w32path, "\\\\.\\physicaldrive", 17))
{
devn = FH_FLOPPY;
unit = digits (w32path + 17) + 128;
/* The two paths were the same length, so just determine normal
lexical sorted order. */
- res = strcasecmp (ap->posix_path, bp->posix_path);
+ res = strcmp (ap->native_path, bp->native_path);
if (res == 0)
{
n = strlen (argv0) - strlen (what);
if (n >= 2 && argv0[1] != ':')
return 0;
- return n >= 0 && strcasecmp (argv0 + n, what) == 0 &&
+ return n >= 0 && strcasematch (argv0 + n, what) &&
(n == 0 || isdirsep (argv0[n - 1]));
}
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#include <ctype.h>
#include <stdlib.h>
#include <time.h>
#include "winsup.h"
#include <errno.h>
#include <unistd.h>
#include <utmp.h>
-#include <ctype.h>
#include "winsup.h"
extern fhandler_tty_master *tty_master;
if ((env = getenv ("USERDOMAIN")) != NULL)
strcpy (pi->domain, env);
/* Trust only if usernames are identical */
- if (!strcasecmp (pi->username, buf) && pi->domain[0] && pi->logsrv[0])
+ if (strcasematch (pi->username, buf) && pi->domain[0] && pi->logsrv[0])
debug_printf ("Domain: %s, Logon Server: %s", pi->domain, pi->logsrv);
/* If that failed, try to get that info from NetBIOS */
else if (!NetWkstaUserGetInfo (NULL, 1, (LPBYTE *)&wui))
wcstombs (pi->domain, wui->wkui1_logon_domain,
(wcslen (wui->wkui1_logon_domain) + 1) * sizeof (WCHAR));
/* Save values in environment */
- if (strcasecmp (pi->username, "SYSTEM")
+ if (!strcasematch (pi->username, "SYSTEM")
&& pi->domain[0] && pi->logsrv[0])
{
LPUSER_INFO_3 ui = NULL;
PSID psid = (PSID) psidbuf;
pi->psid = (PSID) pi->sidbuf;
- if (strcasecmp (pi->username, "SYSTEM")
+ if (!strcasematch (pi->username, "SYSTEM")
&& pi->domain[0] && pi->logsrv[0])
{
if (get_registry_hive_path (pi->psid, buf))