Merge branch 'master' into C
Merge with the latest master to resolve (trivial) conflict in the GitHub workflow file.
This commit is contained in:
commit
c3b262c2f7
60 changed files with 531 additions and 282 deletions
318
.github/workflows/ci.yml
vendored
318
.github/workflows/ci.yml
vendored
|
|
@ -2,46 +2,45 @@ name: CI
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
paths-ignore:
|
||||
- 'CHANGES*'
|
||||
- 'Doc/**'
|
||||
- 'appveyor.yml'
|
||||
pull_request:
|
||||
branches: master
|
||||
paths-ignore:
|
||||
- 'CHANGES*'
|
||||
- 'Doc/**'
|
||||
- 'appveyor.yml'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
# When continue-on-error is true for an individual build, that build can fail (it'll show red),
|
||||
# but it won't fail the overall build
|
||||
continue-on-error: ${{ matrix.continue-on-error || false }}
|
||||
|
||||
runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
|
||||
|
||||
# By default, the name of the build is just the language used, but matrix
|
||||
# entries can define the additional "desc" field with any additional
|
||||
# information to include in the name.
|
||||
name: ${{ matrix.SWIGLANG || 'none' }}${{ matrix.PY3 }} ${{ matrix.ENGINE}} ${{ matrix.VER }} ${{ matrix.desc }}
|
||||
# By default, the name of the build is the language used and SWIG options.
|
||||
name: ${{ matrix.SWIGLANG || 'none' }}${{ matrix.PY3 }} ${{ matrix.ENGINE}} ${{ matrix.VER }} ${{ matrix.SWIG_FEATURES }} ${{ (matrix.compiler || 'gcc') }}${{ matrix.GCC }} ${{ matrix.CPPSTD }} ${{ matrix.CSTD }} ${{ matrix.continue-on-error && '(can fail)' }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- SWIGLANG: ""
|
||||
desc: gcc
|
||||
- SWIGLANG: ""
|
||||
GCC: 7
|
||||
desc: gcc7
|
||||
- SWIGLANG: ""
|
||||
GCC: 8
|
||||
desc: gcc8
|
||||
- SWIGLANG: ""
|
||||
GCC: 9
|
||||
desc: gcc9
|
||||
- SWIGLANG: ""
|
||||
GCC: 10
|
||||
desc: gcc10
|
||||
- SWIGLANG: ""
|
||||
GCC: 11
|
||||
- SWIGLANG: ""
|
||||
compiler: clang
|
||||
desc: clang
|
||||
- SWIGLANG: c
|
||||
CPP11: 1
|
||||
- SWIGLANG: csharp
|
||||
|
|
@ -54,32 +53,30 @@ jobs:
|
|||
# - SWIGLANG: d
|
||||
# VER: '2.066.0'
|
||||
# os: ubuntu-18.04 # This dlang version doesn't work under 20.04.
|
||||
- SWIGLANG: go
|
||||
VER: '1.3'
|
||||
- SWIGLANG: go
|
||||
VER: '1.6'
|
||||
CSTD: gnu11
|
||||
- SWIGLANG: go
|
||||
VER: '1.8'
|
||||
- SWIGLANG: go
|
||||
VER: '1.12'
|
||||
CSTD: gnu99
|
||||
CSTD: gnu11
|
||||
- SWIGLANG: go
|
||||
VER: '1.16'
|
||||
CSTD: gnu99
|
||||
VER: '1.17'
|
||||
- SWIGLANG: guile
|
||||
- SWIGLANG: java
|
||||
- SWIGLANG: javascript
|
||||
ENGINE: node
|
||||
VER: '12'
|
||||
CPP11: 1
|
||||
CPPSTD: c++11
|
||||
- SWIGLANG: javascript
|
||||
ENGINE: node
|
||||
VER: '14'
|
||||
CPP11: 1
|
||||
CPPSTD: c++11
|
||||
- SWIGLANG: javascript
|
||||
ENGINE: node
|
||||
VER: '16'
|
||||
CPP14: 1
|
||||
CPPSTD: c++14
|
||||
- SWIGLANG: javascript
|
||||
ENGINE: jsc
|
||||
os: ubuntu-18.04 # libwebkitgtk-dev dependency not available in 20.04.
|
||||
|
|
@ -90,12 +87,11 @@ jobs:
|
|||
- SWIGLANG: lua
|
||||
VER: '5.3'
|
||||
- SWIGLANG: octave
|
||||
CPP11: 1
|
||||
CPPSTD: c++11
|
||||
- SWIGLANG: perl5
|
||||
- SWIGLANG: php
|
||||
VER: '7.4'
|
||||
- SWIGLANG: php
|
||||
VER: '8.0'
|
||||
- SWIGLANG: python
|
||||
- SWIGLANG: python
|
||||
PY3: 3
|
||||
|
|
@ -124,20 +120,19 @@ jobs:
|
|||
- SWIGLANG: python
|
||||
PY3: 3
|
||||
VER: '3.9'
|
||||
- SWIGLANG: python
|
||||
PY3: 3
|
||||
VER: '3.10'
|
||||
- SWIGLANG: python
|
||||
SWIG_FEATURES: -builtin
|
||||
desc: builtin
|
||||
- SWIGLANG: python
|
||||
SWIG_FEATURES: -builtin -O
|
||||
desc: builtin optimized
|
||||
- SWIGLANG: python
|
||||
PY3: 3
|
||||
SWIG_FEATURES: -builtin
|
||||
desc: builtin
|
||||
- SWIGLANG: python
|
||||
PY3: 3
|
||||
SWIG_FEATURES: -builtin -O
|
||||
desc: builtin optimized
|
||||
- SWIGLANG: r
|
||||
- SWIGLANG: ruby
|
||||
VER: '1.9'
|
||||
|
|
@ -164,10 +159,139 @@ jobs:
|
|||
VER: '2.7'
|
||||
- SWIGLANG: ruby
|
||||
VER: '3.0'
|
||||
CSTD: c99
|
||||
CPP11: 1
|
||||
CPPSTD: c++11
|
||||
- SWIGLANG: scilab
|
||||
os: ubuntu-18.04 # scilab-6.1 in ubuntu-20.04 not yet working
|
||||
- SWIGLANG: tcl
|
||||
# let's run all of them, as opposed to aborting when one fails
|
||||
# c++11 testing
|
||||
- SWIGLANG: csharp
|
||||
CPPSTD: c++11
|
||||
- SWIGLANG: go
|
||||
VER: '1.17'
|
||||
CPPSTD: c++11
|
||||
CSTD: gnu11
|
||||
- SWIGLANG: guile
|
||||
CPPSTD: c++11
|
||||
- SWIGLANG: java
|
||||
CPPSTD: c++11
|
||||
- SWIGLANG: javascript
|
||||
ENGINE: node
|
||||
VER: '14'
|
||||
CPPSTD: c++11
|
||||
- SWIGLANG: lua
|
||||
CPPSTD: c++11
|
||||
# - SWIGLANG: octave
|
||||
# CPPSTD: c++11
|
||||
- SWIGLANG: perl5
|
||||
CPPSTD: c++11
|
||||
- SWIGLANG: php
|
||||
CPPSTD: c++11
|
||||
CSTD: gnu11
|
||||
- SWIGLANG: python
|
||||
CPPSTD: c++11
|
||||
PY3: 3
|
||||
- SWIGLANG: r
|
||||
CPPSTD: c++11
|
||||
- SWIGLANG: ruby
|
||||
CPPSTD: c++11
|
||||
- SWIGLANG: scilab
|
||||
CPPSTD: c++11
|
||||
os: ubuntu-18.04 # scilab-6.1 in ubuntu-20.04 not yet working
|
||||
- SWIGLANG: tcl
|
||||
CPPSTD: c++11
|
||||
# c++14 testing
|
||||
- SWIGLANG: csharp
|
||||
CPPSTD: c++14
|
||||
- SWIGLANG: go
|
||||
VER: '1.17'
|
||||
CPPSTD: c++14
|
||||
CSTD: gnu11
|
||||
- SWIGLANG: guile
|
||||
CPPSTD: c++14
|
||||
- SWIGLANG: java
|
||||
CPPSTD: c++14
|
||||
- SWIGLANG: javascript
|
||||
ENGINE: node
|
||||
VER: '16'
|
||||
CPPSTD: c++14
|
||||
- SWIGLANG: lua
|
||||
CPPSTD: c++14
|
||||
- SWIGLANG: octave
|
||||
CPPSTD: c++14
|
||||
- SWIGLANG: perl5
|
||||
CPPSTD: c++14
|
||||
- SWIGLANG: php
|
||||
CPPSTD: c++14
|
||||
CSTD: gnu11
|
||||
- SWIGLANG: python
|
||||
CPPSTD: c++14
|
||||
PY3: 3
|
||||
- SWIGLANG: r
|
||||
CPPSTD: c++14
|
||||
- SWIGLANG: ruby
|
||||
CPPSTD: c++14
|
||||
- SWIGLANG: scilab
|
||||
CPPSTD: c++14
|
||||
os: ubuntu-18.04 # scilab-6.1 in ubuntu-20.04 not yet working
|
||||
- SWIGLANG: tcl
|
||||
CPPSTD: c++14
|
||||
# c++17 testing (using gcc11)
|
||||
- SWIGLANG: csharp
|
||||
CPPSTD: c++17
|
||||
GCC: 11
|
||||
- SWIGLANG: go
|
||||
VER: '1.17'
|
||||
CPPSTD: c++17
|
||||
GCC: 11
|
||||
CSTD: gnu17
|
||||
- SWIGLANG: guile
|
||||
CPPSTD: c++17
|
||||
GCC: 11
|
||||
- SWIGLANG: java
|
||||
CPPSTD: c++17
|
||||
GCC: 11
|
||||
- SWIGLANG: javascript
|
||||
ENGINE: node
|
||||
VER: '16'
|
||||
CPPSTD: c++17
|
||||
GCC: 11
|
||||
- SWIGLANG: lua
|
||||
CPPSTD: c++17
|
||||
GCC: 11
|
||||
- SWIGLANG: octave
|
||||
CPPSTD: c++17
|
||||
GCC: 11
|
||||
- SWIGLANG: perl5
|
||||
CPPSTD: c++17
|
||||
GCC: 11
|
||||
- SWIGLANG: php
|
||||
CPPSTD: c++17
|
||||
CSTD: gnu17
|
||||
GCC: 11
|
||||
- SWIGLANG: python
|
||||
CPPSTD: c++17
|
||||
GCC: 11
|
||||
PY3: 3
|
||||
- SWIGLANG: r
|
||||
CPPSTD: c++17
|
||||
GCC: 11
|
||||
- SWIGLANG: ruby
|
||||
CPPSTD: c++17
|
||||
GCC: 11
|
||||
- SWIGLANG: scilab
|
||||
CPPSTD: c++17
|
||||
GCC: 11
|
||||
os: ubuntu-18.04 # scilab-6.1 in ubuntu-20.04 not yet working
|
||||
- SWIGLANG: tcl
|
||||
CPPSTD: c++17
|
||||
GCC: 11
|
||||
# Experimental languages (these are allowed to fail)
|
||||
- SWIGLANG: mzscheme
|
||||
continue-on-error: true
|
||||
- SWIGLANG: ocaml
|
||||
continue-on-error: true
|
||||
os: ubuntu-18.04 # ocaml-4.08 in ubuntu-20.04 not yet working
|
||||
# Run all of them, as opposed to aborting when one fails
|
||||
fail-fast: false
|
||||
|
||||
env:
|
||||
|
|
@ -176,10 +300,9 @@ jobs:
|
|||
VER: ${{ matrix.VER }}
|
||||
ENGINE: ${{ matrix.ENGINE }}
|
||||
SWIG_FEATURES: ${{ matrix.SWIG_FEATURES }}
|
||||
GCC: ${{ matrix.GCC }}
|
||||
CSTD: ${{ matrix.CSTD }}
|
||||
CPP11: ${{ matrix.CPP11 }}
|
||||
CPP14: ${{ matrix.CPP14 }}
|
||||
CPP17: ${{ matrix.CPP17 }}
|
||||
CPPSTD: ${{ matrix.CPPSTD }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
@ -192,13 +315,32 @@ jobs:
|
|||
with:
|
||||
key: ${{ matrix.os || 'ubuntu-20.04' }}-${{ matrix.compiler || 'gcc' }}${{ matrix.GCC }}
|
||||
|
||||
- name: Configure
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
set -x
|
||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
echo PATH="$PATH" >> $GITHUB_ENV
|
||||
|
||||
source Tools/GHA-linux-install.sh
|
||||
source $GITHUB_WORKSPACE/Tools/GHA-linux-install.sh
|
||||
echo WITHLANG="$WITHLANG" >> $GITHUB_ENV
|
||||
|
||||
case $(uname) in
|
||||
Linux)
|
||||
cpu_count=$(nproc)
|
||||
;;
|
||||
|
||||
Darwin)
|
||||
cpu_count=$(sysctl -n hw.ncpu)
|
||||
;;
|
||||
|
||||
*)
|
||||
cpu_count=1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ $cpu_count != 1 ]]; then
|
||||
echo SWIGJOBS=-j$cpu_count >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
if test '${{ matrix.compiler }}' = 'clang'; then
|
||||
CC="clang"
|
||||
|
|
@ -219,88 +361,76 @@ jobs:
|
|||
echo CC="$CC" >> $GITHUB_ENV
|
||||
echo CXX="$CXX" >> $GITHUB_ENV
|
||||
|
||||
echo "Compiler used:"
|
||||
ls -la $(which $CC) $(which $CXX)
|
||||
$CC --version
|
||||
$CXX --version
|
||||
|
||||
if test -n '${{ matrix.CONFIGOPTS }}'; then
|
||||
CONFIGOPTS=${{ matrix.CONFIGOPTS }}
|
||||
- name: Configure
|
||||
run: |
|
||||
source $GITHUB_WORKSPACE/Tools/CI-linux-environment.sh
|
||||
set -x
|
||||
|
||||
if [[ -z "$CSTD" ]]; then
|
||||
case "$CPPSTD" in
|
||||
c++11) export CSTD=c11 ;;
|
||||
c++14) export CSTD=c11 ;;
|
||||
c++17) export CSTD=c17 ;;
|
||||
esac
|
||||
echo CSTD="$CSTD" >> $GITHUB_ENV
|
||||
fi
|
||||
if test -n "$CPP11"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=c++11 $CXXFLAGS" "CFLAGS=-std=c11 $CFLAGS") && export CSTD=c11 && export CPPSTD=c++11; fi
|
||||
if test -n "$CPP14"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=c++14 $CXXFLAGS" "CFLAGS=-std=c11 $CFLAGS") && export CSTD=c11 && export CPPSTD=c++14; fi
|
||||
if test -n "$CPP17"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=c++17 $CXXFLAGS" "CFLAGS=-std=c17 $CFLAGS") && export CSTD=c17 && export CPPSTD=c++17; fi
|
||||
if test -n "$CPPSTD"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=$CPPSTD $CXXFLAGS"); fi
|
||||
if test -n "$CSTD"; then CONFIGOPTS+=("CFLAGS=-std=$CSTD $CFLAGS"); fi
|
||||
if test -n "$SWIGLANG"; then CONFIGOPTS+=(--without-alllang --with-$WITHLANG); fi
|
||||
echo "${CONFIGOPTS[@]}"
|
||||
./autogen.sh && mkdir -p build/build && cd build/build && ../../configure "${CONFIGOPTS[@]}"
|
||||
|
||||
case $(uname) in
|
||||
Linux)
|
||||
cpu_count=$(nproc)
|
||||
;;
|
||||
|
||||
Darwin)
|
||||
cpu_count=$(sysctl -n hw.ncpu)
|
||||
;;
|
||||
|
||||
*)
|
||||
cpu_count=1
|
||||
;;
|
||||
esac
|
||||
if [[ $cpu_count != 1 ]]; then
|
||||
echo SWIGJOBS=-j$cpu_count >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Build
|
||||
working-directory: build/build
|
||||
run: |
|
||||
set -x
|
||||
make $SWIGJOBS
|
||||
make -s $SWIGJOBS
|
||||
./swig -version && ./swig -pcreversion
|
||||
if test -z "$SWIGLANG"; then make $SWIGJOBS check-ccache; fi
|
||||
if test -z "$SWIGLANG"; then make $SWIGJOBS check-errors-test-suite; fi
|
||||
echo 'Installing...'
|
||||
if test -z "$SWIGLANG"; then sudo make install && swig -version && ccache-swig -V; fi
|
||||
|
||||
- name: Test
|
||||
working-directory: build/build
|
||||
run: |
|
||||
case "$SWIGLANG" in
|
||||
javascript)
|
||||
case "$ENGINE" in
|
||||
node)
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
||||
nvm use ${VER}
|
||||
;;
|
||||
*)
|
||||
# Running tests using v8 or jsc involves creating a custom
|
||||
# interpreter in Tools/javascript, which is currently broken
|
||||
# for parallel builds (we attempt to update this interpreter
|
||||
# while running, resulting in "Text file busy" error).
|
||||
unset SWIGJOBS
|
||||
esac
|
||||
;;
|
||||
|
||||
ruby)
|
||||
source $HOME/.rvm/scripts/rvm
|
||||
;;
|
||||
esac
|
||||
|
||||
source $GITHUB_WORKSPACE/Tools/CI-linux-environment.sh
|
||||
set -x
|
||||
if test -n "$CPP11"; then export CPPSTD=c++11; fi
|
||||
if test -n "$CPP14"; then export CPPSTD=c++14; fi
|
||||
if test -n "$CPP17"; then export CPPSTD=c++17; fi
|
||||
# Stricter compile flags for examples. Various headers and SWIG generated code prevents full use of -pedantic.
|
||||
if test -n "$SWIGLANG"; then cflags=$($GITHUB_WORKSPACE/Tools/testflags.py --language $SWIGLANG --cflags --std=$CSTD --compiler=$CC) && echo $cflags; fi
|
||||
if test -n "$SWIGLANG"; then cxxflags=$($GITHUB_WORKSPACE/Tools/testflags.py --language $SWIGLANG --cxxflags --std=$CPPSTD --compiler=$CC) && echo $cxxflags; fi
|
||||
if test -n "$SWIGLANG"; then make check-$SWIGLANG-version; fi
|
||||
if test -n "$SWIGLANG"; then make check-$SWIGLANG-enabled; fi
|
||||
if test -n "$SWIGLANG"; then make $SWIGJOBS check-$SWIGLANG-examples CFLAGS="$cflags" CXXFLAGS="$cxxflags"; fi
|
||||
if test -n "$SWIGLANG"; then make $SWIGJOBS check-$SWIGLANG-test-suite CFLAGS="$cflags" CXXFLAGS="$cxxflags"; fi
|
||||
|
||||
if test -z "$SWIGLANG"; then
|
||||
make $SWIGJOBS check-ccache
|
||||
make $SWIGJOBS check-errors-test-suite
|
||||
else
|
||||
case "$SWIGLANG" in
|
||||
javascript)
|
||||
case "$ENGINE" in
|
||||
v8 | jsc)
|
||||
# Running tests using v8 or jsc involves creating a custom
|
||||
# interpreter in Tools/javascript, which is currently broken
|
||||
# for parallel builds (we attempt to update this interpreter
|
||||
# while running, resulting in "Text file busy" error).
|
||||
unset SWIGJOBS
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
# Stricter compile flags for examples. Various headers and SWIG generated code prevents full use of -pedantic.
|
||||
cflags=$($GITHUB_WORKSPACE/Tools/testflags.py --language $SWIGLANG --cflags --std=$CSTD --compiler=$CC) && echo $cflags
|
||||
cxxflags=$($GITHUB_WORKSPACE/Tools/testflags.py --language $SWIGLANG --cxxflags --std=$CPPSTD --compiler=$CC) && echo $cxxflags
|
||||
make check-$SWIGLANG-version
|
||||
make check-$SWIGLANG-enabled
|
||||
make $SWIGJOBS check-$SWIGLANG-examples CFLAGS="$cflags" CXXFLAGS="$cxxflags"
|
||||
make $SWIGJOBS check-$SWIGLANG-test-suite CFLAGS="$cflags" CXXFLAGS="$cxxflags"
|
||||
fi
|
||||
|
||||
- name: Install
|
||||
working-directory: build/build
|
||||
run: |
|
||||
set -x
|
||||
if test -z "$SWIGLANG"; then sudo make install && swig -version && ccache-swig -V; fi
|
||||
|
||||
- name: Clean
|
||||
working-directory: build/build
|
||||
run: |
|
||||
set -x
|
||||
make check-maintainer-clean && ../../configure $CONFIGOPTS
|
||||
make check-maintainer-clean && ../../configure
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ This directory contains a version of ccache. The initial version was based on cc
|
|||
debian patches 01-02, 04-14, see the debian/patches subdirectory. The ccache-win32-2.4 modifications
|
||||
to ccache-2.4 have also been merged in.
|
||||
|
||||
Changes have been made to support cacheing the output from SWIG. The ability to cache c/c++ compiler
|
||||
Changes have been made to support caching the output from SWIG. The ability to cache c/c++ compiler
|
||||
output has been retained.
|
||||
|
||||
Additional features added are the CCACHE_VERBOSE and CCACHE_SWIG environment variables, see docs.
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ int execute(char **argv,
|
|||
_dup2(fd, 2);
|
||||
_close(fd);
|
||||
|
||||
/* Spawn process (_exec* familly doesn't return) */
|
||||
/* Spawn process (_exec* family doesn't return) */
|
||||
status = _spawnv(_P_WAIT, argv[0], (const char **)argv);
|
||||
|
||||
/* Restore descriptors */
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
* for string length. This covers a nasty loophole.
|
||||
*
|
||||
* The other functions are there to prevent NULL pointers from
|
||||
* causing nast effects.
|
||||
* causing nasty effects.
|
||||
*
|
||||
* More Recently:
|
||||
* Brandon Long <blong@fiction.net> 9/15/96 for mutt 0.43
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
* probably requires libm on most operating systems. Don't yet
|
||||
* support the exponent (e,E) and sigfig (g,G). Also, fmtint()
|
||||
* was pretty badly broken, it just wasn't being exercised in ways
|
||||
* which showed it, so that's been fixed. Also, formated the code
|
||||
* which showed it, so that's been fixed. Also, formatted the code
|
||||
* to mutt conventions, and removed dead code left over from the
|
||||
* original. Also, there is now a builtin-test, just compile with:
|
||||
* gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ on the new options.<p>
|
|||
|
||||
You can get this release from the <a href="http://ccache.samba.org/ftp/ccache/">download directory</a>
|
||||
|
||||
<p>NOTE! This release changes the hash input slighly, so you will
|
||||
<p>NOTE! This release changes the hash input slightly, so you will
|
||||
probably find that you will not get any hits against your existing
|
||||
cache when you upgrade.
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,11 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
|
|||
Version 4.1.0 (in progress)
|
||||
===========================
|
||||
|
||||
2021-11-12: wsfulton
|
||||
[Javascript] v8 and node only. Fix mismatched new char[] and free()
|
||||
when wrapping C code char arrays. Now calloc is now used instead of
|
||||
new char[] in SWIG_AsCharPtrAndSize.
|
||||
|
||||
2021-10-03: ajrh1
|
||||
[Perl] #2074: Avoid -Wmisleading-indentation in generated code
|
||||
when using gcc11.
|
||||
|
|
|
|||
|
|
@ -1354,7 +1354,7 @@ Here is the list of all Doxygen tags and the description of how they are transla
|
|||
</tr>
|
||||
<tr>
|
||||
<td>\throws</td>
|
||||
<td>replaced wih ':raises:'</td>
|
||||
<td>replaced with ':raises:'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>\todo</td>
|
||||
|
|
|
|||
|
|
@ -3613,7 +3613,7 @@ A target language is given the 'Supported' status when
|
|||
Examples must be available and run successfully.
|
||||
</li>
|
||||
<li>
|
||||
The examples and test-suite must be fully functioning on the Travis Continuous Integration platform.
|
||||
The examples and test-suite must be fully functioning on the Github Actions Continuous Integration platform.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -3660,9 +3660,9 @@ Some minimum requirements and notes about languages with the 'Experimental' stat
|
|||
The number of tests in these lists should be no greater than half of the number of tests in the full test-suite.
|
||||
</li>
|
||||
<li>
|
||||
The examples and test-suite must also be fully functioning on the Travis Continuous Integration platform.
|
||||
However, experimental languages will be set as 'allow_failures'.
|
||||
This means that pull requests and normal development commits will not break the entire Travis build should an experimental language fail.
|
||||
The examples and test-suite must also be fully functioning on the Github Actions Continuous Integration platform.
|
||||
However, experimental languages will be flagged as 'continue-on-error'.
|
||||
This means that pull requests and normal development commits will not break the entire Github Actions build should an experimental language fail.
|
||||
</li>
|
||||
<li>
|
||||
Any new failed tests will be fixed on a 'best effort' basis by core developers with no promises made.
|
||||
|
|
|
|||
|
|
@ -9095,7 +9095,7 @@ This method normally calls the C++ destructor or <tt>free()</tt> for C code.
|
|||
<p>
|
||||
The generated code can be debugged using both a Java debugger and a C++ debugger using the usual debugging techniques.
|
||||
Breakpoints can be set in either Java or C++ code and so both can be debugged simultaneously.
|
||||
Most debuggers do not understand both Java and C++, with one noteable exception of Sun Studio,
|
||||
Most debuggers do not understand both Java and C++, with one notable exception of Sun Studio,
|
||||
where it is possible to step from Java code into a JNI method within one environment.
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -1608,7 +1608,7 @@ public:
|
|||
</div>
|
||||
|
||||
<p>
|
||||
In Python, the static member can be access in three different ways:
|
||||
In Python, the static member can be accessed in three different ways:
|
||||
</p>
|
||||
|
||||
<div class="targetlang">
|
||||
|
|
@ -1616,7 +1616,7 @@ In Python, the static member can be access in three different ways:
|
|||
>>> example.Spam_foo() # Spam::foo()
|
||||
>>> s = example.Spam()
|
||||
>>> s.foo() # Spam::foo() via an instance
|
||||
>>> example.Spam.foo() # Spam::foo(). Python-2.2 only
|
||||
>>> example.Spam.foo() # Spam::foo() using Python-2.2 and later
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
|
@ -1627,16 +1627,31 @@ last technique is only available in Python-2.2 and later versions.
|
|||
|
||||
<p>
|
||||
Static member variables are currently accessed as global variables. This means,
|
||||
they are accessed through <tt>cvar</tt> like this:
|
||||
they are accessed through <tt>cvar</tt> or via an instance property:
|
||||
</p>
|
||||
|
||||
<div class="targetlang">
|
||||
<pre>
|
||||
>>> print example.cvar.Spam_bar
|
||||
>>> example.cvar.Spam_bar # Spam::bar
|
||||
7
|
||||
>>> s = example.Spam()
|
||||
>>> s.bar # Spam::bar via an instance property
|
||||
7
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The <tt>-builtin</tt> option uses a metaclass to additionally provide access as follows:
|
||||
</p>
|
||||
|
||||
<div class="targetlang">
|
||||
<pre>
|
||||
>>> example.Spam.bar # Spam::bar using -builtin option only
|
||||
7
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<H3><a name="Python_nn21">33.3.8 C++ inheritance</a></H3>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ slices)
|
|||
<p>
|
||||
Wrapping of C++ classes for R works quite well. R has a special
|
||||
type, known as an external reference, that can be used as a pointer
|
||||
to arbitary things, including C++ classes. The proxy layers generated
|
||||
to arbitrary things, including C++ classes. The proxy layers generated
|
||||
for other classes are not required.
|
||||
</p>
|
||||
|
||||
|
|
@ -265,7 +265,7 @@ v2$Axles
|
|||
[1] 4
|
||||
v1$Available
|
||||
[1] FALSE
|
||||
# Set availabilty
|
||||
# Set availability
|
||||
v1$Available <- TRUE
|
||||
v1$Available
|
||||
[1] TRUE
|
||||
|
|
|
|||
|
|
@ -14,4 +14,8 @@
|
|||
|
||||
%include math.i
|
||||
|
||||
extern double drand48();
|
||||
%{
|
||||
/* Add drand48 declaration as it is posix only and is not in stdlib.h when using strict c99 and later */
|
||||
extern double drand48(void);
|
||||
%}
|
||||
extern double drand48(void);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class Exc {
|
|||
public:
|
||||
Exc(int c, const char *m) {
|
||||
code = c;
|
||||
strncpy(msg,m,256);
|
||||
strncpy(msg,m,255);
|
||||
}
|
||||
int code;
|
||||
char msg[256];
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class Exc {
|
|||
public:
|
||||
Exc(int c, const char *m) {
|
||||
code = c;
|
||||
strncpy(msg,m,256);
|
||||
strncpy(msg,m,255);
|
||||
}
|
||||
int code;
|
||||
char msg[256];
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class Exc {
|
|||
public:
|
||||
Exc(int c, const char *m) {
|
||||
code = c;
|
||||
strncpy(msg,m,256);
|
||||
strncpy(msg,m,255);
|
||||
}
|
||||
int code;
|
||||
char msg[256];
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ struct FinalOverrideMethods {
|
|||
virtual void override(int) {}
|
||||
virtual ~FinalOverrideMethods() = default;
|
||||
};
|
||||
struct FinalOverrideVariables {
|
||||
struct FinalOverrideVars {
|
||||
int final;
|
||||
double override;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@
|
|||
%include <std_wstring.i>
|
||||
#endif
|
||||
|
||||
#if defined(SWIGLUA)
|
||||
// Lua uses a parameter called L in every wrapper function
|
||||
%ignore L;
|
||||
#endif
|
||||
|
||||
%inline %{
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
|
|
|||
|
|
@ -24,19 +24,19 @@ void takeit3(Thing const*&& t) {}
|
|||
void takeit4(Thing *const&& t) {}
|
||||
void takeit5(Thing const*const&& t) {}
|
||||
|
||||
struct Containing {
|
||||
Thing && member_rvalue_ref;
|
||||
Thing *&& member_rvalue_ref_ptr1;
|
||||
Thing const*&& member_rvalue_ref_ptr2;
|
||||
Thing *const&& member_rvalue_ref_ptr3;
|
||||
Thing const*const &&member_rvalue_ref_ptr4;
|
||||
struct Contain {
|
||||
Thing && m_ref;
|
||||
Thing *&& m_ref_ptr1;
|
||||
Thing const*&& m_ref_ptr2;
|
||||
Thing *const&& m_ref_ptr3;
|
||||
Thing const*const &&m_ref_ptr4;
|
||||
|
||||
Containing(Thing&&r, Thing*&& r1, Thing const*&& r2, Thing *const&& r3, Thing const*const && r4) :
|
||||
member_rvalue_ref(std::move(r)),
|
||||
member_rvalue_ref_ptr1(std::move(r1)),
|
||||
member_rvalue_ref_ptr2(std::move(r2)),
|
||||
member_rvalue_ref_ptr3(std::move(r3)),
|
||||
member_rvalue_ref_ptr4(std::move(r4))
|
||||
Contain(Thing&&r, Thing*&& r1, Thing const*&& r2, Thing *const&& r3, Thing const*const && r4) :
|
||||
m_ref(std::move(r)),
|
||||
m_ref_ptr1(std::move(r1)),
|
||||
m_ref_ptr2(std::move(r2)),
|
||||
m_ref_ptr3(std::move(r3)),
|
||||
m_ref_ptr4(std::move(r4))
|
||||
{}
|
||||
};
|
||||
%}
|
||||
|
|
@ -61,19 +61,19 @@ void int_takeit3(int const*&& t) {}
|
|||
void int_takeit4(int *const&& t) {}
|
||||
void int_takeit5(int const*const&& t) {}
|
||||
|
||||
struct IntContaining {
|
||||
int && member_rvalue_ref;
|
||||
int *&& member_rvalue_ref_ptr1;
|
||||
int const*&& member_rvalue_ref_ptr2;
|
||||
int *const&& member_rvalue_ref_ptr3;
|
||||
int const*const &&member_rvalue_ref_ptr4;
|
||||
struct IContain {
|
||||
int && m_ref;
|
||||
int *&& m_ref_ptr1;
|
||||
int const*&& m_ref_ptr2;
|
||||
int *const&& m_ref_ptr3;
|
||||
int const*const &&m_ref_ptr4;
|
||||
|
||||
IntContaining(int&& r, int*&& r1, int const*&& r2, int *const&& r3, int const*const && r4) :
|
||||
member_rvalue_ref(std::move(r)),
|
||||
member_rvalue_ref_ptr1(std::move(r1)),
|
||||
member_rvalue_ref_ptr2(std::move(r2)),
|
||||
member_rvalue_ref_ptr3(std::move(r3)),
|
||||
member_rvalue_ref_ptr4(std::move(r4))
|
||||
IContain(int&& r, int*&& r1, int const*&& r2, int *const&& r3, int const*const && r4) :
|
||||
m_ref(std::move(r)),
|
||||
m_ref_ptr1(std::move(r1)),
|
||||
m_ref_ptr2(std::move(r2)),
|
||||
m_ref_ptr3(std::move(r3)),
|
||||
m_ref_ptr4(std::move(r4))
|
||||
{}
|
||||
};
|
||||
%}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* This interface checks whether SWIG supports the new double angled brackets
|
||||
in the template syntax without having a space inbetween. This feature was
|
||||
in the template syntax without having a space in between. This feature was
|
||||
introduced in new C++11 standard.
|
||||
*/
|
||||
%module cpp11_template_double_brackets
|
||||
|
|
|
|||
|
|
@ -63,12 +63,14 @@ using IntArray = Int[];
|
|||
|
||||
// Test that SWIG understands these new types
|
||||
|
||||
%{
|
||||
Int mult2(Int x) { return x * 2; }
|
||||
%}
|
||||
%callback("%s_cb");
|
||||
Int mult2(Int x);
|
||||
%nocallback;
|
||||
|
||||
%inline %{
|
||||
Int mult2(Int x) { return x * 2; }
|
||||
IntPtr allocate_int() { return new Int(12); }
|
||||
void free_int(int* ptr) { delete ptr; }
|
||||
void inplace_mult2(IntRef x) { x *= 2; }
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ void main() {
|
|||
enforce(countUntil(vector[], i * 10) == i, "indexOf test failed, i: " ~ to!string(i));
|
||||
}
|
||||
|
||||
enforce(countUntil(vector[], 42) == -1, "non-existant item indexOf test failed");
|
||||
enforce(countUntil(vector[], 42) == -1, "non-existent item indexOf test failed");
|
||||
|
||||
vector.clear();
|
||||
enforce(vector.length == 0, "clear test failed");
|
||||
|
|
|
|||
|
|
@ -39,15 +39,15 @@
|
|||
;(check (=~ 15 (Overload-byval2cpr o #nil)))
|
||||
;(check (=~ 16 (Overload-byval2cpr o x)))
|
||||
|
||||
; forward class declaration
|
||||
(check (=~ 17 (Overload-byval1forwardptr o x)))
|
||||
(check (=~ 18 (Overload-byval1forwardptr o #nil)))
|
||||
; fwd class declaration
|
||||
(check (=~ 17 (Overload-byval1fwdptr o x)))
|
||||
(check (=~ 18 (Overload-byval1fwdptr o #nil)))
|
||||
|
||||
(check (=~ 19 (Overload-byval2forwardptr o #nil)))
|
||||
(check (=~ 20 (Overload-byval2forwardptr o x)))
|
||||
(check (=~ 19 (Overload-byval2fwdptr o #nil)))
|
||||
(check (=~ 20 (Overload-byval2fwdptr o x)))
|
||||
|
||||
(check (=~ 21 (Overload-byval1forwardref o x)))
|
||||
(check (=~ 21 (Overload-byval1fwdref o x)))
|
||||
|
||||
(check (=~ 22 (Overload-byval2forwardref o x)))
|
||||
(check (=~ 22 (Overload-byval2fwdref o x)))
|
||||
|
||||
(exit 0)
|
||||
|
|
|
|||
|
|
@ -37,13 +37,13 @@ check(13, o.byval1cpr(x));
|
|||
// check(15, o.byval2cpr(null));
|
||||
check(16, o.byval2cpr(x));
|
||||
|
||||
// forward class declaration
|
||||
check(17, o.byval1forwardptr(x));
|
||||
// check(18, o.byval1forwardptr(null));
|
||||
// fwd class declaration
|
||||
check(17, o.byval1fwdptr(x));
|
||||
// check(18, o.byval1fwdptr(null));
|
||||
|
||||
// check(19, o.byval2forwardptr(null));
|
||||
check(20, o.byval2forwardptr(x));
|
||||
// check(19, o.byval2fwdptr(null));
|
||||
check(20, o.byval2fwdptr(x));
|
||||
|
||||
check(21, o.byval1forwardref(x));
|
||||
check(21, o.byval1fwdref(x));
|
||||
|
||||
check(22, o.byval2forwardref(x));
|
||||
check(22, o.byval2fwdref(x));
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@ assert(14 == o:byval1cpr(nil))
|
|||
assert(15 == o:byval2cpr(nil))
|
||||
assert(16 == o:byval2cpr(x))
|
||||
|
||||
-- forward class declaration
|
||||
assert(17 == o:byval1forwardptr(x))
|
||||
assert(18 == o:byval1forwardptr(nil))
|
||||
-- fwd class declaration
|
||||
assert(17 == o:byval1fwdptr(x))
|
||||
assert(18 == o:byval1fwdptr(nil))
|
||||
|
||||
assert(19 == o:byval2forwardptr(nil))
|
||||
assert(20 == o:byval2forwardptr(x))
|
||||
assert(19 == o:byval2fwdptr(nil))
|
||||
assert(20 == o:byval2fwdptr(x))
|
||||
|
||||
assert(21 == o:byval1forwardref(x))
|
||||
assert(21 == o:byval1fwdref(x))
|
||||
|
||||
assert(22 == o:byval2forwardref(x))
|
||||
assert(22 == o:byval2fwdref(x))
|
||||
|
|
|
|||
|
|
@ -40,13 +40,13 @@ check(14, o.byval1cpr(null));
|
|||
check(15, o.byval2cpr(null));
|
||||
check(16, o.byval2cpr(x));
|
||||
|
||||
# forward class declaration
|
||||
check(17, o.byval1forwardptr(x));
|
||||
check(18, o.byval1forwardptr(null));
|
||||
# fwd class declaration
|
||||
check(17, o.byval1fwdptr(x));
|
||||
check(18, o.byval1fwdptr(null));
|
||||
|
||||
check(19, o.byval2forwardptr(null));
|
||||
check(20, o.byval2forwardptr(x));
|
||||
check(19, o.byval2fwdptr(null));
|
||||
check(20, o.byval2fwdptr(x));
|
||||
|
||||
check(21, o.byval1forwardref(x));
|
||||
check(21, o.byval1fwdref(x));
|
||||
|
||||
check(22, o.byval2forwardref(x));
|
||||
check(22, o.byval2fwdref(x));
|
||||
|
|
|
|||
|
|
@ -35,18 +35,18 @@ struct Overload {
|
|||
int byval2cpr(Y*const& y) { return 15; }
|
||||
int byval2cpr(X x) { return 16; }
|
||||
|
||||
// forward class declaration
|
||||
int byval1forwardptr(X x) { return 17; }
|
||||
int byval1forwardptr(F* f) { return 18; }
|
||||
// fwd class declaration
|
||||
int byval1fwdptr(X x) { return 17; }
|
||||
int byval1fwdptr(F* f) { return 18; }
|
||||
|
||||
int byval2forwardptr(F* f) { return 19; }
|
||||
int byval2forwardptr(X x) { return 20; }
|
||||
int byval2fwdptr(F* f) { return 19; }
|
||||
int byval2fwdptr(X x) { return 20; }
|
||||
|
||||
int byval1forwardref(X x) { return 21; }
|
||||
int byval1forwardref(F& f) { return -21; }
|
||||
int byval1fwdref(X x) { return 21; }
|
||||
int byval1fwdref(F& f) { return -21; }
|
||||
|
||||
int byval2forwardref(F& f) { return -22; }
|
||||
int byval2forwardref(X x) { return 22; }
|
||||
int byval2fwdref(F& f) { return -22; }
|
||||
int byval2fwdref(X x) { return 22; }
|
||||
|
||||
};
|
||||
%}
|
||||
|
|
|
|||
|
|
@ -32,13 +32,13 @@ is(14, $o->byval1cpr(undef));
|
|||
is(15, $o->byval2cpr(undef));
|
||||
is(16, $o->byval2cpr($x));
|
||||
|
||||
# forward class declaration
|
||||
is(17, $o->byval1forwardptr($x));
|
||||
is(18, $o->byval1forwardptr(undef));
|
||||
# fwd class declaration
|
||||
is(17, $o->byval1fwdptr($x));
|
||||
is(18, $o->byval1fwdptr(undef));
|
||||
|
||||
is(19, $o->byval2forwardptr(undef));
|
||||
is(20, $o->byval2forwardptr($x));
|
||||
is(19, $o->byval2fwdptr(undef));
|
||||
is(20, $o->byval2fwdptr($x));
|
||||
|
||||
is(21, $o->byval1forwardref($x));
|
||||
is(21, $o->byval1fwdref($x));
|
||||
|
||||
is(22, $o->byval2forwardref($x));
|
||||
is(22, $o->byval2fwdref($x));
|
||||
|
|
|
|||
|
|
@ -30,15 +30,15 @@ check::equal(14, $o->byval1cpr(null), "test 14");
|
|||
check::equal(15, $o->byval2cpr(null), "test 15");
|
||||
check::equal(16, $o->byval2cpr($x), "test 16");
|
||||
|
||||
# forward class declaration
|
||||
check::equal(17, $o->byval1forwardptr($x), "test 17");
|
||||
check::equal(18, $o->byval1forwardptr(null), "test 18");
|
||||
# fwd class declaration
|
||||
check::equal(17, $o->byval1fwdptr($x), "test 17");
|
||||
check::equal(18, $o->byval1fwdptr(null), "test 18");
|
||||
|
||||
check::equal(19, $o->byval2forwardptr(null), "test 19");
|
||||
check::equal(20, $o->byval2forwardptr($x), "test 20");
|
||||
check::equal(19, $o->byval2fwdptr(null), "test 19");
|
||||
check::equal(20, $o->byval2fwdptr($x), "test 20");
|
||||
|
||||
check::equal(21, $o->byval1forwardref($x), "test 21");
|
||||
check::equal(21, $o->byval1fwdref($x), "test 21");
|
||||
|
||||
check::equal(22, $o->byval2forwardref($x), "test 22");
|
||||
check::equal(22, $o->byval2fwdref($x), "test 22");
|
||||
|
||||
check::done();
|
||||
|
|
|
|||
|
|
@ -32,13 +32,13 @@ check(14, o.byval1cpr(None))
|
|||
check(15, o.byval2cpr(None))
|
||||
check(16, o.byval2cpr(x))
|
||||
|
||||
# forward class declaration
|
||||
check(17, o.byval1forwardptr(x))
|
||||
check(18, o.byval1forwardptr(None))
|
||||
# fwd class declaration
|
||||
check(17, o.byval1fwdptr(x))
|
||||
check(18, o.byval1fwdptr(None))
|
||||
|
||||
check(19, o.byval2forwardptr(None))
|
||||
check(20, o.byval2forwardptr(x))
|
||||
check(19, o.byval2fwdptr(None))
|
||||
check(20, o.byval2fwdptr(x))
|
||||
|
||||
check(21, o.byval1forwardref(x))
|
||||
check(21, o.byval1fwdref(x))
|
||||
|
||||
check(22, o.byval2forwardref(x))
|
||||
check(22, o.byval2fwdref(x))
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ class Ai:
|
|||
def __int__(self):
|
||||
return self.x
|
||||
|
||||
def __index__(self):
|
||||
return self.x
|
||||
|
||||
class Ad:
|
||||
|
||||
|
|
|
|||
|
|
@ -34,16 +34,16 @@ unittest(12, o$byconstref2(x))
|
|||
#unittest(15, o$byval2cpr(NULL))
|
||||
#unittest(16, o$byval2cpr(x))
|
||||
|
||||
# forward class declaration
|
||||
unittest(17, o$byval1forwardptr(x))
|
||||
unittest(18, o$byval1forwardptr(NULL))
|
||||
# fwd class declaration
|
||||
unittest(17, o$byval1fwdptr(x))
|
||||
unittest(18, o$byval1fwdptr(NULL))
|
||||
|
||||
unittest(19, o$byval2forwardptr(NULL))
|
||||
unittest(20, o$byval2forwardptr(x))
|
||||
unittest(19, o$byval2fwdptr(NULL))
|
||||
unittest(20, o$byval2fwdptr(x))
|
||||
|
||||
unittest(21, o$byval1forwardref(x))
|
||||
unittest(21, o$byval1fwdref(x))
|
||||
|
||||
unittest(22, o$byval2forwardref(x))
|
||||
unittest(22, o$byval2fwdref(x))
|
||||
|
||||
q(save="no")
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,18 @@
|
|||
struct swig_tree;
|
||||
%}
|
||||
|
||||
%{
|
||||
#if defined(__cplusplus)
|
||||
#if __cplusplus >= 201703L
|
||||
/*
|
||||
Fix for languages that compile C tests as C++:
|
||||
error: ISO C++17 does not allow ‘register’ storage class specifier [-Werror=register]
|
||||
*/
|
||||
#define register
|
||||
#endif
|
||||
#endif
|
||||
%}
|
||||
|
||||
// bug # 924413
|
||||
%inline {
|
||||
void clear_tree_flags(register struct swig_tree *tp, register int i) {}
|
||||
|
|
|
|||
|
|
@ -40,13 +40,13 @@ swig_assert(14 == o.byval1cpr(nil))
|
|||
swig_assert(15 == o.byval2cpr(nil))
|
||||
swig_assert(16 == o.byval2cpr(x))
|
||||
|
||||
# forward class declaration
|
||||
swig_assert(17 == o.byval1forwardptr(x))
|
||||
swig_assert(18 == o.byval1forwardptr(nil))
|
||||
# fwd class declaration
|
||||
swig_assert(17 == o.byval1fwdptr(x))
|
||||
swig_assert(18 == o.byval1fwdptr(nil))
|
||||
|
||||
swig_assert(19 == o.byval2forwardptr(nil))
|
||||
swig_assert(20 == o.byval2forwardptr(x))
|
||||
swig_assert(19 == o.byval2fwdptr(nil))
|
||||
swig_assert(20 == o.byval2fwdptr(x))
|
||||
|
||||
swig_assert(21 == o.byval1forwardref(x))
|
||||
swig_assert(21 == o.byval1fwdref(x))
|
||||
|
||||
swig_assert(22 == o.byval2forwardref(x))
|
||||
swig_assert(22 == o.byval2fwdref(x))
|
||||
|
|
|
|||
|
|
@ -30,16 +30,16 @@ checkequal(14, Overload_byval1cpr(o, NULL), "test 14");
|
|||
checkequal(15, Overload_byval2cpr(o, NULL), "test 15");
|
||||
checkequal(16, Overload_byval2cpr(o, x), "test 16");
|
||||
|
||||
// forward class declaration
|
||||
checkequal(17, Overload_byval1forwardptr(o, x), "test 17");
|
||||
checkequal(18, Overload_byval1forwardptr(o, NULL), "test 18");
|
||||
// fwd class declaration
|
||||
checkequal(17, Overload_byval1fwdptr(o, x), "test 17");
|
||||
checkequal(18, Overload_byval1fwdptr(o, NULL), "test 18");
|
||||
|
||||
checkequal(19, Overload_byval2forwardptr(o, NULL), "test 19");
|
||||
checkequal(20, Overload_byval2forwardptr(o, x), "test 20");
|
||||
checkequal(19, Overload_byval2fwdptr(o, NULL), "test 19");
|
||||
checkequal(20, Overload_byval2fwdptr(o, x), "test 20");
|
||||
|
||||
checkequal(21, Overload_byval1forwardref(o, x), "test 21");
|
||||
checkequal(21, Overload_byval1fwdref(o, x), "test 21");
|
||||
|
||||
checkequal(22, Overload_byval2forwardref(o, x), "test 22");
|
||||
checkequal(22, Overload_byval2fwdref(o, x), "test 22");
|
||||
|
||||
exec("swigtest.quit", -1);
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ endfunction
|
|||
test_global();
|
||||
|
||||
|
||||
// Test assignement in enums
|
||||
// Test assignment in enums
|
||||
checkequal(kValue_get(), 4, "kValue");
|
||||
|
||||
exec("swigtest.quit", -1);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
// Test truncating variables, constants, functions identifier names
|
||||
|
||||
%inline %{
|
||||
// these identifier names wont be truncated
|
||||
// these identifier names won't be truncated
|
||||
int gvar_identifier_name = -1;
|
||||
#define CONS_IDENTIFIER_NAME -11
|
||||
int function_identifier_name() { return -21; };
|
||||
|
|
|
|||
|
|
@ -70,7 +70,10 @@ class ItkVectorContainerUILSNUS2 : public std::vector< ItkLevelSetNodeUS2 > {
|
|||
|
||||
class ItkVectorContainerUILSNUS2_Pointer {
|
||||
public:
|
||||
ItkVectorContainerUILSNUS2 * operator->() const { return 0; }
|
||||
ItkVectorContainerUILSNUS2 * operator->() const {
|
||||
static ItkVectorContainerUILSNUS2 instance;
|
||||
return &instance;
|
||||
}
|
||||
};
|
||||
|
||||
%}
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ import
|
|||
|
||||
set x [new_B]
|
||||
A_hello $x
|
||||
if [ catch { $x nonexistant } ] {
|
||||
if [ catch { $x nonexistent } ] {
|
||||
} else {
|
||||
puts stderr "nonexistant method did not throw exception\n"
|
||||
puts stderr "nonexistent method did not throw exception\n"
|
||||
exit 1
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,13 +40,13 @@ check "testX" 14 [$o byval1cpr "NULL"]
|
|||
check "testX" 15 [$o byval2cpr "NULL"]
|
||||
check "testX" 16 [$o byval2cpr $x]
|
||||
|
||||
# forward class declaration
|
||||
check "testX" 17 [$o byval1forwardptr $x]
|
||||
check "testX" 18 [$o byval1forwardptr "NULL"]
|
||||
# fwd class declaration
|
||||
check "testX" 17 [$o byval1fwdptr $x]
|
||||
check "testX" 18 [$o byval1fwdptr "NULL"]
|
||||
|
||||
check "testX" 19 [$o byval2forwardptr "NULL"]
|
||||
check "testX" 20 [$o byval2forwardptr $x]
|
||||
check "testX" 19 [$o byval2fwdptr "NULL"]
|
||||
check "testX" 20 [$o byval2fwdptr $x]
|
||||
|
||||
check "testX" 21 [$o byval1forwardref $x]
|
||||
check "testX" 21 [$o byval1fwdref $x]
|
||||
|
||||
check "testX" 22 [$o byval2forwardref $x]
|
||||
check "testX" 22 [$o byval2fwdref $x]
|
||||
|
|
|
|||
|
|
@ -61,7 +61,11 @@ void CheckRetTypemapUsed() {
|
|||
%inline {
|
||||
class FFoo {
|
||||
public:
|
||||
char * Bar(bool b) const { return (char *)"x"; }
|
||||
char * Bar(bool b) const {
|
||||
char *ret = new char[2];
|
||||
strcpy(ret, b ? "1" : "0");
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ template SwigOperatorDefinitions() {
|
|||
|
||||
%rename(opCall) *::operator();
|
||||
|
||||
// !a is not overrideable in D1.
|
||||
// !a is not overridable in D1.
|
||||
%ignoreoperator(LNOT) operator!;
|
||||
|
||||
// opCmp is used in D.
|
||||
|
|
@ -71,7 +71,7 @@ template SwigOperatorDefinitions() {
|
|||
// a != b is rewritten as !a.opEquals(b) in D.
|
||||
%ignoreoperator(NOTEQUAL) operator!=;
|
||||
|
||||
// The logic operators are not overrideable in D.
|
||||
// The logic operators are not overridable in D.
|
||||
%ignoreoperator(LAND) operator&&;
|
||||
%ignoreoperator(LOR) operator||;
|
||||
|
||||
|
|
@ -198,7 +198,7 @@ mixin template SwigOperatorDefinitions() {
|
|||
// a != b is rewritten as !a.opEquals(b) in D.
|
||||
%ignoreoperator(NOTEQUAL) operator!=;
|
||||
|
||||
// The logic operators are not overrideable in D.
|
||||
// The logic operators are not overridable in D.
|
||||
%ignoreoperator(LAND) operator&&;
|
||||
%ignoreoperator(LOR) operator||;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ SWIG_AsCharPtrAndSize(SWIGV8_VALUE valRef, char** cptr, size_t* psize, int *allo
|
|||
%#endif
|
||||
|
||||
size_t len = SWIGV8_UTF8_LENGTH(js_str) + 1;
|
||||
char* cstr = new char[len];
|
||||
char* cstr = (char*) %new_array(len, char);
|
||||
SWIGV8_WRITE_UTF8(js_str, cstr, len);
|
||||
|
||||
if(alloc) *alloc = SWIG_NEWOBJ;
|
||||
|
|
|
|||
|
|
@ -39,12 +39,12 @@ $1 = ($type)lua_tonumber(L, $input);%}
|
|||
// SWIG assumes that this code will need a pointer to int to be passed in
|
||||
// (this might be ok for objects by const ref, but not for numeric primitives)
|
||||
// therefore we add a set of typemaps to fix this (for both in & out)
|
||||
%typemap(in,checkfn="lua_isnumber") const int&($basetype temp)
|
||||
%{ temp=($basetype)lua_tonumber(L,$input); $1=&temp;%}
|
||||
%typemap(in,checkfn="lua_isnumber") const int&($*1_ltype temp)
|
||||
%{ temp=($*1_ltype)lua_tonumber(L,$input); $1=&temp;%}
|
||||
|
||||
%typemap(in,checkfn="lua_isnumber") const unsigned int&($basetype temp)
|
||||
%typemap(in,checkfn="lua_isnumber") const unsigned int&($*1_ltype temp)
|
||||
%{SWIG_contract_assert((lua_tonumber(L,$input)>=0),"number must not be negative")
|
||||
temp=($basetype)lua_tonumber(L,$input); $1=&temp;%}
|
||||
temp=($*1_ltype)lua_tonumber(L,$input); $1=&temp;%}
|
||||
|
||||
%typemap(out) const int&, const unsigned int&
|
||||
%{ lua_pushnumber(L, (lua_Number) *$1); SWIG_arg++;%}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Defines the As/From conversors for double/float complex, you need to
|
||||
provide complex Type, the Name you want to use in the conversors,
|
||||
the complex Constructor method, and the Real and Imag complex
|
||||
accesor methods.
|
||||
accessor methods.
|
||||
|
||||
See the std_complex.i and ccomplex.i for concrete examples.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ AUTODOC(operator>, "Higher than comparison operator");
|
|||
AUTODOC(operator<<, "Left shifting or appending operator");
|
||||
AUTODOC(operator>>, "Right shifting operator or extracting operator");
|
||||
AUTODOC(operator+, "Add operator");
|
||||
AUTODOC(operator-, "Substraction operator");
|
||||
AUTODOC(operator-, "Subtraction operator");
|
||||
AUTODOC(operator+(), "Positive operator");
|
||||
AUTODOC(operator-(), "Negation operator");
|
||||
AUTODOC(operator&, "AND operator");
|
||||
|
|
@ -93,7 +93,7 @@ AUTODOC(__gt__, "Higher than comparison operator");
|
|||
AUTODOC(__lshift__, "Left shifting or appending operator");
|
||||
AUTODOC(__rshift__, "Right shifting operator or extracting operator");
|
||||
AUTODOC(__add___, "Add operator");
|
||||
AUTODOC(__sub__, "Substraction operator");
|
||||
AUTODOC(__sub__, "Subtraction operator");
|
||||
AUTODOC(__pos__, "Positive operator");
|
||||
AUTODOC(__neg__, "Negation operator");
|
||||
AUTODOC(__and__, "AND operator");
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ SWIG_Int_AsEnum(void *pvApiCtx, int iVar, int *enumValue, char *fname) {
|
|||
}
|
||||
|
||||
%fragment(SWIG_From_frag(Enum), "header", fragment="SWIG_Int_FromEnum") {
|
||||
%#define SWIG_From_Enum(scilabValue) SWIG_Int_FromEnum(pvApiCtx, SWIG_Scilab_GetOutputPosition(), scilabValue, SWIG_Scilab_GetFuncName())
|
||||
%#define SWIG_From_Enum(scilabValue) SWIG_Int_FromEnum(pvApiCtx, SWIG_Scilab_GetOutputPosition(), (int)scilabValue, SWIG_Scilab_GetFuncName())
|
||||
}
|
||||
%fragment("SWIG_Int_FromEnum", "header", fragment="SWIG_SciDouble_FromInt") {
|
||||
SWIGINTERN int
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ MacintoshInit()
|
|||
*
|
||||
* This procedure calls initialization routines require a Tcl
|
||||
* interp as an argument. This call effectively makes the passed
|
||||
* iterpreter the "main" interpreter for the application.
|
||||
* interpreter the "main" interpreter for the application.
|
||||
*
|
||||
* Results:
|
||||
* Returns TCL_OK if everything went fine. If it didn't the
|
||||
|
|
|
|||
|
|
@ -53,13 +53,13 @@ public:
|
|||
virtual ~DoxygenTranslator();
|
||||
|
||||
/*
|
||||
* Return the documentation for a given node formated for the correct
|
||||
* Return the documentation for a given node formatted for the correct
|
||||
* documentation system.
|
||||
*/
|
||||
String *getDocumentation(Node *node, const_String_or_char_ptr indentationString);
|
||||
|
||||
/*
|
||||
* Returns truem is the specified node has comment attached.
|
||||
* Returns true if the specified node has comment attached.
|
||||
*/
|
||||
bool hasDocumentation(Node *node);
|
||||
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ private:
|
|||
typedef std::map<std::string, std::pair<tagHandler, std::string> >TagHandlersMap;
|
||||
static TagHandlersMap tagHandlers;
|
||||
|
||||
// this contains the sections tittles, like 'Arguments:' or 'Notes:', that are printed only once
|
||||
// this contains the sections titles, like 'Arguments:' or 'Notes:', that are printed only once
|
||||
static std::map<std::string, std::string> sectionTitles;
|
||||
|
||||
// Helper functions for fillStaticTables(): make a new tag handler object.
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ public:
|
|||
String *name = Getattr(n, "name") ? Getattr(n, "name") : NewString("<unnamed>");
|
||||
Swig_warning(WARN_JAVA_NSPACE_WITHOUT_PACKAGE, Getfile(n), Getline(n),
|
||||
"The nspace feature is used on '%s' without -package. "
|
||||
"The generated code may not compile as Java does not support types declared in a named package accessing types declared in an unnamed package.\n", name);
|
||||
"The generated code may not compile as Java does not support types declared in a named package accessing types declared in an unnamed package.\n", SwigType_namestr(name));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1255,7 +1255,7 @@ int JSEmitter::emitFunctionDispatcher(Node *n, bool /*is_member */ ) {
|
|||
// Note: this dispatcher function gets called after the last overloaded function has been created.
|
||||
// At this time, n.wrap:name contains the name of the last wrapper function.
|
||||
// To get a valid function name for the dispatcher function we take the last wrapper name and
|
||||
// substract the extension "sym:overname",
|
||||
// subtract the extension "sym:overname",
|
||||
String *wrap_name = NewString(Getattr(n, "wrap:name"));
|
||||
String *overname = Getattr(n, "sym:overname");
|
||||
|
||||
|
|
|
|||
|
|
@ -632,7 +632,7 @@ String *Swig_cppconstructor_director_call(const_String_or_char_ptr name, ParmLis
|
|||
* If you define SWIG_FAST_REC_SEARCH, the method will set the found
|
||||
* 'attr' in the target class 'n'. If not, the method will set the
|
||||
* 'noattr' one. This prevents of having to navigate the entire
|
||||
* hierarchy tree everytime, so, it is an O(1) method... or something
|
||||
* hierarchy tree every time, so, it is an O(1) method... or something
|
||||
* like that. However, it populates all the parsed classes with the
|
||||
* 'attr' and/or 'noattr' attributes.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1541,7 +1541,7 @@ String *Swig_name_make(Node *n, String *prefix, const_String_or_char_ptr cname,
|
|||
if (n) {
|
||||
/* Parameter renaming is not fully implemented. Mainly because there is no C/C++ syntax to
|
||||
* for %rename to fully qualify a function's parameter name from outside the function. Hence it
|
||||
* is not possible to implemented targetted warning suppression on one parameter in one function. */
|
||||
* is not possible to implemented targeted warning suppression on one parameter in one function. */
|
||||
int suppress_parameter_rename_warning = Equal(nodeType(n), "parm");
|
||||
if (!suppress_parameter_rename_warning) {
|
||||
SWIG_WARN_NODE_BEGIN(n);
|
||||
|
|
|
|||
39
Tools/CI-linux-environment.sh
Normal file
39
Tools/CI-linux-environment.sh
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
# Expected to be called from elsewhere with same variables set as CI-linux-install.sh
|
||||
# e.g. RETRY=travis-retry SWIGLANG=python
|
||||
# Sets up environment for using various target languages
|
||||
# For Github Actions where the environment is not preserved between steps
|
||||
set -e # exit on failure (same as -o errexit)
|
||||
|
||||
case "$SWIGLANG" in
|
||||
"go")
|
||||
if [[ "$VER" ]]; then
|
||||
eval "$($HOME/bin/gimme ${VER}.x)"
|
||||
$HOME/bin/gimme --list
|
||||
fi
|
||||
;;
|
||||
"javascript")
|
||||
case "$ENGINE" in
|
||||
"node")
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
|
||||
nvm use ${VER}
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
;;
|
||||
"ruby")
|
||||
if ! command -v rvm; then
|
||||
set +x
|
||||
source $HOME/.rvm/scripts/rvm
|
||||
set -x
|
||||
fi
|
||||
;;
|
||||
"scilab")
|
||||
# Travis has the wrong version of Java pre-installed resulting in error using scilab:
|
||||
# /usr/bin/scilab-bin: error while loading shared libraries: libjava.so: cannot open shared object file: No such file or directory
|
||||
echo "JAVA_HOME was set to $JAVA_HOME"
|
||||
unset JAVA_HOME
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
# expected to be called from elsewhere with certain variables set
|
||||
# Expected to be called from elsewhere with certain variables set
|
||||
# e.g. RETRY=travis-retry SWIGLANG=python GCC=7
|
||||
set -e # exit on failure (same as -o errexit)
|
||||
|
||||
|
|
@ -7,6 +7,8 @@ if [[ -n "$GCC" ]]; then
|
|||
$RETRY sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
$RETRY sudo apt-get -qq update
|
||||
$RETRY sudo apt-get install -qq g++-$GCC
|
||||
else
|
||||
$RETRY sudo apt-get -qq update
|
||||
fi
|
||||
|
||||
$RETRY sudo apt-get -qq install libboost-dev libpcre3-dev
|
||||
|
|
@ -26,7 +28,11 @@ case "$SWIGLANG" in
|
|||
;;
|
||||
"go")
|
||||
if [[ "$VER" ]]; then
|
||||
eval "$(gimme ${VER}.x)"
|
||||
mkdir -p $HOME/bin
|
||||
curl -sL -o $HOME/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
|
||||
chmod +x $HOME/bin/gimme
|
||||
eval "$($HOME/bin/gimme ${VER}.x)"
|
||||
$HOME/bin/gimme --list
|
||||
fi
|
||||
;;
|
||||
"javascript")
|
||||
|
|
@ -34,7 +40,7 @@ case "$SWIGLANG" in
|
|||
"node")
|
||||
$RETRY wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.10/install.sh | bash
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
|
||||
$RETRY nvm install ${VER}
|
||||
nvm use ${VER}
|
||||
if [ "$VER" == "0.10" ] || [ "$VER" == "0.12" ] || [ "$VER" == "4" ] || [ "$VER" == "6" ] ; then
|
||||
|
|
@ -73,12 +79,16 @@ case "$SWIGLANG" in
|
|||
$RETRY sudo apt-get -qq install ocaml camlp4
|
||||
;;
|
||||
"octave")
|
||||
$RETRY sudo apt-get -qq update
|
||||
$RETRY sudo apt-get -qq install liboctave-dev
|
||||
;;
|
||||
"php")
|
||||
$RETRY sudo add-apt-repository -y ppa:ondrej/php
|
||||
$RETRY sudo apt-get -qq update
|
||||
$RETRY sudo apt-get -qq install php$VER-cli php$VER-dev
|
||||
if [[ "$VER" ]]; then
|
||||
$RETRY sudo apt-get -qq remove "php*-cli" "php*-dev" # Multiple versions are pre-installed
|
||||
$RETRY sudo add-apt-repository -y ppa:ondrej/php
|
||||
$RETRY sudo apt-get -qq update
|
||||
$RETRY sudo apt-get -qq install php$VER-cli php$VER-dev
|
||||
fi
|
||||
;;
|
||||
"python")
|
||||
pip install --user pycodestyle
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# Test for the Boost C++ libraries of a particular version (or newer)
|
||||
#
|
||||
# If no path to the installed boost library is given the macro searchs
|
||||
# If no path to the installed boost library is given the macro searches
|
||||
# under /usr, /usr/local, /opt and /opt/local and evaluates the
|
||||
# $BOOST_ROOT environment variable. Further documentation is available at
|
||||
# <http://randspringer.de/boost/index.html>.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Install Linux packages where the version has been overidden in .travis.yml
|
||||
# Install Linux packages where the version has been overridden in .travis.yml
|
||||
|
||||
lsb_release -a
|
||||
# find location of current script (only works in bash)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Install MacOS packages where the version has been overidden in .travis.yml
|
||||
# Install MacOS packages where the version has been overridden in .travis.yml
|
||||
|
||||
set -e # exit on failure (same as -o errexit)
|
||||
|
||||
|
|
|
|||
15
appveyor.yml
15
appveyor.yml
|
|
@ -2,6 +2,13 @@ platform:
|
|||
- x86
|
||||
- x64
|
||||
|
||||
skip_commits:
|
||||
files:
|
||||
- '.github/**'
|
||||
- 'CHANGES*'
|
||||
- 'Doc/**'
|
||||
- 'Tools/CI-*'
|
||||
|
||||
environment:
|
||||
global:
|
||||
MAKEJOBS: 2
|
||||
|
|
@ -45,6 +52,14 @@ matrix:
|
|||
- SWIGLANG: python
|
||||
OSVARIANT: cygwin
|
||||
|
||||
# Skip stale commits (pull requests only), see https://github.com/appveyor/ci/issues/38#issuecomment-70628826
|
||||
init:
|
||||
- ps: |
|
||||
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
|
||||
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
|
||||
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
|
||||
throw "There are newer queued builds for this pull request, failing early." }
|
||||
|
||||
install:
|
||||
- date /T & time /T
|
||||
- ps: >-
|
||||
|
|
|
|||
39
configure.ac
39
configure.ac
|
|
@ -146,14 +146,14 @@ then
|
|||
*-*-aix*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
|
||||
*-*-cygwin* | *-*-mingw*)
|
||||
if test "$GCC" = yes; then
|
||||
LDSHARED="$CC -shared"
|
||||
LDSHARED="\$(CC) -shared"
|
||||
else
|
||||
if test "cl" = $CC ; then
|
||||
# Microsoft Visual C++ (MSVC)
|
||||
LDSHARED="$CC -nologo -LD"
|
||||
LDSHARED="\$(CC) -nologo -LD"
|
||||
else
|
||||
# Unknown compiler try gcc approach
|
||||
LDSHARED="$CC -shared"
|
||||
LDSHARED="\$(CC) -shared"
|
||||
fi
|
||||
fi ;;
|
||||
*-*-irix5*) LDSHARED="ld -shared";;
|
||||
|
|
@ -165,25 +165,25 @@ then
|
|||
*-sequent-sysv4) LDSHARED="ld -G";;
|
||||
*-*-next*)
|
||||
if test "$ns_dyld"
|
||||
then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
|
||||
else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'
|
||||
then LDSHARED="\$(CC) \$(LDFLAGS) -bundle -prebind"
|
||||
else LDSHARED="\$(CC) \$(CFLAGS) -nostdlib -r"
|
||||
fi
|
||||
if test "$with_next_framework" ; then
|
||||
LDSHARED="$LDSHARED \$(LDLIBRARY)"
|
||||
fi ;;
|
||||
*-*-linux*) LDSHARED="$CC -shared";;
|
||||
*-*-linux*) LDSHARED="\$(CC) -shared";;
|
||||
*-*-dgux*) LDSHARED="ld -G";;
|
||||
*-*-freebsd3*) LDSHARED="$CC -shared";;
|
||||
*-*-freebsd3*) LDSHARED="\$(CC) -shared";;
|
||||
*-*-freebsd* | *-*-openbsd*) LDSHARED="ld -Bshareable";;
|
||||
*-*-netbsd*)
|
||||
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
|
||||
if [[ "`\$(CC) -dM -E - </dev/null | grep __ELF__`" != "" ]]
|
||||
then
|
||||
LDSHARED="$CC -shared"
|
||||
LDSHARED="\$(CC) -shared"
|
||||
else
|
||||
LDSHARED="ld -Bshareable"
|
||||
fi;;
|
||||
*-sco-sysv*) LDSHARED="$CC -G -KPIC -Ki486 -belf -Wl,-Bexport";;
|
||||
*-*-darwin*) LDSHARED="$CC -bundle -undefined suppress -flat_namespace";;
|
||||
*-sco-sysv*) LDSHARED="\$(CC) -G -KPIC -Ki486 -belf -Wl,-Bexport";;
|
||||
*-*-darwin*) LDSHARED="\$(CC) -bundle -undefined suppress -flat_namespace";;
|
||||
*) LDSHARED="ld";;
|
||||
esac
|
||||
fi
|
||||
|
|
@ -205,23 +205,23 @@ if test -z "$TRYLINKINGWITHCXX"
|
|||
then
|
||||
case $host in
|
||||
*-*-solaris*) if test "$GCC" = yes
|
||||
then TRYLINKINGWITHCXX="CXXSHARED= $CXX -Wl,-G"
|
||||
else TRYLINKINGWITHCXX="CXXSHARED= $CXX -G -L/opt/SUNWspro/lib -lCrun -lCstd"
|
||||
then TRYLINKINGWITHCXX="CXXSHARED= \$(CXX) -Wl,-G"
|
||||
else TRYLINKINGWITHCXX="CXXSHARED= \$(CXX) -G -L/opt/SUNWspro/lib -lCrun -lCstd"
|
||||
fi;;
|
||||
*-*-hp*) TRYLINKINGWITHCXX="CXXSHARED= $CXX +z ";;
|
||||
*-*-darwin*) TRYLINKINGWITHCXX="CXXSHARED= $CXX -bundle -undefined suppress -flat_namespace";;
|
||||
*-*-hp*) TRYLINKINGWITHCXX="CXXSHARED= \$(CXX) +z ";;
|
||||
*-*-darwin*) TRYLINKINGWITHCXX="CXXSHARED= \$(CXX) -bundle -undefined suppress -flat_namespace";;
|
||||
*-*-cygwin* | *-*-mingw*)
|
||||
if test "$GCC" = yes; then
|
||||
TRYLINKINGWITHCXX="CXXSHARED= $CXX -shared "
|
||||
TRYLINKINGWITHCXX="CXXSHARED= \$(CXX) -shared "
|
||||
else
|
||||
if test "cl" = $CXX ; then
|
||||
# Microsoft Visual C++ (MSVC)
|
||||
TRYLINKINGWITHCXX="CXXSHARED= $CXX -nologo -LD"
|
||||
TRYLINKINGWITHCXX="CXXSHARED= \$(CXX) -nologo -LD"
|
||||
else
|
||||
TRYLINKINGWITHCXX="#unknown Windows compiler"
|
||||
fi
|
||||
fi ;;
|
||||
*) TRYLINKINGWITHCXX="CXXSHARED= $CXX -shared ";;
|
||||
*) TRYLINKINGWITHCXX="CXXSHARED= \$(CXX) -shared ";;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($TRYLINKINGWITHCXX)
|
||||
|
|
@ -1251,6 +1251,9 @@ else
|
|||
if test $SCILAB_VERSION -ge 540; then
|
||||
SCILABOPT+=" -noatomsautoload"
|
||||
fi
|
||||
if test $SCILAB_VERSION -ge 600; then
|
||||
SCILABOPT+=" -quit"
|
||||
fi
|
||||
AC_MSG_RESULT($SCILABOPT)
|
||||
|
||||
# Check for Scilab header files
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue