Commit graph

45 commits

Author SHA1 Message Date
Alex Ionescu 583fb33611 [CMLIB]: Forgot part of last patch.
svn path=/trunk/; revision=57264
2012-09-10 15:32:43 +00:00
Aleksey Bragin da04e4981b [CMLIB]
- Remove unused HFILE_TYPE_ALTERNATE.
- Reapply changes from r56884: Hermes Belusca: Fix wrong definition of CMHIVE structure.
See issue #7162 for more details.

svn path=/trunk/; revision=56932
2012-07-21 23:27:30 +00:00
Aleksey Bragin d4efdeeb98 [CMLIB]
- Revert 56884, as Timo says 3 is a correct value for this structure.

svn path=/trunk/; revision=56893
2012-07-14 20:38:38 +00:00
Aleksey Bragin 926b354999 [CMLIB]
- Hermes Belusca: Fix wrong definition of CMHIVE structure (defined only 3 FileHandles when 4 is needed).
See issue #7162 for more details.

svn path=/trunk/; revision=56884
2012-07-14 10:57:16 +00:00
Alex Ionescu ef59218343 [CMLIB]: Great job -- crashing trunk on a pool tag just so people can be forced to know what it is. Change the registry pool tag from "th" (wtf?) to "CM25" which is a bit closer to Windows. In reality all of TAG_CM should be broken out in many more pieces. Fixes boot breakpoint.
svn path=/trunk/; revision=55880
2012-02-27 15:28:06 +00:00
Timo Kreuzer 61a48a890e [CMLIB]
Fix 64 bit / MSVC warnings

svn path=/trunk/; revision=55408
2012-02-04 12:23:27 +00:00
Amine Khaldi d8d265ce72 [LIBS]
* Introduce PCH to the remaining libs when possible, using their main headers.

svn path=/trunk/; revision=52986
2011-07-28 16:23:25 +00:00
Colin Finck 413867145e [UNICODE]
- Finally say goodbye to my "wcsfuncs" experiment started in 2008.
  We have (and always had) Wine's "unicode" library for this, which does the same and is more complete.
  Now that host tools only use include/host, we only need to include <wine/unicode.h> and it will choose the right file in either include/host or include/reactos.
- Fix some include guards in PSDK headers to match the MS ones.
- Always define WINE_UNICODE_API to an empty string instead of doing this separately for every module.
- Cleanup some empty directories or non-existing include pathes.

svn path=/trunk/; revision=52248
2011-06-15 18:20:05 +00:00
Timo Kreuzer 301a62db3a [HOST]
Only use /include/host as include directory for host tools / libs.

svn path=/trunk/; revision=52240
2011-06-15 10:30:03 +00:00
Eric Kohl 4f7643e5b3 [CMLIB/NEWINFLIB/MKHIVE]
- Make cmlib, newinflib and mkhive use the Wine unicode lib instead of the host_wcsfuncs lib.
- Only the header file include/host/wcsfuncs.h is still used to map str*W functions to wcs* functions in WIN32 builds.
- Remove obsolete rtl functions.
- Make mkhive use the newinflib instead of inflib.

ATTENTION: This might break the build bot although it has been tested on Windows and Linux!!!

