Skip to contentSkip to conversation

common-glibc: define bash_cv_getcwd_malloc

PATCH In review Joe Slater 3 participants 4 messages Jul 21, 2015 – Aug 12, 2015

lore
Share & tools
lore

Joe Slater

author
#0 lore raw

PATCH 1/1 common-glibc: define bash_cv_getcwd_malloc

We do not want bash to use internal code for getcwd() because it can fail in certain filesystem types. Trust that the function in glibc is not "broken".

---
 meta/site/common-glibc |    1 +
 1 file changed, 1 insertion(+)
meta/site/common-glibc +1 -0
index 8329bb3..1443f8e 100644
@@ -18,6 +18,7 @@ ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo=yes}
 # bash
 bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist=yes}
 bash_cv_sys_siglist=${bash_cv_sys_siglist=yes}
+bash_cv_getcwd_malloc=${bash_cv_getcwd_malloc=yes}
 
 # clamav
 clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes}
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 6 lines · Joe Slater

We do not want bash to use internal code for getcwd() because it can fail in certain filesystem types. Trust that the function in glibc is not "broken”.

I would suggest to move this to bash recipe as

CACHED_CONFIGUREVARS += “bash_cv_getcwd_malloc=yes”

so other libcs can also benefit.

Quoted 26 lines

---
meta/site/common-glibc | 1 +

1 file changed, 1 insertion(+)
meta/site/common-glibc +1 -1
index 8329bb3..1443f8e 100644
@@ -18,6 +18,7 @@ ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo=yes}
 # bash
 bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist=yes}
 bash_cv_sys_siglist=${bash_cv_sys_siglist=yes}
+bash_cv_getcwd_malloc=${bash_cv_getcwd_malloc=yes}
 
 # clamav
 clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes}
--

1.7.9.5

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw
Quoted 6 lines · Khem Raj

I would suggest to move this to bash recipe as

CACHED_CONFIGUREVARS += “bash_cv_getcwd_malloc=yes”

so other libcs can also benefit.

Don't we then have to trust that all libcs are not broken, or is the bash getcwd implementation *that bad*?

Ross

#3 lore raw
Quoted 2 lines · Ross

Don't we then have to trust that all libcs are not broken, or is the bash getcwd implementation *that bad*?

we already know it fails in some cases but nothing of such sort is reported with libc implementations. That doesnt mean they cant be buggy