Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/gen/getutxent.c
Show All 34 Lines | |||||
#include <sys/stat.h> | #include <sys/stat.h> | ||||
#include <errno.h> | #include <errno.h> | ||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <utmpx.h> | #include <utmpx.h> | ||||
#include "utxdb.h" | #include "utxdb.h" | ||||
#include "un-namespace.h" | #include "un-namespace.h" | ||||
#ifdef __NO_TLS | |||||
static FILE *uf = NULL; | |||||
static int udb; | |||||
#else | |||||
static _Thread_local FILE *uf = NULL; | static _Thread_local FILE *uf = NULL; | ||||
static _Thread_local int udb; | static _Thread_local int udb; | ||||
#endif | |||||
int | int | ||||
setutxdb(int db, const char *file) | setutxdb(int db, const char *file) | ||||
{ | { | ||||
struct stat sb; | struct stat sb; | ||||
switch (db) { | switch (db) { | ||||
case UTXDB_ACTIVE: | case UTXDB_ACTIVE: | ||||
▲ Show 20 Lines • Show All 191 Lines • Show Last 20 Lines |