Commit in reactos/lib/msvcrt/wine on MAIN
cpp.c+2-31.2 -> 1.3
cppexcept.c+1-11.3 -> 1.4
heap.c+3-31.3 -> 1.4
thread.c+5-41.6 -> 1.7
config.h-11.3 removed
lock.c-1361.2 removed
mtdll.h-741.1 removed
process.h-1591.1 removed
+11-381
4 removed + 4 modified, total 8 files
Remove some of the unneeded internal headers in a further effort
to de-wineify my bad import of msvcrt last year.

reactos/lib/msvcrt/wine
cpp.c 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- cpp.c	19 Mar 2004 22:58:10 -0000	1.2
+++ cpp.c	11 Dec 2004 19:21:11 -0000	1.3
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include "config.h"
+#include "wine/config.h"
 #include "wine/port.h"
 
 #include <stdarg.h>
@@ -37,7 +37,7 @@
 
 #include "msvcrt.h"
 #include "cppexcept.h"
-#include "mtdll.h"
+#include <msvcrt/internal/mtdll.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
 
@@ -1023,7 +1023,6 @@
 {
     MSVCRT_thread_data *data = msvcrt_get_thread_data();
     if (data->terminate_handler) data->terminate_handler();
-//    MSVCRT_abort();
     abort();
 }
 

reactos/lib/msvcrt/wine
cppexcept.c 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- cppexcept.c	20 Aug 2004 15:19:38 -0000	1.3
+++ cppexcept.c	11 Dec 2004 19:21:11 -0000	1.4
@@ -23,7 +23,7 @@
  * www.thecodeproject.com.
  */
 
-#include "config.h"
+#include "wine/config.h"
 #include "wine/port.h"
 
 #include <stdarg.h>

reactos/lib/msvcrt/wine
heap.c 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- heap.c	11 Dec 2004 00:24:03 -0000	1.3
+++ heap.c	11 Dec 2004 19:21:11 -0000	1.4
@@ -21,12 +21,12 @@
  *       handler and non atomic heap operations
  */
 
-#include "msvcrt.h"
-#include "msvcrt/errno.h"
+#include "precomp.h"
 
+#include "msvcrt/errno.h"
 #include "msvcrt/malloc.h"
 #include "msvcrt/stdlib.h"
-#include "mtdll.h"
+#include <msvcrt/internal/mtdll.h>
 
 #include "wine/debug.h"
 

reactos/lib/msvcrt/wine
thread.c 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- thread.c	9 Dec 2004 06:10:06 -0000	1.6
+++ thread.c	11 Dec 2004 19:21:11 -0000	1.7
@@ -22,7 +22,7 @@
 #include "msvcrt.h"
 
 #include "msvcrt/malloc.h"
-#include "process.h"
+#include "msvcrt/process.h"
 
 #include "wine/debug.h"
 
@@ -32,6 +32,9 @@
 /* Index to TLS */
 DWORD MSVCRT_tls_index;
 
