Remove usleep(), getpagesize() and getpwuid() from qfunctions_vxworks
This functionality is now available in VSB Change-Id: I761d73d8ae100b2e0eae8101479b325ddcbde6cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
309e7d88c3
commit
5a0c2cabcd
@ -45,16 +45,6 @@ int rand_r(unsigned int * /*seedp*/)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// no usleep() support
|
|
||||||
int usleep(unsigned int usec)
|
|
||||||
{
|
|
||||||
div_t dt = div(usec, 1000000);
|
|
||||||
struct timespec ts = { dt.quot, dt.rem * 1000 };
|
|
||||||
|
|
||||||
return nanosleep(&ts, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// gettimeofday() is declared, but is missing from the library
|
// gettimeofday() is declared, but is missing from the library
|
||||||
// It IS however defined in the Curtis-Wright X11 libraries, so
|
// It IS however defined in the Curtis-Wright X11 libraries, so
|
||||||
// we have to make the symbol 'weak'
|
// we have to make the symbol 'weak'
|
||||||
@ -81,16 +71,6 @@ int gettimeofday(struct timeval *tv, void /*struct timezone*/ *)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// neither getpagesize() or sysconf(_SC_PAGESIZE) are available
|
|
||||||
int getpagesize()
|
|
||||||
{
|
|
||||||
#if defined(_WRS_KERNEL)
|
|
||||||
return vmPageSizeGet();
|
|
||||||
#else
|
|
||||||
return sysconf(_SC_PAGESIZE);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// symlinks are not supported (lstat is now just a call to stat - see qplatformdefs.h)
|
// symlinks are not supported (lstat is now just a call to stat - see qplatformdefs.h)
|
||||||
int symlink(const char *, const char *)
|
int symlink(const char *, const char *)
|
||||||
{
|
{
|
||||||
@ -141,18 +121,6 @@ uid_t geteuid()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct passwd *getpwuid(uid_t uid)
|
|
||||||
{
|
|
||||||
static struct passwd pwbuf = { "root", 0, 0, 0, 0, 0, 0 };
|
|
||||||
|
|
||||||
if (uid == 0) {
|
|
||||||
return &pwbuf;
|
|
||||||
} else {
|
|
||||||
errno = ENOENT;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct group *getgrgid(gid_t gid)
|
struct group *getgrgid(gid_t gid)
|
||||||
{
|
{
|
||||||
static struct group grbuf = { "root", 0, 0, 0 };
|
static struct group grbuf = { "root", 0, 0, 0 };
|
||||||
|
@ -100,9 +100,6 @@ void *lfind(const void* key, const void* base, size_t* elements, size_t size,
|
|||||||
int rand_r(unsigned int * /*seedp*/);
|
int rand_r(unsigned int * /*seedp*/);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// no usleep() support
|
|
||||||
int usleep(unsigned int);
|
|
||||||
|
|
||||||
#if defined(VXWORKS_DKM) || defined(VXWORKS_RTP)
|
#if defined(VXWORKS_DKM) || defined(VXWORKS_RTP)
|
||||||
int gettimeofday(struct timeval *, void *);
|
int gettimeofday(struct timeval *, void *);
|
||||||
#else
|
#else
|
||||||
@ -112,9 +109,6 @@ int gettimeofday(struct timeval *, void *);
|
|||||||
int gettimeofday(struct timeval *tv, void /*struct timezone*/ *) __attribute__((weak));
|
int gettimeofday(struct timeval *tv, void /*struct timezone*/ *) __attribute__((weak));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// getpagesize() not available
|
|
||||||
int getpagesize();
|
|
||||||
|
|
||||||
// symlinks are not supported (lstat is now just a call to stat - see qplatformdefs.h)
|
// symlinks are not supported (lstat is now just a call to stat - see qplatformdefs.h)
|
||||||
int symlink(const char *, const char *);
|
int symlink(const char *, const char *);
|
||||||
ssize_t readlink(const char *, char *, size_t);
|
ssize_t readlink(const char *, char *, size_t);
|
||||||
@ -131,16 +125,6 @@ uid_t getuid();
|
|||||||
gid_t getgid();
|
gid_t getgid();
|
||||||
uid_t geteuid();
|
uid_t geteuid();
|
||||||
|
|
||||||
struct passwd {
|
|
||||||
char *pw_name; /* user name */
|
|
||||||
char *pw_passwd; /* user password */
|
|
||||||
uid_t pw_uid; /* user ID */
|
|
||||||
gid_t pw_gid; /* group ID */
|
|
||||||
char *pw_gecos; /* real name */
|
|
||||||
char *pw_dir; /* home directory */
|
|
||||||
char *pw_shell; /* shell program */
|
|
||||||
};
|
|
||||||
|
|
||||||
struct group {
|
struct group {
|
||||||
char *gr_name; /* group name */
|
char *gr_name; /* group name */
|
||||||
char *gr_passwd; /* group password */
|
char *gr_passwd; /* group password */
|
||||||
@ -148,7 +132,6 @@ struct group {
|
|||||||
char **gr_mem; /* group members */
|
char **gr_mem; /* group members */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct passwd *getpwuid(uid_t uid);
|
|
||||||
struct group *getgrgid(gid_t gid);
|
struct group *getgrgid(gid_t gid);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
Loading…
x
Reference in New Issue
Block a user