Commit Graph

15 Commits

Author SHA1 Message Date
Mike Kaganski
6b33a41fcc dbaccess: MSVC: pragma warning: make more specific, remove obsolete
Change-Id: I0066b2de769a412cb04bcec7cdd8401f42b9dcf3
Reviewed-on: https://gerrit.libreoffice.org/48972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-01 06:46:08 +01:00
Mike Kaganski
e3530d2c9d Make Windows error reporting more robust
https://msdn.microsoft.com/en-us/library/ms679351 describes that
"it is unsafe to take an arbitrary system error code returned from an API
and use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS"
Previously in case when an error string would contain inserts, function
returned error, so the error message wasn't shown (at least it didn't
crash, thanks to nullptr as the function's last argument).

As the function may fail, we now pre-nullify the buffer pointer to avoid
dereferencing uninitialized pointer later (though at least for some
Windows versions, the function nullifies the pointer in case of
FORMAT_MESSAGE_ALLOCATE_BUFFER, but there's no explicit guarantee of this).

Also release of allocated buffer is changed to recommended use of
HeapFree.

The code that doesn't make use of OUString is left directly calling
FormatMessage, to avoid introducing new dependencies. Where it makes
sense, we now use WindowsErrorString from <comphelper/windowserrorstring.hxx>

Change-Id: I834c08eb6d92987e7d3d01e2c36ec55e42aea848
Reviewed-on: https://gerrit.libreoffice.org/44206
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-11-04 15:24:32 +01:00
Mike Kaganski
eef4c133e9 Windows: avoid dependence on UNICODE define; prefer W functions
Change-Id: I95b90128e93f0d88ed73601bcc5a7ca9279d4cf1
Reviewed-on: https://gerrit.libreoffice.org/42560
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22 20:53:30 +02:00
Mike Kaganski
aaa26a58ba Some more WIN32_LEAN_AND_MEAN
Change-Id: Iadb0ebb66809c192fb817b8c7cf2f8cdb4d0b874
Reviewed-on: https://gerrit.libreoffice.org/42419
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-18 19:24:31 +02:00
Stephan Bergmann
8646ab97dc Remove MinGW support
In OOo times, there'd originally been efforts to allow building on Windows with
MinGW.  Later, in LO times, this has been shifted to an attempt of cross-
compiling for Windows on Linux.  That attempt can be considered abandoned, and
the relevant code rotting.

Due to this heritage, there are now three kinds of MinGW-specific code in LO:

* Code from the original OOo native Windows effort that is no longer relevant
  for the LO cross-compilation effort, but has never been removed properly.

* Code from the original OOo native Windows effort that is re-purposed for the
  LO cross-compilation effort.

* Code that has been added specifially for the LO cross-compilation effort.

All three kinds of code are removed.

(An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing
--with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.)

Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568
Reviewed-on: https://gerrit.libreoffice.org/34127
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-10 18:01:27 +00:00
Stephan Bergmann
8b7198f68f clang-cl loplugin: dbaccess
Change-Id: I96982e5298783384c2978056af7955d012289f25
Reviewed-on: https://gerrit.libreoffice.org/29872
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-16 14:19:22 +00:00
Stephan Bergmann
2cdc693c56 Remove __cplusplus-checks from apparently-C++-only files
Change-Id: I87e9ce45cf945e75e8140a9d4608da8abcddada6
Reviewed-on: https://gerrit.libreoffice.org/27187
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-13 14:54:14 +00:00
Fridrich Štrba
7c2c48953e mingw64: NULL used in arithmetic
Change-Id: I87bf28e1d6db2afe5ffa095cbf9181602ec9fc3f
2013-06-10 14:03:37 +02:00
Michael Meeks
577cf8ff67 re-base on ALv2 code. 2012-06-14 17:41:07 +01:00
Norbert Thiebaud
281b13ce89 remove include of pch header in dbaccess 2011-11-27 13:04:48 -06:00
Sebastian Spaeth
6450d1a7f5 Add vim/emacs modelines to all source files
Fixes #fdo30794
Based on bin/add-modelines script (originally posted in mail
1286706307.1871.1399280959@webmail.messagingengine.com)

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-10-13 10:57:12 +02:00
Jens-Heiner Rechtien
1708f6091b changefileheader2: #i109125#: change source file copyright notice from Sun Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision) 2010-02-12 15:01:35 +01:00
Rüdiger Timm
876ba88d6c INTEGRATION: CWS changefileheader (1.3.120); FILE MERGED
2008/03/31 13:28:14 rt 1.3.120.1: #i87441# Change license header to LPGL v3.
2008-04-10 16:00:21 +00:00
Kurt Zenker
35a0124c4a INTEGRATION: CWS mingwport06 (1.2.14); FILE MERGED
2007/08/27 12:42:15 vg 1.2.14.2: #i75499# pragma for MSVC
2007/08/24 14:02:26 vg 1.2.14.1: #i80359# MinGW port efforts
2007-09-06 12:26:44 +00:00
Rüdiger Timm
930708b426 INTEGRATION: CWS dba23b (1.1.2); FILE ADDED
2007/07/04 10:31:58 fs 1.1.2.1: Windows executable to call SQLManageDataSources, to workaround the Windows bug described in issue #i78733#
2007-07-24 11:11:10 +00:00