dfeine strchr and strrchr if they don't exist.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1053 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1996-11-19 20:12:22 +00:00
parent abdb52dbe5
commit afaa21e8cb
2 changed files with 18 additions and 0 deletions

View File

@@ -132,9 +132,11 @@ int getent(char *cp, char *name);
char *getstr(char *id, char **cpp);
#endif
#ifdef HAVE_PWD_H
#include <pwd.h>
struct passwd *k_getpwnam (char *user);
struct passwd *k_getpwuid (uid_t uid);
#endif
#ifndef HAVE_SETEUID
int seteuid(int euid);
@@ -144,6 +146,13 @@ int seteuid(int euid);
int setegid(int egid);
#endif
#ifndef HAVE_STRCHR && defined(HAVE_INDEX)
#define strchr(p, ch) index(p, ch)
#endif
#ifndef HAVE_STRRCHR && defined(HAVE_RINDEX)
#define strrchr(p, ch) rindex(p, ch)
#endif
#include <time.h>
#include <sys/time.h>
time_t tm2time (struct tm tm, int local);

View File

@@ -132,9 +132,11 @@ int getent(char *cp, char *name);
char *getstr(char *id, char **cpp);
#endif
#ifdef HAVE_PWD_H
#include <pwd.h>
struct passwd *k_getpwnam (char *user);
struct passwd *k_getpwuid (uid_t uid);
#endif
#ifndef HAVE_SETEUID
int seteuid(int euid);
@@ -144,6 +146,13 @@ int seteuid(int euid);
int setegid(int egid);
#endif
#ifndef HAVE_STRCHR && defined(HAVE_INDEX)
#define strchr(p, ch) index(p, ch)
#endif
#ifndef HAVE_STRRCHR && defined(HAVE_RINDEX)
#define strrchr(p, ch) rindex(p, ch)
#endif
#include <time.h>
#include <sys/time.h>
time_t tm2time (struct tm tm, int local);