aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorMichael R. Mauger2017-07-03 15:32:41 -0400
committerMichael R. Mauger2017-07-03 15:32:41 -0400
commit776635c01abd4aa759e7aa9584b513146978568c (patch)
tree554f444bc96cb6b05435e8bf195de4df1b00df8f /lib-src
parent77083e2d34ba5559ae2899d3b03cf08c2e6c5ad4 (diff)
parent4cd0db3d6e6e4d5bd49283483bdafbbfc0f583f1 (diff)
downloademacs-776635c01abd4aa759e7aa9584b513146978568c.tar.gz
emacs-776635c01abd4aa759e7aa9584b513146978568c.zip
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ebrowse.c13
-rw-r--r--lib-src/emacsclient.c26
-rw-r--r--lib-src/etags.c29
-rw-r--r--lib-src/hexl.c2
-rw-r--r--lib-src/make-docfile.c26
-rw-r--r--lib-src/movemail.c4
-rw-r--r--lib-src/ntlib.c25
-rw-r--r--lib-src/profile.c2
-rw-r--r--lib-src/update-game-score.c3
9 files changed, 58 insertions, 72 deletions
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c
index 623911027ce..e77b7c94cca 100644
--- a/lib-src/ebrowse.c
+++ b/lib-src/ebrowse.c
@@ -20,21 +20,21 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#include <config.h> 21#include <config.h>
22#include <stddef.h> 22#include <stddef.h>
23#include <stdio.h>
24#include <stdlib.h> 23#include <stdlib.h>
25#include <string.h> 24#include <string.h>
26#include <ctype.h> 25#include <ctype.h>
27#include <assert.h> 26#include <assert.h>
28#include <getopt.h> 27#include <getopt.h>
29 28
29#include <flexmember.h>
30#include <min-max.h>
31#include <unlocked-io.h>
32
30/* The SunOS compiler doesn't have SEEK_END. */ 33/* The SunOS compiler doesn't have SEEK_END. */
31#ifndef SEEK_END 34#ifndef SEEK_END
32#define SEEK_END 2 35#define SEEK_END 2
33#endif 36#endif
34 37
35#include <flexmember.h>
36#include <min-max.h>
37
38/* Files are read in chunks of this number of bytes. */ 38/* Files are read in chunks of this number of bytes. */
39 39
40enum { READ_CHUNK_SIZE = 100 * 1024 }; 40enum { READ_CHUNK_SIZE = 100 * 1024 };
@@ -3059,8 +3059,7 @@ class_definition (struct sym *containing, int tag, int flags, int nested)
3059 MATCH until we see something like `;' or `{'. */ 3059 MATCH until we see something like `;' or `{'. */
3060 while (!LOOKING_AT3 (';', YYEOF, '{')) 3060 while (!LOOKING_AT3 (';', YYEOF, '{'))
3061 MATCH (); 3061 MATCH ();
3062 done = 1; 3062 FALLTHROUGH;
3063
3064 case '{': 3063 case '{':
3065 done = 1; 3064 done = 1;
3066 break; 3065 break;
@@ -3184,7 +3183,7 @@ declaration (int flags)
3184 free (id); 3183 free (id);
3185 return; 3184 return;
3186 } 3185 }
3187 3186 FALLTHROUGH;
3188 case '=': 3187 case '=':
3189 /* Assumed to be the start of an initialization in this 3188 /* Assumed to be the start of an initialization in this
3190 context. */ 3189 context. */
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 7b735dfb05d..f1d4e8976da 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -73,7 +73,6 @@ char *w32_getenv (const char *);
73 73
74#include <stdarg.h> 74#include <stdarg.h>
75#include <ctype.h> 75#include <ctype.h>
76#include <stdio.h>
77#include <stdlib.h> 76#include <stdlib.h>
78#include <string.h> 77#include <string.h>
79#include <getopt.h> 78#include <getopt.h>
@@ -84,6 +83,8 @@ char *w32_getenv (const char *);
84#include <signal.h> 83#include <signal.h>
85#include <errno.h> 84#include <errno.h>
86 85
86#include <unlocked-io.h>
87
87#ifndef VERSION 88#ifndef VERSION
88#define VERSION "unspecified" 89#define VERSION "unspecified"
89#endif 90#endif
@@ -149,6 +150,9 @@ const char *socket_name = NULL;
149/* If non-NULL, the filename of the authentication file. */ 150/* If non-NULL, the filename of the authentication file. */
150const char *server_file = NULL; 151const char *server_file = NULL;
151 152
153/* If non-NULL, the tramp prefix emacs must use to find the files. */
154const char *tramp_prefix = NULL;
155
152/* PID of the Emacs server process. */ 156/* PID of the Emacs server process. */
153int emacs_pid = 0; 157int emacs_pid = 0;
154 158
@@ -178,6 +182,7 @@ struct option longopts[] =
178 { "server-file", required_argument, NULL, 'f' }, 182 { "server-file", required_argument, NULL, 'f' },
179 { "display", required_argument, NULL, 'd' }, 183 { "display", required_argument, NULL, 'd' },
180 { "parent-id", required_argument, NULL, 'p' }, 184 { "parent-id", required_argument, NULL, 'p' },
185 { "tramp", required_argument, NULL, 'T' },
181 { 0, 0, 0, 0 } 186 { 0, 0, 0, 0 }
182}; 187};
183 188
@@ -204,7 +209,7 @@ char *get_current_dir_name (void);
204/* Return the current working directory. Returns NULL on errors. 209/* Return the current working directory. Returns NULL on errors.
205 Any other returned value must be freed with free. This is used 210 Any other returned value must be freed with free. This is used
206 only when get_current_dir_name is not defined on the system. */ 211 only when get_current_dir_name is not defined on the system. */
207char* 212char *
208get_current_dir_name (void) 213get_current_dir_name (void)
209{ 214{
210 char *buf; 215 char *buf;
@@ -468,14 +473,15 @@ static void
468decode_options (int argc, char **argv) 473decode_options (int argc, char **argv)
469{ 474{
470 alternate_editor = egetenv ("ALTERNATE_EDITOR"); 475 alternate_editor = egetenv ("ALTERNATE_EDITOR");
476 tramp_prefix = egetenv ("EMACSCLIENT_TRAMP");
471 477
472 while (1) 478 while (1)
473 { 479 {
474 int opt = getopt_long_only (argc, argv, 480 int opt = getopt_long_only (argc, argv,
475#ifndef NO_SOCKETS_IN_FILE_SYSTEM 481#ifndef NO_SOCKETS_IN_FILE_SYSTEM
476 "VHnequa:s:f:d:F:tc", 482 "VHnequa:s:f:d:F:tcT:",
477#else 483#else
478 "VHnequa:f:d:F:tc", 484 "VHnequa:f:d:F:tcT:",
479#endif 485#endif
480 longopts, 0); 486 longopts, 0);
481 487
@@ -554,6 +560,10 @@ decode_options (int argc, char **argv)
554 frame_parameters = optarg; 560 frame_parameters = optarg;
555 break; 561 break;
556 562
563 case 'T':
564 tramp_prefix = optarg;
565 break;
566
557 default: 567 default:
558 message (true, "Try '%s --help' for more information\n", progname); 568 message (true, "Try '%s --help' for more information\n", progname);
559 exit (EXIT_FAILURE); 569 exit (EXIT_FAILURE);
@@ -654,6 +664,9 @@ The following OPTIONS are accepted:\n\
654 Editor to fallback to if the server is not running\n" 664 Editor to fallback to if the server is not running\n"
655" If EDITOR is the empty string, start Emacs in daemon\n\ 665" If EDITOR is the empty string, start Emacs in daemon\n\
656 mode and try connecting again\n" 666 mode and try connecting again\n"
667"-T PREFIX, --tramp=PREFIX\n\
668 PREFIX to prepend to filenames sent by emacsclient\n\
669 for locating files remotely via Tramp\n"
657"\n\ 670"\n\
658Report bugs with M-x report-emacs-bug.\n"); 671Report bugs with M-x report-emacs-bug.\n");
659 exit (EXIT_SUCCESS); 672 exit (EXIT_SUCCESS);
@@ -1687,7 +1700,10 @@ main (int argc, char **argv)
1687 } 1700 }
1688 } 1701 }
1689 send_to_emacs (emacs_socket, "-dir "); 1702 send_to_emacs (emacs_socket, "-dir ");
1703 if (tramp_prefix)
1704 quote_argument (emacs_socket, tramp_prefix);
1690 quote_argument (emacs_socket, cwd); 1705 quote_argument (emacs_socket, cwd);
1706 free (cwd);
1691 send_to_emacs (emacs_socket, "/"); 1707 send_to_emacs (emacs_socket, "/");
1692 send_to_emacs (emacs_socket, " "); 1708 send_to_emacs (emacs_socket, " ");
1693 1709
@@ -1791,6 +1807,8 @@ main (int argc, char **argv)
1791#endif 1807#endif
1792 1808
1793 send_to_emacs (emacs_socket, "-file "); 1809 send_to_emacs (emacs_socket, "-file ");
1810 if (tramp_prefix && file_name_absolute_p (argv[i]))
1811 quote_argument (emacs_socket, tramp_prefix);
1794 quote_argument (emacs_socket, argv[i]); 1812 quote_argument (emacs_socket, argv[i]);
1795 send_to_emacs (emacs_socket, " "); 1813 send_to_emacs (emacs_socket, " ");
1796 } 1814 }
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 015cbbe0ef3..e5ff7bd10fc 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -123,6 +123,7 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
123#include <errno.h> 123#include <errno.h>
124#include <fcntl.h> 124#include <fcntl.h>
125#include <binary-io.h> 125#include <binary-io.h>
126#include <unlocked-io.h>
126#include <c-ctype.h> 127#include <c-ctype.h>
127#include <c-strcase.h> 128#include <c-strcase.h>
128 129
@@ -1157,7 +1158,7 @@ main (int argc, char **argv)
1157 case 'c': 1158 case 'c':
1158 /* Backward compatibility: support obsolete --ignore-case-regexp. */ 1159 /* Backward compatibility: support obsolete --ignore-case-regexp. */
1159 optarg = concat (optarg, "i", ""); /* memory leak here */ 1160 optarg = concat (optarg, "i", ""); /* memory leak here */
1160 /* FALLTHRU */ 1161 FALLTHROUGH;
1161 case 'r': 1162 case 'r':
1162 argbuffer[current_arg].arg_type = at_regexp; 1163 argbuffer[current_arg].arg_type = at_regexp;
1163 argbuffer[current_arg].what = optarg; 1164 argbuffer[current_arg].what = optarg;
@@ -1192,7 +1193,7 @@ main (int argc, char **argv)
1192 case 't': typedefs = true; break; 1193 case 't': typedefs = true; break;
1193 case 'T': typedefs = typedefs_or_cplusplus = true; break; 1194 case 'T': typedefs = typedefs_or_cplusplus = true; break;
1194 case 'u': update = true; break; 1195 case 'u': update = true; break;
1195 case 'v': vgrind_style = true; /*FALLTHRU*/ 1196 case 'v': vgrind_style = true; FALLTHROUGH;
1196 case 'x': cxref_style = true; break; 1197 case 'x': cxref_style = true; break;
1197 case 'w': no_warnings = true; break; 1198 case 'w': no_warnings = true; break;
1198 default: 1199 default:
@@ -2564,7 +2565,7 @@ hash (const char *str, int len)
2564 { 2565 {
2565 default: 2566 default:
2566 hval += asso_values[(unsigned char) str[2]]; 2567 hval += asso_values[(unsigned char) str[2]];
2567 /*FALLTHROUGH*/ 2568 FALLTHROUGH;
2568 case 2: 2569 case 2:
2569 hval += asso_values[(unsigned char) str[1]]; 2570 hval += asso_values[(unsigned char) str[1]];
2570 break; 2571 break;
@@ -3013,7 +3014,7 @@ consider_token (char *str, int len, int c, int *c_extp,
3013 *c_extp = (*c_extp | C_PLPL) & ~C_AUTO; 3014 *c_extp = (*c_extp | C_PLPL) & ~C_AUTO;
3014 if (toktype == st_C_template) 3015 if (toktype == st_C_template)
3015 break; 3016 break;
3016 /* FALLTHRU */ 3017 FALLTHROUGH;
3017 case st_C_struct: 3018 case st_C_struct:
3018 case st_C_enum: 3019 case st_C_enum:
3019 if (parlev == 0 3020 if (parlev == 0
@@ -3176,7 +3177,7 @@ consider_token (char *str, int len, int c, int *c_extp,
3176 default: 3177 default:
3177 break; 3178 break;
3178 } 3179 }
3179 /* FALLTHRU */ 3180 FALLTHROUGH;
3180 case fvnameseen: 3181 case fvnameseen:
3181 if (len >= 10 && strneq (str+len-10, "::operator", 10)) 3182 if (len >= 10 && strneq (str+len-10, "::operator", 10))
3182 { 3183 {
@@ -3387,7 +3388,7 @@ C_entries (int c_ext, FILE *inf)
3387 case '\0': 3388 case '\0':
3388 /* Hmmm, something went wrong. */ 3389 /* Hmmm, something went wrong. */
3389 CNL (); 3390 CNL ();
3390 /* FALLTHRU */ 3391 FALLTHROUGH;
3391 case '\'': 3392 case '\'':
3392 inchar = false; 3393 inchar = false;
3393 break; 3394 break;
@@ -3828,7 +3829,7 @@ C_entries (int c_ext, FILE *inf)
3828 || (members 3829 || (members
3829 && plainc && instruct)) 3830 && plainc && instruct))
3830 make_C_tag (true); /* a function */ 3831 make_C_tag (true); /* a function */
3831 /* FALLTHRU */ 3832 FALLTHROUGH;
3832 default: 3833 default:
3833 fvextern = false; 3834 fvextern = false;
3834 fvdef = fvnone; 3835 fvdef = fvnone;
@@ -3838,7 +3839,7 @@ C_entries (int c_ext, FILE *inf)
3838 else 3839 else
3839 token.valid = false; 3840 token.valid = false;
3840 } /* switch (fvdef) */ 3841 } /* switch (fvdef) */
3841 /* FALLTHRU */ 3842 FALLTHROUGH;
3842 default: 3843 default:
3843 if (!instruct) 3844 if (!instruct)
3844 typdef = tnone; 3845 typdef = tnone;
@@ -3926,7 +3927,7 @@ C_entries (int c_ext, FILE *inf)
3926 || (globals && bracelev == 0 3927 || (globals && bracelev == 0
3927 && (!fvextern || declarations))) 3928 && (!fvextern || declarations)))
3928 make_C_tag (false); /* a variable */ 3929 make_C_tag (false); /* a variable */
3929 /* FALLTHRU */ 3930 FALLTHROUGH;
3930 default: 3931 default:
3931 fvdef = fvnone; 3932 fvdef = fvnone;
3932 } 3933 }
@@ -3959,7 +3960,7 @@ C_entries (int c_ext, FILE *inf)
3959 fvdef = fignore; 3960 fvdef = fignore;
3960 break; 3961 break;
3961 } 3962 }
3962 /* FALLTHRU */ 3963 FALLTHROUGH;
3963 case foperator: 3964 case foperator:
3964 fvdef = fstartlist; 3965 fvdef = fstartlist;
3965 break; 3966 break;
@@ -4049,7 +4050,7 @@ C_entries (int c_ext, FILE *inf)
4049 } 4050 }
4050 } 4051 }
4051 make_C_tag (true); /* a function */ 4052 make_C_tag (true); /* a function */
4052 /* FALLTHRU */ 4053 FALLTHROUGH;
4053 case fignore: 4054 case fignore:
4054 fvdef = fvnone; 4055 fvdef = fvnone;
4055 break; 4056 break;
@@ -4142,7 +4143,7 @@ C_entries (int c_ext, FILE *inf)
4142 if ((members && bracelev == 1) 4143 if ((members && bracelev == 1)
4143 || (globals && bracelev == 0 && (!fvextern || declarations))) 4144 || (globals && bracelev == 0 && (!fvextern || declarations)))
4144 make_C_tag (false); /* a variable */ 4145 make_C_tag (false); /* a variable */
4145 /* FALLTHRU */ 4146 FALLTHROUGH;
4146 default: 4147 default:
4147 fvdef = vignore; 4148 fvdef = vignore;
4148 } 4149 }
@@ -4169,7 +4170,7 @@ C_entries (int c_ext, FILE *inf)
4169 objdef = omethodsign; 4170 objdef = omethodsign;
4170 break; 4171 break;
4171 } 4172 }
4172 /* FALLTHRU */ 4173 FALLTHROUGH;
4173 resetfvdef: 4174 resetfvdef:
4174 case '#': case '~': case '&': case '%': case '/': 4175 case '#': case '~': case '&': case '%': case '/':
4175 case '|': case '^': case '!': case '.': case '?': 4176 case '|': case '^': case '!': case '.': case '?':
@@ -6354,7 +6355,7 @@ add_regex (char *regexp_pattern, language *lang)
6354 break; 6355 break;
6355 case 's': 6356 case 's':
6356 single_line = true; 6357 single_line = true;
6357 /* FALLTHRU */ 6358 FALLTHROUGH;
6358 case 'm': 6359 case 'm':
6359 multi_line = true; 6360 multi_line = true;
6360 need_filebuf = true; 6361 need_filebuf = true;
diff --git a/lib-src/hexl.c b/lib-src/hexl.c
index 319ce8bc890..d949af08902 100644
--- a/lib-src/hexl.c
+++ b/lib-src/hexl.c
@@ -22,11 +22,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
22#include <config.h> 22#include <config.h>
23 23
24#include <inttypes.h> 24#include <inttypes.h>
25#include <stdio.h>
26#include <stdlib.h> 25#include <stdlib.h>
27#include <string.h> 26#include <string.h>
28 27
29#include <binary-io.h> 28#include <binary-io.h>
29#include <unlocked-io.h>
30 30
31static char *progname; 31static char *progname;
32 32
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index 53970a06238..6b2cc110403 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -39,10 +39,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
39#include <stdarg.h> 39#include <stdarg.h>
40#include <stddef.h> 40#include <stddef.h>
41#include <stdint.h> 41#include <stdint.h>
42#include <stdio.h>
43#include <stdlib.h> 42#include <stdlib.h>
44#include <string.h> 43#include <string.h>
45 44
45#include <binary-io.h>
46#include <intprops.h>
47#include <min-max.h>
48#include <unlocked-io.h>
49
46#ifdef WINDOWSNT 50#ifdef WINDOWSNT
47/* Defined to be sys_fopen in ms-w32.h, but only #ifdef emacs, so this 51/* Defined to be sys_fopen in ms-w32.h, but only #ifdef emacs, so this
48 is really just insurance. */ 52 is really just insurance. */
@@ -50,10 +54,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
50#include <direct.h> 54#include <direct.h>
51#endif /* WINDOWSNT */ 55#endif /* WINDOWSNT */
52 56
53#include <binary-io.h>
54#include <intprops.h>
55#include <min-max.h>
56
57#ifdef DOS_NT 57#ifdef DOS_NT
58/* Defined to be sys_chdir in ms-w32.h, but only #ifdef emacs, so this 58/* Defined to be sys_chdir in ms-w32.h, but only #ifdef emacs, so this
59 is really just insurance. 59 is really just insurance.
@@ -845,8 +845,7 @@ scan_c_stream (FILE *infile)
845 bool defvarperbufferflag = false; 845 bool defvarperbufferflag = false;
846 bool defvarflag = false; 846 bool defvarflag = false;
847 enum global_type type = INVALID; 847 enum global_type type = INVALID;
848 static char *name; 848 static char name[sizeof input_buffer];
849 static ptrdiff_t name_size;
850 849
851 if (c != '\n' && c != '\r') 850 if (c != '\n' && c != '\r')
852 { 851 {
@@ -967,22 +966,13 @@ scan_c_stream (FILE *infile)
967 if (c < 0) 966 if (c < 0)
968 goto eof; 967 goto eof;
969 input_buffer[i++] = c; 968 input_buffer[i++] = c;
969 if (sizeof input_buffer <= i)
970 fatal ("identifier too long");
970 c = getc (infile); 971 c = getc (infile);
971 } 972 }
972 while (! (c == ',' || c == ' ' || c == '\t' 973 while (! (c == ',' || c == ' ' || c == '\t'
973 || c == '\n' || c == '\r')); 974 || c == '\n' || c == '\r'));
974 input_buffer[i] = '\0'; 975 input_buffer[i] = '\0';
975
976 if (name_size <= i)
977 {
978 free (name);
979 name_size = i + 1;
980 ptrdiff_t doubled;
981 if (! INT_MULTIPLY_WRAPV (name_size, 2, &doubled)
982 && doubled <= SIZE_MAX)
983 name_size = doubled;
984 name = xmalloc (name_size);
985 }
986 memcpy (name, input_buffer, i + 1); 976 memcpy (name, input_buffer, i + 1);
987 977
988 if (type == SYMBOL) 978 if (type == SYMBOL)
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index cd12c48ed36..e5ca0b16611 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -59,7 +59,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
59#include <sys/types.h> 59#include <sys/types.h>
60#include <sys/stat.h> 60#include <sys/stat.h>
61#include <sys/file.h> 61#include <sys/file.h>
62#include <stdio.h>
63#include <stdlib.h> 62#include <stdlib.h>
64#include <errno.h> 63#include <errno.h>
65#include <time.h> 64#include <time.h>
@@ -69,6 +68,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
69#include <fcntl.h> 68#include <fcntl.h>
70#include <signal.h> 69#include <signal.h>
71#include <string.h> 70#include <string.h>
71
72#include <unlocked-io.h>
73
72#include "syswait.h" 74#include "syswait.h"
73#ifdef MAIL_USE_POP 75#ifdef MAIL_USE_POP
74#include "pop.h" 76#include "pop.h"
diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c
index 4bffc612f9b..78ba9061f6b 100644
--- a/lib-src/ntlib.c
+++ b/lib-src/ntlib.c
@@ -50,8 +50,6 @@ struct timezone
50}; 50};
51#endif 51#endif
52 52
53void gettimeofday (struct timeval *, struct timezone *);
54
55#define MAXPATHLEN _MAX_PATH 53#define MAXPATHLEN _MAX_PATH
56 54
57/* Emulate sleep...we could have done this with a define, but that 55/* Emulate sleep...we could have done this with a define, but that
@@ -229,29 +227,6 @@ getpass (const char * prompt)
229 return NULL; 227 return NULL;
230} 228}
231 229
232/* This is needed because lib/gettime.c calls gettimeofday, which MSVC
233 doesn't have. Copied from w32.c. */
234void
235gettimeofday (struct timeval *tv, struct timezone *tz)
236{
237 struct _timeb tb;
238 _ftime (&tb);
239
240 tv->tv_sec = tb.time;
241 tv->tv_usec = tb.millitm * 1000L;
242 /* Implementation note: _ftime sometimes doesn't update the dstflag
243 according to the new timezone when the system timezone is
244 changed. We could fix that by using GetSystemTime and
245 GetTimeZoneInformation, but that doesn't seem necessary, since
246 Emacs always calls gettimeofday with the 2nd argument NULL (see
247 current_emacs_time). */
248 if (tz)
249 {
250 tz->tz_minuteswest = tb.timezone; /* minutes west of Greenwich */
251 tz->tz_dsttime = tb.dstflag; /* type of dst correction */
252 }
253}
254
255int 230int
256fchown (int fd, unsigned uid, unsigned gid) 231fchown (int fd, unsigned uid, unsigned gid)
257{ 232{
diff --git a/lib-src/profile.c b/lib-src/profile.c
index 253f00e2d80..f4ab45c1718 100644
--- a/lib-src/profile.c
+++ b/lib-src/profile.c
@@ -34,11 +34,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
34#include <config.h> 34#include <config.h>
35 35
36#include <inttypes.h> 36#include <inttypes.h>
37#include <stdio.h>
38#include <stdlib.h> 37#include <stdlib.h>
39 38
40#include <intprops.h> 39#include <intprops.h>
41#include <systime.h> 40#include <systime.h>
41#include <unlocked-io.h>
42 42
43static struct timespec TV1; 43static struct timespec TV1;
44static int watch_not_started = 1; /* flag */ 44static int watch_not_started = 1; /* flag */
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c
index 5edc8e79569..942aeeb399d 100644
--- a/lib-src/update-game-score.c
+++ b/lib-src/update-game-score.c
@@ -39,7 +39,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
39#include <limits.h> 39#include <limits.h>
40#include <string.h> 40#include <string.h>
41#include <stdlib.h> 41#include <stdlib.h>
42#include <stdio.h>
43#include <time.h> 42#include <time.h>
44#include <pwd.h> 43#include <pwd.h>
45#include <ctype.h> 44#include <ctype.h>
@@ -47,6 +46,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
47#include <sys/stat.h> 46#include <sys/stat.h>
48#include <getopt.h> 47#include <getopt.h>
49 48
49#include <unlocked-io.h>
50
50#ifdef WINDOWSNT 51#ifdef WINDOWSNT
51#include "ntlib.h" 52#include "ntlib.h"
52#endif 53#endif