1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00
This commit is contained in:
Jakub Jelinek
2007-07-12 18:26:36 +00:00
parent 7d58530341
commit 0ecb606cb6
6215 changed files with 494638 additions and 305010 deletions

View File

@ -1,5 +1,6 @@
/* Hosts file parser in nss_files module.
Copyright (C) 1996-2001, 2003, 2004 Free Software Foundation, Inc.
Copyright (C) 1996-2001, 2003, 2004, 2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -86,6 +87,10 @@ _nss_files_get##name##_r (proto, \
{ \
enum nss_status status; \
\
uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct hostent_data); \
buffer += pad; \
buflen = buflen > pad ? buflen - pad : 0; \
\
__libc_lock_lock (lock); \
\
/* Reset file pointer to beginning or open file. */ \
@ -106,7 +111,8 @@ _nss_files_get##name##_r (proto, \
{ \
/* We have to get all host entries from the file. */ \
const size_t tmp_buflen = MIN (buflen, 4096); \
char tmp_buffer[tmp_buflen]; \
char tmp_buffer[tmp_buflen] \
__attribute__ ((__aligned__ (__alignof__ (struct hostent_data))));\
struct hostent tmp_result_buf; \
int naddrs = 1; \
int naliases = 0; \