+typedef void (*_beginthread_start_routine_t)(void *);
+typedef unsigned int (__stdcall *_beginthreadex_start_routine_t)(void *);
+
 /********************************************************************/
 
 typedef struct {
@@ -73,8 +76,7 @@
      * away seems safer.
      */
     memcpy(&local_trampoline,arg,sizeof(local_trampoline));
-//    MSVCRT_free(arg); //ROS
-	free(arg); //ROS
+	free(arg);
 
     local_trampoline.start_address(local_trampoline.arglist);
     return 0;
@@ -96,7 +98,6 @@
    * starts... typically after this function has returned.
    * _beginthread_trampoline is responsible for freeing the trampoline
    */
-//  trampoline=MSVCRT_malloc(sizeof(*trampoline));
   trampoline=malloc(sizeof(*trampoline));
   trampoline->start_address = start_address;
   trampoline->arglist = arglist;

reactos/lib/msvcrt/wine
config.h removed after 1.3
diff -N config.h
--- config.h	4 Jan 2004 14:41:23 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1 +0,0 @@
-#include_next <wine/config.h>

reactos/lib/msvcrt/wine
lock.c removed after 1.2
diff -N lock.c
--- lock.c	9 Dec 2004 06:10:06 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 2002, TransGaming Technologies Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include "precomp.h"
-
-#define NDEBUG
-#include <msvcrt/msvcrtdbg.h>
-
-#include "mtdll.h"
-
-typedef struct
-{
-  BOOL             bInit;
-  CRITICAL_SECTION crit;
-} LOCKTABLEENTRY;
-
-static LOCKTABLEENTRY lock_table[ _TOTAL_LOCKS ];
-
-static inline void msvcrt_mlock_set_entry_initialized( int locknum, BOOL initialized )
-{
-  lock_table[ locknum ].bInit = initialized;
-}
-
-static inline void msvcrt_initialize_mlock( int locknum )
-{
-  InitializeCriticalSection( &(lock_table[ locknum ].crit) );
-  msvcrt_mlock_set_entry_initialized( locknum, TRUE );
-}
-
-static inline void msvcrt_uninitialize_mlock( int locknum )
-{
-  DeleteCriticalSection( &(lock_table[ locknum ].crit) );
-  msvcrt_mlock_set_entry_initialized( locknum, FALSE );
-}
-
-/**********************************************************************
- *     msvcrt_init_mt_locks (internal)
- *
- * Initialize the table lock. All other locks will be initialized
- * upon first use.
- *
- */
-void msvcrt_init_mt_locks(void)
-{
-  int i;
-
-  DPRINT( "initializing mtlocks\n" );
-
-  /* Initialize the table */
-  for( i=0; i < _TOTAL_LOCKS; i++ )
-  {
-    msvcrt_mlock_set_entry_initialized( i, FALSE );
-  }
-
-  /* Initialize our lock table lock */
-  msvcrt_initialize_mlock( _LOCKTAB_LOCK );
-}
-
-/**********************************************************************
- *     msvcrt_free_mt_locks (internal)
- *
- * Uninitialize all mt locks. Assume that neither _lock or _unlock will
- * be called once we're calling this routine (ie _LOCKTAB_LOCK can be deleted)
- *
- */
-void msvcrt_free_mt_locks(void)
-{
-  int i;
-
-  DPRINT(": uninitializing all mtlocks\n" );
-
-  /* Uninitialize the table */
-  for( i=0; i < _TOTAL_LOCKS; i++ )
-  {
-    if( lock_table[ i ].bInit == TRUE )
-    {
-      msvcrt_uninitialize_mlock( i );
-    }
-  }
-}
-
-
-/**********************************************************************
- *              _lock (MSVCRT.@)
- */
-void _lock( int locknum )
-{
-  DPRINT( "(%d)\n", locknum );
-
-  /* If the lock doesn't exist yet, create it */
-  if( lock_table[ locknum ].bInit == FALSE )
-  {
-    /* Lock while we're changing the lock table */
-    _lock( _LOCKTAB_LOCK );
-
-    /* Check again if we've got a bit of a race on lock creation */
-    if( lock_table[ locknum ].bInit == FALSE )
-    {
-      DPRINT( ": creating lock #%d\n", locknum );
-      msvcrt_initialize_mlock( locknum );
-    }
-
-    /* Unlock ourselves */
-    _unlock( _LOCKTAB_LOCK );
-  }
-
-  EnterCriticalSection( &(lock_table[ locknum ].crit) );
-}
-
-/**********************************************************************
- *              _unlock (MSVCRT.@)
- *
- * NOTE: There is no error detection to make sure the lock exists and is acquired.
- */
-void _unlock( int locknum )
-{
-  DPRINT( "(%d)\n", locknum );
-
-  LeaveCriticalSection( &(lock_table[ locknum ].crit) );
-}
-

reactos/lib/msvcrt/wine
mtdll.h removed after 1.1
diff -N mtdll.h
--- mtdll.h	24 Dec 2003 23:20:08 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2002, TransGaming Technologies Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef WINE_MTDLL_H
-#define WINE_MTDLL_H
-
-#if defined(_MT)
-
-#define _mlock(locknum)   _lock(locknum)
-#define _munlock(locknum) _unlock(locknum)
-
-void _unlock( int locknum );
-void _lock( int locknum );
-
-#else
-
-#define _mlock(locknum)   do {} while(0)
-#define _munlock(locknum) do {} while(0)
-
-#endif
-
-
-#define _SIGNAL_LOCK    1
-#define _IOB_SCAN_LOCK  2
-#define _TMPNAM_LOCK    3
-#define _INPUT_LOCK     4
-#define _OUTPUT_LOCK    5
-#define _CSCANF_LOCK    6
-#define _CPRINTF_LOCK   7
-#define _CONIO_LOCK     8
-#define _HEAP_LOCK      9
-#define _BHEAP_LOCK          10 /* No longer used? */
-#define _TIME_LOCK      11
-#define _ENV_LOCK       12
-#define _EXIT_LOCK1     13
-#define _EXIT_LOCK2          14
-#define _THREADDATA_LOCK     15 /* No longer used? */
-#define _POPEN_LOCK     16
-#define _LOCKTAB_LOCK   17
-#define _OSFHND_LOCK    18
-#define _SETLOCALE_LOCK 19
-#define _LC_COLLATE_LOCK     20 /* No longer used? */
-#define _LC_CTYPE_LOCK       21 /* No longer used? */
-#define _LC_MONETARY_LOCK    22 /* No longer used? */
-#define _LC_NUMERIC_LOCK     23 /* No longer used? */
-#define _LC_TIME_LOCK        24 /* No longer used? */
-#define _MB_CP_LOCK     25
-#define _NLG_LOCK       26
-#define _TYPEINFO_LOCK  27
-#define _STREAM_LOCKS   28
-
-/* Must match definition in msvcrt/stdio.h */
-#define _IOB_ENTRIES    20
-
-#define _LAST_STREAM_LOCK  (_STREAM_LOCKS+_IOB_ENTRIES-1)
-
-#define _TOTAL_LOCKS        (_LAST_STREAM_LOCK+1)
-
-#endif /* WINE_MTDLL_H */

reactos/lib/msvcrt/wine
process.h removed after 1.1
diff -N process.h
--- process.h	27 Feb 2004 22:39:38 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,159 +0,0 @@
-/*
- * Process definitions
- *
- * Derived from the mingw header written by Colin Peters.
- * Modified for Wine use by Jon Griffiths and Francois Gouget.
- * This file is in the public domain.
- */
-#ifndef __WINE_PROCESS_H
-#define __WINE_PROCESS_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
-
-#ifndef MSVCRT
-# ifdef USE_MSVCRT_PREFIX
-#  define MSVCRT(x)    MSVCRT_##x
-# else
-#  define MSVCRT(x)    x
-# endif
-#endif
-
-#ifndef MSVCRT_WCHAR_T_DEFINED
-#define MSVCRT_WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short MSVCRT(wchar_t);
-#endif
-#endif
-
-/* Process creation flags */
-#define _P_WAIT    0
-#define _P_NOWAIT  1
-#define _P_OVERLAY 2
-#define _P_NOWAITO 3
-#define _P_DETACH  4
-
-#define _WAIT_CHILD      0
-#define _WAIT_GRANDCHILD 1
-
-#ifndef __stdcall
-# ifdef __i386__
-#  ifdef __GNUC__
-#   define __stdcall __attribute__((__stdcall__))
-#  elif defined(_MSC_VER)
-    /* Nothing needs to be done. __stdcall already exists */
-#  else
-#   error You need to define __stdcall for your compiler
-#  endif
-# else  /* __i386__ */
-#  define __stdcall
-# endif  /* __i386__ */
-#endif /* __stdcall */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*_beginthread_start_routine_t)(void *);
-typedef unsigned int (__stdcall *_beginthreadex_start_routine_t)(void *);
-
-unsigned long _beginthread(_beginthread_start_routine_t,unsigned int,void*);
-unsigned long _beginthreadex(void*,unsigned int,_beginthreadex_start_routine_t,void*,unsigned int,unsigned int*);
-int         _cwait(int*,int,int);
-void        _endthread(void);
-void        _endthreadex(unsigned int);
-int         _execl(const char*,const char*,...);
-int         _execle(const char*,const char*,...);
-int         _execlp(const char*,const char*,...);
-int         _execlpe(const char*,const char*,...);
-int         _execv(const char*,char* const *);
-int         _execve(const char*,char* const *,const char* const *);
-int         _execvp(const char*,char* const *);
-int         _execvpe(const char*,char* const *,const char* const *);
-int         _getpid(void);
-int         _spawnl(int,const char*,const char*,...);
-int         _spawnle(int,const char*,const char*,...);
-int         _spawnlp(int,const char*,const char*,...);
-int         _spawnlpe(int,const char*,const char*,...);
-int         _spawnv(int,const char*,const char* const *);
-int         _spawnve(int,const char*,const char* const *,const char* const *);
-int         _spawnvp(int,const char*,const char* const *);
-int         _spawnvpe(int,const char*,const char* const *,const char* const *);
-
-void        MSVCRT(_c_exit)(void);
-void        MSVCRT(_cexit)(void);
-void        MSVCRT(_exit)(int);
-void        MSVCRT(abort)(void);
-void        MSVCRT(exit)(int);
-int         MSVCRT(system)(const char*);
-
-#ifndef MSVCRT_WPROCESS_DEFINED
-#define MSVCRT_WPROCESS_DEFINED
-int         _wexecl(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
-int         _wexecle(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
-int         _wexeclp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
-int         _wexeclpe(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
-int         _wexecv(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
-int         _wexecve(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
-int         _wexecvp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
-int         _wexecvpe(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
-int         _wspawnl(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
-int         _wspawnle(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
-int         _wspawnlp(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
-int         _wspawnlpe(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
-int         _wspawnv(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
-int         _wspawnve(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
-int         _wspawnvp(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
-int         _wspawnvpe(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
-int         _wsystem(const MSVCRT(wchar_t)*);
-#endif /* MSVCRT_WPROCESS_DEFINED */
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#ifndef USE_MSVCRT_PREFIX
-#define P_WAIT          _P_WAIT
-#define P_NOWAIT        _P_NOWAIT
-#define P_OVERLAY       _P_OVERLAY
-#define P_NOWAITO       _P_NOWAITO
-#define P_DETACH        _P_DETACH
-
-#define WAIT_CHILD      _WAIT_CHILD
-#define WAIT_GRANDCHILD _WAIT_GRANDCHILD
-
-static inline int cwait(int *status, int pid, int action) { return _cwait(status, pid, action); }
-static inline int getpid(void) { return _getpid(); }
-static inline int execv(const char* name, char* const* argv) { return _execv(name, argv); }
-static inline int execve(const char* name, char* const* argv, const char* const* envv) { return _execve(name, argv, envv); }
-static inline int execvp(const char* name, char* const* argv) { return _execvp(name, argv); }
-static inline int execvpe(const char* name, char* const* argv, const char* const* envv) { return _execvpe(name, argv, envv); }
-static inline int spawnv(int flags, const char* name, const char* const* argv) { return _spawnv(flags, name, argv); }
-static inline int spawnve(int flags, const char* name, const char* const* argv, const char* const* envv) { return _spawnve(flags, name, argv, envv); }
-static inline int spawnvp(int flags, const char* name, const char* const* argv) { return _spawnvp(flags, name, argv); }
-static inline int spawnvpe(int flags, const char* name, const char* const* argv, const char* const* envv) { return _spawnvpe(flags, name, argv, envv); }
-
-#ifdef __GNUC__
-extern int execl(const char*,const char*,...) __attribute__((alias("_execl")));
-extern int execle(const char*,const char*,...) __attribute__((alias("_execle")));
-extern int execlp(const char*,const char*,...) __attribute__((alias("_execlp")));
-extern int execlpe(const char*,const char*,...) __attribute__((alias("_execlpe")));
-extern int spawnl(int,const char*,const char*,...) __attribute__((alias("_spawnl")));
-extern int spawnle(int,const char*,const char*,...) __attribute__((alias("_spawnle")));
-extern int spawnlp(int,const char*,const char*,...) __attribute__((alias("_spawnlp")));
-extern int spawnlpe(int,const char*,const char*,...) __attribute__((alias("_spawnlpe")));
-#else
-#define execl    _execl
-#define execle   _execle
-#define execlp   _execlp
-#define execlpe  _execlpe
-#define spawnl   _spawnl
-#define spawnle  _spawnle
-#define spawnlp  _spawnlp
-#define spawnlpe _spawnlpe
-#endif  /* __GNUC__ */
-
-#endif /* USE_MSVCRT_PREFIX */
-
-#endif /* __WINE_PROCESS_H */
CVSspam 0.2.8