summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacek Poplawski <jacek.poplawski@qt.io>2023-07-18 09:16:28 +0200
committerJacek Poplawski <jacek.poplawski@qt.io>2023-07-24 06:12:42 +0200
commit5a0c2cabcdadd4fc9c6ea2361513a987518ec741 (patch)
tree5287921c0451ab1e81dc0e3c556a6e4e95cdd393
parent309e7d88c33c0ee7ea21b26fdb94a4bd9cf73065 (diff)
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>
-rw-r--r--src/corelib/kernel/qfunctions_vxworks.cpp32
-rw-r--r--src/corelib/kernel/qfunctions_vxworks.h17
2 files changed, 0 insertions, 49 deletions
diff --git a/src/corelib/kernel/qfunctions_vxworks.cpp b/src/corelib/kernel/qfunctions_vxworks.cpp
index 0ada99701c..7cc49db3ba 100644
--- a/src/corelib/kernel/qfunctions_vxworks.cpp
+++ b/src/corelib/kernel/qfunctions_vxworks.cpp
@@ -45,16 +45,6 @@ int rand_r(unsigned int * /*seedp*/)
}
#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
// It IS however defined in the Curtis-Wright X11 libraries, so
// 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)
int symlink(const char *, const char *)
{
@@ -141,18 +121,6 @@ uid_t geteuid()
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)
{
static struct group grbuf = { "root", 0, 0, 0 };
diff --git a/src/corelib/kernel/qfunctions_vxworks.h b/src/corelib/kernel/qfunctions_vxworks.h
index 26006bd564..94aa5c87b5 100644
--- a/src/corelib/kernel/qfunctions_vxworks.h
+++ b/src/corelib/kernel/qfunctions_vxworks.h
@@ -100,9 +100,6 @@ void *lfind(const void* key, const void* base, size_t* elements, size_t size,
int rand_r(unsigned int * /*seedp*/);
#endif
-// no usleep() support
-int usleep(unsigned int);
-
#if defined(VXWORKS_DKM) || defined(VXWORKS_RTP)
int gettimeofday(struct timeval *, void *);
#else
@@ -112,9 +109,6 @@ int gettimeofday(struct timeval *, void *);
int gettimeofday(struct timeval *tv, void /*struct timezone*/ *) __attribute__((weak));
#endif
-// getpagesize() not available
-int getpagesize();
-
// symlinks are not supported (lstat is now just a call to stat - see qplatformdefs.h)
int symlink(const char *, const char *);
ssize_t readlink(const char *, char *, size_t);
@@ -131,16 +125,6 @@ uid_t getuid();
gid_t getgid();
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 {
char *gr_name; /* group name */
char *gr_passwd; /* group password */
@@ -148,7 +132,6 @@ struct group {
char **gr_mem; /* group members */
};
-struct passwd *getpwuid(uid_t uid);
struct group *getgrgid(gid_t gid);
#ifdef __cplusplus