Compare commits
105 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a7ed29ccd | ||
|
|
a0857c83c4 | ||
|
|
a9b3613e44 | ||
|
|
cb7776c1cb | ||
|
|
718b7ff929 | ||
|
|
0e90f4b564 | ||
|
|
4357e67f06 | ||
|
|
6dcc4f69ef | ||
|
|
1622f5a39c | ||
|
|
02bb8584e9 | ||
|
|
0654accb13 | ||
|
|
b3b44f89ef | ||
|
|
5fba979346 | ||
|
|
1fb4c0b04c | ||
|
|
90097c46c3 | ||
|
|
0a8c9594cf | ||
|
|
8345f2d85f | ||
|
|
beb035b65d | ||
|
|
6afee4d0a6 | ||
|
|
92858f09f8 | ||
|
|
4956e08f2e | ||
|
|
827339ce80 | ||
|
|
f469f50747 | ||
|
|
32bec895a1 | ||
|
|
df32d2f966 | ||
|
|
ec01e736af | ||
|
|
238ee10077 | ||
|
|
470ed23b98 | ||
|
|
a92164d627 | ||
|
|
e1ee3915bb | ||
|
|
333460aa93 | ||
|
|
c2011dbfef | ||
|
|
214c385876 | ||
|
|
95b744aafe | ||
|
|
3ba8508d21 | ||
|
|
53b90566fa | ||
|
|
4a231c2331 | ||
|
|
f8a818a08e | ||
|
|
9a1a04bb89 | ||
|
|
5cb1ffb0c3 | ||
|
|
25c1bd0cbd | ||
|
|
ef8bd91ac8 | ||
|
|
96f556756f | ||
|
|
ac6fbba57f | ||
|
|
4420173152 | ||
|
|
2c86c4e4e4 | ||
|
|
0335fad01d | ||
|
|
3dfee625b2 | ||
|
|
1eabb4023c | ||
|
|
e86c5b7566 | ||
|
|
a6ec57e2dd | ||
|
|
6697b0bf1f | ||
|
|
3f2f1419a2 | ||
|
|
ec8ac65ecd | ||
|
|
08931df148 | ||
|
|
99d2f50b13 | ||
|
|
1e22bb8bb0 | ||
|
|
4a212a344a | ||
|
|
b8edcafa95 | ||
|
|
f1bd71ad2b | ||
|
|
3bb01f5f63 | ||
|
|
418e9a73f3 | ||
|
|
c1f9ff00aa | ||
|
|
a3dffd8dd5 | ||
|
|
783da0a9d7 | ||
|
|
acef0daea1 | ||
|
|
639326a47b | ||
|
|
4dba55d5b7 | ||
|
|
047d713617 | ||
|
|
b3c6ede15c | ||
|
|
3100445250 | ||
|
|
d763fcf8d8 | ||
|
|
90ae1620dc | ||
|
|
6d512926a0 | ||
|
|
4d94ea705a | ||
|
|
b417a518c5 | ||
|
|
3677b7040d | ||
|
|
78bb78fa4e | ||
|
|
973fa07c99 | ||
|
|
6788b3fc6a | ||
|
|
aa5795945d | ||
|
|
c5eff7349b | ||
|
|
81360b55ad | ||
|
|
483fe570c5 | ||
|
|
fa8a6d071b | ||
|
|
466966b43a | ||
|
|
6c6c86dcfb | ||
|
|
42f1d0941d | ||
|
|
58ca20a4ba | ||
|
|
31af4d974c | ||
|
|
4740ddf9ae | ||
|
|
7589a3691c | ||
|
|
d2eb8c0f30 | ||
|
|
7283b290db | ||
|
|
112bf1c545 | ||
|
|
fc1534a821 | ||
|
|
cf9a7f8a83 | ||
|
|
1d3ed884cc | ||
|
|
38655cdcbf | ||
|
|
8237cf5dba | ||
|
|
d5745d1c9b | ||
|
|
6e2b9493f9 | ||
|
|
b34e88bda5 | ||
|
|
b48389be22 | ||
|
|
ef8405088b |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
40
.gitattributes
vendored
Normal file
40
.gitattributes
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
# Do not include CI/config metadata in source release tarballs
|
||||
.gitea/ export-ignore
|
||||
.github/ export-ignore
|
||||
.gitignore export-ignore
|
||||
.gitattributes export-ignore
|
||||
|
||||
# Do not include generated phpize/autotools build directories
|
||||
contrib/php/build/ export-ignore
|
||||
contrib/php/include/ export-ignore
|
||||
contrib/php/autom4te.cache/ export-ignore
|
||||
contrib/php/.deps/ export-ignore
|
||||
contrib/php/.libs/ export-ignore
|
||||
contrib/php/modules/ export-ignore
|
||||
contrib/php/libs/ export-ignore
|
||||
|
||||
# Do not include temporary/generated build files
|
||||
autom4te.cache/ export-ignore
|
||||
config.log export-ignore
|
||||
config.status export-ignore
|
||||
config.cache export-ignore
|
||||
Makefile export-ignore
|
||||
Make.rules export-ignore
|
||||
libtool export-ignore
|
||||
stamp-h1 export-ignore
|
||||
|
||||
# Do not include object/build artifacts
|
||||
*.o export-ignore
|
||||
*.do export-ignore
|
||||
*.to export-ignore
|
||||
*.lo export-ignore
|
||||
*.la export-ignore
|
||||
*.a export-ignore
|
||||
*.so export-ignore
|
||||
*.so.* export-ignore
|
||||
*.dep export-ignore
|
||||
*.gcno export-ignore
|
||||
*.gcda export-ignore
|
||||
*.orig export-ignore
|
||||
*.rej export-ignore
|
||||
*~ export-ignore
|
||||
348
.gitea/workflows/source-release.yml
Normal file
348
.gitea/workflows/source-release.yml
Normal file
@@ -0,0 +1,348 @@
|
||||
name: Source release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
source-package:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
GITEA_API: https://gitea.disconnected-by-peer.at/api/v1
|
||||
OWNER: mars_nwe
|
||||
REPO: ncpfs
|
||||
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
||||
|
||||
- name: Fetch tags explicitly
|
||||
run: |
|
||||
git fetch --force --tags
|
||||
echo "describe:"
|
||||
git describe --tags --long --match 'v*' --always || true
|
||||
echo "exact tag:"
|
||||
git describe --tags --exact-match || true
|
||||
echo "points-at-head:"
|
||||
git tag --points-at HEAD || true
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
autoconf \
|
||||
automake \
|
||||
autopoint \
|
||||
gettext \
|
||||
gettext-base \
|
||||
make \
|
||||
gcc \
|
||||
g++ \
|
||||
pkg-config \
|
||||
curl \
|
||||
jq \
|
||||
php-dev \
|
||||
php-cli \
|
||||
libpam0g-dev
|
||||
|
||||
- name: Determine version
|
||||
id: version
|
||||
env:
|
||||
REF_TYPE: ${{ gitea.ref_type || github.ref_type }}
|
||||
REF_NAME: ${{ gitea.ref_name || github.ref_name }}
|
||||
SHA: ${{ gitea.sha || github.sha }}
|
||||
run: |
|
||||
set -e
|
||||
|
||||
BASE_VERSION="$(sed -n 's/^AC_INIT(\[\[ncpfs\]\],\[\[\([^]]*\)\]\].*/\1/p' configure.ac)"
|
||||
|
||||
if [ -z "$BASE_VERSION" ]; then
|
||||
echo "Could not determine version from configure.ac"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$REF_TYPE" = "tag" ]; then
|
||||
VERSION="$BASE_VERSION"
|
||||
DISTFILE="ncpfs-${VERSION}.tar.gz"
|
||||
PREFIX="ncpfs-${VERSION}/"
|
||||
else
|
||||
DESCRIBE="$(git describe --tags --long --match 'v*' --always)"
|
||||
COUNT="$(printf '%s' "$DESCRIBE" | sed -nE 's/^v?[0-9][^-]*-([0-9]+)-g[0-9a-f]+$/\1/p')"
|
||||
GITID="$(printf '%s' "$DESCRIBE" | sed -nE 's/^v?[0-9][^-]*-[0-9]+-(g[0-9a-f]+)$/\1/p')"
|
||||
|
||||
if [ -z "$COUNT" ] || [ -z "$GITID" ]; then
|
||||
COUNT="$(git rev-list --count HEAD)"
|
||||
GITID="g$(printf '%s' "$SHA" | cut -c1-7)"
|
||||
fi
|
||||
|
||||
VERSION="${BASE_VERSION}-dev.${COUNT}-${GITID}"
|
||||
DISTFILE="ncpfs-${VERSION}.tar.gz"
|
||||
PREFIX="ncpfs-${VERSION}/"
|
||||
fi
|
||||
|
||||
echo "base_version=$BASE_VERSION" >> "$GITHUB_OUTPUT"
|
||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
echo "distfile=$DISTFILE" >> "$GITHUB_OUTPUT"
|
||||
echo "prefix=$PREFIX" >> "$GITHUB_OUTPUT"
|
||||
|
||||
echo "Base version: $BASE_VERSION"
|
||||
echo "Package version: $VERSION"
|
||||
echo "Distfile: $DISTFILE"
|
||||
echo "Prefix: $PREFIX"
|
||||
|
||||
- name: Regenerate configure files
|
||||
run: |
|
||||
set -e
|
||||
|
||||
aclocal
|
||||
autoheader
|
||||
autoconf
|
||||
|
||||
cd contrib/php
|
||||
rm -rf autom4te.cache
|
||||
rm -f configure config.h config.h.in config.log config.status config.cache Makefile Makevars libtool
|
||||
phpize
|
||||
cd ../..
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
set -e
|
||||
./configure --with-php-config="$(command -v php-config)"
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
set -e
|
||||
make
|
||||
|
||||
- name: Clean build artifacts
|
||||
run: |
|
||||
set -e
|
||||
|
||||
make clean || true
|
||||
|
||||
rm -rf \
|
||||
autom4te.cache \
|
||||
.libs \
|
||||
modules
|
||||
|
||||
rm -f \
|
||||
Makefile \
|
||||
Make.rules \
|
||||
config.log \
|
||||
config.status \
|
||||
config.cache \
|
||||
config.nice \
|
||||
libtool \
|
||||
stamp-h1
|
||||
|
||||
rm -rf \
|
||||
contrib/php/autom4te.cache \
|
||||
contrib/php/.deps \
|
||||
contrib/php/.libs \
|
||||
contrib/php/modules \
|
||||
contrib/php/libs
|
||||
|
||||
rm -f \
|
||||
contrib/php/Makefile \
|
||||
contrib/php/Makefile.fragments \
|
||||
contrib/php/Makefile.objects \
|
||||
contrib/php/Makevars \
|
||||
contrib/php/config.h \
|
||||
contrib/php/config.log \
|
||||
contrib/php/config.status \
|
||||
contrib/php/config.cache \
|
||||
contrib/php/config.nice \
|
||||
contrib/php/config_vars.mk \
|
||||
contrib/php/libs.mk \
|
||||
contrib/php/libtool \
|
||||
contrib/php/run-tests.php \
|
||||
contrib/php/*.lo \
|
||||
contrib/php/*.la \
|
||||
contrib/php/*.o \
|
||||
contrib/php/*.dep \
|
||||
contrib/php/*.slo
|
||||
|
||||
find . \
|
||||
\( -name '*.o' \
|
||||
-o -name '*.do' \
|
||||
-o -name '*.to' \
|
||||
-o -name '*.lo' \
|
||||
-o -name '*.la' \
|
||||
-o -name '*.a' \
|
||||
-o -name '*.so' \
|
||||
-o -name '*.so.*' \
|
||||
-o -name '*.dep' \
|
||||
-o -name '*.gcno' \
|
||||
-o -name '*.gcda' \
|
||||
-o -name '*.orig' \
|
||||
-o -name '*.rej' \
|
||||
-o -name '*~' \) \
|
||||
-delete
|
||||
|
||||
find man -name '*.gz' -delete 2>/dev/null || true
|
||||
find ipx-1.0 -name '*.gz' -delete 2>/dev/null || true
|
||||
|
||||
test -f lib/libncp.vers
|
||||
|
||||
- name: Build source tarball
|
||||
id: pkg
|
||||
run: |
|
||||
set -e
|
||||
|
||||
VERSION="${{ steps.version.outputs.version }}"
|
||||
DISTFILE="${{ steps.version.outputs.distfile }}"
|
||||
PREFIX="${{ steps.version.outputs.prefix }}"
|
||||
|
||||
git archive \
|
||||
--format=tar \
|
||||
--prefix="${PREFIX}" \
|
||||
HEAD | gzip -9 > "../${DISTFILE}"
|
||||
|
||||
FILE="$(realpath "../${DISTFILE}")"
|
||||
|
||||
test -s "$FILE"
|
||||
|
||||
echo "file=$FILE" >> "$GITHUB_OUTPUT"
|
||||
echo "name=$DISTFILE" >> "$GITHUB_OUTPUT"
|
||||
|
||||
echo "Created: $FILE"
|
||||
tar -tzf "$FILE" > tarball-list.txt
|
||||
sed -n '1,20p' tarball-list.txt
|
||||
|
||||
echo
|
||||
echo "Checking archive exclusions..."
|
||||
if grep -E '(^[^/]+/\.gitea/|^[^/]+/\.github/|^[^/]+/contrib/php/build/|^[^/]+/contrib/php/autom4te.cache/)' tarball-list.txt; then
|
||||
echo "Archive contains excluded CI/build paths"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Decide release target
|
||||
id: target
|
||||
env:
|
||||
REF_TYPE: ${{ gitea.ref_type || github.ref_type }}
|
||||
REF_NAME: ${{ gitea.ref_name || github.ref_name }}
|
||||
SHA: ${{ gitea.sha || github.sha }}
|
||||
run: |
|
||||
set -e
|
||||
|
||||
if [ "$REF_TYPE" = "tag" ]; then
|
||||
echo "tag=$REF_NAME" >> "$GITHUB_OUTPUT"
|
||||
echo "name=$REF_NAME" >> "$GITHUB_OUTPUT"
|
||||
echo "prerelease=false" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
SHORT_SHA="$(printf '%s' "$SHA" | cut -c1-7)"
|
||||
echo "tag=development" >> "$GITHUB_OUTPUT"
|
||||
echo "name=development ($REF_NAME @ $SHORT_SHA)" >> "$GITHUB_OUTPUT"
|
||||
echo "prerelease=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Create or update release
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
REL_TAG: ${{ steps.target.outputs.tag }}
|
||||
REL_NAME: ${{ steps.target.outputs.name }}
|
||||
REL_PRERELEASE: ${{ steps.target.outputs.prerelease }}
|
||||
run: |
|
||||
set -e
|
||||
|
||||
RELEASE_JSON="$(curl -fsS \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/tags/${REL_TAG}" || true)"
|
||||
|
||||
if [ -z "$RELEASE_JSON" ]; then
|
||||
RELEASE_JSON="$(curl -fsS -X POST \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
"${GITEA_API}/repos/${OWNER}/${REPO}/releases" \
|
||||
-d "$(jq -n \
|
||||
--arg tag "$REL_TAG" \
|
||||
--arg name "$REL_NAME" \
|
||||
--argjson prerelease "$REL_PRERELEASE" \
|
||||
'{tag_name:$tag,name:$name,draft:false,prerelease:$prerelease}')" )"
|
||||
else
|
||||
RELEASE_ID="$(printf '%s' "$RELEASE_JSON" | jq -r '.id')"
|
||||
RELEASE_JSON="$(curl -fsS -X PATCH \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}" \
|
||||
-d "$(jq -n \
|
||||
--arg tag "$REL_TAG" \
|
||||
--arg name "$REL_NAME" \
|
||||
--argjson prerelease "$REL_PRERELEASE" \
|
||||
'{tag_name:$tag,name:$name,draft:false,prerelease:$prerelease}')" )"
|
||||
fi
|
||||
|
||||
echo "$RELEASE_JSON" > release.json
|
||||
|
||||
- name: Delete old development assets
|
||||
if: ${{ steps.target.outputs.tag == 'development' }}
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
run: |
|
||||
set -e
|
||||
|
||||
RELEASE_ID="$(jq -r '.id' release.json)"
|
||||
|
||||
ASSET_IDS="$(curl -fsS \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}" \
|
||||
| jq -r '.assets[]? | .id')"
|
||||
|
||||
if [ -z "$ASSET_IDS" ]; then
|
||||
echo "No old development assets to delete."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for ASSET_ID in $ASSET_IDS; do
|
||||
echo "Deleting old development asset id=${ASSET_ID}"
|
||||
curl -fsS -X DELETE \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}/assets/${ASSET_ID}"
|
||||
done
|
||||
|
||||
- name: Delete old asset with same name if present
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
NAME: ${{ steps.pkg.outputs.name }}
|
||||
run: |
|
||||
set -e
|
||||
|
||||
RELEASE_ID="$(jq -r '.id' release.json)"
|
||||
|
||||
ASSET_ID="$(curl -fsS \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}" \
|
||||
| jq -r --arg NAME "$NAME" '.assets[]? | select(.name==$NAME) | .id' \
|
||||
| head -n1)"
|
||||
|
||||
if [ -n "$ASSET_ID" ]; then
|
||||
curl -fsS -X DELETE \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}/assets/${ASSET_ID}"
|
||||
fi
|
||||
|
||||
- name: Upload tarball to release
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
FILE: ${{ steps.pkg.outputs.file }}
|
||||
NAME: ${{ steps.pkg.outputs.name }}
|
||||
run: |
|
||||
set -e
|
||||
|
||||
RELEASE_ID="$(jq -r '.id' release.json)"
|
||||
|
||||
curl -fsS -X POST \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
--data-binary @"${FILE}" \
|
||||
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}/assets?name=${NAME}"
|
||||
|
||||
220
.gitignore
vendored
Normal file
220
.gitignore
vendored
Normal file
@@ -0,0 +1,220 @@
|
||||
# Object/build artifacts
|
||||
*.a
|
||||
*.d
|
||||
*.do
|
||||
*.la
|
||||
*.lo
|
||||
*.o
|
||||
*.so
|
||||
*.so.*
|
||||
*.slo
|
||||
*~
|
||||
*.orig
|
||||
*.rej
|
||||
|
||||
# Top-level configure/build outputs
|
||||
/Make.rules
|
||||
/Makefile
|
||||
/autom4te.cache/
|
||||
/config.log
|
||||
/config.status
|
||||
/config.cache
|
||||
/stamp-h1
|
||||
/libtool
|
||||
|
||||
# Generated config headers
|
||||
/include/config.h
|
||||
/include/ncp/ext/socket.h
|
||||
/include/ncp/ext/stdint.h
|
||||
/include/ncp/kernel/fs.h
|
||||
/include/ncp/kernel/if.h
|
||||
/include/ncp/kernel/ipx.h
|
||||
/include/ncp/kernel/route.h
|
||||
/include/ncp/kernel/types.h
|
||||
/include/ncp/nwnet.h
|
||||
|
||||
# intl / po generated files
|
||||
/intl/Makefile
|
||||
/po/Makefile
|
||||
/po/Makefile.in
|
||||
/po/POTFILES
|
||||
|
||||
# Library outputs
|
||||
/lib/Makefile
|
||||
/lib/libncp.so.*
|
||||
|
||||
# manpage outputs
|
||||
/man/*.gz
|
||||
/man/Makefile
|
||||
|
||||
# ipx generated files
|
||||
/ipx-1.0/*.gz
|
||||
/ipx-1.0/Makefile
|
||||
/ipx-1.0/Samples/Makefile
|
||||
/ipx-1.0/Samples/ipxrcv
|
||||
/ipx-1.0/Samples/ipxsend
|
||||
/ipx-1.0/Samples/rip
|
||||
/ipx-1.0/Samples/sap
|
||||
/ipx-1.0/ipx_cmd
|
||||
/ipx-1.0/ipx_configure
|
||||
/ipx-1.0/ipx_interface
|
||||
/ipx-1.0/ipx_internal_net
|
||||
/ipx-1.0/ipx_route
|
||||
/ipxdump/Makefile
|
||||
|
||||
# sutil binaries
|
||||
/sutil/Makefile
|
||||
/sutil/ncplogin
|
||||
/sutil/ncpmap
|
||||
/sutil/ncpmount
|
||||
/sutil/ncpumount
|
||||
/sutil/nwsfind
|
||||
|
||||
# util binaries
|
||||
/util/Makefile
|
||||
/util/ncopy
|
||||
/util/ncptest
|
||||
/util/nprint
|
||||
/util/nsend
|
||||
/util/nwauth
|
||||
/util/nwbocreate
|
||||
/util/nwbols
|
||||
/util/nwboprops
|
||||
/util/nwborm
|
||||
/util/nwbpadd
|
||||
/util/nwbpcreate
|
||||
/util/nwbprm
|
||||
/util/nwbpset
|
||||
/util/nwbpvalues
|
||||
/util/nwdir
|
||||
/util/nwdpvalues
|
||||
/util/nwfsctrl
|
||||
/util/nwfsinfo
|
||||
/util/nwfstime
|
||||
/util/nwgrant
|
||||
/util/nwlistsalvage
|
||||
/util/nwmsg
|
||||
/util/nwpasswd
|
||||
/util/nwpjmv
|
||||
/util/nwpqjob
|
||||
/util/nwpurge
|
||||
/util/nwrevoke
|
||||
/util/nwrights
|
||||
/util/nwsalvage
|
||||
/util/nwtrustee
|
||||
/util/nwtrustee2
|
||||
/util/nwuserlist
|
||||
/util/nwvolinfo
|
||||
/util/pqlist
|
||||
/util/pqstat
|
||||
/util/pserver
|
||||
/util/slist
|
||||
|
||||
# contrib generated files
|
||||
/contrib/ncp_nss_lib/libnss_ncp.so.*
|
||||
/contrib/ncp_nss_lib/test_ncp_nss
|
||||
|
||||
/contrib/pam/Makefile
|
||||
|
||||
/contrib/php/Makefile
|
||||
/contrib/php/.deps/
|
||||
/contrib/php/.libs/
|
||||
/contrib/php/config.h
|
||||
/contrib/php/config.log
|
||||
/contrib/php/config.nice
|
||||
/contrib/php/config.status
|
||||
/contrib/php/config.cache
|
||||
/contrib/php/config_vars.mk
|
||||
/contrib/php/libs.mk
|
||||
/contrib/php/php_auth_nds.slo
|
||||
/contrib/php/modules/
|
||||
/contrib/php/libs/
|
||||
/contrib/php/libtool
|
||||
/contrib/php/Makevars
|
||||
/contrib/php/run-tests.php
|
||||
|
||||
/contrib/tcl-utils/Makefile
|
||||
/contrib/tknwmsg/Makefile
|
||||
/contrib/tests/Makefile
|
||||
|
||||
# contrib testing binaries
|
||||
/contrib/testing/Makefile
|
||||
/contrib/testing/abbrev
|
||||
/contrib/testing/canon
|
||||
/contrib/testing/chgpwd
|
||||
/contrib/testing/cmpattr
|
||||
/contrib/testing/copyauth
|
||||
/contrib/testing/dirlimit
|
||||
/contrib/testing/dirlist2
|
||||
/contrib/testing/dssearch
|
||||
/contrib/testing/dsstream
|
||||
/contrib/testing/eaops
|
||||
/contrib/testing/effright
|
||||
/contrib/testing/fileinfo
|
||||
/contrib/testing/large
|
||||
/contrib/testing/lic
|
||||
/contrib/testing/mkattr
|
||||
/contrib/testing/mkclass
|
||||
/contrib/testing/mkfile
|
||||
/contrib/testing/mkobj
|
||||
/contrib/testing/modclass
|
||||
/contrib/testing/modobj
|
||||
/contrib/testing/mvobj
|
||||
/contrib/testing/nfssetinfo
|
||||
/contrib/testing/nsfileinfo
|
||||
/contrib/testing/nwbcast
|
||||
/contrib/testing/nwdsgethost
|
||||
/contrib/testing/nwdsgetstat
|
||||
/contrib/testing/nwdsgetvi
|
||||
/contrib/testing/nwdslist
|
||||
/contrib/testing/nwdspartjoin
|
||||
/contrib/testing/nwdspartlist
|
||||
/contrib/testing/nwdspartrm
|
||||
/contrib/testing/nwdspartsplit
|
||||
/contrib/testing/nwdsresetstat
|
||||
/contrib/testing/nwgettime
|
||||
/contrib/testing/partroot
|
||||
/contrib/testing/physlock
|
||||
/contrib/testing/readaddr
|
||||
/contrib/testing/readadef
|
||||
/contrib/testing/readattr
|
||||
/contrib/testing/readcc
|
||||
/contrib/testing/readcls
|
||||
/contrib/testing/readsynt
|
||||
/contrib/testing/reloadds
|
||||
/contrib/testing/renobj
|
||||
/contrib/testing/replops
|
||||
/contrib/testing/resint
|
||||
/contrib/testing/resolve
|
||||
/contrib/testing/rmattr
|
||||
/contrib/testing/rmclass
|
||||
/contrib/testing/rmobj
|
||||
/contrib/testing/schsync
|
||||
/contrib/testing/semaphore
|
||||
/contrib/testing/setkeys
|
||||
/contrib/testing/time
|
||||
/contrib/testing/timegv
|
||||
/contrib/testing/timeinfo
|
||||
/contrib/testing/verpwd
|
||||
/contrib/testing/verunix
|
||||
/contrib/testing/vollist
|
||||
/contrib/testing/wcsmbs-tst1
|
||||
|
||||
# contrib testing/pp binaries
|
||||
/contrib/testing/pp/Makefile
|
||||
/contrib/testing/pp/bcastmd
|
||||
/contrib/testing/pp/getconn_addr
|
||||
/contrib/testing/pp/getsynt
|
||||
/contrib/testing/pp/nwc_next_object
|
||||
/contrib/testing/pp/nwgetconnlist
|
||||
/contrib/testing/pp/nwwhoami
|
||||
/contrib/testing/pp/open_conn_by_name
|
||||
/contrib/testing/pp/readsdef
|
||||
/contrib/testing/pp/readsynt
|
||||
/contrib/testing/pp/return_block_of_tree
|
||||
/contrib/testing/pp/scantree
|
||||
/contrib/testing/pp/scanvolr
|
||||
/contrib/testing/pp/semaphor
|
||||
/contrib/testing/pp/treelist
|
||||
/contrib/testing/pp/vlist
|
||||
/contrib/testing/pp/volres
|
||||
211
Changes
211
Changes
@@ -1,3 +1,214 @@
|
||||
ChangeSet@1.306, 2005-01-27 18:25:25+01:00
|
||||
Fix CAN-2005-0013 and CAN-2005-0014.
|
||||
|
||||
Fix CAN-2005-0013: Run with euid == uid for most of time, and switch
|
||||
to euid == 0 only when really needed.
|
||||
|
||||
And although previous change decreases impact of CAN-2005-0014, let's
|
||||
fix random small static character arrays too.
|
||||
|
||||
And when modprobe is spawned (on 2.0.x kernel), start it with empty
|
||||
environment.
|
||||
|
||||
ChangeSet@1.305, 2005-01-27 18:16:38+01:00
|
||||
Move nds_login_auth prototype where it belongs.
|
||||
|
||||
ChangeSet@1.304, 2005-01-13 23:35:33+01:00
|
||||
Kill strcpy_cw function, it has no right to survive.
|
||||
|
||||
ChangeSet@1.303, 2005-01-13 21:54:08+01:00
|
||||
Obviously when I added nds_login_auth() to nwnet.h header, I should
|
||||
have removed it from "obsolete" headers...
|
||||
|
||||
ChangeSet@1.302, 2005-01-13 20:57:58+01:00
|
||||
Well, I hoped that nds_login_auth will die before it will become part
|
||||
of API, but as I did not get to write NWDSLogin()-like function for
|
||||
about 5 years, it is probably time to finally accept this patch.
|
||||
|
||||
Add nds_login_auth to ncpfs headers.
|
||||
|
||||
From Novell/SUSE via Olaf Hering.
|
||||
|
||||
ChangeSet@1.301, 2005-01-13 20:56:22+01:00
|
||||
Add missing <string.h> includes here and there.
|
||||
|
||||
From Novell/SUSE via Olaf Hering.
|
||||
|
||||
ChangeSet@1.300, 2005-01-13 20:55:36+01:00
|
||||
Create ${DESTDIR}/sbin directory when it does not exist, instead of
|
||||
failing install.
|
||||
|
||||
From Novell/SUSE via Olaf Hering.
|
||||
|
||||
ChangeSet@1.299, 2005-01-13 20:54:42+01:00
|
||||
Disable unused function in pam_ncp_auth.
|
||||
|
||||
From Novell/SUSE via Olaf Hering.
|
||||
|
||||
ChangeSet@1.298, 2005-01-13 20:46:55+01:00
|
||||
Regenerate .gmos.
|
||||
|
||||
ChangeSet@1.297, 2005-01-13 20:45:55+01:00
|
||||
Add couple of new translations, update existing ones, and switch
|
||||
everything to UTF8. Hopefully older gettexts will not break.
|
||||
|
||||
From Novell/SUSE via Olaf Hering.
|
||||
|
||||
ChangeSet@1.296, 2004-11-30 16:51:35+01:00
|
||||
Update version to 2.2.5 and regenerate autoconf things.
|
||||
TAG: ncpfs-2.2.5
|
||||
|
||||
ChangeSet@1.295, 2004-11-30 16:43:28+01:00
|
||||
Oops, this should have been checked before NWDSCreateContextHandleMnt
|
||||
changes.
|
||||
|
||||
ChangeSet@1.294, 2004-11-30 16:42:25+01:00
|
||||
Fix bad buffer overflow in NWDSCreateContextHandleMnt. Plus fix
|
||||
bogus interpretation of treeName. And split
|
||||
NWDSCreateContextHandleMnt into two functions, anything taking string
|
||||
as argument must take context, as string's encoding is defined by
|
||||
context settings...
|
||||
|
||||
ChangeSet@1.293, 2004-11-30 16:40:03+01:00
|
||||
NCP extensions support. First version.
|
||||
|
||||
ChangeSet@1.292, 2004-11-30 16:39:01+01:00
|
||||
Use 'GetNearestServer' while looking for connection for bindery resolver.
|
||||
|
||||
ChangeSet@1.291, 2004-06-07 20:11:24+02:00
|
||||
Correct ncpmount manpage: both ncp and ncpfs are allowed filesystem types.
|
||||
|
||||
ChangeSet@1.290, 2004-05-30 00:05:33+02:00
|
||||
Fix php_auth_nds build.
|
||||
|
||||
ChangeSet@1.289, 2004-05-30 00:04:58+02:00
|
||||
Regenerate autotools files.
|
||||
|
||||
ChangeSet@1.288, 2004-05-30 00:03:04+02:00
|
||||
Make code compatible with gcc-3.4 (mainly lvalue casts).
|
||||
Get rid of all warnings messages.
|
||||
|
||||
ChangeSet@1.287, 2004-05-29 19:38:43+02:00
|
||||
Update PHP module with Patrick's changes.
|
||||
|
||||
ChangeSet@1.286, 2004-05-29 19:37:36+02:00
|
||||
Update PAM module with about two years old changes from Patrick. Sorry
|
||||
for the delay.
|
||||
|
||||
ChangeSet@1.285, 2004-03-15 15:53:18+01:00
|
||||
Replace tabs with spaces in printed out messages in readattr.
|
||||
Properly parse NWDSRead output when request type 4 is specified in readattr.
|
||||
|
||||
ChangeSet@1.284, 2004-03-15 10:32:26+00:00, aia21@cantab.net
|
||||
Apply patch (originally written by Ben Harris <bjh21@cam.ac.uk>) to
|
||||
contrib/testing/readattr.c implementing the -n option to only print
|
||||
the attribute value to stdout and improving the output formatting of
|
||||
various things.
|
||||
|
||||
ChangeSet@1.283, 2004-02-10 19:27:19+01:00
|
||||
ncpfs-2.2.4
|
||||
TAG: ncpfs-2.2.4
|
||||
|
||||
ChangeSet@1.282, 2004-02-10 19:15:10+01:00
|
||||
Fix ncp_path_to_NW_format for some boundary cases.
|
||||
TAG: ncpfs-2.2.4
|
||||
|
||||
ChangeSet@1.281, 2004-02-10 19:13:01+01:00
|
||||
Force nodev & nosuid when non-root mounts filesystem.
|
||||
|
||||
ChangeSet@1.280, 2004-02-02 01:19:30+01:00
|
||||
Fix out-of-array indexing. RedHat bug 110897.
|
||||
|
||||
ChangeSet@1.279, 2003-12-19 16:10:14+01:00
|
||||
Missed this one in last checkin.
|
||||
|
||||
ChangeSet@1.278, 2003-12-19 16:03:50+01:00
|
||||
Rerun autoconf & phpize.
|
||||
|
||||
Fixes autoconf 2.5 vs. 2.13 mismatch between main configure and
|
||||
code in contrib/php discovered by Robin Cook.
|
||||
|
||||
ChangeSet@1.277, 2003-12-10 12:21:04+01:00, esr@thyrsus.com
|
||||
There was an unbalanced option group in nwpasswd synopsis.
|
||||
|
||||
ChangeSet@1.276, 2003-07-20 01:52:32+02:00, vana@evon.vc.cvut.cz
|
||||
Update perl interface for swig-1.3.20.
|
||||
|
||||
ChangeSet@1.275, 2003-07-20 01:17:52+02:00, vana@evon.vc.cvut.cz
|
||||
Move perl interface from contrib/swig to contrib/perl/ncpfs. MakeMaker
|
||||
requires directory name identical to .pm.
|
||||
|
||||
ChangeSet@1.274, 2003-07-17 00:29:26+02:00
|
||||
Updated autoconf to the latest code.
|
||||
|
||||
ChangeSet@1.273, 2003-07-17 00:27:41+02:00
|
||||
Rename pqrm to nwpqjob, and add support for resuming held print jobs (resuming code
|
||||
was contributed by Zdenek Roub).
|
||||
|
||||
ChangeSet@1.272, 2003-07-17 00:23:39+02:00, zroub@spss.zcu.cz
|
||||
Add NWChangeQueueJobEntry to the library.
|
||||
|
||||
ChangeSet@1.271, 2003-07-16 23:08:22+02:00, stk@ahs.hist.no
|
||||
NWDSReadAttrDef request buffers should be filled with NWDSPutAttrName, not with
|
||||
NWDSPutClassItem.
|
||||
|
||||
ChangeSet@1.270, 2003-06-27 21:32:14+02:00
|
||||
Disable logging questions.
|
||||
Set default behavior for checkins to do get on modified files automatically.
|
||||
|
||||
ChangeSet@1.269, 2003-06-27 21:26:25+02:00
|
||||
Add support for generating slackware src packages.
|
||||
|
||||
ChangeSet@1.268, 2003-06-14 22:37:35+02:00
|
||||
Wait until ncpd exits when closing NCP connection. Otherwise ncpd can still run while
|
||||
we are trying to open new connection (which fails due to local address still in use).
|
||||
|
||||
ChangeSet@1.267, 2003-06-14 17:05:13+02:00
|
||||
Add '-a /auth/src' option to the ncpmount.
|
||||
Originally by Petr Janecek <janecek@ucw.cz>.
|
||||
|
||||
ChangeSet@1.266, 2003-06-14 14:59:50+02:00
|
||||
Fix syslog format string in nwpjmv.
|
||||
|
||||
ChangeSet@1.265, 2003-06-14 14:58:49+02:00
|
||||
Fix changelog entry format for last commit.
|
||||
|
||||
ChangeSet@1.264, 2003-06-14 14:55:04+02:00, patrick.pollet@cipcinsa.insa-lyon.fr
|
||||
Allow '-S /mount/point' in all utilities.
|
||||
|
||||
ChangeSet@1.263, 2003-04-23 22:18:08+02:00
|
||||
Add error code to the nprint error messages.
|
||||
|
||||
ChangeSet@1.262, 2003-04-23 22:12:10+02:00
|
||||
Fix nprint on big endian machines. Reported by Quinten Steenhuis.
|
||||
|
||||
ChangeSet@1.261, 2003-04-06 04:11:43+02:00
|
||||
ignore:
|
||||
added man/nwpjmv.1.gz util/nwpjmv
|
||||
|
||||
ChangeSet@1.260, 2003-04-06 04:09:49+02:00
|
||||
Use closing of pipe instead of sending signal for signalling watchdog process.
|
||||
Caller can do set*euid() between ncp_open() and ncp_close(), and it can happen
|
||||
that caller at ncp_close() time has no rights to send signals to process created
|
||||
at ncp_open() time :-(
|
||||
|
||||
Use doublefork for watchdog process so caller does not see this child...
|
||||
|
||||
ChangeSet@1.259, 2003-03-31 21:50:14+02:00
|
||||
Switch pqstat to getopt() parser.
|
||||
|
||||
ChangeSet@1.258, 2003-03-31 21:35:04+02:00
|
||||
Add version to the ncp_change_job_position symbol.
|
||||
|
||||
ChangeSet@1.257, 2003-03-31 21:33:56+02:00
|
||||
Add -B option to pqstat.
|
||||
|
||||
ChangeSet@1.256, 2003-03-31 21:20:58+02:00
|
||||
Add nwpjmv tool & ncp_change_job_position function. From Bruno Browning.
|
||||
|
||||
ChangeSet@1.255, 2003-03-31 21:11:39+02:00
|
||||
ncpfs 2.2.3 changelog
|
||||
|
||||
ChangeSet@1.254, 2003-03-13 15:54:06+01:00
|
||||
ncpfs-2.2.3
|
||||
TAG: ncpfs-2.2.3
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
INSTALL := @INSTALL@
|
||||
INSTALL_DATA := @INSTALL_DATA@
|
||||
CC := @CC@
|
||||
RANLIB := @RANLIB@
|
||||
|
||||
prefix := @prefix@
|
||||
exec_prefix := @exec_prefix@
|
||||
@@ -37,16 +38,32 @@ endif
|
||||
|
||||
INCLUDES := -I$(top_srcdir)/include -I$(top_srcdir)/intl -I$(top_builddir)/include
|
||||
|
||||
# Default hardening flags. They are intentionally overridable so that
|
||||
# distro/package builds can provide their own policy, for example:
|
||||
# make HARDEN_CFLAGS= HARDEN_LDFLAGS=
|
||||
HARDEN_CPPFLAGS ?=
|
||||
HARDEN_CFLAGS ?= -O2 -fstack-protector-strong -fstack-clash-protection -D_FORTIFY_SOURCE=3
|
||||
HARDEN_LDFLAGS ?= -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack
|
||||
|
||||
PIE_CFLAGS ?= -fPIE
|
||||
PIE_LDFLAGS ?= -pie
|
||||
|
||||
CFLAGS_OPTIONS += $(HARDEN_CPPFLAGS) $(HARDEN_CFLAGS)
|
||||
CFLAGS_OPTIONS += @CFLAGS@
|
||||
CFLAGS_OPTIONS += $(CWARN)
|
||||
CFLAGS_DEFINES := -DN_PLAT_LINUX -DLOCALEDIR=\"${localedir}\" -DNCPFS_VERSION=\"${VERSION}\" -DNCPFS_PACKAGE=\"${PACKAGE}\"
|
||||
|
||||
CCFLAGS := $(CFLAGS_DEFINES) $(CFLAGS_OPTIONS) $(INCLUDES)
|
||||
LDFLAGS := $(HARDEN_LDFLAGS) @LDFLAGS@
|
||||
|
||||
# If your system is ELF, either also do a 'make install', or append the util/
|
||||
# directory where the dynamic library resides to the environment
|
||||
# variable LD_LIBRARY_PATH
|
||||
HAVE_ELF := @ELF_TARGET@
|
||||
BUILD_SHARED := @BUILD_SHARED@
|
||||
|
||||
libext := @libext@
|
||||
shlibext := @shlibext@
|
||||
|
||||
VERSION_SOLIB := 2.3.0
|
||||
VERSION_SONAME := 2.3
|
||||
|
||||
28
Makefile.in
28
Makefile.in
@@ -11,19 +11,19 @@ include ${top_builddir}/Make.rules
|
||||
.PHONY : tags TAGS clean_me dist tgz
|
||||
|
||||
BASE_SUBDIRS := lib sutil util man @ADDON_SUBDIRS@
|
||||
EXECSUBDIRS = intl @POSUB@ $(BASE_SUBDIRS)
|
||||
EXECSUBDIRS = @INTLSUB@ @POSUB@ $(BASE_SUBDIRS)
|
||||
SUBDIRS := $(EXECSUBDIRS)
|
||||
INSTALL_SUBDIRS := $(SUBDIRS)
|
||||
INSTALL_DEV_SUBDIRS := lib sutil util man @ADDON_DEV_SUBDIRS@
|
||||
CLEAN_SUBDIRS := lib sutil util man intl @POSUB@ ipxdump ipx-1.0 ipx-1.0/Samples contrib/testing \
|
||||
CLEAN_SUBDIRS := lib sutil util man @INTLSUB@ @POSUB@ ipxdump ipx-1.0 ipx-1.0/Samples contrib/testing \
|
||||
contrib/testing/pp contrib/tests contrib/libtrace contrib/nss64 \
|
||||
contrib/tcl-utils contrib/php contrib/pam
|
||||
|
||||
export INCLUDES VERSION HAVE_ELF CFLAGS
|
||||
export INCLUDES VERSION BUILD_SHARED CFLAGS
|
||||
|
||||
all:
|
||||
set -e; for i in $(EXECSUBDIRS); do make -C $$i all; done
|
||||
@if [ "$(HAVE_ELF)" = yes ] ;\
|
||||
@if [ "$(BUILD_SHARED)" = yes ] ;\
|
||||
then \
|
||||
echo ; echo ; echo ;\
|
||||
echo Please add \'`pwd`/lib\' to the environment ; \
|
||||
@@ -71,6 +71,7 @@ distclean:
|
||||
rm -f intl/Makefile po/Makefile po/Makefile.in
|
||||
rm -f lib/Makefile man/Makefile sutil/Makefile util/Makefile
|
||||
rm -f include/config.h
|
||||
rm -f include/private/libncp-atomic.h
|
||||
rm -f include/ncp/ext/socket.h include/ncp/ext/stdint.h
|
||||
rm -f include/ncp/kernel/fs.h
|
||||
rm -f include/ncp/kernel/if.h include/ncp/kernel/route.h include/ncp/kernel/types.h
|
||||
@@ -82,17 +83,20 @@ distclean:
|
||||
|
||||
SRCPATH=$(shell pwd)
|
||||
SRCDIR=$(shell basename $(SRCPATH))
|
||||
DISTFILE=$(SRCDIR).tgz
|
||||
DISTFILE=ncpfs-$(VERSION).tar.gz
|
||||
|
||||
dist: tgz
|
||||
make dep
|
||||
make all
|
||||
|
||||
tgz:
|
||||
indent -kr -i8 `find . -name '*.[ch]'`
|
||||
make mrproper
|
||||
(cd ..; \
|
||||
tar cvf - $(SRCDIR) | \
|
||||
gzip -9 > $(DISTFILE); \
|
||||
mv $(DISTFILE) $(SRCDIR))
|
||||
tgz:
|
||||
if [ -d .git ]; then \
|
||||
git archive --format=tar --prefix=ncpfs-$(VERSION)/ HEAD | gzip -9 > ../$(DISTFILE); \
|
||||
else \
|
||||
make distclean; \
|
||||
(cd ..; tar --exclude='.git' -cvf - $(SRCDIR) | gzip -9 > $(DISTFILE)); \
|
||||
fi
|
||||
|
||||
slackware:
|
||||
make -C contrib/slackware slackware
|
||||
make tgz
|
||||
|
||||
4041
aclocal.m4
vendored
4041
aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
172
cleanup-release.sh
Executable file
172
cleanup-release.sh
Executable file
@@ -0,0 +1,172 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
echo "Cleaning top-level generated build outputs..."
|
||||
|
||||
rm -rf \
|
||||
autom4te.cache \
|
||||
.libs \
|
||||
modules
|
||||
|
||||
rm -f \
|
||||
Makefile \
|
||||
Make.rules \
|
||||
config.log \
|
||||
config.status \
|
||||
config.cache \
|
||||
config.nice \
|
||||
libtool \
|
||||
stamp-h1
|
||||
|
||||
echo "Cleaning generated subdir Makefiles..."
|
||||
|
||||
rm -f \
|
||||
lib/Makefile \
|
||||
man/Makefile \
|
||||
util/Makefile \
|
||||
sutil/Makefile \
|
||||
ipxdump/Makefile \
|
||||
ipx-1.0/Makefile \
|
||||
ipx-1.0/Samples/Makefile \
|
||||
contrib/pam/Makefile \
|
||||
contrib/tcl-utils/Makefile \
|
||||
contrib/tknwmsg/Makefile \
|
||||
contrib/tests/Makefile \
|
||||
contrib/testing/Makefile \
|
||||
contrib/testing/pp/Makefile \
|
||||
intl/Makefile \
|
||||
po/Makefile \
|
||||
po/Makefile.in \
|
||||
po/POTFILES
|
||||
|
||||
echo "Cleaning PHP phpize build outputs, keeping contrib/php/configure..."
|
||||
|
||||
rm -rf \
|
||||
contrib/php/autom4te.cache \
|
||||
contrib/php/.deps \
|
||||
contrib/php/.libs \
|
||||
contrib/php/modules \
|
||||
contrib/php/libs
|
||||
|
||||
rm -f \
|
||||
contrib/php/Makefile \
|
||||
contrib/php/Makefile.fragments \
|
||||
contrib/php/Makefile.objects \
|
||||
contrib/php/Makevars \
|
||||
contrib/php/config.h \
|
||||
contrib/php/config.log \
|
||||
contrib/php/config.status \
|
||||
contrib/php/config.cache \
|
||||
contrib/php/config.nice \
|
||||
contrib/php/config_vars.mk \
|
||||
contrib/php/libs.mk \
|
||||
contrib/php/libtool \
|
||||
contrib/php/run-tests.php \
|
||||
contrib/php/*.lo \
|
||||
contrib/php/*.la \
|
||||
contrib/php/*.o \
|
||||
contrib/php/*.dep \
|
||||
contrib/php/*.slo
|
||||
|
||||
echo "Cleaning object files, binaries, generated manpages, backups..."
|
||||
|
||||
find . \
|
||||
\( -name '*.o' \
|
||||
-o -name '*.do' \
|
||||
-o -name '*.to' \
|
||||
-o -name '*.lo' \
|
||||
-o -name '*.la' \
|
||||
-o -name '*.a' \
|
||||
-o -name '*.so' \
|
||||
-o -name '*.so.*' \
|
||||
-o -name '*.dep' \
|
||||
-o -name '*.gcno' \
|
||||
-o -name '*.gcda' \
|
||||
-o -name '*.orig' \
|
||||
-o -name '*.rej' \
|
||||
-o -name '*~' \) \
|
||||
-delete
|
||||
|
||||
find man -name '*.gz' -delete 2>/dev/null || true
|
||||
find ipx-1.0 -name '*.gz' -delete 2>/dev/null || true
|
||||
|
||||
echo "Cleaning known built binaries..."
|
||||
|
||||
rm -f \
|
||||
sutil/ncplogin \
|
||||
sutil/ncpmap \
|
||||
sutil/ncpmount \
|
||||
sutil/ncpumount \
|
||||
sutil/nwsfind
|
||||
|
||||
rm -f \
|
||||
util/ncopy \
|
||||
util/ncptest \
|
||||
util/nprint \
|
||||
util/nsend \
|
||||
util/nwauth \
|
||||
util/nwbocreate \
|
||||
util/nwbols \
|
||||
util/nwboprops \
|
||||
util/nwborm \
|
||||
util/nwbpadd \
|
||||
util/nwbpcreate \
|
||||
util/nwbprm \
|
||||
util/nwbpset \
|
||||
util/nwbpvalues \
|
||||
util/nwdir \
|
||||
util/nwdpvalues \
|
||||
util/nwfsctrl \
|
||||
util/nwfsinfo \
|
||||
util/nwfstime \
|
||||
util/nwgrant \
|
||||
util/nwlistsalvage \
|
||||
util/nwmsg \
|
||||
util/nwpasswd \
|
||||
util/nwpjmv \
|
||||
util/nwpqjob \
|
||||
util/nwpurge \
|
||||
util/nwrevoke \
|
||||
util/nwrights \
|
||||
util/nwsalvage \
|
||||
util/nwtrustee \
|
||||
util/nwtrustee2 \
|
||||
util/nwuserlist \
|
||||
util/nwvolinfo \
|
||||
util/pqlist \
|
||||
util/pqstat \
|
||||
util/pserver \
|
||||
util/slist
|
||||
|
||||
rm -f \
|
||||
ipxdump/ipxdump \
|
||||
ipxdump/ipxparse \
|
||||
ipx-1.0/ipx_cmd \
|
||||
ipx-1.0/ipx_configure \
|
||||
ipx-1.0/ipx_interface \
|
||||
ipx-1.0/ipx_internal_net \
|
||||
ipx-1.0/ipx_route \
|
||||
ipx-1.0/Samples/ipxrcv \
|
||||
ipx-1.0/Samples/ipxsend \
|
||||
ipx-1.0/Samples/rip \
|
||||
ipx-1.0/Samples/sap
|
||||
|
||||
echo "Restoring required release files if needed..."
|
||||
|
||||
if [ ! -f lib/libncp.vers ]; then
|
||||
if git cat-file -e HEAD:lib/libncp.vers 2>/dev/null; then
|
||||
git checkout -- lib/libncp.vers
|
||||
elif git cat-file -e v2.2.6:lib/libncp.vers 2>/dev/null; then
|
||||
git show v2.2.6:lib/libncp.vers > lib/libncp.vers
|
||||
else
|
||||
echo "Warning: lib/libncp.vers is missing and could not be restored."
|
||||
fi
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Cleanup done."
|
||||
echo
|
||||
echo "Remaining untracked/modified files:"
|
||||
git status --short
|
||||
2093
config.guess
vendored
2093
config.guess
vendored
File diff suppressed because it is too large
Load Diff
336
config.rpath
336
config.rpath
@@ -2,28 +2,13 @@
|
||||
# Output a system dependent set of variables, describing how to set the
|
||||
# run time search path of shared libraries in an executable.
|
||||
#
|
||||
# Copyright 1996-2002 Free Software Foundation, Inc.
|
||||
# Copyright 1996-2005 Free Software Foundation, Inc.
|
||||
# Taken from GNU libtool, 2001
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
@@ -34,43 +19,72 @@
|
||||
#
|
||||
# The set of defined variables is at the end of this script.
|
||||
|
||||
# Known limitations:
|
||||
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
|
||||
# than 256 bytes, otherwise the compiler driver will dump core. The only
|
||||
# known workaround is to choose shorter directory names for the build
|
||||
# directory and/or the installation directory.
|
||||
|
||||
# All known linkers require a `.a' archive for static linking (except M$VC,
|
||||
# which needs '.lib').
|
||||
libext=a
|
||||
shlibext=
|
||||
shrext=.so
|
||||
|
||||
host="$1"
|
||||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
||||
cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
|
||||
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
|
||||
|
||||
wl=
|
||||
if test "$GCC" = yes; then
|
||||
wl='-Wl,'
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3* | aix4* | aix5*)
|
||||
aix*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
darwin*)
|
||||
case "$cc_basename" in
|
||||
xlc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
mingw* | pw32* | os2*)
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
irix5* | irix6* | nonstopux*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
newsos6)
|
||||
;;
|
||||
linux*)
|
||||
echo '__INTEL_COMPILER' > conftest.$ac_ext
|
||||
if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
# Intel icc
|
||||
wl='-Qoption,ld,'
|
||||
fi
|
||||
case $cc_basename in
|
||||
icc* | ecc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
pgcc | pgf77 | pgf90)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
ccc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
como)
|
||||
wl='-lopt='
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sco3.2v5*)
|
||||
;;
|
||||
solaris*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
@@ -78,15 +92,20 @@ else
|
||||
wl='-Qoption ld '
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
if test "x$host_vendor" = xsni; then
|
||||
wl='-LD'
|
||||
else
|
||||
wl='-Wl,'
|
||||
fi
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
;;
|
||||
unicos*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
uts4*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
|
||||
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_direct=no
|
||||
@@ -110,8 +129,10 @@ ld_shlibs=yes
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
case "$host_os" in
|
||||
aix3* | aix4* | aix5*)
|
||||
# On AIX, the GNU linker is very broken
|
||||
ld_shlibs=no
|
||||
# On AIX/PPC, the GNU linker is very broken
|
||||
if test "$host_cpu" != ia64; then
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
@@ -120,12 +141,12 @@ if test "$with_gnu_ld" = yes; then
|
||||
# that the semantics of dynamic libraries on AmigaOS, at least up
|
||||
# to version 4, is to share data among multiple programs linked
|
||||
# with the same dynamic library. Since this doesn't match the
|
||||
# behavior of shared libraries on other platforms, we can use
|
||||
# behavior of shared libraries on other platforms, we cannot use
|
||||
# them.
|
||||
ld_shlibs=no
|
||||
;;
|
||||
beos*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
@@ -135,11 +156,18 @@ if test "$with_gnu_ld" = yes; then
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
solaris* | sysv5*)
|
||||
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
|
||||
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
|
||||
ld_shlibs=no
|
||||
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
@@ -148,8 +176,15 @@ if test "$with_gnu_ld" = yes; then
|
||||
sunos4*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
linux*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
@@ -157,6 +192,8 @@ if test "$with_gnu_ld" = yes; then
|
||||
;;
|
||||
esac
|
||||
if test "$ld_shlibs" = yes; then
|
||||
# Unlike libtool, we use -rpath here, not --rpath, since the documented
|
||||
# option of GNU ld is called -rpath, not --rpath.
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
fi
|
||||
else
|
||||
@@ -209,13 +246,27 @@ else
|
||||
fi
|
||||
esac
|
||||
fi
|
||||
# Begin _LT_AC_SYS_LIBPATH_AIX.
|
||||
echo 'int main () { return 0; }' > conftest.c
|
||||
${CC} ${LDFLAGS} conftest.c -o conftest
|
||||
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
fi
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath="/usr/lib:/lib"
|
||||
fi
|
||||
rm -f conftest.c conftest
|
||||
# End _LT_AC_SYS_LIBPATH_AIX.
|
||||
if test "$aix_use_runtimelinking" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
else
|
||||
if test "$host_cpu" = ia64; then
|
||||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
||||
else
|
||||
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
@@ -225,6 +276,8 @@ else
|
||||
# see comment about different semantics on the GNU ld section
|
||||
ld_shlibs=no
|
||||
;;
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
@@ -234,7 +287,21 @@ else
|
||||
libext=lib
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
hardcode_direct=yes
|
||||
hardcode_direct=no
|
||||
if test "$GCC" = yes ; then
|
||||
:
|
||||
else
|
||||
case "$cc_basename" in
|
||||
xlc*)
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
dgux*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
freebsd1*)
|
||||
ld_shlibs=no
|
||||
@@ -247,18 +314,45 @@ else
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
freebsd*)
|
||||
freebsd* | kfreebsd*-gnu | dragonfly*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
hpux9*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes # Not in the search PATH, but as the default
|
||||
# location of the library.
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
hpux10* | hpux11*)
|
||||
if test "$with_gnu_ld" = no; then
|
||||
case "$host_cpu" in
|
||||
hppa*64*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=no
|
||||
;;
|
||||
ia64*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=no
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
@@ -314,23 +408,20 @@ else
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
sysv4)
|
||||
if test "x$host_vendor" = xsno; then
|
||||
hardcode_direct=yes # is this really true???
|
||||
else
|
||||
hardcode_direct=no # Motorola manual says yes, but my tests say they lie
|
||||
fi
|
||||
case $host_vendor in
|
||||
sni)
|
||||
hardcode_direct=yes # is this really true???
|
||||
;;
|
||||
siemens)
|
||||
hardcode_direct=no
|
||||
;;
|
||||
motorola)
|
||||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sysv4.3*)
|
||||
;;
|
||||
sysv5*)
|
||||
hardcode_libdir_flag_spec=
|
||||
;;
|
||||
uts4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
dgux*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
ld_shlibs=yes
|
||||
@@ -340,7 +431,13 @@ else
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=no
|
||||
;;
|
||||
sysv5uw7* | unixware7*)
|
||||
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
|
||||
;;
|
||||
sysv5*)
|
||||
hardcode_libdir_flag_spec=
|
||||
;;
|
||||
uts4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
@@ -349,136 +446,103 @@ else
|
||||
fi
|
||||
|
||||
# Check dynamic linker characteristics
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
|
||||
libname_spec='lib$name'
|
||||
sys_lib_dlsearch_path_spec="/lib /usr/lib"
|
||||
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
shlibext=so
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
shlibext=so
|
||||
;;
|
||||
amigaos*)
|
||||
shlibext=ixlibrary
|
||||
;;
|
||||
beos*)
|
||||
shlibext=so
|
||||
;;
|
||||
bsdi4*)
|
||||
shlibext=so
|
||||
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
|
||||
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
case $GCC,$host_os in
|
||||
yes,cygwin*)
|
||||
shlibext=dll.a
|
||||
;;
|
||||
yes,mingw*)
|
||||
shlibext=dll
|
||||
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
|
||||
;;
|
||||
yes,pw32*)
|
||||
shlibext=dll
|
||||
;;
|
||||
*)
|
||||
shlibext=dll
|
||||
;;
|
||||
esac
|
||||
shrext=.dll
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
shlibext=dylib
|
||||
shrext=.dylib
|
||||
;;
|
||||
dgux*)
|
||||
;;
|
||||
freebsd1*)
|
||||
;;
|
||||
kfreebsd*-gnu)
|
||||
;;
|
||||
freebsd*)
|
||||
shlibext=so
|
||||
;;
|
||||
gnu*)
|
||||
shlibext=so
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
shlibext=sl
|
||||
case "$host_cpu" in
|
||||
ia64*)
|
||||
shrext=.so
|
||||
;;
|
||||
hppa*64*)
|
||||
shrext=.sl
|
||||
;;
|
||||
*)
|
||||
shrext=.sl
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
shlibext=so
|
||||
irix5* | irix6* | nonstopux*)
|
||||
case "$host_os" in
|
||||
irix5*)
|
||||
irix5* | nonstopux*)
|
||||
libsuff= shlibsuff=
|
||||
;;
|
||||
*)
|
||||
case $LD in
|
||||
*-32|*"-32 ") libsuff= shlibsuff= ;;
|
||||
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;;
|
||||
*-64|*"-64 ") libsuff=64 shlibsuff=64 ;;
|
||||
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
|
||||
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
|
||||
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
|
||||
*) libsuff= shlibsuff= ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
|
||||
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
|
||||
;;
|
||||
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
|
||||
linux*oldld* | linux*aout* | linux*coff*)
|
||||
;;
|
||||
linux-gnu*)
|
||||
shlibext=so
|
||||
linux*)
|
||||
;;
|
||||
knetbsd*-gnu)
|
||||
;;
|
||||
netbsd*)
|
||||
shlibext=so
|
||||
;;
|
||||
newsos6)
|
||||
shlibext=so
|
||||
;;
|
||||
nto-qnx*)
|
||||
;;
|
||||
openbsd*)
|
||||
shlibext=so
|
||||
;;
|
||||
os2*)
|
||||
libname_spec='$name'
|
||||
shlibext=dll
|
||||
shrext=.dll
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
shlibext=so
|
||||
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
|
||||
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
|
||||
;;
|
||||
sco3.2v5*)
|
||||
shlibext=so
|
||||
;;
|
||||
solaris*)
|
||||
shlibext=so
|
||||
;;
|
||||
sunos4*)
|
||||
shlibext=so
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
shlibext=so
|
||||
case "$host_vendor" in
|
||||
motorola)
|
||||
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
uts4*)
|
||||
shlibext=so
|
||||
;;
|
||||
dgux*)
|
||||
shlibext=so
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
shlibext=so
|
||||
fi
|
||||
;;
|
||||
uts4*)
|
||||
;;
|
||||
esac
|
||||
|
||||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
||||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
|
||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_sys_lib_search_path_spec=`echo "X$sys_lib_search_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_sys_lib_dlsearch_path_spec=`echo "X$sys_lib_dlsearch_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
|
||||
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="$escaped_wl"
|
||||
@@ -504,10 +568,4 @@ hardcode_direct="$hardcode_direct"
|
||||
# resulting binary.
|
||||
hardcode_minus_L="$hardcode_minus_L"
|
||||
|
||||
# Compile-time system search path for libraries
|
||||
sys_lib_search_path_spec="$escaped_sys_lib_search_path_spec"
|
||||
|
||||
# Run-time system search path for libraries
|
||||
sys_lib_dlsearch_path_spec="$escaped_sys_lib_dlsearch_path_spec"
|
||||
|
||||
EOF
|
||||
|
||||
3193
config.sub
vendored
3193
config.sub
vendored
File diff suppressed because it is too large
Load Diff
218
configure.ac
218
configure.ac
@@ -1,8 +1,8 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT([[ncpfs]],[[2.2.3]],[[vandrove@vc.cvut.cz]])
|
||||
AC_INIT([[ncpfs]],[[2.2.7]],[[mario.fetka@disconnected-by-peer.at]])
|
||||
AC_CONFIG_SRCDIR([[lib/ncplib.c]])
|
||||
AC_REVISION([[2.2.3]])
|
||||
AC_REVISION([[2.2.7]])
|
||||
AC_CONFIG_HEADER(include/config.h)
|
||||
|
||||
|
||||
@@ -51,6 +51,9 @@ AC_ARG_ENABLE(versions,
|
||||
AC_ARG_ENABLE(function_sections,
|
||||
[ --disable-function-sections do not use -ffunction-sections for static libraries])
|
||||
|
||||
AC_ARG_ENABLE(shared,
|
||||
[ --disable-shared disable build/use of shared libncp])
|
||||
|
||||
AC_ARG_ENABLE(trace,
|
||||
[ --enable-trace enable trace of ncp calls])
|
||||
|
||||
@@ -232,20 +235,43 @@ AC_CANONICAL_HOST
|
||||
dnl Checks for programs.
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_CC
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
|
||||
dnl Mandatory gettext items
|
||||
AC_SUBST(PACKAGE, ["$PACKAGE_NAME"])
|
||||
AC_SUBST(VERSION, ["$PACKAGE_VERSION"])
|
||||
AM_GNU_GETTEXT
|
||||
AM_GNU_GETTEXT([external])
|
||||
INTLSUB=""
|
||||
AC_SUBST([INTLSUB])
|
||||
localedir="\${prefix}/$DATADIRNAME/locale"
|
||||
AC_SUBST(localedir)
|
||||
|
||||
AC_CHECK_HEADERS([sys/types.h])
|
||||
AC_CHECK_HEADERS([sys/socket.h], [], [],
|
||||
[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
])
|
||||
AC_CHECK_HEADERS([net/if.h], [], [],
|
||||
[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
dnl Checks for IPX support style
|
||||
AC_CACHE_CHECK(for GNU style IPX support, ncp_cv_c_ipx_netipx,
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[[#include <sys/socket.h>
|
||||
[AC_LANG_PROGRAM([[[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#include <sys/ioctl.h>
|
||||
#include <netipx/ipx.h>]]],
|
||||
[[[((struct sockaddr_ipx*)0)->sipx_family == AF_IPX]]])],
|
||||
@@ -259,7 +285,12 @@ if test "$ncp_cv_c_ipx_netipx" = "no"
|
||||
then
|
||||
AC_CACHE_CHECK(for Linux style IPX support, ncp_cv_c_ipx_linux,
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[[#include <sys/socket.h>
|
||||
[AC_LANG_PROGRAM([[[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#include <asm/types.h>
|
||||
#include <linux/ipx.h>]]],
|
||||
[[[((struct sockaddr_ipx*)0)->sipx_family == AF_IPX]]])],
|
||||
@@ -346,48 +377,23 @@ dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_SYS_WAIT
|
||||
|
||||
dnl sys/mount is required by ncpmount
|
||||
dnl currently code does not work without sys/mount.h
|
||||
AC_CHECK_HEADER(sys/mount.h)
|
||||
if test "$ac_cv_header_sys_mount_h" = "no"
|
||||
then
|
||||
if test "$USE_KERNEL" = "1"
|
||||
then
|
||||
AC_MSG_WARN(Cannot build kernel support because of no sys/mount.h file)
|
||||
USE_KERNEL=0
|
||||
fi
|
||||
ncp_sys_mount_h="/* sys/mount.h does not exist */"
|
||||
ncp_linux_fs_h="/* linux/fs.h is not needed */"
|
||||
else
|
||||
ncp_sys_mount_h="#include <sys/mount.h>"
|
||||
AC_CACHE_CHECK(for mount constants in sys/mount.h, ncp_cv_linux_fs_needed,
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[[#include <sys/mount.h>]]],
|
||||
[[[mount(0,0,0,MS_RDONLY,0); umount(0)]]])],
|
||||
[ncp_cv_linux_fs_needed="yes"],
|
||||
[ncp_cv_linux_fs_needed="no"]
|
||||
)
|
||||
)
|
||||
if test "$ncp_cv_linux_fs_needed" = "yes"; then
|
||||
ncp_linux_fs_h="/* linux/fs.h not needed */"
|
||||
else
|
||||
ncp_linux_fs_h="#include <linux/fs.h>"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(ncp_sys_mount_h)
|
||||
AC_SUBST(ncp_linux_fs_h)
|
||||
|
||||
dnl net/if is required by IPX tools
|
||||
dnl currently code does not work without net/if.h
|
||||
AC_CHECK_HEADER(net/if.h,
|
||||
AC_CHECK_HEADER([net/if.h],
|
||||
[ncp_net_if_h="#include <net/if.h>"],
|
||||
[AC_CHECK_HEADER(linux/if.h,
|
||||
[ncp_net_if_h="#include <linux/if.h>"],
|
||||
[ncp_net_if_h="/* No interfaces support... */"
|
||||
AC_DEFINE(NO_NET_IF_SUPPORT, 1, [neither net/if.h nor linux/if.h was found, so ipx_* will not build...])
|
||||
AC_MSG_WARN(Neither <net/if.h> nor <linux/if.h> does exist, only partial make configured)]
|
||||
)]
|
||||
)
|
||||
)],
|
||||
[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
])
|
||||
AC_SUBST(ncp_net_if_h)
|
||||
|
||||
dnl net/route is required for now in ncplib
|
||||
@@ -400,14 +406,27 @@ AC_CHECK_HEADER(net/route.h,
|
||||
AC_DEFINE(NO_NET_ROUTE_SUPPORT, 1, [neither net/route.h nor linux/route.h was found ...])
|
||||
dnl In future, {net|linux}/route.h should be required only by ipx code
|
||||
AC_MSG_ERROR(Neither <net/route.h> nor <linux/route.h> does exist)]
|
||||
)]
|
||||
)
|
||||
)],
|
||||
[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
])
|
||||
AC_SUBST(ncp_net_route_h)
|
||||
|
||||
dnl netinet/if_ether.h vs. linux/if_ether.h
|
||||
dnl required only in ipxdump/ipxparse
|
||||
ncp_if_ether_support="yes"
|
||||
AC_CHECK_HEADER(netinet/if_ether.h)
|
||||
AC_CHECK_HEADER([netinet/if_ether.h], [], [],
|
||||
[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
])
|
||||
if test "$ac_cv_header_netinet_if_ether_h" = "no"
|
||||
then
|
||||
AC_CHECK_HEADER(linux/if_ether.h)
|
||||
@@ -472,14 +491,56 @@ select(0, &a, &a, &a, 0)]]])],
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl sys/mount is required by ncpmount
|
||||
dnl currently code does not work without sys/mount.h
|
||||
AC_CHECK_HEADER(sys/mount.h)
|
||||
ncp_sys_mount_h="/* sys/mount.h does not exist */"
|
||||
ncp_linux_fs_h="/* linux/fs.h not needed */"
|
||||
if test "$USE_KERNEL" = "1"
|
||||
then
|
||||
if test "$ac_cv_header_sys_mount_h" = "no"
|
||||
then
|
||||
AC_MSG_WARN(Cannot build kernel support because of no sys/mount.h file)
|
||||
USE_KERNEL=0
|
||||
else
|
||||
ncp_sys_mount_h="#include <sys/mount.h>"
|
||||
AC_CACHE_CHECK(for mount constants in sys/mount.h, ncp_cv_linux_fs_needed,
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[[#include <sys/mount.h>]]],
|
||||
[[[mount(0,0,0,MS_RDONLY,0); umount(0)]]])],
|
||||
[ncp_cv_linux_fs_needed="no"],
|
||||
[ncp_cv_linux_fs_needed="yes"]
|
||||
)
|
||||
)
|
||||
if test "$ncp_cv_linux_fs_needed" = "yes"; then
|
||||
ncp_linux_fs_h="#include <linux/fs.h>"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(ncp_sys_mount_h)
|
||||
AC_SUBST(ncp_linux_fs_h)
|
||||
|
||||
|
||||
dnl Third parameter to accept is socklen_t or signed int
|
||||
AC_CACHE_CHECK(for third parameter to accept,
|
||||
ncp_cv_socklen_t,
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include <sys/socket.h>]]],
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include <stdlib.h>
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif]]],
|
||||
[[[socklen_t a;
|
||||
accept(0, NULL, &a)]]])],
|
||||
[ncp_cv_socklen_t="socklen_t"],
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include <sys/socket.h>]]],
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include <stdlib.h>
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif]]],
|
||||
[[[int a;
|
||||
accept(0, NULL, &a)]]])],
|
||||
[ncp_cv_socklen_t="int"],
|
||||
@@ -496,6 +557,46 @@ else
|
||||
fi
|
||||
AC_SUBST(socklen_t)
|
||||
|
||||
AC_CACHE_CHECK(whether SO_NOSIGPIPE exists,
|
||||
ncp_cv_so_nosigpipe,
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif]]],
|
||||
[[[int s;
|
||||
int o = 0;
|
||||
s = socket(0, 0, 0);
|
||||
setsockopt(s, SOL_SOCKET, SO_NOSIGPIPE, &o, sizeof(o))]]])],
|
||||
[ncp_cv_so_nosigpipe="yes"],
|
||||
[ncp_cv_so_nosigpipe="no"]
|
||||
)
|
||||
)
|
||||
if test "$ncp_cv_so_nosigpipe" = "yes"
|
||||
then
|
||||
AC_DEFINE(HAVE_SO_NOSIGPIPE, 1, [Define when SO_NOSIGPIPE exists])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(whether MSG_NOSIGNAL exists,
|
||||
ncp_cv_msg_nosignal,
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
struct msghdr msg;]]],
|
||||
[[[sendmsg(0, &msg, MSG_NOSIGNAL)]]])],
|
||||
[ncp_cv_msg_nosignal="yes"],
|
||||
[ncp_cv_msg_nosignal="no"]
|
||||
)
|
||||
)
|
||||
if test "$ncp_cv_msg_nosignal" = "yes"
|
||||
then
|
||||
AC_DEFINE(HAVE_MSG_NOSIGNAL, 1, [Define when MSG_NOSIGNAL exists])
|
||||
fi
|
||||
|
||||
dnl UNICODE
|
||||
AC_CHECK_TYPE([wchar_t], , [AC_DEFINE([wchar_t], [unsigned int], [Define to 'unsigned int' if wchar_t is not defined.])])
|
||||
AC_CHECK_HEADERS(wchar.h iconv.h)
|
||||
@@ -860,6 +961,16 @@ EOF
|
||||
ELF_TARGET="$ncp_cv_elf_target"
|
||||
AC_SUBST(ELF_TARGET)
|
||||
|
||||
BUILD_SHARED="$ELF_TARGET"
|
||||
if test "$enable_shared" = "no"
|
||||
then
|
||||
BUILD_SHARED="no"
|
||||
fi
|
||||
if test "$enable_shared" = "yes"
|
||||
then
|
||||
BUILD_SHARED="yes"
|
||||
fi
|
||||
|
||||
FFUNCTION_SECTIONS=""
|
||||
GC_SECTIONS=""
|
||||
if test "$function_sections" = "yes"
|
||||
@@ -892,6 +1003,8 @@ then
|
||||
GC_SECTIONS="-Wl,--gc-sections "
|
||||
fi
|
||||
|
||||
AC_LIB_RPATH
|
||||
|
||||
if test "$VERSIONED_LINK" = "yes"
|
||||
then
|
||||
AC_CACHE_CHECK(for working versioned link,
|
||||
@@ -909,12 +1022,12 @@ EOF
|
||||
void lsym(void) { };
|
||||
void gsym(void) { };
|
||||
EOF
|
||||
if ${CC} -shared -Wl,-version-script=conftest.vers -o conftest.so conftest.c -lc >/dev/null 2>&1
|
||||
if ${CC} -shared -Wl,-version-script=conftest.vers -o conftest.${shlibext} conftest.c -lc >/dev/null 2>&1
|
||||
then
|
||||
ncp_cv_versioned_link=yes
|
||||
fi]
|
||||
)
|
||||
rm -f conftest.c conftest.vers conftest.so
|
||||
rm -f conftest.c conftest.vers conftest.${shlibext}
|
||||
if test "$ncp_cv_versioned_link" = "no"
|
||||
then
|
||||
if test "$versions_forced" = "yes"
|
||||
@@ -967,6 +1080,19 @@ AC_SUBST(ADDON_SUBDIRS)
|
||||
AC_SUBST(ADDON_DEV_SUBDIRS)
|
||||
AC_SUBST(FFUNCTION_SECTIONS)
|
||||
AC_SUBST(GC_SECTIONS)
|
||||
AC_SUBST(BUILD_SHARED)
|
||||
if test -z "$libext"; then
|
||||
libext=a
|
||||
fi
|
||||
if test -z "$shlibext"; then
|
||||
shlibext=so
|
||||
fi
|
||||
|
||||
AC_SUBST(shlibext)
|
||||
AC_SUBST(libext)
|
||||
|
||||
MKINSTALLDIRS='$(top_srcdir)/mkinstalldirs'
|
||||
AC_SUBST(MKINSTALLDIRS)
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Make.rules
|
||||
|
||||
114
contrib/ncp_nss_lib/Makefile
Normal file
114
contrib/ncp_nss_lib/Makefile
Normal file
@@ -0,0 +1,114 @@
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
top_srcdir = ../..
|
||||
top_builddir = ../..
|
||||
this_srcdir = ${top_srcdir}/lib
|
||||
|
||||
include ${top_builddir}/Make.rules
|
||||
|
||||
VERSION_SOLIB := 2.3
|
||||
VERSION_SONAME := 2
|
||||
|
||||
vpath %.c ${this_srcdir}
|
||||
|
||||
LIBS :=
|
||||
REENTRANT_CFLAGS := -D_REENTRANT
|
||||
VERSIONED_LINK := yes
|
||||
|
||||
SHARED_NSSLIB := libnss_ncp.so
|
||||
SHARED_NSSLIB_BIN := $(SHARED_NSSLIB).$(VERSION_SOLIB)
|
||||
SHARED_NSSLIB_SONAME := $(SHARED_NSSLIB).$(VERSION_SONAME)
|
||||
|
||||
O_UTILS1 = test_ncp_nss.o\
|
||||
#
|
||||
O_TMP1 =
|
||||
UTILS1 = $(O_UTILS1:%.o=%)
|
||||
|
||||
CCFLAGS += -I.
|
||||
PIC_FLAGS := -fPIC
|
||||
NWCOMPAT := 1
|
||||
|
||||
SHARED_VLINK :=
|
||||
SHARED_VLINK_CFLAGS :=
|
||||
ifeq ($(VERSIONED_LINK),yes)
|
||||
SHARED_VLINK := -Wl,-version-script=${this_srcdir}/libncp.vers
|
||||
SHARED_VLINK_CFLAGS := -DMULTIVERSION
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_ELF),yes)
|
||||
NCP_LIB = libncp.so
|
||||
NCPLIB_DIR = ../../lib
|
||||
LIBDEP = $(NCPLIB_DIR)/$(NCP_LIB)
|
||||
else
|
||||
NCP_LIB = libncp.a
|
||||
NCPLIB_DIR = ../../lib
|
||||
LIBDEP = $(NCPLIB_DIR)/$(NCP_LIB)
|
||||
endif
|
||||
|
||||
STATIC_BASE_OBJ := nss_ncp.o nss_cfgfile.o
|
||||
SHARED_BASE_OBJ := $(STATIC_BASE_OBJ:.o=.do)
|
||||
|
||||
SHARED_O_OBJ := $(SHARED_BASE_OBJ)
|
||||
|
||||
BASE_CFLAGS := -DHAVE_CONFIG_H -DMAKE_NCPLIB -D_GNU_SOURCE
|
||||
|
||||
SHARED_CFLAGS := $(CFLAGS) $(CCFLAGS) $(REENTRANT_CFLAGS) $(PIC_FLAGS) $(SHARED_VLINK_CFLAGS)
|
||||
|
||||
|
||||
.PHONY : all dep install install-dev clean mrproper distclean
|
||||
.PHONY : install_shared install_static install_static_su
|
||||
|
||||
all: $(SHARED_NSSLIB) $(UTILS1)
|
||||
|
||||
install: install_shared
|
||||
|
||||
%.d: %.c %h
|
||||
set -e; $(CC) -M $(STATIC_CFLAGS) $(CFLAGS_$(@:.d=.o)) $(BASE_CFLAGS) $< \
|
||||
| sed 's,\($*\)\.o[ :]*,\1.o \1.do \1.to $@ : ,g' > $@; \
|
||||
[ -s $@ ] || rm -f $@
|
||||
|
||||
$(STATIC_BASE_OBJ): %.o: %.c %.h
|
||||
$(CC) $(STATIC_CFLAGS) $(CFLAGS_$@) $(BASE_CFLAGS) -o $@ -c $<
|
||||
|
||||
|
||||
$(SHARED_BASE_OBJ): %.do: %.c %.h
|
||||
$(CC) $(SHARED_CFLAGS) $(CFLAGS_$(@:.do=.o)) $(BASE_CFLAGS) -o $@ -c $<
|
||||
|
||||
|
||||
$(O_UTILS1) $(O_TMP1): %.o: %.c
|
||||
$(CC) $(CCFLAGS) $(CFLAGS) $(CFLAGS_$@) -o $@ -c $<
|
||||
|
||||
$(UTILS1):: %: %.o $(O_TMP1) $(SHARED_NSSLIB)
|
||||
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(addsuffix .o,$@) $(OBJS_$@) -L. -lnss_ncp -L$(top_builddir)/lib -lncp $(LDFLAGS_$@)
|
||||
|
||||
|
||||
dep:
|
||||
|
||||
clean:
|
||||
rm -f *.o *.do *.to $(SHARED_NSSLIB) $(SHARED_NSSLIB_BIN) $(UTILS1) *~
|
||||
|
||||
mrproper: clean
|
||||
rm -f $(UTILS) $(DISTFILE)
|
||||
|
||||
distclean: mrproper
|
||||
|
||||
install_shared: $(SHARED_NCPLIB_BIN)
|
||||
$(INSTALL) -d $(DESTDIR)$(libsodir)
|
||||
$(INSTALL) $(SHARED_NCPLIB_BIN) $(DESTDIR)$(libsodir)
|
||||
-ldconfig
|
||||
|
||||
|
||||
$(SHARED_NSSLIB): $(SHARED_NSSLIB_SONAME)
|
||||
rm -f $@
|
||||
ln -sf $< $@
|
||||
|
||||
$(SHARED_NSSLIB_SONAME): $(SHARED_NSSLIB_BIN)
|
||||
ln -sf $< $@
|
||||
|
||||
$(SHARED_NSSLIB_BIN): $(SHARED_O_OBJ) ${this_srcdir}/libncp.vers
|
||||
$(CC) -shared -o $@ -Wl,-soname=$(SHARED_NSSLIB_SONAME) $(SHARED_VLINK) $(SHARED_O_OBJ) -L$(NCPLIB_DIR) -lncp ${LIBS}
|
||||
|
||||
|
||||
|
||||
29
contrib/ncp_nss_lib/ncpfs.conf
Normal file
29
contrib/ncp_nss_lib/ncpfs.conf
Normal file
@@ -0,0 +1,29 @@
|
||||
[Requester]
|
||||
|
||||
|
||||
[ncp_nss]
|
||||
useTree=1
|
||||
server=INSA_ROOT
|
||||
startCtx=
|
||||
ctrlGroup=
|
||||
doPasswd=1
|
||||
doShadow=1
|
||||
doGroup=1
|
||||
|
||||
defGid=100
|
||||
defShell=/bin/bash
|
||||
debug=1
|
||||
|
||||
fallbackUid=-1
|
||||
fallbackGid=-1
|
||||
|
||||
[pam]
|
||||
useTree=1
|
||||
server=INSA_ROOT
|
||||
searchCtx=PC,S.PC,GCP.PC
|
||||
debug=1
|
||||
mountLocally=1
|
||||
createLocalHome=0
|
||||
|
||||
zenOn=
|
||||
zenOff=
|
||||
347
contrib/ncp_nss_lib/nss_cfgfile.c
Normal file
347
contrib/ncp_nss_lib/nss_cfgfile.c
Normal file
@@ -0,0 +1,347 @@
|
||||
/*
|
||||
nss_cfgfile.c - Configuration file handling
|
||||
Copyright (C) 2000 Petr Vandrovec
|
||||
Copyright (C) 2003 Patrick Pollet
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Revision history:
|
||||
|
||||
1.00 2003, Jan 16 Patrick Pollet <patrick.pollet@insa-lyon.fr>
|
||||
Initial revision, stronly inspired by ncpfs/lib/cfgfile.c
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include "private/libncp-lock.h"
|
||||
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
#include "nss_cfgfile.h"
|
||||
#include "nss_ncp.h"
|
||||
// temporary define (waiting for a better Makefile)
|
||||
#define GLOBALCFGFILE "/etc/ncpfs.conf"
|
||||
#ifndef GLOBALCFGFILE
|
||||
#error "GLOBALCFGFILE must be defined"
|
||||
#endif
|
||||
|
||||
|
||||
// #define DEBUG 1
|
||||
|
||||
static struct nss_ncp_conf*
|
||||
alloc_nss_ncp_conf(void)
|
||||
{
|
||||
struct nss_ncp_conf * conf;
|
||||
|
||||
conf = malloc(sizeof(*conf));
|
||||
if (!conf)
|
||||
return NULL;
|
||||
return conf;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
free_nss_ncp_conf(struct nss_ncp_conf *conf)
|
||||
{
|
||||
#define FREEFIELD(x) do if (conf->x) { free(conf->x); conf->x = NULL; } while (0);
|
||||
if (conf) {
|
||||
FREEFIELD(server);
|
||||
FREEFIELD(startCtx);
|
||||
FREEFIELD(ctrlGroup);
|
||||
FREEFIELD(defShell);
|
||||
}
|
||||
#undef FREEFIELD
|
||||
}
|
||||
|
||||
|
||||
struct cfgFile {
|
||||
ncpt_mutex_t mutex;
|
||||
FILE* file;
|
||||
};
|
||||
|
||||
static struct cfgFile*
|
||||
cfgOpenFile(const char* path,
|
||||
int writeRequired)
|
||||
{
|
||||
struct cfgFile* cfg;
|
||||
|
||||
cfg = malloc(sizeof(*cfg));
|
||||
if (cfg) {
|
||||
cfg->file = fopen(path, writeRequired ? "r+" : "r");
|
||||
if (cfg->file) {
|
||||
ncpt_mutex_init(&cfg->mutex);
|
||||
} else {
|
||||
free(cfg);
|
||||
cfg = NULL;
|
||||
}
|
||||
}
|
||||
return cfg;
|
||||
}
|
||||
|
||||
static void
|
||||
cfgClose(struct cfgFile* cfg)
|
||||
{
|
||||
ncpt_mutex_lock(&cfg->mutex);
|
||||
fclose(cfg->file);
|
||||
ncpt_mutex_destroy(&cfg->mutex);
|
||||
free(cfg);
|
||||
}
|
||||
|
||||
|
||||
struct check {
|
||||
const char *option; /* configuration option */
|
||||
int mandatory; /* can be empty or null */
|
||||
int found; /* set to TRUE if found in cfg file */
|
||||
char **char_ptr; /* where to store string value */
|
||||
int *int_ptr; /* where to store integer value */
|
||||
const char *defValue; /* default value */
|
||||
};
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
void
|
||||
printResults(const char *infos, const struct check *results)
|
||||
{
|
||||
const struct check *ptr;
|
||||
|
||||
printf ("%s\n", infos);
|
||||
for (ptr = results; ptr->option; ptr++) {
|
||||
if (ptr->int_ptr)
|
||||
printf ("option=%s mandatory=%d found=%d value=%d defvalue=%s\n",
|
||||
ptr->option, ptr->mandatory, ptr->found, *ptr->int_ptr, ptr->defValue);
|
||||
else
|
||||
printf ("option=%s mandatory=%d found=%d value=%s defvalue=%s\n",
|
||||
ptr->option, ptr->mandatory, ptr->found, *ptr->char_ptr, ptr->defValue);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
printConf(const char *infos, const struct nss_ncp_conf *conf)
|
||||
{
|
||||
printf ("%s\n", infos);
|
||||
printf ("debug=%d useTree=%d server=%s startCtx=%s ctrlGroup=%s defGid=%u defShell=%s fallbackUid=%u fallbackGid=%u "
|
||||
"doPassword=%d doGroup=%d doShadow=%d\n",
|
||||
conf->debug, conf->useTree, conf->server, conf->startCtx,
|
||||
conf->ctrlGroup, conf->defGid, conf->defShell, conf->fallbackUid, conf->fallbackGid,
|
||||
conf->doPassword, conf->doGroup, conf->doShadow);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static int
|
||||
process_line(const char *cptr, struct check *ptr)
|
||||
{
|
||||
|
||||
const char* sptr; // start of real value
|
||||
const char* eptr; // end of real value
|
||||
|
||||
char ec;
|
||||
char cc;
|
||||
|
||||
while (*cptr && isspace(*cptr))
|
||||
cptr++;
|
||||
if (*cptr != '=' && *cptr != ':')
|
||||
return 1; //no equal sign found
|
||||
cptr++;
|
||||
|
||||
while (*cptr && isspace(*cptr))
|
||||
cptr++;
|
||||
|
||||
// space are allowed in value only if surrounded by " or ' (eg a NDS control group)
|
||||
if (*cptr == '"' || *cptr == '\'')
|
||||
ec = *cptr++;
|
||||
else
|
||||
ec = 0;
|
||||
sptr = cptr;
|
||||
eptr = cptr;
|
||||
while ((cc = *cptr++) != 0) {
|
||||
if (cc == '\n')
|
||||
break;
|
||||
if (!ec && isspace(cc))
|
||||
break;
|
||||
if (cc == ec)
|
||||
break;
|
||||
eptr++;
|
||||
}
|
||||
if (eptr != sptr) {
|
||||
if (ptr->int_ptr) {
|
||||
char* errPtr; // err
|
||||
|
||||
*ptr->int_ptr = strtoul(sptr, &errPtr, 0);
|
||||
ptr->found = errPtr == eptr;
|
||||
} else {
|
||||
char *v = malloc(eptr - sptr + 1);
|
||||
if (v) {
|
||||
memcpy(v, sptr, eptr - sptr);
|
||||
v[eptr - sptr] = 0;
|
||||
*ptr->char_ptr = v;
|
||||
ptr->found = TRUE;
|
||||
} else
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
fix_conf(struct check *results)
|
||||
{
|
||||
struct check* ptr;
|
||||
|
||||
for (ptr = results; ptr->option; ptr++) {
|
||||
if (!ptr->found) {
|
||||
if (ptr->mandatory) {
|
||||
traceForce(0, LOG_ERR, "ncp_nss aborting :missing mandatory information '%s=' in config file %s", ptr->option, GLOBALCFGFILE);
|
||||
return 1;
|
||||
}
|
||||
if (ptr->int_ptr) {
|
||||
*ptr->int_ptr = strtoul(ptr->defValue, NULL, 0);
|
||||
} else {
|
||||
char *v = strdup(ptr->defValue);
|
||||
if (v)
|
||||
*ptr->char_ptr = v;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static struct nss_ncp_conf *
|
||||
read_conf_file(const char * mySection, struct cfgFile *cfg)
|
||||
{
|
||||
struct nss_ncp_conf *conf;
|
||||
|
||||
conf = alloc_nss_ncp_conf();
|
||||
if (!conf)
|
||||
return NULL;
|
||||
{
|
||||
struct check check_confs[] = {
|
||||
/*option mandati found char_ptr int_ptr defValue */
|
||||
{"debug", FALSE, FALSE, NULL, &conf->debug, "0"},
|
||||
{"useTree", FALSE, FALSE, NULL, &conf->useTree, "0"},
|
||||
{"server", TRUE, FALSE, &conf->server, NULL, ""},
|
||||
{"startCtx", FALSE, FALSE, &conf->startCtx, NULL, ""},
|
||||
{"ctrlGroup", FALSE, FALSE, &conf->ctrlGroup, NULL, ""},
|
||||
{"defGid", FALSE, FALSE, NULL, &conf->defGid, "100"},
|
||||
{"defShell", FALSE, FALSE, &conf->defShell, NULL, "/bin/bash"},
|
||||
{"fallbackUid", FALSE, FALSE, NULL, &conf->fallbackUid, "-1"},
|
||||
{"fallbackGid", FALSE, FALSE, NULL, &conf->fallbackGid, "-1"},
|
||||
{"doPasswd", FALSE, FALSE, NULL, &conf->doPassword, "0"},
|
||||
{"doGroup", FALSE, FALSE, NULL, &conf->doGroup, "0"},
|
||||
{"doShadow", FALSE, FALSE, NULL, &conf->doShadow, "0"},
|
||||
{NULL, FALSE, FALSE, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
char cfgline[16384];
|
||||
size_t seclen = strlen(mySection);
|
||||
|
||||
#ifdef DEBUG
|
||||
// DO NOT DO IT A a second call (using test_ncp_nss -2) coredump !!!
|
||||
// printResults("before reading CFG", check_confs);
|
||||
#endif
|
||||
ncpt_mutex_lock(&cfg->mutex);
|
||||
//rewind(cfg->file);
|
||||
while (fgets(cfgline, sizeof(cfgline)-1, cfg->file)) {
|
||||
char* cptr = cfgline;
|
||||
struct check* ptr;
|
||||
|
||||
while (*cptr && isspace(*cptr))
|
||||
cptr++;
|
||||
if (*cptr != '[')
|
||||
continue;
|
||||
if (strncasecmp(++cptr, mySection, seclen))
|
||||
continue;
|
||||
if (cptr[seclen] != ']')
|
||||
continue;
|
||||
while (fgets(cfgline, sizeof(cfgline) - 1, cfg->file)) {
|
||||
cptr = cfgline;
|
||||
|
||||
while (*cptr && isspace(*cptr))
|
||||
cptr++;
|
||||
if (!*cptr)
|
||||
continue; //empty line
|
||||
if (*cptr == '[') // start of another section
|
||||
goto ssend;
|
||||
for (ptr = check_confs; ptr->option; ptr++) {
|
||||
size_t keylen = strlen(ptr->option);
|
||||
if (!strncasecmp(cptr, ptr->option, keylen)) {
|
||||
cptr += keylen;
|
||||
process_line(cptr, ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ssend:
|
||||
#ifdef DEBUG
|
||||
printResults("after reading CFG no error", check_confs);
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
printConf("before fixing ", conf);
|
||||
#endif
|
||||
|
||||
if (!fix_conf (check_confs)) { // fill in missing values with default,
|
||||
#ifdef DEBUG
|
||||
printConf("after fixing ", conf);
|
||||
#endif
|
||||
ncpt_mutex_unlock(&cfg->mutex);
|
||||
return conf;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
printResults("after reading CFG error", check_confs);
|
||||
#endif
|
||||
ncpt_mutex_unlock(&cfg->mutex);
|
||||
free_nss_ncp_conf(conf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
struct nss_ncp_conf*
|
||||
parse_conf(void)
|
||||
{
|
||||
struct cfgFile *cfg;
|
||||
struct nss_ncp_conf *conf;
|
||||
#ifdef DEBUG
|
||||
printf("entering parse_conf\n");
|
||||
#endif
|
||||
cfg = cfgOpenFile(GLOBALCFGFILE, FALSE);
|
||||
if (!cfg)
|
||||
return NULL;
|
||||
conf = read_conf_file(NSS_SECTION, cfg);
|
||||
cfgClose(cfg);
|
||||
#ifdef DEBUG
|
||||
if (conf)
|
||||
printConf("final value ", conf);
|
||||
#endif
|
||||
|
||||
return conf;
|
||||
}
|
||||
|
||||
26
contrib/ncp_nss_lib/nss_cfgfile.h
Normal file
26
contrib/ncp_nss_lib/nss_cfgfile.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef HAVE_NSS_CFGFILE
|
||||
#define HAVE_NSS_CFGFILE
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
#define NSS_SECTION "ncp_nss"
|
||||
struct nss_ncp_conf {
|
||||
int debug;
|
||||
int useTree; // use Tree connection or server connection
|
||||
char * server; // name of server or tree
|
||||
char * startCtx; // start searching is this context (and below)
|
||||
char * ctrlGroup; // limit search to members of this NDS group for passwd and shadow
|
||||
int defGid; // if no primary group found in NDS use this value
|
||||
char * defShell; // if no shell found in NDS use this value
|
||||
int fallbackUid; // if no UID found in NDS use this one (-1= skip user, NFS_NOBODY= use this UID)
|
||||
int fallbackGid; // if no GID found in NDS use this one (-1= skip group, NFS_NOBODY= use this GID)
|
||||
int doPassword; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf
|
||||
int doGroup; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf
|
||||
int doShadow; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf
|
||||
};
|
||||
|
||||
struct nss_ncp_conf* parse_conf(void);
|
||||
void free_nss_ncp_conf(struct nss_ncp_conf *conf);
|
||||
|
||||
#endif
|
||||
3077
contrib/ncp_nss_lib/nss_ncp.c
Normal file
3077
contrib/ncp_nss_lib/nss_ncp.c
Normal file
File diff suppressed because it is too large
Load Diff
176
contrib/ncp_nss_lib/nss_ncp.h
Normal file
176
contrib/ncp_nss_lib/nss_ncp.h
Normal file
@@ -0,0 +1,176 @@
|
||||
/**************************************************************************
|
||||
nss_ncp.h header for NSS for NDS
|
||||
|
||||
Copyright (C) 2002 Patrick Pollet
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Revision history:
|
||||
|
||||
1.00 2003, January 06 Patrick Pollet <patrick.pollet@insa-lyon.fr>
|
||||
initial release
|
||||
|
||||
************************************************************************/
|
||||
#ifndef HAVE_NSS_NCP_H
|
||||
#define HAVE_NSS_NCP_H
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <ncp/nwnet.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <ctype.h>
|
||||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
#include <shadow.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
#include <nss.h>
|
||||
|
||||
|
||||
|
||||
// USE_DUMMY_ATTRibutes must be set in the Makefile
|
||||
//#define USING_DUMMY_ATTRIBUTES
|
||||
|
||||
#ifndef USING_DUMMY_ATTRIBUTES
|
||||
// the real ones
|
||||
#define ATTR_UID "UNIX:UID"
|
||||
#define ATTR_PGNAME "UNIX:Primary GroupName"
|
||||
#define ATTR_PGID "UNIX:Primary GroupID"
|
||||
#define ATTR_GID "UNIX:GID"
|
||||
#define ATTR_SHELL "UNIX:Login Shell"
|
||||
#define ATTR_COM "UNIX:Comments"
|
||||
#define ATTR_HOME "UNIX:Home Directory"
|
||||
#else
|
||||
// dummy attributes for testing
|
||||
// created with Schemax with the same syntax
|
||||
// and associated to user class and group class
|
||||
#define ATTR_UID "LINUX:UID"
|
||||
#define ATTR_PGNAME "LINUX:Primary GroupName"
|
||||
#define ATTR_PGID "LINUX:Primary GroupID"
|
||||
#define ATTR_GID "LINUX:GID"
|
||||
#define ATTR_SHELL "LINUX:Login Shell"
|
||||
#define ATTR_COM "LINUX:Comments"
|
||||
#define ATTR_HOME "LINUX:Home Directory"
|
||||
#endif
|
||||
|
||||
// the attribute used to test presence of NDS8
|
||||
// either real or dummy (not used yet)
|
||||
#define ATTR_NDS8 ATTR_UID
|
||||
|
||||
// other attributes used
|
||||
// absent NDS8 attributes are searched in L attribute
|
||||
// also new properties ( Zenux Flags, Other group...)
|
||||
|
||||
#define ATTR_CN "CN"
|
||||
#define ATTR_LOCATION "L"
|
||||
|
||||
#define ATTR_GRP_MBS "Group Membership"
|
||||
#define ATTR_MEMBERS "Member"
|
||||
#define ATTR_FULL_NAME "Full Name"
|
||||
|
||||
#define ATTR_DATE_PWD_EXPIRE "Password Expiration Time"
|
||||
#define ATTR_INT_PWD_EXPIRE "Password Expiration Interval"
|
||||
#define ATTR_GRACE_LIMIT "Login Grace Limit"
|
||||
#define ATTR_DATE_ACCT_EXPIRE "Login Expiration Time"
|
||||
|
||||
|
||||
// the proper naming attribute may be customized here (must be a CI_STRING )
|
||||
#define ATTR_GECOS ATTR_FULL_NAME
|
||||
|
||||
// syntaxes of the used attributes
|
||||
#define SYN_CN SYN_CI_STRING
|
||||
#define SYN_LOCATION SYN_CI_STRING
|
||||
#define SYN_UID SYN_INTEGER
|
||||
#define SYN_PGNAME SYN_DIST_NAME
|
||||
#define SYN_PGID SYN_INTEGER
|
||||
#define SYN_GID SYN_INTEGER
|
||||
#define SYN_SHELL SYN_CE_STRING
|
||||
#define SYN_COM SYN_CI_STRING
|
||||
#define SYN_HOME SYN_CE_STRING
|
||||
#define SYN_GRP_MBS SYN_DIST_NAME
|
||||
#define SYN_MEMBERS SYN_DIST_NAME
|
||||
|
||||
|
||||
|
||||
#define QF_DEBUG 0x0001
|
||||
#define QF_VERBOSE 0x0002
|
||||
|
||||
#define NFS_NOBODY = 65534
|
||||
#define CNF_FILE "/etc/nss_ncp.conf"
|
||||
|
||||
|
||||
|
||||
void traceForce(int debugMode, int err, const char* format, ...);
|
||||
|
||||
/******************************* NSS API ***************************************/
|
||||
|
||||
|
||||
enum nss_status _nss_ncp_initgroups (const char *userName, gid_t group,
|
||||
long int *start, long int *size, gid_t * groups,
|
||||
long int limit,int *errnop);
|
||||
|
||||
|
||||
enum nss_status _nss_ncp_getpwnam_r (const char* name, struct passwd *pwd,
|
||||
char * buffer, size_t buflen, int * errnop);
|
||||
|
||||
|
||||
|
||||
enum nss_status _nss_ncp_getpwuid_r (uid_t uid, struct passwd *pwd,
|
||||
char * buffer, size_t buflen, int * errnop);
|
||||
|
||||
|
||||
enum nss_status _nss_ncp_getgrnam_r (const char* name, struct group *grp,
|
||||
char * buffer, size_t buflen, int * errnop);
|
||||
|
||||
|
||||
|
||||
enum nss_status _nss_ncp_getspnam_r (const char * name, struct spwd *spw,
|
||||
char *buffer, size_t buflen,int * errnop);
|
||||
|
||||
|
||||
enum nss_status _nss_ncp_getgrgid_r (gid_t gid, struct group *grp,
|
||||
char * buffer, size_t buflen, int * errnop);
|
||||
|
||||
|
||||
|
||||
enum nss_status _nss_ncp_setpwent(void);
|
||||
|
||||
enum nss_status _nss_ncp_setgrent(void);
|
||||
|
||||
enum nss_status _nss_ncp_setspent (void);
|
||||
|
||||
enum nss_status _nss_ncp_endpwent(void);
|
||||
|
||||
enum nss_status _nss_ncp_endgrent(void);
|
||||
|
||||
enum nss_status _nss_ncp_endspent (void);
|
||||
|
||||
enum nss_status _nss_ncp_getpwent_r(struct passwd *pwd, char * buffer, size_t buflen, int * errnop);
|
||||
|
||||
enum nss_status _nss_ncp_getgrent_r(struct group *grp,char * buffer, size_t buflen, int * errnop);
|
||||
|
||||
|
||||
enum nss_status _nss_ncp_getspent_r (struct spwd *spw,char * buffer, size_t buflen,int * errnop);
|
||||
|
||||
#endif
|
||||
313
contrib/ncp_nss_lib/test_ncp_nss.c
Normal file
313
contrib/ncp_nss_lib/test_ncp_nss.c
Normal file
@@ -0,0 +1,313 @@
|
||||
/**************************************************************************
|
||||
getpwduid.c:test program for NSS for NDS
|
||||
|
||||
Copyright (C) 2002 Patrick Pollet
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Revision history:
|
||||
|
||||
1.00 2003, January 06 Patrick Pollet <patrick.pollet@insa-lyon.fr>
|
||||
initial release
|
||||
1.01 2003, January 08 Patrick Pollet <patrick.pollet@insa-lyon.fr>
|
||||
added conf structure and control group
|
||||
added optional fallback UID and GID if none found in NDS (default is to skip user,group)
|
||||
1.02 2003, January 09 Patrick Pollet <patrick.pollet@insa-lyon.fr>
|
||||
added initgroups
|
||||
1.03 2003, January 10 Patrick Pollet <patrick.pollet@insa-lyon.fr>
|
||||
fixed bug in nds_user_info2 (bad structure received by nds_user_location2)
|
||||
1.04 2003, January 11 Patrick Pollet <patrick.pollet@insa-lyon.fr>
|
||||
fixed setting ndsXXX=NULL trees in case of errors in _nss_ncp_setxxent()
|
||||
made always NAME_CONTEXT=[Root] in CreateContextAndConn
|
||||
calling NWCCloseIteration only it some errors has occured in the search
|
||||
1.05
|
||||
modified to use nss_ncp.so
|
||||
************************************************************************/
|
||||
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <ncp/nwnet.h>
|
||||
|
||||
#ifdef VERBOSE
|
||||
#include <ncp/ncplib.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
#include <ctype.h>
|
||||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "private/libintl.h"
|
||||
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
#include <shadow.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
#include <nss.h>
|
||||
|
||||
#include "nss_ncp.h"
|
||||
#include "nss_cfgfile.h"
|
||||
|
||||
|
||||
static struct nss_ncp_conf defConf ={0, TRUE, NULL, NULL, NULL, 100, NULL, -1, -1, TRUE, TRUE, TRUE};
|
||||
|
||||
/**************** TESTING ******************/
|
||||
|
||||
static void print_passwd (struct passwd pwd){
|
||||
printf("%s:%s:%d:%d:%s:%s:%s\n",pwd.pw_name,pwd.pw_passwd,pwd.pw_uid,pwd.pw_gid,pwd.pw_gecos,pwd.pw_dir,pwd.pw_shell);
|
||||
}
|
||||
|
||||
static void print_group (struct group grp){
|
||||
char ** mmb; int num;
|
||||
printf("%s:%s:%d:",grp.gr_name,grp.gr_passwd,grp.gr_gid);
|
||||
for (mmb=grp.gr_mem,num=0;*mmb; mmb++,num++) {
|
||||
if (num)
|
||||
printf(",");
|
||||
printf ("%s",*mmb);
|
||||
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
}
|
||||
|
||||
static void print_shadow (struct spwd spw){
|
||||
printf("%s:%s:%ld:%ld:%ld:%ld:%ld:%ld:%ld\n",spw.sp_namp,spw.sp_pwdp,spw.sp_lstchg,spw.sp_min,spw.sp_max,spw.sp_warn,spw.sp_inact,spw.sp_expire,spw.sp_flag);
|
||||
}
|
||||
|
||||
|
||||
static void print_user_groups(gid_t * groups, long int start, long int size){
|
||||
int i;
|
||||
printf("start=%ld size=%ld\n",start,size);
|
||||
for (i=0; i<start; i++)
|
||||
printf("%d ",groups[i]);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
static void give_details_on_user_groups(gid_t *groups, long int start){
|
||||
struct group grp;
|
||||
char buffer[65000];
|
||||
long int i;
|
||||
for (i=0; i<start;i++) {
|
||||
enum nss_status err=_nss_ncp_getgrgid_r (groups[i],&grp,buffer,sizeof(buffer),&errno);
|
||||
if (err==NSS_STATUS_SUCCESS)
|
||||
print_group(grp);
|
||||
else printf("nss result is %d for group %d\n",err,groups[i]);
|
||||
}
|
||||
}
|
||||
|
||||
#define _(X) gettext(X)
|
||||
|
||||
static char *progname;
|
||||
|
||||
static void usage(void)
|
||||
{
|
||||
fprintf(stderr, _("usage: %s [options]\n"), progname);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
static void help(void)
|
||||
{
|
||||
printf(_("\n"
|
||||
"usage: %s [options]\n"), progname);
|
||||
printf(_("\n"
|
||||
"-h Print this help text\n"
|
||||
"-u id Unix User passwd info to search by uid in NDS\n"
|
||||
"-n login Unix User passwd infos to search by name in NDS\n"
|
||||
"-s login Unix User shadow infos to search by name in NDS\n"
|
||||
"-i grpid Unix group to search by gid in NDS\n"
|
||||
"-g grpname Unix group to search by name in NDS\n"
|
||||
"-m login Get Unix groups of user login\n"
|
||||
"-U all Unix users to search in NDS\n"
|
||||
"-G all Unix groups to search in NDS\n"
|
||||
"-S all Unix shadows to search in NDS\n"
|
||||
"-D verbose mode (fill /var/log/secure && screen)\n"
|
||||
"-T treeName use this Tree \n"
|
||||
"-B serverName use this server\n"
|
||||
"-C NDS ctx start in this context (default=[Root])\n"
|
||||
"-O NDS group restrict user's search to this group\n"
|
||||
"-f fallbackID if no UID,GID found in NDS use this one (default=-1 skip user & group)\n"
|
||||
"-2 show the BUG (two calls )\n"
|
||||
"\n"));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
** main
|
||||
*/
|
||||
int main (int argc, char** argv) {
|
||||
|
||||
const char* userName=NULL;
|
||||
uid_t userId=-1;
|
||||
const char* groupName=NULL;
|
||||
gid_t groupId=-1;
|
||||
const char* shadowName=NULL;
|
||||
const char* memberName=NULL;
|
||||
int opt;
|
||||
int allUsers=0;
|
||||
int allGroups=0;
|
||||
int allShadows=0;
|
||||
char buffer[65000];
|
||||
int nbCalls=1;
|
||||
|
||||
struct passwd pwd;
|
||||
struct group grp;
|
||||
struct spwd spw;
|
||||
|
||||
progname = argv[0];
|
||||
while ((opt = getopt(argc, argv, "h?u:n:g:i:s:m:T:B:C:O:f:UGSD2")) != EOF)
|
||||
{
|
||||
switch (opt)
|
||||
{
|
||||
case 'n':
|
||||
userName = optarg;
|
||||
break;
|
||||
case 'm':
|
||||
memberName = optarg;
|
||||
break;
|
||||
case 's':
|
||||
shadowName = optarg;
|
||||
break;
|
||||
case 'g':
|
||||
groupName = optarg;
|
||||
break;
|
||||
case 'i':
|
||||
groupId = strtoul(optarg, NULL, 0);
|
||||
break;
|
||||
case 'u':
|
||||
userId = strtoul(optarg, NULL, 0);
|
||||
break;
|
||||
case 'U':
|
||||
allUsers=1;
|
||||
break;
|
||||
case 'G':
|
||||
allGroups=1;
|
||||
break;
|
||||
case 'S':
|
||||
allShadows=1;
|
||||
break;
|
||||
case 'D':
|
||||
defConf.debug=QF_DEBUG;
|
||||
break;
|
||||
case 'T':
|
||||
defConf.server=optarg;
|
||||
defConf.useTree=1;
|
||||
break;
|
||||
case 'B':
|
||||
defConf.server=optarg;
|
||||
defConf.useTree=0;
|
||||
break;
|
||||
case 'C':
|
||||
defConf.startCtx=optarg;
|
||||
break;
|
||||
case 'O':
|
||||
defConf.ctrlGroup=optarg;
|
||||
break;
|
||||
case 'f':
|
||||
defConf.fallbackUid=strtoul(optarg, NULL, 0);
|
||||
defConf.fallbackGid=strtoul(optarg, NULL, 0);
|
||||
break;
|
||||
case '2':
|
||||
nbCalls=2;
|
||||
break;
|
||||
case 'h':
|
||||
case '?':
|
||||
help();
|
||||
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
}
|
||||
if (defConf.debug)
|
||||
openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV);
|
||||
|
||||
while(nbCalls--) { // do it once or twice (freeze at the second !!!!)
|
||||
|
||||
if (userName) {
|
||||
printf ("searching in passwd for login %s\n",userName);
|
||||
if (_nss_ncp_getpwnam_r (userName,&pwd,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
|
||||
print_passwd(pwd);
|
||||
}
|
||||
if (memberName) {
|
||||
#define MAX_GRP 30
|
||||
gid_t groups[MAX_GRP];
|
||||
long int start=0;
|
||||
long int size=MAX_GRP;
|
||||
printf ("searching groups of %s\n",memberName);
|
||||
if ( _nss_ncp_initgroups (memberName, /*999 */ defConf.defGid,&start,&size,groups,0,&errno)==NSS_STATUS_SUCCESS) {
|
||||
//long int *start, long int *size, gid_t * groups,long int limit,int *errnop) {
|
||||
print_user_groups(groups,start,size);
|
||||
give_details_on_user_groups(groups,start);// FREEZE AT THIS SECOND CALL to NWCCOpenConnByNAME !!!!
|
||||
}
|
||||
|
||||
}
|
||||
if (userId != (uid_t)-1) {
|
||||
printf ("searching in passwd for uid %d\n",userId);
|
||||
if ( _nss_ncp_getpwuid_r (userId, &pwd,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
|
||||
print_passwd(pwd);
|
||||
}
|
||||
|
||||
if (allUsers) {
|
||||
_nss_ncp_setpwent();
|
||||
|
||||
while ( _nss_ncp_getpwent_r(&pwd,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
|
||||
print_passwd(pwd);
|
||||
_nss_ncp_endpwent();
|
||||
}
|
||||
|
||||
if (groupName) {
|
||||
printf ("searching in group for %s\n",groupName);
|
||||
if (_nss_ncp_getgrnam_r (groupName,&grp,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS) {
|
||||
print_group(grp);
|
||||
}
|
||||
}
|
||||
|
||||
if (groupId != (gid_t)-1) {
|
||||
printf ("searching in group for gid %d\n",groupId);
|
||||
if ( _nss_ncp_getgrgid_r (groupId, &grp,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
|
||||
print_group(grp);
|
||||
}
|
||||
|
||||
if (allGroups) {
|
||||
_nss_ncp_setgrent();
|
||||
|
||||
while ( _nss_ncp_getgrent_r(&grp,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
|
||||
print_group(grp);
|
||||
_nss_ncp_endgrent();
|
||||
}
|
||||
|
||||
if (shadowName) {
|
||||
printf ("searching in shadow for login %s\n",shadowName);
|
||||
if (_nss_ncp_getspnam_r (shadowName,&spw,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
|
||||
print_shadow(spw);
|
||||
}
|
||||
|
||||
if (allShadows) {
|
||||
_nss_ncp_setspent();
|
||||
while ( _nss_ncp_getspent_r(&spw,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
|
||||
print_shadow(spw);
|
||||
_nss_ncp_endspent();
|
||||
}
|
||||
}
|
||||
|
||||
if (defConf.debug)
|
||||
closelog();
|
||||
exit(0);
|
||||
}
|
||||
@@ -10,13 +10,14 @@ include $(top_builddir)/Make.rules
|
||||
LIBS = @INTLLIBS@ @LIBS@
|
||||
LIB_PAM_SECURITY = @LIB_PAM_SECURITY@
|
||||
|
||||
NCP_LIB = libncp.so
|
||||
NCP_LIB = libncp.$(shlibext)
|
||||
NCPLIB_DIR = ../../lib
|
||||
|
||||
PAM_LIBRARY = pam_ncp_auth.so
|
||||
PAM_LIBRARY = pam_ncp_auth.$(shlibext)
|
||||
PAM_OBJECTS = pam_ncp_auth.do support.do
|
||||
|
||||
CFLAGS_pam_ncp_auth.do := -DNCPMOUNT_PATH=\"$(bindir)/ncpmount\" -DNCPUMOUNT_PATH=\"$(bindir)/ncpumount\"
|
||||
LDFLAGS = @LDFLAGS@
|
||||
|
||||
.PHONY : all install install-dev dep clean mrproper distclean
|
||||
.PHONY : default
|
||||
@@ -45,7 +46,7 @@ $(PAM_OBJECTS): %.do: %.c
|
||||
|
||||
|
||||
$(PAM_LIBRARY): $(PAM_OBJECTS)
|
||||
$(CC) $(CFLAGS) -shared -o $@ $(PAM_OBJECTS) -L$(NCPLIB_DIR) -lncp -lpam ${LIBS}
|
||||
$(CC) $(CFLAGS) -shared $(LDFLAGS) -o $@ $(PAM_OBJECTS) -L$(NCPLIB_DIR) -lncp -lpam ${LIBS}
|
||||
|
||||
dep:
|
||||
|
||||
|
||||
@@ -18,6 +18,33 @@
|
||||
|
||||
/*
|
||||
* $Log: pam_ncp_auth.c,v $
|
||||
*
|
||||
* Revision 1.28 2002/10/02 PP
|
||||
* 1) default zenflag is now 0 and not anymore ZF_CREATE_NWCLIENT | ZF_AUTOMOUNT_NWHOME | ZF_CREATE_NWINFOS
|
||||
* that set trouble with some users not familiar with C coding. they turned these off in NDS
|
||||
* and they were still applied.
|
||||
*
|
||||
* Revision 1.27 2002/10/02 PP
|
||||
* Experimental code:
|
||||
* 1) We experienced some stange behavior with contexless login. If user miss his password and retry to
|
||||
* login nw_search_ctx is called again and freeze...
|
||||
* 2) trying to find why console login do not work in RH73 ... this module says OK but session is closed
|
||||
* immediatly (?)
|
||||
*
|
||||
* New Code:
|
||||
* 1) Some users complained that this module consumes 2 connections to NDS (one for the authentication
|
||||
* and one for the autmounting of the Netware home). Actually only one should stay permanent, to be
|
||||
* later reused by mounting of extra Netware ressource via ncpmap without having to provide again
|
||||
* login/password. Since the authenticating connection is not in /etc/mtab, so it cannot be "reused"
|
||||
* by ncpmap anyway, so we must get rid of it at end of session opening part.
|
||||
* 2) Paul Berger (bergerp@breedtech.com) signaled me that in some environnement, home directories paths
|
||||
* are coded in NwAdmin as dir1/dir2/%LOGIN_NAME or dir1/dir2/%CN (with or without a terminating %) and
|
||||
* the mapping of the home is done within the context login script, with automatic substitution
|
||||
* of %LOGIN_NAME by the user's cn truncated to 8 or of %CN by the full user's CN. Some provisions are
|
||||
* added to do the substitution here when automounting home and writing data in the ~/.nwinfos file.
|
||||
* This is a crude code that chop off whatever starts with a % and append the user's name. We do not
|
||||
* support dir1/dir2/%LOGIN_NAME/dir3 !!!! See nds_pp_home_directory function.
|
||||
*
|
||||
* Revision 1.26 2002/05/24 PP
|
||||
* Extended -Z option to allow some zenflags to be turned OFF on that workstation.
|
||||
* With -Z all zenflags are off, but with -ZABCD, only flags ABCD are off.
|
||||
@@ -220,6 +247,7 @@
|
||||
#define _GNU_SOURCE
|
||||
#define _BSD_SOURCE
|
||||
#define inline __inline__
|
||||
#define NCP_OBSOLETE
|
||||
#include <ncp/nwcalls.h>
|
||||
#include <ncp/nwnet.h>
|
||||
#include <ncp/nwclient.h>
|
||||
@@ -229,6 +257,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <syslog.h>
|
||||
#include <unistd.h>
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
@@ -238,6 +267,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include "support.h"
|
||||
|
||||
@@ -245,10 +275,15 @@ static const char rcsid[] = "$Id: pam_ncp_auth.c,v 1.9 2001/21/26 16:52:07 PP Ex
|
||||
|
||||
/* Define function prototypes */
|
||||
|
||||
static void
|
||||
nw_cleanup_conn(pam_handle_t * pamh, void *data, int error_status)
|
||||
static void
|
||||
nw_cleanup_conn(UNUSED(pam_handle_t *pamh),
|
||||
void *data,
|
||||
UNUSED(int error_status))
|
||||
{
|
||||
ncp_close((struct ncp_conn *) data);
|
||||
NWCCODE err;
|
||||
|
||||
err = ncp_close((struct ncp_conn*)data);
|
||||
syslog(LOG_NOTICE, "pam closing authenticating connection: %s", strnwerror(err));
|
||||
}
|
||||
|
||||
#define QFC_FIRST_UNUSED 0
|
||||
@@ -420,9 +455,9 @@ rather than Location for pre-DS 8 systems*/
|
||||
#define ZF_OPENING_SCRIPTS (ZF_0 | ZF_1 | ZF_2)
|
||||
#define ZF_CLOSING_SCRIPTS (ZF_3 | ZF_4 | ZF_5)
|
||||
|
||||
//maybe overwritten ( not ORED !) by a -z directive on the command line
|
||||
//note: no passwd in ~/.nwclient by default
|
||||
#define ZF_DEFAULTS ZF_CREATE_NWCLIENT | ZF_AUTOMOUNT_NWHOME | ZF_CREATE_NWINFOS
|
||||
|
||||
//#define ZF_DEFAULTS ZF_CREATE_NWCLIENT | ZF_AUTOMOUNT_NWHOME | ZF_CREATE_NWINFOS
|
||||
#define ZF_DEFAULTS 0
|
||||
|
||||
// where must be the scripts
|
||||
// TODO: let PAM finds them somewhere in its path
|
||||
@@ -518,10 +553,35 @@ struct pam_ncp_state {
|
||||
|
||||
};
|
||||
|
||||
// PP:moved up here to be used by some of my routines
|
||||
static int
|
||||
getnumber(int *val, const char **str)
|
||||
{
|
||||
// concat2a (give a local string that is destroyed at the end of the function)
|
||||
#define concat2a(one,two) ({ \
|
||||
size_t lone = strlen(one); \
|
||||
size_t ltwo = strlen(two); \
|
||||
char* buf = alloca(lone + ltwo + 1); \
|
||||
memcpy(buf, one, lone); \
|
||||
memcpy(buf + lone, two, ltwo + 1); \
|
||||
buf; })
|
||||
|
||||
// concat2m (give a "global" string that is NOT destroyed at the end of the function)
|
||||
#define concat2m(one,two) ({ \
|
||||
size_t lone = strlen(one); \
|
||||
size_t ltwo = strlen(two); \
|
||||
char* buf = malloc(lone + ltwo + 1); \
|
||||
memcpy(buf, one, lone); \
|
||||
memcpy(buf + lone, two, ltwo + 1); \
|
||||
buf; })
|
||||
|
||||
|
||||
#define concat3a(one,med,two) ({ \
|
||||
size_t lone = strlen(one); \
|
||||
size_t ltwo = strlen(two); \
|
||||
char* buf = alloca(lone + 1+ ltwo + 1); \
|
||||
memcpy(buf, one, lone); \
|
||||
buf[lone] = med; \
|
||||
memcpy(buf + lone + 1, two, ltwo + 1); \
|
||||
buf; })
|
||||
|
||||
static int getnumber(int* val, const char** str) {
|
||||
const char *p = *str;
|
||||
char *z;
|
||||
|
||||
@@ -542,7 +602,7 @@ getnumber(int *val, const char **str)
|
||||
|
||||
// flip Dos antislash to Unix
|
||||
// converts to uppercase for ncpmount to work with ROOT options ON
|
||||
static char *
|
||||
static void
|
||||
unixifyPathUC(char *dosPath)
|
||||
{
|
||||
size_t i;
|
||||
@@ -552,7 +612,6 @@ unixifyPathUC(char *dosPath)
|
||||
dosPath[i] = '/';
|
||||
}
|
||||
str_upper(dosPath);
|
||||
return dosPath;
|
||||
}
|
||||
|
||||
// remove all spaces from a NDS name
|
||||
@@ -577,11 +636,10 @@ trim(char *string)
|
||||
#define QF_AUTOMODIFY 0x0020
|
||||
#define QF_BINDERY 0x0040
|
||||
#define QF_NO_PEER_CHECKS 0x0080
|
||||
// rev 1.25 add an extra -A server parameter to ncpmount (with -A option on command line)
|
||||
#define QF_USE_NETWARE_IP 0x1000
|
||||
// version 1.24. automatically create home directory on local machine for new users
|
||||
// it is on by default
|
||||
// should be turned of by -n option if homes are on a remote NFS server (automounted)
|
||||
// should be turned off by -n option if homes are on a remote NFS server (automounted)
|
||||
#define QF_MOUNTLOCALLY 0x2000
|
||||
#define QF_CREATEHOME 0x4000
|
||||
// test v 1.25 impersonnating to current user when accessing his NFS mounted home
|
||||
@@ -732,7 +790,7 @@ fail2:;
|
||||
}
|
||||
|
||||
static int
|
||||
nw_get_nwid(NWCONN_HANDLE conn, NWObjectID * id, int qflag)
|
||||
nw_get_nwid(NWCONN_HANDLE conn, NWObjectID * id, UNUSED(int qflag))
|
||||
{
|
||||
NWCCODE err;
|
||||
|
||||
@@ -788,7 +846,6 @@ nw_create_verify_conn_to_server(NWCONN_HANDLE * conn, NWObjectID * id,
|
||||
}
|
||||
}
|
||||
if (group) {
|
||||
/*v 1.11 : if we talk to bindery we should not use NDS to test group membership ? */
|
||||
if (!(qflag & QF_BINDERY)) {
|
||||
NWDSContextHandle ctx;
|
||||
nuint32 c;
|
||||
@@ -847,7 +904,7 @@ nw_ctx_search(const char *user_cn, NWCONN_HANDLE conn, char *contexts, size_t ma
|
||||
NWDSContextHandle context;
|
||||
NWDSCCODE ccode;
|
||||
nuint32 iterationHandle;
|
||||
nint32 countObjectsSearched;
|
||||
nuint32 countObjectsSearched;
|
||||
nuint32 objCntr;
|
||||
nuint32 objCount;
|
||||
char objectName[MAX_DN_CHARS + 1];
|
||||
@@ -893,17 +950,15 @@ nw_ctx_search(const char *user_cn, NWCONN_HANDLE conn, char *contexts, size_t ma
|
||||
goto Exit2;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
In order to search, we need:
|
||||
A Filter Cursor (to build the search expression)
|
||||
A Filter Buffer (to store the expression; used by NWDSSearch)
|
||||
A Buffer to store which attributes we need information on
|
||||
A Result Buffer (to store the search results)
|
||||
*/
|
||||
/**********************************************************************
|
||||
* In order to search, we need: *
|
||||
* A Filter Cursor (to build the search expression) *
|
||||
* A Filter Buffer (to store the expression; used by NWDSSearch) *
|
||||
* A Buffer to store which attributes we need information on *
|
||||
* A Result Buffer (to store the search results) *
|
||||
**********************************************************************/
|
||||
|
||||
/*******************************************************************
|
||||
** Allocate Filter buffer and Cursor and populate
|
||||
*/
|
||||
/* Allocate Filter buffer and Cursor and populate */
|
||||
ccode = NWDSAllocBuf(DEFAULT_MESSAGE_LEN, &searchFilter);
|
||||
if (ccode) {
|
||||
syslog(LOG_NOTICE, "nw_ctx_search:NWDSAllocBuf returned: %d\n", ccode);
|
||||
@@ -1372,13 +1427,13 @@ free_nw_user_info(struct nw_user_info *ui)
|
||||
// so we should use this data ONLY in a "PAM_open_session" call back
|
||||
// that happens just after the successful login
|
||||
static void
|
||||
cleanup_user_info(pam_handle_t * pamh, void *data, int error_status)
|
||||
cleanup_user_info(UNUSED(pam_handle_t * pamh), void *data, UNUSED(int error_status))
|
||||
{
|
||||
free_nw_user_info((struct nw_user_info *) data);
|
||||
}
|
||||
|
||||
static int
|
||||
nw_retrieve_bindery_user_info(struct nw_user_info *ui, NWCONN_HANDLE conn, NWObjectID oid)
|
||||
nw_retrieve_bindery_user_info(struct nw_user_info *ui, NWCONN_HANDLE conn, UNUSED(NWObjectID oid))
|
||||
{
|
||||
|
||||
/* we have to give some support here since:
|
||||
@@ -1419,7 +1474,7 @@ nw_retrieve_bindery_user_info(struct nw_user_info *ui, NWCONN_HANDLE conn, NWObj
|
||||
if (ui->qflag & QF_DEBUG)
|
||||
syslog(LOG_NOTICE, "%s:got a full name %s for %s\n ", me, p.value, userName);
|
||||
|
||||
v = strdup(p.value);
|
||||
v = strdup((char*)p.value);
|
||||
if (!v) {
|
||||
syslog(LOG_WARNING, "%s:Not enough memory for strdup()\n", me);
|
||||
return ENOMEM;
|
||||
@@ -1437,13 +1492,13 @@ nw_retrieve_bindery_user_info(struct nw_user_info *ui, NWCONN_HANDLE conn, NWObj
|
||||
err = ncp_read_property_value(conn, NCP_BINDERY_USER, userName, 1, "HOME_DIRECTORY", &p);
|
||||
if (!err && p.value[0]) {
|
||||
char *v1;
|
||||
char *mark = strchr(p.value, ':');
|
||||
char *mark = strchr((char*)p.value, ':');
|
||||
if (mark && *(mark + 1)) {
|
||||
if (ui->qflag & QF_DEBUG)
|
||||
syslog(LOG_NOTICE, "%s:got a home directory %s for %s\n ", me, p.value, userName);
|
||||
|
||||
*mark = 0;
|
||||
v = strdup(p.value);
|
||||
v = strdup((char*)p.value);
|
||||
if (!v) {
|
||||
syslog(LOG_WARNING, "%s:Not enough memory for strdup()\n", me);
|
||||
return ENOMEM;
|
||||
@@ -1457,7 +1512,8 @@ nw_retrieve_bindery_user_info(struct nw_user_info *ui, NWCONN_HANDLE conn, NWObj
|
||||
ui->nwhomeServer = strdup(ui->messageServer);
|
||||
ui->messageServer = NULL;
|
||||
ui->nwhomeVolume = v;
|
||||
ui->nwhomePath = unixifyPathUC(v1);
|
||||
unixifyPathUC(v1);
|
||||
ui->nwhomePath = v1;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1592,7 +1648,7 @@ struct nw_home_info {
|
||||
};
|
||||
|
||||
static NWDSCCODE
|
||||
nds_pp_host_server(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
nds_pp_host_server(UNUSED(NWDSContextHandle ctx), const void *val, void *arg)
|
||||
{
|
||||
struct nw_home_info *hi = (struct nw_home_info *) arg;
|
||||
const char *src = val;
|
||||
@@ -1618,7 +1674,7 @@ nds_pp_host_server(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
}
|
||||
|
||||
static NWDSCCODE
|
||||
nds_pp_host_resource_name(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
nds_pp_host_resource_name(UNUSED(NWDSContextHandle ctx), const void *val, void *arg)
|
||||
{
|
||||
struct nw_home_info *hi = (struct nw_home_info *) arg;
|
||||
|
||||
@@ -1648,7 +1704,7 @@ nds_home_info(NWDSContextHandle ctx, const NWDSChar * objname, struct nw_home_in
|
||||
/** gather Unix groups informations */
|
||||
|
||||
static NWDSCCODE
|
||||
nds_ga_group_unixgid(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
nds_ga_group_unixgid(UNUSED(NWDSContextHandle ctx), const void *val, void *arg)
|
||||
{
|
||||
struct nw_group_info *gi = (struct nw_group_info *) arg;
|
||||
|
||||
@@ -1665,7 +1721,7 @@ nds_ga_group_unixgid(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
// eg. everyone --> users
|
||||
// staff --> root
|
||||
static NWDSCCODE
|
||||
nds_pp_group_location(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
nds_pp_group_location(UNUSED(NWDSContextHandle ctx), const void *val, void *arg)
|
||||
{
|
||||
struct nw_group_info *gi = (struct nw_group_info *) arg;
|
||||
const char *pt = (const char *) val;
|
||||
@@ -1727,10 +1783,10 @@ nds_group_info(NWDSContextHandle ctx, const NWDSChar * objname, struct nw_group_
|
||||
// PP:called only if no "Unix name has been found in NDS for that group
|
||||
// a string N:nnnnn in L attribute
|
||||
static NWDSCCODE
|
||||
nds_group_name(NWDSContextHandle ctx, const NWDSChar * objname, struct nw_group_info *gi)
|
||||
nds_group_name(UNUSED(NWDSContextHandle ctx), const NWDSChar * objname, struct nw_group_info *gi)
|
||||
{
|
||||
char *buff;
|
||||
const char *f;
|
||||
const unsigned char *f;
|
||||
int c;
|
||||
|
||||
/* Worst case: output is Z, two chars per one in input, and zero terminating byte */
|
||||
@@ -1739,8 +1795,8 @@ nds_group_name(NWDSContextHandle ctx, const NWDSChar * objname, struct nw_group_
|
||||
syslog(LOG_WARNING, "Not enough memory for strdup()\n");
|
||||
return ENOMEM;
|
||||
}
|
||||
f = objname;
|
||||
for (; (c = *((const unsigned char *) f)++) != 0; *buff++ = c) {
|
||||
f = (const unsigned char*)objname;
|
||||
for (; (c = *f++) != 0; *buff++ = c) {
|
||||
if (c >= 'a' && c <= 'z')
|
||||
continue;
|
||||
if (c >= 'A' && c <= 'Z') {
|
||||
@@ -1852,7 +1908,7 @@ build_groups_list(const struct nw_user_info *ui, char **list)
|
||||
|
||||
/************************************ helper functions to extract some user's properties **/
|
||||
static NWDSCCODE
|
||||
nds_ga_unixuid(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
nds_ga_unixuid(UNUSED(NWDSContextHandle ctx), const void *val, void *arg)
|
||||
{
|
||||
struct nw_user_info *ui = (struct nw_user_info *) arg;
|
||||
if (ui->uid == (uid_t) -1) {
|
||||
@@ -1865,7 +1921,7 @@ nds_ga_unixuid(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
}
|
||||
|
||||
static NWDSCCODE
|
||||
nds_ga_unixpgid(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
nds_ga_unixpgid(UNUSED(NWDSContextHandle ctx), const void *val, void *arg)
|
||||
{
|
||||
struct nw_user_info *ui = (struct nw_user_info *) arg;
|
||||
|
||||
@@ -1882,7 +1938,7 @@ nds_ga_unixpgid(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
// does Netware has two synonyms for the same property (UNIX:GID"
|
||||
// and UNIX:Primary GroupID???
|
||||
static NWDSCCODE
|
||||
nds_ga_unixgid(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
nds_ga_unixgid(UNUSED(NWDSContextHandle ctx), const void *val, void *arg)
|
||||
{
|
||||
struct nw_user_info *ui = (struct nw_user_info *) arg;
|
||||
|
||||
@@ -1896,7 +1952,7 @@ nds_ga_unixgid(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
}
|
||||
|
||||
static NWDSCCODE
|
||||
nds_ga_unixhome(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
nds_ga_unixhome(UNUSED(NWDSContextHandle ctx), const void *val, void *arg)
|
||||
{
|
||||
struct nw_user_info *ui = (struct nw_user_info *) arg;
|
||||
|
||||
@@ -1915,7 +1971,7 @@ nds_ga_unixhome(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
}
|
||||
|
||||
static NWDSCCODE
|
||||
nds_ga_unixshell(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
nds_ga_unixshell(UNUSED(NWDSContextHandle ctx), const void *val, void *arg)
|
||||
{
|
||||
struct nw_user_info *ui = (struct nw_user_info *) arg;
|
||||
|
||||
@@ -1963,7 +2019,7 @@ nds_update_gecos(struct nw_user_info *ui, const char *str)
|
||||
|
||||
// PP we append the Comment after the full name, separated by a comma
|
||||
static NWDSCCODE
|
||||
nds_ga_unixcomment(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
nds_ga_unixcomment(UNUSED(NWDSContextHandle ctx), const void *val, void *arg)
|
||||
{
|
||||
struct nw_user_info *ui = (struct nw_user_info *) arg;
|
||||
|
||||
@@ -1976,7 +2032,7 @@ nds_ga_unixcomment(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
// PP can be any naming attribute returning a SYN_CI_STRING see define before nds_user_info()
|
||||
// PP we add the name before any comment that can be there
|
||||
static NWDSCCODE
|
||||
nds_ga_gecos(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
nds_ga_gecos(UNUSED(NWDSContextHandle ctx), const void *val, void *arg)
|
||||
{
|
||||
struct nw_user_info *ui = (struct nw_user_info *) arg;
|
||||
NWDSCCODE err;
|
||||
@@ -2227,46 +2283,59 @@ nds_pp_location(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
}
|
||||
#endif
|
||||
|
||||
static NWDSCCODE
|
||||
nds_pp_home_directory(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
{
|
||||
static NWDSCCODE nds_pp_home_directory(NWDSContextHandle ctx,
|
||||
const void* val,
|
||||
void* arg) {
|
||||
struct nw_user_info *ui = (struct nw_user_info *) arg;
|
||||
const Path_T *pa = (const Path_T *) val;
|
||||
NWDSCCODE dserr;
|
||||
struct nw_home_info hi = { NULL, NULL };
|
||||
char *v;
|
||||
char * p;
|
||||
|
||||
if (ui->qflag & QF_DEBUG)
|
||||
syslog(LOG_NOTICE, "start of NW home dir got %s %s \n", pa->volumeName, pa->path);
|
||||
|
||||
if (ui->qflag & QF_DEBUG) syslog(LOG_NOTICE, "start of NW home dir got %s %s \n",pa->volumeName,pa->path);
|
||||
dserr = nds_home_info(ctx, (char *) pa->volumeName, &hi);
|
||||
if (dserr)
|
||||
return dserr;
|
||||
if (ui->qflag & QF_DEBUG)
|
||||
syslog(LOG_NOTICE, "got %s %s ", hi.hs, hi.hrn);
|
||||
if (ui->qflag & QF_DEBUG) syslog(LOG_NOTICE, "got %s %s ",hi.hs,hi.hrn);
|
||||
|
||||
ui->nwhomeServer = hi.hs;
|
||||
ui->nwhomeVolume = hi.hrn;
|
||||
|
||||
v = strdup(pa->path);
|
||||
// revision 1.27. Do something smart ;-) if %LOGIN_ or %CN in the path to home.
|
||||
if ((p = strstr(pa->path,"%CN")) != NULL) {
|
||||
*p=0; // chop off %CN and replace by user's name
|
||||
v = concat2m(pa->path,ui->name);
|
||||
} else if ((p = strstr(pa->path, "%LOG")) != NULL) { // chop off %LOGIN_NAME or and replace by user's name up to 8 chars
|
||||
char aux[9];
|
||||
*p=0;
|
||||
|
||||
strncpy(aux, ui->name, 8);
|
||||
aux[8] = 0;
|
||||
v = concat2m(pa->path, aux);
|
||||
} else {
|
||||
v = strdup(pa->path);
|
||||
}
|
||||
if (!v) {
|
||||
syslog(LOG_WARNING, "Not enough memory for strdup()\n");
|
||||
return ENOMEM;
|
||||
}
|
||||
ui->nwhomePath = unixifyPathUC(v);
|
||||
unixifyPathUC(v);
|
||||
ui->nwhomePath = v;
|
||||
if (ui->qflag & QF_DEBUG)
|
||||
syslog(LOG_NOTICE, "end of NW home dir\n");
|
||||
syslog(LOG_NOTICE, "end of NW home dir: final path UNIX %s \n",ui->nwhomePath);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static NWDSCCODE
|
||||
nds_pp_smtp_email_address(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
{
|
||||
static NWDSCCODE nds_pp_smtp_email_address(UNUSED(NWDSContextHandle ctx),
|
||||
const void* val,
|
||||
void* arg) {
|
||||
struct nw_user_info *ui = (struct nw_user_info *) arg;
|
||||
const EMail_Address_T *em = (const EMail_Address_T *) val;
|
||||
char *v;
|
||||
|
||||
if (ui->qflag & QF_DEBUG)
|
||||
syslog(LOG_NOTICE, "start of NW smtp email got %u %s\n", em->type, em->address);
|
||||
if (ui->qflag & QF_DEBUG) syslog(LOG_NOTICE, "start of NW smtp email got %u %s\n",em->type,em->address);
|
||||
// pick up only the first with type=0 (SMTP) !
|
||||
if ((!ui->emailSMTP && em->type == 0) && (!strncmp(em->address, "SMTP:", 5))) {
|
||||
// skip header SMTP: must be if type is 0 ?
|
||||
@@ -2284,7 +2353,7 @@ nds_pp_smtp_email_address(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
}
|
||||
|
||||
static NWDSCCODE
|
||||
nds_pp_ldap_email_address(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
nds_pp_ldap_email_address(UNUSED(NWDSContextHandle ctx), const void *val, void *arg)
|
||||
{
|
||||
struct nw_user_info *ui = (struct nw_user_info *) arg;
|
||||
|
||||
@@ -2307,7 +2376,7 @@ nds_pp_ldap_email_address(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
}
|
||||
|
||||
static NWDSCCODE
|
||||
nds_pp_message_server(NWDSContextHandle ctx, const void *val, void *arg)
|
||||
nds_pp_message_server(UNUSED(NWDSContextHandle ctx), const void *val, void *arg)
|
||||
{
|
||||
struct nw_user_info *ui = (struct nw_user_info *) arg;
|
||||
|
||||
@@ -2467,7 +2536,7 @@ nw_retrieve_nds_user_info(struct nw_user_info *ui, NWCONN_HANDLE conn, NWObjectI
|
||||
bailoutctx:;
|
||||
NWDSFreeContext(ctx);
|
||||
bailout:;
|
||||
if (!err & (ui->qflag & QF_DEBUG))
|
||||
if ((!err) && (ui->qflag & QF_DEBUG))
|
||||
syslog(LOG_NOTICE, "%u %u %s %s %s\n", ui->uid, ui->gid, ui->dir, ui->gecos, ui->shell);
|
||||
return err;
|
||||
}
|
||||
@@ -2481,7 +2550,7 @@ nw_retrieve_user_info(struct nw_user_info *ui)
|
||||
long err;
|
||||
NWObjectID oid;
|
||||
|
||||
err = pam_get_data(ui->pamh, "pam.ncpfs.passwd.conn", (const void **) &conn);
|
||||
err = my_pam_get_data(ui->pamh, "pam.ncpfs.passwd.conn", &conn);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -2498,7 +2567,7 @@ nw_retrieve_user_info(struct nw_user_info *ui)
|
||||
|
||||
static int
|
||||
exechelper(const char *program, const char *argv[], const char *username)
|
||||
{ // NULL is PAM so root
|
||||
{
|
||||
int i;
|
||||
int err;
|
||||
|
||||
@@ -2512,10 +2581,10 @@ exechelper(const char *program, const char *argv[], const char *username)
|
||||
int status;
|
||||
|
||||
switch (waitpid(i, &status, 0)) {
|
||||
case 0:
|
||||
case (pid_t)-1:
|
||||
syslog(LOG_ERR, "waitpid unexpectedly terminated: %s\n", strerror(errno));
|
||||
return -1;
|
||||
case (pid_t) - 1:
|
||||
case 0:
|
||||
syslog(LOG_ERR, "waitpid: Fatal: No child processes\n");
|
||||
return -1;
|
||||
default:
|
||||
@@ -2620,7 +2689,7 @@ do_chfn(const char *uname, const char *gecos, int verbose)
|
||||
if (p) {
|
||||
*p++ = '\0';
|
||||
} else {
|
||||
(const char *) p = ""; /* Use empty string for deletion */
|
||||
p = (char*)"";
|
||||
}
|
||||
|
||||
argv[i++] = "-f";
|
||||
@@ -3420,7 +3489,8 @@ mergeZenFlags(struct nw_user_info *ui)
|
||||
// su -l USER -c "ncpmount ..... "
|
||||
static int
|
||||
mount_nwhome(const char *unixname, const char *uname, // nw FQDN name
|
||||
const char *pwd, const char *server, const char *volume, const char *path, const char *mntpoint, int uid, int zenFlag, int useIP, int verbose)
|
||||
const char *pwd, const char *server, const char *volume,
|
||||
const char *path, const char *mntpoint, int uid, UNUSED(int zenFlag), int useIP, int verbose)
|
||||
{
|
||||
|
||||
const char *argv[30];
|
||||
@@ -3713,7 +3783,7 @@ nw_create_nwclient(const char *uname, const struct nw_user_info *ui, const struc
|
||||
}
|
||||
|
||||
static int
|
||||
nw_process_forward_file(const char *uname, const struct nw_user_info *ui, const struct passwd *pwd)
|
||||
nw_process_forward_file(UNUSED(const char *uname), const struct nw_user_info *ui, const struct passwd *pwd)
|
||||
{
|
||||
// what we do here it to setup a forward to any email address found in NDS
|
||||
// we do it during the authentication part so if the Netware home directory is mounted
|
||||
@@ -3769,7 +3839,7 @@ nw_process_forward_file(const char *uname, const struct nw_user_info *ui, const
|
||||
|
||||
/******************************* check for allowed remote access by zen ***/
|
||||
|
||||
#if 1
|
||||
#if 0
|
||||
static void
|
||||
report(int err, const char *what, const char *info)
|
||||
{
|
||||
@@ -3786,19 +3856,19 @@ report(int err, const char *what, const char *info)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void __attribute__((unused))
|
||||
test_pam_items(const char *me, pam_handle_t * pamh)
|
||||
{
|
||||
const char *info;
|
||||
int err;
|
||||
syslog(LOG_NOTICE, "%s testing for PAM items \n", me);
|
||||
err = pam_get_item(pamh, PAM_RUSER, (const void **) &info);
|
||||
err = my_pam_get_item(pamh, PAM_RUSER, &info);
|
||||
report(err, "PAM_RUSER", info);
|
||||
err = pam_get_item(pamh, PAM_SERVICE, (const void **) &info);
|
||||
err = my_pam_get_item(pamh, PAM_SERVICE, &info);
|
||||
report(err, "PAM_SERVICE", info);
|
||||
err = pam_get_item(pamh, PAM_RHOST, (const void **) &info);
|
||||
err = my_pam_get_item(pamh, PAM_RHOST, &info);
|
||||
report(err, "PAM_RHOST", info);
|
||||
err = pam_get_item(pamh, PAM_TTY, (const void **) &info);
|
||||
err = my_pam_get_item(pamh, PAM_TTY, &info);
|
||||
report(err, "PAM_TTY", info);
|
||||
}
|
||||
#endif
|
||||
@@ -3844,7 +3914,7 @@ static struct pam_auth_element pam_auth_table[] = {
|
||||
};
|
||||
|
||||
static int
|
||||
process_zenflag_remote(pam_handle_t * pamh, const char *user, struct nw_user_info *ui)
|
||||
process_zenflag_remote(pam_handle_t * pamh, UNUSED(const char *user), struct nw_user_info *ui)
|
||||
{
|
||||
int err;
|
||||
char *service;
|
||||
@@ -3863,7 +3933,7 @@ process_zenflag_remote(pam_handle_t * pamh, const char *user, struct nw_user_inf
|
||||
syslog(LOG_NOTICE, "Remote host and tty port are not checked\n");
|
||||
return PAM_SUCCESS;
|
||||
}
|
||||
err = pam_get_item(pamh, PAM_TTY, (const void **) &tty);
|
||||
err = my_pam_get_item(pamh, PAM_TTY, &tty);
|
||||
if (err != PAM_SUCCESS)
|
||||
return PAM_SYSTEM_ERR;
|
||||
// local access
|
||||
@@ -3883,19 +3953,19 @@ process_zenflag_remote(pam_handle_t * pamh, const char *user, struct nw_user_inf
|
||||
}
|
||||
}
|
||||
|
||||
err = pam_get_item(pamh, PAM_RHOST, (const void **) &rhost);
|
||||
err = my_pam_get_item(pamh, PAM_RHOST, &rhost);
|
||||
if (err != PAM_SUCCESS) {
|
||||
syslog(LOG_WARNING, "error getting PAM_RHOST");
|
||||
return PAM_SYSTEM_ERR;
|
||||
}
|
||||
|
||||
err = pam_get_item(pamh, PAM_RUSER, (const void **) &ruser);
|
||||
err = my_pam_get_item(pamh, PAM_RUSER, &ruser);
|
||||
if (err != PAM_SUCCESS) {
|
||||
syslog(LOG_WARNING, "error getting PAM_RUSER");
|
||||
return PAM_SYSTEM_ERR;
|
||||
}
|
||||
|
||||
err = pam_get_item(pamh, PAM_SERVICE, (const void **) &service);
|
||||
err = my_pam_get_item(pamh, PAM_SERVICE, &service);
|
||||
if (err != PAM_SUCCESS) {
|
||||
syslog(LOG_WARNING, "error getting PAM_SERVICE");
|
||||
return PAM_SYSTEM_ERR;
|
||||
@@ -3946,7 +4016,7 @@ process_zenflag_remote(pam_handle_t * pamh, const char *user, struct nw_user_inf
|
||||
|
||||
// must be done at this stage since they requires the user's current passwd
|
||||
static int
|
||||
process_zenflag_auth(pam_handle_t * pamh, const char *user, struct nw_user_info *ui, const struct passwd *pwd, const char *userpass)
|
||||
process_zenflag_auth(UNUSED(pam_handle_t * pamh), const char *user, struct nw_user_info *ui, const struct passwd *pwd, const char *userpass)
|
||||
{
|
||||
|
||||
int err; // ignore errors for now
|
||||
@@ -4066,7 +4136,7 @@ pam_sm_authenticate(pam_handle_t * pamh, int flags, int argc, const char **argv)
|
||||
goto quit;
|
||||
|
||||
/* Get password */
|
||||
pam_get_item(pamh, PAM_AUTHTOK, (void *) &p);
|
||||
my_pam_get_item(pamh, PAM_AUTHTOK, &p);
|
||||
|
||||
if (!p) {
|
||||
retval = _set_auth_tok(pamh, flags);
|
||||
@@ -4074,12 +4144,12 @@ pam_sm_authenticate(pam_handle_t * pamh, int flags, int argc, const char **argv)
|
||||
goto quit;
|
||||
}
|
||||
|
||||
pam_get_item(pamh, PAM_AUTHTOK, (void *) &p);
|
||||
my_pam_get_item(pamh, PAM_AUTHTOK, &p);
|
||||
|
||||
/* v 1.22 check the service is not a screensaver */
|
||||
{
|
||||
const char *service;
|
||||
if ((retval = pam_get_item(pamh, PAM_SERVICE, (const void **) &service)) != PAM_SUCCESS)
|
||||
if ((retval = my_pam_get_item(pamh, PAM_SERVICE, &service)) != PAM_SUCCESS)
|
||||
goto quit;
|
||||
inf.isScreenSaverRelogin = strstr(service, "saver") != NULL;
|
||||
// report (retval, "PAM_SERVICE",service);
|
||||
@@ -4261,7 +4331,10 @@ pam_sm_authenticate(pam_handle_t * pamh, int flags, int argc, const char **argv)
|
||||
*/
|
||||
|
||||
PAM_EXTERN int
|
||||
pam_sm_setcred(pam_handle_t * pamh, int flags, int argc, const char **argv)
|
||||
pam_sm_setcred(UNUSED(pam_handle_t * pamh),
|
||||
UNUSED(int flags),
|
||||
UNUSED(int argc),
|
||||
UNUSED(const char **argv))
|
||||
{
|
||||
//return PAM_IGNORE;
|
||||
return PAM_SUCCESS;
|
||||
@@ -4272,7 +4345,10 @@ pam_sm_setcred(pam_handle_t * pamh, int flags, int argc, const char **argv)
|
||||
*/
|
||||
|
||||
PAM_EXTERN int
|
||||
pam_sm_acct_mgmt(pam_handle_t * pamh, int flags, int argc, const char **argv)
|
||||
pam_sm_acct_mgmt(UNUSED(pam_handle_t * pamh),
|
||||
UNUSED(int flags),
|
||||
UNUSED(int argc),
|
||||
UNUSED(const char **argv))
|
||||
{
|
||||
//return PAM_IGNORE;
|
||||
return PAM_SUCCESS;
|
||||
@@ -4282,7 +4358,7 @@ pam_sm_acct_mgmt(pam_handle_t * pamh, int flags, int argc, const char **argv)
|
||||
static int
|
||||
nw_attempt_passwd_prelim_server(pam_handle_t * pamh,
|
||||
const char *server, const char *user, const char *oldpwd,
|
||||
int qflag, const char *group, int flags)
|
||||
int qflag, const char *group, UNUSED(int flags))
|
||||
{
|
||||
struct ncp_conn *conn;
|
||||
int err;
|
||||
@@ -4298,7 +4374,7 @@ nw_attempt_passwd_prelim_server(pam_handle_t * pamh,
|
||||
static int
|
||||
nw_attempt_passwd_prelim_tree(pam_handle_t * pamh,
|
||||
const char *tree, const char *user, const char *contexts, const char *oldpwd,
|
||||
int qflag, const char *group, int flags, nuint nameFormat)
|
||||
int qflag, const char *group, UNUSED(int flags), nuint nameFormat)
|
||||
{
|
||||
struct ncp_conn *conn;
|
||||
int err;
|
||||
@@ -4322,12 +4398,6 @@ nw_attempt_passwd_post(pam_handle_t * pamh, const char *pwd, const char *oldpwd,
|
||||
err = PAM_AUTHTOK_ERR;
|
||||
if (!(flags & PAM_UPDATE_AUTHTOK))
|
||||
goto bailout_nf;
|
||||
err = pam_get_data(pamh, "pam.ncpfs.passwd.conn", (const void **) &conn);
|
||||
if (err)
|
||||
goto bailout_nf;
|
||||
err = nw_get_nwid(conn, &oid, qflag);
|
||||
if (err)
|
||||
goto bailout_nf;
|
||||
|
||||
oldpwdup = strdup(oldpwd);
|
||||
if (!oldpwd) {
|
||||
@@ -4343,6 +4413,15 @@ nw_attempt_passwd_post(pam_handle_t * pamh, const char *pwd, const char *oldpwd,
|
||||
}
|
||||
str_upper(pwdup);
|
||||
|
||||
err = my_pam_get_data(pamh, "pam.ncpfs.passwd.conn", &conn);
|
||||
if (err)
|
||||
goto bailout;
|
||||
err = nw_get_nwid(conn, &oid, qflag);
|
||||
if (err)
|
||||
goto bailout;
|
||||
|
||||
|
||||
|
||||
if (qflag & QF_BINDERY) {
|
||||
struct ncp_bindery_object uinfo;
|
||||
struct ncp_bindery_object u0;
|
||||
@@ -4410,13 +4489,17 @@ nw_attempt_passwd_post(pam_handle_t * pamh, const char *pwd, const char *oldpwd,
|
||||
syslog(LOG_DEBUG, "User %s has succesfully changed its NW pasword\n", username);
|
||||
bailoutctx:;
|
||||
NWDSFreeContext(ctx);
|
||||
|
||||
}
|
||||
bailout:;
|
||||
// set it to null so nw_clean_up_conn will do no harm
|
||||
err = pam_set_data(pamh, "pam.ncpfs.passwd.conn", NULL, NULL);
|
||||
if (qflag & QF_DEBUG)
|
||||
syslog (LOG_NOTICE,"pam end of PWD:setting conn to NULL %lx",err);
|
||||
free(pwdup);
|
||||
bailout_nf2:;
|
||||
free(oldpwdup);
|
||||
bailout_nf:;
|
||||
pam_set_data(pamh, "ncpfs.pam.passwd.conn", NULL, NULL);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -4597,7 +4680,7 @@ quit:;
|
||||
// will process session on and session end zenFlag
|
||||
|
||||
static int
|
||||
nw_process_nwinfos_file(const char *uname, const struct nw_user_info *ui, const struct passwd *pwd)
|
||||
nw_process_nwinfos_file(UNUSED(const char *uname), const struct nw_user_info *ui, const struct passwd *pwd)
|
||||
{
|
||||
// create a ~/.nwinfos file that can be "sourced" in future scripts
|
||||
FILE *f;
|
||||
@@ -4686,7 +4769,7 @@ nw_process_nwinfos_file(const char *uname, const struct nw_user_info *ui, const
|
||||
|
||||
static int
|
||||
exechelper2(const char *program, // script name just to test if the command exist
|
||||
const char *argv[], // extras arguments to -c program
|
||||
const char *argv[], // extras arguments to -c program
|
||||
const char *unixname, // user to su to
|
||||
int verbose)
|
||||
{
|
||||
@@ -4742,7 +4825,7 @@ process_zenflag_session_opening(const char *user, const struct nw_user_info *ui,
|
||||
}
|
||||
|
||||
PAM_EXTERN int
|
||||
pam_sm_open_session(pam_handle_t * pamh, int flags, int argc, const char **argv)
|
||||
pam_sm_open_session(pam_handle_t * pamh, UNUSED(int flags), int argc, const char **argv)
|
||||
{
|
||||
/* NO WAY to mount netware home here
|
||||
passord is lost, we are in the pam_session now.
|
||||
@@ -4750,8 +4833,8 @@ pam_sm_open_session(pam_handle_t * pamh, int flags, int argc, const char **argv)
|
||||
but I am not sure this is really safe !!!
|
||||
we only process here some ZENFLAGS red from NDS
|
||||
and stored in the PAM item "pam.ncpfs.user_info"
|
||||
|
||||
*/
|
||||
struct ncp_conn *conn;
|
||||
struct nw_user_info *ui;
|
||||
const struct passwd *pwd;
|
||||
struct stat stt;
|
||||
@@ -4791,8 +4874,8 @@ pam_sm_open_session(pam_handle_t * pamh, int flags, int argc, const char **argv)
|
||||
if (qflag & QF_DEBUG) {
|
||||
syslog(LOG_NOTICE, "start of session \n");
|
||||
}
|
||||
// just in case user has been removed ???
|
||||
err = pam_get_item(pamh, PAM_USER, (const void **) &user);
|
||||
// just in case user has been removed ???
|
||||
err = my_pam_get_item(pamh, PAM_USER, &user);
|
||||
if (err != PAM_SUCCESS || user == NULL || *user == '\0')
|
||||
goto doneok;
|
||||
|
||||
@@ -4809,16 +4892,25 @@ pam_sm_open_session(pam_handle_t * pamh, int flags, int argc, const char **argv)
|
||||
}
|
||||
// get back user's info stored in PAM by the authentification section
|
||||
// no password there !
|
||||
err = pam_get_data(pamh, "pam.ncpfs.user_info", (const void **) &ui);
|
||||
err = my_pam_get_data(pamh, "pam.ncpfs.user_info", &ui);
|
||||
if (!err) {
|
||||
if (qflag & QF_DEBUG)
|
||||
syslog(LOG_NOTICE, "got user info back %u", ui->uid);
|
||||
process_zenflag_session_opening(user, ui, pwd);
|
||||
} else if (qflag & QF_DEBUG)
|
||||
syslog(LOG_DEBUG, "failure reading back pam.ncpfs.user_info %u\n", err);
|
||||
} else {
|
||||
if (qflag & QF_DEBUG)
|
||||
syslog(LOG_DEBUG, "failure reading back pam.ncpfs.user_info %u\n", err);
|
||||
}
|
||||
// no problem, he is authenticated but "zen failed"
|
||||
doneok:
|
||||
pam_set_data(pamh, "pam.ncpfs.passwd.conn", NULL, NULL);
|
||||
// revision 1.27 we get rid of the authenticating connection .
|
||||
// it is not in /etc/mtab, so it caoonot be "reused" by ncpmap anyway
|
||||
err = my_pam_get_data(pamh, "pam.ncpfs.passwd.conn", &conn);
|
||||
if (!err && conn) {
|
||||
err = pam_set_data(pamh, "pam.ncpfs.passwd.conn", NULL, NULL);
|
||||
if (qflag & QF_DEBUG)
|
||||
syslog (LOG_NOTICE,"pam start of session :setting internal conn to NULL %x",err);
|
||||
}
|
||||
return PAM_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -4828,7 +4920,7 @@ process_zenflag_session_closing(const char *user, const struct nw_user_info *ui,
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
// first zenScripts in case they opeate on the mounted nwhome !
|
||||
// first zenScripts in case they opeate on the mounted nwhome !
|
||||
if (ui->zenFlag & ZF_CLOSING_SCRIPTS) {
|
||||
const char *argv[5];
|
||||
|
||||
@@ -4836,7 +4928,7 @@ process_zenflag_session_closing(const char *user, const struct nw_user_info *ui,
|
||||
argv[2] = NWINFOS_FILE; // actual file name
|
||||
argv[3] = NULL;
|
||||
// argument 1 = location of nwinfos file to source in (=user's home dir)
|
||||
//argument 2 = actual file name (default=.nwinfos)
|
||||
// argument 2 = actual file name (default=.nwinfos)
|
||||
|
||||
if (ui->qflag & QF_DEBUG)
|
||||
syslog(LOG_NOTICE, "running closing scripts.\n");
|
||||
@@ -4865,7 +4957,7 @@ pam_do_close_session(const char *user, const struct nw_user_info *ui, const stru
|
||||
}
|
||||
|
||||
PAM_EXTERN int
|
||||
pam_sm_close_session(pam_handle_t * pamh, int flags, int argc, const char **argv)
|
||||
pam_sm_close_session(pam_handle_t * pamh, UNUSED(int flags), int argc, const char **argv)
|
||||
// logout fom Netware at session end
|
||||
// no complains
|
||||
{
|
||||
@@ -4909,7 +5001,7 @@ pam_sm_close_session(pam_handle_t * pamh, int flags, int argc, const char **argv
|
||||
syslog(LOG_NOTICE, "end of session\n");
|
||||
}
|
||||
// just in case user has been removed ???
|
||||
err = pam_get_item(pamh, PAM_USER, (const void **) &user);
|
||||
err = my_pam_get_item(pamh, PAM_USER, &user);
|
||||
if (err != PAM_SUCCESS || user == NULL || *user == '\0')
|
||||
goto doneok;
|
||||
|
||||
@@ -4927,7 +5019,7 @@ pam_sm_close_session(pam_handle_t * pamh, int flags, int argc, const char **argv
|
||||
goto doneok;
|
||||
}
|
||||
// read back all user data
|
||||
err = pam_get_data(pamh, "pam.ncpfs.user_info", (const void **) &ui);
|
||||
err = my_pam_get_data(pamh, "pam.ncpfs.user_info", &ui);
|
||||
if (!err) {
|
||||
if (qflag & QF_DEBUG)
|
||||
syslog(LOG_NOTICE, "got it back %u", ui->uid);
|
||||
@@ -4940,8 +5032,6 @@ pam_sm_close_session(pam_handle_t * pamh, int flags, int argc, const char **argv
|
||||
free_nw_user_info(ui); // forget about it
|
||||
doneok:
|
||||
closelog();
|
||||
|
||||
pam_set_data(pamh, "pam.ncpfs.passwd.conn", NULL, NULL);
|
||||
return PAM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ static int converse( pam_handle_t *pamh,
|
||||
int retval;
|
||||
struct pam_conv *conv;
|
||||
|
||||
retval = pam_get_item( pamh, PAM_CONV, (const void **) &conv ) ;
|
||||
retval = my_pam_get_item(pamh, PAM_CONV, &conv);
|
||||
if ( retval == PAM_SUCCESS )
|
||||
{
|
||||
retval = conv->conv( nargs,
|
||||
|
||||
@@ -14,5 +14,20 @@ int _set_auth_tok(pam_handle_t *pamh, int flags);
|
||||
int _set_oldauth_tok(pam_handle_t *pamh, int flags);
|
||||
int _read_new_pwd(pam_handle_t *pamh, int flags);
|
||||
|
||||
#define UNUSED(x) x __attribute__((unused))
|
||||
|
||||
static inline int my_pam_get_item(const pam_handle_t *pamh,
|
||||
int item_type,
|
||||
void *item) {
|
||||
return pam_get_item(pamh, item_type, (const void **)item);
|
||||
}
|
||||
|
||||
static inline int my_pam_get_data(const pam_handle_t *pamh,
|
||||
const char *module_data_name,
|
||||
void *data) {
|
||||
return pam_get_data(pamh, module_data_name, (const void **)data);
|
||||
}
|
||||
|
||||
|
||||
#endif /* __SUPPORT_H__ */
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ ncpfs.int: ncpfs.i
|
||||
set -e; sed -e 's/\\$$/PlAcElFhErE \\/' < ncpfs.i | cpp -E -C -P | sed -e "`echo -e 's/PlAcElFhErE /\\\\\\n/g'`" > ncpfs.int
|
||||
|
||||
ncpfs_wrap.c: ncpfs.int
|
||||
swig -perl5 -v -xslike -shadow -I../../include ncpfs.int
|
||||
#swig -perl5 -v -shadow -I../../include ncpfs.int
|
||||
swig -perl5 -v -xslike -shadow -nocleanup -I../../../include ncpfs.int
|
||||
|
||||
EOF
|
||||
}
|
||||
@@ -15,9 +14,10 @@ EOF
|
||||
WriteMakefile(
|
||||
NAME => 'ncpfs',
|
||||
LIBS => ['-lncp'],
|
||||
INC => '-I../../include',
|
||||
INC => '-I../../../include',
|
||||
OBJECT => 'ncpfs_wrap.o',
|
||||
DEFINE => '-W -Wall -Wno-unused -D_GNU_SOURCE',
|
||||
clean => { FILES => 'ncpfs.int ncpfs.pm ncpfs_wrap.c' }
|
||||
clean => { FILES => 'ncpfs.int ncpfs.pm ncpfs_wrap.c' },
|
||||
dynamic_lib => { OTHERLDFLAGS => '-L../../../lib' },
|
||||
);
|
||||
|
||||
@@ -538,12 +538,12 @@ emit_getXStructArray(NCPTrustee, struct ncp_trustee_struct)
|
||||
#define gettiedinfo() \
|
||||
sv = MyConvertPtr(ST(0), (void**)&v, &len, NULL); \
|
||||
if (!sv) { \
|
||||
Perl_croak(aTHX_ "Type error in argument 1 of " __FUNCTION__); \
|
||||
Perl_croak(aTHX_ "Type error in argument 1 of %s", __FUNCTION__); \
|
||||
XSRETURN(1); \
|
||||
} \
|
||||
avlen = getAVLen(sv); \
|
||||
if (avlen <= 0) { \
|
||||
Perl_croak(aTHX_ "Type error in argument 1 of " __FUNCTION__); \
|
||||
Perl_croak(aTHX_ "Type error in argument 1 of %s", __FUNCTION__); \
|
||||
XSRETURN(1); \
|
||||
} \
|
||||
len = len / avlen;
|
||||
@@ -551,12 +551,12 @@ emit_getXStructArray(NCPTrustee, struct ncp_trustee_struct)
|
||||
#define gettiedPVinfo() \
|
||||
sv = MyConvertPtr(ST(0), (void**)&v, &len, NULL); \
|
||||
if (!sv) { \
|
||||
Perl_croak(aTHX_ "Type error in argument 1 of " __FUNCTION__); \
|
||||
Perl_croak(aTHX_ "Type error in argument 1 of %s", __FUNCTION__); \
|
||||
XSRETURN(1); \
|
||||
} \
|
||||
avlen = getAVTypeLen(sv, &name); \
|
||||
if (avlen <= 0) { \
|
||||
Perl_croak(aTHX_ "Type error in argument 1 of " __FUNCTION__); \
|
||||
Perl_croak(aTHX_ "Type error in argument 1 of %s", __FUNCTION__); \
|
||||
XSRETURN(1); \
|
||||
} \
|
||||
len = len / avlen;
|
||||
@@ -566,7 +566,7 @@ XS(_wrap_uvar_fetchsize) {
|
||||
decltied;
|
||||
|
||||
if (items != 1) {
|
||||
Perl_croak(aTHX_ "Usage: " __FUNCTION__ "(uv);");
|
||||
Perl_croak(aTHX_ "Usage: %s(uv);", __FUNCTION__);
|
||||
XSRETURN(1);
|
||||
}
|
||||
gettiedinfo();
|
||||
@@ -578,7 +578,7 @@ XS(_wrap_uvar_storesize) {
|
||||
decltied;
|
||||
|
||||
if (items != 2) {
|
||||
Perl_croak(aTHX_ "Usage: " __FUNCTION__ "(uv, newsize);");
|
||||
Perl_croak(aTHX_ "Usage: %s(uv, newsize);", __FUNCTION__);
|
||||
XSRETURN(1);
|
||||
}
|
||||
gettiedinfo();
|
||||
@@ -594,7 +594,7 @@ XS(_wrap_uvar_exists) {
|
||||
UV idx;
|
||||
|
||||
if (items != 2) {
|
||||
Perl_croak(aTHX_ "Usage: " __FUNCTION__ "(uv, index);");
|
||||
Perl_croak(aTHX_ "Usage: %s(uv, index);", __FUNCTION__);
|
||||
XSRETURN(1);
|
||||
}
|
||||
gettiedinfo();
|
||||
@@ -608,7 +608,7 @@ XS(_wrap_uvar_fetch) {
|
||||
UV idx;
|
||||
|
||||
if (items != 2) {
|
||||
Perl_croak(aTHX_ "Usage: " __FUNCTION__ "(uv, index);");
|
||||
Perl_croak(aTHX_ "Usage: %s(uv, index);", __FUNCTION__);
|
||||
XSRETURN(1);
|
||||
}
|
||||
gettiedinfo();
|
||||
@@ -639,7 +639,7 @@ XS(_wrap_pvar_fetch) {
|
||||
UV idx;
|
||||
|
||||
if (items != 2) {
|
||||
Perl_croak(aTHX_ "Usage: " __FUNCTION__ "(uv, index);");
|
||||
Perl_croak(aTHX_ "Usage: %s(uv, index);", __FUNCTION__);
|
||||
XSRETURN(1);
|
||||
}
|
||||
gettiedPVinfo();
|
||||
@@ -662,7 +662,7 @@ XS(_wrap_uvar_store) {
|
||||
unsigned char* b;
|
||||
|
||||
if (items != 3) {
|
||||
Perl_croak(aTHX_ "Usage: " __FUNCTION__ "(uv, index, value);");
|
||||
Perl_croak(aTHX_ "Usage: %s(uv, index, value);", __FUNCTION__);
|
||||
XSRETURN(1);
|
||||
}
|
||||
gettiedinfo();
|
||||
@@ -694,7 +694,7 @@ XS(_wrap_pvar_store) {
|
||||
unsigned char* data;
|
||||
|
||||
if (items != 3) {
|
||||
Perl_croak(aTHX_ "Usage: " __FUNCTION__ "(uv, index, value);");
|
||||
Perl_croak(aTHX_ "Usage: %s(uv, index, value);", __FUNCTION__);
|
||||
XSRETURN(1);
|
||||
}
|
||||
gettiedPVinfo();
|
||||
@@ -803,7 +803,7 @@ static void _newAVitemPV(pTHX_ AV* av, const char* val) {
|
||||
}
|
||||
%}
|
||||
|
||||
%typemap(perl5,ignore) PTRBASED * ($1_basetype temp)
|
||||
%typemap(perl5,in,numinputs=0) PTRBASED * ($1_basetype temp)
|
||||
%{ $1 = &temp; %}
|
||||
|
||||
%typemap(perl5,argout) PTRBASED * %{
|
||||
@@ -831,7 +831,7 @@ static void _newAVitemPV(pTHX_ AV* av, const char* val) {
|
||||
%typemap(perl5,perl5out) PTRBASED ""
|
||||
|
||||
#define PTR_BASED_OUTPUT(x) \
|
||||
%typemap(perl5,ignore) x * = PTRBASED *; \
|
||||
%typemap(perl5,in,numinputs=0) x * = PTRBASED *; \
|
||||
%typemap(perl5,argout) x * = PTRBASED *; \
|
||||
%typemap(perl5,out) x = PTRBASED; \
|
||||
%typemap(perl5,perl5out) x = PTRBASED;
|
||||
@@ -840,7 +840,7 @@ PTR_BASED_OUTPUT(NWCONN_HANDLE);
|
||||
PTR_BASED_OUTPUT(NWVOL_HANDLE);
|
||||
|
||||
/* ncp_get_file_server_description_strings */
|
||||
%typemap(perl5,ignore) char descstring [512] ( char temp[512] )
|
||||
%typemap(perl5,in,numinputs=0) char descstring [512] ( char temp[512] )
|
||||
%{ $1 = temp; %}
|
||||
|
||||
%typemap(perl5,argout) char descstring [512] {
|
||||
@@ -862,7 +862,7 @@ PTR_BASED_OUTPUT(NWVOL_HANDLE);
|
||||
}
|
||||
|
||||
/* error value from old API */
|
||||
%typemap(perl5,ignore) long * err ( long temp ) %{
|
||||
%typemap(perl5,in,numinputs=0) long * err ( long temp ) %{
|
||||
temp = NWE_REQUESTER_FAILURE;
|
||||
$1 = &temp;
|
||||
%}
|
||||
@@ -884,7 +884,7 @@ PTR_BASED_OUTPUT(NWVOL_HANDLE);
|
||||
%typemap(perl5,in) IVBASED input
|
||||
%{ $1 = SvIV($input); %}
|
||||
|
||||
%typemap(perl5,ignore) IVBASED * target ( $1_basetype temp )
|
||||
%typemap(perl5,in,numinputs=0) IVBASED * target ( $1_basetype temp )
|
||||
%{ $1 = &temp; %}
|
||||
|
||||
%typemap(perl5,argout) IVBASED * target %{
|
||||
@@ -899,7 +899,7 @@ PTR_BASED_OUTPUT(NWVOL_HANDLE);
|
||||
argvi++;
|
||||
%}
|
||||
|
||||
%typemap(perl5,ignore) UVBASED * target ( $*1_type temp )
|
||||
%typemap(perl5,in,numinputs=0) UVBASED * target ( $*1_type temp )
|
||||
%{ $1 = &temp; %}
|
||||
|
||||
%typemap(perl5,argout) UVBASED * target %{
|
||||
@@ -919,7 +919,7 @@ PTR_BASED_OUTPUT(NWVOL_HANDLE);
|
||||
|
||||
sv_arg = getReferenceToIV($input, &val);
|
||||
if (!sv_arg) {
|
||||
Perl_croak(aTHX_ "Type error in argument $argnum of $symname. Expected reference to integer.\n");
|
||||
SWIG_croak("Type error in argument %u of %s. Expected reference to integer.\n", $argnum, "$symname");
|
||||
XSRETURN(1);
|
||||
}
|
||||
tempiv = val;
|
||||
@@ -939,7 +939,7 @@ PTR_BASED_OUTPUT(NWVOL_HANDLE);
|
||||
if (SvOK($input)) {
|
||||
sv_arg = getReferenceToIV($input, &val);
|
||||
if (!sv_arg) {
|
||||
Perl_croak(aTHX_ "Type error in argument $argnum of $symname. Expected undef or reference to integer.\n");
|
||||
SWIG_croak("Type error in argument %u of %s. Expected undef or reference to integer.\n", $argnum, "$symname");
|
||||
XSRETURN(1);
|
||||
}
|
||||
tempiv = val;
|
||||
@@ -956,11 +956,11 @@ PTR_BASED_OUTPUT(NWVOL_HANDLE);
|
||||
%}
|
||||
|
||||
#define IV_BASED_OUTPUT(x) \
|
||||
%typemap(perl5,ignore) x = IVBASED * target; \
|
||||
%typemap(perl5,in,numinputs=0) x = IVBASED * target; \
|
||||
%typemap(perl5,argout) x = IVBASED * target;
|
||||
|
||||
#define UV_BASED_OUTPUT(x) \
|
||||
%typemap(perl5,ignore) x = UVBASED * target; \
|
||||
%typemap(perl5,in,numinputs=0) x = UVBASED * target; \
|
||||
%typemap(perl5,argout) x = UVBASED * target;
|
||||
|
||||
#define IV_BASED_BOTH(x) \
|
||||
@@ -972,18 +972,18 @@ PTR_BASED_OUTPUT(NWVOL_HANDLE);
|
||||
%typemap(perl5,argout) x = IVBASED * both_mn;
|
||||
|
||||
/* relocatable structures with automatic refcounting */
|
||||
%typemap(perl5,ignore) PVBASED * target ($1_basetype temp)
|
||||
%typemap(perl5,in,numinputs=0) PVBASED * target ($1_basetype temp)
|
||||
%{ $1 = &temp; %}
|
||||
|
||||
%typemap(perl5,in) PVBASED * (SV * sv_arg), const PVBASED * (SV * sv_arg) {
|
||||
STRLEN len;
|
||||
|
||||
if ((sv_arg = MyConvertPtr($input, (void**)&$1, &len, $1_descriptor)) == NULL) {
|
||||
Perl_croak(aTHX_ "Type error in argument $argnum of $symname. Expected %s.\n", $1_descriptor->name);
|
||||
SWIG_croak("Type error in argument %u of %s. Expected %s.\n", $argnum, "$symname", $1_descriptor->name);
|
||||
XSRETURN(1);
|
||||
}
|
||||
if (len != sizeof(*$1)) {
|
||||
Perl_croak(aTHX_ "Problem with argument $argnum of $symname. Expected %u bytes, but got %u.\n", sizeof(*$1), len);
|
||||
SWIG_croak("Problem with argument %u of %s. Expected %u bytes, but got %u.\n", $argnum, "$symname", sizeof(*$1), len);
|
||||
XSRETURN(1);
|
||||
}
|
||||
}
|
||||
@@ -992,7 +992,7 @@ PTR_BASED_OUTPUT(NWVOL_HANDLE);
|
||||
STRLEN len;
|
||||
|
||||
if ((sv_arg = MyConvertPtr($input, (void**)&$1, &len, $1_descriptor)) == NULL) {
|
||||
Perl_croak(aTHX_ "Type error in argument $argnum of $symname. Expected %s.\n", $1_descriptor->name);
|
||||
SWIG_croak("Type error in argument %u of %s. Expected %s.\n", $argnum, "$symname", $1_descriptor->name);
|
||||
XSRETURN(1);
|
||||
}
|
||||
}
|
||||
@@ -1002,17 +1002,15 @@ PTR_BASED_OUTPUT(NWVOL_HANDLE);
|
||||
|
||||
sv_arg = MyConvertPtr($input, (void**)&$1, &len, $1_descriptor);
|
||||
if (!sv_arg || !$1) {
|
||||
Perl_croak(aTHX_ "Type error in argument $argnum of $symname. Expected %s.\n", $1_descriptor->name);
|
||||
SWIG_croak("Type error in argument %u of %s. Expected %s.\n", $argnum, "$symname", $1_descriptor->name);
|
||||
XSRETURN(1);
|
||||
}
|
||||
if (len != sizeof(*$1)) {
|
||||
Perl_croak(aTHX_ "Problem with argument $argnum of $symname. Expected %u bytes, but got %u.\n", sizeof(*$1), len);
|
||||
SWIG_croak("Problem with argument %u of %s. Expected %u bytes, but got %u.\n", $argnum, "$symname", sizeof(*$1), len);
|
||||
XSRETURN(1);
|
||||
}
|
||||
}
|
||||
|
||||
%typemap(perl5,in) PVBASED * target "#error in mapping for PVBASED * target emited"
|
||||
|
||||
%typemap(perl5,argout) PVBASED * target %{
|
||||
if (argvi >= items) {
|
||||
EXTEND(sp, 1);
|
||||
@@ -1105,7 +1103,7 @@ PTR_BASED_OUTPUT(NWVOL_HANDLE);
|
||||
|
||||
#define PV_BASED_NOINIT(x) \
|
||||
/* %remember x *; */ \
|
||||
%typemap(perl5,ignore) x * target = PVBASED * target; \
|
||||
%typemap(perl5,in,numinputs=0) x * target = PVBASED * target; \
|
||||
%typemap(perl5,in) x * = PVBASED *; \
|
||||
%typemap(perl5,in) const x * = const PVBASED *; \
|
||||
%typemap(perl5,in) x * target = PVBASED * target; \
|
||||
@@ -1125,7 +1123,7 @@ PV_BASED_NOINIT(y); \
|
||||
#define PV_BASED_STRUCT(x) PV_BASED_INIT(x, struct x);
|
||||
|
||||
#define PV_BASED_OUTPUT(x) \
|
||||
%typemap(perl5,ignore) x = PVBASED * target; \
|
||||
%typemap(perl5,in,numinputs=0) x = PVBASED * target; \
|
||||
%typemap(perl5,in) x = PVBASED * target; \
|
||||
%typemap(perl5,argout) x = PVBASED * target;
|
||||
|
||||
@@ -1290,7 +1288,7 @@ PV_BASED_RELAXED(struct ncp_ea_info_level6 *);
|
||||
%typemap(perl5,in) char * INPUT %{
|
||||
SvGETMAGIC($input);
|
||||
if (!SvOK($input)) {
|
||||
Perl_croak(aTHX_ "Type error in argument $argnum of $symname. Expected string.\n");
|
||||
SWIG_croak("Type error in argument %u of %s. Expected string.\n", $argnum, "$symname");
|
||||
XSRETURN(1);
|
||||
}
|
||||
$1 = (typeof($1))SvPV_nolen($input);
|
||||
@@ -1320,7 +1318,7 @@ IV_BASED_OUTPUT(NWVOL_NUM * ovol);
|
||||
IV_BASED_OUTPUT(NWVOL_NUM * __vol);
|
||||
IV_BASED_OUTPUT(size_t * destlen); /* ncp_ns_extract_info_field_size */
|
||||
|
||||
%typemap(perl5,ignore) fixedCharArray OUTPUT ( char temp[$1_dim0] ) [ANY]
|
||||
%typemap(perl5,in,numinputs=0) fixedCharArray OUTPUT ( char temp[$1_dim0] ) [ANY]
|
||||
%{ $1 = temp; %}
|
||||
|
||||
%typemap(perl5,argout) fixedCharArray OUTPUT [ANY]
|
||||
@@ -1368,7 +1366,7 @@ IV_BASED_OUTPUT(size_t * destlen); /* ncp_ns_extract_info_field_size */
|
||||
%}
|
||||
|
||||
#define PREFIXED_CHAR_ARRAY(pref,type) \
|
||||
%typemap(perl5,ignore) pref##LenPrefixCharArray OUTPUT ( char temp[$1_dim0+1] ) [ANY] \
|
||||
%typemap(perl5,in,numinputs=0) pref##LenPrefixCharArray OUTPUT ( char temp[$1_dim0+1] ) [ANY] \
|
||||
%{ $1 = temp; %} \
|
||||
\
|
||||
%typemap(perl5,argout) pref##LenPrefixCharArray OUTPUT [ANY] \
|
||||
@@ -1419,7 +1417,7 @@ PREFIXED_CHAR_ARRAY(size_t, size_t);
|
||||
PREFIXED_CHAR_ARRAY(uint_fast16_t, uint_fast16_t);
|
||||
|
||||
#define ASCIIZ_CHAR_ARRAY(pref,len) \
|
||||
%typemap(perl5,ignore) pref ( char temp[len+1] ) \
|
||||
%typemap(perl5,in,numinputs=0) pref ( char temp[len+1] ) \
|
||||
%{ $1 = temp; %} \
|
||||
\
|
||||
%typemap(perl5,argout) pref \
|
||||
@@ -1436,7 +1434,7 @@ PREFIXED_CHAR_ARRAY(uint_fast16_t, uint_fast16_t);
|
||||
%}
|
||||
|
||||
#define WCHART_ARRAY(pref,len) \
|
||||
%typemap(perl5,ignore) pref ( wchar_t temp[len+1] ) \
|
||||
%typemap(perl5,in,numinputs=0) pref ( wchar_t temp[len+1] ) \
|
||||
%{ $1 = temp; %} \
|
||||
\
|
||||
%typemap(perl5,argout) pref \
|
||||
@@ -1452,7 +1450,7 @@ PREFIXED_CHAR_ARRAY(uint_fast16_t, uint_fast16_t);
|
||||
argvi++; \
|
||||
%}
|
||||
|
||||
%typemap(perl5,ignore) fixedArray OUTPUT ( $1_basetype temp[$1_dim0] ) [ANY]
|
||||
%typemap(perl5,in,numinputs=0) fixedArray OUTPUT ( $1_basetype temp[$1_dim0] ) [ANY]
|
||||
%{ $1 = temp; %}
|
||||
|
||||
%typemap(perl5,argout) fixedArray OUTPUT[ANY] %{
|
||||
@@ -1481,13 +1479,13 @@ PREFIXED_CHAR_ARRAY(uint_fast16_t, uint_fast16_t);
|
||||
|
||||
SvGETMAGIC($input);
|
||||
if (!SvOK($input)) {
|
||||
Perl_croak(aTHX_ "Type error in argument $argnum of $symname. Expected string.\n");
|
||||
SWIG_croak("Type error in argument %u of %s. Expected string.\n", $argnum, "$symname");
|
||||
XSRETURN(1);
|
||||
}
|
||||
$1 = SvPV($input, len);
|
||||
if (len != $1_dim0) {
|
||||
Perl_croak(aTHX_ "Type error in argument $argnum of $symname. Expected string with $1_dim0 chars, but got %u chars.\n",
|
||||
len);
|
||||
SWIG_croak("Type error in argument %u of %s. Expected string with %u chars, but got %u chars.\n",
|
||||
$argnum, "$symname", $1_dim0, len);
|
||||
XSRETURN(1);
|
||||
}
|
||||
}
|
||||
@@ -1498,11 +1496,11 @@ PREFIXED_CHAR_ARRAY(uint_fast16_t, uint_fast16_t);
|
||||
%typemap(perl5,in) x = const fixedArray [ANY];
|
||||
|
||||
#define FIXEDARRAY_OUTPUT(x) \
|
||||
%typemap(perl5,ignore) x = fixedArray OUTPUT [ANY]; \
|
||||
%typemap(perl5,in,numinputs=0) x = fixedArray OUTPUT [ANY]; \
|
||||
%typemap(perl5,argout) x = fixedArray OUTPUT [ANY];
|
||||
|
||||
#define FIXEDARRAYLEN_OUTPUT(x,len) \
|
||||
%typemap(perl5,ignore) x ( unsigned char temp[len] ) \
|
||||
%typemap(perl5,in,numinputs=0) x ( unsigned char temp[len] ) \
|
||||
%{ $1 = temp; %} \
|
||||
\
|
||||
%typemap(perl5,argout) x %{ \
|
||||
@@ -1517,7 +1515,7 @@ PREFIXED_CHAR_ARRAY(uint_fast16_t, uint_fast16_t);
|
||||
argvi++; \
|
||||
%}
|
||||
|
||||
%typemap(perl5,ignore) (int * returned_no, u_int8_t conn_numbers[256]) (int conn_count, u_int8_t conns[256]) %{
|
||||
%typemap(perl5,in,numinputs=0) (int * returned_no, u_int8_t conn_numbers[256]) (int conn_count, u_int8_t conns[256]) %{
|
||||
$1 = &conn_count;
|
||||
$2 = conns;
|
||||
%}
|
||||
@@ -1563,7 +1561,7 @@ PREFIXED_CHAR_ARRAY(uint_fast16_t, uint_fast16_t);
|
||||
Safefree($2);
|
||||
%}
|
||||
|
||||
%typemap(perl5,ignore) struct sockaddr * station_addr (struct sockaddr temp)
|
||||
%typemap(perl5,in,numinputs=0) struct sockaddr * station_addr (struct sockaddr temp)
|
||||
%{ $1 = &temp; %}
|
||||
|
||||
%typemap(perl5,argout) struct sockaddr * station_addr %{
|
||||
@@ -1609,7 +1607,7 @@ IV_BASED_OUTPUT(u_int8_t * conn_type);
|
||||
|
||||
msg = getByteArray($input, &asize, &$2, 256);
|
||||
if (msg) {
|
||||
Perl_croak(aTHX_ "Type error in argument $argnum of $symname. %s\n", msg);
|
||||
SWIG_croak("Type error in argument %u of %s. %s\n", $argnum, "$symname", msg);
|
||||
XSRETURN(1);
|
||||
}
|
||||
$1 = asize;
|
||||
@@ -1626,7 +1624,7 @@ IV_BASED_OUTPUT(u_int8_t * conn_type);
|
||||
|
||||
msg = getUnsignedIntArray($input, &asize, &$2, 65536);
|
||||
if (msg) {
|
||||
Perl_croak(aTHX_ "Type error in argument $argnum of $symname. %s\n", msg);
|
||||
SWIG_croak("Type error in argument %u of %s. %s\n", $argnum, "$symname", msg);
|
||||
XSRETURN(1);
|
||||
}
|
||||
$1 = asize;
|
||||
@@ -1656,7 +1654,7 @@ IV_BASED_OUTPUT(u_int8_t * conn_type);
|
||||
/* end of ncp_write */
|
||||
|
||||
/* ncp_get_encryption_key */
|
||||
%typemap(perl5,ignore) char * encryption_key ( char temp[8] )
|
||||
%typemap(perl5,in,numinputs=0) char * encryption_key ( char temp[8] )
|
||||
%{ $1 = temp; %}
|
||||
|
||||
%typemap(perl5,argout) char * encryption_key %{
|
||||
@@ -1712,7 +1710,7 @@ IV_BASED_OUTPUT(u_int32_t * queue_length); /* ncp_get_queue_length */
|
||||
IV_BASED_OUTPUT(u_int16_t * rights); /* ncp_str_to_perms */
|
||||
|
||||
/* ncp_get_queue_job_ids */
|
||||
%typemap(perl5,ignore) (u_int32_t * length1, u_int32_t * length2, u_int32_t ids[]) (u_int32_t ids_size, u_int32_t reply_ids_size, u_int32_t ids_array[125]) %{
|
||||
%typemap(perl5,in,numinputs=0) (u_int32_t * length1, u_int32_t * length2, u_int32_t ids[]) (u_int32_t ids_size, u_int32_t reply_ids_size, u_int32_t ids_array[125]) %{
|
||||
$1 = &ids_size;
|
||||
$2 = &reply_ids_size;
|
||||
$3 = ids_array;
|
||||
@@ -1737,7 +1735,7 @@ IV_BASED_OUTPUT(u_int16_t * rights); /* ncp_str_to_perms */
|
||||
/* end of ncp_get_queue_job_ids */
|
||||
|
||||
/* ncp_get_broadcast_message */
|
||||
%typemap(perl5,ignore) char message[256] = fixedCharArray OUTPUT [ANY];
|
||||
%typemap(perl5,in,numinputs=0) char message[256] = fixedCharArray OUTPUT [ANY];
|
||||
%typemap(perl5,argout) char message[256] = fixedCharArray OUTPUT [ANY];
|
||||
/* end of ncp_get_broadcast_message */
|
||||
|
||||
@@ -1748,7 +1746,7 @@ IV_BASED_OUTPUT(u_int16_t * rights); /* ncp_str_to_perms */
|
||||
|
||||
msg = getNCPTrusteeStructArray($input, &asize, &$2, 2048, $2);
|
||||
if (msg) {
|
||||
Perl_croak(aTHX_ "Type error in argument $argnum of $symname. %s\n", msg);
|
||||
SWIG_croak("Type error in argument %u of %s. %s\n", $argnum, "$symname", msg);
|
||||
XSRETURN(1);
|
||||
}
|
||||
$1 = asize;
|
||||
@@ -1811,12 +1809,12 @@ RETPTR_AND_MAXLEN((unsigned char * encbuff, int encbuffsize), 4096);
|
||||
/* end of ncp_path_to_NW_format */
|
||||
|
||||
/* ncp_perms_to_str */
|
||||
%typemap(perl5,ignore) char r (char temp[11]) [11]
|
||||
%typemap(perl5,in,numinputs=0) char r (char temp[11]) [11]
|
||||
%{ $1 = temp; %}
|
||||
/* end of ncp_perms_to_str */
|
||||
|
||||
/* ncp_namespace_to_str */
|
||||
%typemap(perl5,ignore) char r (char temp[5]) [5]
|
||||
%typemap(perl5,in,numinputs=0) char r (char temp[5]) [5]
|
||||
%{ $1 = temp; %}
|
||||
/* end of ncp_namespace_to_str */
|
||||
|
||||
@@ -1847,7 +1845,7 @@ RETPTR_AND_MAXLEN((unsigned char * encbuff, int encbuffsize), 4096);
|
||||
sti = SWIGTYPE_p_nw_info_struct3;
|
||||
break;
|
||||
default:
|
||||
Perl_croak(aTHX_ "Invalid value of argument $argnum of $symname.\n");
|
||||
SWIG_croak("Invalid value of argument %u of %s.\n", $argnum, "$symname");
|
||||
XSRETURN(1);
|
||||
}
|
||||
Newz((I32)"nw_info_target", $1, $2, unsigned char);
|
||||
@@ -1882,7 +1880,7 @@ RETPTR_AND_MAXLEN((unsigned char * encbuff, int encbuffsize), 4096);
|
||||
sti = SWIGTYPE_p_ncp_namespace_format;
|
||||
break;
|
||||
default:
|
||||
Perl_croak(aTHX_ "Invalid value of argument $argnum of $symname.\n");
|
||||
SWIG_croak("Invalid value of argument %u of %s.\n", $argnum, "$symname");
|
||||
XSRETURN(1);
|
||||
}
|
||||
Newz((I32)"ncp_namespace_format", (unsigned char*)$1, $2, unsigned char);
|
||||
@@ -1945,7 +1943,7 @@ RETPTR_AND_MAXLEN((unsigned char * encbuff, int encbuffsize), 4096);
|
||||
%{ Safefree($1); %}
|
||||
|
||||
/* ncp_get_file_size */
|
||||
%typemap(perl5,ignore) NVBASED * OUTPUT ($*1_type temp)
|
||||
%typemap(perl5,in,numinputs=0) NVBASED * OUTPUT ($*1_type temp)
|
||||
%{ $1 = &temp; %}
|
||||
|
||||
%typemap(perl5,argout) NVBASED * OUTPUT %{
|
||||
@@ -1961,7 +1959,7 @@ RETPTR_AND_MAXLEN((unsigned char * encbuff, int encbuffsize), 4096);
|
||||
%}
|
||||
|
||||
#define NV_BASED_OUTPUT(x) \
|
||||
%typemap(perl5,ignore) x = NVBASED * OUTPUT; \
|
||||
%typemap(perl5,in,numinputs=0) x = NVBASED * OUTPUT; \
|
||||
%typemap(perl5,argout) x = NVBASED * OUTPUT;
|
||||
|
||||
NV_BASED_OUTPUT(ncp_off64_t * fileSize);
|
||||
@@ -2024,7 +2022,7 @@ FIXEDARRAY_OUTPUT(char fileHandle[6]);
|
||||
/* end of NWGetObjectConnectionNumbers */
|
||||
|
||||
/* NWGetConnListFromObject */
|
||||
%typemap(perl5,ignore) (size_t * noOfReturnedConns, NWCONN_NUM * conns125) (size_t temp) %{
|
||||
%typemap(perl5,in,numinputs=0) (size_t * noOfReturnedConns, NWCONN_NUM * conns125) (size_t temp) %{
|
||||
$1 = &temp;
|
||||
New((I32)"$2_name", $2, 125, NWCONN_NUM);
|
||||
%}
|
||||
@@ -2051,7 +2049,7 @@ FIXEDARRAY_OUTPUT(char fileHandle[6]);
|
||||
|
||||
msg = getNWConnArray($input, &$1, &$2, 65536);
|
||||
if (msg) {
|
||||
Perl_croak(aTHX_ "Type error in argument $argnum of $symname. %s\n", msg);
|
||||
SWIG_croak("Type error in argument %u of %s. %s\n", $argnum, "$symname", msg);
|
||||
XSRETURN(1);
|
||||
}
|
||||
New((I32)"$3_name", $3, $1, nuint8);
|
||||
@@ -2158,7 +2156,7 @@ IV_BASED_OUTPUT(nuint32 * bufLen);
|
||||
}
|
||||
%}
|
||||
|
||||
%typemap(perl5,ignore) (nuint32 bufLen, NWCCTranAddr * tranAddr) (NWCCTranAddr temp)
|
||||
%typemap(perl5,in,numinputs=0) (nuint32 bufLen, NWCCTranAddr * tranAddr) (NWCCTranAddr temp)
|
||||
%{ $1 = sizeof(temp.bufferdata);
|
||||
temp.buffer = temp.bufferdata;
|
||||
$2 = &temp; %}
|
||||
@@ -2261,7 +2259,7 @@ struct NWCCRootEntry aroot_entry
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Perl_croak(aTHX_ "Undefined case in NWCCopts parsing\n");
|
||||
SWIG_croak("Undefined case in NWCCopts parsing\n");
|
||||
$result = &PL_sv_undef;
|
||||
}
|
||||
}
|
||||
@@ -2386,7 +2384,7 @@ struct NWCCRootEntry aroot_entry
|
||||
size_t * needsize),
|
||||
(char * key, size_t maxsize, size_t * needsize)
|
||||
%{ Safefree($1); %}
|
||||
%typemap(perl5,ignore) const unsigned char ** next "";
|
||||
%typemap(perl5,in,numinputs=0) const unsigned char ** next "";
|
||||
/* end of ncp_ea_ */
|
||||
|
||||
/* ncp_ea_read */
|
||||
@@ -2407,7 +2405,7 @@ UV_BASED_OUTPUT(u_int32_t * keySizeDuplicated);
|
||||
|
||||
/* nwnet.h begins here *********************************************** */
|
||||
|
||||
%typemap(perl5,ignore) NWDSContextHandle * = PTRBASED *;
|
||||
%typemap(perl5,in,numinputs=0) NWDSContextHandle * = PTRBASED *;
|
||||
%typemap(perl5,argout) NWDSContextHandle * = PTRBASED *;
|
||||
%typemap(perl5,perl5out) NWDSContextHandle "";
|
||||
%typemap(perl5,perl5out) struct __NWDSContextHandle "";
|
||||
@@ -2446,7 +2444,7 @@ UV_BASED_OUTPUT(u_int32_t * keySizeDuplicated);
|
||||
%}
|
||||
%typemap(perl5,in) NWDSContextHandle %{
|
||||
if (!SwigConvertPtr($input, (void **) &$1, $1_descriptor)) {
|
||||
Perl_croak(aTHX_ "Type error in argument $argnum of $symname. Expected %s", $1_descriptor->name);
|
||||
SWIG_croak("Type error in argument %u of %s. Expected %s", $argnum, "$symname", $1_descriptor->name);
|
||||
}
|
||||
%}
|
||||
%typemap(perl5,in) NWDSContextHandle ctxToFree {
|
||||
@@ -2454,7 +2452,7 @@ UV_BASED_OUTPUT(u_int32_t * keySizeDuplicated);
|
||||
|
||||
inpsv = SwigConvertPtr($input, (void **) &$1, $1_descriptor);
|
||||
if (!inpsv) {
|
||||
Perl_croak(aTHX_ "Type error in argument $argnum of $symname. Expected %s", $1_descriptor->name);
|
||||
SWIG_croak("Type error in argument %u of %s. Expected %s", $argnum, "$symname", $1_descriptor->name);
|
||||
}
|
||||
sv_setiv(inpsv, 0);
|
||||
}
|
||||
@@ -2494,7 +2492,7 @@ PTR_BASED_OUTPUT(pBuf_T);
|
||||
inpsv = SwigConvertPtr($input, (void **) &$1, $1_descriptor);
|
||||
if (!inpsv) {
|
||||
if (!SvIOK($input)) {
|
||||
Perl_croak(aTHX_ "Type error in argument $argnum of $symname. Expected %s or buffer length", $1_descriptor->name);
|
||||
SWIG_croak("Type error in argument %u of %s. Expected %s or buffer length", $argnum, "$symname", $1_descriptor->name);
|
||||
}
|
||||
buflen = SvUV($input);
|
||||
} else {
|
||||
@@ -2506,7 +2504,7 @@ PTR_BASED_OUTPUT(pBuf_T);
|
||||
NWDSCCODE result;
|
||||
|
||||
if (G_ARRAY != GIMME_V) {
|
||||
Perl_croak(aTHX_ "You must use array return value if you are passing only buffer size into $symname");
|
||||
SWIG_croak("You must use array return value if you are passing only buffer size into %s", "$symname");
|
||||
}
|
||||
result = NWDSAllocBuf(buflen, &$1);
|
||||
if (result) {
|
||||
@@ -2539,7 +2537,7 @@ PTR_BASED_OUTPUT(pBuf_T);
|
||||
|
||||
inpsv = SwigConvertPtr($input, (void **) &$1, $1_descriptor);
|
||||
if (!inpsv) {
|
||||
Perl_croak(aTHX_ "Type error in argument $argnum of $symname. Expected %s", $1_descriptor->name);
|
||||
SWIG_croak("Type error in argument %u of %s. Expected %s", $argnum, "$symname", $1_descriptor->name);
|
||||
}
|
||||
sv_setiv(inpsv, 0);
|
||||
}
|
||||
@@ -2620,7 +2618,7 @@ static SV * _nwdschar2mortalsv(pTHX_ NWDSChar * str) {
|
||||
}
|
||||
%}
|
||||
|
||||
%typemap(perl5,ignore) NWDSChar * OUTPUT ( NWDSChar tempstr[MAX_DN_BYTES] )
|
||||
%typemap(perl5,in,numinputs=0) NWDSChar * OUTPUT ( NWDSChar tempstr[MAX_DN_BYTES] )
|
||||
%{ $1 = tempstr; %}
|
||||
%typemap(perl5,argout) NWDSChar * OUTPUT %{
|
||||
if (argvi >= items) {
|
||||
@@ -2637,7 +2635,7 @@ static SV * _nwdschar2mortalsv(pTHX_ NWDSChar * str) {
|
||||
%{ $1 = swig_PV_maynull_nolen($input); %}
|
||||
|
||||
#define NWDSCHAR_OUTPUT(x) \
|
||||
%typemap(perl5,ignore) NWDSChar * x = NWDSChar * OUTPUT; \
|
||||
%typemap(perl5,in,numinputs=0) NWDSChar * x = NWDSChar * OUTPUT; \
|
||||
%typemap(perl5,argout) NWDSChar * x = NWDSChar * OUTPUT;
|
||||
|
||||
NWDSCHAR_OUTPUT(attrName);
|
||||
@@ -2654,7 +2652,7 @@ NWDSCHAR_OUTPUT(syntaxName);
|
||||
NWDSCHAR_OUTPUT(treeName);
|
||||
|
||||
/* NWIsDSServer */
|
||||
%typemap(perl5,ignore) char * treename (char treename[MAX_TREE_NAME_BYTES]) %{
|
||||
%typemap(perl5,in,numinputs=0) char * treename (char treename[MAX_TREE_NAME_BYTES]) %{
|
||||
treename[0] = 0;
|
||||
$1 = treename;
|
||||
%}
|
||||
@@ -2669,7 +2667,7 @@ NWDSCHAR_OUTPUT(treeName);
|
||||
|
||||
/* NWDSGetNDSStatistics */
|
||||
PV_BASED(NDSStatsInfo_T);
|
||||
%typemap(perl5,ignore) (size_t statsInfoLen, NDSStatsInfo_T* statsInfo) (NDSStatsInfo_T statbuf) %{
|
||||
%typemap(perl5,in,numinputs=0) (size_t statsInfoLen, NDSStatsInfo_T* statsInfo) (NDSStatsInfo_T statbuf) %{
|
||||
$2 = &statbuf;
|
||||
$1 = sizeof(statbuf);
|
||||
%}
|
||||
384
contrib/php/Makefile.in
Normal file
384
contrib/php/Makefile.in
Normal file
@@ -0,0 +1,384 @@
|
||||
# Makefile for PO directory in any package using GNU gettext.
|
||||
# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU General Public
|
||||
# License but which still want to provide support for the GNU gettext
|
||||
# functionality.
|
||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
||||
# General Public License and is *not* in the public domain.
|
||||
#
|
||||
# Origin: gettext-0.14.4
|
||||
|
||||
PACKAGE = ncpfs
|
||||
VERSION = 2.2.7
|
||||
PACKAGE_BUGREPORT = mario.fetka@disconnected-by-peer.at
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
|
||||
srcdir = .
|
||||
top_srcdir = ../..
|
||||
|
||||
|
||||
prefix = /usr/local
|
||||
exec_prefix = ${prefix}
|
||||
datadir = ${prefix}/share
|
||||
localedir = $(datadir)/locale
|
||||
gettextsrcdir = $(datadir)/gettext/po
|
||||
|
||||
INSTALL = /usr/bin/install -c
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
MKINSTALLDIRS = $(top_srcdir)/mkinstalldirs
|
||||
mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
|
||||
|
||||
GMSGFMT = /usr/bin/gmsgfmt
|
||||
MSGFMT = /usr/bin/msgfmt
|
||||
XGETTEXT = /usr/bin/xgettext
|
||||
MSGMERGE = msgmerge
|
||||
MSGMERGE_UPDATE = /usr/bin/msgmerge --update
|
||||
MSGINIT = msginit
|
||||
MSGCONV = msgconv
|
||||
MSGFILTER = msgfilter
|
||||
|
||||
POFILES = @POFILES@
|
||||
GMOFILES = @GMOFILES@
|
||||
UPDATEPOFILES = @UPDATEPOFILES@
|
||||
DUMMYPOFILES = @DUMMYPOFILES@
|
||||
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
|
||||
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
|
||||
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
|
||||
$(POFILES) $(GMOFILES) \
|
||||
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
|
||||
|
||||
POTFILES = \
|
||||
|
||||
CATALOGS = @CATALOGS@
|
||||
|
||||
# Makevars gets inserted here. (Don't remove this line!)
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
|
||||
|
||||
.po.mo:
|
||||
@echo "$(MSGFMT) -c -o $@ $<"; \
|
||||
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
|
||||
|
||||
.po.gmo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
|
||||
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
|
||||
|
||||
.sin.sed:
|
||||
sed -e '/^#/d' $< > t-$@
|
||||
mv t-$@ $@
|
||||
|
||||
|
||||
all: all-yes
|
||||
|
||||
all-yes: stamp-po
|
||||
all-no:
|
||||
|
||||
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
|
||||
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
|
||||
# we don't want to bother translators with empty POT files). We assume that
|
||||
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
|
||||
# In this case, stamp-po is a nop (i.e. a phony target).
|
||||
|
||||
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
|
||||
# been loosely updated. Its purpose is that when a developer or translator
|
||||
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
|
||||
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
|
||||
# invocations of "make" will do nothing. This timestamp would not be necessary
|
||||
# if updating the $(CATALOGS) would always touch them; however, the rule for
|
||||
# $(POFILES) has been designed to not touch files that don't need to be
|
||||
# changed.
|
||||
stamp-po: $(srcdir)/$(DOMAIN).pot
|
||||
test ! -f $(srcdir)/$(DOMAIN).pot || \
|
||||
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
|
||||
@test ! -f $(srcdir)/$(DOMAIN).pot || { \
|
||||
echo "touch stamp-po" && \
|
||||
echo timestamp > stamp-poT && \
|
||||
mv stamp-poT stamp-po; \
|
||||
}
|
||||
|
||||
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
|
||||
# otherwise packages like GCC can not be built if only parts of the source
|
||||
# have been downloaded.
|
||||
|
||||
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
|
||||
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
|
||||
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
|
||||
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
|
||||
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
|
||||
else \
|
||||
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
|
||||
fi; \
|
||||
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
|
||||
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
|
||||
--files-from=$(srcdir)/POTFILES.in \
|
||||
--copyright-holder='$(COPYRIGHT_HOLDER)' \
|
||||
--msgid-bugs-address="$$msgid_bugs_address"
|
||||
test ! -f $(DOMAIN).po || { \
|
||||
if test -f $(srcdir)/$(DOMAIN).pot; then \
|
||||
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
|
||||
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
|
||||
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
|
||||
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
|
||||
else \
|
||||
rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
|
||||
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
|
||||
fi; \
|
||||
else \
|
||||
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
|
||||
fi; \
|
||||
}
|
||||
|
||||
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
|
||||
# every "make" invocation, only create it when it is missing.
|
||||
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
|
||||
$(srcdir)/$(DOMAIN).pot:
|
||||
$(MAKE) $(DOMAIN).pot-update
|
||||
|
||||
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
|
||||
# Note that a PO file is not touched if it doesn't need to be changed.
|
||||
$(POFILES): $(srcdir)/$(DOMAIN).pot
|
||||
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
|
||||
if test -f "$(srcdir)/$${lang}.po"; then \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
|
||||
cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
|
||||
else \
|
||||
$(MAKE) $${lang}.po-create; \
|
||||
fi
|
||||
|
||||
|
||||
install: install-exec install-data
|
||||
install-exec:
|
||||
install-data: install-data-yes
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||
for file in $(DISTFILES.common) Makevars.template; do \
|
||||
$(INSTALL_DATA) $(srcdir)/$$file \
|
||||
$(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
for file in Makevars; do \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
install-data-no: all
|
||||
install-data-yes: all
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
||||
$(mkinstalldirs) $(DESTDIR)$$dir; \
|
||||
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
|
||||
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
|
||||
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
|
||||
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
|
||||
if test -n "$$lc"; then \
|
||||
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
|
||||
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
|
||||
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
|
||||
for file in *; do \
|
||||
if test -f $$file; then \
|
||||
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
|
||||
fi; \
|
||||
done); \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
else \
|
||||
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
|
||||
:; \
|
||||
else \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
fi; \
|
||||
fi; \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
|
||||
ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
|
||||
ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
|
||||
cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
|
||||
echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
|
||||
fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
install-strip: install
|
||||
|
||||
installdirs: installdirs-exec installdirs-data
|
||||
installdirs-exec:
|
||||
installdirs-data: installdirs-data-yes
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
installdirs-data-no:
|
||||
installdirs-data-yes:
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
||||
$(mkinstalldirs) $(DESTDIR)$$dir; \
|
||||
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
|
||||
if test -n "$$lc"; then \
|
||||
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
|
||||
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
|
||||
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
|
||||
for file in *; do \
|
||||
if test -f $$file; then \
|
||||
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
|
||||
fi; \
|
||||
done); \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
else \
|
||||
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
|
||||
:; \
|
||||
else \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
fi; \
|
||||
fi; \
|
||||
fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
# Define this as empty until I found a useful application.
|
||||
installcheck:
|
||||
|
||||
uninstall: uninstall-exec uninstall-data
|
||||
uninstall-exec:
|
||||
uninstall-data: uninstall-data-yes
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
for file in $(DISTFILES.common) Makevars.template; do \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
uninstall-data-no:
|
||||
uninstall-data-yes:
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||
for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
|
||||
done; \
|
||||
done
|
||||
|
||||
check: all
|
||||
|
||||
info dvi ps pdf html tags TAGS ctags CTAGS ID:
|
||||
|
||||
mostlyclean:
|
||||
rm -f remove-potcdate.sed
|
||||
rm -f stamp-poT
|
||||
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
|
||||
rm -fr *.o
|
||||
|
||||
clean: mostlyclean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile Makefile.in POTFILES *.mo
|
||||
|
||||
maintainer-clean: distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
rm -f stamp-po $(GMOFILES)
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir:
|
||||
$(MAKE) update-po
|
||||
@$(MAKE) dist2
|
||||
# This is a separate target because 'update-po' must be executed before.
|
||||
dist2: stamp-po $(DISTFILES)
|
||||
dists="$(DISTFILES)"; \
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
dists="$$dists Makevars.template"; \
|
||||
fi; \
|
||||
if test -f $(srcdir)/$(DOMAIN).pot; then \
|
||||
dists="$$dists $(DOMAIN).pot stamp-po"; \
|
||||
fi; \
|
||||
if test -f $(srcdir)/ChangeLog; then \
|
||||
dists="$$dists ChangeLog"; \
|
||||
fi; \
|
||||
for i in 0 1 2 3 4 5 6 7 8 9; do \
|
||||
if test -f $(srcdir)/ChangeLog.$$i; then \
|
||||
dists="$$dists ChangeLog.$$i"; \
|
||||
fi; \
|
||||
done; \
|
||||
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
|
||||
for file in $$dists; do \
|
||||
if test -f $$file; then \
|
||||
cp -p $$file $(distdir) || exit 1; \
|
||||
else \
|
||||
cp -p $(srcdir)/$$file $(distdir) || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
update-po: Makefile
|
||||
$(MAKE) $(DOMAIN).pot-update
|
||||
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
|
||||
$(MAKE) update-gmo
|
||||
|
||||
# General rule for creating PO files.
|
||||
|
||||
.nop.po-create:
|
||||
@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
|
||||
echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
|
||||
exit 1
|
||||
|
||||
# General rule for updating PO files.
|
||||
|
||||
.nop.po-update:
|
||||
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
|
||||
tmpdir=`pwd`; \
|
||||
echo "$$lang:"; \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
|
||||
cd $(srcdir); \
|
||||
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
|
||||
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
else \
|
||||
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
|
||||
:; \
|
||||
else \
|
||||
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
else \
|
||||
echo "msgmerge for $$lang.po failed!" 1>&2; \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
fi
|
||||
|
||||
$(DUMMYPOFILES):
|
||||
|
||||
update-gmo: Makefile $(GMOFILES)
|
||||
@:
|
||||
|
||||
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
|
||||
$(SHELL) ./config.status
|
||||
|
||||
force:
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -1,6 +1,384 @@
|
||||
LTLIBRARY_SHARED_NAME = php_auth_nds.la
|
||||
LTLIBRARY_SOURCES = php_auth_nds.c
|
||||
LTLIBRARY_LDFLAGS = -L../../lib -lncp
|
||||
EXTRA_INCLUDES = -I../../include -DNCPFS_VERSION=\"@VERSION@\"
|
||||
# Makefile for PO directory in any package using GNU gettext.
|
||||
# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU General Public
|
||||
# License but which still want to provide support for the GNU gettext
|
||||
# functionality.
|
||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
||||
# General Public License and is *not* in the public domain.
|
||||
#
|
||||
# Origin: gettext-0.14.4
|
||||
|
||||
include $(top_srcdir)/build/dynlib.mk
|
||||
PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
|
||||
SHELL = /bin/sh
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
datadir = @datadir@
|
||||
localedir = $(datadir)/locale
|
||||
gettextsrcdir = $(datadir)/gettext/po
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
|
||||
|
||||
GMSGFMT = @GMSGFMT@
|
||||
MSGFMT = @MSGFMT@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
MSGMERGE = msgmerge
|
||||
MSGMERGE_UPDATE = @MSGMERGE@ --update
|
||||
MSGINIT = msginit
|
||||
MSGCONV = msgconv
|
||||
MSGFILTER = msgfilter
|
||||
|
||||
POFILES = @POFILES@
|
||||
GMOFILES = @GMOFILES@
|
||||
UPDATEPOFILES = @UPDATEPOFILES@
|
||||
DUMMYPOFILES = @DUMMYPOFILES@
|
||||
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
|
||||
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
|
||||
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
|
||||
$(POFILES) $(GMOFILES) \
|
||||
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
|
||||
|
||||
POTFILES = \
|
||||
|
||||
CATALOGS = @CATALOGS@
|
||||
|
||||
# Makevars gets inserted here. (Don't remove this line!)
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
|
||||
|
||||
.po.mo:
|
||||
@echo "$(MSGFMT) -c -o $@ $<"; \
|
||||
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
|
||||
|
||||
.po.gmo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
|
||||
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
|
||||
|
||||
.sin.sed:
|
||||
sed -e '/^#/d' $< > t-$@
|
||||
mv t-$@ $@
|
||||
|
||||
|
||||
all: all-@USE_NLS@
|
||||
|
||||
all-yes: stamp-po
|
||||
all-no:
|
||||
|
||||
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
|
||||
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
|
||||
# we don't want to bother translators with empty POT files). We assume that
|
||||
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
|
||||
# In this case, stamp-po is a nop (i.e. a phony target).
|
||||
|
||||
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
|
||||
# been loosely updated. Its purpose is that when a developer or translator
|
||||
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
|
||||
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
|
||||
# invocations of "make" will do nothing. This timestamp would not be necessary
|
||||
# if updating the $(CATALOGS) would always touch them; however, the rule for
|
||||
# $(POFILES) has been designed to not touch files that don't need to be
|
||||
# changed.
|
||||
stamp-po: $(srcdir)/$(DOMAIN).pot
|
||||
test ! -f $(srcdir)/$(DOMAIN).pot || \
|
||||
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
|
||||
@test ! -f $(srcdir)/$(DOMAIN).pot || { \
|
||||
echo "touch stamp-po" && \
|
||||
echo timestamp > stamp-poT && \
|
||||
mv stamp-poT stamp-po; \
|
||||
}
|
||||
|
||||
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
|
||||
# otherwise packages like GCC can not be built if only parts of the source
|
||||
# have been downloaded.
|
||||
|
||||
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
|
||||
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
|
||||
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
|
||||
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
|
||||
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
|
||||
else \
|
||||
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
|
||||
fi; \
|
||||
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
|
||||
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
|
||||
--files-from=$(srcdir)/POTFILES.in \
|
||||
--copyright-holder='$(COPYRIGHT_HOLDER)' \
|
||||
--msgid-bugs-address="$$msgid_bugs_address"
|
||||
test ! -f $(DOMAIN).po || { \
|
||||
if test -f $(srcdir)/$(DOMAIN).pot; then \
|
||||
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
|
||||
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
|
||||
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
|
||||
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
|
||||
else \
|
||||
rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
|
||||
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
|
||||
fi; \
|
||||
else \
|
||||
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
|
||||
fi; \
|
||||
}
|
||||
|
||||
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
|
||||
# every "make" invocation, only create it when it is missing.
|
||||
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
|
||||
$(srcdir)/$(DOMAIN).pot:
|
||||
$(MAKE) $(DOMAIN).pot-update
|
||||
|
||||
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
|
||||
# Note that a PO file is not touched if it doesn't need to be changed.
|
||||
$(POFILES): $(srcdir)/$(DOMAIN).pot
|
||||
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
|
||||
if test -f "$(srcdir)/$${lang}.po"; then \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
|
||||
cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
|
||||
else \
|
||||
$(MAKE) $${lang}.po-create; \
|
||||
fi
|
||||
|
||||
|
||||
install: install-exec install-data
|
||||
install-exec:
|
||||
install-data: install-data-@USE_NLS@
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||
for file in $(DISTFILES.common) Makevars.template; do \
|
||||
$(INSTALL_DATA) $(srcdir)/$$file \
|
||||
$(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
for file in Makevars; do \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
install-data-no: all
|
||||
install-data-yes: all
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
||||
$(mkinstalldirs) $(DESTDIR)$$dir; \
|
||||
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
|
||||
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
|
||||
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
|
||||
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
|
||||
if test -n "$$lc"; then \
|
||||
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
|
||||
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
|
||||
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
|
||||
for file in *; do \
|
||||
if test -f $$file; then \
|
||||
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
|
||||
fi; \
|
||||
done); \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
else \
|
||||
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
|
||||
:; \
|
||||
else \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
fi; \
|
||||
fi; \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
|
||||
ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
|
||||
ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
|
||||
cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
|
||||
echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
|
||||
fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
install-strip: install
|
||||
|
||||
installdirs: installdirs-exec installdirs-data
|
||||
installdirs-exec:
|
||||
installdirs-data: installdirs-data-@USE_NLS@
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
installdirs-data-no:
|
||||
installdirs-data-yes:
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
||||
$(mkinstalldirs) $(DESTDIR)$$dir; \
|
||||
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
|
||||
if test -n "$$lc"; then \
|
||||
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
|
||||
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
|
||||
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
|
||||
for file in *; do \
|
||||
if test -f $$file; then \
|
||||
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
|
||||
fi; \
|
||||
done); \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
else \
|
||||
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
|
||||
:; \
|
||||
else \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
fi; \
|
||||
fi; \
|
||||
fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
# Define this as empty until I found a useful application.
|
||||
installcheck:
|
||||
|
||||
uninstall: uninstall-exec uninstall-data
|
||||
uninstall-exec:
|
||||
uninstall-data: uninstall-data-@USE_NLS@
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
for file in $(DISTFILES.common) Makevars.template; do \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
uninstall-data-no:
|
||||
uninstall-data-yes:
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||
for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
|
||||
done; \
|
||||
done
|
||||
|
||||
check: all
|
||||
|
||||
info dvi ps pdf html tags TAGS ctags CTAGS ID:
|
||||
|
||||
mostlyclean:
|
||||
rm -f remove-potcdate.sed
|
||||
rm -f stamp-poT
|
||||
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
|
||||
rm -fr *.o
|
||||
|
||||
clean: mostlyclean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile Makefile.in POTFILES *.mo
|
||||
|
||||
maintainer-clean: distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
rm -f stamp-po $(GMOFILES)
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir:
|
||||
$(MAKE) update-po
|
||||
@$(MAKE) dist2
|
||||
# This is a separate target because 'update-po' must be executed before.
|
||||
dist2: stamp-po $(DISTFILES)
|
||||
dists="$(DISTFILES)"; \
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
dists="$$dists Makevars.template"; \
|
||||
fi; \
|
||||
if test -f $(srcdir)/$(DOMAIN).pot; then \
|
||||
dists="$$dists $(DOMAIN).pot stamp-po"; \
|
||||
fi; \
|
||||
if test -f $(srcdir)/ChangeLog; then \
|
||||
dists="$$dists ChangeLog"; \
|
||||
fi; \
|
||||
for i in 0 1 2 3 4 5 6 7 8 9; do \
|
||||
if test -f $(srcdir)/ChangeLog.$$i; then \
|
||||
dists="$$dists ChangeLog.$$i"; \
|
||||
fi; \
|
||||
done; \
|
||||
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
|
||||
for file in $$dists; do \
|
||||
if test -f $$file; then \
|
||||
cp -p $$file $(distdir) || exit 1; \
|
||||
else \
|
||||
cp -p $(srcdir)/$$file $(distdir) || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
update-po: Makefile
|
||||
$(MAKE) $(DOMAIN).pot-update
|
||||
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
|
||||
$(MAKE) update-gmo
|
||||
|
||||
# General rule for creating PO files.
|
||||
|
||||
.nop.po-create:
|
||||
@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
|
||||
echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
|
||||
exit 1
|
||||
|
||||
# General rule for updating PO files.
|
||||
|
||||
.nop.po-update:
|
||||
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
|
||||
tmpdir=`pwd`; \
|
||||
echo "$$lang:"; \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
|
||||
cd $(srcdir); \
|
||||
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
|
||||
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
else \
|
||||
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
|
||||
:; \
|
||||
else \
|
||||
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
else \
|
||||
echo "msgmerge for $$lang.po failed!" 1>&2; \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
fi
|
||||
|
||||
$(DUMMYPOFILES):
|
||||
|
||||
update-gmo: Makefile $(GMOFILES)
|
||||
@:
|
||||
|
||||
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
|
||||
$(SHELL) ./config.status
|
||||
|
||||
force:
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
4927
contrib/php/aclocal.m4
vendored
4927
contrib/php/aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
167
contrib/php/build/Makefile.global
Normal file
167
contrib/php/build/Makefile.global
Normal file
@@ -0,0 +1,167 @@
|
||||
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
|
||||
INSTALL = $(top_srcdir)/build/shtool install -c
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
|
||||
DEFS = -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
|
||||
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
|
||||
|
||||
all: $(all_targets)
|
||||
@echo
|
||||
@echo "Build complete."
|
||||
@echo "Don't forget to run 'make test'."
|
||||
@echo
|
||||
|
||||
build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
|
||||
|
||||
build-binaries: $(PHP_BINARIES)
|
||||
|
||||
libphp.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||
$(LIBTOOL) --tag=CC --mode=link $(CC) $(LIBPHP_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
|
||||
-@$(LIBTOOL) --silent --tag=CC --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
|
||||
|
||||
libphp.dylib: libphp.la
|
||||
$(LIBTOOL) --tag=CC --mode=link $(CC) -dynamiclib $(LIBPHP_CFLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -rpath $(phptempdir) -install_name @rpath/$@ $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
|
||||
-@$(LIBTOOL) --silent --tag=CC --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
|
||||
|
||||
libs/libphp.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp.so
|
||||
|
||||
install: $(all_targets) $(install_targets)
|
||||
|
||||
install-sapi: $(OVERALL_TARGET)
|
||||
@echo "Installing PHP SAPI module: $(PHP_SAPI)"
|
||||
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
|
||||
-@if test ! -r $(phptempdir)/libphp.$(SHLIB_DL_SUFFIX_NAME); then \
|
||||
for i in 0.0.0 0.0 0; do \
|
||||
if test -r $(phptempdir)/libphp.$(SHLIB_DL_SUFFIX_NAME).$$i; then \
|
||||
$(LN_S) $(phptempdir)/libphp.$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp.$(SHLIB_DL_SUFFIX_NAME); \
|
||||
break; \
|
||||
fi; \
|
||||
done; \
|
||||
fi
|
||||
@$(INSTALL_IT)
|
||||
|
||||
install-binaries: build-binaries $(install_binary_targets)
|
||||
|
||||
install-modules: build-modules
|
||||
@test -d modules && \
|
||||
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR)
|
||||
@echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/"
|
||||
@rm -f modules/*.la >/dev/null 2>&1
|
||||
@$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
|
||||
|
||||
install-headers:
|
||||
-@if test "$(INSTALL_HEADERS)"; then \
|
||||
for i in `echo $(INSTALL_HEADERS)`; do \
|
||||
i=`$(top_srcdir)/build/shtool path -d $$i`; \
|
||||
paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
|
||||
done; \
|
||||
$(mkinstalldirs) $$paths && \
|
||||
echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
|
||||
for i in `echo $(INSTALL_HEADERS)`; do \
|
||||
if test "$(PHP_PECL_EXTENSION)"; then \
|
||||
src=`echo $$i | $(SED) -e "s#ext/$(PHP_PECL_EXTENSION)/##g"`; \
|
||||
else \
|
||||
src=$$i; \
|
||||
fi; \
|
||||
if test -f "$(top_srcdir)/$$src"; then \
|
||||
$(INSTALL_DATA) $(top_srcdir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
|
||||
elif test -f "$(top_builddir)/$$src"; then \
|
||||
$(INSTALL_DATA) $(top_builddir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
|
||||
else \
|
||||
(cd $(top_srcdir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \
|
||||
cd $(top_builddir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \
|
||||
fi \
|
||||
done; \
|
||||
fi
|
||||
|
||||
PHP_TEST_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1'
|
||||
PHP_TEST_SHARED_EXTENSIONS = ` \
|
||||
if test "x$(PHP_MODULES)" != "x"; then \
|
||||
for i in $(PHP_MODULES)""; do \
|
||||
. $$i; \
|
||||
if test "x$$dlname" != "xdl_test.so"; then \
|
||||
$(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
|
||||
fi; \
|
||||
done; \
|
||||
fi; \
|
||||
if test "x$(PHP_ZEND_EX)" != "x"; then \
|
||||
for i in $(PHP_ZEND_EX)""; do \
|
||||
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d zend_extension=$(top_builddir)/modules/$$dlname"; \
|
||||
done; \
|
||||
fi`
|
||||
PHP_DEPRECATED_DIRECTIVES_REGEX = '^[\t\ ]*(magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*='
|
||||
|
||||
test: all
|
||||
@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
|
||||
INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
|
||||
if test "$$INI_FILE"; then \
|
||||
$(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
|
||||
else \
|
||||
echo > $(top_builddir)/tmp-php.ini; \
|
||||
fi; \
|
||||
INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
|
||||
if test "$$INI_SCANNED_PATH"; then \
|
||||
INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
|
||||
$(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
|
||||
fi; \
|
||||
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(PHP_EXECUTABLE) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
|
||||
TEST_RESULT_EXIT_CODE=$$?; \
|
||||
rm $(top_builddir)/tmp-php.ini; \
|
||||
exit $$TEST_RESULT_EXIT_CODE; \
|
||||
else \
|
||||
echo "ERROR: Cannot run tests without CLI sapi."; \
|
||||
fi
|
||||
|
||||
clean:
|
||||
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
|
||||
find . -name \*.lo -o -name \*.o -o -name \*.dep | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.so | xargs rm -f
|
||||
find . -name .libs -a -type d|xargs rm -rf
|
||||
rm -f libphp.la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
rm -f ext/opcache/jit/zend_jit_x86.c
|
||||
rm -f ext/opcache/jit/zend_jit_arm64.c
|
||||
rm -f ext/opcache/minilua
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h
|
||||
rm -f main/build-defs.h scripts/phpize
|
||||
rm -f ext/date/lib/timelib_config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak
|
||||
rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 sapi/phpdbg/phpdbg.1 ext/phar/phar.1 ext/phar/phar.phar.1
|
||||
rm -f sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html
|
||||
rm -f ext/phar/phar.phar ext/phar/phar.php
|
||||
if test "$(srcdir)" != "$(builddir)"; then \
|
||||
rm -f ext/phar/phar/phar.inc; \
|
||||
fi
|
||||
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
|
||||
|
||||
prof-gen:
|
||||
CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-generate all
|
||||
find . -name \*.gcda | xargs rm -f
|
||||
|
||||
prof-clean:
|
||||
find . -name \*.lo -o -name \*.o | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.so | xargs rm -f
|
||||
rm -f libphp.la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
|
||||
prof-use:
|
||||
CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-use all
|
||||
|
||||
%_arginfo.h: %.stub.php
|
||||
@if test -e "$(top_srcdir)/build/gen_stub.php"; then \
|
||||
if test ! -z "$(PHP)"; then \
|
||||
echo Parse $< to generate $@;\
|
||||
$(PHP) $(top_srcdir)/build/gen_stub.php $<; \
|
||||
elif test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
|
||||
echo Parse $< to generate $@;\
|
||||
$(PHP_EXECUTABLE) $(top_srcdir)/build/gen_stub.php $<; \
|
||||
fi; \
|
||||
fi;
|
||||
|
||||
.PHONY: all clean install distclean test prof-gen prof-clean prof-use
|
||||
.NOEXPORT:
|
||||
53
contrib/php/build/ax_check_compile_flag.m4
Normal file
53
contrib/php/build/ax_check_compile_flag.m4
Normal file
@@ -0,0 +1,53 @@
|
||||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the current language's compiler
|
||||
# or gives an error. (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
||||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
||||
# force the compiler to issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 6
|
||||
|
||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
||||
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_COMPILE_FLAGS
|
||||
241
contrib/php/build/ax_gcc_func_attribute.m4
Normal file
241
contrib/php/build/ax_gcc_func_attribute.m4
Normal file
@@ -0,0 +1,241 @@
|
||||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_gcc_func_attribute.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_GCC_FUNC_ATTRIBUTE(ATTRIBUTE)
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro checks if the compiler supports one of GCC's function
|
||||
# attributes; many other compilers also provide function attributes with
|
||||
# the same syntax. Compiler warnings are used to detect supported
|
||||
# attributes as unsupported ones are ignored by default so quieting
|
||||
# warnings when using this macro will yield false positives.
|
||||
#
|
||||
# The ATTRIBUTE parameter holds the name of the attribute to be checked.
|
||||
#
|
||||
# If ATTRIBUTE is supported define HAVE_FUNC_ATTRIBUTE_<ATTRIBUTE>.
|
||||
#
|
||||
# The macro caches its result in the ax_cv_have_func_attribute_<attribute>
|
||||
# variable.
|
||||
#
|
||||
# The macro currently supports the following function attributes:
|
||||
#
|
||||
# alias
|
||||
# aligned
|
||||
# alloc_size
|
||||
# always_inline
|
||||
# artificial
|
||||
# cold
|
||||
# const
|
||||
# constructor
|
||||
# constructor_priority for constructor attribute with priority
|
||||
# deprecated
|
||||
# destructor
|
||||
# dllexport
|
||||
# dllimport
|
||||
# error
|
||||
# externally_visible
|
||||
# fallthrough
|
||||
# flatten
|
||||
# format
|
||||
# format_arg
|
||||
# gnu_inline
|
||||
# hot
|
||||
# ifunc
|
||||
# leaf
|
||||
# malloc
|
||||
# noclone
|
||||
# noinline
|
||||
# nonnull
|
||||
# noreturn
|
||||
# nothrow
|
||||
# optimize
|
||||
# pure
|
||||
# sentinel
|
||||
# sentinel_position
|
||||
# unused
|
||||
# used
|
||||
# visibility
|
||||
# warning
|
||||
# warn_unused_result
|
||||
# weak
|
||||
# weakref
|
||||
#
|
||||
# Unsupported function attributes will be tested with a prototype
|
||||
# returning an int and not accepting any arguments and the result of the
|
||||
# check might be wrong or meaningless so use with care.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2013 Gabriele Svelto <gabriele.svelto@gmail.com>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 9
|
||||
|
||||
AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
|
||||
AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1])
|
||||
|
||||
AC_CACHE_CHECK([for __attribute__(($1))], [ac_var], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
||||
m4_case([$1],
|
||||
[alias], [
|
||||
int foo( void ) { return 0; }
|
||||
int bar( void ) __attribute__(($1("foo")));
|
||||
],
|
||||
[aligned], [
|
||||
int foo( void ) __attribute__(($1(32)));
|
||||
],
|
||||
[alloc_size], [
|
||||
void *foo(int a) __attribute__(($1(1)));
|
||||
],
|
||||
[always_inline], [
|
||||
inline __attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[artificial], [
|
||||
inline __attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[cold], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[const], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[constructor_priority], [
|
||||
int foo( void ) __attribute__((__constructor__(65535/2)));
|
||||
],
|
||||
[constructor], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[deprecated], [
|
||||
int foo( void ) __attribute__(($1("")));
|
||||
],
|
||||
[destructor], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[dllexport], [
|
||||
__attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[dllimport], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[error], [
|
||||
int foo( void ) __attribute__(($1("")));
|
||||
],
|
||||
[externally_visible], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[fallthrough], [
|
||||
int foo( void ) {switch (0) { case 1: __attribute__(($1)); case 2: break ; }};
|
||||
],
|
||||
[flatten], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[format], [
|
||||
int foo(const char *p, ...) __attribute__(($1(printf, 1, 2)));
|
||||
],
|
||||
[format_arg], [
|
||||
char *foo(const char *p) __attribute__(($1(1)));
|
||||
],
|
||||
[gnu_inline], [
|
||||
inline __attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[hot], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[ifunc], [
|
||||
int my_foo( void ) { return 0; }
|
||||
static int (*resolve_foo(void))(void) { return my_foo; }
|
||||
int foo( void ) __attribute__(($1("resolve_foo")));
|
||||
],
|
||||
[leaf], [
|
||||
__attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[malloc], [
|
||||
void *foo( void ) __attribute__(($1));
|
||||
],
|
||||
[noclone], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[noinline], [
|
||||
__attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[nonnull], [
|
||||
int foo(char *p) __attribute__(($1(1)));
|
||||
],
|
||||
[noreturn], [
|
||||
void foo( void ) __attribute__(($1));
|
||||
],
|
||||
[nothrow], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[optimize], [
|
||||
__attribute__(($1(3))) int foo( void ) { return 0; }
|
||||
],
|
||||
[pure], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[sentinel], [
|
||||
int foo(void *p, ...) __attribute__(($1));
|
||||
],
|
||||
[sentinel_position], [
|
||||
int foo(void *p, ...) __attribute__(($1(1)));
|
||||
],
|
||||
[returns_nonnull], [
|
||||
void *foo( void ) __attribute__(($1));
|
||||
],
|
||||
[unused], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[used], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[visibility], [
|
||||
int foo_def( void ) __attribute__(($1("default")));
|
||||
int foo_hid( void ) __attribute__(($1("hidden")));
|
||||
int foo_int( void ) __attribute__(($1("internal")));
|
||||
int foo_pro( void ) __attribute__(($1("protected")));
|
||||
],
|
||||
[warning], [
|
||||
int foo( void ) __attribute__(($1("")));
|
||||
],
|
||||
[warn_unused_result], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[weak], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[weakref], [
|
||||
static int foo( void ) { return 0; }
|
||||
static int bar( void ) __attribute__(($1("foo")));
|
||||
],
|
||||
[target], [
|
||||
int bar( void ) __attribute__(($1("sse2")));
|
||||
],
|
||||
[
|
||||
m4_warn([syntax], [Unsupported attribute $1, the test may fail])
|
||||
int foo( void ) __attribute__(($1));
|
||||
]
|
||||
)], [])
|
||||
],
|
||||
dnl GCC doesn't exit with an error if an unknown attribute is
|
||||
dnl provided but only outputs a warning, so accept the attribute
|
||||
dnl only if no warning were issued.
|
||||
[AS_IF([test -s conftest.err],
|
||||
[AS_VAR_SET([ac_var], [no])],
|
||||
[AS_VAR_SET([ac_var], [yes])])],
|
||||
[AS_VAR_SET([ac_var], [no])])
|
||||
])
|
||||
|
||||
AS_IF([test yes = AS_VAR_GET([ac_var])],
|
||||
[AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_FUNC_ATTRIBUTE_$1), 1,
|
||||
[Define to 1 if the system has the `$1' function attribute])], [])
|
||||
|
||||
AS_VAR_POPDEF([ac_var])
|
||||
])
|
||||
1818
contrib/php/build/config.guess
vendored
Executable file
1818
contrib/php/build/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
2364
contrib/php/build/config.sub
vendored
Executable file
2364
contrib/php/build/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
@@ -1,24 +0,0 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id: dynlib.mk,v 1.4 2002/02/28 08:25:30 sebastian Exp $
|
||||
#
|
||||
|
||||
all: all-recursive
|
||||
|
||||
include $(builddir)/libs.mk
|
||||
|
||||
include $(top_srcdir)/build/rules.mk
|
||||
@@ -1,80 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id: fastgen.sh,v 1.14 2002/02/28 08:25:33 sebastian Exp $
|
||||
#
|
||||
|
||||
if test "$#" = "0"; then
|
||||
echo "Usage: fastgen.sh <srcdir> <mkdir_p> <bsdmakefile_p> <file>"
|
||||
fi
|
||||
|
||||
srcdir=$1
|
||||
shift
|
||||
|
||||
mkdir_p=$1
|
||||
shift
|
||||
|
||||
bsd_makefile=$1
|
||||
shift
|
||||
|
||||
top_srcdir=`(cd $srcdir; pwd)`
|
||||
top_builddir=`pwd`
|
||||
|
||||
if test "$mkdir_p" = "yes"; then
|
||||
mkdir_p="mkdir -p"
|
||||
else
|
||||
mkdir_p="$top_srcdir/build/shtool mkdir -p"
|
||||
fi
|
||||
|
||||
if test "$bsd_makefile" = "yes"; then
|
||||
(cd $top_srcdir; ./build/bsd_makefile)
|
||||
|
||||
for makefile in $@; do
|
||||
echo "fastgen.sh: creating $makefile"
|
||||
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
|
||||
$mkdir_p "$dir/"
|
||||
|
||||
cat - $top_srcdir/$makefile.in <<EOF |sed 's/^include \(.*\)/.include "\1"/' >$makefile
|
||||
top_srcdir = $top_srcdir
|
||||
top_builddir = $top_builddir
|
||||
srcdir = $top_srcdir/$dir
|
||||
builddir = $top_builddir/$dir
|
||||
VPATH = $top_srcdir/$dir
|
||||
EOF
|
||||
|
||||
test -z "$dir" && dir=.
|
||||
touch $dir/.deps
|
||||
done
|
||||
else
|
||||
for makefile in $@; do
|
||||
echo "fastgen.sh: creating $makefile"
|
||||
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
|
||||
$mkdir_p "$dir/"
|
||||
|
||||
cat - $top_srcdir/$makefile.in <<EOF >$makefile
|
||||
top_srcdir = $top_srcdir
|
||||
top_builddir = $top_builddir
|
||||
srcdir = $top_srcdir/$dir
|
||||
builddir = $top_builddir/$dir
|
||||
VPATH = $top_srcdir/$dir
|
||||
EOF
|
||||
|
||||
test -z "$dir" && dir=.
|
||||
touch $dir/.deps
|
||||
done
|
||||
fi
|
||||
5179
contrib/php/build/gen_stub.php
Normal file
5179
contrib/php/build/gen_stub.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,23 +0,0 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id: library.mk,v 1.12 2002/02/28 08:25:33 sebastian Exp $
|
||||
#
|
||||
|
||||
LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo) $(LTLIBRARY_OBJECTS_X)
|
||||
|
||||
$(LTLIBRARY_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES)
|
||||
$(LINK) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD)
|
||||
6370
contrib/php/build/libtool.m4
vendored
Normal file
6370
contrib/php/build/libtool.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,24 +0,0 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id: ltlib.mk,v 1.7 2002/02/28 08:25:34 sebastian Exp $
|
||||
#
|
||||
|
||||
targets = $(LTLIBRARY_NAME)
|
||||
|
||||
include $(top_srcdir)/build/rules.mk
|
||||
include $(top_srcdir)/build/library.mk
|
||||
|
||||
4316
contrib/php/libtool → contrib/php/build/ltmain.sh
Executable file → Normal file
4316
contrib/php/libtool → contrib/php/build/ltmain.sh
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,75 +0,0 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 2000 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id: mkdep.awk,v 1.5 2002/02/28 08:25:35 sebastian Exp $
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# echo top_srcdir top_builddir srcdir CPP [CPP-ARGS] filenames | \
|
||||
# awk -f mkdep.awk > dependencies
|
||||
|
||||
|
||||
{
|
||||
top_srcdir=$1
|
||||
top_builddir=$2
|
||||
srcdir=$3
|
||||
cmd=$4
|
||||
|
||||
for (i = 5; i <= NF; i++) {
|
||||
if (match($i, "^-[A-Z]") == 0)
|
||||
break;
|
||||
cmd=cmd " " $i
|
||||
}
|
||||
|
||||
dif=i-1
|
||||
|
||||
for (; i <= NF; i++)
|
||||
filenames[i-dif]=$i
|
||||
|
||||
no_files=NF-dif
|
||||
|
||||
for(i = 1; i <= no_files; i++) {
|
||||
if (system("test -r " filenames[i]) != 0)
|
||||
continue
|
||||
|
||||
target=filenames[i]
|
||||
sub(srcdir "/", "", target)
|
||||
target2=target
|
||||
sub("\.(c|cpp)$", ".lo", target);
|
||||
sub("\.(c|cpp)$", ".slo", target2);
|
||||
|
||||
for (e in used)
|
||||
delete used[e]
|
||||
|
||||
cmdx=cmd " " filenames[i]
|
||||
done=0
|
||||
while ((cmdx | getline) > 0) {
|
||||
if (match($0, "^# [0-9]* \".*\.h\"") != 0) {
|
||||
if (sub(top_srcdir, "$(top_srcdir)", $3) == 0)
|
||||
sub(top_builddir, "$(top_builddir)", $3)
|
||||
if (substr($3,2,1) != "/" && used[$3] != 1) {
|
||||
if (done == 0)
|
||||
printf(target " " target2 ":")
|
||||
done=1
|
||||
printf(" \\\n\t" substr($3,2,length($3)-2))
|
||||
used[$3] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (done == 1)
|
||||
print "\n"
|
||||
}
|
||||
}
|
||||
2876
contrib/php/build/php.m4
Normal file
2876
contrib/php/build/php.m4
Normal file
File diff suppressed because it is too large
Load Diff
956
contrib/php/build/php_cxx_compile_stdcxx.m4
Normal file
956
contrib/php/build/php_cxx_compile_stdcxx.m4
Normal file
@@ -0,0 +1,956 @@
|
||||
dnl
|
||||
dnl Based on https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
|
||||
dnl Author: Anatol Belski <ab@php.net>
|
||||
dnl
|
||||
dnl PHP_CXX_COMPILE_STDCXX(version, mandatory|optional, var_name_to_put_switch_in)
|
||||
dnl
|
||||
dnl ARGUMENTS
|
||||
dnl
|
||||
dnl first arg - version as 11, 14, 17 or 20
|
||||
dnl second arg - if mandatory, the configure will fail when no features found.
|
||||
dnl Optional will make configure silently continue
|
||||
dnl third arg - a variable name where the corresponding switch would be put. If
|
||||
dnl the variable is already defined, its contents will be overwritten.
|
||||
dnl
|
||||
dnl EXAMPLE
|
||||
dnl
|
||||
dnl PHP_CXX_COMPILE_STDCXX(14, mandatory, MY_STDCXX_SWiTCH)
|
||||
dnl echo $MY_STDCXX_SWITCH
|
||||
dnl
|
||||
|
||||
dnl
|
||||
dnl PHP specific implementation start.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([PHP_CXX_COMPILE_STDCXX], [dnl
|
||||
m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
|
||||
[$1], [14], [ax_cxx_compile_alternatives="14 1y"],
|
||||
[$1], [17], [ax_cxx_compile_alternatives="17 1z"],
|
||||
[$1], [20], [ax_cxx_compile_alternatives="20"],
|
||||
[m4_fatal([invalid first argument `$1' to PHP_CXX_COMPILE_STDCXX])])[]dnl
|
||||
m4_if([$2], [], [ax_cxx_compile_cxx$1_required=true],
|
||||
[$2], [mandatory], [ax_cxx_compile_cxx$1_required=true],
|
||||
[$2], [optional], [ax_cxx_compile_cxx$1_required=false],
|
||||
[m4_fatal([invalid third argument `$2' to PHP_CXX_COMPILE_STDCXX])])[]dnl
|
||||
AC_LANG_PUSH([C++])dnl
|
||||
ac_success=no
|
||||
|
||||
dnl HP's aCC needs +std=c++11 according to:
|
||||
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
|
||||
dnl Cray's crayCC needs "-h std=c++11"
|
||||
for alternative in ${ax_cxx_compile_alternatives}; do
|
||||
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXX="$CXX"
|
||||
CXX="$CXX $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXX="$ac_save_CXX"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
eval AS_TR_SH([$3])="$switch"
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test x$ac_success = xyes; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
AC_LANG_POP([C++])
|
||||
if test x$ax_cxx_compile_cxx$1_required = xtrue; then
|
||||
if test x$ac_success = xno; then
|
||||
AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
|
||||
fi
|
||||
fi
|
||||
if test x$ac_success = xno; then
|
||||
AC_MSG_NOTICE([No compiler with C++$1 support was found])
|
||||
fi
|
||||
AC_SUBST(HAVE_CXX$1)
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
dnl PHP specific implementation end.
|
||||
dnl The relevant part of the unchanged original implementation is below.
|
||||
dnl
|
||||
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
|
||||
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
|
||||
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
|
||||
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
|
||||
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
|
||||
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
|
||||
# Copyright (c) 2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
|
||||
# Copyright (c) 2019 Enji Cooper <yaneurabeya@gmail.com>
|
||||
# Copyright (c) 2020 Jason Merrill <jason@redhat.com>
|
||||
# Copyright (c) 2021 Jörn Heusipp <osmanx@problemloesungsmaschine.de>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
|
||||
dnl Test body for checking C++11 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
)
|
||||
|
||||
dnl Test body for checking C++14 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
|
||||
)
|
||||
|
||||
dnl Test body for checking C++17 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
|
||||
)
|
||||
|
||||
dnl Test body for checking C++20 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_20],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_20
|
||||
)
|
||||
|
||||
|
||||
dnl Tests for new features in C++11
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++11, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201103L
|
||||
|
||||
#error "This is not a C++11 compiler"
|
||||
|
||||
#else
|
||||
|
||||
namespace cxx11
|
||||
{
|
||||
|
||||
namespace test_static_assert
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
struct check
|
||||
{
|
||||
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_final_override
|
||||
{
|
||||
|
||||
struct Base
|
||||
{
|
||||
virtual ~Base() {}
|
||||
virtual void f() {}
|
||||
};
|
||||
|
||||
struct Derived : public Base
|
||||
{
|
||||
virtual ~Derived() override {}
|
||||
virtual void f() override {}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_double_right_angle_brackets
|
||||
{
|
||||
|
||||
template < typename T >
|
||||
struct check {};
|
||||
|
||||
typedef check<void> single_type;
|
||||
typedef check<check<void>> double_type;
|
||||
typedef check<check<check<void>>> triple_type;
|
||||
typedef check<check<check<check<void>>>> quadruple_type;
|
||||
|
||||
}
|
||||
|
||||
namespace test_decltype
|
||||
{
|
||||
|
||||
int
|
||||
f()
|
||||
{
|
||||
int a = 1;
|
||||
decltype(a) b = 2;
|
||||
return a + b;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_type_deduction
|
||||
{
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
struct is_same
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
struct is_same<T, T>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
auto
|
||||
add(T1 a1, T2 a2) -> decltype(a1 + a2)
|
||||
{
|
||||
return a1 + a2;
|
||||
}
|
||||
|
||||
int
|
||||
test(const int c, volatile int v)
|
||||
{
|
||||
static_assert(is_same<int, decltype(0)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(c)>::value == false, "");
|
||||
static_assert(is_same<int, decltype(v)>::value == false, "");
|
||||
auto ac = c;
|
||||
auto av = v;
|
||||
auto sumi = ac + av + 'x';
|
||||
auto sumf = ac + av + 1.0;
|
||||
static_assert(is_same<int, decltype(ac)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(av)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(sumi)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(sumf)>::value == false, "");
|
||||
static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
|
||||
return (sumf > 0.0) ? sumi : add(c, v);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_noexcept
|
||||
{
|
||||
|
||||
int f() { return 0; }
|
||||
int g() noexcept { return 0; }
|
||||
|
||||
static_assert(noexcept(f()) == false, "");
|
||||
static_assert(noexcept(g()) == true, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_constexpr
|
||||
{
|
||||
|
||||
template < typename CharT >
|
||||
unsigned long constexpr
|
||||
strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
|
||||
{
|
||||
return *s ? strlen_c_r(s + 1, acc + 1) : acc;
|
||||
}
|
||||
|
||||
template < typename CharT >
|
||||
unsigned long constexpr
|
||||
strlen_c(const CharT *const s) noexcept
|
||||
{
|
||||
return strlen_c_r(s, 0UL);
|
||||
}
|
||||
|
||||
static_assert(strlen_c("") == 0UL, "");
|
||||
static_assert(strlen_c("1") == 1UL, "");
|
||||
static_assert(strlen_c("example") == 7UL, "");
|
||||
static_assert(strlen_c("another\0example") == 7UL, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_rvalue_references
|
||||
{
|
||||
|
||||
template < int N >
|
||||
struct answer
|
||||
{
|
||||
static constexpr int value = N;
|
||||
};
|
||||
|
||||
answer<1> f(int&) { return answer<1>(); }
|
||||
answer<2> f(const int&) { return answer<2>(); }
|
||||
answer<3> f(int&&) { return answer<3>(); }
|
||||
|
||||
void
|
||||
test()
|
||||
{
|
||||
int i = 0;
|
||||
const int c = 0;
|
||||
static_assert(decltype(f(i))::value == 1, "");
|
||||
static_assert(decltype(f(c))::value == 2, "");
|
||||
static_assert(decltype(f(0))::value == 3, "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_uniform_initialization
|
||||
{
|
||||
|
||||
struct test
|
||||
{
|
||||
static const int zero {};
|
||||
static const int one {1};
|
||||
};
|
||||
|
||||
static_assert(test::zero == 0, "");
|
||||
static_assert(test::one == 1, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambdas
|
||||
{
|
||||
|
||||
void
|
||||
test1()
|
||||
{
|
||||
auto lambda1 = [](){};
|
||||
auto lambda2 = lambda1;
|
||||
lambda1();
|
||||
lambda2();
|
||||
}
|
||||
|
||||
int
|
||||
test2()
|
||||
{
|
||||
auto a = [](int i, int j){ return i + j; }(1, 2);
|
||||
auto b = []() -> int { return '0'; }();
|
||||
auto c = [=](){ return a + b; }();
|
||||
auto d = [&](){ return c; }();
|
||||
auto e = [a, &b](int x) mutable {
|
||||
const auto identity = [](int y){ return y; };
|
||||
for (auto i = 0; i < a; ++i)
|
||||
a += b--;
|
||||
return x + identity(a + b);
|
||||
}(0);
|
||||
return a + b + c + d + e;
|
||||
}
|
||||
|
||||
int
|
||||
test3()
|
||||
{
|
||||
const auto nullary = [](){ return 0; };
|
||||
const auto unary = [](int x){ return x; };
|
||||
using nullary_t = decltype(nullary);
|
||||
using unary_t = decltype(unary);
|
||||
const auto higher1st = [](nullary_t f){ return f(); };
|
||||
const auto higher2nd = [unary](nullary_t f1){
|
||||
return [unary, f1](unary_t f2){ return f2(unary(f1())); };
|
||||
};
|
||||
return higher1st(nullary) + higher2nd(nullary)(unary);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_variadic_templates
|
||||
{
|
||||
|
||||
template <int...>
|
||||
struct sum;
|
||||
|
||||
template <int N0, int... N1toN>
|
||||
struct sum<N0, N1toN...>
|
||||
{
|
||||
static constexpr auto value = N0 + sum<N1toN...>::value;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct sum<>
|
||||
{
|
||||
static constexpr auto value = 0;
|
||||
};
|
||||
|
||||
static_assert(sum<>::value == 0, "");
|
||||
static_assert(sum<1>::value == 1, "");
|
||||
static_assert(sum<23>::value == 23, "");
|
||||
static_assert(sum<1, 2>::value == 3, "");
|
||||
static_assert(sum<5, 5, 11>::value == 21, "");
|
||||
static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
|
||||
|
||||
}
|
||||
|
||||
// http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
|
||||
// Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
|
||||
// because of this.
|
||||
namespace test_template_alias_sfinae
|
||||
{
|
||||
|
||||
struct foo {};
|
||||
|
||||
template<typename T>
|
||||
using member = typename T::member_type;
|
||||
|
||||
template<typename T>
|
||||
void func(...) {}
|
||||
|
||||
template<typename T>
|
||||
void func(member<T>*) {}
|
||||
|
||||
void test();
|
||||
|
||||
void test() { func<foo>(0); }
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx11
|
||||
|
||||
#endif // __cplusplus >= 201103L
|
||||
|
||||
]])
|
||||
|
||||
|
||||
dnl Tests for new features in C++14
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++14, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201402L
|
||||
|
||||
#error "This is not a C++14 compiler"
|
||||
|
||||
#else
|
||||
|
||||
namespace cxx14
|
||||
{
|
||||
|
||||
namespace test_polymorphic_lambdas
|
||||
{
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
const auto lambda = [](auto&&... args){
|
||||
const auto istiny = [](auto x){
|
||||
return (sizeof(x) == 1UL) ? 1 : 0;
|
||||
};
|
||||
const int aretiny[] = { istiny(args)... };
|
||||
return aretiny[0];
|
||||
};
|
||||
return lambda(1, 1L, 1.0f, '1');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_binary_literals
|
||||
{
|
||||
|
||||
constexpr auto ivii = 0b0000000000101010;
|
||||
static_assert(ivii == 42, "wrong value");
|
||||
|
||||
}
|
||||
|
||||
namespace test_generalized_constexpr
|
||||
{
|
||||
|
||||
template < typename CharT >
|
||||
constexpr unsigned long
|
||||
strlen_c(const CharT *const s) noexcept
|
||||
{
|
||||
auto length = 0UL;
|
||||
for (auto p = s; *p; ++p)
|
||||
++length;
|
||||
return length;
|
||||
}
|
||||
|
||||
static_assert(strlen_c("") == 0UL, "");
|
||||
static_assert(strlen_c("x") == 1UL, "");
|
||||
static_assert(strlen_c("test") == 4UL, "");
|
||||
static_assert(strlen_c("another\0test") == 7UL, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambda_init_capture
|
||||
{
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
auto x = 0;
|
||||
const auto lambda1 = [a = x](int b){ return a + b; };
|
||||
const auto lambda2 = [a = lambda1(x)](){ return a; };
|
||||
return lambda2();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_digit_separators
|
||||
{
|
||||
|
||||
constexpr auto ten_million = 100'000'000;
|
||||
static_assert(ten_million == 100000000, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_return_type_deduction
|
||||
{
|
||||
|
||||
auto f(int& x) { return x; }
|
||||
decltype(auto) g(int& x) { return x; }
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
struct is_same
|
||||
{
|
||||
static constexpr auto value = false;
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
struct is_same<T, T>
|
||||
{
|
||||
static constexpr auto value = true;
|
||||
};
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
auto x = 0;
|
||||
static_assert(is_same<int, decltype(f(x))>::value, "");
|
||||
static_assert(is_same<int&, decltype(g(x))>::value, "");
|
||||
return x;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx14
|
||||
|
||||
#endif // __cplusplus >= 201402L
|
||||
|
||||
]])
|
||||
|
||||
|
||||
dnl Tests for new features in C++17
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++17, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201703L
|
||||
|
||||
#error "This is not a C++17 compiler"
|
||||
|
||||
#else
|
||||
|
||||
#include <initializer_list>
|
||||
#include <utility>
|
||||
#include <type_traits>
|
||||
|
||||
namespace cxx17
|
||||
{
|
||||
|
||||
namespace test_constexpr_lambdas
|
||||
{
|
||||
|
||||
constexpr int foo = [](){return 42;}();
|
||||
|
||||
}
|
||||
|
||||
namespace test::nested_namespace::definitions
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
namespace test_fold_expression
|
||||
{
|
||||
|
||||
template<typename... Args>
|
||||
int multiply(Args... args)
|
||||
{
|
||||
return (args * ... * 1);
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
bool all(Args... args)
|
||||
{
|
||||
return (args && ...);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_extended_static_assert
|
||||
{
|
||||
|
||||
static_assert (true);
|
||||
|
||||
}
|
||||
|
||||
namespace test_auto_brace_init_list
|
||||
{
|
||||
|
||||
auto foo = {5};
|
||||
auto bar {5};
|
||||
|
||||
static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
|
||||
static_assert(std::is_same<int, decltype(bar)>::value);
|
||||
}
|
||||
|
||||
namespace test_typename_in_template_template_parameter
|
||||
{
|
||||
|
||||
template<template<typename> typename X> struct D;
|
||||
|
||||
}
|
||||
|
||||
namespace test_fallthrough_nodiscard_maybe_unused_attributes
|
||||
{
|
||||
|
||||
int f1()
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
|
||||
[[nodiscard]] int f2()
|
||||
{
|
||||
[[maybe_unused]] auto unused = f1();
|
||||
|
||||
switch (f1())
|
||||
{
|
||||
case 17:
|
||||
f1();
|
||||
[[fallthrough]];
|
||||
case 42:
|
||||
f1();
|
||||
}
|
||||
return f1();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_extended_aggregate_initialization
|
||||
{
|
||||
|
||||
struct base1
|
||||
{
|
||||
int b1, b2 = 42;
|
||||
};
|
||||
|
||||
struct base2
|
||||
{
|
||||
base2() {
|
||||
b3 = 42;
|
||||
}
|
||||
int b3;
|
||||
};
|
||||
|
||||
struct derived : base1, base2
|
||||
{
|
||||
int d;
|
||||
};
|
||||
|
||||
derived d1 {{1, 2}, {}, 4}; // full initialization
|
||||
derived d2 {{}, {}, 4}; // value-initialized bases
|
||||
|
||||
}
|
||||
|
||||
namespace test_general_range_based_for_loop
|
||||
{
|
||||
|
||||
struct iter
|
||||
{
|
||||
int i;
|
||||
|
||||
int& operator* ()
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
const int& operator* () const
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
iter& operator++()
|
||||
{
|
||||
++i;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
struct sentinel
|
||||
{
|
||||
int i;
|
||||
};
|
||||
|
||||
bool operator== (const iter& i, const sentinel& s)
|
||||
{
|
||||
return i.i == s.i;
|
||||
}
|
||||
|
||||
bool operator!= (const iter& i, const sentinel& s)
|
||||
{
|
||||
return !(i == s);
|
||||
}
|
||||
|
||||
struct range
|
||||
{
|
||||
iter begin() const
|
||||
{
|
||||
return {0};
|
||||
}
|
||||
|
||||
sentinel end() const
|
||||
{
|
||||
return {5};
|
||||
}
|
||||
};
|
||||
|
||||
void f()
|
||||
{
|
||||
range r {};
|
||||
|
||||
for (auto i : r)
|
||||
{
|
||||
[[maybe_unused]] auto v = i;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambda_capture_asterisk_this_by_value
|
||||
{
|
||||
|
||||
struct t
|
||||
{
|
||||
int i;
|
||||
int foo()
|
||||
{
|
||||
return [*this]()
|
||||
{
|
||||
return i;
|
||||
}();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_enum_class_construction
|
||||
{
|
||||
|
||||
enum class byte : unsigned char
|
||||
{};
|
||||
|
||||
byte foo {42};
|
||||
|
||||
}
|
||||
|
||||
namespace test_constexpr_if
|
||||
{
|
||||
|
||||
template <bool cond>
|
||||
int f ()
|
||||
{
|
||||
if constexpr(cond)
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_selection_statement_with_initializer
|
||||
{
|
||||
|
||||
int f()
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
|
||||
int f2()
|
||||
{
|
||||
if (auto i = f(); i > 0)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
switch (auto i = f(); i + 4)
|
||||
{
|
||||
case 17:
|
||||
return 2;
|
||||
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_template_argument_deduction_for_class_templates
|
||||
{
|
||||
|
||||
template <typename T1, typename T2>
|
||||
struct pair
|
||||
{
|
||||
pair (T1 p1, T2 p2)
|
||||
: m1 {p1},
|
||||
m2 {p2}
|
||||
{}
|
||||
|
||||
T1 m1;
|
||||
T2 m2;
|
||||
};
|
||||
|
||||
void f()
|
||||
{
|
||||
[[maybe_unused]] auto p = pair{13, 42u};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_non_type_auto_template_parameters
|
||||
{
|
||||
|
||||
template <auto n>
|
||||
struct B
|
||||
{};
|
||||
|
||||
B<5> b1;
|
||||
B<'a'> b2;
|
||||
|
||||
}
|
||||
|
||||
namespace test_structured_bindings
|
||||
{
|
||||
|
||||
int arr[2] = { 1, 2 };
|
||||
std::pair<int, int> pr = { 1, 2 };
|
||||
|
||||
auto f1() -> int(&)[2]
|
||||
{
|
||||
return arr;
|
||||
}
|
||||
|
||||
auto f2() -> std::pair<int, int>&
|
||||
{
|
||||
return pr;
|
||||
}
|
||||
|
||||
struct S
|
||||
{
|
||||
int x1 : 2;
|
||||
volatile double y1;
|
||||
};
|
||||
|
||||
S f3()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
auto [ x1, y1 ] = f1();
|
||||
auto& [ xr1, yr1 ] = f1();
|
||||
auto [ x2, y2 ] = f2();
|
||||
auto& [ xr2, yr2 ] = f2();
|
||||
const auto [ x3, y3 ] = f3();
|
||||
|
||||
}
|
||||
|
||||
namespace test_exception_spec_type_system
|
||||
{
|
||||
|
||||
struct Good {};
|
||||
struct Bad {};
|
||||
|
||||
void g1() noexcept;
|
||||
void g2();
|
||||
|
||||
template<typename T>
|
||||
Bad
|
||||
f(T*, T*);
|
||||
|
||||
template<typename T1, typename T2>
|
||||
Good
|
||||
f(T1*, T2*);
|
||||
|
||||
static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
|
||||
|
||||
}
|
||||
|
||||
namespace test_inline_variables
|
||||
{
|
||||
|
||||
template<class T> void f(T)
|
||||
{}
|
||||
|
||||
template<class T> inline T g(T)
|
||||
{
|
||||
return T{};
|
||||
}
|
||||
|
||||
template<> inline void f<>(int)
|
||||
{}
|
||||
|
||||
template<> int g<>(int)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx17
|
||||
|
||||
#endif // __cplusplus < 201703L
|
||||
|
||||
]])
|
||||
|
||||
|
||||
dnl Tests for new features in C++20
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 202002L
|
||||
|
||||
#error "This is not a C++20 compiler"
|
||||
|
||||
#else
|
||||
|
||||
#include <version>
|
||||
|
||||
namespace cxx20
|
||||
{
|
||||
|
||||
// As C++20 supports feature test macros in the standard, there is no
|
||||
// immediate need to actually test for feature availability on the
|
||||
// Autoconf side.
|
||||
|
||||
} // namespace cxx20
|
||||
|
||||
#endif // __cplusplus < 202002L
|
||||
|
||||
]])
|
||||
275
contrib/php/build/pkg.m4
Normal file
275
contrib/php/build/pkg.m4
Normal file
@@ -0,0 +1,275 @@
|
||||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
# serial 12 (pkg-config-0.29.2)
|
||||
|
||||
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation; either version 2 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful, but
|
||||
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with this program; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
dnl 02110-1301, USA.
|
||||
dnl
|
||||
dnl As a special exception to the GNU General Public License, if you
|
||||
dnl distribute this file as part of a program that contains a
|
||||
dnl configuration script generated by Autoconf, you may include it under
|
||||
dnl the same distribution terms that you use for the rest of that
|
||||
dnl program.
|
||||
|
||||
dnl PKG_PREREQ(MIN-VERSION)
|
||||
dnl -----------------------
|
||||
dnl Since: 0.29
|
||||
dnl
|
||||
dnl Verify that the version of the pkg-config macros are at least
|
||||
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
|
||||
dnl installed version of pkg-config, this checks the developer's version
|
||||
dnl of pkg.m4 when generating configure.
|
||||
dnl
|
||||
dnl To ensure that this macro is defined, also add:
|
||||
dnl m4_ifndef([PKG_PREREQ],
|
||||
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
|
||||
dnl
|
||||
dnl See the "Since" comment for each macro you use to see what version
|
||||
dnl of the macros you require.
|
||||
m4_defun([PKG_PREREQ],
|
||||
[m4_define([PKG_MACROS_VERSION], [0.29.2])
|
||||
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
|
||||
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
|
||||
])dnl PKG_PREREQ
|
||||
|
||||
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
||||
dnl ----------------------------------
|
||||
dnl Since: 0.16
|
||||
dnl
|
||||
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
|
||||
dnl first found in the path. Checks that the version of pkg-config found
|
||||
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
|
||||
dnl used since that's the first version where most current features of
|
||||
dnl pkg-config existed.
|
||||
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
||||
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
||||
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
|
||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
|
||||
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
|
||||
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
|
||||
|
||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
||||
fi
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
_pkg_min_version=m4_default([$1], [0.9.0])
|
||||
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
fi[]dnl
|
||||
])dnl PKG_PROG_PKG_CONFIG
|
||||
|
||||
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
dnl -------------------------------------------------------------------
|
||||
dnl Since: 0.18
|
||||
dnl
|
||||
dnl Check to see whether a particular set of modules exists. Similar to
|
||||
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||
dnl
|
||||
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
dnl only at the first occurrence in configure.ac, so if the first place
|
||||
dnl it's called might be skipped (such as if it is within an "if", you
|
||||
dnl have to call PKG_CHECK_EXISTS manually
|
||||
AC_DEFUN([PKG_CHECK_EXISTS],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
||||
m4_default([$2], [:])
|
||||
m4_ifvaln([$3], [else
|
||||
$3])dnl
|
||||
fi])
|
||||
|
||||
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||
dnl ---------------------------------------------
|
||||
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
|
||||
dnl pkg_failed based on the result.
|
||||
m4_define([_PKG_CONFIG],
|
||||
[if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes ],
|
||||
[pkg_failed=yes])
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi[]dnl
|
||||
])dnl _PKG_CONFIG
|
||||
|
||||
dnl _PKG_SHORT_ERRORS_SUPPORTED
|
||||
dnl ---------------------------
|
||||
dnl Internal check to see if pkg-config supports short errors.
|
||||
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi[]dnl
|
||||
])dnl _PKG_SHORT_ERRORS_SUPPORTED
|
||||
|
||||
|
||||
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
dnl [ACTION-IF-NOT-FOUND])
|
||||
dnl --------------------------------------------------------------
|
||||
dnl Since: 0.4.0
|
||||
dnl
|
||||
dnl Note that if there is a possibility the first call to
|
||||
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
|
||||
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
||||
AC_DEFUN([PKG_CHECK_MODULES],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
||||
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||
|
||||
pkg_failed=no
|
||||
AC_MSG_CHECKING([for $2])
|
||||
|
||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||
|
||||
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
||||
and $1[]_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.])
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
AC_MSG_RESULT([no])
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
|
||||
m4_default([$4], [AC_MSG_ERROR(
|
||||
[Package requirements ($2) were not met:
|
||||
|
||||
$$1_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
_PKG_TEXT])[]dnl
|
||||
])
|
||||
elif test $pkg_failed = untried; then
|
||||
AC_MSG_RESULT([no])
|
||||
m4_default([$4], [AC_MSG_FAILURE(
|
||||
[The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
_PKG_TEXT
|
||||
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
|
||||
])
|
||||
else
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||
AC_MSG_RESULT([yes])
|
||||
$3
|
||||
fi[]dnl
|
||||
])dnl PKG_CHECK_MODULES
|
||||
|
||||
|
||||
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
dnl [ACTION-IF-NOT-FOUND])
|
||||
dnl ---------------------------------------------------------------------
|
||||
dnl Since: 0.29
|
||||
dnl
|
||||
dnl Checks for existence of MODULES and gathers its build flags with
|
||||
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
|
||||
dnl and VARIABLE-PREFIX_LIBS from --libs.
|
||||
dnl
|
||||
dnl Note that if there is a possibility the first call to
|
||||
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
|
||||
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
|
||||
dnl configure.ac.
|
||||
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
_save_PKG_CONFIG=$PKG_CONFIG
|
||||
PKG_CONFIG="$PKG_CONFIG --static"
|
||||
PKG_CHECK_MODULES($@)
|
||||
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
|
||||
])dnl PKG_CHECK_MODULES_STATIC
|
||||
|
||||
|
||||
dnl PKG_INSTALLDIR([DIRECTORY])
|
||||
dnl -------------------------
|
||||
dnl Since: 0.27
|
||||
dnl
|
||||
dnl Substitutes the variable pkgconfigdir as the location where a module
|
||||
dnl should install pkg-config .pc files. By default the directory is
|
||||
dnl $libdir/pkgconfig, but the default can be changed by passing
|
||||
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
|
||||
dnl parameter.
|
||||
AC_DEFUN([PKG_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
[pkg-config installation directory @<:@]pkg_default[@:>@])
|
||||
AC_ARG_WITH([pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
|
||||
[with_pkgconfigdir=]pkg_default)
|
||||
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
])dnl PKG_INSTALLDIR
|
||||
|
||||
|
||||
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
|
||||
dnl --------------------------------
|
||||
dnl Since: 0.27
|
||||
dnl
|
||||
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
|
||||
dnl module should install arch-independent pkg-config .pc files. By
|
||||
dnl default the directory is $datadir/pkgconfig, but the default can be
|
||||
dnl changed by passing DIRECTORY. The user can override through the
|
||||
dnl --with-noarch-pkgconfigdir parameter.
|
||||
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
|
||||
AC_ARG_WITH([noarch-pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
|
||||
[with_noarch_pkgconfigdir=]pkg_default)
|
||||
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
])dnl PKG_NOARCH_INSTALLDIR
|
||||
|
||||
|
||||
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
|
||||
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
dnl -------------------------------------------
|
||||
dnl Since: 0.28
|
||||
dnl
|
||||
dnl Retrieves the value of the pkg-config variable for the given module.
|
||||
AC_DEFUN([PKG_CHECK_VAR],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
|
||||
|
||||
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
|
||||
AS_VAR_COPY([$1], [pkg_cv_][$1])
|
||||
|
||||
AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||
])dnl PKG_CHECK_VAR
|
||||
@@ -1,23 +0,0 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id: program.mk,v 1.6 2002/02/28 08:25:35 sebastian Exp $
|
||||
#
|
||||
|
||||
PROGRAM_OBJECTS = $(PROGRAM_SOURCES:.c=.lo)
|
||||
|
||||
$(PROGRAM_NAME): $(PROGRAM_DEPENDENCIES) $(PROGRAM_OBJECTS)
|
||||
$(LINK_CLEAN) $(PROGRAM_LDFLAGS) $(PROGRAM_OBJECTS) $(PROGRAM_LDADD)
|
||||
@@ -1,77 +0,0 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id: rules_pear.mk,v 1.16 2002/02/28 08:25:37 sebastian Exp $
|
||||
#
|
||||
|
||||
include $(top_srcdir)/build/rules_common.mk
|
||||
|
||||
install_targets = install-modules
|
||||
|
||||
all: all-recursive
|
||||
install: install-recursive
|
||||
|
||||
distclean-recursive depend-recursive clean-recursive all-recursive install-recursive:
|
||||
@otarget=`echo $@|sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for i in $$list; do \
|
||||
target="$$otarget"; \
|
||||
echo "Making $$target in $$i"; \
|
||||
if test "$$i" = "."; then \
|
||||
ok=yes; \
|
||||
target="$$target-p"; \
|
||||
fi; \
|
||||
(cd $$i && $(MAKE) $$target) || exit 1; \
|
||||
done; \
|
||||
if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi; \
|
||||
if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi
|
||||
|
||||
all-p: $(targets)
|
||||
install-p: $(targets) $(install_targets)
|
||||
distclean-p depend-p clean-p:
|
||||
|
||||
depend: depend-recursive
|
||||
@echo $(top_srcdir) $(top_builddir) $(srcdir) $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c *.c | $(AWK) -f $(top_srcdir)/build/mkdep.awk > $(builddir)/.deps || true
|
||||
|
||||
clean: clean-recursive clean-x
|
||||
|
||||
clean-x:
|
||||
rm -f $(targets) *.lo *.slo *.la *.o $(CLEANFILES)
|
||||
rm -rf .libs
|
||||
|
||||
distclean: distclean-recursive clean-x
|
||||
rm -f config.cache config.log config.status config_vars.mk libtool \
|
||||
config.h stamp-h Makefile build-defs.h php4.spec libphp4.module
|
||||
|
||||
cvsclean:
|
||||
@for i in `find . -name .cvsignore`; do \
|
||||
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore` *.o *.a || true); \
|
||||
done
|
||||
@rm -f $(SUBDIRS) 2>/dev/null || true
|
||||
|
||||
install-modules:
|
||||
if [ -d modules ]; then \
|
||||
$(mkinstalldirs) $(moduledir) && \
|
||||
echo "installing shared modules into $(moduledir)" && \
|
||||
rm -f modules/*.la && \
|
||||
cp modules/* $(moduledir); \
|
||||
fi
|
||||
|
||||
include $(builddir)/.deps
|
||||
|
||||
.PHONY: all-recursive clean-recursive install-recursive \
|
||||
$(install_targets) install all clean depend depend-recursive shared \
|
||||
distclean-recursive distclean clean-x all-p install-p distclean-p \
|
||||
depend-p clean-p
|
||||
@@ -1,77 +0,0 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 4 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2002 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 2.02 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
# | available at through the world-wide-web at |
|
||||
# | http://www.php.net/license/2_02.txt. |
|
||||
# | If you did not receive a copy of the PHP license and are unable to |
|
||||
# | obtain it through the world-wide-web, please send a note to |
|
||||
# | license@php.net so we can mail you a copy immediately. |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id: rules_common.mk,v 1.11 2002/02/28 08:25:36 sebastian Exp $
|
||||
#
|
||||
|
||||
include $(top_builddir)/config_vars.mk
|
||||
|
||||
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS)
|
||||
COMPILE = $(CC) $(COMMON_FLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
|
||||
CXX_COMPILE = $(CXX) $(COMMON_FLAGS) $(CXXFLAGS) $(EXTRA_CXXFLAGS)
|
||||
|
||||
SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) -prefer-pic $(EXTRA_CFLAGS) -c $< && touch $@
|
||||
CXX_SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CXX) $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) -prefer-pic $(EXTRA_CXXFLAGS) -c $< && touch $@
|
||||
|
||||
LINK = $(LIBTOOL) --mode=link $(COMPILE) $(LDFLAGS) -o $@
|
||||
LINK_CLEAN = $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
|
||||
INSTALL = $(top_srcdir)/build/shtool install -c
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
|
||||
DEFS = -I. -I$(srcdir) -I$(top_builddir)/main -I$(top_srcdir)
|
||||
|
||||
moduledir = $(EXTENSION_DIR)
|
||||
|
||||
CXX_SUFFIX = .cpp
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .slo .c $(CXX_SUFFIX) .lo .o .s .y .l
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
$(CXX_SUFFIX).o:
|
||||
$(CXX_COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.c.lo:
|
||||
$(PHP_COMPILE)
|
||||
|
||||
$(CXX_SUFFIX).lo:
|
||||
$(CXX_PHP_COMPILE)
|
||||
|
||||
.s.lo:
|
||||
$(PHP_COMPILE)
|
||||
|
||||
.c.slo:
|
||||
$(SHARED_COMPILE)
|
||||
|
||||
$(CXX_SUFFIX).slo:
|
||||
$(CXX_SHARED_COMPILE)
|
||||
|
||||
.y.c:
|
||||
$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
|
||||
if test -f y.tab.h; then \
|
||||
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
|
||||
else :; fi
|
||||
|
||||
.l.c:
|
||||
$(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
2093
contrib/php/config.guess
vendored
2093
contrib/php/config.guess
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,57 @@
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader 2.13. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if your C compiler doesn't accept -c and -o together. */
|
||||
#undef NO_MINUS_C_MINUS_O
|
||||
|
||||
/* Define if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Whether to build auth-nds as dynamic module */
|
||||
/* Whether to build auth_nds as dynamic module */
|
||||
#undef COMPILE_DL_AUTH_NDS
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
/* #undef PACKAGE_BUGREPORT */
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
/* #undef PACKAGE_NAME */
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
/* #undef PACKAGE_STRING */
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
/* #undef PACKAGE_TARNAME */
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
/* #undef PACKAGE_URL */
|
||||
|
||||
/* Define to the version of this package. */
|
||||
/* #undef PACKAGE_VERSION */
|
||||
|
||||
/* Define to 1 if all of the C89 standard headers exist (not just the ones
|
||||
required in a freestanding environment). This macro is provided for
|
||||
backward compatibility; new code need not use it. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
PHP_ARG_ENABLE(auth-nds,whether to enable NDS authentication,
|
||||
PHP_ARG_ENABLE(auth_nds, whether to enable NDS authentication,
|
||||
[ --enable-auth-nds enable NDS authentication])
|
||||
|
||||
if test "$PHP_AUTH_NDS" != "no"; then
|
||||
PHP_EXTENSION(auth-nds, $ext_shared)
|
||||
PHP_NEW_EXTENSION(auth_nds, php_auth_nds.c, $ext_shared)
|
||||
PHP_ADD_INCLUDE(../../include)
|
||||
PHP_ADD_INCLUDE(../..)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(ncp, ../../lib, AUTH_NDS_SHARED_LIBADD)
|
||||
PHP_SUBST(AUTH_NDS_SHARED_LIBADD)
|
||||
fi
|
||||
|
||||
3193
contrib/php/config.sub
vendored
3193
contrib/php/config.sub
vendored
File diff suppressed because it is too large
Load Diff
16704
contrib/php/configure
vendored
16704
contrib/php/configure
vendored
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user