- Timestamp:
- Jan 16, 2015, 8:45:20 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_unix.c
r460 r462 1012 1012 struct group grp; 1013 1013 char * buffer; 1014 static size_t gbufsize = SH_GRBUF_SIZE; 1014 1015 #endif 1015 1016 … … 1035 1036 1036 1037 #if defined(HAVE_PTHREAD) && defined (_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_GETPWNAM_R) 1037 buffer = SH_ALLOC(SH_GRBUF_SIZE); 1038 status = sh_getgrnam_r(g, &grp, buffer, SH_GRBUF_SIZE, &w); 1038 1039 buffer = SH_ALLOC(gbufsize); 1040 status = sh_getgrnam_r(g, &grp, buffer, gbufsize, &w); 1041 1042 if ((status == ERANGE) && (w == NULL)) 1043 { 1044 if (SL_TRUE == sl_ok_adds( gbufsize, SH_GRBUF_SIZE )) 1045 { 1046 SH_FREE(buffer); 1047 gbufsize += SH_GRBUF_SIZE; 1048 goto is_a_name; 1049 } 1050 } 1051 1039 1052 #else 1053 1040 1054 errno = 0; 1041 1055 w = sh_getgrnam(g); 1042 1056 status = errno; 1057 1043 1058 #endif 1044 1059
Note:
See TracChangeset
for help on using the changeset viewer.