~vcs-imports/eglibc/trunk

« back to all changes in this revision

Viewing changes to libc/nss/getXXbyYY_r.c

  • Committer: joseph
  • Date: 2013-06-04 15:48:26 UTC
  • Revision ID: svn-v4:7b3dc134-2b1b-0410-93df-9e9f96275f8d:trunk:23218
Merge changes between r23097 and r23217 from /fsf/trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
179
179
    case -1:
180
180
      return errno;
181
181
    case 1:
 
182
#ifdef NEED_H_ERRNO
 
183
      any_service = true;
 
184
#endif
182
185
      goto done;
183
186
    }
184
187
#endif
284
287
#endif
285
288
  *result = status == NSS_STATUS_SUCCESS ? resbuf : NULL;
286
289
#ifdef NEED_H_ERRNO
287
 
  if (status == NSS_STATUS_UNAVAIL)
288
 
    /* Either we failed to lookup the functions or the functions themselves
289
 
       had a system error.  Set NETDB_INTERNAL here to let the caller know
290
 
       that the errno may have the real reason for failure.  */
291
 
      *h_errnop = NETDB_INTERNAL;
 
290
  if (status == NSS_STATUS_UNAVAIL && !any_service && errno != ENOENT)
 
291
    /* This happens when we weren't able to use a service for reasons other
 
292
       than the module not being found.  In such a case, we'd want to tell the
 
293
       caller that errno has the real reason for failure.  */
 
294
    *h_errnop = NETDB_INTERNAL;
292
295
  else if (status != NSS_STATUS_SUCCESS && !any_service)
293
296
    /* We were not able to use any service.  */
294
297
    *h_errnop = NO_RECOVERY;