summaryrefslogtreecommitdiff
path: root/lib/win32
Commit message (Collapse)AuthorAge
* Fix getopt header confusion.Chris Wilson2013-09-30
| | | | | | | | Our copy of getopt.h in lib/win32 was beating the system getopt.h in the search path, and providing different definitions, which clang picked up. Renamed our getopt.h to bsd_getopt.h, and added a box_getopt.h to decide whether to include this one instead of the system getopt.h.
* Split Win32 defines out of emu.h to enable Boxi to include them beforeChris Wilson2011-10-09
| | | | | | wx/wx.h (to set UNICODE properly) without also #including winnt.h before UNICODE is set properly.
* Recent Cygwin versions of MinGW now define O_BINARY as well, also inChris Wilson2011-10-08
| | | | | | fcntl.h, so include it if we can find it, and only define O_BINARY if it turns out to be missing.
* Silence warnings from new MinGW headers that expect __MINGW_FEATURES__Chris Wilson2011-10-08
| | | | | | | | to be defined. Check for fcntl.h and include it if we have it, not just on MSVC, now that MinGW also defines O_BINARY in newer versions.
* Use "more standard" Windows API functions FindFirstFileW and FindNextFileWChris Wilson2011-08-28
| | | | | | | | | | for directory enumeration instead of _wfindfirst and _wfindnext. Ignore reparse points when enumerating directories to avoid infinite loops. Convert VSS paths back to real paths when notifying users about backup progress.
* Blind fix for displaying error message as well as code when emu unicode ↵Chris Wilson2011-05-24
| | | | conversion fails.
* Remove getpid() emulation now that it's included in the SDK, which causesChris Wilson2011-04-20
| | | | | a conflict.
* Support paths starting with \\?\, to fix support for backing up VSSChris Wilson2011-04-14
| | | | | snapshots.
* Add VSS: prefix to VSS log messages.Chris Wilson2011-04-06
| | | | | | | Start a snapshot set and add backup locations as volumes. Modularise IVssAsync waiting code.
* Make ConvertFromWideString available to other modules.Chris Wilson2011-03-28
|
* Fix another off-by-one error.Chris Wilson2011-03-27
|
* Add inline definition of ftruncate to fix MSVC compile.Chris Wilson2011-03-27
|
* Fix off-by-one causing incomplete normalisation of relative paths.Chris Wilson2011-03-27
|
* Fix off-by-one error in path translation.Chris Wilson2011-03-26
|
* Define WINVER and _WIN32_WINNT to Windows 2000 to avoid importing WSAPollChris Wilson2011-03-26
| | | | | | from winsock2.h, which conflicts with our definition of struct pollfd, on Windows Vista and above.
* Fix syslog of longer messages on Windows. (merges [2741] from 0.11)Chris Wilson2011-01-08
|
* Log the adjusted time, not the unadjusted one, as it's the adjusted timeChris Wilson2011-01-08
| | | | | that may cause an error if it's invalid. (merges [2743] from 0.11)
* This should fix Trac #14.Charles Lecklider2010-10-22
|
* Add handling of relative paths to emu.cpp's openfile(), needed to handleChris Wilson2009-08-02
| | | | | relative paths in test configuration on Windows.
* Provide a function to close a file handle on Windows, analogous toChris Wilson2009-04-26
| | | | | openfile().
* Fix missing LOG_* defines on Windows.Chris Wilson2009-04-02
|
* Fix tests (hopefully) on Win32 for struct stat ino_t change from 16 toChris Wilson2009-03-21
| | | | | 64 bits.
* Change ConvertTo/FromUtf8 to take a std::string instead of a const char Chris Wilson2008-12-30
| | | | | *, for convenience and C++ style.
* Only use replacement BSD getopt on Windows.Chris Wilson2008-12-08
|
* Fix the use of an unreasonably short type as the temporary storageChris Wilson2008-12-01
| | | | | | | | for inode numbers on Windows, resulting in all inode numbers being coerced into 2^16 space and many duplicates on systems with large numbers of files being backed up, possibly resulting in store corruption due to unwanted file rename operations.
* Fix support for O_APPEND on files opened with openfile() on Windows.Chris Wilson2008-11-30
|
* openfile() stores its Windows error code (from GetLastError() orChris Wilson2008-11-30
| | | | | synthetic) in winerrno, to enable better error handling outside.
* Cygwin/MinGW getopt no longer seems to have optreset, so now would beChris Wilson2008-11-30
| | | | | the time to start using that implementation we stole from BSD.
* FIx [2285] properly for Windows.Chris Wilson2008-09-14
|
* Compile fix for [2285].Chris Wilson2008-09-14
|
* Prefix event log application name with Box Backup, and remove it fromChris Wilson2008-09-14
| | | | | | | | | | all calls to SetProgramName, for better consistency on Unix. Make bbstoreaccounts and bbackupctl set their program names for logging. Don't override supplied tag with service name when BackupDaemon is run as a service.
* Map ERROR_SHARING_VIOLATION to EBUSY in openfile().Chris Wilson2008-08-09
|
* Add getpid() emulation.Chris Wilson2008-08-03
|
* Fix memory leak in [2133] (merges [1944])Chris Wilson2008-04-05
|
* Convert UTF-8 to Unicode for logging in Windows Event Log, so thatChris Wilson2008-04-05
| | | | | | international paths and filenames are displayed correctly. (merges [1942])
* Close process token in EnableBackupRights(), thanks Charles!Chris Wilson2008-04-05
| | | | | | | | | | | Improve error messages in EnableBackupRights() when failing to enable the backup privilege. Use file size returned by GetFileInformationByHandle in emu_fstat instead of calling GetFileSizeEx(), thanks Charles! Merges [1939].
* Fix compilation on MinGW. Not yet actually used on MinGW due to theChris Wilson2007-10-17
| | | | | | file extension, but it might be soon, if the default implementation doesn't do what I want. (merges [1848])
* No need to print syslog() messages any more, now that we have a loggingChris Wilson2007-09-07
| | | | | framework. (merges [1814])
* Make Configuration take a std::string filename instead of a char array,Chris Wilson2007-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in C++ style. Add a function to get default config file paths at runtime, dependent on the location of the executable being run. Pass the config file name directly to Daemon::Main, instead of faking argv. No default raid file path at compile time on Windows, depends on executable location when run. Determine RaidFile path at runtime if not supplied in config file on Windows. Don't define default locations for config files at compile time on Windows, provide macros to determine them at runtime instead. Make FileHandleGuard take a std::string instead of a char array, C++ style. Determine config file location at runtime instead of hard-coding on Windows. Thanks to Paul MacKenzie, Per Thomsen, Pete Jalajas, Stuart Sanders, Dave Bamford and Gary for pushing me to do this. (fixes #12) Determine config file path at runtime. Call Daemon::Main with config file name instead of building fake argv. (refs #3, merges [1684] [1685] [1686] [1687] [1688] [1689] [1690] [1691] [1692])
* Disable some warnings under MSVC to reduce build noise, thanks Gary!Chris Wilson2007-07-26
| | | | | (refs #3, merges [1676])
* Fix restoring to top-level directories (e.g. c:\test) (refs #3,Chris Wilson2007-07-26
| | | | | merges [1661])
* Add more debugging checks and messages for location setup errorChris Wilson2007-07-26
| | | | | | reported by Pete Jalajas (http://lists.warhead.org.uk/pipermail/boxbackup/2007-July/003668.html)
* Fix emulated chdir to work with relative paths and with bbackupquery'sChris Wilson2007-05-09
| | | | | | | | | "sh" command (which doesn't like UNC paths). Fix error messages by removing surplus newline kindly added by Windows. (refs #3, merges [1514] and [1569])
* Fix rare memory leak. (refs #3, merges part of [1514])Chris Wilson2007-04-28
|
* Added precompiled output from message compiler, for those who don'tChris Wilson2007-03-24
| | | | | have it, e.g. using MinGW instead of MSVC. (refs #3, merges [526])
* Initialise logging framework and set our program name to Box Backup (bbstored)Chris Wilson2007-03-24
| | | | | (refs #3, merges [1462])
* Add emulated rename() with path conversion. (refs #3, merges [1436] andChris Wilson2007-03-24
| | | | | [1438])
* Group remaining set*id() and get*id() functions. Improve comments aboutChris Wilson2007-03-10
| | | | | why they are being retained. (refs #3, related to [634])
* Add new syslog level emulations (refs #3, merges remainder of [1299])Chris Wilson2007-03-10
|
* Reorder for clarityChris Wilson2007-03-10
| | | | | | | | | Expose GetErrorMessage() Improve comments (refs #3, merges [1365])