mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +00:00
Removed all forwarded exports to MSVCRT because a process must not load MSVCRT and CRTDLL at the same time.
svn path=/trunk/; revision=8396
This commit is contained in:
parent
cf035ffc03
commit
b35af5f50f
7 changed files with 88 additions and 112 deletions
|
@ -19,9 +19,9 @@
|
|||
; DISCLAMED. This includes but is not limited to warrenties of
|
||||
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
;
|
||||
; $Revision: 1.18 $
|
||||
; $Author: weiden $
|
||||
; $Date: 2003/08/26 12:28:53 $
|
||||
; $Revision: 1.19 $
|
||||
; $Author: ekohl $
|
||||
; $Date: 2004/02/26 12:23:29 $
|
||||
;
|
||||
; These three functions appear to be name mangled in some way, so GCC is
|
||||
; probably not going to be able to use them in any case.
|
||||
|
@ -69,7 +69,7 @@ __argv_dll
|
|||
__dllonexit
|
||||
__doserrno
|
||||
__fpecode
|
||||
__isascii=NTDLL.__isascii
|
||||
__isascii
|
||||
__iscsym=NTDLL.__iscsym
|
||||
__iscsymf=NTDLL.__iscsymf
|
||||
__mb_cur_max_dll
|
||||
|
@ -179,7 +179,7 @@ _hypot
|
|||
_initterm
|
||||
_iob
|
||||
_isatty
|
||||
_isctype=MSVCRT._isctype
|
||||
_isctype
|
||||
_ismbbalnum
|
||||
_ismbbalpha
|
||||
_ismbbgraph
|
||||
|
@ -326,19 +326,19 @@ _statusfp
|
|||
_strcmpi=NTDLL._strcmpi
|
||||
_strdate
|
||||
_strdec
|
||||
_strdup=MSVCRT._strdup
|
||||
_strerror=MSVCRT._strerror
|
||||
_strdup
|
||||
_strerror
|
||||
_stricmp=NTDLL._stricmp
|
||||
_stricoll=MSVCRT._stricoll
|
||||
_stricoll
|
||||
_strinc
|
||||
_strlwr=NTDLL._strlwr
|
||||
_strncnt
|
||||
_strnextc
|
||||
_strnicmp=NTDLL._strnicmp
|
||||
_strninc
|
||||
_strnset=MSVCRT._strnset
|
||||
_strrev=MSVCRT._strrev
|
||||
_strset=MSVCRT._strset
|
||||
_strnset
|
||||
_strrev
|
||||
_strset
|
||||
_strspnp
|
||||
_strtime
|
||||
_strupr=NTDLL._strupr
|
||||
|
@ -434,31 +434,31 @@ getchar
|
|||
getenv
|
||||
gets
|
||||
gmtime
|
||||
is_wctype=MSVCRT.is_wctype
|
||||
isalnum=NTDLL.isalnum
|
||||
is_wctype
|
||||
isalnum
|
||||
isalpha=NTDLL.isalpha
|
||||
iscntrl=NTDLL.iscntrl
|
||||
iscntrl
|
||||
isdigit=NTDLL.isdigit
|
||||
isgraph=NTDLL.isgraph
|
||||
isgraph
|
||||
isleadbyte
|
||||
islower=NTDLL.islower
|
||||
isprint=NTDLL.isprint
|
||||
ispunct=NTDLL.ispunct
|
||||
isprint
|
||||
ispunct
|
||||
isspace=NTDLL.isspace
|
||||
isupper=NTDLL.isupper
|
||||
iswalnum=MSVCRT.iswalnum
|
||||
isupper
|
||||
iswalnum
|
||||
iswalpha=NTDLL.iswalpha
|
||||
iswascii=MSVCRT.iswascii
|
||||
iswcntrl=MSVCRT.iswcntrl
|
||||
iswctype=MSVCRT.iswctype
|
||||
iswdigit=MSVCRT.iswdigit
|
||||
iswgraph=MSVCRT.iswgraph
|
||||
iswlower=MSVCRT.iswlower
|
||||
iswprint=MSVCRT.iswprint
|
||||
iswpunct=MSVCRT.iswpunct
|
||||
iswascii
|
||||
iswcntrl
|
||||
iswctype
|
||||
iswdigit
|
||||
iswgraph
|
||||
iswlower
|
||||
iswprint
|
||||
iswpunct
|
||||
iswspace=NTDLL.iswspace
|
||||
iswupper=MSVCRT.iswupper
|
||||
iswxdigit=MSVCRT.iswxdigit
|
||||
iswupper
|
||||
iswxdigit
|
||||
isxdigit=NTDLL.isxdigit
|
||||
labs
|
||||
ldexp
|
||||
|
@ -506,10 +506,10 @@ sscanf
|
|||
strcat
|
||||
strchr
|
||||
strcmp
|
||||
strcoll=MSVCRT.strcoll
|
||||
strcoll
|
||||
strcpy
|
||||
strcspn
|
||||
strerror=MSVCRT.strerror
|
||||
strerror
|
||||
strftime
|
||||
strlen
|
||||
strncat
|
||||
|
@ -523,7 +523,7 @@ strtod
|
|||
strtok
|
||||
strtol
|
||||
strtoul
|
||||
strxfrm=MSVCRT.strxfrm
|
||||
strxfrm
|
||||
swprintf
|
||||
swscanf
|
||||
system
|
||||
|
|
|
@ -10,39 +10,26 @@ unsigned short *_pwctype_dll = _ctype + 1;
|
|||
|
||||
/*
|
||||
* @implemented
|
||||
*
|
||||
* this function is now forwarded to MSVCRT._isctype to reduce code duplication
|
||||
*/
|
||||
#if 0
|
||||
int _isctype(unsigned int c, int ctypeFlags)
|
||||
{
|
||||
return (_pctype_dll[(unsigned char)(c & 0xFF)] & ctypeFlags);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*
|
||||
* this function is now forwarded to MSVCRT.iswctype to reduce code duplication
|
||||
*/
|
||||
#if 0
|
||||
int iswctype(wint_t wc, wctype_t wctypeFlags)
|
||||
{
|
||||
return (_pwctype_dll[(unsigned char)(wc & 0xFF)] & wctypeFlags);
|
||||
}
|
||||
#endif
|
||||
|
||||
// obsolete
|
||||
/*
|
||||
* @implemented
|
||||
*
|
||||
* this function is now forwarded to MSVCRT.is_wctype to reduce code duplication
|
||||
*/
|
||||
#if 0
|
||||
int is_wctype(wint_t wc, wctype_t wctypeFlags)
|
||||
int is_wctype(wint_t wc, wctype_t wctypeFlags)
|
||||
{
|
||||
return (_pwctype_dll[(unsigned char)(wc & 0xFF)] & wctypeFlags);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.62 2003/11/14 17:13:30 weiden Exp $
|
||||
# $Id: makefile,v 1.63 2004/02/26 12:23:29 ekohl Exp $
|
||||
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
|
@ -12,7 +12,7 @@ TARGET_NAME = crtdll
|
|||
|
||||
TARGET_BASE = 0x77630000
|
||||
|
||||
TARGET_LFLAGS = -nostartfiles
|
||||
TARGET_LFLAGS = -nostartfiles -nostdlib
|
||||
|
||||
TARGET_CFLAGS = -D_MSVCRT_LIB_ -Werror -Wall
|
||||
|
||||
|
@ -21,6 +21,8 @@ TARGET_CFLAGS += -D_DISABLE_TIDENTS
|
|||
|
||||
TARGET_SDKLIBS = string.a kernel32.a ntdll.a
|
||||
|
||||
TARGET_GCCLIBS = gcc
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CLEAN = \
|
||||
|
@ -68,21 +70,21 @@ CONIO_OBJECTS = \
|
|||
|
||||
CTYPE_OBJECTS = \
|
||||
$(PATH_TO_MSVCRT)/ctype/ctype.o \
|
||||
ctype/isctype.o
|
||||
$(PATH_TO_MSVCRT)/ctype/isalnum.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/isascii.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/iscntrl.o \
|
||||
ctype/isctype.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/isgraph.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/isprint.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/ispunct.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/isupper.o
|
||||
|
||||
# REMOVED CTYPE ENTRIES:
|
||||
# $(PATH_TO_MSVCRT)/ctype/isalnum.o \
|
||||
# $(PATH_TO_MSVCRT)/ctype/isalpha.o \
|
||||
# $(PATH_TO_MSVCRT)/ctype/isascii.o \
|
||||
# $(PATH_TO_MSVCRT)/ctype/iscntrl.o \
|
||||
# $(PATH_TO_MSVCRT)/ctype/iscsym.o \
|
||||
# $(PATH_TO_MSVCRT)/ctype/isdigit.o \
|
||||
# $(PATH_TO_MSVCRT)/ctype/isgraph.o \
|
||||
# $(PATH_TO_MSVCRT)/ctype/islower.o \
|
||||
# $(PATH_TO_MSVCRT)/ctype/isprint.o \
|
||||
# $(PATH_TO_MSVCRT)/ctype/ispunct.o \
|
||||
# $(PATH_TO_MSVCRT)/ctype/isspace.o \
|
||||
# $(PATH_TO_MSVCRT)/ctype/isupper.o \
|
||||
# $(PATH_TO_MSVCRT)/ctype/isxdigit.o \
|
||||
# $(PATH_TO_MSVCRT)/ctype/toascii.o \
|
||||
# $(PATH_TO_MSVCRT)/ctype/tolower.o \
|
||||
|
@ -397,26 +399,27 @@ STDLIB_OBJECTS = \
|
|||
$(PATH_TO_MSVCRT)/stdlib/strtol.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/strtoul.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/swab.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/wcstomb.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/wcstod.o \
|
||||
stdlib/wcstomb.o
|
||||
|
||||
STRING_OBJECTS = \
|
||||
string/lasttok.o \
|
||||
$(PATH_TO_MSVCRT)/string/strtok.o \
|
||||
string/str_old.o \
|
||||
$(PATH_TO_MSVCRT)/string/strcoll.o \
|
||||
$(PATH_TO_MSVCRT)/string/strdup.o \
|
||||
string/strerror.o \
|
||||
$(PATH_TO_MSVCRT)/string/strrev.o \
|
||||
$(PATH_TO_MSVCRT)/string/strset.o \
|
||||
$(PATH_TO_MSVCRT)/string/strtok.o \
|
||||
$(PATH_TO_MSVCRT)/string/strxfrm.o
|
||||
|
||||
# string/str_old.o \
|
||||
# $(PATH_TO_MSVCRT)/string/memicmp.o \
|
||||
# $(PATH_TO_MSVCRT)/string/strcoll.o \
|
||||
# $(PATH_TO_MSVCRT)/string/strdup.o \
|
||||
# $(PATH_TO_MSVCRT)/string/stricmp.o \
|
||||
# $(PATH_TO_MSVCRT)/string/strlwr.o \
|
||||
# $(PATH_TO_MSVCRT)/string/strnicmp.o \
|
||||
# $(PATH_TO_MSVCRT)/string/strpbrk.o \
|
||||
# $(PATH_TO_MSVCRT)/string/strrev.o \
|
||||
# $(PATH_TO_MSVCRT)/string/strset.o \
|
||||
# $(PATH_TO_MSVCRT)/string/strstr.o \
|
||||
# $(PATH_TO_MSVCRT)/string/strupr.o \
|
||||
# $(PATH_TO_MSVCRT)/string/strxfrm.o
|
||||
|
||||
SYS_STAT_OBJECTS = \
|
||||
sys_stat/fstat.o \
|
||||
|
@ -441,28 +444,28 @@ TIME_OBJECTS = \
|
|||
$(PATH_TO_MSVCRT)/time/strdate.o \
|
||||
$(PATH_TO_MSVCRT)/time/strftime.o \
|
||||
$(PATH_TO_MSVCRT)/time/strtime.o \
|
||||
time/tz_vars.o \
|
||||
time/tz_vars.o
|
||||
|
||||
WSTRING_OBJECTS = \
|
||||
wchar/wlasttok.o \
|
||||
wchar/wcscoll.o \
|
||||
$(PATH_TO_MSVCRT)/wstring/wcsdup.o \
|
||||
$(PATH_TO_MSVCRT)/wstring/wcsrev.o \
|
||||
$(PATH_TO_MSVCRT)/wstring/wcsset.o \
|
||||
$(PATH_TO_MSVCRT)/wstring/wcstok.o \
|
||||
wchar/wlasttok.o
|
||||
$(PATH_TO_MSVCRT)/wstring/wcsxfrm.o
|
||||
|
||||
# wchar/wcscoll.o \
|
||||
# wchar/wcstod.o \
|
||||
# wchar/wcstok.o \
|
||||
# wchar/wcstol.o \
|
||||
# wchar/wtoi.o \
|
||||
# $(PATH_TO_MSVCRT)/wstring/wcscspn.o \
|
||||
# $(PATH_TO_MSVCRT)/wstring/wcsdup.o \
|
||||
# $(PATH_TO_MSVCRT)/wstring/wcsicmp.o \
|
||||
# $(PATH_TO_MSVCRT)/wstring/wcslwr.o \
|
||||
# $(PATH_TO_MSVCRT)/wstring/wcspbrk.o \
|
||||
# $(PATH_TO_MSVCRT)/wstring/wcsrev.o \
|
||||
# $(PATH_TO_MSVCRT)/wstring/wcsset.o \
|
||||
# $(PATH_TO_MSVCRT)/wstring/wcsspn.o \
|
||||
# $(PATH_TO_MSVCRT)/wstring/wcsstr.o \
|
||||
# $(PATH_TO_MSVCRT)/wstring/wcsupr.o \
|
||||
# $(PATH_TO_MSVCRT)/wstring/wcsxfrm.o \
|
||||
# wchar/wcstombs.o \
|
||||
# $(PATH_TO_MSVCRT)/wstring/wcsnicmp.o
|
||||
|
||||
|
|
|
@ -39,10 +39,11 @@ char *** _environ_dll = &_environ;
|
|||
static int envAlloced = 0;
|
||||
|
||||
|
||||
int BlockEnvToEnviron()
|
||||
int BlockEnvToEnviron(void)
|
||||
{
|
||||
char * ptr;
|
||||
int i;
|
||||
char * ptr;
|
||||
int i;
|
||||
|
||||
if (!envAlloced)
|
||||
{
|
||||
envAlloced = 50;
|
||||
|
@ -96,7 +97,7 @@ int __GetMainArgs(int *argc,char ***argv,char ***env,int flag)
|
|||
{
|
||||
__argc++;
|
||||
_acmdln_dll[i]='\0';
|
||||
__argv[__argc-1] = strdup(_acmdln_dll + afterlastspace);
|
||||
__argv[__argc-1] = _strdup(_acmdln_dll + afterlastspace);
|
||||
_acmdln_dll[i]=' ';
|
||||
i++;
|
||||
while (_acmdln_dll[i]==' ')
|
||||
|
@ -113,7 +114,7 @@ int __GetMainArgs(int *argc,char ***argv,char ***env,int flag)
|
|||
{
|
||||
__argc++;
|
||||
_acmdln_dll[i]='\0';
|
||||
__argv[__argc-1] = strdup(_acmdln_dll+afterlastspace);
|
||||
__argv[__argc-1] = _strdup(_acmdln_dll+afterlastspace);
|
||||
}
|
||||
HeapValidate(GetProcessHeap(),0,NULL);
|
||||
|
||||
|
@ -125,7 +126,7 @@ int __GetMainArgs(int *argc,char ***argv,char ***env,int flag)
|
|||
*argv = __argv;
|
||||
*env = _environ;
|
||||
|
||||
_pgmptr_dll = strdup((char *)argv[0]);
|
||||
_pgmptr_dll = _strdup((char *)argv[0]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
int _aexit_rtn_dll(int exitcode)
|
||||
{
|
||||
_exit(exitcode);
|
||||
_exit(exitcode);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -24,7 +24,7 @@ int _aexit_rtn_dll(int exitcode)
|
|||
*/
|
||||
void _amsg_exit(int errnum)
|
||||
{
|
||||
fprintf(stderr,strerror(errnum));
|
||||
fprintf(stderr,strerror(errnum));
|
||||
_aexit_rtn_dll(-1);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
|
||||
#include <msvcrt/errno.h>
|
||||
#include <msvcrt/wchar.h>
|
||||
#include <msvcrt/internal/file.h>
|
||||
|
||||
#include "libc/file.h"
|
||||
|
||||
#ifndef EILSEQ
|
||||
#define EILSEQ EINVAL
|
||||
|
@ -79,22 +80,12 @@ __wcrtomb (char *s, wchar_t wc)
|
|||
char fake[1];
|
||||
size_t written = 0;
|
||||
|
||||
|
||||
|
||||
if (s == NULL)
|
||||
{
|
||||
s = fake;
|
||||
wc = L'\0';
|
||||
}
|
||||
|
||||
/* Store the UTF8 representation of WC. */
|
||||
if (wc < 0 || wc > 0x7fffffff)
|
||||
{
|
||||
/* This is no correct ISO 10646 character. */
|
||||
__set_errno (EILSEQ);
|
||||
return (size_t) -1;
|
||||
}
|
||||
|
||||
if (wc < 0x80)
|
||||
{
|
||||
/* It's a one byte sequence. */
|
||||
|
|
|
@ -63,9 +63,7 @@ int* _sys_nerr_dll = &__sys_nerr;
|
|||
/*
|
||||
* @implemented
|
||||
*
|
||||
* this function is now forwarded to MSVCRT.strerror to reduce code duplication
|
||||
*/
|
||||
#if 0
|
||||
char *strerror(int errnum)
|
||||
{
|
||||
static char ebuf[40]; /* 64-bit number + slop */
|
||||
|
@ -96,14 +94,11 @@ char *strerror(int errnum)
|
|||
|
||||
return ebuf;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*
|
||||
* this function is now forwarded to MSVCRT._strerror to reduce code duplication
|
||||
*/
|
||||
#if 0
|
||||
char *_strerror(const char *s)
|
||||
{
|
||||
if ( s == NULL )
|
||||
|
@ -111,4 +106,3 @@ char *_strerror(const char *s)
|
|||
|
||||
return strerror(atoi(s));
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue