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