diff options
| -rw-r--r-- | .gitattributes | 1 | ||||
| -rw-r--r-- | Makefile.in | 16 | ||||
| -rw-r--r-- | configure.ac | 12 | ||||
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | lib-src/Makefile.in | 50 | ||||
| -rw-r--r-- | lib-src/update-game-score.exe.manifest | 10 | ||||
| -rw-r--r-- | lisp/play/gamegrid.el | 29 | ||||
| -rwxr-xr-x | make-dist | 1 | ||||
| -rw-r--r-- | src/callproc.c | 20 |
9 files changed, 63 insertions, 81 deletions
diff --git a/.gitattributes b/.gitattributes index 22cea3dc1e3..59cc2eded5d 100644 --- a/.gitattributes +++ b/.gitattributes | |||
| @@ -24,7 +24,6 @@ admin/charsets/mapfiles/PTCP154 whitespace=cr-at-eol | |||
| 24 | leim/MISC-DIC/cangjie-table.b5 whitespace=cr-at-eol | 24 | leim/MISC-DIC/cangjie-table.b5 whitespace=cr-at-eol |
| 25 | leim/MISC-DIC/cangjie-table.cns whitespace=cr-at-eol | 25 | leim/MISC-DIC/cangjie-table.cns whitespace=cr-at-eol |
| 26 | leim/MISC-DIC/pinyin.map whitespace=cr-at-eol | 26 | leim/MISC-DIC/pinyin.map whitespace=cr-at-eol |
| 27 | lib-src/update-game-score.exe.manifest whitespace=cr-at-eol | ||
| 28 | nt/nmake.defs whitespace=cr-at-eol | 27 | nt/nmake.defs whitespace=cr-at-eol |
| 29 | test/etags/c-src/dostorture.c whitespace=cr-at-eol | 28 | test/etags/c-src/dostorture.c whitespace=cr-at-eol |
| 30 | test/etags/cp-src/c.C whitespace=cr-at-eol | 29 | test/etags/cp-src/c.C whitespace=cr-at-eol |
diff --git a/Makefile.in b/Makefile.in index 82fb91fd9cd..18251b41043 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -266,8 +266,15 @@ archlibdir=@archlibdir@ | |||
| 266 | # Where to put the etc/DOC file. | 266 | # Where to put the etc/DOC file. |
| 267 | etcdocdir=@etcdocdir@ | 267 | etcdocdir=@etcdocdir@ |
| 268 | 268 | ||
| 269 | # Where to install Emacs game score files. | 269 | # User or group of the auxiliary program update-game-score, which is |
| 270 | # installed on platforms with a game directory shared by multiple users. | ||
| 271 | # On other platforms Emacs can update the score files itself. | ||
| 272 | gameuser=@gameuser@ | ||
| 273 | gamegroup=@gamegroup@ | ||
| 274 | # Where to install game score files, if gameuser or gamegroup is nonempty. | ||
| 270 | gamedir=@gamedir@ | 275 | gamedir=@gamedir@ |
| 276 | # Nonempty if and only if a shared gamedir is used. | ||
| 277 | use_gamedir=$(gameuser)$(gamegroup) | ||
| 271 | 278 | ||
| 272 | # ==================== Utility Programs for the Build ==================== | 279 | # ==================== Utility Programs for the Build ==================== |
| 273 | 280 | ||
| @@ -334,6 +341,9 @@ etc-emacsver: | |||
| 334 | ${srcdir}/build-aux/move-if-change emacsver.tex.$$$$ \ | 341 | ${srcdir}/build-aux/move-if-change emacsver.tex.$$$$ \ |
| 335 | ${srcdir}/etc/refcards/emacsver.tex | 342 | ${srcdir}/etc/refcards/emacsver.tex |
| 336 | 343 | ||
| 344 | # The shared gamedir name as a C string literal, or a null ptr if not in use. | ||
| 345 | PATH_GAME = $(if $(use_gamedir),"$(gamedir)",((char const *) 0)) | ||
| 346 | |||
| 337 | # Generate epaths.h from epaths.in. This target is invoked by 'configure'. | 347 | # Generate epaths.h from epaths.in. This target is invoked by 'configure'. |
| 338 | # See comments in configure.ac for why it is done this way, as opposed | 348 | # See comments in configure.ac for why it is done this way, as opposed |
| 339 | # to just letting configure generate epaths.h from epaths.in in a | 349 | # to just letting configure generate epaths.h from epaths.in in a |
| @@ -359,7 +369,7 @@ epaths-force: | |||
| 359 | -e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";' \ | 369 | -e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";' \ |
| 360 | -e 's;\(#.*PATH_BITMAPS\).*$$;\1 "${bitmapdir}";' \ | 370 | -e 's;\(#.*PATH_BITMAPS\).*$$;\1 "${bitmapdir}";' \ |
| 361 | -e 's;\(#.*PATH_X_DEFAULTS\).*$$;\1 "${x_default_search_path}";' \ | 371 | -e 's;\(#.*PATH_X_DEFAULTS\).*$$;\1 "${x_default_search_path}";' \ |
| 362 | -e 's;\(#.*PATH_GAME\).*$$;\1 "${gamedir}";' \ | 372 | -e 's;\(#.*PATH_GAME\).*$$;\1 $(PATH_GAME);' \ |
| 363 | -e 's;\(#.*PATH_DOC\).*$$;\1 "${etcdocdir}";') && \ | 373 | -e 's;\(#.*PATH_DOC\).*$$;\1 "${etcdocdir}";') && \ |
| 364 | ${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h | 374 | ${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h |
| 365 | 375 | ||
| @@ -811,10 +821,12 @@ uninstall: uninstall-$(NTDIR) uninstall-doc | |||
| 811 | -rm -f "$(DESTDIR)${desktopdir}/${EMACS_NAME}.desktop" | 821 | -rm -f "$(DESTDIR)${desktopdir}/${EMACS_NAME}.desktop" |
| 812 | -rm -f "$(DESTDIR)${appdatadir}/${EMACS_NAME}.appdata.xml" | 822 | -rm -f "$(DESTDIR)${appdatadir}/${EMACS_NAME}.appdata.xml" |
| 813 | -rm -f "$(DESTDIR)$(systemdunitdir)/${EMACS_NAME}.service" | 823 | -rm -f "$(DESTDIR)$(systemdunitdir)/${EMACS_NAME}.service" |
| 824 | ifneq (,$(use_gamedir)) | ||
| 814 | for file in snake-scores tetris-scores; do \ | 825 | for file in snake-scores tetris-scores; do \ |
| 815 | file="$(DESTDIR)${gamedir}/$${file}"; \ | 826 | file="$(DESTDIR)${gamedir}/$${file}"; \ |
| 816 | [ -s "$${file}" ] || rm -f "$$file"; \ | 827 | [ -s "$${file}" ] || rm -f "$$file"; \ |
| 817 | done | 828 | done |
| 829 | endif | ||
| 818 | 830 | ||
| 819 | ### Windows-specific uninstall target for removing programs produced | 831 | ### Windows-specific uninstall target for removing programs produced |
| 820 | ### in nt/, and its Posix do-nothing shadow. | 832 | ### in nt/, and its Posix do-nothing shadow. |
diff --git a/configure.ac b/configure.ac index ba944e6cebd..4d9ba9636d5 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -402,12 +402,9 @@ AC_ARG_WITH(gameuser,dnl | |||
| 402 | An argument prefixed by ':' specifies a group instead.])]) | 402 | An argument prefixed by ':' specifies a group instead.])]) |
| 403 | gameuser= | 403 | gameuser= |
| 404 | gamegroup= | 404 | gamegroup= |
| 405 | # We don't test if we can actually chown/chgrp here, because configure | ||
| 406 | # may run without root privileges. lib-src/Makefile.in will handle | ||
| 407 | # any errors due to missing user/group gracefully. | ||
| 408 | case ${with_gameuser} in | 405 | case ${with_gameuser} in |
| 409 | no) ;; | 406 | '' | no) ;; |
| 410 | "" | yes) gamegroup=games ;; | 407 | yes) gamegroup=games ;; |
| 411 | :*) gamegroup=${with_gameuser#:} ;; | 408 | :*) gamegroup=${with_gameuser#:} ;; |
| 412 | *) gameuser=${with_gameuser} ;; | 409 | *) gameuser=${with_gameuser} ;; |
| 413 | esac | 410 | esac |
| @@ -1966,7 +1963,6 @@ CLIENTRES= | |||
| 1966 | CLIENTW= | 1963 | CLIENTW= |
| 1967 | W32_RES_LINK= | 1964 | W32_RES_LINK= |
| 1968 | EMACS_MANIFEST= | 1965 | EMACS_MANIFEST= |
| 1969 | UPDATE_MANIFEST= | ||
| 1970 | if test "${with_w32}" != no; then | 1966 | if test "${with_w32}" != no; then |
| 1971 | case "${opsys}" in | 1967 | case "${opsys}" in |
| 1972 | cygwin) | 1968 | cygwin) |
| @@ -2034,7 +2030,6 @@ if test "${HAVE_W32}" = "yes"; then | |||
| 2034 | # the rc file), not a linker script. | 2030 | # the rc file), not a linker script. |
| 2035 | W32_RES_LINK="-Wl,emacs.res" | 2031 | W32_RES_LINK="-Wl,emacs.res" |
| 2036 | else | 2032 | else |
| 2037 | UPDATE_MANIFEST=update-game-score.exe.manifest | ||
| 2038 | W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o" | 2033 | W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o" |
| 2039 | W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32" | 2034 | W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32" |
| 2040 | W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10" | 2035 | W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10" |
| @@ -2054,7 +2049,6 @@ AC_SUBST(W32_OBJ) | |||
| 2054 | AC_SUBST(W32_LIBS) | 2049 | AC_SUBST(W32_LIBS) |
| 2055 | AC_SUBST(EMACSRES) | 2050 | AC_SUBST(EMACSRES) |
| 2056 | AC_SUBST(EMACS_MANIFEST) | 2051 | AC_SUBST(EMACS_MANIFEST) |
| 2057 | AC_SUBST(UPDATE_MANIFEST) | ||
| 2058 | AC_SUBST(CLIENTRES) | 2052 | AC_SUBST(CLIENTRES) |
| 2059 | AC_SUBST(CLIENTW) | 2053 | AC_SUBST(CLIENTW) |
| 2060 | AC_SUBST(W32_RES_LINK) | 2054 | AC_SUBST(W32_RES_LINK) |
| @@ -5432,7 +5426,7 @@ AC_SUBST(SUBDIR_MAKEFILES_IN) | |||
| 5432 | dnl You might wonder (I did) why epaths.h is generated by running make, | 5426 | dnl You might wonder (I did) why epaths.h is generated by running make, |
| 5433 | dnl rather than just letting configure generate it from epaths.in. | 5427 | dnl rather than just letting configure generate it from epaths.in. |
| 5434 | dnl One reason is that the various paths are not fully expanded (see above); | 5428 | dnl One reason is that the various paths are not fully expanded (see above); |
| 5435 | dnl eg gamedir=${prefix}/var/games/emacs. | 5429 | dnl e.g., gamedir='${localstatedir}/games/emacs'. |
| 5436 | dnl Secondly, the GNU Coding standards require that one should be able | 5430 | dnl Secondly, the GNU Coding standards require that one should be able |
| 5437 | dnl to run 'make prefix=/some/where/else' and override the values set | 5431 | dnl to run 'make prefix=/some/where/else' and override the values set |
| 5438 | dnl by configure. This also explains the 'move-if-change' test and | 5432 | dnl by configure. This also explains the 'move-if-change' test and |
| @@ -65,6 +65,11 @@ emacs-version and erc-cmd-SV functions, and the leave the following | |||
| 65 | variables nil: emacs-build-system, emacs-build-time, | 65 | variables nil: emacs-build-system, emacs-build-time, |
| 66 | erc-emacs-build-time. | 66 | erc-emacs-build-time. |
| 67 | 67 | ||
| 68 | ** The configure option '--with-gameuser' now defaults to 'no', | ||
| 69 | as this appears to be the most common configuration in practice. | ||
| 70 | When it is 'no', the shared game directory and the auxiliary program | ||
| 71 | update-game-score are no longer needed and are not installed. | ||
| 72 | |||
| 68 | ** Emacs no longer works on IRIX. We expect that Emacs users are not | 73 | ** Emacs no longer works on IRIX. We expect that Emacs users are not |
| 69 | affected by this, as SGI stopped supporting IRIX in December 2013. | 74 | affected by this, as SGI stopped supporting IRIX in December 2013. |
| 70 | 75 | ||
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 88f62805765..d0aa9cc7c27 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in | |||
| @@ -40,7 +40,6 @@ C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ | |||
| 40 | PROFILING_CFLAGS = @PROFILING_CFLAGS@ | 40 | PROFILING_CFLAGS = @PROFILING_CFLAGS@ |
| 41 | WARN_CFLAGS = @WARN_CFLAGS@ | 41 | WARN_CFLAGS = @WARN_CFLAGS@ |
| 42 | WERROR_CFLAGS = @WERROR_CFLAGS@ | 42 | WERROR_CFLAGS = @WERROR_CFLAGS@ |
| 43 | UPDATE_MANIFEST = @UPDATE_MANIFEST@ | ||
| 44 | 43 | ||
| 45 | # Program name transformation. | 44 | # Program name transformation. |
| 46 | TRANSFORM = @program_transform_name@ | 45 | TRANSFORM = @program_transform_name@ |
| @@ -130,9 +129,15 @@ abs_top_srcdir=@abs_top_srcdir@ | |||
| 130 | # to '../configure'. | 129 | # to '../configure'. |
| 131 | archlibdir=@archlibdir@ | 130 | archlibdir=@archlibdir@ |
| 132 | 131 | ||
| 133 | gamedir=@gamedir@ | 132 | # User or group of the auxiliary program update-game-score, which is |
| 133 | # installed on platforms with a game directory shared by multiple users. | ||
| 134 | # On other platforms Emacs can update the score files itself. | ||
| 134 | gameuser=@gameuser@ | 135 | gameuser=@gameuser@ |
| 135 | gamegroup=@gamegroup@ | 136 | gamegroup=@gamegroup@ |
| 137 | # Where to install game score files, if gameuser or gamegroup is nonempty. | ||
| 138 | gamedir=@gamedir@ | ||
| 139 | # Nonempty if and only if a shared gamedir is used. | ||
| 140 | use_gamedir=$(gameuser)$(gamegroup) | ||
| 136 | 141 | ||
| 137 | # ==================== Utility Programs for the Build ================= | 142 | # ==================== Utility Programs for the Build ================= |
| 138 | 143 | ||
| @@ -156,13 +161,13 @@ INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} $(CLIENTW) \ | |||
| 156 | # Things that Emacs runs internally, or during the build process, | 161 | # Things that Emacs runs internally, or during the build process, |
| 157 | # which should not be installed in bindir. | 162 | # which should not be installed in bindir. |
| 158 | UTILITIES = profile${EXEEXT} movemail${EXEEXT} hexl${EXEEXT} \ | 163 | UTILITIES = profile${EXEEXT} movemail${EXEEXT} hexl${EXEEXT} \ |
| 159 | update-game-score${EXEEXT} | 164 | $(and $(use_gamedir), update-game-score${EXEEXT}) |
| 160 | 165 | ||
| 161 | DONT_INSTALL= make-docfile${EXEEXT} | 166 | DONT_INSTALL= make-docfile${EXEEXT} |
| 162 | 167 | ||
| 163 | # Like UTILITIES, but they're not system-dependent, and should not be | 168 | # Like UTILITIES, but they're not system-dependent, and should not be |
| 164 | # deleted by the distclean target. | 169 | # deleted by the distclean target. |
| 165 | SCRIPTS= rcs2log $(UPDATE_MANIFEST) | 170 | SCRIPTS= rcs2log |
| 166 | 171 | ||
| 167 | # All files that are created by the linker, i.e., whose names end in ${EXEEXT}. | 172 | # All files that are created by the linker, i.e., whose names end in ${EXEEXT}. |
| 168 | EXE_FILES = ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL} | 173 | EXE_FILES = ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL} |
| @@ -258,9 +263,6 @@ maybe-blessmail: $(BLESSMAIL_TARGET) | |||
| 258 | 263 | ||
| 259 | ## Install the internal utilities. Until they are installed, we can | 264 | ## Install the internal utilities. Until they are installed, we can |
| 260 | ## just run them directly from lib-src. | 265 | ## just run them directly from lib-src. |
| 261 | ## If the chown/chmod commands fail, that is not a big deal. | ||
| 262 | ## update-game-score will detect at runtime that it is not setuid, | ||
| 263 | ## and handle things accordingly. | ||
| 264 | $(DESTDIR)${archlibdir}: all | 266 | $(DESTDIR)${archlibdir}: all |
| 265 | @echo | 267 | @echo |
| 266 | @echo "Installing utilities run internally by Emacs." | 268 | @echo "Installing utilities run internally by Emacs." |
| @@ -272,28 +274,22 @@ $(DESTDIR)${archlibdir}: all | |||
| 272 | "$(DESTDIR)${archlibdir}/$$file" || exit; \ | 274 | "$(DESTDIR)${archlibdir}/$$file" || exit; \ |
| 273 | done ; \ | 275 | done ; \ |
| 274 | fi | 276 | fi |
| 275 | umask 022 && ${MKDIR_P} "$(DESTDIR)${gamedir}" && \ | 277 | ifneq (,$(use_gamedir)) |
| 278 | umask 022 && ${MKDIR_P} "$(DESTDIR)${gamedir}" | ||
| 276 | touch "$(DESTDIR)${gamedir}/snake-scores" \ | 279 | touch "$(DESTDIR)${gamedir}/snake-scores" \ |
| 277 | "$(DESTDIR)${gamedir}/tetris-scores" | 280 | "$(DESTDIR)${gamedir}/tetris-scores" |
| 278 | ifneq ($(gameuser),) | 281 | ifneq (,$(gameuser)) |
| 279 | if chown ${gameuser} \ | 282 | chown ${gameuser} "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" |
| 280 | "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && \ | 283 | chmod u+s,go-r "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" |
| 281 | chmod u+s,go-r \ | 284 | chown ${gameuser} "$(DESTDIR)${gamedir}" |
| 282 | "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"; \ | 285 | chmod u=rwx,g=rx,o=rx "$(DESTDIR)${gamedir}" |
| 283 | then \ | 286 | else |
| 284 | chown ${gameuser} "$(DESTDIR)${gamedir}" && \ | 287 | chgrp ${gamegroup} "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" |
| 285 | chmod u=rwx,g=rx,o=rx "$(DESTDIR)${gamedir}"; \ | 288 | chmod g+s,o-r "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" |
| 286 | fi | 289 | chgrp ${gamegroup} "$(DESTDIR)${gamedir}" |
| 287 | else ifneq ($(gamegroup),) | 290 | chmod u=rwx,g=rwx,o=rx "$(DESTDIR)${gamedir}" |
| 288 | if chgrp ${gamegroup} \ | 291 | endif |
| 289 | "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && \ | 292 | endif |
| 290 | chmod g+s,o-r \ | ||
| 291 | "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"; \ | ||
| 292 | then \ | ||
| 293 | chgrp ${gamegroup} "$(DESTDIR)${gamedir}" && \ | ||
| 294 | chmod u=rwx,g=rwx,o=rx "$(DESTDIR)${gamedir}"; \ | ||
| 295 | fi | ||
| 296 | endif | ||
| 297 | exp_archlibdir=`cd "$(DESTDIR)${archlibdir}" && /bin/pwd` && \ | 293 | exp_archlibdir=`cd "$(DESTDIR)${archlibdir}" && /bin/pwd` && \ |
| 298 | if [ "$$exp_archlibdir" != "`cd ${srcdir} && /bin/pwd`" ]; then \ | 294 | if [ "$$exp_archlibdir" != "`cd ${srcdir} && /bin/pwd`" ]; then \ |
| 299 | for file in ${SCRIPTS}; do \ | 295 | for file in ${SCRIPTS}; do \ |
diff --git a/lib-src/update-game-score.exe.manifest b/lib-src/update-game-score.exe.manifest deleted file mode 100644 index 1db836bec6b..00000000000 --- a/lib-src/update-game-score.exe.manifest +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
| 2 | <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | ||
| 3 | <v3:trustInfo xmlns:v3="urn:schemas-microsoft-com:asm.v3"> | ||
| 4 | <v3:security> | ||
| 5 | <v3:requestedPrivileges> | ||
| 6 | <v3:requestedExecutionLevel level="asInvoker" /> | ||
| 7 | </v3:requestedPrivileges> | ||
| 8 | </v3:security> | ||
| 9 | </v3:trustInfo> | ||
| 10 | </assembly> | ||
diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el index b0ccbd3b63d..0386a89b3a4 100644 --- a/lisp/play/gamegrid.el +++ b/lisp/play/gamegrid.el | |||
| @@ -475,17 +475,19 @@ FILE is created there." | |||
| 475 | ;; update FILE. This is for the case that a user has installed | 475 | ;; update FILE. This is for the case that a user has installed |
| 476 | ;; a game on her own. | 476 | ;; a game on her own. |
| 477 | ;; | 477 | ;; |
| 478 | ;; 4. "update-game-score" is not setgid/setuid. Use it to | 478 | ;; 4. "update-game-score" does not exist or is not setgid/setuid. |
| 479 | ;; create/update FILE in the user's home directory. There is | 479 | ;; Create/update FILE in the user's home directory, without |
| 480 | ;; presumably no shared game directory. | 480 | ;; using "update-game-score". There is presumably no shared |
| 481 | ;; game directory. | ||
| 481 | 482 | ||
| 482 | (defvar gamegrid-shared-game-dir) | 483 | (defvar gamegrid-shared-game-dir) |
| 483 | 484 | ||
| 484 | (defun gamegrid-add-score-with-update-game-score (file score) | 485 | (defun gamegrid-add-score-with-update-game-score (file score) |
| 485 | (let ((gamegrid-shared-game-dir | 486 | (let ((gamegrid-shared-game-dir |
| 486 | (not (zerop (logand (file-modes | 487 | (not (zerop (logand (or (file-modes |
| 487 | (expand-file-name "update-game-score" | 488 | (expand-file-name "update-game-score" |
| 488 | exec-directory)) | 489 | exec-directory)) |
| 490 | 0) | ||
| 489 | #o6000))))) | 491 | #o6000))))) |
| 490 | (cond ((file-name-absolute-p file) | 492 | (cond ((file-name-absolute-p file) |
| 491 | (gamegrid-add-score-insecure file score)) | 493 | (gamegrid-add-score-insecure file score)) |
| @@ -497,23 +499,12 @@ FILE is created there." | |||
| 497 | (expand-file-name file shared-game-score-directory) score)) | 499 | (expand-file-name file shared-game-score-directory) score)) |
| 498 | ;; Else: Add the score to a score file in the user's home | 500 | ;; Else: Add the score to a score file in the user's home |
| 499 | ;; directory. | 501 | ;; directory. |
| 500 | (gamegrid-shared-game-dir | ||
| 501 | ;; If `gamegrid-shared-game-dir' is non-nil, then | ||
| 502 | ;; "update-gamescore" program is setuid, so don't use it. | ||
| 503 | (unless (file-exists-p | ||
| 504 | (directory-file-name gamegrid-user-score-file-directory)) | ||
| 505 | (make-directory gamegrid-user-score-file-directory t)) | ||
| 506 | (gamegrid-add-score-insecure file score | ||
| 507 | gamegrid-user-score-file-directory)) | ||
| 508 | (t | 502 | (t |
| 509 | (unless (file-exists-p | 503 | (unless (file-exists-p |
| 510 | (directory-file-name gamegrid-user-score-file-directory)) | 504 | (directory-file-name gamegrid-user-score-file-directory)) |
| 511 | (make-directory gamegrid-user-score-file-directory t)) | 505 | (make-directory gamegrid-user-score-file-directory t)) |
| 512 | (let ((f (expand-file-name file | 506 | (gamegrid-add-score-insecure file score |
| 513 | gamegrid-user-score-file-directory))) | 507 | gamegrid-user-score-file-directory))))) |
| 514 | (unless (file-exists-p f) | ||
| 515 | (write-region "" nil f nil 'silent nil 'excl)) | ||
| 516 | (gamegrid-add-score-with-update-game-score-1 file f score)))))) | ||
| 517 | 508 | ||
| 518 | (defun gamegrid-add-score-with-update-game-score-1 (file target score) | 509 | (defun gamegrid-add-score-with-update-game-score-1 (file target score) |
| 519 | (let ((default-directory "/") | 510 | (let ((default-directory "/") |
| @@ -459,7 +459,6 @@ echo "Making links to 'lib-src'" | |||
| 459 | ln [a-zA-Z]*.[ch] ../${tempdir}/lib-src | 459 | ln [a-zA-Z]*.[ch] ../${tempdir}/lib-src |
| 460 | ln ChangeLog.*[0-9] Makefile.in README ../${tempdir}/lib-src | 460 | ln ChangeLog.*[0-9] Makefile.in README ../${tempdir}/lib-src |
| 461 | ln rcs2log ../${tempdir}/lib-src | 461 | ln rcs2log ../${tempdir}/lib-src |
| 462 | ln update-game-score.exe.manifest ../${tempdir}/lib-src) | ||
| 463 | 462 | ||
| 464 | echo "Making links to 'm4'" | 463 | echo "Making links to 'm4'" |
| 465 | (cd m4 | 464 | (cd m4 |
diff --git a/src/callproc.c b/src/callproc.c index 08fa6e97722..05048576ce9 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1584,13 +1584,14 @@ init_callproc (void) | |||
| 1584 | sh = getenv ("SHELL"); | 1584 | sh = getenv ("SHELL"); |
| 1585 | Vshell_file_name = build_string (sh ? sh : "/bin/sh"); | 1585 | Vshell_file_name = build_string (sh ? sh : "/bin/sh"); |
| 1586 | 1586 | ||
| 1587 | #ifdef DOS_NT | 1587 | Lisp_Object gamedir = Qnil; |
| 1588 | Vshared_game_score_directory = Qnil; | 1588 | if (PATH_GAME) |
| 1589 | #else | 1589 | { |
| 1590 | Vshared_game_score_directory = build_unibyte_string (PATH_GAME); | 1590 | Lisp_Object path_game = build_unibyte_string (PATH_GAME); |
| 1591 | if (NILP (Ffile_accessible_directory_p (Vshared_game_score_directory))) | 1591 | if (file_accessible_directory_p (path_game)) |
| 1592 | Vshared_game_score_directory = Qnil; | 1592 | gamedir = path_game; |
| 1593 | #endif | 1593 | } |
| 1594 | Vshared_game_score_directory = gamedir; | ||
| 1594 | } | 1595 | } |
| 1595 | 1596 | ||
| 1596 | void | 1597 | void |
| @@ -1661,11 +1662,6 @@ includes this. */); | |||
| 1661 | DEFVAR_LISP ("shared-game-score-directory", Vshared_game_score_directory, | 1662 | DEFVAR_LISP ("shared-game-score-directory", Vshared_game_score_directory, |
| 1662 | doc: /* Directory of score files for games which come with GNU Emacs. | 1663 | doc: /* Directory of score files for games which come with GNU Emacs. |
| 1663 | If this variable is nil, then Emacs is unable to use a shared directory. */); | 1664 | If this variable is nil, then Emacs is unable to use a shared directory. */); |
| 1664 | #ifdef DOS_NT | ||
| 1665 | Vshared_game_score_directory = Qnil; | ||
| 1666 | #else | ||
| 1667 | Vshared_game_score_directory = build_string (PATH_GAME); | ||
| 1668 | #endif | ||
| 1669 | 1665 | ||
| 1670 | DEFVAR_LISP ("initial-environment", Vinitial_environment, | 1666 | DEFVAR_LISP ("initial-environment", Vinitial_environment, |
| 1671 | doc: /* List of environment variables inherited from the parent process. | 1667 | doc: /* List of environment variables inherited from the parent process. |