mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
Update.
1999-08-04 Andreas Schwab <schwab@suse.de> * sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_PARSER): Initialize result to one. (GET_NPROCS_CONF_PARSER): Likewise.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
1999-08-04 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_PARSER):
|
||||||
|
Initialize result to one.
|
||||||
|
(GET_NPROCS_CONF_PARSER): Likewise.
|
||||||
|
|
||||||
1999-08-03 Ulrich Drepper <drepper@cygnus.com>
|
1999-08-03 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
* inet/ether_hton.c: Pass errno pointer to NSS function.
|
* inet/ether_hton.c: Pass errno pointer to NSS function.
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include <netinet/ether.h>
|
#include <netinet/ether.h>
|
||||||
#include <netinet/if_ether.h>
|
#include <netinet/if_ether.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -34,7 +35,8 @@ struct etherent
|
|||||||
|
|
||||||
|
|
||||||
/* Type of the lookup function we need here. */
|
/* Type of the lookup function we need here. */
|
||||||
typedef int (*lookup_function) (const char *, struct etherent *, char *, int);
|
typedef int (*lookup_function) (const char *, struct etherent *, char *, int,
|
||||||
|
int *);
|
||||||
|
|
||||||
/* The lookup function for the first entry of this service. */
|
/* The lookup function for the first entry of this service. */
|
||||||
extern int __nss_ethers_lookup (service_user **nip, const char *name,
|
extern int __nss_ethers_lookup (service_user **nip, const char *name,
|
||||||
|
@ -195,7 +195,7 @@ __internal_getnetgrent_r (char **hostp, char **userp, char **domainp,
|
|||||||
struct __netgrent *datap,
|
struct __netgrent *datap,
|
||||||
char *buffer, size_t buflen, int *errnop)
|
char *buffer, size_t buflen, int *errnop)
|
||||||
{
|
{
|
||||||
enum nss_status (*fct) (struct __netgrent *, char *, size_t);
|
enum nss_status (*fct) (struct __netgrent *, char *, size_t, int *);
|
||||||
int no_more;
|
int no_more;
|
||||||
|
|
||||||
/* Initialize status to return if no more functions are found. */
|
/* Initialize status to return if no more functions are found. */
|
||||||
|
@ -23,11 +23,11 @@
|
|||||||
#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \
|
#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
(RESULT) = 0; \
|
|
||||||
/* Find the line that contains the information about the number of \
|
/* Find the line that contains the information about the number of \
|
||||||
active cpus. We don't have to fear extremely long lines since \
|
active cpus. We don't have to fear extremely long lines since \
|
||||||
the kernel will not generate them. 8192 bytes are really \
|
the kernel will not generate them. 8192 bytes are really enough. \
|
||||||
enough. */ \
|
If there is no "CPUs ..." line then we are on a UP system. */ \
|
||||||
|
(RESULT) = 1; \
|
||||||
while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \
|
while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \
|
||||||
if (sscanf (BUFFER, "CPUs probed %*d active %d", &(RESULT)) == 1) \
|
if (sscanf (BUFFER, "CPUs probed %*d active %d", &(RESULT)) == 1) \
|
||||||
break; \
|
break; \
|
||||||
@ -40,11 +40,11 @@
|
|||||||
#define GET_NPROCS_CONF_PARSER(FP, BUFFER, RESULT) \
|
#define GET_NPROCS_CONF_PARSER(FP, BUFFER, RESULT) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
(RESULT) = 0; \
|
|
||||||
/* Find the line that contains the information about the number of \
|
/* Find the line that contains the information about the number of \
|
||||||
probed cpus. We don't have to fear extremely long lines since \
|
probed cpus. We don't have to fear extremely long lines since \
|
||||||
the kernel will not generate them. 8192 bytes are really \
|
the kernel will not generate them. 8192 bytes are really enough. \
|
||||||
enough. */ \
|
If there is no "CPUs ..." line then we are on a UP system. */ \
|
||||||
|
(RESULT) = 1; \
|
||||||
while (fgets_unlocked ((BUFFER), sizeof (BUFFER), (FP)) != NULL) \
|
while (fgets_unlocked ((BUFFER), sizeof (BUFFER), (FP)) != NULL) \
|
||||||
if (sscanf (buffer, "CPUs probed %d", &(RESULT)) == 1) \
|
if (sscanf (buffer, "CPUs probed %d", &(RESULT)) == 1) \
|
||||||
break; \
|
break; \
|
||||||
|
Reference in New Issue
Block a user