This is an automated email from the git hooks/post-receive script.
git pushed a commit to reference refs/pull/53/head
in repository efl.
View the commit online.
commit c216f5baf29a8c424511bcd86e17ab0d62de7734
Author: q66 <q...@chimera-linux.org>
AuthorDate: Wed Jan 3 16:20:07 2024 +0100
eina, eio, evas: remove wrong __USE_MISC branches
The first branch is the POSIX-compliant one and the one that
should always be taken; __USE_MISC is an unrelated glibc-specific
macro so the code was not being used on non-glibc Linux systems
even though it should be.
All these branches are Linux-specific, so there is no legacy
code to worry about, even if it was actually useful at some point
in history.
---
src/lib/eina/eina_file_posix.c | 14 --------------
src/lib/eio/eio_monitor_poll.c | 6 ------
src/lib/eio/eio_single.c | 6 ------
src/lib/evas/cache/evas_cache_image.c | 9 ---------
src/lib/evas/common/evas_image_load.c | 4 ----
5 files changed, 39 deletions(-)
diff --git a/src/lib/eina/eina_file_posix.c b/src/lib/eina/eina_file_posix.c
index 0989cc81e5..c92a56ca57 100644
--- a/src/lib/eina/eina_file_posix.c
+++ b/src/lib/eina/eina_file_posix.c
@@ -870,11 +870,7 @@ eina_file_open(const char *path, Eina_Bool shared)
n->length = file_stat.st_size;
n->mtime = file_stat.st_mtime;
#ifdef _STAT_VER_LINUX
-# if (defined __USE_MISC && defined st_mtime)
n->mtime_nsec = (unsigned long int)file_stat.st_mtim.tv_nsec;
-# else
- n->mtime_nsec = (unsigned long int)file_stat.st_mtimensec;
-# endif
#endif
n->inode = file_stat.st_ino;
n->fd = fd;
@@ -928,11 +924,7 @@ eina_file_refresh(Eina_File *file)
file->length = file_stat.st_size;
file->mtime = file_stat.st_mtime;
#ifdef _STAT_VER_LINUX
-# if (defined __USE_MISC && defined st_mtime)
file->mtime_nsec = (unsigned long int)file_stat.st_mtim.tv_nsec;
-# else
- file->mtime_nsec = (unsigned long int)file_stat.st_mtimensec;
-# endif
#endif
file->inode = file_stat.st_ino;
@@ -1245,15 +1237,9 @@ eina_file_statat(void *container, Eina_File_Direct_Info *info, Eina_Stat *st)
st->mtime = buf.st_mtime;
st->ctime = buf.st_ctime;
#ifdef _STAT_VER_LINUX
-# if (defined __USE_MISC && defined st_mtime)
st->atimensec = buf.st_atim.tv_nsec;
st->mtimensec = buf.st_mtim.tv_nsec;
st->ctimensec = buf.st_ctim.tv_nsec;
-# else
- st->atimensec = buf.st_atimensec;
- st->mtimensec = buf.st_mtimensec;
- st->ctimensec = buf.st_ctimensec;
-# endif
#else
st->atimensec = 0;
st->mtimensec = 0;
diff --git a/src/lib/eio/eio_monitor_poll.c b/src/lib/eio/eio_monitor_poll.c
index 4ba420e65e..a1cd6000f8 100644
--- a/src/lib/eio/eio_monitor_poll.c
+++ b/src/lib/eio/eio_monitor_poll.c
@@ -110,15 +110,9 @@ _eio_monitor_fallback_heavy_cb(void *data, Ecore_Thread *thread)
est->mtime = st.st_mtime;
est->ctime = st.st_ctime;
#ifdef _STAT_VER_LINUX
-# if (defined __USE_MISC && defined st_mtime)
est->atimensec = st.st_atim.tv_nsec;
est->mtimensec = st.st_mtim.tv_nsec;
est->ctimensec = st.st_ctim.tv_nsec;
-# else
- est->atimensec = st.st_atimensec;
- est->mtimensec = st.st_mtimensec;
- est->ctimensec = st.st_ctimensec;
-# endif
#else
est->atimensec = 0;
est->mtimensec = 0;
diff --git a/src/lib/eio/eio_single.c b/src/lib/eio/eio_single.c
index 43475ca3d8..6234d560bc 100644
--- a/src/lib/eio/eio_single.c
+++ b/src/lib/eio/eio_single.c
@@ -128,15 +128,9 @@ _eio_file_struct_2_eina(Eina_Stat *es, _eio_stat_t *st)
es->mtime = st->st_mtime;
es->ctime = st->st_ctime;
#ifdef _STAT_VER_LINUX
-# if (defined __USE_MISC && defined st_mtime)
es->atimensec = st->st_atim.tv_nsec;
es->mtimensec = st->st_mtim.tv_nsec;
es->ctimensec = st->st_ctim.tv_nsec;
-# else
- es->atimensec = st->st_atimensec;
- es->mtimensec = st->st_mtimensec;
- es->ctimensec = st->st_ctimensec;
-# endif
#else
es->atimensec = 0;
es->mtimensec = 0;
diff --git a/src/lib/evas/cache/evas_cache_image.c b/src/lib/evas/cache/evas_cache_image.c
index 8844ad95f9..6c9b8c76d0 100644
--- a/src/lib/evas/cache/evas_cache_image.c
+++ b/src/lib/evas/cache/evas_cache_image.c
@@ -201,13 +201,8 @@ _timestamp_compare(Image_Timestamp *tstamp, struct stat *st)
if (tstamp->size != st->st_size) return EINA_FALSE;
if (tstamp->ino != st->st_ino) return EINA_FALSE;
#ifdef _STAT_VER_LINUX
-#if (defined __USE_MISC && defined st_mtime)
if (tstamp->mtime_nsec != (unsigned long int)st->st_mtim.tv_nsec)
return EINA_FALSE;
-#else
- if (tstamp->mtime_nsec != (unsigned long int)st->st_mtimensec)
- return EINA_FALSE;
-#endif
#endif
return EINA_TRUE;
}
@@ -219,11 +214,7 @@ _timestamp_build(Image_Timestamp *tstamp, struct stat *st)
tstamp->size = st->st_size;
tstamp->ino = st->st_ino;
#ifdef _STAT_VER_LINUX
-#if (defined __USE_MISC && defined st_mtime)
tstamp->mtime_nsec = (unsigned long int)st->st_mtim.tv_nsec;
-#else
- tstamp->mtime_nsec = (unsigned long int)st->st_mtimensec;
-#endif
#endif
}
diff --git a/src/lib/evas/common/evas_image_load.c b/src/lib/evas/common/evas_image_load.c
index 5dd111fd05..c01d44c07a 100644
--- a/src/lib/evas/common/evas_image_load.c
+++ b/src/lib/evas/common/evas_image_load.c
@@ -415,11 +415,7 @@ _timestamp_build(Image_Timestamp *tstamp, struct stat *st)
tstamp->size = st->st_size;
tstamp->ino = st->st_ino;
#ifdef _STAT_VER_LINUX
-# if (defined __USE_MISC && defined st_mtime)
tstamp->mtime_nsec = (unsigned long int)st->st_mtim.tv_nsec;
-# else
- tstamp->mtime_nsec = (unsigned long int)st->st_mtimensec;
-# endif
#endif
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.