svn path=/trunk/; revision=47076
2010-05-01 20:17:11 +00:00
Aleksey Bragin 71d61c9c59 [NTOSKRNL/CONFIG]
- Flusher lock fixes: wrong kind of lock,total mess (and the wrong kind of lock). Properly fixed throughout cmapi.c, but still missing in many other places.
- Add support for detecting loading of an already loaded hive.
- Start adding calls to CmpReportNotify to support registry callbacks.
- Do work needed to flush notifications for a deleted node (but CmpFlushNotify not yet implemented).
- Add support for adding each newly loaded hive to the HiveList key in the registry (but CmpAddHiveToFileList not yet implemented).
- Add some ViewLock acquire/releases where needed.
- Load the key in a faster way (Ob vs Zw)
- Add checks everywhere for HvMarkCellDirty success. In future (when log/backup file is enabled), it can return FALSE (e.g. when we are out of space).
- Change logic in CmpDoFlushAll to only flush a hive if it won't shrink (in the future, flushing may lead to hive shrinkage for efficiency).
- Add SEH2 protection to all CmApis that may deal with user-mode data.
- Add HvTrackCellRef/HvReleaseCellRef for tracking cell references in scenarios where we might need many GetCell/ReleaseCell calls. For now stubbed to only work with up to 4 static references.
- Properly unlock/free in some failure paths in some of the CM APIs.
- Add some missing HvReleaseCell in paths where it was missing.
- Try to fix hack in enumerate key.
- Fix wrong usage of KeQuerySystemTime. It was called twice to save it in 2 different places. Instead, there should be only one call, and then duplicate the value across.
- Fix logic in CmpSetValueExistingData/Key.

Tested with winetests and .NET framework 1.1 installation which fully completes.

svn path=/trunk/; revision=46702
2010-04-03 20:22:32 +00:00
Ged Murphy c5b25b8e9b - Move from using include guards to pragma once.
- Whilst this is non-standard and potentially makes the code less portable, it's supported by both gcc and msvc and should bringg increased compilation speed due to its optimized behaviour (doesn't need to invoke the preprocessor)
- Patch by Amine Khaldi [amine.khaldi@reactos.org]

svn path=/trunk/; revision=45685
2010-02-26 11:43:19 +00:00
Stefan Ginsberg ac7daf7ccf - winddk.h: Don't define NTSYSAPI and NTSYSCALLAPI -- this is defined in ntdef.h. Use NTSYSAPI for HalDispatchTable instead of DECLSPEC_IMPORT (see below).
- wdm.h: Properly define NTKERNELAPI.
- ntifs.h: Properly define NTKERNELAPI, and don't redefine NTSYSAPI.
- ntoskrnl: Apply the WDK hack for our headers (and gcc) too. Also redefine NTHALAPI for NDK so we don't auto-import KdComPortInUse -- ld complains about this.
- Apply this for cmlib, csq and rossym too.
- Use this in HAL too, and redefine NTSYSAPI so we don't auto import some structures from the kernel. Also, don't define __declspec(dllimport) to nothing -- this doesn't work with gcc, and doesn't seem to be necessary. I tried building HAL with the WDK and this wasn't an issue.

svn path=/trunk/; revision=42461
2009-08-07 10:45:59 +00:00
Stefan Ginsberg d749e95880 - Define UNREFERENCED_PARAMETER for cmlib when built as host and reapply 41455.
svn path=/trunk/; revision=41470
2009-06-19 16:05:16 +00:00
Stefan Ginsberg 6a4fcf71eb - PAGE_SIZE fix 2.0
svn path=/trunk/; revision=37359
2008-11-14 15:24:08 +00:00
Stefan Ginsberg 2fcfb97eec - Don't define PAGE_SIZE in typedefs.h as -- "this value is target specific, host tools MUST not use it and this line has to be removed". Instead, define it locally for cmlib.
- Also correct TRUE definition in this header

svn path=/trunk/; revision=37358
2008-11-14 14:49:11 +00:00
Stefan Ginsberg 9112574303 - Make cmlibhost compile warning free
- Slight reordering of cmlib.h (by Colin Finck)

svn path=/trunk/; revision=35709
2008-08-27 17:54:27 +00:00
Colin Finck 8d9b815544 Add a library "host_wcsfuncs" with implementations for UTF-16 string functions needed for some host tools
Instead of copying those functions into every host tool, which needs it (as we did previously), we can now implement them all in this library and link the host tools to it.
If USE_HOST_WCSFUNCS is not defined, the "wcsfuncs.h" file will define them to the CRT functions (so this library does not create overhead, when the code is built for the target platform)

See issue #3285 for more details.

svn path=/trunk/; revision=34050
2008-06-22 20:58:56 +00:00
Aleksey Bragin 61fab841f2 - Add debugging macros support to CmLib (to use, set the CmlibTraceLevel debugging mask in cminit.c).
- Add tracing to hivecell.c.

