aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorEli Zaretskii2012-12-10 14:08:02 +0200
committerEli Zaretskii2012-12-10 14:08:02 +0200
commit3907e630a71d48e693062b350571990d7ba08bbb (patch)
tree2be1ecc0796e42c7a453a9fd5131eb5866f79876 /lib-src
parentcf2d22b874ca2df0072e32ee641e8efffe4abd6d (diff)
parent81606b10501169a5671061b8461bbc32dcec8705 (diff)
downloademacs-3907e630a71d48e693062b350571990d7ba08bbb.tar.gz
emacs-3907e630a71d48e693062b350571990d7ba08bbb.zip
Merge from trunk + rename the event. Not tested yet.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog49
-rw-r--r--lib-src/emacsclient.c27
-rw-r--r--lib-src/etags.c116
-rw-r--r--lib-src/makefile.w32-in6
-rw-r--r--lib-src/movemail.c34
-rw-r--r--lib-src/update-game-score.c2
6 files changed, 114 insertions, 120 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 08c9a4176ac..3a5440ed782 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,52 @@
12012-12-02 Kevin Ryde <user42@zip.com.au>
2
3 * etags.c (Lisp_functions): Skip (defvar foo) declarations unless
4 the --declarations flag is enabled (Bug#5600).
5 (Lisp_help): Update.
6 (skip_name): New function.
7
82012-12-01 Kevin Ryde <user42@zip.com.au>
9
10 * etags.c (Perl_functions): Support "use constant" (Bug#5055).
11
122012-11-27 Paul Eggert <eggert@cs.ucla.edu>
13
14 Assume POSIX 1003.1-1988 or later for errno.h (Bug#12968).
15 * movemail.c (main): Assume EAGAIN and EBUSY.
16
172012-11-23 Paul Eggert <eggert@cs.ucla.edu>
18
19 movemail: treat EACCES etc. failures as permanent
20 * movemail.c (main): Treat any link failure other than EEXIST as a
21 permanent failure, not just EPERM. EACCES, for example.
22
232012-11-21 Paul Eggert <eggert@cs.ucla.edu>
24
25 Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945).
26 * emacsclient.c (getcwd): Remove decl.
27 (get_current_dir_name): Assume getcwd exists.
28 * etags.c (HAVE_GETCWD): Remove.
29 (getcwd): Remove decl.
30 (NO_LONG_OPTIONS): Remove this. All uses removed.
31 Emacs always has GNU getopt.
32 (etags_getcwd): Assume getcwd exists.
33 * movemail.c (F_OK, X_OK, W_OK, R_OK): Remove.
34
352012-11-20 Paul Eggert <eggert@cs.ucla.edu>
36
37 * emacsclient.c (handle_sigcont, handle_sigtstp): Use raise (sig)
38 rather than kill (getpid (), sig), as it's simpler and safer.
39
402012-11-17 Juanma Barranquero <lekktu@gmail.com>
41
42 * makefile.w32-in (SYSWAIT_H): New macro.
43 ($(BLD)/movemail.$(O)): Update dependencies.
44
452012-11-17 Paul Eggert <eggert@cs.ucla.edu>
46
47 Assume POSIX 1003.1-1988 or later for fcntl.h (Bug#12881).
48 * movemail.c, update-game-score.c: Assume <fcntl.h> exists.
49
12012-10-26 Glenn Morris <rgm@gnu.org> 502012-10-26 Glenn Morris <rgm@gnu.org>
2 51
3 * Makefile.in (uninstall): No INSTALLABLES live in archlibdir. 52 * Makefile.in (uninstall): No INSTALLABLES live in archlibdir.
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 8d60d7961da..021ac6eb247 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -88,10 +88,7 @@ char *w32_getenv (char *);
88 88
89 89
90 90
91char *getenv (const char *), *getwd (char *); 91char *getenv (const char *);
92#ifdef HAVE_GETCWD
93char *(getcwd) (char *, size_t);
94#endif
95 92
96#ifndef VERSION 93#ifndef VERSION
97#define VERSION "unspecified" 94#define VERSION "unspecified"
@@ -223,7 +220,7 @@ get_current_dir_name (void)
223 char *buf; 220 char *buf;
224 const char *pwd; 221 const char *pwd;
225 struct stat dotstat, pwdstat; 222 struct stat dotstat, pwdstat;
226 /* If PWD is accurate, use it instead of calling getwd. PWD is 223 /* If PWD is accurate, use it instead of calling getcwd. PWD is
227 sometimes a nicer name, and using it may avoid a fatal error if a 224 sometimes a nicer name, and using it may avoid a fatal error if a
228 parent directory is searchable but not readable. */ 225 parent directory is searchable but not readable. */
229 if ((pwd = egetenv ("PWD")) != 0 226 if ((pwd = egetenv ("PWD")) != 0
@@ -240,7 +237,6 @@ get_current_dir_name (void)
240 buf = (char *) xmalloc (strlen (pwd) + 1); 237 buf = (char *) xmalloc (strlen (pwd) + 1);
241 strcpy (buf, pwd); 238 strcpy (buf, pwd);
242 } 239 }
243#ifdef HAVE_GETCWD
244 else 240 else
245 { 241 {
246 size_t buf_size = 1024; 242 size_t buf_size = 1024;
@@ -267,20 +263,6 @@ get_current_dir_name (void)
267 } 263 }
268 } 264 }
269 } 265 }
270#else
271 else
272 {
273 /* We need MAXPATHLEN here. */
274 buf = (char *) xmalloc (MAXPATHLEN + 1);
275 if (getwd (buf) == NULL)
276 {
277 int tmp_errno = errno;
278 free (buf);
279 errno = tmp_errno;
280 return NULL;
281 }
282 }
283#endif
284 return buf; 266 return buf;
285} 267}
286#endif 268#endif
@@ -1138,7 +1120,7 @@ handle_sigcont (int signalnum)
1138 else 1120 else
1139 { 1121 {
1140 /* We are in the background; cancel the continue. */ 1122 /* We are in the background; cancel the continue. */
1141 kill (getpid (), SIGSTOP); 1123 raise (SIGSTOP);
1142 } 1124 }
1143 1125
1144 signal (signalnum, handle_sigcont); 1126 signal (signalnum, handle_sigcont);
@@ -1165,7 +1147,7 @@ handle_sigtstp (int signalnum)
1165 sigprocmask (SIG_BLOCK, NULL, &set); 1147 sigprocmask (SIG_BLOCK, NULL, &set);
1166 sigdelset (&set, signalnum); 1148 sigdelset (&set, signalnum);
1167 signal (signalnum, SIG_DFL); 1149 signal (signalnum, SIG_DFL);
1168 kill (getpid (), signalnum); 1150 raise (signalnum);
1169 sigprocmask (SIG_SETMASK, &set, NULL); /* Let's the above signal through. */ 1151 sigprocmask (SIG_SETMASK, &set, NULL); /* Let's the above signal through. */
1170 signal (signalnum, handle_sigtstp); 1152 signal (signalnum, handle_sigtstp);
1171 1153
@@ -1592,7 +1574,6 @@ main (int argc, char **argv)
1592 cwd = get_current_dir_name (); 1574 cwd = get_current_dir_name ();
1593 if (cwd == 0) 1575 if (cwd == 0)
1594 { 1576 {
1595 /* getwd puts message in STRING if it fails. */
1596 message (TRUE, "%s: %s\n", progname, 1577 message (TRUE, "%s: %s\n", progname,
1597 "Cannot get current working directory"); 1578 "Cannot get current working directory");
1598 fail (); 1579 fail ();
diff --git a/lib-src/etags.c b/lib-src/etags.c
index ec415e9905f..d393c4d2e4a 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -123,19 +123,9 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
123# undef HAVE_NTGUI 123# undef HAVE_NTGUI
124# undef DOS_NT 124# undef DOS_NT
125# define DOS_NT 125# define DOS_NT
126# ifndef HAVE_GETCWD 126#endif /* WINDOWSNT */
127# define HAVE_GETCWD
128# endif /* undef HAVE_GETCWD */
129#else /* not WINDOWSNT */
130#endif /* !WINDOWSNT */
131 127
132#include <unistd.h> 128#include <unistd.h>
133#ifndef HAVE_UNISTD_H
134# if defined (HAVE_GETCWD) && !defined (WINDOWSNT)
135 extern char *getcwd (char *buf, size_t size);
136# endif
137#endif /* HAVE_UNISTD_H */
138
139#include <stdarg.h> 129#include <stdarg.h>
140#include <stdlib.h> 130#include <stdlib.h>
141#include <string.h> 131#include <string.h>
@@ -152,16 +142,7 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
152# define assert(x) ((void) 0) 142# define assert(x) ((void) 0)
153#endif 143#endif
154 144
155#ifdef NO_LONG_OPTIONS /* define this if you don't have GNU getopt */ 145#include <getopt.h>
156# define NO_LONG_OPTIONS TRUE
157# define getopt_long(argc,argv,optstr,lopts,lind) getopt (argc, argv, optstr)
158 extern char *optarg;
159 extern int optind, opterr;
160#else
161# define NO_LONG_OPTIONS FALSE
162# include <getopt.h>
163#endif /* NO_LONG_OPTIONS */
164
165#include <regex.h> 146#include <regex.h>
166 147
167/* Define CTAGS to make the program "ctags" compatible with the usual one. 148/* Define CTAGS to make the program "ctags" compatible with the usual one.
@@ -372,6 +353,7 @@ static void put_entries (node *);
372static char *concat (const char *, const char *, const char *); 353static char *concat (const char *, const char *, const char *);
373static char *skip_spaces (char *); 354static char *skip_spaces (char *);
374static char *skip_non_spaces (char *); 355static char *skip_non_spaces (char *);
356static char *skip_name (char *);
375static char *savenstr (const char *, int); 357static char *savenstr (const char *, int);
376static char *savestr (const char *); 358static char *savestr (const char *);
377static char *etags_strchr (const char *, int); 359static char *etags_strchr (const char *, int);
@@ -638,7 +620,8 @@ static const char Lisp_help [] =
638"In Lisp code, any function defined with `defun', any variable\n\ 620"In Lisp code, any function defined with `defun', any variable\n\
639defined with `defvar' or `defconst', and in general the first\n\ 621defined with `defvar' or `defconst', and in general the first\n\
640argument of any expression that starts with `(def' in column zero\n\ 622argument of any expression that starts with `(def' in column zero\n\
641is a tag."; 623is a tag.\n\
624The `--declarations' option tags \"(defvar foo)\" constructs too.";
642 625
643static const char *Lua_suffixes [] = 626static const char *Lua_suffixes [] =
644 { "lua", "LUA", NULL }; 627 { "lua", "LUA", NULL };
@@ -869,11 +852,7 @@ print_help (argument *argbuffer)
869 printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\ 852 printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\
870\n\ 853\n\
871These are the options accepted by %s.\n", progname, progname); 854These are the options accepted by %s.\n", progname, progname);
872 if (NO_LONG_OPTIONS) 855 puts ("You may use unambiguous abbreviations for the long option names.");
873 puts ("WARNING: long option names do not work with this executable,\n\
874as it is not linked with GNU getopt.");
875 else
876 puts ("You may use unambiguous abbreviations for the long option names.");
877 puts (" A - as file name means read names from stdin (one per line).\n\ 856 puts (" A - as file name means read names from stdin (one per line).\n\
878Absolute names are stored in the output file as they are.\n\ 857Absolute names are stored in the output file as they are.\n\
879Relative ones are stored relative to the output file's directory.\n"); 858Relative ones are stored relative to the output file's directory.\n");
@@ -1065,9 +1044,9 @@ main (int argc, char **argv)
1065 1044
1066 /* When the optstring begins with a '-' getopt_long does not rearrange the 1045 /* When the optstring begins with a '-' getopt_long does not rearrange the
1067 non-options arguments to be at the end, but leaves them alone. */ 1046 non-options arguments to be at the end, but leaves them alone. */
1068 optstring = concat (NO_LONG_OPTIONS ? "" : "-", 1047 optstring = concat ("-ac:Cf:Il:o:r:RSVhH",
1069 "ac:Cf:Il:o:r:RSVhH", 1048 (CTAGS) ? "BxdtTuvw" : "Di:",
1070 (CTAGS) ? "BxdtTuvw" : "Di:"); 1049 "");
1071 1050
1072 while ((opt = getopt_long (argc, argv, optstring, longopts, NULL)) != EOF) 1051 while ((opt = getopt_long (argc, argv, optstring, longopts, NULL)) != EOF)
1073 switch (opt) 1052 switch (opt)
@@ -4292,6 +4271,7 @@ Asm_labels (FILE *inf)
4292/* 4271/*
4293 * Perl support 4272 * Perl support
4294 * Perl sub names: /^sub[ \t\n]+[^ \t\n{]+/ 4273 * Perl sub names: /^sub[ \t\n]+[^ \t\n{]+/
4274 * /^use constant[ \t\n]+[^ \t\n{=,;]+/
4295 * Perl variable names: /^(my|local).../ 4275 * Perl variable names: /^(my|local).../
4296 * Original code by Bart Robinson <lomew@cs.utah.edu> (1995) 4276 * Original code by Bart Robinson <lomew@cs.utah.edu> (1995)
4297 * Additions by Michael Ernst <mernst@alum.mit.edu> (1997) 4277 * Additions by Michael Ernst <mernst@alum.mit.edu> (1997)
@@ -4314,9 +4294,10 @@ Perl_functions (FILE *inf)
4314 } 4294 }
4315 else if (LOOKING_AT (cp, "sub")) 4295 else if (LOOKING_AT (cp, "sub"))
4316 { 4296 {
4317 char *pos; 4297 char *pos, *sp;
4318 char *sp = cp;
4319 4298
4299 subr:
4300 sp = cp;
4320 while (!notinname (*cp)) 4301 while (!notinname (*cp))
4321 cp++; 4302 cp++;
4322 if (cp == sp) 4303 if (cp == sp)
@@ -4339,8 +4320,21 @@ Perl_functions (FILE *inf)
4339 lb.buffer, cp - lb.buffer + 1, lineno, linecharno); 4320 lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
4340 free (name); 4321 free (name);
4341 } 4322 }
4323 }
4324 else if (LOOKING_AT (cp, "use constant")
4325 || LOOKING_AT (cp, "use constant::defer"))
4326 {
4327 /* For hash style multi-constant like
4328 use constant { FOO => 123,
4329 BAR => 456 };
4330 only the first FOO is picked up. Parsing across the value
4331 expressions would be difficult in general, due to possible nested
4332 hashes, here-documents, etc. */
4333 if (*cp == '{')
4334 cp = skip_spaces (cp+1);
4335 goto subr;
4342 } 4336 }
4343 else if (globals) /* only if we are tagging global vars */ 4337 else if (globals) /* only if we are tagging global vars */
4344 { 4338 {
4345 /* Skip a qualifier, if any. */ 4339 /* Skip a qualifier, if any. */
4346 bool qual = LOOKING_AT (cp, "my") || LOOKING_AT (cp, "local"); 4340 bool qual = LOOKING_AT (cp, "my") || LOOKING_AT (cp, "local");
@@ -4755,6 +4749,19 @@ Lisp_functions (FILE *inf)
4755 if (dbp[0] != '(') 4749 if (dbp[0] != '(')
4756 continue; 4750 continue;
4757 4751
4752 /* "(defvar foo)" is a declaration rather than a definition. */
4753 if (! declarations)
4754 {
4755 char *p = dbp + 1;
4756 if (LOOKING_AT (p, "defvar"))
4757 {
4758 p = skip_name (p); /* past var name */
4759 p = skip_spaces (p);
4760 if (*p == ')')
4761 continue;
4762 }
4763 }
4764
4758 if (strneq (dbp+1, "def", 3) || strneq (dbp+1, "DEF", 3)) 4765 if (strneq (dbp+1, "def", 3) || strneq (dbp+1, "DEF", 3))
4759 { 4766 {
4760 dbp = skip_non_spaces (dbp); 4767 dbp = skip_non_spaces (dbp);
@@ -6315,6 +6322,16 @@ skip_non_spaces (char *cp)
6315 return cp; 6322 return cp;
6316} 6323}
6317 6324
6325/* Skip any chars in the "name" class.*/
6326static char *
6327skip_name (char *cp)
6328{
6329 /* '\0' is a notinname() so loop stops there too */
6330 while (! notinname (*cp))
6331 cp++;
6332 return cp;
6333}
6334
6318/* Print error message and exit. */ 6335/* Print error message and exit. */
6319void 6336void
6320fatal (const char *s1, const char *s2) 6337fatal (const char *s1, const char *s2)
@@ -6333,8 +6350,8 @@ pfatal (const char *s1)
6333static void 6350static void
6334suggest_asking_for_help (void) 6351suggest_asking_for_help (void)
6335{ 6352{
6336 fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n", 6353 fprintf (stderr, "\tTry `%s --help' for a complete list of options.\n",
6337 progname, NO_LONG_OPTIONS ? "-h" : "--help"); 6354 progname);
6338 exit (EXIT_FAILURE); 6355 exit (EXIT_FAILURE);
6339} 6356}
6340 6357
@@ -6372,7 +6389,6 @@ concat (const char *s1, const char *s2, const char *s3)
6372static char * 6389static char *
6373etags_getcwd (void) 6390etags_getcwd (void)
6374{ 6391{
6375#ifdef HAVE_GETCWD
6376 int bufsize = 200; 6392 int bufsize = 200;
6377 char *path = xnew (bufsize, char); 6393 char *path = xnew (bufsize, char);
6378 6394
@@ -6387,34 +6403,6 @@ etags_getcwd (void)
6387 6403
6388 canonicalize_filename (path); 6404 canonicalize_filename (path);
6389 return path; 6405 return path;
6390
6391#else /* not HAVE_GETCWD */
6392#if MSDOS
6393
6394 char *p, path[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */
6395
6396 getwd (path);
6397
6398 for (p = path; *p != '\0'; p++)
6399 if (*p == '\\')
6400 *p = '/';
6401 else
6402 *p = lowcase (*p);
6403
6404 return strdup (path);
6405#else /* not MSDOS */
6406 linebuffer path;
6407 FILE *pipe;
6408
6409 linebuffer_init (&path);
6410 pipe = (FILE *) popen ("pwd 2>/dev/null", "r");
6411 if (pipe == NULL || readline_internal (&path, pipe) == 0)
6412 pfatal ("pwd");
6413 pclose (pipe);
6414
6415 return path.buffer;
6416#endif /* not MSDOS */
6417#endif /* not HAVE_GETCWD */
6418} 6406}
6419 6407
6420/* Return a newly allocated string containing the file name of FILE 6408/* Return a newly allocated string containing the file name of FILE
diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in
index 9fc3a507e94..9e005a56211 100644
--- a/lib-src/makefile.w32-in
+++ b/lib-src/makefile.w32-in
@@ -374,6 +374,8 @@ NTLIB_H = $(LIB_SRC)/ntlib.h \
374SYSTIME_H = $(SRC)/systime.h \ 374SYSTIME_H = $(SRC)/systime.h \
375 $(NT_INC)/sys/time.h \ 375 $(NT_INC)/sys/time.h \
376 $(GNU_LIB)/timespec.h 376 $(GNU_LIB)/timespec.h
377SYSWAIT_H = $(SRC)/syswait.h \
378 $(NT_INC)/sys/wait.h
377 379
378$(BLD)/ctags.$(O) : \ 380$(BLD)/ctags.$(O) : \
379 $(LIB_SRC)/ctags.c \ 381 $(LIB_SRC)/ctags.c \
@@ -419,14 +421,14 @@ $(BLD)/make-docfile.$(O) : \
419$(BLD)/movemail.$(O) : \ 421$(BLD)/movemail.$(O) : \
420 $(LIB_SRC)/movemail.c \ 422 $(LIB_SRC)/movemail.c \
421 $(LIB_SRC)/pop.h \ 423 $(LIB_SRC)/pop.h \
422 $(SRC)/syswait.h \
423 $(NT_INC)/pwd.h \ 424 $(NT_INC)/pwd.h \
424 $(NT_INC)/sys/file.h \ 425 $(NT_INC)/sys/file.h \
425 $(NT_INC)/sys/stat.h \ 426 $(NT_INC)/sys/stat.h \
426 $(NT_INC)/unistd.h \ 427 $(NT_INC)/unistd.h \
427 $(GNU_LIB)/getopt.h \ 428 $(GNU_LIB)/getopt.h \
428 $(CONFIG_H) \ 429 $(CONFIG_H) \
429 $(NTLIB_H) 430 $(NTLIB_H) \
431 $(SYSWAIT_H)
430 432
431$(BLD)/ntlib.$(O) : \ 433$(BLD)/ntlib.$(O) : \
432 $(LIB_SRC)/ntlib.c \ 434 $(LIB_SRC)/ntlib.c \
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index 32d32e69abf..f2b2484c8e3 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -65,9 +65,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
65 65
66#include <getopt.h> 66#include <getopt.h>
67#include <unistd.h> 67#include <unistd.h>
68#ifdef HAVE_FCNTL_H
69#include <fcntl.h> 68#include <fcntl.h>
70#endif
71#include <string.h> 69#include <string.h>
72#include "syswait.h" 70#include "syswait.h"
73#ifdef MAIL_USE_POP 71#ifdef MAIL_USE_POP
@@ -98,13 +96,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
98#include <fcntl.h> 96#include <fcntl.h>
99#endif /* WINDOWSNT */ 97#endif /* WINDOWSNT */
100 98
101#ifndef F_OK
102#define F_OK 0
103#define X_OK 1
104#define W_OK 2
105#define R_OK 4
106#endif
107
108#ifdef WINDOWSNT 99#ifdef WINDOWSNT
109#include <sys/locking.h> 100#include <sys/locking.h>
110#endif 101#endif
@@ -337,11 +328,8 @@ main (int argc, char **argv)
337 328
338 tem = link (tempname, lockname); 329 tem = link (tempname, lockname);
339 330
340#ifdef EPERM 331 if (tem < 0 && errno != EEXIST)
341 if (tem < 0 && errno == EPERM) 332 pfatal_with_name (lockname);
342 fatal ("Unable to create hard link between %s and %s",
343 tempname, lockname);
344#endif
345 333
346 unlink (tempname); 334 unlink (tempname);
347 if (tem >= 0) 335 if (tem >= 0)
@@ -442,22 +430,10 @@ main (int argc, char **argv)
442 for certain failure codes. */ 430 for certain failure codes. */
443 if (status < 0) 431 if (status < 0)
444 { 432 {
445 if (++lockcount <= 5) 433 if (++lockcount <= 5 && (errno == EAGAIN || errno == EBUSY))
446 { 434 {
447#ifdef EAGAIN 435 sleep (1);
448 if (errno == EAGAIN) 436 goto retry_lock;
449 {
450 sleep (1);
451 goto retry_lock;
452 }
453#endif
454#ifdef EBUSY
455 if (errno == EBUSY)
456 {
457 sleep (1);
458 goto retry_lock;
459 }
460#endif
461 } 437 }
462 438
463 pfatal_with_name (inname); 439 pfatal_with_name (inname);
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c
index 40397536fad..59cab61aa29 100644
--- a/lib-src/update-game-score.c
+++ b/lib-src/update-game-score.c
@@ -42,9 +42,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
42#include <time.h> 42#include <time.h>
43#include <pwd.h> 43#include <pwd.h>
44#include <ctype.h> 44#include <ctype.h>
45#ifdef HAVE_FCNTL_H
46#include <fcntl.h> 45#include <fcntl.h>
47#endif
48#include <sys/stat.h> 46#include <sys/stat.h>
49#include <getopt.h> 47#include <getopt.h>
50 48