search for: getpwd

Displaying 13 results from an estimated 13 matches for "getpwd".

Did you mean: getpid
2010 Apr 02
1
[PATCH] dash: cd fix getpwd
...ms <max at stro.at> Cc: Herbert Xu <herbert at gondor.apana.org.au> --- usr/dash/cd.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/usr/dash/cd.c b/usr/dash/cd.c index 8a23110..ba9a1bc 100644 --- a/usr/dash/cd.c +++ b/usr/dash/cd.c @@ -253,12 +253,13 @@ getpwd() { #ifdef __GLIBC__ char *dir = getcwd(0, 0); + if (dir) + return dir; #else char buf[PATH_MAX]; - char *dir = getcwd(buf, sizeof(buf)); + if(getcwd(buf, sizeof(buf))) + return savestr(buf); #endif - if (dir) - return dir; sh_warnx("getcwd() failed: %s", strerror(errno));...
2011 Jan 19
2
[LLVMdev] Building 176.gcc
...or existed because clang has different support for inline. Then I tried to compile with 'clang *.c -std=c99 -o gcc.clang' because c99 supports inline. It reported this error: /tmp/cc-tJBugS.o: In function `stat': toplev.c:(.text+0x0): multiple definition of `stat' /tmp/cc-aQKHyN.o:getpwd.c:(.text+0x0): first defined here /tmp/cc-tJBugS.o: In function `fstat': toplev.c:(.text+0x30): multiple definition of `fstat' /tmp/cc-aQKHyN.o:getpwd.c:(.text+0x30): first defined here /tmp/cc-GZ5yz3.o: In function `init_lex': c-lex.c:(.text+0x417): undefined reference to `is_reserved_...
2007 Jan 27
0
[PATCH] dash: Fix "pwd -P" breakage due to getcwd(0, 0) usage
The getpwd() function in dash assumed than getcwd(0, 0) will allocate the buffer dynamically using malloc(); however, this glibc extension is not implemented by klibc. Make getpwd() use a temporary buffer and invoke savestr() itself instead of relying on a nonstandard extension. Signed-off-by: Sergey Vlasov...
2011 Jan 19
0
[LLVMdev] Building 176.gcc
...g has different support for > inline. Then I tried to compile with 'clang *.c -std=c99 -o gcc.clang' > because c99 supports inline. It reported this error: > /tmp/cc-tJBugS.o: In function `stat': > toplev.c:(.text+0x0): multiple definition of `stat' > /tmp/cc-aQKHyN.o:getpwd.c:(.text+0x0): first defined here > /tmp/cc-tJBugS.o: In function `fstat': > toplev.c:(.text+0x30): multiple definition of `fstat' > /tmp/cc-aQKHyN.o:getpwd.c:(.text+0x30): first defined here > /tmp/cc-GZ5yz3.o: In function `init_lex': > c-lex.c:(.text+0x417): undefined r...
2015 Apr 16
2
[LLVMdev] Compile SPEC2006 with clang-3.2, multi definition errors.
...rror: Invalid or unhandled FORM value: 25. /usr/bin/ld: Dwarf Error: Invalid or unhandled FORM value: 25. /usr/bin/ld: Dwarf Error: Invalid or unhandled FORM value: 25. /usr/bin/ld: Dwarf Error: Invalid or unhandled FORM value: 25. /usr/bin/ld: Dwarf Error: Invalid or unhandled FORM value: 25. /tmp/getpwd-UxjZIi.o: In function `fstat': /usr/include/sys/stat.h:449: multiple definition of `fstat' /tmp/c-parse-7tFGiF.o:/usr/include/sys/stat.h:449: first defined here /tmp/getpwd-UxjZIi.o: In function `fstat64': /usr/include/sys/stat.h:498: multiple definition of `fstat64' /tmp/c-parse-7t...
2009 Jun 24
1
[Bug 1235] [PATCH] scp does unnecessary getpwuid(), breaking chroot
https://bugzilla.mindrot.org/show_bug.cgi?id=1235 donkishoot at wanadoo.fr changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |donkishoot at wanadoo.fr --- Comment #5 from donkishoot at wanadoo.fr 2009-06-24 23:41:20 --- I have a bug that i think is
2004 May 05
0
[LLVMdev] Testing LLVM on OS X
...LLVM/cfrontend/ppc/llvm-gcc/bin/gcc -c -o insn-attrtab.o -DHOST_WORDS_BIG_ENDIAN -O3 insn-attrtab.c /Users/patrick/Desktop/LLVM/cfrontend/ppc/llvm-gcc/bin/gcc -c -o m88k.o -DHOST_WORDS_BIG_ENDIAN -O3 m88k.c /Users/patrick/Desktop/LLVM/cfrontend/ppc/llvm-gcc/bin/gcc -c -o getpwd.o -DHOST_WORDS_BIG_ENDIAN -O3 getpwd.c /Users/patrick/Desktop/LLVM/cfrontend/ppc/llvm-gcc/bin/gcc -c -o convert.o -DHOST_WORDS_BIG_ENDIAN -O3 convert.c /Users/patrick/Desktop/LLVM/cfrontend/ppc/llvm-gcc/bin/gcc -c -o bc-emit.o -DHOST_WORDS_BIG_ENDIAN -O3 bc-emi...
2019 Jan 25
0
[klibc:update-dash] dash: Fix some cosmetic differences from upstream dash
...ic void check_conversion(const char *, const char *); -#ifdef HAVE_STRTOD -static double getdouble(void); -#endif static int rval; static char **gargv; diff --git a/usr/dash/cd.c b/usr/dash/cd.c index 89c6c30c..2d9d4b52 100644 --- a/usr/dash/cd.c +++ b/usr/dash/cd.c @@ -254,13 +254,16 @@ getpwd() { #ifdef __GLIBC__ char *dir = getcwd(0, 0); + if (dir) return dir; #else char buf[PATH_MAX]; - if(getcwd(buf, sizeof(buf))) + + if (getcwd(buf, sizeof(buf))) return savestr(buf); #endif + sh_warnx("getcwd() failed: %s", strerror(errno)); return nullstr; } diff --gi...
2020 Mar 28
0
[klibc:update-dash] dash: Fix some cosmetic differences from upstream dash
...ic void check_conversion(const char *, const char *); -#ifdef HAVE_STRTOD -static double getdouble(void); -#endif static int rval; static char **gargv; diff --git a/usr/dash/cd.c b/usr/dash/cd.c index 89c6c30c..2d9d4b52 100644 --- a/usr/dash/cd.c +++ b/usr/dash/cd.c @@ -254,13 +254,16 @@ getpwd() { #ifdef __GLIBC__ char *dir = getcwd(0, 0); + if (dir) return dir; #else char buf[PATH_MAX]; - if(getcwd(buf, sizeof(buf))) + + if (getcwd(buf, sizeof(buf))) return savestr(buf); #endif + sh_warnx("getcwd() failed: %s", strerror(errno)); return nullstr; } diff --gi...
2004 May 04
6
[LLVMdev] Testing LLVM on OS X
On Tue, 4 May 2004, Chris Lattner wrote: > I suspect that a large reason that LLVM does worst than a native C > compiler with the CBE+GCC is that LLVM generates very low-level C code, > and I'm not convinced that GCC is doing a very good job (ie, without > syntactic loops). Yup, this is EXACTLY what is going on. I took this very simple C function: int Array[1000]; void test(int
2004 May 05
2
[LLVMdev] Testing LLVM on OS X
...m-gcc/bin/gcc -c -o > insn-attrtab.o -DHOST_WORDS_BIG_ENDIAN -O3 insn-attrtab.c > /Users/patrick/Desktop/LLVM/cfrontend/ppc/llvm-gcc/bin/gcc -c -o m88k.o > -DHOST_WORDS_BIG_ENDIAN -O3 m88k.c > /Users/patrick/Desktop/LLVM/cfrontend/ppc/llvm-gcc/bin/gcc -c -o > getpwd.o -DHOST_WORDS_BIG_ENDIAN -O3 getpwd.c > /Users/patrick/Desktop/LLVM/cfrontend/ppc/llvm-gcc/bin/gcc -c -o > convert.o -DHOST_WORDS_BIG_ENDIAN -O3 convert.c > /Users/patrick/Desktop/LLVM/cfrontend/ppc/llvm-gcc/bin/gcc -c -o > bc-emit.o -DHOST_WORDS_BIG_ENDIAN...
2010 Apr 16
0
[git pull v4] dash, sh4, ipconfig, dprintf, fstype, README's
...r test dir [klibc] add testcase for future arch socket foo [klibc] README update arch status [klibc] ipconfig: use dprintf on DEBUG [klibc] nfsmount: use dprintf on DEBUG [klibc] kinit: use dprintf on DEBUG [klibc] fstype: btrfs support [klibc] dash: cd fix getpwd [klibc] dash update sync commit [klibc] Fix faccessat() missing arg git diff -M --stat --summary master...maks Makefile | 2 +- README | 2 +- klibc.spec.in | 6 +...
2010 Apr 16
0
[PATCH] pull faccessat() system call
...r test dir [klibc] add testcase for future arch socket foo [klibc] README update arch status [klibc] ipconfig: use dprintf on DEBUG [klibc] nfsmount: use dprintf on DEBUG [klibc] kinit: use dprintf on DEBUG [klibc] fstype: btrfs support [klibc] dash: cd fix getpwd [klibc] dash update sync commit [klibc] pull faccessat() system call Makefile | 2 +- README | 2 +- klibc.spec.in | 6 +- usr/dash/.gitignore...