]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygwin/ChangeLog
Add Xtensa port
[newlib-cygwin.git] / winsup / cygwin / ChangeLog
CommitLineData
333879e7
CF
12003-03-31 Christopher Faylor <cgf@redhat.com>
2
3 * exceptions.cc (setup_handler): Make sure winapi lock is released when
4 exiting loop.
5
a2105d93
CF
62003-03-30 Christopher Faylor <cgf@redhat.com>
7
8 * include/cygwin/fs.h: Remove unneeded include.
9 * include/cygwin/in.h: Include sys/types.h rather than cygwin/types.h.
10
856a9750
CV
112003-03-29 Corinna Vinschen <corinna@vinschen.de>
12
13 * syscalls.cc (login): Fix comment.
14 (logout): Ditto.
15
8304de2e
CV
162003-03-29 Corinna Vinschen <corinna@vinschen.de>
17
18 * syscalls.cc: Slightly cleanup all utmp functions.
19 (login): Use mutex to secure against concurrent access to wtmp file.
20 (logout): Rewrite using POSIX calls.
21 (utmp_fd): Initialized to -1 now. Any value < 0 is treated as closed
22 in subsequent functions.
23 (utmp_readonly): New variable, indicating utmp file open for reading
24 only.
25 (internal_setutent): New function implementing setutent().
26 (setutent): Call internal_setutent now.
27 (endutent): Reset utmp_readonly.
28 (getutent): Return immediately if utmp file can't be opened.
29 (getutid): Ditto.
30 (getutline): Ditto.
31 (pututline): Ditto. Use mutex to secure against concurrent access to
32 utmp file.
33
46c8214c
CF
342003-03-28 Christopher Faylor <cgf@redhat.com>
35
36 * Makefile.in: Remove EXE_LDFLAGS. Fix fhandler_CFLAGS typo. Recognize .s suffix.
37 * configure.in: Remove EXE_LDFLAGS.
38 * configure: Regenerate.
39
a7ab35c1
CF
402003-03-28 Christopher Faylor <cgf@redhat.com>
41
42 * include/sys/cygwin.h: Declare cygwin_internal as unsigned long.
43 * external.cc (cygwin_internal): Define as unsigned long.
44
452003-03-27 Christopher Faylor <cgf@redhat.com>
46
47 * include/sys/cygwin.h: Move cygwin_internal outside of WINVER
48 conditional.
49
eff6c00e
TP
502003-03-27 Thomas Pfaff <tpfaff@gmx.net>
51
52 * thread.cc: Change 1==foo equations to foo==1 throughout.
53
15648790
TP
542003-03-27 Thomas Pfaff <tpfaff@gmx.net>
55
56 * thread.h: Change class names, methods, members and local vars
57 according to the GNU coding style.
58 * thread.cc: Ditto.
59 * dcrt0.cc (dll_crt0_1): Rename pthread::initMainThread call to
60 pthread::init_mainthread.
61 * pthread.cc (pthead_getsequence_np): Rename pthread::isGoodObject
62 call to pthread::is_good_object.
63
98b36ec8
CV
642003-03-27 Joe Buehler <jhpb@draco.hekimian.com>
65
66 * autoload.cc: added RegGetKeySecurity()
67 * security.cc (get_nt_object_attribute): use RegGetKeySecurity() for
68 performance.
69
85738bf7
CF
702003-03-25 Christopher Faylor <cgf@redhat.com>
71 Joe Buehler <jhpb@draco.hekimian.com>
72
73 * fork.cc (fork_parent): Don't copy signals from parent to child here.
74 * sigproc.cc (proc_subproc): Copy signals from parent to child pinfo
75 here.
76
9306ba2e
TP
772003-03-23 Thomas Pfaff <tpfaff@gmx.net>
78
85738bf7
CF
79 * thread.h (class List): Move inline code inside class declaration.
80 (List::forEach): Change callback parameter to template class member
81 function pointer.
82 (pthread_keys::fixup_before_fork): Change to inline. Use List::forEach
83 to fixup keys.
9306ba2e
TP
84 (pthread_keys::fixup_after_fork): Ditto.
85 (pthread_keys::runAllDestructors): Ditto.
86 (pthread_key::saveAKey): Remove.
87 (pthread_key::restoreAKey): Ditto.
88 (pthread_key::destroyAKey): Ditto.
89 (pthread_key::run_destructor): Rename to runDestructor.
85738bf7
CF
90 (pthread_mutex::fixup_after_fork): Change to inline. Use List::forEach
91 to fixup mutexes after a fork.
9306ba2e
TP
92 (pthread_mutex::FixupAfterFork): New method.
93 (pthread_mutex::mutexes): New member.
85738bf7
CF
94 (pthread_cond::fixup_after_fork): Change to inline. Use List::forEach
95 to fixup conds after a fork.
9306ba2e
TP
96 (pthread_cond::FixupAfterFork): New method.
97 (pthread_cond::conds): New member.
85738bf7 98 (pthread_rwlock::fixup_after_fork): Change to inline. Use
9306ba2e
TP
99 List::forEach to fixup rwlocks after a fork.
100 (pthread_rwlock::FixupAfterFork): New method.
101 (pthread_rwlock::rwlocks): New member.
85738bf7
CF
102 (semaphore::fixup_after_fork): Change to inline. Use List::forEach to
103 fixup mutexes after a fork.
9306ba2e
TP
104 (semaphore::FixupAfterFork): New method.
105 (semaphore::semaphores): New member.
106 (MTinterface::mutexs): Remove.
107 (MTinterface::conds): Ditto.
108 (MTinterface::rwlocks): Ditto.
109 (MTinterface::semaphores): Ditto.
110 (pthread_equal): Add extern "C".
111 (pthread_mutex_lock): Ditto.
85738bf7
CF
112
113 * thread.cc (MTinterface::fixup_after_fork): Change fixup_after_fork
114 calls for pthread objects.
9306ba2e 115 (semaphore::conds): Instantiate.
85738bf7
CF
116 (pthread_cond::pthread_cond): Use List::Insert rather than custom list
117 code.
118 (pthread_cond::~pthread_cond): Use List::Remove rather than custom list
119 code.
9306ba2e
TP
120 (pthread_cond::fixup_after_fork): Rename to FixupAfterFork.
121 (pthread_rwlock::rwlocks): Instantiate.
85738bf7
CF
122 (pthread_rwlock::pthread_crwlock): Use List::Insert rather than custom
123 list code.
124 (pthread_rwlock::~pthread_rwlock): Use List::Remove rather than custom
125 list code.
9306ba2e
TP
126 (pthread_rwlock::fixup_after_fork): Rename to FixupAfterFork.
127 (pthread_key::saveAKey): Remove.
128 (pthread_key::fixup_before_fork): Ditto.
129 (pthread_key::restoreAKey): Ditto.
130 (pthread_key::fixup_after_fork): Ditto.
131 (pthread_key::destroyAKey): Ditto.
132 (pthread_key::runAllDestructors): Ditto.
133 (pthread_key::run_destructor): Rename to runDestructor.
134 (pthread_mutex::mutexes): Instantiate.
85738bf7
CF
135 (pthread_mutex::pthread_mutex): Use List::Insert rather than custom
136 list code.
137 (pthread_mutex::~pthread_mutex): Use List::Remove rather than custom
138 list code.
9306ba2e
TP
139 (pthread_mutex::fixup_after_fork): Rename to FixupAfterFork.
140 (semaphore::conds): Instantiate.
85738bf7
CF
141 (semaphore::semaphore): Use List::Insert rather than custom list code.
142 (semaphores::~semaphore): Use List::Remove rather than custom list
9306ba2e 143 code.
9306ba2e
TP
144 (semaphore::fixup_after_fork): Rename to FixupAfterFork.
145
ff3ef36d
CF
1462003-03-22 Christopher Faylor <cgf@redhat.com>
147
148 * pipe.cc (fhandler_pipe::dup): Don't dup input_handle if it doesn't
149 exist.
150
ca04f61f
CF
1512003-03-22 Christopher Faylor <cgf@redhat.com>
152
153 * syscalls.cc (unlink): Be more defensive when SetFileAttributes is
154 called. Fix typo in debugging output.
155
89e7a1ce
CF
1562003-03-21 Christopher Faylor <cgf@redhat.com>
157
158 * fork.cc: Conditionalize use of slow_pid_reuse throughout. It's not
159 necessary for newer versions of bash.
160
fa85038b
CV
1612003-03-20 Corinna Vinschen <corinna@vinschen.de>
162
163 * fhandler_socket.cc (fhandler_socket::sendto): Restrict EPIPE and
164 SIGPIPE handling to connection oriented sockets. Add comment.
165
4da34970
CF
1662003-03-19 Christopher Faylor <cgf@redhat.com>
167
168 * sigproc.h (signal_fixup_after_exec): Eliminate argument in declaration.
169 * exceptions.cc (signal_fixup_after_exec): Eliminate argument in
170 definition. Don't reset signal handlers after spawm. Just treat like
171 fork/exec.
172 * dcrt0.cc (dll_crt0_1): Don't pass PROC_SPAWN argument to
173 signal_fixup_after_exec.
174 * syscalls.cc (unlink): Don't change attributes of file if not readonly/system.
175 Ditto for resetting of arguments.
176
036ac6b3
CV
1772003-03-19 Corinna Vinschen <corinna@vinschen.de>
178
179 * glob.c: Eliminate __INSIDE_CYGWIN__ preprocessor conditionals
180 throughout.
181
b1897d27
CV
1822003-03-19 Corinna Vinschen <corinna@vinschen.de>
183
184 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Fix
185 wrong usage of S_IFDIR.
186 * security.cc (get_attribute_from_acl): Ditto.
187 (get_file_attribute): Fix wrong usage of S_IFLNK.
188 (get_object_attribute): Ditto.
189 (alloc_sd): Fix wrong usage of S_IFDIR.
190 * syscalls.cc (chmod): Allow chmod'ing of socket files.
191
c16d0946
CV
1922003-03-19 Corinna Vinschen <corinna@vinschen.de>
193
194 * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES):
195 Define.
196 * glob.c (g_lstat): Use CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES
197 instead of numerical constants.
198 (g_stat): Ditto.
199
6a80a133
TP
2002003-03-18 Thomas Pfaff <tpfaff@gmx.net>
201
202 * pthread.cc (pthread_attr_init): Remove
203 (pthread_attr_destroy): Ditto.
204 (pthread_attr_setdetachstate): Ditto.
205 (pthread_attr_getdetachstate): Ditto.
206 (pthread_attr_setstacksize): Ditto.
207 (pthread_attr_getstacksize): Ditto.
208 (pthread_attr_setinheritsched): Ditto.
209 (pthread_attr_getinheritsched): Ditto.
210 (pthread_attr_setschedparam): Ditto.
211 (pthread_attr_getschedparam): Ditto.
212 (pthread_attr_setschedpolicy): Ditto.
213 (pthread_attr_getschedpolicy): Ditto.
214 (pthread_attr_setscope): Ditto.
215 (pthread_attr_getscope): Ditto.
216 (pthread_attr_setstackaddr): Ditto.
217 (pthread_attr_getstackaddr): Ditto.
218 (pthread_key_create): Ditto.
219 (pthread_key_delete): Ditto.
220 (pthread_setspecific): Ditto.
221 (pthread_getspecific): Ditto.
222 (pthread_kill): Ditto.
223 (pthread_sigmask): Ditto.
224 (pthread_equal): Ditto.
225 (pthread_mutex_lock): Ditto.
226 (pthread_mutex_trylock): Ditto.
227 (pthread_mutex_unlock): Ditto.
228 (pthread_mutex_destroy): Ditto.
229 (pthread_mutex_setprioceiling): Ditto.
230 (pthread_mutex_getprioceiling): Ditto.
231 (pthread_mutexattr_destroy): Ditto.
232 (pthread_mutexattr_getprioceiling): Ditto.
233 (pthread_mutexattr_getprotocol): Ditto.
234 (pthread_mutexattr_getpshared): Ditto.
235 (pthread_mutexattr_gettype): Ditto.
236 (pthread_mutexattr_init): Ditto.
237 (pthread_mutexattr_setprioceiling): Ditto.
238 (pthread_mutexattr_setprotocol): Ditto.
239 (pthread_mutexattr_setpshared): Ditto.
240 (pthread_mutexattr_settype): Ditto.
241 (pthread_cond_destroy): Ditto.
242 (pthread_cond_signal): Ditto.
243 (pthread_cond_broadcast): Ditto.
244 (pthread_condattr_init): Ditto.
245 (pthread_condattr_destroy): Ditto.
246 (pthread_condattr_getpshared): Ditto.
247 (pthread_condattr_setpshared): Ditto.
248 (pthread_rwlock_destroy): Ditto.
249 (pthread_rwlock_rdlock): Ditto.
250 (pthread_rwlock_tryrdlock): Ditto.
251 (pthread_rwlock_wrlock): Ditto.
252 (pthread_rwlock_trywrlock): Ditto.
253 (pthread_rwlock_unlock): Ditto.
254 (pthread_rwlockattr_init): Ditto.
255 (pthread_rwlockattr_getpshared): Ditto.
256 (pthread_rwlockattr_setpshared): Ditto.
257 (pthread_rwlockattr_destroy): Ditto.
258 (pthread_getconcurrency): Ditto.
259 (pthread_setconcurrency): Ditto.
260 (pthread_getschedparam): Ditto.
261 (pthread_setschedparam): Ditto.
262
263 * thread.h (__pthread_attr_init): Remove prototype.
264 (__pthread_attr_destroy): Ditto.
265 (__pthread_attr_setdetachstate): Ditto.
266 (__pthread_attr_getdetachstate): Ditto.
267 (__pthread_attr_setstacksize): Ditto.
268 (__pthread_attr_getstacksize): Ditto.
269 (__pthread_attr_setinheritsched): Ditto.
270 (__pthread_attr_getinheritsched): Ditto.
271 (__pthread_attr_setschedparam): Ditto.
272 (__pthread_attr_getschedparam): Ditto.
273 (__pthread_attr_setschedpolicy): Ditto.
274 (__pthread_attr_getschedpolicy): Ditto.
275 (__pthread_attr_setscope): Ditto.
276 (__pthread_attr_getscope): Ditto.
277 (__pthread_attr_setstackaddr): Ditto.
278 (__pthread_attr_getstackaddr): Ditto.
279 (__pthread_key_create): Ditto.
280 (__pthread_key_delete): Ditto.
281 (__pthread_setspecific): Ditto.
282 (__pthread_getspecific): Ditto.
283 (__pthread_kill): Ditto.
284 (__pthread_sigmask): Ditto.
285 (__pthread_equal): Ditto.
286 (__pthread_mutex_lock): Ditto.
287 (__pthread_mutex_trylock): Ditto.
288 (__pthread_mutex_unlock): Ditto.
289 (__pthread_mutex_destroy): Ditto.
290 (__pthread_mutex_setprioceiling): Ditto.
291 (__pthread_mutex_getprioceiling): Ditto.
292 (__pthread_mutexattr_destroy): Ditto.
293 (__pthread_mutexattr_getprioceiling): Ditto.
294 (__pthread_mutexattr_getprotocol): Ditto.
295 (__pthread_mutexattr_getpshared): Ditto.
296 (__pthread_mutexattr_gettype): Ditto.
297 (__pthread_mutexattr_init): Ditto.
298 (__pthread_mutexattr_setprioceiling): Ditto.
299 (__pthread_mutexattr_setprotocol): Ditto.
300 (__pthread_mutexattr_setpshared): Ditto.
301 (__pthread_mutexattr_settype): Ditto.
302 (__pthread_cond_destroy): Ditto.
303 (__pthread_cond_signal): Ditto.
304 (__pthread_cond_broadcast): Ditto.
305 (__pthread_condattr_init): Ditto.
306 (__pthread_condattr_destroy): Ditto.
307 (__pthread_condattr_getpshared): Ditto.
308 (__pthread_condattr_setpshared): Ditto.
309 (__pthread_rwlock_destroy): Ditto.
310 (__pthread_rwlock_rdlock): Ditto.
311 (__pthread_rwlock_tryrdlock): Ditto.
312 (__pthread_rwlock_wrlock): Ditto.
313 (__pthread_rwlock_trywrlock): Ditto.
314 (__pthread_rwlock_unlock): Ditto.
315 (__pthread_rwlockattr_init): Ditto.
316 (__pthread_rwlockattr_getpshared): Ditto.
317 (__pthread_rwlockattr_setpshared): Ditto.
318 (__pthread_rwlockattr_destroy): Ditto.
319 (__pthread_getconcurrency): Ditto.
320 (__pthread_setconcurrency): Ditto.
321 (__pthread_getschedparam): Ditto.
322 (__pthread_setschedparam): Ditto.
323
324 * thread.cc: Rename __pthread_equal to pthread_equal throughout.
325 Change pthread_self parameter appropriate.
326 (__pthread_attr_init): Remove __ prefix. Change to extern "C".
327 (__pthread_attr_destroy): Ditto.
328 (__pthread_attr_setdetachstate): Ditto.
329 (__pthread_attr_getdetachstate): Ditto.
330 (__pthread_attr_setstacksize): Ditto.
331 (__pthread_attr_getstacksize): Ditto.
332 (__pthread_attr_setinheritsched): Ditto.
333 (__pthread_attr_getinheritsched): Ditto.
334 (__pthread_attr_setschedparam): Ditto.
335 (__pthread_attr_getschedparam): Ditto.
336 (__pthread_attr_setschedpolicy): Ditto.
337 (__pthread_attr_getschedpolicy): Ditto.
338 (__pthread_attr_setscope): Ditto.
339 (__pthread_attr_getscope): Ditto.
340 (__pthread_attr_setstackaddr): Ditto.
341 (__pthread_attr_getstackaddr): Ditto.
342 (__pthread_key_create): Ditto.
343 (__pthread_key_delete): Ditto.
344 (__pthread_setspecific): Ditto.
345 (__pthread_getspecific): Ditto.
346 (__pthread_kill): Ditto.
347 (__pthread_sigmask): Ditto.
348 (__pthread_equal): Ditto.
349 (__pthread_mutex_lock): Ditto.
350 (__pthread_mutex_trylock): Ditto.
351 (__pthread_mutex_unlock): Ditto.
352 (__pthread_mutex_destroy): Ditto.
353 (__pthread_mutex_setprioceiling): Ditto.
354 (__pthread_mutex_getprioceiling): Ditto.
355 (__pthread_mutexattr_destroy): Ditto.
356 (__pthread_mutexattr_getprioceiling): Ditto.
357 (__pthread_mutexattr_getprotocol): Ditto.
358 (__pthread_mutexattr_getpshared): Ditto.
359 (__pthread_mutexattr_gettype): Ditto.
360 (__pthread_mutexattr_init): Ditto.
361 (__pthread_mutexattr_setprioceiling): Ditto.
362 (__pthread_mutexattr_setprotocol): Ditto.
363 (__pthread_mutexattr_setpshared): Ditto.
364 (__pthread_mutexattr_settype): Ditto.
365 (__pthread_cond_destroy): Ditto.
366 (__pthread_cond_signal): Ditto.
367 (__pthread_cond_broadcast): Ditto.
368 (__pthread_condattr_init): Ditto.
369 (__pthread_condattr_destroy): Ditto.
370 (__pthread_condattr_getpshared): Ditto.
371 (__pthread_condattr_setpshared): Ditto.
372 (__pthread_rwlock_destroy): Ditto.
373 (__pthread_rwlock_rdlock): Ditto.
374 (__pthread_rwlock_tryrdlock): Ditto.
375 (__pthread_rwlock_wrlock): Ditto.
376 (__pthread_rwlock_trywrlock): Ditto.
377 (__pthread_rwlock_unlock): Ditto.
378 (__pthread_rwlockattr_init): Ditto.
379 (__pthread_rwlockattr_getpshared): Ditto.
380 (__pthread_rwlockattr_setpshared): Ditto.
381 (__pthread_rwlockattr_destroy): Ditto.
382 (__pthread_getconcurrency): Ditto.
383 (__pthread_setconcurrency): Ditto.
384 (__pthread_getschedparam): Ditto.
385 (__pthread_setschedparam): Ditto.
386
00d296a3
TP
3872003-03-18 Thomas Pfaff <tpfaff@gmx.net>
388
389 * cygwin.din: Add pthread_rwlock_destroy, pthread_rwlock_init,
390 pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
391 pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
392 pthread_rwlock_unlock, pthread_rwlockattr_init,
393 pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
394 and pthread_rwlockattr_destroy.
395 * include/cygwin/version.h: Bump API minor number.
396 * include/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Define a
397 reasonable value.
398 Add prototypes for pthread_rwlock_destroy, pthread_rwlock_init,
399 pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
400 pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
401 pthread_rwlock_unlock, pthread_rwlockattr_init,
402 pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
403 and pthread_rwlockattr_destroy.
404 * thread.h (PTHREAD_ONCE_MAGIC): Remove superflous semicolon.
405 (PTHREAD_RWLOCK_MAGIC): New define.
406 (PTHREAD_RWLOCKATTR_MAGIC): Ditto.
407 (pthread_rwlockattr): New class.
408 (pthread_rwlock): Ditto.
409 (MTinterface::rwlocks): New member.
410 (MTinterface::MTinterface): Initialize rwlocks.
411 Add prototypes for __pthread_rwlock_destroy,
412 __pthread_rwlock_wrlock, __pthread_rwlock_trywrlock,
413 __pthread_rwlock_unlock, __pthread_rwlockattr_init,
414 __pthread_rwlockattr_getpshared, __pthread_rwlockattr_setpshared,
415 and __pthread_rwlockattr_destroy.
416 * thread.cc (MTinterface::Init): Initialize rwlock internal mutex.
417 (MTinterface::fixup_after_fork): Fixup rwlocks after fork.
418 (pthread_rwlockattr::isGoodObject): Implement.
419 (pthread_rwlockattr::pthread_rwlockattr): Ditto.
420 (pthread_rwlockattr::~pthread_rwlockattr): Ditto.
421 (pthread_rwlock::initMutex): Ditto.
422 (pthread_rwlock::pthread_rwlock): Ditto.
423 (pthread_rwlock::~pthread_rwlock): Ditto.
424 (pthread_rwlock::RdLock): Ditto.
425 (pthread_rwlock::TryRdLock): Ditto.
426 (pthread_rwlock::WrLock): Ditto.
427 (pthread_rwlock::TryWrLock): Ditto.
428 (pthread_rwlock::UnLock): Ditto.
429 (pthread_rwlock::addReader): Ditto.
430 (pthread_rwlock::removeReader): Ditto.
431 (pthread_rwlock::lookupReader): Ditto.
432 (pthread_rwlock::RdLockCleanup): Ditto.
433 (pthread_rwlock::WrLockCleanup): Ditto.
434 (pthread_rwlock::fixup_after_fork): Ditto.
435 (pthread_rwlock::isGoodObject): Ditto.
436 (pthread_rwlock::isGoodInitializer): Ditto.
437 (pthread_rwlock::isGoodInitializerOrObject): Ditto.
438 (pthread_rwlock::isGoodInitializerOrBadObject): Ditto.
439 (__pthread_rwlock_destroy): Ditto.
440 (pthread_rwlock::init): Ditto.
441 (__pthread_rwlock_rdlock): Ditto.
442 (__pthread_rwlock_tryrdlock): Ditto.
443 (__pthread_rwlock_wrlock): Ditto.
444 (__pthread_rwlock_trywrlock): Ditto.
445
f592b05d
TP
4462003-03-18 Thomas Pfaff <tpfaff@gmx.net>
447
448 * thread.h (pthread_cond::ExitingWait): Remove.
449 (pthread_cond::mutex): Ditto.
450 (pthread_cond::cond_access): Ditto.
451 (pthread_cond::win32_obj_id): Ditto.
452 (pthread_cond::TimedWait): Ditto.
453 (pthread_cond::BroadCast): Ditto.
454 (pthread_cond::Signal): Ditto.
455 (pthread_cond::waiting): Change type to unsigned long.
456 (pthread_cond::pending): New member.
457 (pthread_cond::semWait): Ditto.
458 (pthread_cond::mtxIn): Ditto.
459 (pthread_cond::mtxOut): Ditto.
460 (pthread_cond::mtxCond): Ditto.
461 (pthread_cond::UnBlock): New method.
462 (pthread_cond::Wait): Ditto.
463 * thread.cc: Update list of cancellation points.
464 (pthread_cond::pthread_cond): Rewrite.
465 (pthread_cond::~pthread_cond): Ditto.
466 (pthread_cond::TimedWait): Remove.
467 (pthread_cond::BroadCast): Ditto.
468 (pthread_cond::Signal): Ditto.
469 (pthread_cond::UnBlock): Implement.
470 (pthread_cond::Wait): Ditto.
471 (pthread_cond::fixup_after_fork): Rewrite.
472 (pthread_mutex::fixup_after_fork): Remove DETECT_BAD_APP
473 conditional.
474 (__pthread_cond_broadcast): Just return 0 if the condition is
475 not initialized. Call pthread_cond::UnBlock to release blocked
476 threads.
477 (__pthread_cond_signal): Ditto.
478 (__pthread_cond__dowait): Rewrite.
479 (pthread_cond_timedwait): Add pthread_testcancel call. Fix
480 waitlength calculation.
481 (pthread_cond_wait): Add pthread_testcancel call.
482
2ff03dc2
TP
4832003-03-18 Thomas Pfaff <tpfaff@gmx.net>
484
485 * include/pthread.h (PTHREAD_MUTEX_NORMAL): New define.
486 * thread.cc: Remove errno.h include.
487 (pthread::precreate): Change internal mutex type to normal.
488 (pthread_mutex::canBeUnlocked): Implement.
489 (pthread_mutex::pthread_mutex): Initialize lock_counter with 0.
490 (pthread_mutex::Lock): Rename to _Lock. Add self parameter.
491 Change lock_counter logic. Update SetOwner call.
492 (pthread_mutex::TryLock): Rename to _TryLock. Add self parameter.
493 Change lock_counter logic. Update SetOwner call.
494 (pthread_mutex::UnLock): Rename to _UnLock. Add self parameter.
495 Change lock_counter logic.
496 (pthread_mutex::Destroy): Rename to _Destroy. Update TryLock call.
497 (pthread_mutex::SetOwner): Move to thread.h as inline.
498 (pthread_mutex::LockRecursive): Ditto.
499 (pthread_mutex::fixup_after_fork): Change lock_counter logic.
500 (__pthread_mutexattr_settype): Add PTHREAD_MUTEX_NORMAL to valid
501 types check.
502 * thread.h: Include errno.h and limits.h.
503 (MUTEX_LOCK_COUNTER_INITIAL): Remove.
504 (MUTEX_OWNER_ANONYMOUS): New define.
505 (pthread_mutex::canBeUnlocked): New static method.
506 (pthread_mutex::lock_counter): Change type to unsigned long.
507 (pthread_mutex::GetPthreadSelf): New method.
508 (pthread_mutex::Lock): Call _Lock with pthread_self pointer.
509 (pthread_mutex::TryLock): Call _TryLock with pthread_self pointer.
510 (pthread_mutex::UnLock): Call _UnLock with pthread_self pointer.
511 (pthread_mutex::Destroy): Call _Destroy with pthread_self pointer.
512 (pthread_mutex::SetOwner): Moved from thread.cc as inline.
513 (pthread_mutex::LockRecursive): Ditto.
514 (pthread_mutex::_Lock): New method.
515 (pthread_mutex::_TryLock): New method.
516 (pthread_mutex::_UnLock): New method.
517 (pthread_mutex::_Destroy): New method.
518
dcd350f0
CV
5192003-03-18 Christopher January <chris@atomice.net>
520
521 * fhandler_proc.cc (format_proc_cpuinfo): Use IsProcessorFeaturePresent
522 only on Windows NT. Read CPU Mhz value only on NT. Revert previous
523 change so cpuid instruction is called even on non-NT systems.
524
c51dc9c2
CV
5252003-03-17 Corinna Vinschen <corinna@vinschen.de>
526
a2105d93 527 * glob.c (g_lstat): Change API minor test to match API minor number
c51dc9c2
CV
528 change in previous patch.
529 (g_stat): Ditto.
530
f194ba1f
CF
5312003-03-17 Christopher Faylor <cgf@redhat.com>
532
533 * include/cygwin/version.h: Reorganize last two api versions so that
534 btowc and trunc exports show up before previous bump since there has
535 been no exported version of the DLL with the 64 bit changes yet but
536 1.3.22 will have the btowc and trunc.
537
3543669f
CF
5382003-03-17 Christopher Faylor <cgf@redhat.com>
539
540 * cygwin.din: Export btowc, trunc.
541 * include/cygwin/version.h: Reflect new exports.
542 * syscalls.cc (_stat): Rename to stat to avoid newlib wrapper.
543 * syscalls.cc (_fstat): Ditto.
544
5452003-03-16 Christopher Faylor <cgf@redhat.com>
546
547 * fhandler_console.cc (fhandler_console::close): Correct check for
548 current tty. Add debugging output when console is freed.
549 (set_console_state_for_spawn): Add debugging output.
550 * fhandler_tty.cc (fhandler_tty_slave::open): Don't decrement console
551 open flag when vforking.
552 * sigproc.cc (sigproc_terminate): Fix debugging output.
553 * spawn.cc (handle): Eliminate second argument.
554 (spawn_guts): Reflect elimination of argument change to handle.
555 * syscalls.cc (setsid): Add debugging output when console is freed.
556
5572003-03-14 Christopher Faylor <cgf@redhat.com>
558
559 * syscalls.cc (rename): Revert assumption that DELETE_ON_CLOSE works on
560 Win9x.
561
41ffdfa5
CF
5622003-03-13 Christopher Faylor <cgf@redhat.com>
563
564 * include/cygwin/version.h: Bump DLL minor number to 23.
565
5b186cd9
CV
5662003-03-13 Corinna Vinschen <corinna@vinschen.de>
567
568 * autoload.cc (IsProcessorFeaturePresent): Add.
569 * fhandler_proc.cc (format_proc_cpuinfo): Add case for 9x systems.
570
c58555c7
CV
5712003-03-13 Corinna Vinschen <corinna@vinschen.de>
572
573 * fhandler_proc.cc (format_proc_cpuinfo): Fix vendor id in cpuid case.
574
49a0d53c
CV
5752003-03-13 Corinna Vinschen <corinna@vinschen.de>
576
577 * net.cc (cygwin_rcmd): Use correct file descriptor in call to fdsock.
578 (cygwin_rexec): Ditto.
579
6fcd5661
CF
5802003-03-13 Christopher Faylor <cgf@redhat.com>
581
582 * fhandler_tty.cc (fhandler_tty_slave::close): Fix typo in debug
583 output.
584
585 * syscalls.cc (rename): Assume that DELETE_ON_CLOSE works on Win9x.
586
aa39b7f7
CV
5872003-03-11 Corinna Vinschen <corinna@vinschen.de>
588
589 * fhandler_socket.cc (fhandler_socket::dup): Don't call
590 fhandler_base::dup() but call DuplicateHandle directly instead to have
591 control over socket inheritence.
592
2afa7f58
CV
5932003-03-11 Corinna Vinschen <corinna@vinschen.de>
594
595 * fhandler_socket.cc (fhandler_socket::dup): On NT systems avoid
596 using WinSock2 socket duplication methods. Add comment.
597
5982003-03-11 Pierre Humblet <pierre.humblet@ieee.org>
599
600 * fhandler_socket.cc (fhandler_socket::fixup_after_fork):
601 Set io_handle to INVALID_SOCKET in case of failure.
602 (fhandler_socket::dup): Return 0 if the io_handle is valid.
603
556ceaeb
CV
6042003-03-10 Corinna Vinschen <corinna@vinschen.de>
605
606 * sec_acl.cc (setacl): Don't handle DELETE flag specially.
607 * security.cc (alloc_sd): Ditto.
608
a201401c
CV
6092003-03-09 Corinna Vinschen <corinna@vinschen.de>
610
6bbf711e 611 * winver.rc: Change Copyright hint to include 2003.
a201401c 612
b1aae492
CV
6132003-03-09 Corinna Vinschen <corinna@vinschen.de>
614
615 Switch to 32/64 datatypes:
616 * Makefile.in (OBSOLETE_FUNCTIONS): Add open acl aclcheck aclfrommode
617 aclfrompbits aclfromtext aclsort acltomode acltopbits acltotext chown
618 facl fchown fgetpos fopen freopen fseeko fsetpos fstat ftello
619 ftruncate getegid geteuid getgid getgrent getgrgid getgrnam getgroups
620 getpwuid getpwuid_r getuid initgroups lchown lseek lstat mknod mmap
621 seekdir setegid seteuid setgid setgroups setregid setreuid setuid stat
622 telldir truncate.
623 (NEW_FUNCTIONS): Add _open64 acl32 aclcheck32 aclfrommode32
624 aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
625 acltotext32 chown32 facl32 fchown32 fgetpos64 fopen64 freopen64
626 fseeko64 fsetpos64 fstat64 ftello64 ftruncate64 getegid32 geteuid32
627 getgid32 getgrent32 getgrgid32 getgrnam32 getgroups32 getpwuid32
628 getpwuid_r32 getuid32 initgroups32 lchown32 lseek64 lstat64 mknod32
629 mmap64 seekdir64 setegid32 seteuid32 setgid32 setgroups32 setregid32
630 setreuid32 setuid32 stat64 telldir64 truncate64 to substitute the
631 above.
632 * cygserver_shm.h (class client_request_shm): Change uid_t and gid_t
633 members to __uid32_t and __gid32_t.
634 * cygwin.din: Add symbols acl32 aclcheck32 aclfrommode32
635 aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
636 acltotext32 facl32 fgetpos64 fopen64 freopen64 fseeko64 fsetpos64
637 _fstat64 ftello64 _lseek64 mknod32 _open64.
638 * glob.c: Include perprocess.h.
639 (globtilde): Call getpwuid32 and getuid32 instead of getpwuid and
640 getuid.
641 (g_lstat): Check for applications API version to call the appropriate
642 typed gl_lstat function.
643 (g_stat): Ditto for gl_stat.
644 * shm.cc (client_request_shm::client_request_shm): Call geteuid32
645 and getegid32 instead of geteuid and getegid throughout.
646 * syscalls.cc (_open64): New alias for open.
647 (_lseek64): New alias for lseek64.
648 (_fstat64): New alias for fseek64.
649 (mknod32): New function.
650 (mknod): Calls mknod32 now.
651 * winsup.h: Make function declarations for getuid32, geteuid32,
652 and getpwuid32 accessible for plain C sources. Add declarations
653 for getegid32 and getpwnam.
654 * include/cygwin/version.h: Bum API minor number to 78.
655 * include/sys/cygwin.h: Guard C++ specific members of struct
656 per_process against inclusion in plain C sources.
657 * include/sys/mman.h (mman): Add guard to avoid type clash when
658 compiling Cygwin.
659
659fb3ff
CF
6602003-03-09 Christopher Faylor <cgf@redhat.com>
661
d580d86c 662 * include/cygwin/version.h: Bump DLL minor number to 22.
659fb3ff 663
c367dfd0
CF
6642003-03-09 Christopher Faylor <cgf@redhat.com>
665
666 Do some minor reformatting of 'extern "C"' use throughout.
667
6682003-03-06 Christopher January <chris@atomice.net>
669
670 * autoload.cc (GetSystemTimes): Define new autoload function.
671 * fhandler_proc.cc (proc_listing): Add cpuinfo and partitions entries.
672 (fhandler_proc::fill_filebuf): Add PROC_CPUINFO and PROC_PARTITIONS
673 cases.
674 (format_proc_uptime): Use GetSystemTimes if available.
675 (read_value): New macro.
676 (print): New macro.
677 (cpuid): New function.
678 (can_set_flag): New function.
679 (format_proc_cpuinfo): New function.
680 (format_proc_partitions): New function.
681
36c4a441
CF
6822003-03-09 Christopher Faylor <cgf@redhat.com>
683
684 * syscalls.cc (unlink): Attempt to be more clever about setting
685 attributes of file. Only open file in query mode to avoid having to
686 mess with security stuff for reading.
687
639ebe29
CV
6882003-03-09 Corinna Vinschen <corinna@vinschen.de>
689
690 * rmsym: Fix regular expression.
691
3a1d827f
CF
6922003-03-09 Christopher Faylor <cgf@redhat.com>
693
694 * Makefile.in: Change from using new-* to cygwin0 for temporary
695 targets.
696
ca0e9071
CV
6972003-03-09 Corinna Vinschen <corinna@vinschen.de>
698
699 * include/cygwin/socket.h: Set SOMAXCONN to Winsock2 value.
700
ed269cea
CF
7012003-03-08 Christopher Faylor <cgf@redhat.com>
702
703 * syscalls.cc (unlink): Always attempt to use FILE_FLAG_CLOSE_ON_DELETE
704 to delete files since this allows us to preserve the protection of hard
705 linked files.
706 (link): Generate full path for potentially recalculated .lnk target.
707
1114c3d0
CF
7082003-03-08 Christopher Faylor <cgf@redhat.com>
709
710 Revert below changes regarding _pinfo::cmdline.
711
d66ac2bc
CV
7122003-03-08 Corinna Vinschen <corinna@vinschen.de>
713
714 * external.cc (cygwin_internal): Change n to __off64_t to match change
715 of _pinfo::cmdline.
716 * fhandler.h (class fhandler_virtual): Change filesize member to
717 __off64_t.
718 * fhandler_proc.cc (format_proc_meminfo): Change to return __off64_t.
719 (format_proc_stat): Ditto.
720 (format_proc_uptime): Ditto.
721 * fhandler_process.cc (format_process_stat): Ditto.
722 (format_process_status): Ditto.
723 (format_process_statm): Ditto.
724 * pinfo.cc (_pinfo::cmdline): Expect __off64_t parameter.
725 * pinfo.h (class _pinfo): Change declaration of cmdline accordingly.
726
762520f3
CF
7272003-03-07 Christopher Faylor <cgf@redhat.com>
728
729 * path.h (PATH_LNK): New enum val.
730 (path_conv::is_lnk_symlink): New function. True if path represents
731 .lnk style symlink.
732 * path.cc (check_shortcut): Set PATH_LNK in pflags when appropriate.
733 (symlink_info::check): Ditto. Remove PATH_LNK from pflags initially.
734 * syscalls.cc (unlink): Always remove readonly attribute from a symlink
735 regardless of type.
736 (link): (from Corinna Vinschen) Allow links to symlinks. Reset
737 attributes on a symlink after successful link creation.
738 (chmod): Use is_lnk_symlink where appropriate.
739 (rename): Ditto.
740
7412003-03-07 Pierre Humblet <pierre.humblet@ieee.org>
742
743 * tty.cc (create_tty_master): Call GetComputerName instead of
744 cygwin_gethostname. Set ut_id.
745 * syscalls.cc (login): Call endutent.
746 (setutent): Do not seek after a fresh open.
747
6f8102cb
CV
7482003-03-07 Corinna Vinschen <corinna@vinschen.de>
749
750 * syscalls.cc (seteuid32): Fix formatting.
751
88243328
TP
7522003-03-04 Thomas Pfaff <tpfaff@gmx.net>
753
754 * thread.cc (MTinterface::fixup_after_fork): Initialize mainthread
755 prior to pthread objects.
762520f3 756
12390bc4
CV
7572003-03-04 Jason Tishler <jason@tishler.net>
758
759 * fhandler_socket.cc (fhandler_socket::dup): Initialize type.
760
c418817e
CF
7612003-03-03 Christopher Faylor <cgf@redhat.com>
762
763 * fhandler.h (fhandler_tty_slave::close): Declare new function.
764 (fhandler_tty_slave::dup): Declare new function.
765 (fhandler_tty_slave::fixup_after_function): Declare new function.
766 * fhandler_tty.cc (fhandler_tty_slave_open): Only increment
767 fhandler_console::open_fhs when associated with a pty.
768 (fhandler_tty_slave::close): Define new function. Decrement
769 fhandler_console::open_fhs when associated with a pty.
770 (fhandler_tty_slave::dup): Define new function. Increment
771 fhandler_console::open_fhs when associated with a pty.
772 (fhandler_tty_slave::fixup_after_fork): Define new function. Increment
773 fhandler_console::open_fhs when associated with a pty.
774
e11fe31b
CF
7752003-03-03 Christopher Faylor <cgf@redhat.com>
776
777 * fhandler_tty.cc (fhandler_pty_slave::open): Grudgingly increment
778 fhandler_console::open_fhs here.
779 (fhandler_pty_slave::close): Ditto for close.
780
cffdb4b1
CF
7812003-03-02 Christopher Faylor <cgf@redhat.com>
782
783 * lib/getopt.c: Refresh from NetBSD sources.
784
d5d2ffee
CF
7852003-03-02 Christopher Faylor <cgf@redhat.com>
786
787 * fhandler_console.cc (fhandler_console::close): Don't decrement
788 in use counter if in vfork fixup stage.
789
c2c6b170
CF
7902003-03-02 Christopher Faylor <cgf@redhat.com>
791
792 * lib/getopt.c: Nuke use of unneeded BSDisms.
793
8b19b43d
CF
7942003-03-02 Christopher Faylor <cgf@redhat.com>
795
796 * dll_init.cc (dll_list::load_after_fork): Don't revert to LoadLibrary
797 if LoadLibraryEx fails.
798 * dtable.cc (dtable::dec_console_fds): Eliminate.
799 (dtable::release): Don't treat console specially.
800 (dtable::build_fhandler): Ditto.
801 * dtable.h (console_fds): Eliminate.
802 (dtable::dec_console_fds): Eliminate.
803 (dtable::inc_console_fds): Eliminate.
804 * fhandler.h (fhandler_console::open_fhs): New static element.
805 * fhandler_console.cc (fhandler_console::open): Increment open_fs.
806 (fhandler_console::close): Call FreeConsole if no more open consoles
807 and ctty is not associated with the console.
808 * syscalls.cc (setsid): Simplify check for when to call FreeConsole.
809 (check_pty_fds): Eliminate definition.
810 * winsup.h (check_pty_fds): Eliminate declaration.
811
3efc65f7
CF
8122003-03-02 Christopher Faylor <cgf@redhat.com>
813
814 * dll_init.cc (dll_list::load_after_fork): Fix typo where result of
815 LoadLibrary was ignored.
816
5a082e9e
CV
8172003-03-01 Corinna Vinschen <corinna@vinschen.de>
818
819 * fhandler_socket.cc (fhandler_socket::bind): Open and write socket
820 file using Win32 calls.
821
9d913f07
CV
8222003-03-01 Corinna Vinschen <corinna@vinschen.de>
823
824 * fhandler_socket.cc (get_inet_addr): Open and read socket file using
825 Win32 calls.
826
005c3065
CF
8272003-02-28 Christopher Faylor <cgf@redhat.com>
828
829 * cygwin.din: Wrap atexit and exit with cygwin, thread-safe functions.
830 * dcrt0.cc (cygwin_atexit): New function.
831 (cygwin_exit): Ditto.
832
27b4082a
PH
8332003-02-28 Pierre Humblet <pierre.humblet@ieee.org>
834
835 * syscalls.cc (fstat64): Pass get_name () to pc.
005c3065 836 (access): Pass fn to stat_worker.
27b4082a
PH
837
8382003-03-27 Corinna Vinschen <corinna@vinschen.de>
5777b970
CV
839
840 * fhandler_socket.cc (class sock_event): New class managing Winsock
841 events for interruptible socket calls.
842 (fhandler_socket::connect): Move support for interruptible call to
843 class sock_event. Use class object instead.
844 (fhandler_socket::accept): Ditto. Remove useless casts.
845
005c3065 8462003-03-27 Thomas Pfaff <tpfaff@gmx.net>
5777b970
CV
847
848 * fhandler_socket.cc (fhandler_socket::connect): Add support for
849 an interruptable connect.
850
7b2ce663
CV
8512003-02-27 Pierre Humblet <pierre.humblet@ieee.org>
852
853 * uinfo.cc (internal_getlogin): Only update user.groups.pgsid
854 if the call to set the primary group succeeds.
855
0e7a60fe
CF
8562003-02-27 Christopher Faylor <cgf@redhat.com>
857
858 * cygthread::detach: Improve error message.
859
61a52599
CV
8602003-02-26 Pierre Humblet <pierre.humblet@ieee.org>
861
862 * sec_helper.cc (get_sids_info): debug_print owner_sid and group_sid.
863
6b9a9ce6
CV
8642003-02-25 Corinna Vinschen <corinna@vinschen.de>
865
866 * mmap.cc (mmap64): Fix returned address by taking the granularity
867 into account.
868
1ffc44aa
PH
8692003-02-23 Pierre Humblet <pierre.humblet@ieee.org>
870
871 * syslog.cc (syslog): Do not unlock the file before closing it
872 and remove debug_printf about stream errors.
873
a066f364
CF
8742003-02-22 Christopher Faylor <cgf@redhat.com>
875
876 * cygmalloc.h: Remove MORECORE_CANNOT_TRIM. It's not true.
877 # cygwin.din: Export mallinfo.
878 # malloc_wrapper.cc (mallinfo): New function.
879
878e60c5
CF
8802003-02-22 Pierre Humblet <pierre.humblet@ieee.org>
881
882 * syslog.cc (syslog): Do not print the Windows pid. Print the Cygwin
883 pid as an unsigned decimal. On Win95 print a timestamp and attempt to
884 lock the file up to four times in 3 ms.
885
b1d1e50d
CV
8862003-02-21 Corinna Vinschen <corinna@vinschen.de>
887
888 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Fix compiler
889 warning.
890 (fhandler_socket::fstat): Simplify. Set st_uid/st_gid to effective
891 uid/gid of current process in case of open sockets.
892
cf762b08
CV
8932003-02-21 Corinna Vinschen <corinna@vinschen.de>
894
895 * dtable.cc (dtable::build_fhandler_from_name): Set some fhandler
896 data on sockets to evaluate AF_LOCAL sockets correctly.
897 (dtable::build_fhandler): Set unit number on sockets.
898 * fhandler.h (fhandler_socket): Add unit number.
899 (fhandler_socket::get_unit): New method.
900 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Set unit
901 number.
902 (fhandler_socket::fstat): Reorganize to return more Linux-like
903 values.
904 * net.cc: include ctype.h.
905 (fdsock): Set unit number when building fhandler.
906 * path.cc (path_conv::check): Set device type to FH_SOCKET if file
907 is a AF_UNIX socket.
908 (get_devn): Evaluate unit for virtual socket devices.
909 (win32_device_name): Set windows path for sockets to unix_path with
910 just backslashes to keep the different names.
911 * syscalls.cc (fstat64): Don't override st_ino, st_dev and st_rdev
912 for sockets.
913 (stat_worker): Ditto.
914
9152003-02-21 Pierre Humblet <pierre.humblet@ieee.org>
916
917 * autoload.cc (AccessCheck): Add.
918 (DuplicateToken): Add.
919 * security.h (check_file_access): Declare.
920 * syscalls.cc (access): Convert path to Windows, check existence
921 and readonly attribute. Call check_file_access instead of acl_access.
922 * security.cc (check_file_access): Create.
923 * sec_acl (acl_access): Delete.
924
5cd82412
CF
9252003-02-19 Christopher Faylor <cgf@redhat.com>
926
927 * fhandler.cc (fhandler_base::open): Move some filesystem specific
928 stuff.
929 (fhandler_disk_file::open): Accept some filesystem specific stuff.
930 * sigproc.cc (wait_for_sigthread): Become slightly more thread safe.
931 (sig_send): Don't assume that signal thread is ready.
932
892d8962
CV
9332003-02-20 Corinna Vinschen <corinna@vinschen.de>
934
935 * wincap.h (wincap): Remove unnecessary definition of
936 supports_sparse_files.
937 * wincap.cc: Ditto.
938
518f5d49
CV
9392003-02-20 Corinna Vinschen <corinna@vinschen.de>
940
941 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check descriptor
942 created by cygheap_fdnew constructor.
943 * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
944 * fhandler_socket.cc (fhandler_socket::accept): Ditto and move
945 creation of file descriptor behind blocking OS call.
946 * net.cc (cygwin_socket): Ditto.
947 (cygwin_rcmd): Ditto.
948 (cygwin_rresvport): Ditto.
949 (cygwin_rexec): Ditto.
950 (socketpair): Ditto.
951
3a88cf1b
CV
9522003-02-20 Corinna Vinschen <corinna@vinschen.de>
953
954 * autoload.cc (GetCompressedFileSize): Add.
955 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Compute
956 st_blocks value from GetCompressedFileSize() if available.
957
79207923
CV
9582003-02-18 Vaclav Haisman <V.Haisman@sh.cvut.cz>
959
960 * wincap.h (wincaps::supports_sparse_files): New flag.
961 (wincapc::supports_sparse_files): New method.
962 * wincap.cc (wincap_unknown): Define value for the new flag.
963 (wincap_95): Ditto.
964 (wincap_95osr2): Ditto.
965 (wincap_98): Ditto.
966 (wincap_98se): Ditto.
967 (wincap_me): Ditto.
968 (wincap_nt3): Ditto.
969 (wincap_nt4): Ditto.
970 (wincap_nt4sp4): Ditto.
971 (wincap_2000): Ditto.
972 (wincap_xp): Ditto.
973 * path.h (path_conv::fs_flags): New method.
005c3065
CF
974 * fhandler_disk_file.cc: Include winioctl.h for DeviceIoControl.
975 (fhandler_disk_file::open): Set newly created and truncated files as
79207923
CV
976 sparse on platforms that support it.
977
afe13e84
CV
9782003-02-17 Pierre Humblet <pierre.humblet@ieee.org>
979
980 * grp.cc (internal_getgroups): Handle properly tokens with
981 no groups. Fix bug introduced on 2003-02-04.
982
8fc16812
CF
9832003-02-16 Christopher Faylor <cgf@redhat.com>
984
408e9b2f 985 * cygwin.din: Export all appropriate newlib libm functions. Sort.
8fc16812
CF
986 * include/cygwin/version.h: Bump API minor number.
987
f655eadf
CF
9882003-02-15 Christopher Faylor <cgf@redhat.com>
989
8fc16812 990 * cygwin.din: Export all appropriate newlib libc functions.
f655eadf
CF
991 * include/cygwin/version.h: Bump API minor number.
992
4d9ba012
CV
9932003-02-14 Jason Tishler <jason@tishler.net>
994
995 * mmap.cc (mprotect): Add missing break.
996
dff01e3a
CF
9972003-02-13 Christopher Faylor <cgf@redhat.com>
998
999 * exceptions.cc (try_to_debug): Don't reset priority when returning
1000 from non-waitloop call.
d1d1797e
CF
1001
10022003-02-13 Vaclav Haisman <V.Haisman@sh.cvut.cz>
005c3065 1003 Christopher Faylor <cgf@redhat.com>
d1d1797e
CF
1004
1005 * fhandler_console.cc (fhandler_console::write_normal): Use MessageBeep
1006 for bell sound.
1007 * autoload.cc (MessageBeep): Add.
1008
97c61aeb
CF
10092003-02-13 Christopher Faylor <cgf@redhat.com>
1010
1011 * include/cygwin/types.h: Use correct ifdef guard for u_ definitions.
1012
a200c081
CF
10132003-02-13 Christopher Faylor <cgf@redhat.com>
1014
1015 * environ.cc (environ_init): Use strechr.
1016
2858de3a
CF
10172003-02-13 Christopher Faylor <cgf@redhat.com>
1018
1019 * include/cygwin/in.h (sockaddr_in): Fix typo.
1020
75c8a70c
CF
10212003-02-12 Christopher Faylor <cgf@redhat.com>
1022
1023 * path.h (path_conv): Reorganize slightly.
1024
939d19b0
CF
10252003-02-12 Christopher Faylor <cgf@redhat.com>
1026
1027 * fhandler_tty.cc (process_input): Add sanity check to ensure that
1028 console typeahead is cleared on signal.
1029
7a44ba05
CF
10302003-02-12 Christopher Faylor <cgf@redhat.com>
1031
1032 * spawn.cc (linebuf::~linebuf): Resurrect commented out (for
1033 debugging?) code.
1034
407b8df6
CF
10352003-02-10 Ralf Habacker <ralf.habacker@freenet.de>
1036
1037 * include/cygwin/in.h (in_attr_t): Define new type.
1038 * include/arpa/inet.h (inet_addr): Change return type to in_addr_t.
1039 (inet_lnaof): Ditto.
1040 (inet_netof): Ditto.
1041 (inet_network): Ditto.
1042
10432003-02-10 Christopher Faylor <cgf@redhat.com>
1044
1045 * include/cygwin/types.h: Move many *_t typedefs here. Protect them
1046 with ifdefs.
1047 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Change ntsec_atts to mode_t.
1048 * security.cc (get_attribute_from_acl): Accept mode_t attribute.
1049 (get_nt_attribute): Ditto.
1050 (get_file_attribute): Ditto.
1051 (get_nt_object_attribute): Ditto.
1052 (get_object_attribute): Ditto.
1053 * security.h: Reflect above changes.
1054 * syscalls.cc (chown_worker): Change attrib to mode_t.
1055
ad80bc42
CF
10562003-02-08 Christopher Faylor <cgf@redhat.com>
1057
67c64e3b 1058 * include/cygwin/version.h: Bump DLL minor number to 21.
ad80bc42
CF
1059
10602003-02-07 Christopher Faylor <cgf@redhat.com>
1061
1062 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Bump down to 16MB thanks to below
1063 changes.
1064
4136fdb1
CV
10652003-02-07 Corinna Vinschen <corinna@vinschen.de>
1066
1067 * mmap.cc (mmap_record::alloc_map): De-inline. Add offset and length
1068 parameter. Only protect pages actually unused currently. Do job
1069 of map_map() when initializing a map.
1070 (mmap_record::map_map): Reduce functionality for the reuse case
1071 of private anonymous mapping.
1072 (mmap_record::fixup_map): Format change.
1073 (list::add_record): Add offset and length parameter to call
1074 mmap_record::alloc_map() correctly.
1075 (mmap64): Rename `l' variable to `map_list'. Accomodate above changes.
1076 (munmap): Rename `l' variable to `map_list'.
1077 (msync): Ditto.
1078 (fhandler_disk_file::mmap): Streamline code.
1079 (mprotect): Ditto.
1080 (fixup_mmaps_after_fork): Rename `l' variable to `map_list'.
1081
49b84ce4
CF
10822003-02-07 Vaclav Haisman <V.Haisman@sh.cvut.cz>
1083 Christopher Faylor <cgf@redhat.com>
1084
1085 * exceptions.cc (try_to_debug): Set priority of current thread rather
1086 than the main thread. Make busy waiting loop less busy. Restore
1087 priority when function returns.
1088
bc5b63ed
CF
10892003-02-07 Christopher Faylor <cgf@redhat.com>
1090
1091 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Set high to avoid mmaps.
1092
10932003-02-07 Christopher Faylor <cgf@redhat.com>
1094
1095 * pipe.cc (fhandler_pipe::close): Avoid extraneous this->.
1096
1de8d164
CF
10972003-02-06 Christopher Faylor <cgf@redhat.com>
1098
1099 * heap.cc (heap_init): Remove debugging code.
1100
565e8015
CV
11012003-02-06 Pierre Humblet <pierre.humblet@ieee.org>
1102
1103 * security.h: Introduce names UNKNOWN_UID and UNKNOWN_GID and delete
1de8d164 1104 declaration of is_grp_member.
565e8015
CV
1105 * uinfo.cc (internal_getlogin): Use UNKNOWN_GID.
1106 * passwd.cc (pwdgrp::read_passwd): Use UNKNOWN_UID.
1107 * grp.cc (pwdgrp::read_group): Change group name to provide better
1108 feedback.
1109 (getgrgid): Use gid16togid32.
1110 * sec_helper.cc (is_grp_member): Delete.
1111
d238c1b4
CF
11122003-02-05 Christopher Faylor <cgf@redhat.com>
1113
1114 * path.cc: Change 'to_posix_p' to 'to_posix' throughout.
1115 (conv_path_list_buf_size): Accommodate relative paths.
1116
b7f52fe8
CF
11172003-02-05 Christopher Faylor <cgf@redhat.com>
1118
1119 * path.cc (etc::dir_changed): Fix debug printf.
1120
62cd433e
CV
11212003-02-05 Corinna Vinschen <corinna@vinschen.de>
1122
1123 * sec_acl.cc (setacl): Move all permission settings to beginning of
1124 loop. Set default rights to same values as in alloc_sd(). Set DELETE
1125 for owner and default owner only if S_IWOTH is given.
1126
11272003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
1128
1129 * sec_acl.cc: Change all __aclent16_t to __aclent32_t except in
1130 wrapper function definitions. Replace call to the aclXYZ functions by
1131 calls aclXYZ32.
1132 (searchace): Change type of third argument to __uid32_t and use
1133 ILLEGAL_UID instead of -1;
1134 (setacl): Remove some initializations. Only give STANDARD_RIGHTS_WRITE
1135 for S_IWOTH. Replace -1 by ILLEGAL_UID.
1136 (getacl): Change type of owner_sid, group_sid and ace_sid to cygpsid.
1137 In last else clause, suppress second call to ace_sid.get_id and use
1138 TRUE in first call. Replace EqualSid by ==.
1139 (acl_access): Call internal_getgroups in USER and GROUP cases.
1140 (acecmp: Define static.
1141 (acl32): Create from 16 bit type.
1142 (facl32): Ditto.
1143 (lacl32): Ditto.
1144 (aclcheck32): Ditto.
1145 (aclsort32): Ditto.
1146 (acltomode32): Ditto.
1147 (aclfrommode32): Ditto.
1148 (acltopbits32): Ditto.
1149 (aclfrompbits32): Ditto.
1150 (acltotext32): Ditto.
1151 (aclfromtext32): Ditto, and use strechr.
1152 (acl16to32): Create.
1153 (acl): Make it a wrapper function.
1154 (facl): Ditto.
1155 (lacl): Ditto.
1156 (aclcheck): Ditto.
1157 (aclsort): Ditto.
1158 (acltomode): Ditto.
1159 (aclfrommode): Ditto.
1160 (acltopbits): Ditto.
1161 (aclfrompbits): Ditto.
1162 (acltotext): Ditto.
1163 (aclfromtext): Ditto.
1164 * security.cc (write_sd): Call set_process_privilege and check
1165 ownership.
1166 (alloc_sd): Remove call to set_process_privilege and the owner check.
1167
cadd065b
CF
11682003-02-05 Christopher Faylor <cgf@redhat.com>
1169
1170 * include/sys/cygwin.h: Use C-style comments.
1171
0c8455c3
CV
11722003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
1173
1174 * sec_helper.cc (get_sids_info): New function.
1175 * security.cc (extract_nt_dom_user): Simplify with strechr.
1176 (get_user_groups): Initialize glen to MAX_SID_LEN.
1177 (get_user_local_groups): Ditto.
1178 (get_attribute_from_acl): Define ace_sid as cygpsid.
1179 (get_nt_attribute): Define owner_sid and group_sid as cygpsid.
1180 Call get_sids_info instead of cygsid.get_{u,g}id and is_grp_member.
1181 (get_nt_object_attribute): Ditto.
1182 (alloc_sd): Define ace_sid as cygpsid.
1183
5ae9331a
TP
11842003-02-04 Thomas Pfaff <tpfaff@gmx.net>
1185
1186 * syscalls.cc (struct system_cleanup_args): New struct.
1187 (system_cleanup): New function.
1188 (system): Use pthread_cleanup_push and _pop to save and restore
1189 signal handlers and sigprocmask.
1190
3dbafd87
CV
11912003-02-04 Corinna Vinschen <corinna@vinschen.de>
1192
1193 * path.cc (symlink): Create security attributes so that only the
1194 user can modify the symlink.
1195 * security.cc (set_security_attribute): Remove symlink special
1196 handling.
1197
0daf2561
CV
11982003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
1199
1200 * grp.cc (internal_getgroups): Do not return without closing
1201 the process handle.
1202
4a21c2d5
CV
12032003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
1204
1205 * security.h (class cygpsid): New class.
1206 (class cygsid): Use cygpsid as base. Remove members psid, get_id,
1207 get_uid, get_gid, string, debug_printf and the == and != operators.
1208 (cygsidlist::clear_supp): Only do work if setgroups has been called.
1209 * sec_helper.cc: Define sid_auth NO_COPY.
1210 (cygpsid::operator==): New operator.
1211 (cygpsid::get_id): New function.
1212 (cygpsid::string): New function.
1213 (cygsid::string): Delete.
1214 (cygsid::get_id): Delete.
1215 * pwdgrp.h: Change arguments of internal_getpwsid,
1216 internal_getgrsid and internal_getgroups to cygpsid.
1217 * passwd.cc (internal_getpwsid): Change argument from cygsid to cygpsid.
d238c1b4 1218 * grp.cc (internal_getgrsid): Ditto.
4a21c2d5
CV
1219 (internal_getgroups): Ditto.
1220
335556d5
CF
12212003-02-03 Christopher Faylor <cgf@redhat.com>
1222
1223 Eliminate most unneeded this-> pointers throughout.
1224
153e83c6
CV
12252003-02-03 Pierre Humblet <pierre.humblet@ieee.org>
1226
1227 * security.h: Add third argument to set_process_privilege.
1228 * autoload.cc: Add OpenThreadToken.
1229 * sec_helper.cc (set_process_privilege): Add and use use_thread
1230 argument.
1231 * security.cc (alloc_sd): Modify call to set_process_privilege.
1232 Remember the result in each process. If failed and file owner is not
1233 the user, fail.
1234
f0f3ea68
CV
12352003-02-03 Corinna Vinschen <corinna@vinschen.de>
1236
1237 * fhandler_socket.cc (fhandler_socket::recvfrom): Return buffer
1238 length and don't set errno in case of WSAEMSGSIZE error.
1239 (fhandler_socket::recvmsg): Ditto.
1240
6688a061
CF
12412003-02-01 Christopher Faylor <cgf@redhat.com>
1242
1243 * grp.cc (getgrent32): Only refresh group entries when at beginning.
1244 (internal_getgrsid): Only refresh if uninitialized.
1245 (internal_getgrent): Ditto.
1246 * passwd.cc (getpwent): Only refresh passwd entries when at beginning.
1247 (pwdgrp::read_passwd): linebuf *cannot* be NO_COPY.
1248 (internal_getpwsid): Only refresh if uninitialized.
1249 (getpass): No need to refresh passwd data here.
1250 * pwdgrp.h (refresh): Eliminate default.
1251
a5a93a62
CF
12522003-01-31 Christopher Faylor <cgf@redhat.com>
1253
1254 * dlfcn.cc (dlerror): Only report load errors once per error.
1255
b0a82a85
CF
12562003-01-31 Christopher Faylor <cgf@redhat.com>
1257
1258 * fhandler_serial.cc (fhandler_serial::open): Avoid extraneous setting
1259 of res.
1260
1261 * termios.cc (tcsetattr): Correctly record errno after tcsetattr call.
1262
12632003-01-31 Troy Curtiss <troyc@usa.net>
1264
1265 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add error-checking
1266 so that if any Win32 SetComm*() calls fail, errno gets set to EINVAL
1267 and tcsetattr() returns -1. Catch invalid bitrates, mostly. If baud
1268 rate setting is B0, just drop DTR and leave Win32 DCB bitrate as-is
1269 since 0 is not a valid Win32 setting.
1270 (fhandler_serial::tcgetattr): If DTR is low, populate the bitrate as
1271 B0, otherwise get it from the DCB.
1272
949c3da1
CF
12732003-01-31 Christopher Faylor <cgf@redhat.com>
1274
1275 * passwd.cc (pwdgrp::read_passwd): linebuf *must* be static (from
1276 Pierre Humblet).
1277 * pwdgrp.h (pwdgrp::refresh): Avoid calling read function if we already
1278 have lock since that means we are in the process of reading the file.
1279
485d85bf
CF
12802003-01-31 Jason Tishler <jason@tishler.net>
1281
1282 * shared.cc (shared_info::heap_chunk_size): Use correct variable when
1283 reading HKLM.
1284
704ce461
CF
12852003-01-30 Christopher Faylor <cgf@redhat.com>
1286
1287 * fhandler_registry.cc (fhandler_registry::exists): Fix off-by-one
1288 error when inspecting path.
1289
ba6e1083
CF
12902003-01-29 Christopher Faylor <cgf@redhat.com>
1291
1292 * lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT
1293 behavior.
1294
12952003-01-28 Corinna Vinschen <corinna@vinschen.de>
01e3c897
CV
1296
1297 * fhandler_socket.cc (fhandler_socket::accept): On successful execution
1298 set connection state of returned socket to CONNECTED.
1299
dfb366da
CF
13002003-01-27 Christopher Faylor <cgf@redhat.com>
1301
1302 * passwd.cc (pwdgrp::parse_passwd): Be more unforgiving about
1303 non-numeric fields.
1304
03dba1de
CF
13052003-01-26 Christopher Faylor <cgf@redhat.com>
1306
1307 * uinfo.cc (pwdgrp::next_num): Remove check for NULL since it is no
1308 longer a valid return from next_str.
1309 (pwdgrp::add_line): Duh. Revert to use strchr.
1310
fea48988
CF
13112003-01-26 Christopher Faylor <cgf@redhat.com>
1312
ca6018a0 1313 * string.h (strechr): New function.
fea48988
CF
1314 * uinfo.cc (pwdgrp::next_str): Search only for input char in string.
1315 Return EOS on failure. Don't check for NULL since it shouldn't be
1316 possible.
1317 (pwdgrp::add_line): Revert to replacing '\n' in input line with '\0'.
1318 (pwdgrp::next_num): Pass explicit separator character to next_str.
1319 * grp.cc (pwdgrp::parse_group): Ditto.
1320 * passwd.cc (pwdgrp::parse_passwd): Ditto. Revamp test for garbage
1321 input.
1322 * pwdgrp.h (pwdgrp::next_str): Don't use default parameter.
1323
9a751621
CF
13242003-01-26 Christopher Faylor <cgf@redhat.com>
1325
1326 * uinfo.cc (pwdgrp::load): Regularize strace output. Add warning for
1327 CreateFile failure.
1328
c9133395
CF
13292003-01-26 Christopher Faylor <cgf@redhat.com>
1330
bdbd7fb6
CF
1331 * passwd.cc (pwdgrp::parse_passwd): Eliminate use of memset. The
1332 structure should always be completely filled out.
1333 * grp.cc (pwdgrp::parse_group): Ditto.
1334
13352003-01-26 Christopher Faylor <cgf@redhat.com>
1336
1337 * grp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating
c9133395 1338 gr_mem.
65037056
CF
1339
13402003-01-26 Christopher Faylor <cgf@redhat.com>
1341
1342 * include/sys/strace.h (paranoid_printf): Define as not being part of
1343 "all" output.
1344
13452003-01-25 Christopher Faylor <cgf@redhat.com>
1346
1347 * pwdgrp.h (pwdgrp::next_num): Rename from next_int. Returns
1348 true/false if parse operation succeeded.
1349 (pwdgrp::reparse): Remove.
1350 (pwdgrp::raw_ptr): New function. Returns pointer in line.
1351 (pwdgrp::next_num): New functions for parsing other than unsigned long.
1352 * grp.cc (pwdgrp::parse_group): Reinstate previous parsing behavior.
1353 Don't fill in fields with NULL and assign empty gr_mem to known pointer
1354 rather than doing a pointless calloc. Streamline gr_mem parsing.
1355 Don't increment curr_lines here.
1356 * passwd.cc (pwdgrp::parse_passwd): Use new behavior of next_num.
1357 Don't increment curr_lines here.
1358 * uinfo.cc (pwdgrp::next_str): Keep returning EOL if out of data.
1359 (pwdgrp::reparse): Remove.
1360 (pwdgrp::next_num): Rename from next_int. Return bool indicating
1361 success of parse, argument returns value parsed.
1362 (pwdgrp::add_line): Increment curr_lines here on successful parse.
1363 (pwdgrp::load): (from Pierre Humblet) Don't return status. Just report
1364 it here.
1365
a53ddfe6
CF
13662003-01-25 Christopher Faylor <cgf@redhat.com>
1367
1368 * pwdgrp.cc (pwdgrp::reparse): Declare.
1369 * uinfo.cc (pwdgrp::reparse): Define.
c9b99d0d 1370 * grp.cc (pwdgrp::parse_group): Use reparse.
a53ddfe6 1371
4f7e12dd
CV
13722003-01-25 Pierre Humblet <pierre.humblet@ieee.org>
1373
1374 * syscalls.cc (seteuid32): On Win95 get the pw entry. If it exists
1375 update the euid and call cygheap->user.set_name. Remove special
1376 handling of ILLEGAL_UID.
ba6e1083 1377 (setgid32): Add a debug_printf. On Win95, always set the egid.
4f7e12dd
CV
1378 Remove special handling of ILLEGAL_GID. Do not compare gid and gr_gid.
1379 * child_info.h (class cygheap_exec_info): Remove uid.
1380 * spawn.cc (spawn_guts): Do not set ciresrv.moreinfo->uid.
1381 * dcrto.cc (dll_crt0_1): Always call uinfo_init.
1382 * uinfo.cc (uinfo_init): Reorganize and close handle if needed.
1383 (cygheap_user::ontherange): Do not call internal_getpwnam if pw is NULL.
1384
45dbfc26
CF
13852003-01-24 Christopher Faylor <cgf@redhat.com>
1386
1387 * fhandler_console.cc (fhandler_console::send_winch_maybe): Reset
1388 scroll region if size changes.
1389
7d33eefa
CV
13902003-01-24 Pierre Humblet <pierre.humblet@ieee.org>
1391 Jason Tishler <jason@tishler.net>
1392
1393 * cygwin.din: Export setreuid32, setreuid, setregid32, setregid.
1394 * syscalls.cc (setreuid32): New function.
1395 (setreuid): Ditto.
1396 (setregid32): Ditto.
1397 (setregid): Ditto.
1398 * include/cygwin/version.h: Bump API minor number.
1399
ac413374 14002003-01-23 Christopher Faylor <cgf@redhat.com>
69fae986 1401
ac413374 1402 * pwdrp.h (pwdgrp::refresh): Lock entire test prior to reading.
2037688a 1403
ac413374 14042003-01-23 Christopher Faylor <cgf@redhat.com>
09a88426
CF
1405
1406 * grp.cc (pwdgrp::parse_group): Eliminate arg and use class member
1407 instead. Use next_str and next_int to parse arguments.
1408 * passwd.cc (pwdgrp::parse_passwd): Ditto.
1409 (grab_string): Eliminate.
1410 (grab_int): Ditto.
1411 * pwdgrp.h (pwdgrp::parse): Eliminate input arg.
1412 (pwdgrp::parse_passwd): Reflect above change.
1413 (pwdgrp::parse_group): Reflect above change.
1414 (pwdgrp::next_str): New function.
1415 (pwdgrp::next_int): Ditto.
1416 (pwdgrp::gets): Eliminate.
1417 * uinfo.cc (pwdgrp::next_str): New function.
1418 (pwdgrp::next_int): Ditto.
1419 (pwdgrp::add_line): Subsume gets.
1420 (pwdgrp::gets): Eliminate.
1421 (pwdgrp::load): Just call add_line to parse input buffer.
1422
ac413374
CF
14232003-01-22 Thomas Pfaff <tpfaff@gmx.net>
1424
1425 * include/pthread.h (PTHREAD_MUTEX_RECURSIVE): Revert changes from
1426 2003-01-09 mutex patch.
1427 (PTHREAD_MUTEX_ERRORCHECK): Ditto.
1428
14292003-01-22 Corinna Vinschen <corinna@vinschen.de>
1430
1431 * cygrun.c: Move from here to ../testsuite.
1432 * Makefile.in: Remove cygrun.exe dependencies.
1433
14342003-01-21 Jason Tishler <jason@tishler.net>
1435
1436 * cygwin.din: Export nanosleep().
1437 * signal.cc (nanosleep): New function.
1438 (sleep): Move old functionality to nanosleep(). Call nanosleep().
1439 (usleep): Remove old functionality. Call nanosleep().
1440 * include/cygwin/version.h: Bump API minor number.
1441
57394495
CF
14422003-01-21 Christopher Faylor <cgf@redhat.com>
1443
1444 * grp.cc: Call gr.refresh() rather than doing isunitialized tests
1445 throughout.
1446 (gr): Use constructor (sigh).
1447 (pwdgrp::parse_group): Rename from parse_grp.
1448 (pwdgrp::read_group): Rename from read_etc_group. Just call gr.load
1449 with a single argument.
1450 * passwd.cc: Call pr.refresh() rather than doing isunitialized tests
1451 throughout.
1452 (pr): Use constructor (sigh).
1453 (pwdgrp::parse_passwd): Rename from "parse_pwd".
1454 (pwdgrp::read_passwd): Rename from read_etc_passwd. Just call pr.load
1455 with a single argument.
1456 * pwdgrp.h (pwdgrp_state): Eliminate.
1457 (pwdgrp): Reflect above renamings.
1458 (pwdgrp::etc_ix): Rename from pwd_ix.
1459 (pwdgrp::read): New element.
1460 (pwdgrp::lock): New element.
1461 (pwdgrp::refresh): New function.
1462 (pwdgrp::load): Eliminate variations which take buffer arguments.
1463 (pwdgrp::pwdgrp): New constructors. Initialize mutex here.
1464 * uinfo.cc (pwdgrp::load): Accommodate pwd_ix -> etc_ix renaming.
1465 (pwdgrp::load): Set initialized state to true rather than setting state
1466 to loaded.
1467
984864e9
CF
14682003-01-21 Christopher Faylor <cgf@redhat.com>
1469
89f7e8d1 1470 * include/cygwin/version.h: Bump DLL minor number.
984864e9 1471
d8cde3a3
CF
14722003-01-21 Pierre Humblet <pierre.humblet@ieee.org>
1473
1474 * path.h (etc::change_possible): Revert the type to bool.
1475 (etc::set_last_modified): Remove obsolete function.
1476 * path.cc (etc::change_possible): Revert type to bool.
1477 (etc::test_file_change): Do not test for negative values of
1478 change_possible and do not set it to -res.
1479 (etc::dir_changed): When the handle is NULL, call memset instead of
09a88426
CF
1480 test_file_changed. When the handle is invalid, return true. Detect
1481 filename change in /etc.
d8cde3a3 1482 (etc::file_changed): Remove unneeded check for !fn[n].
33de631b 1483 * uinfo.cc (pwdgrp::load): Eliminate spurious setting of fh to NULL.
b99b804b 1484 * pwdgrp.h (pwdgrp::operator =): Eliminate.
d8cde3a3 1485
7905c4f1
CF
14862003-01-19 Christopher Faylor <cgf@redhat.com>
1487
1488 * pwdgrp.h (etc): Move to path.h.
1489 (pwdgrp::max_lines): New field.
1490 (pwdgrp::curr_lines): New field.
1491 (pwdgrp::pwdgrp_buf): Ditto.
1492 (pwdgrp_buf_elem_size): Ditto.
1493 (pwdgrp_parse): Ditto.
1494 (pwdgrp::gets): Just declare here.
1495 (pwdgrp::load): Ditto. Just take one argument.
1496 (pwdgrp::load): Define overloaded function accepting passwd buf.
1497 (pwdgrp::load): Define overloaded function accepting group buf.
1498 * grp.cc: Use pwdgrp elements rather than standalone static variables
1499 throughout.
1500 (curr_lines): Eliminate.
1501 (max_lines): Ditto.
1502 (add_grp_line): Ditto.
1503 (parse_grp): Define as returning boolean. Accept void * arg and line
1504 count. Coerce first argument into __group32 buf reference. Increment
1505 curr_line as appropriate.
1506 (read_etc_group): Pass pwdgrp buffer to gr.load.
1507 * passwd.cc: Use pwdgrp elements rather than standalone static variables
1508 throughout.
1509 (curr_lines): Eliminate.
1510 (max_lines): Ditto.
1511 (add_grp_line): Ditto.
1512 (parse_passwd): Define as returning boolean. Accept void * arg and line
1513 count. Coerce first argument into passwd buf reference. Increment
1514 curr_line as appropriate.
1515 (read_etc_group): Pass pwdgrp buffer to pr.load.
1516 * path.cc (etc::fn): Extend buffer size to allow index by 1 rather than
1517 zero.
1518 (etc::last_modified): Ditto.
1519 (etc::change_possible): Ditto. Renamed from sawchange. Change to
1520 signed char since elements are now tri-state.
1521 (etc::init): Assume "handle" is 1 based rather than 0.
1522 (etc::test_file_change): New function. Sets change_possible based on
1523 file date comparison.
1524 (etc::dir_changed): Check file states immediately after changed_h is
1525 initialized to avoid a race.
1526 (etc::file_changed): Use test_file_change to detect if file needs to be
1527 updated.
1528 * path.h (etc): Move class here from pwdgrp.h.
7905c4f1
CF
1529 * uinfo.cc: Move etc:: functions to path.cc. Move pwdgrp functions
1530 here.
1531 (pwdgrp::gets): Eliminate buf checks. Just check eptr and set lptr.
1532 (pwdgrp::add_line): New function.
1533 (pwdgrp::load): Call generic add_line function which will call correct
1534 parser.
1535
4c6a3e50
CF
15362003-01-17 Christopher Faylor <cgf@redhat.com>
1537
1538 * cygheap.cc: Change most 'int's to 'unsigned's.
1539 (_cmalloc): Only check for size of malloced region when calculating
97d2bc79 1540 bucket. Add overhead when performing the sbrk. Previous change broke
4c6a3e50
CF
1541 _crealloc.
1542
e9152439
CF
15432003-01-17 Christopher Faylor <cgf@redhat.com>
1544
1545 * dcrt0.cc (initialize_env): Use colon for CYGWIN_DEBUG separator.
1546 * grp.cc: Change most statics to NO_COPY throughout.
1547 * passwd.cc: Ditto.
1548
15492003-01-17 Christopher Faylor <cgf@redhat.com>
1550
1551 * pwdgrp.h: Change some BOOLs to bools.
1552 (pwdgrp::pwdgrp): Remove unneeded constructor.
1553 * passwd.cc: Change BOOL to bool throughout.
1554
afa378e7
CV
15552003-01-17 Corinna Vinschen <corinna@vinschen.de>
1556
1557 * cygwin.din: Add strerror_r.
1558 * include/cygwin/version.h: Bump API minor number.
1559
1de6f431
CF
15602003-01-17 Christopher Faylor <cgf@redhat.com>
1561
1562 * uinfo.cc (etc::dir_changed): Don't print a warning if can't open
1563 /etc, unless debugging.
1564
d8cde3a3 15652003-01-17 Pierre Humblet <pierre.humblet@ieee.org>
14ea5029
CF
1566
1567 * grp.cc (read_etc_group): On NT, add a line for gid = -1. Change name
1568 "unknown" to "mkgroup".
1569 (internal_getgrgid): Do not return default in nontsec case.
1570 (internal_getgroups): Add argument srchsid and look for it in groups if
1571 not NULL.
1572 * passwd.cc (read_etc_passwd): On NT, add a line for uid = -1. Use
1573 same default uid for Win95 and NT. Call cygheap_user::ontherange to
1574 initialize HOME.
1575
14ea5029
CF
15762003-01-16 Christopher Faylor <cgf@redhat.com>
1577
1578 * cygheap.cc (init_cygheap::etc_changed): Move to uinfo.cc.
1579 * cygheap.h (init_cygheap::etc_changed_h): Remove.
1580 (init_cygheap::etc_changed): Ditto.
1581 * grp.cc (group_state): Remove. Use gr instead throughout.
1582 (gr): Define as class pwdgrp.
1583 (read_etc_group): Remove gr definition. Remove calls to
1584 set_last_modified and close. Pass add_grp to gr.load to load file.
1585 * passwd.cc (passwd_state): Remove. Use pr instead, throughout.
1586 (pr): Define as class pwdgrp.
1587 (read_etc_passwd): Remove pr definition. Remove calls to
1588 set_last_modified and close. Pass add_pwd_line to pr.load to load
1589 file.
1590 * pwdgrp.h (etc): New helper class for pwdgrp.
1591 (pwdgrp): Combine pwdgrp_check and pwdgrp_read into one class. Remove
1592 file_w32 and last_modified fields.
1593 (pwdgrp::set_last_modified): Remove.
1594 (pwdgrp::isinitializing): Remove FindFirstFile stuff. Move to
1595 etc::file_changed.
1596 (pwdgrp::load): Rename from 'open'. Call etc::init to initialize etc
1597 scanning. Close file handle after reading buffer into memory. Parse
1598 buffer by calling second argument.
1599 (pwdgrp::gets): Reorganize slightly to rely on eptr starting at
5304bcdf 1600 beginning of buffer.
14ea5029
CF
1601 (pwdgrp::close): Remove.
1602 * uinfo.cc (etc::dir_changed): New function.
1603 (etc::init): Ditto.
1604 (etc::file_changed): Ditto.
1605 (etc::set_last_modified): Ditto.
1606
41429bc9
CV
16072003-01-16 Jason Tishler <jason@tishler.net>
1608
1609 * mmap.cc (fixup_mmaps_after_fork): Add ERROR_NOACCESS to the list of
1610 ReadProcessMemory() error codes that trigger a retry with temporary
1611 PAGE_READONLY access. Note that this can occur on NT 4.0.
1612
18813254
CF
16132003-01-15 Christopher Faylor <cgf@redhat.com>
1614
1615 * path.cc (normalize_posix_path): Convert win32 path separators to
1616 slashes when full path is specified.
1617
77cb0c56
CF
16182003-01-15 Pierre Humblet <pierre.humblet@ieee.org>
1619
1620 * cmalloc.cc (_cmalloc): Fix memory leak.
1621
ce542f78
CV
16222003-01-15 Corinna Vinschen <corinna@vinschen.de>
1623
1624 * autoload.cc: Fix copyright date.
1625 * fhandler_dsp.cc: Ditto.
1626 * mmap.cc: Ditto.
1627 * net.cc: Ditto.
1628 * ntdll.h: Ditto.
1629 * signal.cc: Ditto.
1630 * syscalls.cc: Ditto.
1631 * uname.cc: Ditto.
1632 * wait.cc: Ditto.
1633
15996b6f
CV
16342003-01-14 Corinna Vinschen <corinna@vinschen.de>
1635
1636 * mmap.cc (fixup_mmaps_after_fork): Copy protection to child process.
1637 Change ambiguous debug output.
1638
857b65dd
CV
16392003-01-14 Corinna Vinschen <corinna@vinschen.de>
1640
1641 * mmap.cc (mmap_record::access): Change argument type to caddr_t
1642 for strictness.
1643 (mprotect): Protect against calling VirtualProtect() for shared
1644 pages on 9x/Me.
1645 (fixup_mmaps_after_fork): If ReadProcessMemory() fails, try to
1646 change protection of parent page to PAGE_READONLY, then try again.
1647 Revert protection afterwards.
1648
e14328f4
TP
16492003-01-14 Thomas Pfaff <tpfaff@gmx.net>
1650
1651 * syscalls.cc (system): Add pthread_testcancel call.
1652 * thread.cc: Update list of cancellation points.
1653
4a3584c8
TP
16542003-01-14 Thomas Pfaff <tpfaff@gmx.net>
1655
1656 * wait.cc: Include thread.h
1657 (wait4): Add pthread_testcancel call.
1658 Wait for child process and cancellation event.
1659 * thread.cc: Update list of cancellation points.
1660
7ec66a2c
TP
16612003-01-14 Thomas Pfaff <tpfaff@gmx.net>
1662
1663 * signal.cc (sleep): Add pthread_testcancel call.
1664 Wait for signal and cancellation event.
1665 (usleep): Ditto.
1666
16672003-01-14 Thomas Pfaff <tpfaff@gmx.net>
3457ce4d
TP
1668
1669 * exceptions.cc (handle_sigsuspend): Add pthread_testcancel call.
1670 Wait for signal and cancellation event.
1671 * thread.cc: Update list of cancellation points.
1672
2673d5f2
CF
16732003-01-14 David Huang <davehzhr@hotmail.com>
1674
1675 * fhandler_dsp.cc (fhandler_dsp::ioctl): Add limited support for
1676 SNDCTL_DSP_GETFMTS.
1677
9f0d3f37
CF
16782003-01-12 Christopher Faylor <cgf@redhat.com>
1679
1680 * ntdll.h: Fix typo.
1681
7f129d87
CV
16822003-01-12 Corinna Vinschen <corinna@vinschen.de>
1683
1684 * uname.cc (uname): Use cygwin_gethostname() to retrieve hostname.
1685
ab2dbccc
CV
16862003-01-12 Pierre Humblet <pierre.humblet@ieee.org>
1687
1688 * sec_acl.cc (search_ace): Use id == -1, instead of < 0, as wildcard.
1689 (setacl): Start the search for a matching default at the next entry.
1690 Invalidate the type of merged entries instead of clearing it.
1691 Use well_known_creator for default owner and owning group and do
1692 not try to merge non-default and default entries in these cases.
1693 (getacl): Recognize well_known_creator for default owner and group.
1694 (acl_worker): Improve errno settings and streamline the nontsec case.
1695 * security.cc (write_sd): Remove the call to set_process_privilege.
1696 (alloc_sd): If the owner changes, call set_process_privilege and return
1697 immediately on failure. Change inheritance rules: on new directories add
1698 inherit only allow ACEs for creator_owner, creator_group and everyone.
1699 Preserve all inheritances through chmod and chown calls. Introduce
1700 isownergroup to implement the uid == gid case, to keep the inheritance
1701 code simple. Do not initialize owner_sid and group_sid and stop using
1702 the variable psd.
1703
68115c74
CF
17042003-01-10 Christopher Faylor <cgf@redhat.com>
1705
1706 * net.cc: Use gethostname define from winsock2.h.
1707
e3abf986
CF
17082003-01-10 Christopher Faylor <cgf@redhat.com>
1709
1710 * path.cc: Unrevert below reversion except for
1711 mount_info::conv_to_posix_path part.
1712
df2caa88
CV
17132003-01-10 Corinna Vinschen <corinna@vinschen.de>
1714
1715 * path.cc: Revert patch from 2003-01-09 to normalize a windows path
1716 rather than converting to posix.
1717
dc8d11f5
CV
17182003-01-10 Corinna Vinschen <corinna@vinschen.de>
1719
1720 * autoload.cc (gethostname): Make call optional, return 1 if function
1721 can't get loaded.
1722 * net.cc (cygwin_gethostname): Call GetComputerName if return value
1723 of gethostname is non-zero.
1724
70d61f30
CV
17252003-01-10 Charles Wilson <cwilson@ece.gatech.edu>
1726
8735f49f 1727 * cygwin.din: Add asprintf and vasprintf, as well as the reentrant
70d61f30 1728 versions and underscore variants.
8735f49f 1729 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
70d61f30 1730
a7711767
CV
17312003-01-10 Corinna Vinschen <corinna@vinschen.de>
1732
1733 * net.cc (cygwin_gethostname): Fix call to wsock function gethostname.
1734
d5223b2b
CF
17352003-01-09 Christopher Faylor <cgf@redhat.com>
1736
1737 * cygthread.cc (cygthread::cygthread): Be more noisy about odd
1738 condition.
1739 * miscfuncs.cc (low_priority_sleep): Sleep in regular priority if
1740 that's what we're currently running at.
1741
65f207e8
TP
17422003-01-09 Thomas Pfaff <tpfaff@gmx.net>
1743
1744 * include/semaphore.h: Modify typedef for sem_t.
1745 * include/cygwin/types.h: Modify typedefs for pthread_t,
1746 pthread_mutex_t, pthread_key_t, pthread_attr_t,
1747 pthread_mutexattr_t, pthread_condattr_t, pthread_cond_t,
1748 pthread_rwlock_t and pthread_rwlockattr_t.
1749
09cbb9d6
TP
17502003-01-09 Thomas Pfaff <tpfaff@gmx.net>
1751
1752 * thread.h (WAIT_CANCELED): New define.
1753 (pthread::cancelable_wait): New static method.
1754 * thread.cc (pthread::cancelable_wait): Implement.
1755 (semaphore::Wait): Wait on semaphore and thread cancellation.
1756 (pthread::join): Wait on joined thread and thread cancellation.
1757 (semaphore::wait): Add testcancel to check for thread
1758 cancellation even if the semaphore is available.
1759
5d68d1de
TP
17602003-01-09 Thomas Pfaff <tpfaff@gmx.net>
1761
1762 * include/pthread.h: Add define for errorchecking mutexes.
1763 Change default mutex type.
1764 * thread.cc (pthread_cond::TimedWait): Update mutex unlock
1765 calls.
1766 (pthread_mutex::pthread_mutex): New implement.
1767 (pthread_mutex::~pthread_mutex): Ditto.
1768 (pthread_mutex::Lock): Ditto.
1769 (pthread_mutex::TryLock): Ditto.
1770 (pthread_mutex::UnLock): Ditto.
1771 (pthread_mutex::Destroy): Implement new method.
1772 (pthread_mutex::SetOwner): Ditto.
1773 (pthread_mutex::LockRecursive): Ditto.
1774 (pthread_mutex::fixup_after_fork): Restore locking state after
1775 fork.
1776 (__pthread_mutex_lock): Return pthread_mutex::Lock errorcode.
1777 (__pthread_mutex_trylock): Return pthread_mutex::TryLock
1778 errorcode.
1779 (__pthread_mutex_unlock): Return pthread_mutex::UnLock
1780 errorcode.
1781 (__pthread_mutex_destroy): Call pthread_mutex::Destroy to
3457ce4d 1782 destroy mutex.
5d68d1de
TP
1783 (__pthread_mutexattr_settype): Allow errorchecking and recursive
1784 types.
1785 * thread.h (MUTEX_LOCK_COUNTER_INITIAL): New define.
1786 (pthread_mutex::criticalsection): Remove.
1787 (pthread_mutex::lock_counter): New member.
1788 (pthread_mutex::recursion_counter): Ditto.
1789 (pthread_mutex::owner): Ditto.
1790 (pthread_mutex::type): Ditto.
1791 (pthread_mutex::Destroy): New method.
1792 (pthread_mutex::SetOwner): Ditto.
1793 (pthread_mutex::LockRecursive): Ditto.
1794
ed9fe455
TP
17952003-01-09 Thomas Pfaff <tpfaff@gmx.net>
1796
1797 * pthread.cc (pthread_cond_init): Use new pthread_cond::init.
1798 * thread.cc: Some white spaces cleanups.
1799 Change __pthread_cond_init to pthread_cond::init throughout.
1800 (nativeMutex): Move class methods outside pthread_mutex.
1801 (MTinterface::Init): Initialize pthread_cond init lock.
1802 (pthread_cond::condInitializationLock): Instantiate.
1803 (pthread_cond::initMutex): New Method.
1804 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
1805 * thread.h: Some white spaces cleanups.
1806 (nativeMutex): Move class declaration outside pthread_mutex.
1807 (pthread_cond::condInitializationLock): New static member.
1808 (pthread_cond::initMutex): New Method.
1809 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
1810 (__pthread_cond_init): Remove prototype.
1811
93353aee
CV
18122003-01-09 Corinna Vinschen <corinna@vinschen.de>
1813
1814 * fhandler_disk_file.cc (num_entries): Return 2 as link count if
1815 directory unreadable.
1816
3eb27a4e
CV
18172003-01-09 Corinna Vinschen <corinna@vinschen.de>
1818
1819 * security.cc (get_nt_attribute): Always return -1 when read_sd()
1820 fails.
1821 (get_file_attribute): Set permissions to 0 and owner/group to -1
1822 if security descriptor is unreadable.
1823
85ba109d
CF
18242003-01-09 Christopher Faylor <cgf@redhat.com>
1825
1826 Use isdirsep rather than SLASH_P throughout.
1827 * path.cc (iscygdrive): Disallow /cygdrive\x.
1828 (normalize_posix_path): "Normalize" a windows path, if detected, rather
1829 than converting to posix.
1830
18312003-01-06 Troy Curtiss <troyc@usa.net>
1832
1833 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add support and
1834 capability checking for B230400 bitrate.
1835 (fhandler_serial::tcgetattr): Add support for B230400 bitrate.
1836 * include/sys/termios.h: Add B230400 definition for Posix support of
1837 230.4Kbps.
1838
cbdbe9d7
CF
18392003-01-05 Christopher Faylor <cgf@redhat.com>
1840
1841 * pinfo.cc (_pinfo::commune_send): Use myself->lock rather than just
1842 lock when leaving.
1843
f3afe99b
CF
18442003-01-03 Christopher Faylor <cgf@redhat.com>
1845
1846 * dtable.h (dtable::in_vfork_cleanup): New function. True if vfork
1847 cleanup needed.
1848 * dtable.cc (dtable::vfork_parent_restore): Remove assertion.
1849 * pipe.cc (fhandler_pipe::close): Don't close read_state during
1850 fork_fixup since it wasn't inherited.
1851
2665fb15
CF
18522003-01-01 Christopher Faylor <cgf@redhat.com>
1853
1854 * passwd.cc (getpwuid_r32): Revert previous change.
1855
8619b42b
CF
18562003-01-01 Christopher Faylor <cgf@redhat.com>
1857
1858 * sysconf.cc (sysconf): Return arbitrary values for
1859 _SC_GETGR_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_GETPW_R_SIZE_MAX.
1860
1861 * passwd.cc (getpwuid_r32): Add uid/gid fields to size check
1862 calculation.
1863
This page took 0.256108 seconds and 5 git commands to generate.