diff options
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/grp.cc | 5 | ||||
-rw-r--r-- | winsup/cygwin/passwd.cc | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a6c4ae6a1..4ecca6ea1 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2012-02-03 Václav Zeman <vhaisman@gmail.com> + + * grp.cc (pwdgrp::parse_group): Convert grp from macro to reference. + * passwd.cc (pwdgrp::parse_passwd): Ditto for res. + 2012-02-02 Christopher Faylor <me.cygwin2012@cgf.cx> * syscalls.cc (close_all_files): Use cygheap_fdget to manipulate diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index 48efdb17f..306a510f1 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -1,7 +1,7 @@ /* grp.cc Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2011 Red Hat, Inc. + 2007, 2008, 2009, 2011, 2012 Red Hat, Inc. Original stubs by Jason Molenda of Cygnus Support, crash@cygnus.com First implementation by Gunther Ebert, gunther.ebert@ixos-leipzig.de @@ -32,7 +32,7 @@ static char * NO_COPY null_ptr; bool pwdgrp::parse_group () { -# define grp (*group_buf)[curr_lines] + __group32 &grp = (*group_buf)[curr_lines]; grp.gr_name = next_str (':'); if (!*grp.gr_name) return false; @@ -60,7 +60,6 @@ pwdgrp::parse_group () } return true; -# undef grp } /* Cygwin internal */ diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc index 44343af7f..945ce146c 100644 --- a/winsup/cygwin/passwd.cc +++ b/winsup/cygwin/passwd.cc @@ -1,6 +1,7 @@ /* passwd.cc: getpwnam () and friends - Copyright 1996, 1997, 1998, 2001, 2002, 2003, 2007, 2008, 2009 Red Hat, Inc. + Copyright 1996, 1997, 1998, 2001, 2002, 2003, 2007, 2008, 2009, + 2010, 2011 Red Hat, Inc. This file is part of Cygwin. @@ -31,7 +32,7 @@ static pwdgrp pr (passwd_buf); bool pwdgrp::parse_passwd () { -# define res (*passwd_buf)[curr_lines] + passwd &res = (*passwd_buf)[curr_lines]; res.pw_name = next_str (':'); res.pw_passwd = next_str (':'); if (!next_num (res.pw_uid)) @@ -43,7 +44,6 @@ pwdgrp::parse_passwd () res.pw_dir = next_str (':'); res.pw_shell = next_str (':'); return true; -# undef res } /* Read in /etc/passwd and save contents in the password cache. |