diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2012-03-08 13:36:11 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2012-03-08 13:36:11 +0400 |
commit | 75543537a16a0911af61045a96926cdb81f51383 (patch) | |
tree | 34fa443cb5d7c48e058d17cb2605e10d3947b521 /winsup/cygwin/strfuncs.cc | |
parent | 106833e9b360c8f56e465e2e80141a13dc193635 (diff) |
* Throughout, replace usage of w32api's min with MIN from sys/param.h.
Diffstat (limited to 'winsup/cygwin/strfuncs.cc')
-rw-r--r-- | winsup/cygwin/strfuncs.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/strfuncs.cc b/winsup/cygwin/strfuncs.cc index 3b532f9e0..467f54e87 100644 --- a/winsup/cygwin/strfuncs.cc +++ b/winsup/cygwin/strfuncs.cc @@ -1,7 +1,7 @@ /* strfuncs.cc: misc funcs that don't belong anywhere else Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. + 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc. This file is part of Cygwin. @@ -11,6 +11,7 @@ details. */ #include "winsup.h" #include <stdlib.h> +#include <sys/param.h> #include <wchar.h> #include <winnls.h> #include <ntdll.h> @@ -238,7 +239,7 @@ __db_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, UINT cp, *pwc = *(unsigned char *) s; return *s ? 1 : 0; } - size_t cnt = min (n, 2); + size_t cnt = MIN (n, 2); ret = MultiByteToWideChar (cp, MB_ERR_INVALID_CHARS, s, cnt, pwc, 1); if (ret) return cnt; @@ -312,7 +313,7 @@ __eucjp_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, ret = 3; goto jis_x_0212; } - size_t cnt = min (n, 2); + size_t cnt = MIN (n, 2); if (MultiByteToWideChar (20932, MB_ERR_INVALID_CHARS, s, cnt, pwc, 1)) return cnt; if (n == 1) |