2004-05-17 Dick Porter <dick@ximian.com>
[mono.git] / mono / io-layer / ChangeLog
1 2004-05-17  Dick Porter  <dick@ximian.com>
2
3         * io.c (CopyFile): Speed up.  Fixes bug 57859.
4
5 2004-05-13  Dick Porter  <dick@ximian.com>
6         * mono-mutex.c (mono_mutex_unlock): Return EPERM when the current
7         thread doesn't own the mutex, rather than assert()ing.
8
9 2004-05-11  Dick Porter  <dick@ximian.com>
10
11         * shared.c (_wapi_shm_attach): Cope when a previous daemon startup
12         attempt failed, leaving shared files that look like a daemon is
13         still starting.
14
15 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16
17         * io.c:
18         (SetFileAttributes): don't the the exec bit if the corresponding read
19         bit is not set.
20
21 2004-05-10  Zoltan Varga  <vargaz@freemail.hu>
22
23         * io.c (FindFirstFile): Fix invalid free.
24
25 2004-05-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26
27         * io.c: translate from GFileError to errno codes and don't free
28         variables right after calling mono_io_scandir, as we may overwrite
29         errno value.
30
31 2004-05-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32
33         * io.c: g_dir_open return ENOENT for directories on which we don't have
34         read/execute permission, while returning EPERM for anything below those.
35         So, change ENOENT by EPERM if the directory exists.
36
37 2004-05-07  Dick Porter  <dick@ximian.com>
38
39         * io.c (SetFileAttributes): Don't have failed chmod()s cause a
40         "file not found" error.  Fixes bug 54032.
41         
42 2004-05-07  Dick Porter  <dick@ximian.com>
43
44         * io.c (FindFirstFile): Comment out a windows-compatibility check
45         that breaks when directories have metachars in their names.
46         Workaround for bug 58116.
47
48 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
49
50         * io.c: fixed for FindFirstFile for empty directories. Closes
51         bug #58147.
52
53 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
54
55         * processes.c: set the start time for the current process. Fixes bug
56         #58109.
57
58 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
59
60         * io-private.h: 'namelist' is now a gchar ** in _WapiHandlePrivate_find.
61         * io.c: implemented scandir using glib functions.
62
63 2004-05-04  Dick Porter  <dick@ximian.com>
64
65         * daemon.c (read_message): Return FALSE on error so the GSource
66         callback itself can return FALSE.  Cures the infinite loop poll()
67         warning on MacosX.
68         * shared.c: Fix some daemon startup race conditions.
69
70 2004-04-29  Miguel de Icaza  <miguel@ximian.com>
71
72         * io.c (CopyFile): Use 32k buffers to copy the file instead of 2k,
73         use the stack, do not use dynamic memory.
74
75 2004-04-29  Zoltan Varga  <vargaz@freemail.hu>
76
77         * io.c: Add scandir implementation for platforms which do not have
78         it, like solaris.
79
80 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
81
82         * io.[ch]: implemented GetLogicalDriveStrings.
83
84 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
85
86         * io.c:
87         * sockets.c: use the field name from configure when accessing sigval
88         pointer field. Makes this work on the Mac.
89
90 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
91
92         * atomic.c: (InterlockedExchange) fix typo for
93         mutex name
94
95 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
96
97         * io.c:
98         * sockets.c: added check for sys/aio.h.
99
100 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
101
102         * error.[ch]: added _wapi_get_win32_file_error...
103         * io.c: ... which was _wapi_get_win32_error here.
104         * sockets.c: rename the function calls here too.
105
106 2004-04-28  Dick Porter  <dick@ximian.com>
107
108         * daemon-messages.c: Avoid a deadlock when a thread is killed while
109         waiting for the daemon by using a recursive mutex.  Helps bug 56699.
110
111 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
112
113         * io.c: fixed leak in async_notifier().
114
115         * sockets.[ch]: added AIO support for sockets and fixed WSAIoctl
116         declaration.
117
118         * threads.c: removed old comment.
119
120 2004-04-26  David Waite  <mass@akuma.org>
121
122         * daemon-messages.h:
123         * daemon-private.h
124         * error.h:
125         * io.h:
126         * processes.h:
127         * shared.h:
128         * thread-private.h:
129         * wapi-private.h: remove comma from end of enumeration declarations
130         * status.h: cast unsigned int types to int for enum assignment
131
132 2004-04-26 David Waite <mass@akuma.org>
133
134         * io.c:
135         * timefuncs.c: declare 64-bit constants as long long types (i.e.
136         10ULL)
137
138 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
139
140         * socket-wrappers.h: _wapi_socket == WSASocket now. Added
141         WSA_FLAG_OVERLAPPED.
142
143         * sockets.c: new unused parameters for _wapi_socket.
144
145 2004-04-22  Miguel de Icaza  <miguel@ximian.com>
146
147         * timed-thread.c: Replace sem_init with MONO_SEM_INIT to handle
148         the fact that MacOS X is a piece of junk (sem_init is *defined* in
149         the libc, but they return `not implemented'). 
150
151 2004-04-22  Dick Porter  <dick@ximian.com>
152
153         * handles.c: 
154         * handles-private.h: Reference the handle when it is locked, so
155         that another thread can't blow it away while we're waiting for it
156         to become signalled.
157         
158         * wait.c: 
159         * timed-thread.c: 
160         * threads.c: 
161         * sockets.c: 
162         * semaphores.c: 
163         * mutexes.c: 
164         * mono-mutex.c: 
165         * io.c: 
166         * handles.c: 
167         * handles-private.h: 
168         * events.c: 
169         * error.c: 
170         * daemon-messages.c: 
171         * critical-sections.c: 
172         * atomic.c: Added pthreads cleanup handlers and error asserts
173
174         * shared.c: 
175         * handles.c: Fixed the gcc "variable might be used uninitialised"
176         warnings.  They can't happen, but gcc doesn't know that
177         g_assert()s don't return.
178
179         Fixed the declaration of _wapi_handle_process_kill() so that it
180         expects the correct type for the pid.
181         
182         * threads.c: Removed the TLS_PTHREAD_MUTEX style locking that
183         hasn't been used in ages and just made the code more complex.
184
185 2004-04-17  Zoltan Varga  <vargaz@freemail.hu>
186
187         * processes.c: Include <signal.h> for SIGKILL and SIGILL + fix some
188         warnings. Fixes #57168.
189
190 2004-04-16  Dick Porter  <dick@ximian.com>
191
192         * threads.c (Sleep): Using div(3) with a negative (when signed)
193         numerator causes the quotient to be 0 and the remainder to be the
194         numerator.  This feeds a small negative value to nanosleep(3),
195         which will return immediately and cause a busy wait.  Fixes bug
196         56351.
197
198 2004-04-15  Dick Porter  <dick@ximian.com>
199
200         * io-private.h:
201         * io.c: Rewrite FindFirstFile and FindNextFile using scandir(3)
202         and fnmatch(3) instead of glob(3).  glob() can't cope with being
203         given filenames containing metachars.  This fixes bug 40557.
204
205 2004-04-14  Bernie Solomon  <bernard@ugsolutions.com>
206
207         * security.c: #warning is a GCC-ism
208
209 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
210
211         * security.c: Removed GetUserName as glib g_get_user_name does a
212         better (portability) job. Added ImpersonateLoggedOnUser and
213         RevertToSelf.
214
215 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
216
217         * mono-mutex.h: move pthread_mutex_timedlock declaration to...
218         * mono-mutex.c: ...here. It was causing a warning that prevented
219         libgdiplus compilation.
220
221 2004-04-04  Miguel de Icaza  <miguel@ximian.com>
222
223         * security.c (GetUserName): Make it work on MacOS X
224
225 2004-04-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
226
227         * security.c: use getpwuid_r if available. This one is thread-safe.
228
229 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
230
231         * Makefile.am: Added security.c|h.
232         * security.c: New file for security related functions. Added function
233         GetUserName to fix #56144.
234         * security.h: New. Header file for security.c
235         * wapi.h: Added include for security.h
236
237 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
238
239         * daemon-messages.h: added kill structs.
240
241         * daemon.c: implemented process_process_kill.
242         * handles-private.h:  define process_process_kill.
243         * handles.c: implemented _wapi_handle_process_kill.
244         * processes.[ch]: implemented TerminateProcess.
245
246 2004-03-25  Bernie Solomon  <bernard@ugsolutions.com>
247
248         * daemon.c (rem_fd): On solaris you seem to get an
249         error even after removing the input source so don't
250         try and rem_fd it twice.
251
252 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
253
254         * daemon.c: in process_post_mortem, If the child terminated due to the 
255         receipt of a signal, the exit status must be based on WTERMSIG, since 
256         WEXITSTATUS returns 0 in this case.
257
258 2004-03-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
259
260         * daemon.c: turned a warning into a DEBUG statement. Now we may hit it.
261
262 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
263
264         * daemon.c: only call getdtablesize () once.
265         * processes.c: wait 500 ms to check if execve failed and throw the same
266         exception as MS on failure. Fixes bug #32809.
267
268 2004-03-17  Bernie Solomon  <bernard@ugsolutions.com>
269
270         * io.c (async_notifier): use "union sigval" rather
271         than sigval_t as Solaris doesn't have sigval_t
272         (which isn't in IEEE 1003.1 either).
273
274 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
275
276         * io.c: added debug stuff and removed a few redundant lines in
277         file_write.
278
279 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
280
281         * io-private.h: added new fields for file structure. Declare
282         _wapi_io_add_callback.
283
284         * io.c: added _wapi_get_win32_error, support aio_read/write in
285         file_read/write. Implemented _wapi_io_add_callback, which is where
286         BindHandle ends up.
287         
288         * io.h: added new fields for WapiOverlapped and typedef for the
289         callback.
290
291         * processes.c: fixed off-by-one bug when handling environment variables 
292         passed in.
293
294         * threads.[ch]: implemented BindIoCompletionCallback.
295
296         * uglify.h: added typedef for LPOVERLAPPED_COMPLETION_ROUTINE.
297
298 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
299
300         * socket-wrappers.h: Remove extra semicolon.
301
302 2004-03-03  Dave Camp  <dave@ximian.com>
303
304         * daemon.c: (add_fd), (fd_activity), (_wapi_daemon_main):
305         Use a new main context.
306
307 2004-03-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
308
309         * io.c:
310         (GetFileAttributes): set the error depending on errno instead of
311         setting ERROR_FILE_NOT_FOUND always. See bug #55160.
312
313 2004-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
314
315         * io.c:
316         (CopyFile): free the buffer on error.
317         * sockets.c:
318         (WSAIoctl): free the buffer on error.
319
320 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
321
322         * error.c: fixed mapping for EPROTONOSUPPORT and ESOCKTNOSUPPORT.
323
324         * sockets.[ch]: retry creating the socket for AF_INET, SOCK_RAW
325         using IP protocol with IP over IP. Implemented WSAIoctl UNIX-style.
326
327 2004-01-27  Bernie Solomon  <bernard@ugsolutions.com>
328
329         * shared.c (_wapi_shm_file): add hostname
330         to shared data file names to handle NFS mounted
331         .wapi directories.
332
333 Mon Jan 26 16:15:03 CET 2004 Paolo Molaro <lupus@ximian.com>
334
335         * sockets.h: remove obsolete soklen_t typedef.
336
337 Fri Jan 23 21:07:02 CET 2004 Paolo Molaro <lupus@ximian.com>
338
339         * socket-wrappers.h, sockets.h, sockets.c, Makefile.am: move socket
340         wrappers to its own non-installed header file.
341
342 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
343
344         * io.c:
345         (FindFirstFile): unlock the handle if FindNextFile fails.
346         (FindNextFile): g_free a couple of pointers before retrying.
347
348         * wait.c:
349         (WaitForMultipleObjects): if only one handle provided, use
350         WaitForSingleObject.
351
352 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
353
354         * handles-private.h: (_wapi_handle_type) check
355         for segment in range before using it
356
357 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
358
359         * thread-private.h: _wapi_thread_ops is now const
360         must match .c file.
361
362 Mon Dec 22 18:29:03 CET 2003 Paolo Molaro <lupus@ximian.com>
363
364         * threads.c, timed-thread.c, timed-thread.h: use mach
365         semaphores on Darwin (MacOSX) since the posix ones
366         are mostly broken there (threads are not created suspended
367         and they can start executing before they are fully initialized
368         like in tests/thread-static.cs).
369
370 Mon Dec 22 17:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
371
372         * atomic.h: ppc fixes.
373
374 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
375
376         * handles.c: remove my bad use of MONO_ZERO_ARRAY_LENGTH
377         in HDRSIZE 
378
379 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
380
381         * shared.c: (_wapi_shm_open) make scratch file
382         not have to immediately regrow to avoid remaps
383         (HPUX can't cope with these).
384         (_wapi_shm_attach) use actual size of file
385         to set scratch data_len for the creating process.
386
387         * handles.c: (_wapi_handle_new_internal) make
388         sure mutex & cond var are initialized even for
389         non process shared ones. 
390         (_wapi_handle_unref) always call destroy 
391         routines on mutex & cond var
392
393 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
394
395         * daemon.c: change channel data structure so
396         input sources are removed from glib event loop
397         properly. xsp works better on Solaris and 
398         fixes #51278
399
400 2003-12-12  Bernie Solomon  <bernard@ugsolutions.com>
401
402         * wapi-private.h: Replace G_GNUC_PRETTY_FUNCTION
403         definition with file & line number for non-GCC
404         compiles.
405
406 2003-12-08  Bernie Solomon  <bernard@ugsolutions.com>
407
408         * Makefile.am: make sure hppa_atomic.s is in distribution
409
410 2003-12-01  Dick Porter  <dick@ximian.com>
411
412         * wapi-private.h: 
413         * mutexes.c (CreateMutex): 
414         * mutex-private.h (struct _WapiHandle_mutex): 
415         * handles.c: Look up certain handle types by name, in a shared
416         namespace.  Currently only mutex handles have this implemented.
417         Fixes bug 51089.
418
419         * semaphores.c (CreateSemaphore): 
420         * events.c (CreateEvent): Fix signature
421
422 2003-11-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
423
424         * io.c: don't call g_free before testing errno as it may modify it.
425         If the path exists, return an error if it's not a directory. Fixes
426         bug #50753.
427
428 2003-11-20  Dick Porter  <dick@ximian.com>
429
430         * io.c: Missed a little-endian UTF16 conversion.  Patch from
431         Jeroen Zwartepoorte (Jeroen@xs4all.nl), fixes bug 51065.
432
433 2003-10-29  Dick Porter  <dick@ximian.com>
434
435         * io.c (MoveFile): If the move crosses filesystems, try and fall
436         back to copy and delete.  Patch from Jörg Rosenkranz
437         (JoergR@voelcker.com), fixes bug 50298.
438
439 2003-10-28  Dick Porter  <dick@ximian.com>
440
441         * io.c: Use the new encoding conversion to cope with non-utf8
442         locales in filenames.
443
444         * processes.c: Ditto for process arguments.
445
446 Tue Oct 21 12:01:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
447
448         * atomic.h: some ppc inline asm fixes (incorrect use of labels, 
449         incorrect register constraints, incorrect clobber lists).
450
451 2003-10-13  Bernie Solomon  <bernard@ugsolutions.com>
452
453         * Makefile.am hppa_atomic.s: add HP 64bit
454         implementation of atomic ops
455
456 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
457
458         * threads.c (CreateThread): Wrap pthread_attr_setstacksize call in
459         a conditional for platforms that don't have it.
460
461 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
462
463         * threads.c: (CreateThread) use stacksize argument
464         if non-zero - change default for 64 bits to 4Mb
465
466 2003-09-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
467
468         * sockets.c: set last error when socket creation fails. This shed some
469         light on bug #49015.
470
471 2003-09-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
472
473         * processes.c: fixed bug #48973: we only change \ by / for the argument
474         to be used as command.
475         When getting the program name from the args, don't let the space between
476         them in the args.
477
478 2003-09-24  Bernie Solomon <bernard@ugsolutions.com>
479
480         * atomic.h atomic.c: fix sparc so lock is
481         global, increment does so and it compiles under Sun compiler.
482
483 2003-09-22  Bernie Solomon <bernard@ugsolutions.com>
484
485         * handles.c: include <string.h> directly as may
486         not be nested in <sys/un.h> like Linux
487
488 2003-09-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
489
490         * io.c:
491         (DeleteFile): call SetLastError on failure. Fix by
492         richard.torkar@htu.se (Richard Torkar). Closes bug #48222.
493
494 2003-09-15  Lluis Sanchez Gual  <lluis@ximian.com>
495
496         * daemon.c: In compare_process(), discard handles already signalled.
497
498 2003-09-02  Dick Porter  <dick@ximian.com>
499
500         * io.c: Work around glib brain-dead assumptions about utf8-encoded
501         filenames.  Fixes bug 30781.
502
503 2003-08-28  Dick Porter  <dick@ximian.com>
504
505         * critical-sections.c:  Patch from Bernie Solomon
506         <bernard@ugsolutions.com> to emit a warning if locking a critical
507         section fails.
508
509 2003-07-23  Dick Porter  <dick@ximian.com>
510
511         * shared.c:
512         * daemon.c (maybe_exit): Avoid the race condition when the daemon is
513         closing but another client comes along when the shared data is still
514         visible.  Should fix bugs 33671 and 35213.
515
516 2003-07-23  Dick Porter  <dick@ximian.com>
517
518         * handles.c:  Initialise handle mutex and cond.  Fix by
519         Bernie Solomon <bernard@ugsolutions.com>
520
521 2003-07-15  Dick Porter  <dick@ximian.com>
522
523         * timed-thread.c (timed_thread_start_routine): Fix virtual memory
524         leak when threads quit.  Fixes bug 44067.
525
526 Wed Jun 18 19:08:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
527
528         * io.c: never add write permission for group or others in
529         SetFileAttributes ().
530
531 2003-06-17  Dick Porter  <dick@ximian.com>
532
533         * io.c (SetFileAttributes): Implement the ReadOnly attribute, and
534         ignore the unsupported ones ("fixes" bug 44977).
535
536 2003-06-17  Lluis Sanchez Gual  <lluis@ximian.com>
537
538         * misc.c: fix bug in _wapi_calc_timeout. It gave wrong values for
539           high ms values (there was an overflow).
540
541 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
542
543         * system.h (struct _WapiSystemInfo ): Fix warnings when using gcc-3.3.
544
545 2003-06-11  Dick Porter  <dick@ximian.com>
546
547         * shared.c: Fix shared directory creation.  Patch from
548         Pablo Baena <pbaena@uol.com.ar>
549
550 2003-06-10  Dick Porter  <dick@ximian.com>
551
552         * atomic.c: Delete the useless compile warning
553
554 2003-06-09  Dick Porter  <dick@ximian.com>
555
556         * daemon.c: Lookup env as a string array.  Fixes bug 44289.  Also
557         make setting the process handle value in the environment actually
558         work.
559
560         * processes.c: Pretty up the process name, if it happens to be
561         "mono" such as when another mono process forks "mono foo.exe"
562
563 2003-06-05  Dick Porter  <dick@ximian.com>
564
565         * processes.c (process_set_current): Don't do an expensive handle
566         search at application startup, check the environment to see if the
567         process handle has already been created.
568
569         * io.c: Don't do an expensive handle search when creating stdin,
570         stdout and stderr handles, just create them all the first time one
571         is requested.
572
573         * wapi-private.h:
574         * shared.c:
575         * shared.h:
576         * handles.c:
577         * handles-private.h:
578         * daemon-messages.h:
579         * daemon-private.h:
580         * daemon.c: Support for "unlimited" number of handles and scratch
581         data.
582
583         Speed up application startup by passing process handle in the
584         environment, rather than let the app scan all handles (which gets
585         really slow when there are more than a few thousand to check.)
586
587         Initialise some structs passed to syscalls, noticed by valgrind.
588         
589
590 2003-05-20  Dick Porter  <dick@ximian.com>
591
592         * io.c (FindFirstFile): Include . files in the glob.  Fixes bug
593         43229.
594
595 2003-05-19  Dick Porter  <dick@ximian.com>
596
597         * threads.c: Set the new thread's stack size to 2M.  Fix needed
598         for BSD, reported by Martin Dvorak <md@9ll.cz>
599
600 2003-05-16  Dick Porter  <dick@ximian.com>
601
602         * io.h:
603         * io.c: Implement GetTempPath()
604
605 2003-05-16  Dick Porter  <dick@ximian.com>
606
607         * processes.c (CreateProcess): Set some error codes
608
609 2003-05-12  Dick Porter  <dick@ximian.com>
610
611         * misc.c (_wapi_calc_timeout): Cope with overflowing tv_nsec.
612         Patch from Martin Dvorak <mdvorak@ninell.cz>.
613
614 2003-05-10  Dick Porter  <dick@ximian.com>
615
616         * io.c (CopyFile): Copy file mode as well as file data.  Based on
617         suggestion by Giuseppe Greco <giuseppe.greco@agamura.com>, bug
618         42706.
619
620 2003-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
621
622         * handles.c: don't call GC_gcollect when creating new handles.
623
624 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
625
626         * handles.c: added some debugging code. Call GC_gcollect
627         before creating a new handle. It makes Lupus' test run smoother and
628         faster (from 62 to 83 request per second). Notice that calling
629         GC_finalizer_notifier if needed (GC_should_invoke_finalizer ()) does
630         not improve nor degrade the performance, so i don't do it.
631
632 2003-05-02  Dick Porter  <dick@ximian.com>
633
634         * sockets.c: Rearrange closesocket() and socket_close_private(),
635         and remember to unref the handle, so we don't leak socket handles.
636         Fix from Pelle Johnsen <pelle.johnsen@mail.dk>
637
638 2003-04-11  Dick Porter  <dick@ximian.com>
639
640         * atomic.h: ARM atomic operations by Malte Hildingson
641         <tds00mahi@tellus.thn.htu.se>
642
643 Tue Apr 8 11:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
644
645         * atomic.h: fix macosx build by "Urs C. Muff" <umuff@quark.com>.
646
647 2003-04-03  Martin Baulig  <martin@ximian.com>
648
649         The following change is conditional to `WITH_INCLUDED_LIBGC'
650         which is not yet enabled by default.
651
652         * threads.c (SuspendThread, ResumeThread): Fully implemented this.
653         (gc_init): New static function; install a signal handler for
654         SIGPWR which is used to suspend threads.  [FIXME: it SIGPWR
655         doesn't exist on all Unix systems, we need to find another
656         signal].
657         (mono_wapi_push_thread_stack): New public function.  Tells the
658         garbage collector about the current stack pointer of a suspended
659         thread.
660
661 2003-04-03  Martin Baulig  <martin@ximian.com>
662
663         * timed-thread.h (TimedThread): Added `suspended_sem',
664         `suspend_count' and `stack_ptr'.
665
666 2003-03-28  Dick Porter  <dick@ximian.com>
667
668         * atomic.h: PPC support gratiously donated to the public domain
669         by John Duncan <jddst19@mac.com>
670
671 2003-03-20  Dick Porter  <dick@ximian.com>
672
673         * sockets.c (_wapi_connect): If connect() fails with EACCES, try
674         setting SO_BROADCAST and connecting again.  Fixes bug 39178.
675
676 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
677
678         * processes.c: included Jerome Laban's patch and call SetLastError when
679         the executable is not found.
680
681 2003-03-03  Dick Porter  <dick@ximian.com>
682
683         * io.c (CreateFile): Try opening directories readonly, so that
684         timestamps can be adjusted.  Patch by Elan Feingold
685         <efeingold@mn.rr.com>.
686
687 2003-02-25  Dick Porter  <dick@ximian.com>
688
689         * shared.c (_wapi_shm_attach): Return a failure code on system
690         call errors, rather than exiting.
691
692 2003-02-21  Dick Porter  <dick@ximian.com>
693
694         * processes.c (GetCurrentProcessId): Use the current process
695         handle to return the process ID, as getpid() is unreliable
696         (linuxthreads gives each thread a different pid).  Fixes bug
697         37550.
698
699 2003-02-21  Dick Porter  <dick@ximian.com>
700
701         * io.c (FindNextFile): Skip over dangling symlinks.  Fixes bug
702         34076.
703
704 2003-02-11  Dick Porter  <dick@ximian.com>
705
706         * timefuncs.h: 
707         * timefuncs.c: Added GetTickCount()
708
709 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
710
711         * error.c: added WSA_EHOSTUNREACH mapping.
712
713 2003-01-26  Miguel de Icaza  <miguel@ximian.com>
714
715         * io.c (SetFileAttributes): This routine is not currently
716         implemented for the general case, but I added a special case to
717         set the executable bit on Linux.
718
719 Wed Jan 15 15:55:40 CET 2003 Paolo Molaro <lupus@ximian.com>
720
721         * sockets.h, daemon.c, io.c: compilation fixes on MacOSX.
722
723 2003-01-08  Dick Porter  <dick@ximian.com>
724
725         * sockets.c: Fixed setting blocking mode to true (fixes bug 36388)
726
727 2002-12-11  Juli Mallett  <jmallett@FreeBSD.org>
728
729         * daemon.c, handles-private.h, handles.c, wapi-private.h:
730         Check for an implementation which says it supports
731         _POSIX_THREAD_PROCESS_SHARED, rather than just one that
732         defines the symbol.  Defined but with a value of -1 still
733         means that it is unsupported.
734
735 2002-12-08  Martin Baulig  <martin@ximian.com>
736
737         * handles.c (_wapi_handle_new): Create new non-shared handles with
738         an initial refcount of 1, not 0.
739
740 2002-11-22  Dietmar Maurer  <dietmar@ximian.com>
741
742         * threads.c (TlsGetValue): removed unnecessary mutex
743
744 2002-11-20  Dick Porter  <dick@ximian.com>
745
746         * timed-thread.c (_wapi_timed_thread_attach): Attached threads
747         need to store their data structure too.
748
749         * threads.c: Make sure the threading data is initialised wherever
750         it is needed
751
752 2002-11-15  Dick Porter  <dick@ximian.com>
753
754         * timed-thread.c: Removed unneeded parameters in
755         _wapi_timed_thread_attach().
756
757         * threads.c: Renamed AttachThread() to make it not look like
758         external API.  Removed unneeded parameters.
759
760 2002-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
761
762         * error.[ch]: added errno_to_WSA (). It displays a warning and return
763         WSASYSCALLFAILURE if there is no error mapping for the given errno,
764
765         * sockets.c: use errno_to_WSA and fixed display of warning for h_errno.
766
767 2002-10-31  Dick Porter  <dick@ximian.com>
768
769         * io.h: 
770         * io.c: Define and use INVALID_FILE_ATTRIBUTES
771
772 2002-10-07  Dick Porter  <dick@ximian.com>
773
774         * timefuncs.c:
775         * daemon.c: Use a more accurate time source for process start and
776         end times.
777
778 2002-10-03  Dick Porter  <dick@ximian.com>
779
780         * daemon.c:
781         * handles.c:
782         * threads.c:  Fixes for freebsd.  Make sure that mutex and condition
783         creation and deletion happen in the process that owns them, when
784         POSIX shared thread objects aren't supported.  This breaks on
785         freebsd, as pthread_t is a pointer to data.
786
787 2002-10-02  Dick Porter  <dick@ximian.com>
788
789         * shared.c: Use mmap() instead of sysv shm for the shared data.
790
791         * wapi-private.h (_WAPI_HANDLE_VERSION): Reset back to 0, for the
792         new system
793
794         * daemon-private.h: 
795         * daemon.c: mmap()ed regions survive fork, so just pass the
796         pointer to _wapi_daemon_main instead of mapping it again.
797
798 2002-10-01  Dick Porter  <dick@ximian.com>
799
800         * timed-thread.c: Kludge for CREATE_SUSPENDED thread creation.
801         Unfortunately libgc uses the same thread suspend technique that I
802         want to, and the two don't mix: libgc will deadlock when it tries
803         to stop the world if a thread has already been suspended by
804         someone else.  Just do the simple suspended create rather than the
805         general purpose thread suspension for now.
806
807         * threads.c: Pass create flags to the timed_thread create call, to
808         implement suspended thread creation.  ResumeThread() partially
809         implemented, to cope with the case where a newly created but
810         suspended thread is launched.
811
812 2002-09-30  Dick Porter  <dick@ximian.com>
813
814         * sockets.c (ioctlsocket): Set non-blocking mode in a better way,
815         with fcntl.
816
817 2002-09-27  Dick Porter  <dick@ximian.com>
818
819         * semaphores.c: Only include semaphore.h if it's present. Patch
820         for BSD from jmmv@hispabsd.org (Julio Merino).
821
822 2002-09-27  Dick Porter  <dick@ximian.com>
823
824         * processes.c: Pass environment and working directory to the
825         daemon when forking.  Don't let argv[0] be duplicated when looking
826         for the program name.  Implement EnumProcessModules (simple
827         version for now, lsof-style later if needed), GetModuleBaseName,
828         {Get,Set}ProcessWorkingSetSize (just faked, because the vm hints
829         aren't available on Linux).
830
831         * process-private.h: Store the process name, and the working set
832         min and max
833
834         * handles.c:
835         * handles-private.h: New functions to store and retrieve an array
836         of strings in the scratch space
837
838         * daemon.c: Don't miss deleting some handles when a client exits
839         (we used to rely on the client doing the final cleanup, but
840         obviously if the client is no longer there the daemon has to do
841         it).
842
843         Process forking now sets the environment and the working
844         directory.
845
846         * io.c: Don't confuse fd 0 with an unassigned handle struct
847
848         * atomic.h: Add a google cache alternative to the msdn URL
849
850 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
851
852         * sockets.c:
853         (_wapi_recvfrom): added ECONNRESET to the switch.
854
855 2002-09-24  Mark Crichton  <crichton@gimp.org>
856
857         * atomic.h: Yea.  On linux, sparc isn't sparc, it's __sparc__.
858         Added to ifdef.
859
860 2002-09-19  Mark Crichton  <crichton@gimp.org>
861
862         * daemon.c, shared.c: Added NEED_LINK_UNLINK for systems that
863         dont have Linux's abstract filesystem for sockets.
864
865 2002-09-19  Mark Crichton  <crichton@gimp.org>
866
867         * atomic.h: Added SPARC atomic asm code.
868         * daemon.c, handles-private.h, handles.c, wapi-private.h:
869         undefined _POSIX_THREAD_PROCESS_SHARED.  This actually exists on
870         Solaris 9, however, the code paths don't seem to work.  More testing
871         on the shared case is *really* needed.
872
873 2002-09-03  Dick Porter  <dick@ximian.com>
874
875         * threads.h: 
876         * threads.c: Removed PosixKillThread(), because it's not in the
877         w32 api
878
879 2002-08-20  Dick Porter  <dick@ximian.com>
880
881         * handles.c (_wapi_handle_scratch_store): Made stored byte lengths
882         multiples of 4 bytes, to keep header structures aligned.  Needed
883         for sparc, at least. (Patch from crichton@gimp.org)
884
885         * handles.c: Removed 'disable_shm' variable (we've defaulted to
886         building with shm enabled for months now)
887
888 2002-08-19  Dick Porter  <dick@ximian.com>
889
890         * daemon.c: Rewrote the poll() loop to use GIOChannels instead,
891         for legacy NeXT-based systems.
892
893 2002-08-12  Dick Porter  <dick@ximian.com>
894
895         * atomic.h: Rename some parameters to avoid c++ keywords (Patch
896         from Joseph Wenninger <kde@jowenn.at>)
897
898 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
899
900         * threads.c: use fast spinlocks by default
901
902 2002-08-02  Dick Porter  <dick@ximian.com>
903
904         * io.c (GetStdHandle): Add a handle reference when returning a
905         duplicate console handle.  This fixes the unref_handle errors in
906         NUnit.
907
908 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
909
910         * threads.c (TLS_PTHREAD_MUTEX): define this because else some
911         tests does not work
912
913 2002-08-01  Dick Porter  <dick@ximian.com>
914
915         * threads.c: Use atomic spinlocks in TLS functions
916
917         * mono-spinlock.h:
918         * Makefile.am: Added mono-spinlock.h
919
920 2002-07-21  Jeffrey Stedfast  <fejj@ximian.com>
921
922         * daemon-messages.c: #include <sys/types.h> and <sys/sockets.h> -
923         these are needed for sendmsg() and also for struct msghdr (at
924         least on Solaris). Solaris still won't build because struct msghdr
925         doesn't have msg_flags, msg_control, or msg_controllen members.
926         (CMSG_SPACE): Define for systems that don't have it.
927         (CMSG_LEN): Same.
928
929 2002-07-20  Dick Porter  <dick@ximian.com>
930
931         * wapi-private.h:
932         * io-private.h:
933         * io.h:
934         * io.c:
935         * handles.c: Implemented pipe handles
936         
937         * handles.c:
938         * daemon.c: Fixed bug in handle closing.
939
940         * shared.c:
941         * daemon.c: Forked processes now close all open file descriptors.
942
943 Fri Jul 19 19:05:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
944
945         * sockets.h, io-layer.h, critical-sections.h: don't include config.h
946         in header files.
947
948 2002-07-19  Martin Baulig  <martin@gnome.org>
949
950         * threads.c (ExitThread): Call exit() if no threads has been
951         created yet.
952
953 2002-07-17  Dick Porter  <dick@ximian.com>
954
955         * daemon-messages.c: Freebsd fixes from Andreas Kohn
956         <andreas.kohn@gmx.net>
957
958 2002-07-15  Dick Porter  <dick@ximian.com>
959
960         * io.c: Removed bogus console_flush() method, that was just cut
961         and pasted from file_flush when I separated the two handle types.
962
963 2002-07-12  Dick Porter  <dick@ximian.com>
964
965         * io.c (convert_from_flags): Fixed misunderstanding wrt fcntl
966         flags.  Fixes bug 27633.
967
968 2002-07-12  Dick Porter  <dick@ximian.com>
969
970         * wapi-private.h:
971         * handles.c:
972         * daemon.c: Use size of sockaddr_un.sun_path from config.h
973
974 2002-07-12  Dick Porter  <dick@ximian.com>
975
976         * processes.c (CreateProcess): Send stdin, stdout and stderr
977         handles if the startup info doesnt specify new ones
978
979         * io.c (GetStdHandle): Return the same handle when the same
980         standard handle is requested
981
982         * handles.c: Pass file descriptors when forking
983
984         * daemon.c: Use supplied file descriptors when forking a new
985         process
986
987         * daemon-messages.h: 
988         * daemon-messages.c: Pass stdin, stdout and stderr file
989         descriptors to the daemon (used when forking)
990
991 2002-07-11  Miguel de Icaza  <miguel@ximian.com>
992
993         * daemon.c (_wapi_daemon_main): Use sizeof
994         (main_socket_address.sun_path) instead of hardcoded 108 value.
995
996         * handles.c (shared_init): Use sizeof
997         (shared_socket_address.sun_path) instead of hardcoded 108 value.
998
999 2002-07-10  Dennis Haney  <davh@davh.dk>
1000
1001         * shared.c:
1002         * handles.c:
1003         * daemon.c: Lots of documentation, some added error checking, and
1004         code readability improvements.
1005
1006         * daemon-messages.h: Add the Error request type to improve error
1007         checking.
1008
1009         * daemon-messages.c: Do a bit more error checking on send() and
1010         recv(), and log errors with a higher severity level.
1011
1012 2002-07-04  Dick Porter  <dick@ximian.com>
1013
1014         * daemon.c (process_process_fork): Fix argument handling, due to
1015         buggy understanding of g_strsplit() behaviour.
1016
1017 2002-07-03  Dick Porter  <dick@ximian.com>
1018
1019         * threads.h:
1020         * threads.c: Implement OpenThread().  Define access-control values
1021         for thread handles.
1022
1023         * wapi.h:
1024         * processes.h:
1025         * access.h:
1026         * Makefile.am: Added access.h, to hold shared access-control
1027         definitions
1028
1029 2002-07-02  Dick Porter  <dick@ximian.com>
1030
1031         * wapi-private.h (_WAPI_HANDLE_VERSION): New protocol version
1032         
1033 2002-07-02  Dick Porter  <dick@ximian.com>
1034
1035         * handles.c (shared_init): Make a second attempt to contact the
1036         daemon if the shared memory attach succeeds, but the connect()
1037         fails. (This copes with the daemon crashing without cleaning up
1038         the shared memory.)
1039
1040         * Makefile.am: 
1041         * daemon-private.h:
1042         * daemon.c:
1043         * shared.c (_wapi_shm_attach): Don't exec() anything when we fork
1044         the daemon, it's now built into the library.
1045
1046 2002-06-25  Dick Porter  <dick@ximian.com>
1047
1048         * handles.c:
1049         * handles-private.h:
1050         * daemon-messages.h:
1051         * daemon.c: Process forking and handle data management
1052
1053         * processes.h:
1054         * process-private.h:
1055         * processes.c: Process forking and other support functions
1056
1057 2002-06-25  Dick Porter  <dick@ximian.com>
1058
1059         * versioninfo.h: PE resource decoding
1060
1061         * unicode.c (_wapi_unicode_to_utf8): g_utf16_to_utf8 doesnt need
1062         to be told the string length
1063
1064         * io.c: Removed the ACTUALLY_DO_UNICODE option.  Fixed some leaks.
1065         Moved _wapi_time_t_to_filetime and the WapiFileTime typedef to
1066         timefuncs.c
1067
1068 2002-06-12  Dick Porter  <dick@ximian.com>
1069
1070         * daemon.c: 
1071         * daemon-messages.c: Handle SIGPIPE in a non-stupid way in the
1072         daemon, if MSG_NOSIGNAL isn't available.  Thanks to Jaroslaw
1073         Kowalski <jarek@atm.com.pl> for pointing out the bogosity.
1074
1075 2002-06-10  Jaroslaw Kowalski <jarek@atm.com.pl>
1076
1077         * sockets.c, daemon-messages.c: Prevent SIGPIPE from being raised
1078         when writing to a closed socket.
1079
1080 2002-06-08  Jeffrey Stedfast  <fejj@ximian.com>
1081
1082         * mono-mutex.c (mono_once): New convenience function for my
1083         previous fix.
1084
1085         * handles.c:
1086         * error.c: 
1087         * critical-sections.c: 
1088         * threads.c: 
1089         * sockets.c: 
1090         * semaphores.c: 
1091         * processes.c: 
1092         * mutexes.c: 
1093         * io.c: 
1094         * events.c: 
1095         * atomic.c: Use mono_once() rather than pthread_once().
1096
1097 2002-06-06  Jeffrey Stedfast  <fejj@ximian.com>
1098
1099         * handles.c (_wapi_handle_new): pthread_once() is not atomic, so
1100         if multiple threads all try to call _wapi_handle_new() before the
1101         shared data has been initialized, it is possible that we could get
1102         into a condition where shared_init() is being executed and later
1103         threads will pass by pthread_once() due to the fact that it has
1104         already been called and so therefor will attempt to use the shared
1105         data before it has been completely initialized. If we instead use
1106         a standard mutex locking mechanism around shared_init(), we can
1107         avoid the situation entirely. By wrapping the mutex locking in a
1108         check to see if we've already initialized the data, we can even
1109         avoid wasting resources by having to lock/unlock the mutex in any
1110         later calls (the only time we'd have to worry about
1111         locking/unlocking is the initial race to call shared_init() at
1112         startup).
1113
1114 Sat Jun 1 13:27:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
1115
1116         * atomic.h: inline asm fixes from Dennis Haney (davh@davh.dk).
1117
1118 Fri May 31 16:21:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
1119
1120         * daemon.c, handles.c: rename "sun" local var since it's apparently
1121         a #define on Solaris.
1122
1123 Fri May 31 15:40:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
1124
1125         * daemon-messages.c: work-around MSG_NOSIGNAL missing on some
1126         platforms.
1127
1128 2002-05-15  Dick Porter  <dick@ximian.com>
1129
1130         * wait.c: Fix a deadlock in WaitForMultipleObjects
1131
1132 2002-05-14  Dick Porter  <dick@ximian.com>
1133
1134         * io.c: Fix a cut&paste error, found by
1135         Jaroslaw Kowalski <jarek@atm.com.pl>
1136
1137 2002-05-10  Dan Lewis  <dihlewis@yahoo.co.uk>
1138
1139         * io.c: Nasty typo.
1140
1141 2002-05-09  Dick Porter  <dick@ximian.com>
1142
1143         * threads.c: 
1144         * semaphores.c: 
1145         * processes.c: 
1146         * mutexes.c: 
1147         * handles-private.h: 
1148         * events.c: 
1149         * Makefile.am: Remove now-unused file wait-private.h
1150
1151 2002-05-08  Dick Porter  <dick@ximian.com>
1152
1153         * shared.c: Better error messages, and report when daemon
1154         connection fails rather than blocking forever.  Do some more
1155         shared memory sanity checking.
1156
1157         * handles.c: Better error messages when connecting to shared
1158         memory and the handle daemon.  Fall back to non-shared handles if
1159         an error occurs.  Set the default back to 'shared handles'.  Fix a
1160         crashing bug in scratch space allocation that mangled the block
1161         headers.
1162
1163 2002-05-07  Miguel de Icaza  <miguel@ximian.com>
1164
1165         * handles.c (shared_init): Disable SHM for now, people have too
1166         many problems with this, and the diagnostics are not helping.
1167
1168 2002-05-06  Dan Lewis  <dihlewis@yahoo.co.uk>
1169
1170         * io.c: CreateFile sets win32 last error.
1171
1172 2002-05-05  Dick Porter  <dick@ximian.com>
1173
1174         * wapi-private.h: 
1175         * handles-private.h:
1176         * io.c: 
1177         * io-private.h:
1178         * mutexes.c: 
1179         * mutex-private.h: 
1180         * processes.c: 
1181         * process-private.h: 
1182         * semaphores.c: 
1183         * semaphore-private.h: 
1184         * sockets.c: 
1185         * socket-private.h: 
1186         * events.c: 
1187         * event-private.h: Simplify the WapiHandleOps struct: take out all
1188         the file-specific entries, leaving just the items that operate on
1189         handles themselves.  Split the close operation into shared and
1190         private parts: shared close is called by the daemon.
1191
1192         * handles.c: As above, but also pass handle allocation, ref and
1193         unref operations to the daemon.  Populate the handle_ops array at
1194         compile time, because the daemon needs to call ops on handles too.
1195         Don't bother to track open handle counts any more, the daemon does
1196         that.
1197         
1198         * threads.c: 
1199         * thread-private.h: As above, but also make the thread data
1200         handle-private.
1201
1202         * shared.c: Fork a handle daemon if the calling process created
1203         the shared memory segment.
1204
1205         * daemon.c:
1206         * daemon-messages.c:
1207         * daemon-messages.h:
1208         * Makefile.am: Build a daemon to manage handle allocation and
1209         destruction without needing to lock the shared memory
1210
1211 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
1212
1213         * atomic.c: Changed to use a normal mutex rather than a spinlock
1214         since a lot of platforms seem to not have them :\
1215
1216 2002-04-30  Dick Porter  <dick@ximian.com>
1217
1218         * Completely rewrote the handle waiting code: removed the helper
1219         thread and its attendant complexity.  All handle waiting is now
1220         abstracted into the WaitForSingleObject() and
1221         WaitForMultipleObjects() functions.
1222
1223         * Implemented inter-process sharing of handles using sysv shared
1224         memory.  This makes handles even more opaque, with a handle now
1225         just an index into an array.
1226         
1227 2002-04-25  Dan Lewis  <dihlewis@yahoo.co.uk>
1228
1229         * io.c: unitialized pointer in GetCurrentDirectory.
1230
1231 Sat Apr 20 13:37:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
1232
1233         * threads.c: destroy the mutex at thread destruction
1234         (if/when thread destruction code will be actually called).
1235         When protecting a tls data pointer from the gc, use also the 
1236         thread id in the key.
1237         
1238 Wed Apr 17 18:36:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
1239
1240         * timed-thread.c: avoid race condition when setting the thread to
1241         detached.
1242
1243 2002-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1244
1245         * jit.h: to more #include lines to avoid breaking compilation
1246         under windows when upgrading mingw and w32api to version
1247         1.3 (thanks Dick!).
1248
1249 2002-04-16  Dick Porter  <dick@ximian.com>
1250
1251         * atomic.h: Explanatory comment about lack of 80386 support
1252
1253 2002-04-15  Dick Porter  <dick@ximian.com>
1254
1255         * atomic.h: use xaddl for InterlockedIncrement() and
1256         InterlockedDecrement().  Use cmpxchgl in a loop for
1257         InterlockedExchange() and InterlockedExchangePointer().
1258
1259 Mon Apr 15 13:31:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
1260
1261         * unicode.c: fix unicode_len() to not access uninitialized memory
1262         (and updated to conform to mono code style).
1263
1264 Fri Mar 29 17:15:11 CET 2002 Paolo Molaro <lupus@ximian.com>
1265
1266         * io.c: EEXISTS is ignored for directory creation.
1267         * mono-mutex.h: remove silly "pragma }" that emacs users insert
1268         because they use a broken editor:-)
1269
1270 2002-03-28  Dick Porter  <dick@ximian.com>
1271
1272         * sockets.h: 
1273         * sockets.c: 
1274         * io.c: 
1275         * handles.h: 
1276         * handles.c: Warning cleanups
1277
1278 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
1279
1280         * unicode.h, unicode.c: changed to gunichar2
1281         * io.h, io.c: changed strings to gunichar2*, added
1282         SetFileAttributes(), GetCurrentDirectory(), SetCurrentDirectory(),
1283         some fixes to FindFirstFile() and friends.
1284
1285 2002-03-26  Dick Porter  <dick@ximian.com>
1286
1287         * types.h: Implement the large integer struct
1288
1289         * timefuncs.h:
1290         * timefuncs.c: Dummy functions that don't yet implement
1291         QueryPerformanceCounter() and QueryPerformanceFrequency()
1292
1293         * threads.h:
1294         * threads.c: Implement SleepEx()
1295
1296         * system.h:
1297         * system.c: Beginnings of GetSystemInfo()
1298
1299         * mono-mutex.c (pthread_mutex_timedlock): Fix a ms/ns conversion
1300         thinko
1301
1302         * context.h:
1303         * context.c: Dummy function that doesnt yet implement
1304         GetThreadContext()
1305
1306         * atomic.h: 
1307         * atomic.c: Interlocked functions
1308
1309 Mon Mar 25 13:01:40 CET 2002 Paolo Molaro <lupus@ximian.com>
1310
1311         * threads.c: use a gc-safe hash table to store tls pointers.
1312
1313 2002-03-22  Dick Porter  <dick@ximian.com>
1314
1315         * threads.c: Fix a race condition where a thread can start and
1316         exit before the handle has been properly initialised (no reason
1317         why the handle couldn't be initialised beforehand, so do so)
1318
1319         Fix a ms to ns conversion magnitude thinko.
1320
1321 2002-03-21  Dick Porter  <dick@ximian.com>
1322
1323         * semaphores.c: Fix a problem when waiting for one or more
1324         semaphores, and another semaphore is Released (all waiting
1325         semaphores assumed they were signalled)
1326
1327 2002-03-29  Dan Lewis <dihlewis@yahoo.co.uk>
1328
1329         * io.h, io.c, uglify.h: added MoveFile, CopyFile, CreateDirectory,
1330         RemoveDirectory, GetFileAttributes, GetFileAttributesEx
1331
1332 2002-03-19  Dietmar Maurer  <dietmar@ximian.com>
1333
1334         * threads.c (Sleep): bug fix: 1ms == 1000000ns
1335
1336 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
1337
1338         * io.h, io.c, events.c, mutexes.c, semaphores.c, sockets.c,
1339         threads.c, io.c: added flush method to handles.
1340
1341         * io.c: FlushFileBuffers() and FindFirstFile() functions.
1342
1343 Thu Mar 7 17:21:52 CET 2002 Paolo Molaro <lupus@ximian.com>
1344
1345         * threads.c, timed-thread.c, wait.c: Boehm-GC anable.
1346
1347 2002-02-20  Dick Porter  <dick@ximian.com>
1348
1349         * io-layer.h: Always build without cygwin support on windows
1350
1351 Mon Feb 18 15:50:59 CET 2002 Paolo Molaro <lupus@ximian.com>
1352
1353         * sockets.c: #undef DEBUG.
1354
1355 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
1356
1357         * io-layer.h: conditionally include sys/filio.h and sys/sockio.h
1358         for FIONBIO, FIONREAD, and SIOCATMARK.
1359
1360 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
1361
1362         * sockets.c: conditionally include sys/filio.h and sys/sockio.h
1363         for FIONBIO, FIONREAD, and SIOCATMARK.
1364
1365 2002-02-13  Dick Porter  <dick@ximian.com>
1366
1367         * sockets.c: Implement shutdown and select
1368
1369 2002-02-13  Jeffrey Stedfast  <fejj@ximian.com>
1370
1371         * mono-mutex.[c,h]: New source files that thinly wrap all pthread
1372         functions that take pthread_mutex_t and/or pthread_mutexattr_t
1373         arguments for the sake of portability. Implements recursive
1374         mutexes and pthread_mutex_timedlock.
1375
1376         * critical-sections.c:
1377         * events.c:
1378         * handles.c:
1379         * mutexes.c:
1380         * semaphores.c:
1381         * threads.c:
1382         * timed-thread.c:
1383         * wait.c: Use the mono-mutex wrapper portability functions/macros.
1384
1385         * pthread-compat.[c,h]: Replaced by mono-mutex.[c,h]
1386
1387 2002-01-23  Dick Porter  <dick@ximian.com>
1388
1389         * sockets.c: Networking support, mostly wrapping BSD socket APIs
1390         with handle code, and translating errno into w32 error codes.
1391
1392         * macros.h: Some w32 macros used with the socket support
1393
1394         * error.c: Implemented GetLastError() and SetLastError()
1395
1396         * Makefile.am: Added sockets, with kludge to override some symbols
1397
1398 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
1399
1400         * unicode.c (_wapi_unicode_to_utf8): byteswap UTF16 strings before
1401         passing them to iconv
1402         (_wapi_unicode_to_utf8): only swap bytes on LE systems, remove bug
1403         from previous commit.
1404
1405 2001-12-11  Dick Porter  <dick@ximian.com>
1406
1407         * io.c: Implement DeleteFile(), GetFileTime(), SetFileTime() and
1408         FileTimeToSystemTime().
1409
1410         * unicode.c (unicode_len): Nasty way of finding length of unicode
1411         string with embedded NULLs (counts until two NULLs together).
1412
1413         * mutexes.c (mutex_close): 
1414         * events.c (event_close): Release the internal pthreads resources
1415
1416 2001-11-26  Dick Porter  <dick@ximian.com>
1417
1418         * critical-sections.c:
1419         * events.c:
1420         * handles.c:
1421         * io.c:
1422         * mutexes.c:
1423         * semaphores.c:
1424         * threads.c:
1425         * timed-thread.c:
1426         * wait.c: turn off DEBUG messages
1427
1428 2001-11-22  Dick Porter  <dick@ximian.com>
1429
1430         * handles.c (SignalObjectAndWait): Implement
1431
1432         * wait.c (WaitForSingleObject): Fix case where timeout == 0
1433
1434         * threads.c:
1435         * semaphores.c:
1436         * mutexes.c:
1437         * io.c:
1438         * events.c: Support for SignalObjectAndWait
1439         
1440 2001-11-21  Dick Porter  <dick@ximian.com>
1441
1442         * events.c:
1443         * handles.c:
1444         * mutexes.c:
1445         * semaphores.c:
1446         * threads.c:
1447         * wait.c: Reliable method of returning which handle was signalled
1448         on return from WaitForMultipleObjects().
1449
1450 2001-11-21  Dick Porter  <dick@ximian.com>
1451
1452         * events.c: Implement events
1453
1454 2001-11-15  Dick Porter  <dick@ximian.com>
1455
1456         * mutexes.c: Implement mutexes
1457
1458         * threads.c: 
1459         * semaphores.c: 
1460         * misc.c: Factor out some common code
1461
1462 2001-11-13  Dick Porter  <dick@ximian.com>
1463
1464         * threads.c: Implement TLS.  Implement GetCurrentThreadId(), and
1465         GetCurrentThread() by maintaining a hash of thread handles.
1466
1467         * threads.h: Define thread and process creation flags
1468
1469 2001-11-12  Dick Porter  <dick@ximian.com>
1470
1471         * critical-sections.c: Implement critical sections
1472
1473 2001-11-12  Dick Porter  <dick@ximian.com>
1474
1475         * semaphores.c: Implement semaphores
1476
1477         * wait.c (wait_for_item): Maintain a wait count rather than count
1478         signalled booleans.
1479
1480         * threads.c (thread_wait_multiple): Don't lock the wait item, that
1481         will block other wait threads
1482
1483 2001-11-11  Dick Porter  <dick@ximian.com>
1484
1485         * Makefile.am: Rename some automake variables
1486         (from Nick Drochak <ndrochak@gol.com>)
1487
1488 2001-11-10  Dick Porter  <dick@ximian.com>
1489
1490         * Makefile.am (libwapiincludedir): Fix include destination
1491
1492         * .cvsignore: Ignore generated files
1493
1494 2001-11-10  Dietmar Maurer  <dietmar@ximian.com>
1495
1496         * pthread-compat.c: added some include files to make it compile on
1497         linux.
1498
1499 2001-11-08  Dick Porter  <dick@ximian.com>
1500
1501         * Initial checkin.
1502
1503         This is a library emulating the win32 threading and IO API.