svn path=/trunk/; revision=31213
2007-12-14 13:02:39 +00:00
Aleksey Bragin b308496ffa - Include config/cm.h for cm based code, and remove all duplicated types and prototypes.
- Get rid of EREGISTRY_HIVE, and use CMHIVE instead. Although the current ReactOS code doesn't make use of any of the functionality it offers, it's compatible with EREGISTRY_HIVE (our version was a subset) and allows us to get rid of another ros-specifc type, as well as being able to merge code from the cm-branch much more easily.
- Merge cmwraprs.c from the cm-branch, since the only differences were the filehandle fields in EREGISTRY_HIVE vs CMHIVE.
- Enable the #if'ed out code in cminit.c since it now applies to CMHIVE.

svn path=/trunk/; revision=29944
2007-10-28 22:38:20 +00:00
Aleksey Bragin 6b7c404e0b - Move registry shareable types (not internal to ntoskrnl's configuration manager) to cmdata.h, so that freeldr/mkhive can access them too.
- Remove all the ReactOS-specific versions of those types.
- Change all code referencing the ReactOS-specific versions to use the real NT versions, and fix any related code to properly use the new fields.

svn path=/trunk/; revision=29943
2007-10-28 21:31:46 +00:00
Aleksey Bragin 6dad5e16a9 - Update cmlib interface to NT 5.2.
- Fix a bug in CmpInitializeHive which was calling HvInitializeHive with inverted params.
- Fix some host header issues.

svn path=/trunk/; revision=29879
2007-10-25 15:53:51 +00:00
Daniel Reimer ae7da04787 Delete all Trailing spaces in code.
svn path=/trunk/; revision=29690
2007-10-19 23:21:45 +00:00
Mike Nordell 68b61fb415 Unbreak build. The code is used from user-mode too, so CONST can not be used. Use plain 'const' instead.
svn path=/trunk/; revision=29623
2007-10-16 06:55:06 +00:00
Mike Nordell 51c353fab2 Attempt to make Cm API at least a little const-correct.
svn path=/trunk/; revision=29621
2007-10-16 05:39:47 +00:00
Colin Finck 0429c9f223 - Create a new "include/host" directory for host-only includes.
- Copy the "pshpack*.h", "poppack.h" and "typedefs_host.h" (renamed to "typedefs.h") files to this directory
- Modify the Makefiles of cmlib_host, inflib_host, mkhive, unicode, wmc and wrc to remove the "include/psdk" dependency
- Remove the inclusion of "ntstatus.h" in cmlib_host and mkhive

svn path=/trunk/; revision=29042
2007-09-14 18:55:43 +00:00
Hervé Poussineau 7cd48df5b6 Do not include <ntddk.h> when compiling cmlib_host. This file defines too much things.
svn path=/trunk/; revision=28599
2007-08-27 12:47:56 +00:00
Hervé Poussineau 513a12418d Rely only on host headers (+ target ntstatus.h) to build mkhive
svn path=/trunk/; revision=28596
2007-08-27 09:32:52 +00:00
Colin Finck 1fe9b53b9e Fix an "implicit declaration of wcslen" warning on Linux/Unix hosts
svn path=/trunk/; revision=28401
2007-08-18 15:47:33 +00:00
Colin Finck eca3c5411c Fix the mkhive bug on 64-bit systems, this time correct.
See issue #2272 for more details.

svn path=/trunk/; revision=28392
2007-08-18 10:27:23 +00:00
Colin Finck fa63b1102e Revert r28389 as it causes a build break, when you perform a full clean build
I'll commit a correct fix later

svn path=/trunk/; revision=28391
2007-08-17 23:08:12 +00:00
Colin Finck fe41b9be51 Fix the long-standing mkhive bug on 64-bit systems
This is now done by adding a "typedefs64.h" header file, which uses int's instead of long's for 32-bit values. As far as I know, this is the only way to avoid the problem that a long has a size of 64-bit on 64-bit systems.
This header file is now used in the host makefiles of cmlib, inflib and mkhive. It is also suitable for the other host tools, which need 32-bit values (will do some changes there in the next few days).

Unfortunately, Live-CDs still do not work because of another bug (see bug #2290).
But I compared the hives created by 32-bit Debian Linux and 64-bit Debian Linux and after these changes, they are exactly the same.
See issue #2272 for more details.

svn path=/trunk/; revision=28389
2007-08-17 22:17:13 +00:00
Alex Ionescu 779a784f15 - Fix critical bug in CmpCopyName, it wasn't compressing names at all.
- Implement new cmlib routines: HvIsCellAllocated, Doesn't really work fully since we don't support mapped-file hives, but works for the kinds of hives we currently use. HvIsCellDirty, should work as expected.
- Implement new cm routines: CmpMarkValueDataDirty, CmpFreeValueData, CmpFreeValue. There are generic so they can deal with Big, Small or Normal keys.
- Implement CmpAddValueToList, CmpSetValueDataNew.
- Add RtlCheckBit to winddk.h, it's inlined instead of being an actual function call.

svn path=/trunk/; revision=26757
2007-05-13 16:58:54 +00:00
Alex Ionescu ae80dd6422 - Fix various ntoskrnl/wdk compilation issues in rossym, cmlib, kdcom, rtl.
- Rename one more duplicated file in the kernel which wasn't caught previously.
- pseh, rossym, cmlib, kdcom, bootvid, rtl compile & link, and ntoskrnl is now down to only 23 linker errors.

svn path=/trunk/; revision=25956
2007-03-02 19:52:29 +00:00
Johannes Anderwald 9b71253be1 set most of trunk svn property eol-style:native
svn path=/trunk/; revision=24701
2006-11-08 11:47:44 +00:00
Alex Ionescu fb3a3c8a7f - Fix boot.
- Fix GUI boot (bootvid).
- Fix cmlib bug.

svn path=/trunk/; revision=24684
2006-11-05 20:28:59 +00:00
Alex Ionescu 9bfa61479f - Add PROFILE_ACPI_DOCKING_STATE.
- Fix HvInitialize definition to match more closely NT's since I need some of the extra parameters for the cm rewrite.
- Implement ExInitializePushLock and ExConvertPushLockSharedToExclusive macros.

svn path=/trunk/; revision=24426
2006-10-06 19:29:25 +00:00
Alex Ionescu 45d84c9668 - Guard some current cmlib includes against new cm branch
- Remove NTSYSAPI from NtBuildNumber definition in NDK.

svn path=/trunk/; revision=24416
2006-10-05 23:01:38 +00:00
Hervé Poussineau 022504ad3c Some 64 bits fixes (approved by Filip)
svn path=/trunk/; revision=23965
2006-09-07 19:13:37 +00:00
Alex Ionescu 361a28608d - Get rid of "ChunkSize" through a sickening hack (however this should make the Hv* interface compatible enough for me to resume work on the cm branch).
svn path=/trunk/; revision=23583
2006-08-14 21:09:41 +00:00
Alex Ionescu d634e929b4 - Make HHIVE part of EREGISTRY_HIVE, similarly to NT.
- Get rid of Opaque member and paramter..

svn path=/trunk/; revision=23578
2006-08-14 14:16:00 +00:00
Alex Ionescu 055aceee0e - Parameter changes to HvInitialize
svn path=/trunk/; revision=23577
2006-08-14 12:50:09 +00:00
Alex Ionescu a627f5639b - Start using some NT structures (need to get rid of "Opaque").
svn path=/trunk/; revision=23572
2006-08-14 11:35:48 +00:00
Alex Ionescu 86e31ea51a - Fix how DDK is included.
svn path=/trunk/; revision=23487
2006-08-05 16:50:23 +00:00
Aleksey Bragin 793b990edb Actually add cmlib itself
svn path=/trunk/; revision=23336
2006-07-28 20:50:05 +00:00