| 1 | = PAGE_TITLE = |
| 2 | |
| 3 | [[TOC(Developer/Coding/ThirdPartyCode , depth=2)]] |
| 4 | |
| 5 | |
| 6 | You should retain the original code's licensing and copyright |
| 7 | information. Be |
| 8 | careful with copyright and code ownership, these things matter. The |
| 9 | best approach is to provide an isolated patch that adds all of the |
| 10 | code from the 3rd party, and then layer on patches that |
| 11 | modify or make use of the 3rd party code. Attempt to minimize changes. |
| 12 | |
| 13 | When you have to change the |
| 14 | 3rd party code, it is best to provide a clear identification of the |
| 15 | change like this, omitting the comments: |
| 16 | |
| 17 | {{{ |
| 18 | |
| 19 | /* unmodified code */ |
| 20 | #if defined(__rtems__) |
| 21 | /* changes made */ |
| 22 | #endif |
| 23 | /* unmodified code */ |
| 24 | |
| 25 | }}} |
| 26 | |
| 27 | This approach helps to minimize code review, identify very clearly the |
| 28 | origin of source code, and eases maintenance in case of updating the |
| 29 | 3rd party code. |