Mercurial > emacs
annotate lib-src/ntlib.h @ 109516:68ca98ae70fb
Make building under stricter warning flags somewhat cleaner.
Flags used: -Wold-style-declaration -Wunused-function -Wstrict-prototypes
* lib-src/emacsclient.c (getcwd, w32_getenv):
* lib-src/ntlib.h (getlogin, getuid, getegid, getgid): Fix prototypes.
* nt/runemacs.c (set_user_model_id): Fix prototype.
* src/callproc.c (relocate_fd): Set inside #ifndef WINDOWSNT.
* src/dired.c (opendir, readdir): Fix prototypes.
* src/editfns.c (w32_get_internal_run_time): Fix prototypes.
* src/keyboard.c (input_available_signal): Declare inside #ifdef SIGIO.
* src/ndir.h (opendir, readdir, seekdir, closedir): Fix prototypes.
(telldir): Remove declaration.
* src/ralloc.c (real_morecore, __morecore): Fix prototypes.
* src/sound.c (alsa_sound_perror): Declare inside #ifdef HAVE_ALSA.
* src/syssignal.h (strsignal): Fix prototype.
* src/term.c (tparam): Fix prototype.
(term_get_fkeys_address, term_get_fkeys_kboard, term_get_fkeys_1)
(term_get_fkeys): Set inside "#ifndef DOS_NT".
* src/vm-limit.c (check_memory_limits): Fix prototypes of real_morecore
and __morecore.
* src/w32gui.h (XParseGeometry): Fix prototype.
* src/w32heap.h (get_data_start, get_data_end, init_heap): Fix prototypes.
* src/w32term.c (my_set_focus): Declare inside #if 0.
* src/w32term.h (x_window_to_frame, x_display_info_for_name, w32_term_init)
(w32_fill_rect, w32_clear_window, init_crit, delete_crit, signal_quit)
(drain_message_queue, get_next_msg, post_msg, parse_button)
(ClipboardSequence_Proc): Fix prototypes.
(wait_for_sync): Remove declaration.
| author | Juanma Barranquero <lekktu@gmail.com> |
|---|---|
| date | Sun, 25 Jul 2010 02:20:51 +0200 |
| parents | d86e65007470 |
| children | 417b1e4d63cd |
| rev | line source |
|---|---|
| 15139 | 1 /* Utility and Unix shadow routines for GNU Emacs support programs on NT. |
|
94828
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
2 Copyright (C) 1994, 2002, 2003, 2004, 2005, 2006, 2007, |
| 106815 | 3 2008, 2009, 2010 Free Software Foundation, Inc. |
| 15139 | 4 |
|
94828
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
5 This file is part of GNU Emacs. |
| 15139 | 6 |
|
94828
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
7 GNU Emacs is free software: you can redistribute it and/or modify |
|
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
8 it under the terms of the GNU General Public License as published by |
|
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
9 the Free Software Foundation, either version 3 of the License, or |
|
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
10 (at your option) any later version. |
| 15139 | 11 |
|
94828
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
12 GNU Emacs is distributed in the hope that it will be useful, |
|
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
13 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
15 GNU General Public License for more details. |
| 15139 | 16 |
|
94828
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
17 You should have received a copy of the GNU General Public License |
|
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
18 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
|
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
19 |
| 15139 | 20 |
| 21 #include <pwd.h> | |
| 22 #include <malloc.h> | |
| 23 | |
| 19232 | 24 /* Include these headers now so we don't have to worry about include |
| 25 order dependencies in common source files. */ | |
| 26 #include <direct.h> | |
| 27 #include <io.h> | |
| 28 #include <stdio.h> | |
| 29 | |
| 30 #ifdef sleep | |
| 31 #undef sleep | |
| 32 #endif | |
|
109516
68ca98ae70fb
Make building under stricter warning flags somewhat cleaner.
Juanma Barranquero <lekktu@gmail.com>
parents:
108892
diff
changeset
|
33 void sleep (unsigned long seconds); |
| 15674 | 34 char *getwd (char *dir); |
|
109516
68ca98ae70fb
Make building under stricter warning flags somewhat cleaner.
Juanma Barranquero <lekktu@gmail.com>
parents:
108892
diff
changeset
|
35 int getppid (void); |
|
68ca98ae70fb
Make building under stricter warning flags somewhat cleaner.
Juanma Barranquero <lekktu@gmail.com>
parents:
108892
diff
changeset
|
36 char * getlogin (void); |
| 15139 | 37 char * cuserid (char * s); |
|
109516
68ca98ae70fb
Make building under stricter warning flags somewhat cleaner.
Juanma Barranquero <lekktu@gmail.com>
parents:
108892
diff
changeset
|
38 unsigned getuid (void); |
|
68ca98ae70fb
Make building under stricter warning flags somewhat cleaner.
Juanma Barranquero <lekktu@gmail.com>
parents:
108892
diff
changeset
|
39 unsigned getegid (void); |
|
68ca98ae70fb
Make building under stricter warning flags somewhat cleaner.
Juanma Barranquero <lekktu@gmail.com>
parents:
108892
diff
changeset
|
40 unsigned getgid (void); |
|
102670
06ca3efb355b
inc/sys/stat.h (struct stat): Change the types of st_uid and st_gid to unsigned.
Eli Zaretskii <eliz@gnu.org>
parents:
100958
diff
changeset
|
41 int setuid (unsigned uid); |
|
107769
65405dd90a72
Add stubs for Windows, required after CVE-2010-0825 change.
Juanma Barranquero <lekktu@gmail.com>
parents:
106815
diff
changeset
|
42 int setegid (unsigned gid); |
| 15139 | 43 char * getpass (const char * prompt); |
|
102670
06ca3efb355b
inc/sys/stat.h (struct stat): Change the types of st_uid and st_gid to unsigned.
Eli Zaretskii <eliz@gnu.org>
parents:
100958
diff
changeset
|
44 int fchown (int fd, unsigned uid, unsigned gid); |
| 15139 | 45 |
| 22315 | 46 /* redirect or undo interceptions created by config.h */ |
| 19232 | 47 #undef access |
| 48 #define access _access | |
| 49 #undef chdir | |
| 50 #define chdir _chdir | |
| 51 #undef chmod | |
| 52 #define chmod _chmod | |
| 53 #undef close | |
| 54 #define close _close | |
| 55 #undef creat | |
| 56 #define creat _creat | |
| 57 #undef ctime | |
| 58 #undef dup | |
| 59 #define dup _dup | |
| 60 #undef dup2 | |
| 61 #define dup2 _dup2 | |
| 62 #undef fopen | |
| 63 #undef mkdir | |
| 64 #define mkdir _mkdir | |
| 65 #undef mktemp | |
| 66 #define mktemp _mktemp | |
| 67 #undef open | |
| 68 #define open _open | |
| 69 #undef pipe | |
| 70 #define pipe _pipe | |
| 71 #undef read | |
| 72 #define read _read | |
| 73 #undef rename | |
| 74 #undef rmdir | |
| 75 #define rmdir _rmdir | |
| 76 #undef unlink | |
| 77 #define unlink _unlink | |
| 78 #undef write | |
| 79 #define write _write | |
| 80 | |
| 81 /* map to MSVC names */ | |
| 82 #define execlp _execlp | |
| 83 #define execvp _execvp | |
| 84 #define fdopen _fdopen | |
|
63018
e50e8a19d938
(fileno): Don't define if already defined.
Eli Zaretskii <eliz@gnu.org>
parents:
52401
diff
changeset
|
85 #ifndef fileno |
| 19232 | 86 #define fileno _fileno |
|
63018
e50e8a19d938
(fileno): Don't define if already defined.
Eli Zaretskii <eliz@gnu.org>
parents:
52401
diff
changeset
|
87 #endif |
| 19232 | 88 #define getcwd _getcwd |
| 89 #define getw _getw | |
| 90 #define getpid _getpid | |
| 91 #define isatty _isatty | |
| 92 #define locking _locking | |
| 93 #define logb _logb | |
| 94 #define _longjmp longjmp | |
| 95 #define lseek _lseek | |
| 96 #define popen _popen | |
| 97 #define pclose _pclose | |
| 98 #define umask _umask | |
| 99 #define utime _utime | |
| 100 #define index strchr | |
| 101 #define rindex strrchr | |
| 102 | |
| 22315 | 103 /* Make standard winsock definitions available if needed. */ |
| 104 #undef _WINSOCKAPI_ | |
|
31082
9865d23be9e7
(WIN32): Remove unnecessary definition.
Andrew Innes <andrewi@gnu.org>
parents:
22315
diff
changeset
|
105 #undef _WINSOCK_H |
| 22315 | 106 |
| 15139 | 107 /* end of ntlib.h */ |
| 52401 | 108 |
| 109 /* arch-tag: 93444f66-7b98-4aa5-a5cd-01444094af28 | |
| 110 (do not change this comment) */ |
