Date: Tue, 16 Feb 2010 11:33:18 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r203956 - user/ed/newcons/lib/libc/gen Message-ID: <201002161133.o1GBXI7M008493@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Tue Feb 16 11:33:18 2010 New Revision: 203956 URL: http://svn.freebsd.org/changeset/base/203956 Log: Add missing volatile keywords. According to GCC, these variables may be clobbered by vfork(). Modified: user/ed/newcons/lib/libc/gen/popen.c user/ed/newcons/lib/libc/gen/posix_spawn.c Modified: user/ed/newcons/lib/libc/gen/popen.c ============================================================================== --- user/ed/newcons/lib/libc/gen/popen.c Tue Feb 16 09:31:36 2010 (r203955) +++ user/ed/newcons/lib/libc/gen/popen.c Tue Feb 16 11:33:18 2010 (r203956) @@ -66,12 +66,12 @@ static pthread_mutex_t pidlist_mutex = P #define THREAD_UNLOCK() if (__isthreaded) _pthread_mutex_unlock(&pidlist_mutex) FILE * -popen(command, type) - const char *command, *type; +popen(const char *command, const char * volatile type) { struct pid *cur; FILE *iop; - int pdes[2], pid, twoway; + int pdes[2], pid; + volatile int twoway; char *argv[4]; struct pid *p; Modified: user/ed/newcons/lib/libc/gen/posix_spawn.c ============================================================================== --- user/ed/newcons/lib/libc/gen/posix_spawn.c Tue Feb 16 09:31:36 2010 (r203955) +++ user/ed/newcons/lib/libc/gen/posix_spawn.c Tue Feb 16 11:33:18 2010 (r203956) @@ -192,7 +192,7 @@ static int do_posix_spawn(pid_t *pid, const char *path, const posix_spawn_file_actions_t *fa, const posix_spawnattr_t *sa, - char * const argv[], char * const envp[], int use_env_path) + char * const argv[], char * const * volatile envp, int use_env_path) { pid_t p; volatile int error = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002161133.o1GBXI7M008493>