- crt: Use ANSI C types
authorStefan Ginsberg <stefanginsberg@gmail.com>
Thu, 6 Aug 2009 11:03:08 +0000 (11:03 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Thu, 6 Aug 2009 11:03:08 +0000 (11:03 +0000)
- math.h: Move nonstandard inline using nonstandard function into nonstandard group
- crtdefs.h: Don't disable non-ANSI C definitions for MSVC only -- the behaviour should be the same for all compilers, so always disable them -- fixes various msvc build errors introduced by 42369.

svn path=/trunk/; revision=42418

reactos/include/crt/crtdefs.h
reactos/include/crt/math.h
reactos/lib/sdk/crt/process/process.c
reactos/lib/sdk/crt/stdio/fmode.c
reactos/lib/sdk/crt/stdlib/_exit.c
reactos/lib/sdk/crt/time/ctime.c

index 759b704..136aaab 100644 (file)
 #endif
 #endif
 
-/* Compatability definition */
-#if _MSC_VER > 0 && __STDC__
-#define NO_OLDNAMES
-#endif
+/* Disable non-ANSI C definitions if compiling with __STDC__ */
+//HACK: Disabled
+//#if __STDC__
+//#define NO_OLDNAMES
+//#endif
 
 /** Properties ***************************************************************/
 
index 9a67899..343dbb5 100644 (file)
@@ -225,6 +225,8 @@ extern "C" {
 #define HUGE   _HUGE
   /*   double __cdecl cabs(struct _complex _X); */
   double __cdecl hypot(double _X,double _Y);
+  __CRT_INLINE float __cdecl hypotf (float x, float y)
+  { return (float) hypot (x, y);}
   _CRTIMP double __cdecl j0(double _X);
   _CRTIMP double __cdecl j1(double _X);
   _CRTIMP double __cdecl jn(int _X,double _Y);
@@ -448,8 +450,6 @@ __CRT_INLINE int isinf (double d) {
   extern float __cdecl cbrtf (float);
   extern long double __cdecl cbrtl (long double);
 
-  __CRT_INLINE float __cdecl hypotf (float x, float y)
-  { return (float) hypot (x, y);}
   extern long double __cdecl hypotl (long double, long double);
 
   extern long double __cdecl powl (long double, long double);
index 3ae9642..2932bc6 100644 (file)
@@ -521,7 +521,7 @@ intptr_t _texecl(const _TCHAR* cmdname, const _TCHAR* arg0, ...)
 
    if (args)
    {
-      ret = do_spawnT(P_OVERLAY, cmdname, args, NULL);
+      ret = do_spawnT(_P_OVERLAY, cmdname, args, NULL);
       free(args);
    }
    return ret;
@@ -533,7 +533,7 @@ intptr_t _texecl(const _TCHAR* cmdname, const _TCHAR* arg0, ...)
 intptr_t _texecv(const _TCHAR* cmdname, const _TCHAR* const* argv)
 {
    TRACE(MK_STR(_texecv)"('%"sT"')\n", cmdname);
-   return _tspawnv(P_OVERLAY, cmdname, argv);
+   return _tspawnv(_P_OVERLAY, cmdname, argv);
 }
 
 /*
@@ -560,7 +560,7 @@ intptr_t _texecle(const _TCHAR* cmdname, const _TCHAR* arg0, ... /*, NULL, char*
    envs = argvtosT(ptr, 0);
    if (args)
    {
-      ret = do_spawnT(P_OVERLAY, cmdname, args, envs);
+      ret = do_spawnT(_P_OVERLAY, cmdname, args, envs);
       free(args);
    }
    if (envs)
@@ -576,7 +576,7 @@ intptr_t _texecle(const _TCHAR* cmdname, const _TCHAR* arg0, ... /*, NULL, char*
 intptr_t _texecve(const _TCHAR* cmdname, const _TCHAR* const* argv, const _TCHAR* const* envp)
 {
    TRACE(MK_STR(_texecve)"('%"sT"')\n", cmdname);
-   return _tspawnve(P_OVERLAY, cmdname, argv, envp);
+   return _tspawnve(_P_OVERLAY, cmdname, argv, envp);
 }
 
 /*
@@ -596,7 +596,7 @@ intptr_t _texeclp(const _TCHAR* cmdname, const _TCHAR* arg0, ...)
 
    if (args)
    {
-      ret = do_spawnT(P_OVERLAY, find_execT(cmdname, pathname), args, NULL);
+      ret = do_spawnT(_P_OVERLAY, find_execT(cmdname, pathname), args, NULL);
       free(args);
    }
    return ret;
@@ -608,7 +608,7 @@ intptr_t _texeclp(const _TCHAR* cmdname, const _TCHAR* arg0, ...)
 intptr_t _texecvp(const _TCHAR* cmdname, const _TCHAR* const* argv)
 {
    TRACE(MK_STR(_texecvp)"('%"sT"')\n", cmdname);
-   return _tspawnvp(P_OVERLAY, cmdname, argv);
+   return _tspawnvp(_P_OVERLAY, cmdname, argv);
 }
 
 /*
@@ -636,7 +636,7 @@ intptr_t _texeclpe(const _TCHAR* cmdname, const _TCHAR* arg0, ... /*, NULL, char
    envs = argvtosT(ptr, 0);
    if (args)
    {
-      ret = do_spawnT(P_OVERLAY, find_execT(cmdname, pathname), args, envs);
+      ret = do_spawnT(_P_OVERLAY, find_execT(cmdname, pathname), args, envs);
       free(args);
    }
    if (envs)
@@ -652,7 +652,7 @@ intptr_t _texeclpe(const _TCHAR* cmdname, const _TCHAR* arg0, ... /*, NULL, char
 intptr_t _texecvpe(const _TCHAR* cmdname, const _TCHAR* const* argv, const _TCHAR* const* envp)
 {
    TRACE(MK_STR(_texecvpe)"('%"sT"')\n", cmdname);
-   return _tspawnvpe(P_OVERLAY, cmdname, argv, envp);
+   return _tspawnvpe(_P_OVERLAY, cmdname, argv, envp);
 }
 
 
index 97d5fa4..0469904 100644 (file)
@@ -1,7 +1,7 @@
 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
 #include <precomp.h>
 
-int _fmode = O_TEXT;
+int _fmode = _O_TEXT;
 
 /*
  * @implemented
index a876fe2..c3be898 100644 (file)
@@ -19,7 +19,7 @@ void exit(int status)
     djgpp_first_dtor[i]();
 */
   /* in case the program set it this way */
-  _setmode(0, O_TEXT);
+  _setmode(0, _O_TEXT);
   _atexit_cleanup();
   _exit(status);
   for(;;);
index 49b89a5..8727233 100644 (file)
@@ -53,8 +53,8 @@
 #define fread_size_t    size_t
 #define fwrite_size_t   size_t
 
-#define ACCESS_MODE O_RDONLY|O_BINARY
-#define OPEN_MODE   O_RDONLY|O_BINARY
+#define ACCESS_MODE _O_RDONLY|_O_BINARY
+#define OPEN_MODE   _O_RDONLY|_O_BINARY
 
 /*
 ** Someone might make incorrect use of a time zone abbreviation: