Commit Graph

31 Commits

Author SHA1 Message Date
Brad Smith 322dab936f Build: fixes for OpenBSD
Pull Request: https://projects.blender.org/blender/blender/pulls/107666
2023-05-09 13:19:16 +02:00
Campbell Barton c434782e3a File headers: SPDX License migration
Use a shorter/simpler license convention, stops the header taking so
much space.

Follow the SPDX license specification: https://spdx.org/licenses

- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile

While most of the source tree has been included

- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
  use different header conventions.

doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.

See P2788 for the script that automated these edits.

Reviewed By: brecht, mont29, sergey

Ref D14069
2022-02-11 09:14:36 +11:00
Campbell Barton fdb2167b4a Docs: use doxygen formatting for BLI
Differentiate doc-strings from title/section text.
2021-12-20 19:07:10 +11:00
Campbell Barton 17e1e2bfd8 Cleanup: correct spelling in comments 2021-02-05 16:23:34 +11:00
Jacques Lucke 91694b9b58 Code Style: use "#pragma once" in source directory
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.

This patch has been generated by P1561 followed by `make format`.

Differential Revision: https://developer.blender.org/D8466
2020-08-07 09:50:34 +02:00
Campbell Barton 9be28095cb Fix building on NetBSD 2020-05-09 23:22:50 +10:00
Dalai Felinto 2d1cce8331 Cleanup: `make format` after SortedIncludes change 2020-03-19 09:33:58 +01:00
mano-wii 177dfc6384 Fix T71273: Bad encoding of utf-8 for Text objects
`BLI_strncpy_wchar_from_utf8` internally assumes `wchar_t` is 32 bits
which is not the case on windows.

The solution is to replace `wchar_t` with `char32_t`.

Thanks to @robbott for compatibility on macOS.

Differential Revision: https://developer.blender.org/D6198
2019-11-22 12:27:34 -03:00
Campbell Barton e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
Campbell Barton de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
Campbell Barton eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Campbell Barton 65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
Campbell Barton 9200dc0eb1 Cleanup: preprocessor indentation 2019-01-03 15:52:07 +11:00
Campbell Barton 5513da65b2 Cleanup: trailing space for BLI 2018-06-17 16:32:54 +02:00
Campbell Barton 28d2148b09 Haiku OS Support
D2860 by @miqlas

Even though Haiku is a niche OS, only minor changes are needed.
2017-11-30 18:05:21 +11:00
Aaron Carlisle 9f044cb422 Remove MinGW support
The Issue
=======

For a long time now MinGW has been unsupported and unmaintained and at this point,
it looks like something that we should just leave behind and move on.


Why Remove
==========

One of the big motivations for MinGW back in the day is that it was free compared to MSVC which was licensed based.
However, now that this is no longer true we have basically stopped updating the need CMake files.
Along with the CMake files, there are several patches to the extern libs needed to make this work.  For example, see:
https://developer.blender.org/diffusion/B/browse/master/extern/carve/patches/mingw_w64.patch

If we wanted to keep MinGW then we would need to make more custom patches to the external libs and
this is not something our platform maintainers are willing to do.

For example, here is the patches needed to build python: https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-python3

Fixes T51301

Differential Revision: https://developer.blender.org/D2648
2017-05-27 15:34:55 -04:00
Sergey Sharybin c7f40caa2c Add shortcuts for unsigned int, short, long and char
Feel free to use those in the new code.

And stay away from simple "unsigned".
2017-02-06 15:04:13 +01:00
Campbell Barton 31375a1b21 Cleanup: stdbool no longer optional, remove checks 2016-01-16 15:38:57 +11:00
Thomas Dinges e3ed13cbd4 Cleanup: Remove special code for Visual Studio 2008.
Goodbye VC2008, it has been a pleasure (more or less) :D SCons / CMake cleaenup will follow.
Differential Revision: https://developer.blender.org/D715
2014-08-07 13:52:15 +02:00
Matteo F. Vescovi 9b23d9acec Fix compilation error non non-linux architectures 2014-06-02 16:26:38 +06:00
Bastien Montagne d9211b1e7b Fix compilation (size_t not defined) by including stddef.h in BLI_sys_types.h 2014-04-15 09:11:45 +02:00
Campbell Barton 82628a6b0e Code cleanup: use struct type for mempool & style edits 2014-04-10 06:49:25 +10:00
Campbell Barton 617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
Andrea Weikert eaafa58c2b Code cleanup: removed unnecessary #defines causing re-definition warnings
Fixing warnings in own recent commit
2014-02-03 21:27:11 +01:00
Campbell Barton 15f449c529 Add include for FreeBSD and clang 2014-02-03 22:04:56 +11:00
Andrea Weikert dda63375b2 Fix: Compile error due to missing #define for MSVC9 (VisualC++ 2008)
Added some relevant #defines copied from extern\libmv\third_party\msinttypes to BLI_sys_types.h so they can be used in blenlib. Made smallhash.c use the BLI_sys_types.h include rather than including <stdint.h> directly
2014-02-02 14:40:52 +01:00
Irie Shinsuke bf462838b3 Fix build failure with VS2012 + SCons, caused by redefinition of the bool type. 2013-10-17 06:40:35 +00:00
Campbell Barton 65baf6ca5c remove duplicate sys-types headers.
also change define checks in BLI_sys_types.h (was warning a lot in linux about unused defines).
2013-05-29 21:38:23 +00:00
Jürgen Herrmann 88fd394dba Addition to r57094 by Campbell:
VS 2010 and 2012 have stdint.h so we should use them for consistency instead of defining the inttypes ourselves.
Added if condition for for stdint.h include for >= VS 2010

P.S.: Compiled and tested on VS2008-2012 and MinGW with scons and CMake ;)
2013-05-29 18:23:59 +00:00
Sergey Sharybin 9e05f6571f Make sure bool will always have the same size in C and C++
There were an issues with data structures defined in headers
and being used by both C and C++ on systems with stdbool
unavailable.

This happened because bool in this case will be defined as
unsigned int, which is 4 bytes. But C++'s bool is only 1
byte and this lead to alignment issues.

Now bool is always 1 byte, also made sure there's no situation
like bool foo = BitField & BitFlag, which could give overflow
issues. Use (BitField & BitFlag) != 0 instead.

Fixes #35553: Compositor broken (Backdrop & Preview)
2013-05-29 11:49:39 +00:00
Campbell Barton b5cb9e8810 add BLI_sys_types.h 2013-05-28 19:42:19 +00:00