aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src/ntlib.c
diff options
context:
space:
mode:
authorStefan Monnier2010-07-23 17:23:09 +0200
committerStefan Monnier2010-07-23 17:23:09 +0200
commit0ee81a0ce066375eac701c06cdfbdebefe594fdc (patch)
treef0dccd24163316cfe688f927681a3032a9b1fe2f /lib-src/ntlib.c
parent894e369ddf48e191638b8e66ce732f24ff9abe2a (diff)
parent94da839793affa2a270bc26cee9c4d95d4dc4708 (diff)
downloademacs-0ee81a0ce066375eac701c06cdfbdebefe594fdc.tar.gz
emacs-0ee81a0ce066375eac701c06cdfbdebefe594fdc.zip
Merge from trunk
Diffstat (limited to 'lib-src/ntlib.c')
-rw-r--r--lib-src/ntlib.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c
index c815f32d51d..c24b35d9a19 100644
--- a/lib-src/ntlib.c
+++ b/lib-src/ntlib.c
@@ -38,7 +38,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
38 would necessitate including windows.h in the files that used it. 38 would necessitate including windows.h in the files that used it.
39 This is much easier. */ 39 This is much easier. */
40void 40void
41sleep(unsigned long seconds) 41sleep (unsigned long seconds)
42{ 42{
43 Sleep (seconds * 1000); 43 Sleep (seconds * 1000);
44} 44}
@@ -56,7 +56,7 @@ static HANDLE getppid_parent;
56static int getppid_ppid; 56static int getppid_ppid;
57 57
58int 58int
59getppid(void) 59getppid (void)
60{ 60{
61 char *ppid; 61 char *ppid;
62 DWORD result; 62 DWORD result;
@@ -64,7 +64,7 @@ getppid(void)
64 ppid = getenv ("EM_PARENT_PROCESS_ID"); 64 ppid = getenv ("EM_PARENT_PROCESS_ID");
65 if (!ppid) 65 if (!ppid)
66 { 66 {
67 printf("no pid.\n"); 67 printf ("no pid.\n");
68 return 0; 68 return 0;
69 } 69 }
70 else 70 else
@@ -74,11 +74,11 @@ getppid(void)
74 74
75 if (!getppid_parent) 75 if (!getppid_parent)
76 { 76 {
77 getppid_parent = OpenProcess (SYNCHRONIZE, FALSE, atoi(ppid)); 77 getppid_parent = OpenProcess (SYNCHRONIZE, FALSE, atoi (ppid));
78 if (!getppid_parent) 78 if (!getppid_parent)
79 { 79 {
80 printf ("Failed to open handle to parent process: %d\n", 80 printf ("Failed to open handle to parent process: %d\n",
81 GetLastError()); 81 GetLastError ());
82 exit (1); 82 exit (1);
83 } 83 }
84 } 84 }
@@ -94,13 +94,13 @@ getppid(void)
94 return 1; 94 return 1;
95 case WAIT_FAILED: 95 case WAIT_FAILED:
96 default: 96 default:
97 printf ("Checking parent status failed: %d\n", GetLastError()); 97 printf ("Checking parent status failed: %d\n", GetLastError ());
98 exit (1); 98 exit (1);
99 } 99 }
100} 100}
101 101
102char * 102char *
103getlogin () 103getlogin (void)
104{ 104{
105 static char user_name[256]; 105 static char user_name[256];
106 DWORD length = sizeof (user_name); 106 DWORD length = sizeof (user_name);
@@ -120,19 +120,19 @@ cuserid (char * s)
120} 120}
121 121
122unsigned 122unsigned
123getuid () 123getuid (void)
124{ 124{
125 return 0; 125 return 0;
126} 126}
127 127
128unsigned 128unsigned
129getgid () 129getgid (void)
130{ 130{
131 return 0; 131 return 0;
132} 132}
133 133
134unsigned 134unsigned
135getegid () 135getegid (void)
136{ 136{
137 return 0; 137 return 0;
138} 138}
@@ -219,7 +219,7 @@ sys_ctime (const time_t *t)
219} 219}
220 220
221FILE * 221FILE *
222sys_fopen(const char * path, const char * mode) 222sys_fopen (const char * path, const char * mode)
223{ 223{
224 return fopen (path, mode); 224 return fopen (path, mode);
225} 225}