From 58894334cd3f0b89c865304e8e9d6eea3cd20a55 Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Mon, 9 Dec 2019 14:52:00 +0900 Subject: Imported Upstream version 2.62.2 Change-Id: Id151dafaa6ac9f569d76f08282b5c9e4c3b19621 --- Makefile.am | 9 +- Makefile.glib | 5 +- Makefile.in | 117 +- NEWS | 596 + README | 6 +- aclocal.m4 | 2223 ++-- build-aux/compile | 347 + build-aux/config.guess | 893 +- build-aux/config.sub | 359 +- build-aux/depcomp | 6 +- build-aux/install-sh | 373 +- build-aux/ltmain.sh | 5803 ++++++---- build-aux/missing | 6 +- build-aux/test-driver | 35 +- compile | 347 + config.guess | 1480 +++ config.h.in | 15 +- config.h.win32 | 116 + config.h.win32.in | 116 + config.sub | 1801 +++ configure | 3701 ++++-- configure.ac | 146 +- data/effective_tld_names.dat | 6853 ++++++++++-- depcomp | 791 ++ docs/Makefile.in | 54 +- docs/reference/Makefile.am | 7 +- docs/reference/Makefile.in | 226 +- docs/reference/html/SoupAddress.html | 281 +- docs/reference/html/SoupAuth.html | 330 +- docs/reference/html/SoupAuthDomain.html | 180 +- docs/reference/html/SoupAuthDomainBasic.html | 69 +- docs/reference/html/SoupAuthDomainDigest.html | 78 +- docs/reference/html/SoupAuthManager.html | 122 +- docs/reference/html/SoupCache.html | 102 +- docs/reference/html/SoupContentDecoder.html | 24 +- docs/reference/html/SoupContentSniffer.html | 62 +- docs/reference/html/SoupCookie.html | 474 +- docs/reference/html/SoupCookieJar.html | 192 +- docs/reference/html/SoupCookieJarDB.html | 52 +- docs/reference/html/SoupCookieJarText.html | 50 +- docs/reference/html/SoupLogger.html | 230 +- docs/reference/html/SoupMessage.html | 669 +- docs/reference/html/SoupMessageBody.html | 285 +- docs/reference/html/SoupMessageHeaders.html | 506 +- docs/reference/html/SoupMultipart.html | 108 +- docs/reference/html/SoupMultipartInputStream.html | 99 +- docs/reference/html/SoupProxyResolverDefault.html | 30 +- docs/reference/html/SoupRequest.html | 130 +- docs/reference/html/SoupRequestData.html | 24 +- docs/reference/html/SoupRequestFile.html | 35 +- docs/reference/html/SoupRequestHTTP.html | 35 +- docs/reference/html/SoupServer.html | 1596 ++- docs/reference/html/SoupSession.html | 1109 +- docs/reference/html/SoupSessionAsync.html | 112 +- docs/reference/html/SoupSessionFeature.html | 38 +- docs/reference/html/SoupSessionSync.html | 112 +- docs/reference/html/SoupSocket.html | 435 +- docs/reference/html/SoupURI.html | 416 +- docs/reference/html/annotation-glossary.html | 27 +- docs/reference/html/ch01.html | 17 +- docs/reference/html/ch02.html | 26 +- docs/reference/html/ch03.html | 11 +- docs/reference/html/ch04.html | 13 +- docs/reference/html/ch05.html | 15 +- docs/reference/html/index.html | 26 +- docs/reference/html/index.sgml | 1128 -- docs/reference/html/ix01.html | 1581 +-- .../reference/html/libsoup-2.4-GValue-Support.html | 885 -- .../html/libsoup-2.4-HTML-Form-Support.html | 166 +- .../libsoup-2.4-Soup-Miscellaneous-Utilities.html | 560 +- .../libsoup-2.4-SoupServer-deprecated-API.html | 515 + .../html/libsoup-2.4-Top-Level-Domain-utils.html | 70 +- .../html/libsoup-2.4-Version-Information.html | 262 +- docs/reference/html/libsoup-2.4-WebSockets.html | 1544 +++ .../reference/html/libsoup-2.4-XMLRPC-Support.html | 633 +- docs/reference/html/libsoup-2.4-soup-method.html | 32 +- docs/reference/html/libsoup-2.4-soup-status.html | 109 +- docs/reference/html/libsoup-2.4.devhelp2 | 422 +- docs/reference/html/libsoup-build-howto.html | 23 +- docs/reference/html/libsoup-client-howto.html | 105 +- docs/reference/html/libsoup-request-howto.html | 17 +- docs/reference/html/libsoup-server-howto.html | 280 +- docs/reference/html/libsoup-session-porting.html | 39 +- docs/reference/html/style.css | 302 +- docs/reference/libsoup-2.4-docs.sgml | 5 +- docs/reference/libsoup-2.4-sections.txt | 195 +- docs/reference/libsoup-2.4.types | 3 +- docs/reference/server-howto.xml | 150 +- docs/reference/tmpl/libsoup-2.4-unused.sgml | 28 - docs/reference/tmpl/soup-address.sgml | 271 - docs/reference/tmpl/soup-auth-domain-basic.sgml | 86 - docs/reference/tmpl/soup-auth-domain-digest.sgml | 96 - docs/reference/tmpl/soup-auth-domain.sgml | 237 - docs/reference/tmpl/soup-auth-manager.sgml | 55 - docs/reference/tmpl/soup-auth.sgml | 234 - docs/reference/tmpl/soup-cache.sgml | 106 - docs/reference/tmpl/soup-content-decoder.sgml | 28 - docs/reference/tmpl/soup-content-sniffer.sgml | 58 - docs/reference/tmpl/soup-cookie-jar-db.sgml | 50 - docs/reference/tmpl/soup-cookie-jar-text.sgml | 50 - docs/reference/tmpl/soup-cookie-jar.sgml | 186 - docs/reference/tmpl/soup-cookie.sgml | 322 - docs/reference/tmpl/soup-form.sgml | 140 - docs/reference/tmpl/soup-logger.sgml | 122 - docs/reference/tmpl/soup-message-body.sgml | 251 - docs/reference/tmpl/soup-message-headers.sgml | 362 - docs/reference/tmpl/soup-message.sgml | 626 -- docs/reference/tmpl/soup-method.sgml | 127 - docs/reference/tmpl/soup-misc.sgml | 399 - .../tmpl/soup-multipart-input-stream.sgml | 86 - docs/reference/tmpl/soup-multipart.sgml | 118 - .../tmpl/soup-proxy-resolver-default.sgml | 33 - docs/reference/tmpl/soup-request-data.sgml | 28 - docs/reference/tmpl/soup-request-file.sgml | 37 - docs/reference/tmpl/soup-request-http.sgml | 37 - docs/reference/tmpl/soup-request.sgml | 121 - docs/reference/tmpl/soup-server-deprecated.sgml | 126 - docs/reference/tmpl/soup-server.sgml | 383 - docs/reference/tmpl/soup-session-async.sgml | 47 - docs/reference/tmpl/soup-session-feature.sgml | 43 - docs/reference/tmpl/soup-session-sync.sgml | 47 - docs/reference/tmpl/soup-session.sgml | 656 -- docs/reference/tmpl/soup-socket.sgml | 411 - docs/reference/tmpl/soup-status.sgml | 164 - docs/reference/tmpl/soup-tld.sgml | 58 - docs/reference/tmpl/soup-uri.sgml | 371 - docs/reference/tmpl/soup-value-utils.sgml | 203 - docs/reference/tmpl/soup-version.sgml | 189 - docs/reference/tmpl/soup-xmlrpc.sgml | 157 - examples/Makefile.in | 60 +- examples/get.c | 102 +- examples/simple-httpd.c | 100 +- examples/simple-proxy.c | 241 +- gtk-doc.make | 163 +- install-sh | 508 + libsoup/Makefile.am | 143 +- libsoup/Makefile.in | 1339 ++- libsoup/Soup-2.4-custom.vala | 168 + libsoup/Soup-2.4.metadata | 99 + libsoup/gconstructor.h | 120 + libsoup/libsoup-2.4.deps | 1 + libsoup/libsoup-2.4.sym | 508 - libsoup/libsoup-gnome-2.4.sym | 5 - libsoup/soup-address.c | 95 +- libsoup/soup-address.h | 11 + libsoup/soup-auth-basic.c | 21 +- libsoup/soup-auth-digest.c | 26 +- libsoup/soup-auth-domain-basic.c | 16 +- libsoup/soup-auth-domain-basic.h | 3 + libsoup/soup-auth-domain-digest.c | 30 +- libsoup/soup-auth-domain-digest.h | 4 + libsoup/soup-auth-domain.c | 36 +- libsoup/soup-auth-domain.h | 11 + libsoup/soup-auth-manager.c | 219 +- libsoup/soup-auth-manager.h | 5 + libsoup/soup-auth-negotiate.c | 622 ++ libsoup/soup-auth-negotiate.h | 28 + libsoup/soup-auth-ntlm.c | 127 +- libsoup/soup-auth.c | 50 +- libsoup/soup-auth.h | 27 +- libsoup/soup-autocleanups.h | 68 + libsoup/soup-body-input-stream.c | 7 +- libsoup/soup-body-output-stream.c | 7 +- libsoup/soup-cache-client-input-stream.c | 98 + libsoup/soup-cache-client-input-stream.h | 36 + libsoup/soup-cache-input-stream.c | 27 +- libsoup/soup-cache.c | 201 +- libsoup/soup-client-input-stream.c | 15 +- libsoup/soup-connection-auth.c | 37 +- libsoup/soup-connection-auth.h | 5 +- libsoup/soup-connection.c | 351 +- libsoup/soup-connection.h | 19 +- libsoup/soup-content-decoder.c | 7 +- libsoup/soup-content-processor.c | 2 - libsoup/soup-content-sniffer-stream.c | 19 +- libsoup/soup-content-sniffer.c | 24 +- libsoup/soup-converter-wrapper.c | 23 +- libsoup/soup-cookie-jar-db.c | 18 +- libsoup/soup-cookie-jar-text.c | 15 +- libsoup/soup-cookie-jar.c | 131 +- libsoup/soup-cookie.c | 36 +- libsoup/soup-date.c | 4 +- libsoup/soup-enum-types.c | 239 +- libsoup/soup-enum-types.h | 73 +- libsoup/soup-filter-input-stream.c | 29 +- libsoup/soup-form.c | 6 +- libsoup/soup-form.h | 8 + libsoup/soup-headers.c | 33 +- libsoup/soup-headers.h | 10 +- libsoup/soup-init.c | 82 + libsoup/soup-io-stream.c | 32 +- libsoup/soup-logger.c | 281 +- libsoup/soup-logger.h | 10 + libsoup/soup-message-body.c | 16 +- libsoup/soup-message-body.h | 16 + libsoup/soup-message-client-io.c | 2 +- libsoup/soup-message-headers.c | 104 +- libsoup/soup-message-headers.h | 28 + libsoup/soup-message-io.c | 196 +- libsoup/soup-message-private.h | 25 +- libsoup/soup-message-queue.c | 4 +- libsoup/soup-message-queue.h | 11 +- libsoup/soup-message-server-io.c | 50 +- libsoup/soup-message.c | 105 +- libsoup/soup-message.h | 51 +- libsoup/soup-method.h | 30 +- libsoup/soup-misc-private.h | 47 +- libsoup/soup-misc.c | 50 +- libsoup/soup-misc.h | 12 +- libsoup/soup-multipart-input-stream.c | 36 +- libsoup/soup-multipart.c | 12 +- libsoup/soup-multipart.h | 1 + libsoup/soup-path-map.c | 13 +- libsoup/soup-proxy-resolver-default.c | 31 +- libsoup/soup-proxy-resolver-default.h | 3 +- libsoup/soup-proxy-resolver.c | 2 - libsoup/soup-proxy-resolver.h | 3 + libsoup/soup-proxy-uri-resolver.c | 8 +- libsoup/soup-request-data.c | 9 +- libsoup/soup-request-file.c | 8 +- libsoup/soup-request-http.c | 8 +- libsoup/soup-request.c | 23 +- libsoup/soup-requester.c | 6 +- libsoup/soup-server.c | 2046 +++- libsoup/soup-server.h | 210 +- libsoup/soup-session-async.c | 15 +- libsoup/soup-session-async.h | 16 +- libsoup/soup-session-feature.c | 10 +- libsoup/soup-session-sync.c | 15 +- libsoup/soup-session-sync.h | 16 +- libsoup/soup-session.c | 928 +- libsoup/soup-session.h | 49 +- libsoup/soup-socket-private.h | 91 + libsoup/soup-socket-properties.c | 81 + libsoup/soup-socket.c | 508 +- libsoup/soup-socket.h | 16 + libsoup/soup-status.h | 2 + libsoup/soup-tld.c | 3 +- libsoup/soup-types.h | 34 +- libsoup/soup-uri.c | 64 +- libsoup/soup-uri.h | 31 +- libsoup/soup-value-utils.c | 56 +- libsoup/soup-value-utils.h | 46 +- libsoup/soup-version.c | 30 + libsoup/soup-version.h.in | 280 +- libsoup/soup-websocket-connection.c | 1898 ++++ libsoup/soup-websocket-connection.h | 127 + libsoup/soup-websocket.c | 568 + libsoup/soup-websocket.h | 93 + libsoup/soup-xmlrpc-old.c | 738 ++ libsoup/soup-xmlrpc-old.h | 68 + libsoup/soup-xmlrpc.c | 1643 ++- libsoup/soup-xmlrpc.h | 88 +- libsoup/soup.h | 9 + libsoup/tld-parser.py | 2 +- ltmain.sh | 11156 +++++++++++++++++++ m4/ax_code_coverage.m4 | 274 + m4/gtk-doc.m4 | 27 +- m4/libtool.m4 | 2583 +++-- m4/ltoptions.m4 | 127 +- m4/ltsugar.m4 | 7 +- m4/ltversion.m4 | 12 +- m4/lt~obsolete.m4 | 7 +- m4/vapigen.m4 | 177 + missing | 215 + po/LINGUAS | 5 + po/POTFILES.in | 3 + po/an.po | 122 +- po/as.po | 63 +- po/be.po | 129 +- po/bg.po | 121 +- po/bn_IN.po | 90 +- po/bs.po | 124 + po/ca.po | 146 +- po/ca@valencia.po | 147 +- po/cs.po | 135 +- po/da.po | 138 +- po/de.po | 138 +- po/el.po | 153 +- po/en_GB.po | 132 +- po/eo.po | 174 +- po/es.po | 139 +- po/et.po | 123 +- po/eu.po | 141 +- po/fr.po | 156 +- po/fur.po | 161 +- po/gd.po | 186 + po/gl.po | 131 +- po/gu.po | 63 +- po/he.po | 134 +- po/hi.po | 64 +- po/hr.po | 178 + po/hu.po | 141 +- po/id.po | 141 +- po/it.po | 135 +- po/kn.po | 76 +- po/ko.po | 134 +- po/lt.po | 137 +- po/lv.po | 137 +- po/mr.po | 63 +- po/nb.po | 121 +- po/ne.po | 175 + po/nl.po | 136 +- po/oc.po | 177 + po/or.po | 63 +- po/pa.po | 63 +- po/pl.po | 151 +- po/pt.po | 130 +- po/pt_BR.po | 145 +- po/ro.po | 165 +- po/ru.po | 144 +- po/sk.po | 129 +- po/sl.po | 164 +- po/sr.po | 152 +- po/sr@latin.po | 152 +- po/sv.po | 167 +- po/ta.po | 83 +- po/te.po | 65 +- po/tg.po | 2 +- po/th.po | 115 +- po/tr.po | 155 +- po/ug.po | 2 +- po/uk.po | 98 +- po/vi.po | 134 +- po/zh_CN.po | 145 +- po/zh_HK.po | 66 +- po/zh_TW.po | 128 +- tests/Makefile.am | 34 +- tests/Makefile.in | 163 +- tests/auth-test.c | 270 +- tests/cache-test.c | 156 +- tests/chunk-io-test.c | 6 +- tests/chunk-test.c | 11 +- tests/coding-test.c | 5 +- tests/connection-test.c | 289 +- tests/context-test.c | 19 +- tests/continue-test.c | 47 +- tests/cookies-test.c | 66 +- tests/date.c | 15 +- tests/forms-test.c | 24 +- tests/header-parsing.c | 130 +- tests/httpd.conf.22.in | 292 - tests/httpd.conf.24.in | 276 - tests/httpd.conf.in | 284 + tests/libsoup.supp | 88 +- tests/misc-test.c | 361 +- tests/multipart-test.c | 5 +- tests/no-ssl-test.c | 29 +- tests/ntlm-test.c | 125 +- tests/proxy-test.c | 86 +- tests/range-test.c | 18 +- tests/redirect-test.c | 21 +- tests/requester-test.c | 152 +- tests/resources/misc.xml | 11 + tests/server-auth-test.c | 60 +- tests/server-test.c | 1150 +- tests/session-test.c | 51 +- tests/sniffing-test.c | 9 +- tests/socket-test.c | 235 +- tests/soup-tests.gresource.xml | 1 + tests/ssl-test.c | 216 +- tests/streaming-test.c | 7 +- tests/test-cert.pem | 31 +- tests/test-utils.c | 287 +- tests/test-utils.h | 19 +- tests/timeout-test.c | 58 +- tests/tld-test.c | 8 +- tests/uri-parsing.c | 73 +- tests/websocket-test.c | 971 ++ tests/xmlrpc-old-server-test.c | 374 + tests/xmlrpc-old-test.c | 502 + tests/xmlrpc-server-test.c | 248 +- tests/xmlrpc-server.php | 4 +- tests/xmlrpc-test.c | 583 +- win32/Makefile-newvs.am | 55 + win32/Makefile.am | 35 + win32/Makefile.in | 732 ++ win32/Makefile.msvc-introspection | 129 + win32/Makefile.msvcproj | 153 + win32/SoupGNOME_2_4_gir_list | 6 + win32/Soup_2_4_gir_list | 124 + win32/detectenv-msvc.mak | 78 + win32/introspection-msvc.mak | 94 + win32/introspection.body.mak | 54 + win32/pc_base.py | 124 + win32/replace.py | 115 + win32/soup-introspection-msvc.mak | 37 + win32/soup_version_h.py | 29 + win32/souppc.py | 32 + win32/vs10/Makefile.am | 39 + win32/vs10/Makefile.in | 564 + win32/vs10/get.vcxproj | 159 + win32/vs10/get.vcxproj.filters | 17 + win32/vs10/libsoup.sln | 128 + win32/vs10/simple-httpd.vcxproj | 159 + win32/vs10/simple-httpd.vcxproj.filters | 17 + win32/vs10/simple-proxy.vcxproj | 159 + win32/vs10/simple-proxy.vcxproj.filters | 17 + win32/vs10/soup-build-defines.props | 29 + win32/vs10/soup-dll-build-defines.props | 24 + win32/vs10/soup-gen-srcs.props | 26 + win32/vs10/soup-gnome.vcxproj | 164 + win32/vs10/soup-gnome.vcxproj.filters | 20 + win32/vs10/soup-gnome.vcxproj.filtersin | 17 + win32/vs10/soup-gnome.vcxprojin | 161 + win32/vs10/soup-install.props | 101 + win32/vs10/soup-install.propsin | 51 + win32/vs10/soup-install.vcxproj | 121 + win32/vs10/soup-install.vcxproj.filters | 13 + win32/vs10/soup-version-paths.props | 69 + win32/vs10/soup-version-paths.props.in | 69 + win32/vs10/soup.vcxproj | 414 + win32/vs10/soup.vcxproj.filters | 95 + win32/vs10/soup.vcxproj.filtersin | 22 + win32/vs10/soup.vcxprojin | 341 + win32/vs11/Makefile.am | 28 + win32/vs11/Makefile.in | 600 + win32/vs11/get.vcxproj | 159 + win32/vs11/get.vcxproj.filters | 17 + win32/vs11/libsoup.sln | 128 + win32/vs11/simple-httpd.vcxproj | 159 + win32/vs11/simple-httpd.vcxproj.filters | 17 + win32/vs11/simple-proxy.vcxproj | 159 + win32/vs11/simple-proxy.vcxproj.filters | 17 + win32/vs11/soup-build-defines.props | 29 + win32/vs11/soup-dll-build-defines.props | 24 + win32/vs11/soup-gen-srcs.props | 26 + win32/vs11/soup-gnome.vcxproj | 164 + win32/vs11/soup-gnome.vcxproj.filters | 20 + win32/vs11/soup-install.props | 101 + win32/vs11/soup-install.vcxproj | 121 + win32/vs11/soup-install.vcxproj.filters | 13 + win32/vs11/soup-version-paths.props | 69 + win32/vs11/soup.vcxproj | 414 + win32/vs11/soup.vcxproj.filters | 95 + win32/vs12/Makefile.am | 28 + win32/vs12/Makefile.in | 600 + win32/vs12/get.vcxproj | 159 + win32/vs12/get.vcxproj.filters | 17 + win32/vs12/libsoup.sln | 128 + win32/vs12/simple-httpd.vcxproj | 159 + win32/vs12/simple-httpd.vcxproj.filters | 17 + win32/vs12/simple-proxy.vcxproj | 159 + win32/vs12/simple-proxy.vcxproj.filters | 17 + win32/vs12/soup-build-defines.props | 29 + win32/vs12/soup-dll-build-defines.props | 24 + win32/vs12/soup-gen-srcs.props | 26 + win32/vs12/soup-gnome.vcxproj | 164 + win32/vs12/soup-gnome.vcxproj.filters | 20 + win32/vs12/soup-install.props | 101 + win32/vs12/soup-install.vcxproj | 121 + win32/vs12/soup-install.vcxproj.filters | 13 + win32/vs12/soup-version-paths.props | 69 + win32/vs12/soup.vcxproj | 414 + win32/vs12/soup.vcxproj.filters | 95 + win32/vs14/Makefile.am | 28 + win32/vs14/Makefile.in | 600 + win32/vs14/get.vcxproj | 159 + win32/vs14/get.vcxproj.filters | 17 + win32/vs14/libsoup.sln | 128 + win32/vs14/simple-httpd.vcxproj | 159 + win32/vs14/simple-httpd.vcxproj.filters | 17 + win32/vs14/simple-proxy.vcxproj | 159 + win32/vs14/simple-proxy.vcxproj.filters | 17 + win32/vs14/soup-build-defines.props | 29 + win32/vs14/soup-dll-build-defines.props | 24 + win32/vs14/soup-gen-srcs.props | 26 + win32/vs14/soup-gnome.vcxproj | 164 + win32/vs14/soup-gnome.vcxproj.filters | 20 + win32/vs14/soup-install.props | 101 + win32/vs14/soup-install.vcxproj | 121 + win32/vs14/soup-install.vcxproj.filters | 13 + win32/vs14/soup-version-paths.props | 69 + win32/vs14/soup.vcxproj | 414 + win32/vs14/soup.vcxproj.filters | 95 + win32/vs15/Makefile.am | 29 + win32/vs15/Makefile.in | 601 + win32/vs15/get.vcxproj | 159 + win32/vs15/get.vcxproj.filters | 17 + win32/vs15/libsoup.sln | 128 + win32/vs15/simple-httpd.vcxproj | 159 + win32/vs15/simple-httpd.vcxproj.filters | 17 + win32/vs15/simple-proxy.vcxproj | 159 + win32/vs15/simple-proxy.vcxproj.filters | 17 + win32/vs15/soup-build-defines.props | 29 + win32/vs15/soup-dll-build-defines.props | 24 + win32/vs15/soup-gen-srcs.props | 26 + win32/vs15/soup-gnome.vcxproj | 164 + win32/vs15/soup-gnome.vcxproj.filters | 20 + win32/vs15/soup-install.props | 101 + win32/vs15/soup-install.vcxproj | 121 + win32/vs15/soup-install.vcxproj.filters | 13 + win32/vs15/soup-version-paths.props | 69 + win32/vs15/soup.vcxproj | 414 + win32/vs15/soup.vcxproj.filters | 95 + win32/vs9/Makefile.am | 27 + win32/vs9/Makefile.in | 552 + win32/vs9/get.vcproj | 162 + win32/vs9/libsoup.sln | 147 + win32/vs9/simple-httpd.vcproj | 162 + win32/vs9/simple-proxy.vcproj | 162 + win32/vs9/soup-build-defines.vsprops | 22 + win32/vs9/soup-dll-build-defines.vsprops | 38 + win32/vs9/soup-gen-srcs.vsprops | 20 + win32/vs9/soup-gnome.vcproj | 165 + win32/vs9/soup-gnome.vcprojin | 162 + win32/vs9/soup-install.vcproj | 114 + win32/vs9/soup-install.vsprops | 91 + win32/vs9/soup-install.vspropsin | 40 + win32/vs9/soup-version-paths.vsprops | 65 + win32/vs9/soup-version-paths.vsprops.in | 65 + win32/vs9/soup.vcproj | 391 + win32/vs9/soup.vcprojin | 318 + 513 files changed, 86347 insertions(+), 28791 deletions(-) create mode 100755 build-aux/compile create mode 100755 compile create mode 100755 config.guess create mode 100644 config.h.win32 create mode 100644 config.h.win32.in create mode 100755 config.sub create mode 100755 depcomp delete mode 100644 docs/reference/html/index.sgml delete mode 100644 docs/reference/html/libsoup-2.4-GValue-Support.html create mode 100644 docs/reference/html/libsoup-2.4-SoupServer-deprecated-API.html create mode 100644 docs/reference/html/libsoup-2.4-WebSockets.html delete mode 100644 docs/reference/tmpl/libsoup-2.4-unused.sgml delete mode 100644 docs/reference/tmpl/soup-address.sgml delete mode 100644 docs/reference/tmpl/soup-auth-domain-basic.sgml delete mode 100644 docs/reference/tmpl/soup-auth-domain-digest.sgml delete mode 100644 docs/reference/tmpl/soup-auth-domain.sgml delete mode 100644 docs/reference/tmpl/soup-auth-manager.sgml delete mode 100644 docs/reference/tmpl/soup-auth.sgml delete mode 100644 docs/reference/tmpl/soup-cache.sgml delete mode 100644 docs/reference/tmpl/soup-content-decoder.sgml delete mode 100644 docs/reference/tmpl/soup-content-sniffer.sgml delete mode 100644 docs/reference/tmpl/soup-cookie-jar-db.sgml delete mode 100644 docs/reference/tmpl/soup-cookie-jar-text.sgml delete mode 100644 docs/reference/tmpl/soup-cookie-jar.sgml delete mode 100644 docs/reference/tmpl/soup-cookie.sgml delete mode 100644 docs/reference/tmpl/soup-form.sgml delete mode 100644 docs/reference/tmpl/soup-logger.sgml delete mode 100644 docs/reference/tmpl/soup-message-body.sgml delete mode 100644 docs/reference/tmpl/soup-message-headers.sgml delete mode 100644 docs/reference/tmpl/soup-message.sgml delete mode 100644 docs/reference/tmpl/soup-method.sgml delete mode 100644 docs/reference/tmpl/soup-misc.sgml delete mode 100644 docs/reference/tmpl/soup-multipart-input-stream.sgml delete mode 100644 docs/reference/tmpl/soup-multipart.sgml delete mode 100644 docs/reference/tmpl/soup-proxy-resolver-default.sgml delete mode 100644 docs/reference/tmpl/soup-request-data.sgml delete mode 100644 docs/reference/tmpl/soup-request-file.sgml delete mode 100644 docs/reference/tmpl/soup-request-http.sgml delete mode 100644 docs/reference/tmpl/soup-request.sgml delete mode 100644 docs/reference/tmpl/soup-server-deprecated.sgml delete mode 100644 docs/reference/tmpl/soup-server.sgml delete mode 100644 docs/reference/tmpl/soup-session-async.sgml delete mode 100644 docs/reference/tmpl/soup-session-feature.sgml delete mode 100644 docs/reference/tmpl/soup-session-sync.sgml delete mode 100644 docs/reference/tmpl/soup-session.sgml delete mode 100644 docs/reference/tmpl/soup-socket.sgml delete mode 100644 docs/reference/tmpl/soup-status.sgml delete mode 100644 docs/reference/tmpl/soup-tld.sgml delete mode 100644 docs/reference/tmpl/soup-uri.sgml delete mode 100644 docs/reference/tmpl/soup-value-utils.sgml delete mode 100644 docs/reference/tmpl/soup-version.sgml delete mode 100644 docs/reference/tmpl/soup-xmlrpc.sgml create mode 100755 install-sh create mode 100644 libsoup/Soup-2.4-custom.vala create mode 100644 libsoup/Soup-2.4.metadata create mode 100644 libsoup/gconstructor.h create mode 100644 libsoup/libsoup-2.4.deps delete mode 100644 libsoup/libsoup-2.4.sym delete mode 100644 libsoup/libsoup-gnome-2.4.sym create mode 100644 libsoup/soup-auth-negotiate.c create mode 100644 libsoup/soup-auth-negotiate.h create mode 100644 libsoup/soup-autocleanups.h create mode 100644 libsoup/soup-cache-client-input-stream.c create mode 100644 libsoup/soup-cache-client-input-stream.h mode change 100755 => 100644 libsoup/soup-cookie.c create mode 100644 libsoup/soup-init.c create mode 100644 libsoup/soup-socket-private.h create mode 100644 libsoup/soup-socket-properties.c create mode 100644 libsoup/soup-websocket-connection.c create mode 100644 libsoup/soup-websocket-connection.h create mode 100644 libsoup/soup-websocket.c create mode 100644 libsoup/soup-websocket.h create mode 100644 libsoup/soup-xmlrpc-old.c create mode 100644 libsoup/soup-xmlrpc-old.h create mode 100644 ltmain.sh create mode 100644 m4/ax_code_coverage.m4 create mode 100644 m4/vapigen.m4 create mode 100755 missing create mode 100644 po/bs.po create mode 100644 po/gd.po create mode 100644 po/hr.po create mode 100644 po/ne.po create mode 100644 po/oc.po delete mode 100644 tests/httpd.conf.22.in delete mode 100644 tests/httpd.conf.24.in create mode 100644 tests/httpd.conf.in create mode 100644 tests/resources/misc.xml create mode 100644 tests/websocket-test.c create mode 100644 tests/xmlrpc-old-server-test.c create mode 100644 tests/xmlrpc-old-test.c create mode 100644 win32/Makefile-newvs.am create mode 100644 win32/Makefile.am create mode 100644 win32/Makefile.in create mode 100644 win32/Makefile.msvc-introspection create mode 100644 win32/Makefile.msvcproj create mode 100644 win32/SoupGNOME_2_4_gir_list create mode 100644 win32/Soup_2_4_gir_list create mode 100644 win32/detectenv-msvc.mak create mode 100644 win32/introspection-msvc.mak create mode 100644 win32/introspection.body.mak create mode 100644 win32/pc_base.py create mode 100644 win32/replace.py create mode 100644 win32/soup-introspection-msvc.mak create mode 100644 win32/soup_version_h.py create mode 100644 win32/souppc.py create mode 100644 win32/vs10/Makefile.am create mode 100644 win32/vs10/Makefile.in create mode 100644 win32/vs10/get.vcxproj create mode 100644 win32/vs10/get.vcxproj.filters create mode 100644 win32/vs10/libsoup.sln create mode 100644 win32/vs10/simple-httpd.vcxproj create mode 100644 win32/vs10/simple-httpd.vcxproj.filters create mode 100644 win32/vs10/simple-proxy.vcxproj create mode 100644 win32/vs10/simple-proxy.vcxproj.filters create mode 100644 win32/vs10/soup-build-defines.props create mode 100644 win32/vs10/soup-dll-build-defines.props create mode 100644 win32/vs10/soup-gen-srcs.props create mode 100644 win32/vs10/soup-gnome.vcxproj create mode 100644 win32/vs10/soup-gnome.vcxproj.filters create mode 100644 win32/vs10/soup-gnome.vcxproj.filtersin create mode 100644 win32/vs10/soup-gnome.vcxprojin create mode 100644 win32/vs10/soup-install.props create mode 100644 win32/vs10/soup-install.propsin create mode 100644 win32/vs10/soup-install.vcxproj create mode 100644 win32/vs10/soup-install.vcxproj.filters create mode 100644 win32/vs10/soup-version-paths.props create mode 100644 win32/vs10/soup-version-paths.props.in create mode 100644 win32/vs10/soup.vcxproj create mode 100644 win32/vs10/soup.vcxproj.filters create mode 100644 win32/vs10/soup.vcxproj.filtersin create mode 100644 win32/vs10/soup.vcxprojin create mode 100644 win32/vs11/Makefile.am create mode 100644 win32/vs11/Makefile.in create mode 100644 win32/vs11/get.vcxproj create mode 100644 win32/vs11/get.vcxproj.filters create mode 100644 win32/vs11/libsoup.sln create mode 100644 win32/vs11/simple-httpd.vcxproj create mode 100644 win32/vs11/simple-httpd.vcxproj.filters create mode 100644 win32/vs11/simple-proxy.vcxproj create mode 100644 win32/vs11/simple-proxy.vcxproj.filters create mode 100644 win32/vs11/soup-build-defines.props create mode 100644 win32/vs11/soup-dll-build-defines.props create mode 100644 win32/vs11/soup-gen-srcs.props create mode 100644 win32/vs11/soup-gnome.vcxproj create mode 100644 win32/vs11/soup-gnome.vcxproj.filters create mode 100644 win32/vs11/soup-install.props create mode 100644 win32/vs11/soup-install.vcxproj create mode 100644 win32/vs11/soup-install.vcxproj.filters create mode 100644 win32/vs11/soup-version-paths.props create mode 100644 win32/vs11/soup.vcxproj create mode 100644 win32/vs11/soup.vcxproj.filters create mode 100644 win32/vs12/Makefile.am create mode 100644 win32/vs12/Makefile.in create mode 100644 win32/vs12/get.vcxproj create mode 100644 win32/vs12/get.vcxproj.filters create mode 100644 win32/vs12/libsoup.sln create mode 100644 win32/vs12/simple-httpd.vcxproj create mode 100644 win32/vs12/simple-httpd.vcxproj.filters create mode 100644 win32/vs12/simple-proxy.vcxproj create mode 100644 win32/vs12/simple-proxy.vcxproj.filters create mode 100644 win32/vs12/soup-build-defines.props create mode 100644 win32/vs12/soup-dll-build-defines.props create mode 100644 win32/vs12/soup-gen-srcs.props create mode 100644 win32/vs12/soup-gnome.vcxproj create mode 100644 win32/vs12/soup-gnome.vcxproj.filters create mode 100644 win32/vs12/soup-install.props create mode 100644 win32/vs12/soup-install.vcxproj create mode 100644 win32/vs12/soup-install.vcxproj.filters create mode 100644 win32/vs12/soup-version-paths.props create mode 100644 win32/vs12/soup.vcxproj create mode 100644 win32/vs12/soup.vcxproj.filters create mode 100644 win32/vs14/Makefile.am create mode 100644 win32/vs14/Makefile.in create mode 100644 win32/vs14/get.vcxproj create mode 100644 win32/vs14/get.vcxproj.filters create mode 100644 win32/vs14/libsoup.sln create mode 100644 win32/vs14/simple-httpd.vcxproj create mode 100644 win32/vs14/simple-httpd.vcxproj.filters create mode 100644 win32/vs14/simple-proxy.vcxproj create mode 100644 win32/vs14/simple-proxy.vcxproj.filters create mode 100644 win32/vs14/soup-build-defines.props create mode 100644 win32/vs14/soup-dll-build-defines.props create mode 100644 win32/vs14/soup-gen-srcs.props create mode 100644 win32/vs14/soup-gnome.vcxproj create mode 100644 win32/vs14/soup-gnome.vcxproj.filters create mode 100644 win32/vs14/soup-install.props create mode 100644 win32/vs14/soup-install.vcxproj create mode 100644 win32/vs14/soup-install.vcxproj.filters create mode 100644 win32/vs14/soup-version-paths.props create mode 100644 win32/vs14/soup.vcxproj create mode 100644 win32/vs14/soup.vcxproj.filters create mode 100644 win32/vs15/Makefile.am create mode 100644 win32/vs15/Makefile.in create mode 100644 win32/vs15/get.vcxproj create mode 100644 win32/vs15/get.vcxproj.filters create mode 100644 win32/vs15/libsoup.sln create mode 100644 win32/vs15/simple-httpd.vcxproj create mode 100644 win32/vs15/simple-httpd.vcxproj.filters create mode 100644 win32/vs15/simple-proxy.vcxproj create mode 100644 win32/vs15/simple-proxy.vcxproj.filters create mode 100644 win32/vs15/soup-build-defines.props create mode 100644 win32/vs15/soup-dll-build-defines.props create mode 100644 win32/vs15/soup-gen-srcs.props create mode 100644 win32/vs15/soup-gnome.vcxproj create mode 100644 win32/vs15/soup-gnome.vcxproj.filters create mode 100644 win32/vs15/soup-install.props create mode 100644 win32/vs15/soup-install.vcxproj create mode 100644 win32/vs15/soup-install.vcxproj.filters create mode 100644 win32/vs15/soup-version-paths.props create mode 100644 win32/vs15/soup.vcxproj create mode 100644 win32/vs15/soup.vcxproj.filters create mode 100644 win32/vs9/Makefile.am create mode 100644 win32/vs9/Makefile.in create mode 100644 win32/vs9/get.vcproj create mode 100644 win32/vs9/libsoup.sln create mode 100644 win32/vs9/simple-httpd.vcproj create mode 100644 win32/vs9/simple-proxy.vcproj create mode 100644 win32/vs9/soup-build-defines.vsprops create mode 100644 win32/vs9/soup-dll-build-defines.vsprops create mode 100644 win32/vs9/soup-gen-srcs.vsprops create mode 100644 win32/vs9/soup-gnome.vcproj create mode 100644 win32/vs9/soup-gnome.vcprojin create mode 100644 win32/vs9/soup-install.vcproj create mode 100644 win32/vs9/soup-install.vsprops create mode 100644 win32/vs9/soup-install.vspropsin create mode 100644 win32/vs9/soup-version-paths.vsprops create mode 100644 win32/vs9/soup-version-paths.vsprops.in create mode 100644 win32/vs9/soup.vcproj create mode 100644 win32/vs9/soup.vcprojin diff --git a/Makefile.am b/Makefile.am index c8fa95ce..38d2872d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -SUBDIRS = libsoup po tests examples docs +SUBDIRS = libsoup po tests examples docs win32 EXTRA_DIST = \ data/effective_tld_names.dat \ @@ -12,9 +12,10 @@ EXTRA_DIST = \ glib-tap.mk \ tap-driver.sh \ tap-test \ - Makefile.glib + Makefile.glib \ + config.h.win32 -DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection +DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection --disable-vala pkgconfigdir = $(libdir)/pkgconfig @@ -23,3 +24,5 @@ pkgconfig_DATA = libsoup-2.4.pc if BUILD_LIBSOUP_GNOME pkgconfig_DATA += libsoup-gnome-2.4.pc endif + +@CODE_COVERAGE_RULES@ diff --git a/Makefile.glib b/Makefile.glib index c28c983b..97e94b0b 100644 --- a/Makefile.glib +++ b/Makefile.glib @@ -206,7 +206,8 @@ $(1).h.stamp: $(_glib_enum_types_h_sources) Makefile $$(GLIB_MKENUMS_H_FLAGS) \ $$($(_glib_enum_types_prefix)_MKENUMS_H_FLAGS) \ --fhead "#include \n\nG_BEGIN_DECLS\n" \ - --vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())\n" \ + --fhead "#ifndef GLIB_MKENUMS_EXTERN\n#define GLIB_MKENUMS_EXTERN\n#endif\n" \ + --vhead "GLIB_MKENUMS_EXTERN GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())\n" \ --ftail "G_END_DECLS\n\n#endif /* $(_glib_enum_types_guard) */" \ $$(filter-out Makefile, $$^) > $(1).h.tmp && \ (cmp -s $(1).h.tmp $(1).h || cp $(1).h.tmp $(1).h) && \ @@ -218,7 +219,7 @@ $(1).h: $(1).h.stamp $(1).c.stamp: $(_glib_enum_types_h_sources) Makefile $$(_GLIB_V_GEN) $$(GLIB_MKENUMS) \ - --fhead "/* Generated by glib-mkenums. Do not edit */\n\n#include \"$(notdir $(1)).h\"\n" \ + --fhead "/* Generated by glib-mkenums. Do not edit */\n\n#ifdef HAVE_CONFIG_H\n#include \n#endif\n\n#include \"$(notdir $(1)).h\"\n\n" \ $$(GLIB_MKENUMS_C_FLAGS) \ $$($(_glib_enum_types_prefix)_MKENUMS_C_FLAGS) \ --fhead "$$(foreach f,$$(filter-out Makefile,$$(^F)),\n#include \"$$(f)\")\n\n" \ diff --git a/Makefile.in b/Makefile.in index 7c535834..d2009b2b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -80,32 +90,24 @@ build_triplet = @build@ host_triplet = @host@ @BUILD_LIBSOUP_GNOME_TRUE@am__append_1 = libsoup-gnome-2.4.pc subdir = . -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.h.in $(srcdir)/libsoup-2.4.pc.in \ - $(srcdir)/libsoup-gnome-2.4.pc.in $(srcdir)/libsoup-zip.in \ - AUTHORS COPYING NEWS README build-aux/config.guess \ - build-aux/config.sub build-aux/depcomp build-aux/install-sh \ - build-aux/missing build-aux/ltmain.sh \ - $(top_srcdir)/build-aux/config.guess \ - $(top_srcdir)/build-aux/config.sub \ - $(top_srcdir)/build-aux/install-sh \ - $(top_srcdir)/build-aux/ltmain.sh \ - $(top_srcdir)/build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/glibtests.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/intltool.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/glibtests.m4 $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/vapigen.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = libsoup-2.4.pc libsoup-gnome-2.4.pc libsoup-zip +CONFIG_CLEAN_FILES = libsoup-2.4.pc libsoup-gnome-2.4.pc libsoup-zip \ + config.h.win32 CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -193,6 +195,19 @@ ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/config.h.win32.in $(srcdir)/libsoup-2.4.pc.in \ + $(srcdir)/libsoup-gnome-2.4.pc.in $(srcdir)/libsoup-zip.in \ + $(top_srcdir)/build-aux/compile \ + $(top_srcdir)/build-aux/config.guess \ + $(top_srcdir)/build-aux/config.sub \ + $(top_srcdir)/build-aux/install-sh \ + $(top_srcdir)/build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/missing AUTHORS COPYING NEWS README \ + build-aux/compile build-aux/config.guess build-aux/config.sub \ + build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh \ + build-aux/missing compile config.guess config.sub depcomp \ + install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -241,7 +256,6 @@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APACHE_HTTPD = @APACHE_HTTPD@ APACHE_MODULE_DIR = @APACHE_MODULE_DIR@ -APACHE_PHP_MODULE = @APACHE_PHP_MODULE@ APACHE_PHP_MODULE_DIR = @APACHE_PHP_MODULE_DIR@ APACHE_SSL_MODULE_DIR = @APACHE_SSL_MODULE_DIR@ AR = @AR@ @@ -253,6 +267,11 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL = @CURL@ @@ -268,6 +287,8 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ @@ -286,6 +307,7 @@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HAVE_GNOME = @HAVE_GNOME@ HTML_DIR = @HTML_DIR@ +IF_HAVE_MOD_UNIXD = @IF_HAVE_MOD_UNIXD@ IF_HAVE_PHP = @IF_HAVE_PHP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -308,6 +330,10 @@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +KRB5_CFLAGS = @KRB5_CFLAGS@ +KRB5_CONFIG = @KRB5_CONFIG@ +KRB5_LIBS = @KRB5_LIBS@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -316,6 +342,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -347,6 +374,7 @@ SOUP_AGE = @SOUP_AGE@ SOUP_API_VERSION = @SOUP_API_VERSION@ SOUP_CURRENT = @SOUP_CURRENT@ SOUP_DEBUG_FLAGS = @SOUP_DEBUG_FLAGS@ +SOUP_HIDDEN_VISIBILITY_CFLAGS = @SOUP_HIDDEN_VISIBILITY_CFLAGS@ SOUP_MAJOR_VERSION = @SOUP_MAJOR_VERSION@ SOUP_MICRO_VERSION = @SOUP_MICRO_VERSION@ SOUP_MINOR_VERSION = @SOUP_MINOR_VERSION@ @@ -355,6 +383,11 @@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ +VALAC = @VALAC@ +VAPIDIR = @VAPIDIR@ +VAPIGEN = @VAPIGEN@ +VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ +VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XML_CFLAGS = @XML_CFLAGS@ @@ -408,6 +441,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -417,7 +451,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -SUBDIRS = libsoup po tests examples docs +SUBDIRS = libsoup po tests examples docs win32 EXTRA_DIST = \ data/effective_tld_names.dat \ libsoup-2.4.pc.in \ @@ -427,9 +461,10 @@ EXTRA_DIST = \ glib-tap.mk \ tap-driver.sh \ tap-test \ - Makefile.glib + Makefile.glib \ + config.h.win32 -DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection +DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection --disable-vala pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libsoup-2.4.pc $(am__append_1) all: config.h @@ -451,7 +486,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -472,8 +506,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -491,6 +525,8 @@ libsoup-gnome-2.4.pc: $(top_builddir)/config.status $(srcdir)/libsoup-gnome-2.4. cd $(top_builddir) && $(SHELL) ./config.status $@ libsoup-zip: $(top_builddir)/config.status $(srcdir)/libsoup-zip.in cd $(top_builddir) && $(SHELL) ./config.status $@ +config.h.win32: $(top_builddir)/config.status $(srcdir)/config.h.win32.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -693,7 +729,7 @@ distdir: $(DISTFILES) ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -708,11 +744,17 @@ dist-xz: distdir $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -730,7 +772,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -740,22 +782,23 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -935,6 +978,10 @@ uninstall-am: uninstall-pkgconfigDATA mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-pkgconfigDATA +.PRECIOUS: Makefile + + +@CODE_COVERAGE_RULES@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/NEWS b/NEWS index b29aa035..1b64f41b 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,599 @@ +Changes in libsoup from 2.62.1 to 2.62.2: + + * Fixes to instrospection annotation [#795135, + Claudio Saavedra] + + * Fixes to the test suite with PHP version >= 7.2 + [#795111, Jan Alexander Steffens] + + * Critical warning fixes to SoupSocket [Carlos Garcia Campos] + + * Updated Romanian translation. + +Changes in libsoup from 2.62.0 to 2.62.1: + + * Fix digest authentication with encoded URIs + [#794208, Claudio Saavedra] + * Avoid unaligned memory accesses in WebSocket implementation + [#794421, Rolf Eike Beer] + * Use base domain to decide if cookies are third-party + [#792130, Michael Catanzaro] + * Fix crash under soup_socket_new() + [#762138, Milan Crha] + +Changes in libsoup from 2.61.91 to 2.62.0: + + * Updated translations. + +Changes in libsoup from 2.61.90 to 2.61.91: + + * Add limit to header length to avoid DOS attacks + [#792173, Michele Dionisio] + + * Update the public-suffix list. + [Claudio Saavedra] + + * Revert "cookie-jar: use base domain to decide if cookie is third party" + [#792130, Claudio Saavedra] + +Changes in libsoup from 2.61.2 to 2.61.90: + + * Various improvements to the WebSocket implementation + [#792113, Italo Guerrieri] + + * cookie-jar: use base domain to decide if cookie is third party + [#792130, Michael Catanzaro] + + * Add new API to create a new connection from a SoupSession + [#792212, Carlos Garcia Campos] + + * soup-headers: accept any 3 digit number as message status code + [#792124, Carlos Garcia Campos] + +Changes in libsoup from 2.61.1 to 2.61.2: + + * session: don't request Keep-Alive for upgraded connections + [#788723, Lionel Landwerlin] + +Changes in libsoup from 2.60.2 to 2.61.1: + + * tld-parser: use Python 3 [#785735, Ross Burton] + + * Fix heap-buffer-overflow in soup_ntlm_parse_challenge() + [#788037, Milan Crha] + + * Fix possibly uninitialized value in ssl-test + [Tomas Popela] + + * SoupCache: fix the timestamp for responses [#791031, + Claudio Saavedra] + +Changes in libsoup from 2.60.1 to 2.60.2: + + * Fix documentation typos [#788920, Nirbheek Chauhan] + + * format-zero-length warning triggered in soup-logger.c + [#789096, Tomas Popela] + + * Warnings while generating inrospection files + [#789099, Tomas Popela] + + * Visual Studio builds: Enhance security of x64 binaries + [Chun-wei Fan] + + * Updated translation: Nepali. + +Changes in libsoup from 2.60.0 to 2.60.1: + + * Fallback to another authentication type if the current + failed [#788238, Tomas Popela] + + * Fix unbalanced G_GNUC_BEGIN_IGNORE_DEPRECATIONS use in + soup-session.c [#787166, Zan Dobersek] + + * SoupCache: fix setting default value for cache dir + [#788452, Cosimo Cecchi] + + * Updated translations: Catalan (Valencian). + +Changes in libsoup from 2.59.90.1 to 2.60.0: + + * New/updated translations: Catalan, Danish, Dutch, Nepali + +Changes in libsoup from 2.59.90 to 2.59.90.1: + + * CVE-2017-2885: Fixed a chunked decoding buffer overrun that + could be exploited against either clients or servers. + [#785774] + +Changes in libsoup from 2.58.0 to 2.59.90: + + * Several SoupAuthNegotiate compatibility fixes [#783780, + #783781, Tomas Popela] + + * Include a payload in SoupWebsocketConnection's "ping" + messages (to avoid problems with certain buggy server + implementations), and emit a signal when receiving a "pong" + (to allow apps to notice when the remote peer has + disconnected them). [#785660, David Woodhouse] + + * Fix the interpretation of wss:// URIs, which previously + mostly didn't work. [#784766, Nirbheek Chauhan]. + + * Fixed SoupContentSniffer behavior on XML files with no + Content-Type + [https://bugs.webkit.org/show_bug.cgi?id=173923] + + * Fixed a bug with cancelling async requests [#773257, Carlos + Garcia Campos] + + * Reverted the (undocumented) change in 2.58.0 to call + soup_session_abort() after changing + SoupSession:proxy-resolver; while this made its behavior + more consistent with :proxy-uri, it ended up breaking + things. [#781590] + + * Allow HTTP responses that have no trailing CRLF after the + response headers (and no body) [#780352, Carlos Garcia + Campos] + + * Fixed an out-of-bounds read in SoupURI parsing [#785042] + + * Fixed a spurious (debug-level) error message in + SoupWebsocketConnection [#784935, Ignacio Casal Quinteiro] + + * Fixed introspection annotations on + soup_message_headers_get_content_range() [Philip Withnall] + + * Fixed a flake in tests/header-parsing [#777258] + + * Update tests/test-cert.pem to use stronger algorithms to + avoid problems with newer gnutls. [#784949, Jan Alexander + Steffens] + + * Fixed examples/get to not accidentally break https + certificate validation [#784259, Sebatian Dröge] + + * Misc updates to apache/php stuff in unit tests: + * Dropped support for Apache 2.2 + * Deal with mod_unixd being compiled-in [#776478] + * Switched PHP support from PHP 5 to PHP 7 + + * Updated translations: + Esperanto, Turkish + +Changes in libsoup from 2.2.57.1 to 2.58.0: + + * Fix authentication issues when the SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE + flag is used. [#778497, #777936, Carlos Garcia Campos] + + * MSVC build improvements (Chun-wei Fan) + + * Updated translations: + Basque, Belarusian, Brazilian Portuguese, Chinese (Taiwan), Danish, + French, Galician, Greek, Indonesian, Italian, Korean, Latvian, + Lithuanian, Norwegian bokmål, Russian, Serbian, Slovak, Slovenian, + Spanish, zh_CN + +Changes in libsoup from 2.56.0 to 2.57.1: + + * Added SoupWebsocketConnection:keepalive-interval, to make a + connection send regular pings. [#773253, Ignacio Casal + Quinteiro] + + * Added soup_auth_manager_clear_cached_credentials() and + SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE, to allow greater control + over the use of cached HTTP auth credentials. [#774031, + #774033, Carlos Garcia Campos] + + * Fixed the use of SoupSession:proxy-uri values containing + passwords. [#772932, Jonathan Lebon] + + * Various minor WebSocket fixes [Ignacio Casal Quinteiro]: + * Avoid sending data after we start closing the + connection [#774957] + * Do not log a critical if the peer sends an invalid + close status code + * Log a debug message when a "pong" is received + + * Fixed introspection of + soup_message_headers_get_content_range() [Jasper St. Pierre] + + * Replaced Vala [Deprecated] annotations with [Version] to + avoid build warnings [#773177, Evan Nemerson] + + * MSVC build improvements (Chun-wei Fan) + + * Updated error/message strings to use Unicode punctuation. + [#772217, Piotr Drąg] + + * Updated translations: + Czech, Friulian, German, Hebrew, Hungarian, + Norwegian bokmål, Polish, Swedish + +Changes in libsoup from 2.55.90 to 2.56.0: + + * Added SoupWebsocketConnection:max-incoming-payload-size + property, to override the default maximum incoming payload + size. [#770022, Ignacio Casal Quinteiro] + + * Added soup-version.h symbols (in particular + soup_check_version()) to introspection. [#771439, Rico + Tzschichholz] + + * Updated the copy of the public suffix list used by SoupTLD + [#769650, Michael Catanzaro] + + * Updated translations: + British English, Greek, Polish + +Changes in libsoup from 2.54.1 to 2.55.90: + + * Removed support for SSLv3 fallback; sites that reject TLS + 1.x handshakes will now just fail with an error. (Firefox + and Chrome have both already switched to this behavior.) + [#765940, Dan Winship] + + * Fixed the parsing of s in the new GVariant-based + XMLRPC code. [#767707, Dan Winship] + + * Fixed soup_server_set_ssl_cert_file(), which was added in + 2.48 but didn't actually work... [patch on libsoup-list from + Sean DuBois] + + * Added GObject properties to SoupLogger to make it + bindings-friendly. [#768053, Jonh Wendell] + + * Fixed build error on FreeBSD [#765376, Ting-Wei Lan] + + * Fixed build with certain new versions of glibc that define + "EOF" as a macro. [#768731, Philip Withnall] + + * Updated m4/ax_code_coverage.m4 with support for lcov 1.12 + [Philip Withnall] + + * Updated po files for future gettext versions [Piotr Drąg] + + * New/updated translations: + Occitan, Scottish Gaelic + +Changes in libsoup from 2.54.0.1 to 2.54.1: + + * *** IMPORTANT *** + Fixed an ABI break in 2.54.0 caused by adding a member to + SoupAuthClass; 2.54.1 is ABI-compatible with 2.53.92 and + earlier, but NOT with the anomalous 2.54.0. If you built + packages against 2.54.0, you will need to rebuild them + against 2.54.1. + + * Fixed NTLM authentication when ntlm_auth from the latest + version of Samba is present. [#765106, Milan Crha] + + * Updates to MSVC build, including for GSS-API support + [Chun-wei Fan] + + * Updated translations: + Friulian + +Changes in libsoup from 2.53.92 to 2.54.0.1: + + * (2.54.0.1 fixes a build problem with the 2.54.0 tarball, + which would not build if you configured with + "--without-gnome". There are no other changes between 2.54.0 + and 2.54.0.1.) + + * Fixed examples/simple-httpd on Windows [#758759, Chun-wei + Fan] + +Changes in libsoup from 2.53.90 to 2.53.92: + + * libsoup now supports HTTP "Negotiate"/GSSAPI/Kerberos + authentication. It must be enabled specifically by the + application and is also subject to certain other + restrictions, some of which are not yet controllable through + the API. [#587145, Guido Guenther, Tomas Popela, David + Woodhouse, Dan Winship] + + * Added support for building under MSVC [#758759, Chun-wei + Fan] + + * Fixed a problem with the 2.53.90 tarball that caused + translations to be mis-installed. + + * Updated translations: + Occitan + +Changes in libsoup from 2.53.2 to 2.53.90: + + * NUL bytes in headers are now ignored [#760832, Dan Winship] + + * Fixed transfer annotation of soup_form_decode* functions + [#743966, Lionel Landwerlin] + + * Updated translations: + Bulgarian, Latvian, Norwegian bokmål + +Changes in libsoup from 2.53.1 to 2.53.2: + + * Fixed up symbol visibility handling for mingw by copying + GLib's system [Ignacio Casal Quinteiro, #757146] + + * Finally marked the old SoupSessionAsync and SoupSessionSync + methods as deprecated [Ignacio Casal Quinteiro, Dan Winship, + #757146] + + * Added libsoup-2.4.deps for valac [Rico Tzschichholz] + + * Make it possible to build from git without gtk-doc being + installed [Ignacio Casal Quinteiro] + + * Updated translations: + Norwegian bokmål, Occitan + +Changes in libsoup from 2.52.1 to 2.53.1: + + * Really fixed build under MinGW for sure this time [Ignacio + Casal Quinteiro] + + * Fixed SoupServer Web Sockets code so that the + SoupClientContext passed to a SoupServerWebsocketCallback is + fully usable (rather than crashing when you try to do most + things). + +Changes in libsoup from 2.52.0 to 2.52.1: + + * Fixed build under MinGW [Chun-wei Fan] + + * Fixed build with --disable-introspection [#755389, Quentin + Glidic] + + * Fixed HTTP authentication protection space handling for + files directly under the root directory. [#755617, Carlos + Garcia Campos] + + * Fixed a warning when loading data from SoupCache while using + an authenticated proxy. [#756076, Carlos Garcia Campos] + + * Updated translations: + German, Vietnamese + +Changes in libsoup from 2.51.92 to 2.52.0: + + * Removed duplicate test paths from tests/date so it will pass + with glib 2.46.0 + +Changes in libsoup from 2.51.90 to 2.51.92: + + * Added g_autoptr() support for all libsoup types. [#754721, + Kalev Lember] + + * Added a missing (allow-none) annotation to + soup_uri_normalize() [#754776, Jens Georg] + + * Updated translations: + Polish + +Changes in libsoup from 2.51.3 to 2.51.90: + + * Added a new GVariant-based XMLRPC API, and deprecated the + old GValue-based API (along with the associated + GValue-manipulating utilities). [#746495, Xavier Claessens] + + * Multiple build fixes for Visual Studio [#752952, Chun-wei Fan] + + * Added VAPI generation [#750679, Daniel Espinosa] + + * Fixed the mode bits on soup-cookie.c, which was previously + marked executable for some reason. [rh #1247285] + + * Updated translations: + Norwegian bokmål, Portuguese, Thai, Turkish + +Changes in libsoup from 2.50.0 to 2.51.3: + + * Fixed "make check" in non-English locales [rh #1224989, + #749397] + + * Fixed some compiler warnings [#748514, Philip Withnall] + + * New/Updated translations: + Aragonese, Catalan, Occitan, Russian + +Changes in libsoup from 2.49.92 to 2.50: + + * Updated translations: + Basque, Chinese (Taiwan), Danish, Indonesian, + Norwegian bokmål + +Changes in libsoup from 2.49.91.1 to 2.49.92: + + * Fixed an NTLM problem that caused spurious "Authentication + Failed" errors in evolution-ews. [#735197] + + * New/updated translations: + Bosnian, Czech, Greek, Hebrew, Italian, Korean, Lithuanian, + Polish, Serbian, Slovak, Slovenian, Spanish, Swedish + +Changes in libsoup from 2.49.1 to 2.49.91.1: + + * WebSockets! Libsoup now has support for WebSockets in both + SoupSession and SoupServer. [#627738, Dan Winship and Lionel + Landwerlin, based on code from the Cockpit project] + + * The WebSocket code in libsoup 2.49.91 did not build on + 32-bit architectures. 2.49.91.1 was released to fix + this. + + * Added support for NTLMv2 Session Security to SoupAuthNTLM. + (This is transparent to the app/user; if the server supports + it, it will be used.) [#739192, Adam Seering] + + * Added soup_server_accept_iostream() to allow feeding a + non-GSocketConnection GIOStream to SoupServer (eg, when + accepting HTTP requests on some other sort of connection). + [#744186, Marc-André Lureau] + + * Added soup_session_steal_connection() and + soup_client_context_steal_connection(), to allow you to + steal a GIOStream from a SoupSession or SoupServer and then + use it for non-HTTP purposes. [#721343, Dan Winship] + + * Added soup_server_add_early_handler(), for adding SoupServer + handlers to run at :got-headers time rather than :got-body + (eg, to set up a streaming read of the request body). + [#625645, Dan Winship] + + * Added a new SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS flag, + which can be used to bypass SoupSession:max-conns and + SoupSession:max-conns-per-host on a per-message basis. + [#744720, Carlos Garcia Campos] + + * Multiple SoupCache fixes from Carlos Garcia Campos: + + * Leaked resources are now cleaned up when opening the + cache. [#667682] + + * The "Age" header is no longer added to cached + responses. [#741108] + + * Fixed the interpretation of the "must-revalidate" + directive to not be stricter than required. [#744468] + + * Messages retrieved from cache now behave slightly more + like non-cache messages in terms of SoupSession + signals and timing. [#744788] Additionally, there is a + new SoupMessage::starting signal, which is like + SoupSession::request-started, but emitted for cached + resources as well. [#731153] + + * Fixed soup_session_cancel_message() to work reliably on + paused messages. [#745094, Sven Neumann] + + * Added code-coverage support to the build. [#744744, + Marc-André Lureau] + + * Fixed the library symbol check in "make check" to work when + building with linker options that result in slightly + different organization. [#741348, Iain Lane] + + * Added a hack to SoupSessionFeature so that people will stop + re-reporting an old Eclipse bug against libsoup. [#710242] + + * Miscellaneous bug and leak fixes in the test programs, leak + fixes in libsoup, and documentation updates. + + * Updated translations: + Brazilian Portuguese, French, Galician, Hungarian, Slovak, + Slovenian, Spanish, Turkish + +Changes in libsoup from 2.48.0 to 2.49.1: + + * Fixed a bug in the SoupMessage:event signal that broke + evolution's ability to connect to https hosts with "bad" + certificates. [#739951, Dan Winship] + + * Fixed a case where the async codepaths could potentially + block on a synchronous write [#727138, Dan Winship] + + * Fixed the symbol soup_server_set_ssl_cert_file() to get + exported, and added soup_server_get_uris() to the + documentation. [Tristan Van Berkom] + + * Improved a bunch of introspection annotations [#729987, Evan + Nemerson] + + * Clarified some documentation. [Tristan Van Berkom, Dan + Winship] + + * Fixed Windows build, twice [#738003, Kouhei Sutou, and + #738551, Kalev Lember]. + + * Updated translations: + Bengali (Indian), Chinese (Traditional), Italian, Latvian, + Serbian, Telugu, Ukranian + +Changes in libsoup from 2.47.92 to 2.48.0: + + * Updated translations: + Bengali (India), Danish, German, Hindi, Kannada, Punjabi + +Changes in libsoup from 2.47.4 to 2.47.92: + + * Fixed a crash in SoupCache when receiving certain invalid + Cache-Control headers. [#733587, Raveendra Karu] + + * Updated translations: + Assamese, Basque, Catalan (Valencian), Catalan, Chinese + (Traditional), French, Gujarati, Hungarian, Indonesian, + Korean, Marathi, Norwegian bokmål, Oriya, Polish, Swedish, + Tamil + +Changes in libsoup from 2.47.3 to 2.47.4: + + * Fixed two crashes that could occur in multithreaded use + (in particular, with the latest git gvfs). [#732783, + #732925, Ross Lagerwall] + + * Fixed the handling of data: URIs with base64-encoded data + but no explicit MIME type. [#732112, Raveendra Karu]. Added + tests for this and other data: URI cases. [Dan] + + * Fixed a bug in SoupAuthNTLM that affected 28-character-long + passwords. [#732087, David Woodhouse] + + * Fixed tests to pass with GLib git master (which warns if you + use deprecated GObject properties, and which also caught a + mutex-handling bug in test-utils.c) + + * Updated translations: + Galician, Greek, Lithuanian, Russian + +Changes in libsoup from 2.46.0 to 2.47.3: + + * Added new-and-improved SoupServer API, and deprecated much + of the existing API: + + * Servers can now listen on multiple ports, including + listening on both IPv4 and IPv6 (which is the default + behavior when using the new API), or serving both http + and https from a single SoupServer. + + * You can create a SoupServer from an existing listening + socket (either a file descriptor or a GSocket). + + * When using the new APIs, SoupServer now obeys the + thread-default GMainContext rather than using the + :async-context property. + + * soup_server_set_ssl_cert_file() allows setting the + certificate and key files with feedback if it fails + (unlike the old construct-time "ssl-cert-file" and + "ssl-key-file" properties, which fail with a + g_warning() and a NULL return from g_object_new() if + they fail). + + * SoupClientContext has new methods that return GSocket + and GSocketAddress, rather than SoupSocket and + SoupAddress. + + * SoupSession now has a :tls-interaction property, which can + be used to add a GTlsInteraction to a session, allowing it + to provide a client-side certificate if the server requests + one. [#334021, Colin Walters] + + * soup_session_abort() no longer tries to close active + connections, which was causing crashes in evolution + [rh#1093314] + + * Fixed a GMainContext-handling bug that could cause crashes + in gstreamer's souphttpsrc. [#729737, Dmitry Shatrov] + + * Fixed a memory leak when requesting to delete a cookie that + didn't exist [Joseph Artsimovich] + + * Updated translations: + Brazilian Portuguese, Czech, Hebrew, Spanish + Changes in libsoup from 2.45.92 to 2.46.0: * (No changes, just a version bump) diff --git a/README b/README index 8baf635b..3e2251c1 100644 --- a/README +++ b/README @@ -12,7 +12,7 @@ Features: See the documentation in docs/reference/ and the test programs in tests/ for simple examples of how to use the code. The -evolution-data-server and evolution-exchange modules in GNOME CVS have +evolution-data-server and evolution-exchange modules in GNOME git have some more complicated examples. There is a mailing list for libsoup-related questions/discussions at @@ -20,10 +20,10 @@ gnome.org. Visit http://mail.gnome.org/mailman/listinfo/libsoup-list to subscribe or read the archives. Bugs against libsoup can be filed at the GNOME bugzilla: -http://bugzilla.gnome.org/enter_bug.cgi?product=libsoup +https://bugzilla.gnome.org/enter_bug.cgi?product=libsoup More information (including the libsoup To Do list) is available at -http://live.gnome.org/LibSoup +https://wiki.gnome.org/Projects/libsoup Licensing: libsoup is licensed under the LGPL, see COPYING for more details. diff --git a/aclocal.m4 b/aclocal.m4 index 8d297d83..1b134f05 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.13.4 -*- Autoconf -*- +# generated automatically by aclocal 1.15.1 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,404 +20,933 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2013 Free Software Foundation, Inc. -# -# 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. +dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +dnl serial 11 (pkg-config-0.29) +dnl +dnl Copyright © 2004 Scott James Remnant . +dnl Copyright © 2012-2015 Dan Nicholson +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., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, 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]) +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]) -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.13' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.13.4], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) +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 -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) +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 occurence 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]) -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.13.4])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +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 -# AM_AUX_DIR_EXPAND -*- Autoconf -*- +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 -# Copyright (C) 2001-2013 Free Software Foundation, Inc. -# -# 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. -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to -# '$srcdir', '$srcdir/..', or '$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is '.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. +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 -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) +pkg_failed=no +AC_MSG_CHECKING([for $1]) -# AM_CONDITIONAL -*- Autoconf -*- +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) -# Copyright (C) 1997-2013 Free Software Foundation, Inc. -# -# 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. +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.]) -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ([2.52])dnl - m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) +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 -# Copyright (C) 1999-2013 Free Software Foundation, Inc. -# -# 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. + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: +$$1_PKG_ERRORS -# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... +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. -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl +_PKG_TEXT -m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], - [$1], [CXX], [depcc="$CXX" am_compiler_list=], - [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], - [$1], [UPC], [depcc="$UPC" am_compiler_list=], - [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +To get pkg-config, see .])[]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 -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) +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 - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done +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 - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) +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 -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES. -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) +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 -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE([dependency-tracking], [dnl -AS_HELP_STRING( - [--enable-dependency-tracking], - [do not reject slow dependency extractors]) -AS_HELP_STRING( - [--disable-dependency-tracking], - [speeds up one-time build])]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -AC_SUBST([am__nodep])dnl -_AM_SUBST_NOTMAKE([am__nodep])dnl -]) +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) -# Generate code to set up dependency tracking. -*- Autoconf -*- +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])dnl PKG_CHECK_VAR -# Copyright (C) 1999-2013 Free Software Foundation, Inc. -# -# 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. +# Configure paths for GLIB +# Owen Taylor 1997-2001 +# Increment this whenever this file is changed. +#serial 1 -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf +dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) +dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject, +dnl gthread, or gio is specified in MODULES, pass to pkg-config +dnl +AC_DEFUN([AM_PATH_GLIB_2_0], +[dnl +dnl Get the cflags and libraries from pkg-config +dnl +AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program], + , enable_glibtest=yes) + + pkg_config_args=glib-2.0 + for module in . $4 do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + case "$module" in + gmodule) + pkg_config_args="$pkg_config_args gmodule-2.0" + ;; + gmodule-no-export) + pkg_config_args="$pkg_config_args gmodule-no-export-2.0" + ;; + gobject) + pkg_config_args="$pkg_config_args gobject-2.0" + ;; + gthread) + pkg_config_args="$pkg_config_args gthread-2.0" + ;; + gio*) + pkg_config_args="$pkg_config_args $module-2.0" + ;; + esac done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS + PKG_PROG_PKG_CONFIG([0.16]) -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- + no_glib="" -# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation + if test "x$PKG_CONFIG" = x ; then + no_glib=yes + PKG_CONFIG=no + fi + + min_glib_version=ifelse([$1], ,2.0.0,$1) + AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" + enable_glibtest=no + fi + + if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then + : + else + no_glib=yes + fi + fi + + if test x"$no_glib" = x ; then + GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` + GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` + GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` + GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0` + + GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` + GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` + glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_glibtest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GLIB_CFLAGS" + LIBS="$GLIB_LIBS $LIBS" +dnl +dnl Now check if the installed GLIB is sufficiently new. (Also sanity +dnl checks the results of pkg-config to some extent) +dnl + rm -f conf.glibtest + AC_TRY_RUN([ +#include +#include +#include + +int +main (void) +{ + unsigned int major, minor, micro; + + fclose (fopen ("conf.glibtest", "w")); + + if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_glib_version"); + exit(1); + } + + if ((glib_major_version != $glib_config_major_version) || + (glib_minor_version != $glib_config_minor_version) || + (glib_micro_version != $glib_config_micro_version)) + { + printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", + $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, + glib_major_version, glib_minor_version, glib_micro_version); + printf ("*** was found! If pkg-config was correct, then it is best\n"); + printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); + printf("*** to point to the correct configuration files\n"); + } + else if ((glib_major_version != GLIB_MAJOR_VERSION) || + (glib_minor_version != GLIB_MINOR_VERSION) || + (glib_micro_version != GLIB_MICRO_VERSION)) + { + printf("*** GLIB header files (version %d.%d.%d) do not match\n", + GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + glib_major_version, glib_minor_version, glib_micro_version); + } + else + { + if ((glib_major_version > major) || + ((glib_major_version == major) && (glib_minor_version > minor)) || + ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n", + glib_major_version, glib_minor_version, glib_micro_version); + printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n", + major, minor, micro); + printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); + printf("*** correct copy of pkg-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} +],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_glib" = x ; then + AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$PKG_CONFIG" = "no" ; then + echo "*** A new enough version of pkg-config was not found." + echo "*** See http://www.freedesktop.org/software/pkgconfig/" + else + if test -f conf.glibtest ; then + : + else + echo "*** Could not run GLIB test program, checking why..." + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GLIB_CFLAGS" + LIBS="$LIBS $GLIB_LIBS" + AC_TRY_LINK([ +#include +#include +], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GLIB or finding the wrong" + echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GLIB is incorrectly installed."]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GLIB_CFLAGS="" + GLIB_LIBS="" + GLIB_GENMARSHAL="" + GOBJECT_QUERY="" + GLIB_MKENUMS="" + GLIB_COMPILE_RESOURCES="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GLIB_CFLAGS) + AC_SUBST(GLIB_LIBS) + AC_SUBST(GLIB_GENMARSHAL) + AC_SUBST(GOBJECT_QUERY) + AC_SUBST(GLIB_MKENUMS) + AC_SUBST(GLIB_COMPILE_RESOURCES) + rm -f conf.glibtest +]) + +# nls.m4 serial 5 (gettext-0.18) +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software +dnl Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ([2.50]) + +AC_DEFUN([AM_NLS], +[ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE([nls], + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT([$USE_NLS]) + AC_SUBST([USE_NLS]) +]) + +# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# +# 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. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.15' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.15.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.15.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# 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. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# +# 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. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# +# 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. + + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# +# 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. + + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each '.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# +# 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. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -493,8 +1022,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -526,6 +1055,51 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not @@ -534,7 +1108,6 @@ dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -556,7 +1129,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -567,7 +1140,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -577,7 +1150,7 @@ if test x"${install_sh}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -598,7 +1171,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -648,7 +1221,7 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -687,7 +1260,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -716,9 +1289,73 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# +# 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. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# 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. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -799,7 +1436,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -833,670 +1470,249 @@ AC_CACHE_CHECK([whether $am_make supports nested variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi]) -if test $am_cv_make_support_nested_variables = yes; then - dnl Using '$V' instead of '$(V)' breaks IRIX make. - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AC_SUBST([AM_V])dnl -AM_SUBST_NOTMAKE([AM_V])dnl -AC_SUBST([AM_DEFAULT_V])dnl -AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) - -# Copyright (C) 2001-2013 Free Software Foundation, Inc. -# -# 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. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor 'install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in "make install-strip", and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006-2013 Free Software Foundation, Inc. -# -# 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. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# -------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004-2013 Free Software Foundation, Inc. -# -# 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. - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of 'v7', 'ustar', or 'pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -# -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AC_SUBST([AMTAR], ['$${TAR-tar}']) - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' - -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - - [m4_case([$1], - [ustar], - [# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) - if test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi - AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) - if test $am_gid -le $am_max_gid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi], - - [pax], - [], - - [m4_fatal([Unknown tar format])]) - - AC_MSG_CHECKING([how to create a $1 tar archive]) - - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_$1-$_am_tools} - - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi - done - rm -rf conftest.dir - - AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) - AC_MSG_RESULT([$am_cv_prog_tar_$1])]) - -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -# nls.m4 serial 5 (gettext-0.18) -dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation, -dnl Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2003. - -AC_PREREQ([2.50]) - -AC_DEFUN([AM_NLS], -[ - AC_MSG_CHECKING([whether NLS is requested]) - dnl Default is enabled NLS - AC_ARG_ENABLE([nls], - [ --disable-nls do not use Native Language Support], - USE_NLS=$enableval, USE_NLS=yes) - AC_MSG_RESULT([$USE_NLS]) - AC_SUBST([USE_NLS]) +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 1 (pkg-config-0.24) -# -# Copyright © 2004 Scott James Remnant . +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # -# 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. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -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]) +# 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. -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) 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 -])# PKG_PROG_PKG_CONFIG +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# Copyright (C) 2006-2017 Free Software Foundation, Inc. # -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -# only at the first occurence in configure.ac, so if the first place -# it's called might be skipped (such as if it is within an "if", you -# 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]) +# 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. -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -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 -])# _PKG_CONFIG +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -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 -])# _PKG_SHORT_ERRORS_SUPPORTED +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +# Check how to create a tarball. -*- Autoconf -*- -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) +# Copyright (C) 2004-2017 Free Software Foundation, Inc. # +# 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. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar # +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar # -# -------------------------------------------------------------- -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 $1]) - -_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 .])[]dnl - ]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - $3 -fi[]dnl -])# PKG_CHECK_MODULES - - -# PKG_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable pkgconfigdir as the location where a module -# should install pkg-config .pc files. By default the directory is -# $libdir/pkgconfig, but the default can be changed by passing -# DIRECTORY. The user can override through the --with-pkgconfigdir -# 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 - - -# PKG_NOARCH_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable noarch_pkgconfigdir as the location where a -# module should install arch-independent pkg-config .pc files. By -# default the directory is $datadir/pkgconfig, but the default can be -# changed by passing DIRECTORY. The user can override through the -# --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 - - -# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, -# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# ------------------------------------------- -# 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]) +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) -AS_VAR_IF([$1], [""], [$5], [$4])dnl -])# PKG_CHECK_VAR +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -# Configure paths for GLIB -# Owen Taylor 1997-2001 +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], -dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) -dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject, -dnl gthread, or gio is specified in MODULES, pass to pkg-config -dnl -AC_DEFUN([AM_PATH_GLIB_2_0], -[dnl -dnl Get the cflags and libraries from pkg-config -dnl -AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program], - , enable_glibtest=yes) + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], - pkg_config_args=glib-2.0 - for module in . $4 - do - case "$module" in - gmodule) - pkg_config_args="$pkg_config_args gmodule-2.0" - ;; - gmodule-no-export) - pkg_config_args="$pkg_config_args gmodule-no-export-2.0" - ;; - gobject) - pkg_config_args="$pkg_config_args gobject-2.0" - ;; - gthread) - pkg_config_args="$pkg_config_args gthread-2.0" - ;; - gio*) - pkg_config_args="$pkg_config_args $module-2.0" - ;; - esac - done + [pax], + [], - PKG_PROG_PKG_CONFIG([0.16]) + [m4_fatal([Unknown tar format])]) - no_glib="" + AC_MSG_CHECKING([how to create a $1 tar archive]) - if test "x$PKG_CONFIG" = x ; then - no_glib=yes - PKG_CONFIG=no - fi + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} - min_glib_version=ifelse([$1], ,2.0.0,$1) - AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac - if test x$PKG_CONFIG != xno ; then - ## don't try to run the test against uninstalled libtool libs - if $PKG_CONFIG --uninstalled $pkg_config_args; then - echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" - enable_glibtest=no - fi + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break - if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then - : - else - no_glib=yes + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi - fi - - if test x"$no_glib" = x ; then - GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` - GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` - GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` - GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0` + done + rm -rf conftest.dir - GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` - GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` - glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_glibtest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GLIB_CFLAGS" - LIBS="$GLIB_LIBS $LIBS" -dnl -dnl Now check if the installed GLIB is sufficiently new. (Also sanity -dnl checks the results of pkg-config to some extent) -dnl - rm -f conf.glibtest - AC_TRY_RUN([ -#include -#include -#include + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -int -main () -{ - unsigned int major, minor, micro; +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR - fclose (fopen ("conf.glibtest", "w")); +# Autoconf support for the Vala compiler - if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_glib_version"); - exit(1); - } +# Copyright (C) 2008-2017 Free Software Foundation, Inc. +# +# 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. - if ((glib_major_version != $glib_config_major_version) || - (glib_minor_version != $glib_config_minor_version) || - (glib_micro_version != $glib_config_micro_version)) - { - printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", - $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, - glib_major_version, glib_minor_version, glib_micro_version); - printf ("*** was found! If pkg-config was correct, then it is best\n"); - printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); - printf("*** required on your system.\n"); - printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); - printf("*** to point to the correct configuration files\n"); - } - else if ((glib_major_version != GLIB_MAJOR_VERSION) || - (glib_minor_version != GLIB_MINOR_VERSION) || - (glib_micro_version != GLIB_MICRO_VERSION)) - { - printf("*** GLIB header files (version %d.%d.%d) do not match\n", - GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); - printf("*** library (version %d.%d.%d)\n", - glib_major_version, glib_minor_version, glib_micro_version); - } - else - { - if ((glib_major_version > major) || - ((glib_major_version == major) && (glib_minor_version > minor)) || - ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n", - glib_major_version, glib_minor_version, glib_micro_version); - printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n", - major, minor, micro); - printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); - printf("*** correct copy of pkg-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - } - return 1; -} -],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_glib" = x ; then - AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$PKG_CONFIG" = "no" ; then - echo "*** A new enough version of pkg-config was not found." - echo "*** See http://www.freedesktop.org/software/pkgconfig/" - else - if test -f conf.glibtest ; then - : - else - echo "*** Could not run GLIB test program, checking why..." - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GLIB_CFLAGS" - LIBS="$LIBS $GLIB_LIBS" - AC_TRY_LINK([ -#include -#include -], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GLIB or finding the wrong" - echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GLIB is incorrectly installed."]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GLIB_CFLAGS="" - GLIB_LIBS="" - GLIB_GENMARSHAL="" - GOBJECT_QUERY="" - GLIB_MKENUMS="" - GLIB_COMPILE_RESOURCES="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(GLIB_CFLAGS) - AC_SUBST(GLIB_LIBS) - AC_SUBST(GLIB_GENMARSHAL) - AC_SUBST(GOBJECT_QUERY) - AC_SUBST(GLIB_MKENUMS) - AC_SUBST(GLIB_COMPILE_RESOURCES) - rm -f conf.glibtest -]) +# Check whether the Vala compiler exists in $PATH. If it is found, the +# variable VALAC is set pointing to its absolute path. Otherwise, it is +# simply set to 'valac'. +# Optionally a minimum release number of the compiler can be requested. +# If the ACTION-IF-FOUND parameter is given, it will be run if a proper +# Vala compiler is found. +# Similarly, if the ACTION-IF-FOUND is given, it will be run if no proper +# Vala compiler is found. It defaults to simply print a warning about the +# situation, but otherwise proceeding with the configuration. +# +# AM_PROG_VALAC([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# -------------------------------------------------------------------------- +AC_DEFUN([AM_PROG_VALAC], + [AC_PATH_PROG([VALAC], [valac], [valac]) + AS_IF([test "$VALAC" != valac && test -n "$1"], + [AC_MSG_CHECKING([whether $VALAC is at least version $1]) + am__vala_version=`$VALAC --version | sed 's/Vala *//'` + AS_VERSION_COMPARE([$1], ["$am__vala_version"], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + VALAC=valac])]) + if test "$VALAC" = valac; then + m4_default([$3], + [AC_MSG_WARN([no proper vala compiler found]) + AC_MSG_WARN([you will not be able to compile vala source files])]) + else + m4_default([$2], [:]) + fi]) +m4_include([m4/ax_code_coverage.m4]) m4_include([m4/glibtests.m4]) m4_include([m4/gtk-doc.m4]) m4_include([m4/intltool.m4]) @@ -1506,3 +1722,4 @@ m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) +m4_include([m4/vapigen.m4]) diff --git a/build-aux/compile b/build-aux/compile new file mode 100755 index 00000000..a85b723c --- /dev/null +++ b/build-aux/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# 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, 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, see . + +# 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 maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build-aux/config.guess b/build-aux/config.guess index 1804e9fc..f50dcdb6 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -1,10 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012, 2013 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2012-12-29' +timestamp='2018-02-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,7 +15,7 @@ timestamp='2012-12-29' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -26,12 +24,12 @@ timestamp='2012-12-29' # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # -# Originally written by Per Bothner. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` @@ -41,7 +39,7 @@ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -52,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, -2012, 2013 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -111,9 +107,9 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; + ,,) echo "int x;" > "$dummy.c" ; for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; @@ -136,9 +132,37 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "$UNAME_SYSTEM" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval "$set_cc_for_build" + cat <<-EOF > "$dummy.c" + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi + ;; +esac + # Note: order is significant - the case branches are not exclusive. -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -151,21 +175,31 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build + eval "$set_cc_for_build" if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -180,44 +214,67 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in os=netbsd ;; esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "$machine-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -234,63 +291,54 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos + echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos + echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -302,7 +350,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} + echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos @@ -329,38 +377,38 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} + echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" + eval "$set_cc_for_build" + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in @@ -369,25 +417,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" exit ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) - echo sparc-sun-sunos${UNAME_RELEASE} + echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} + echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not @@ -398,44 +446,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} + echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} + echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} + echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} + echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} + echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} + echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} + echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} + echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { @@ -444,23 +492,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} + echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax @@ -486,17 +534,17 @@ EOF AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] then - echo m88k-dg-dgux${UNAME_RELEASE} + echo m88k-dg-dgux"$UNAME_RELEASE" else - echo m88k-dg-dguxbcs${UNAME_RELEASE} + echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else - echo i586-dg-dgux${UNAME_RELEASE} + echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) @@ -513,7 +561,7 @@ EOF echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id @@ -525,14 +573,14 @@ EOF if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #include main() @@ -543,7 +591,7 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else @@ -557,26 +605,27 @@ EOF exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx @@ -591,28 +640,28 @@ EOF echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + if [ "$HP_ARCH" = "" ]; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include @@ -645,13 +694,13 @@ EOF exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ "$HP_ARCH" = hppa2.0w ] then - eval $set_cc_for_build + eval "$set_cc_for_build" # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -662,23 +711,23 @@ EOF # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #include int main () @@ -703,11 +752,11 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) @@ -716,7 +765,7 @@ EOF *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) @@ -724,9 +773,9 @@ EOF exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk + echo "$UNAME_MACHINE"-unknown-osf1mk else - echo ${UNAME_MACHINE}-unknown-osf1 + echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) @@ -751,127 +800,109 @@ EOF echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} + echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in + case "$UNAME_PROCESSOR" in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin + echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 + echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 + echo "$UNAME_MACHINE"-pc-mingw32 exit ;; - i*:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 + echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case "$UNAME_MACHINE" in x86) - echo i586-pc-interix${UNAME_RELEASE} + echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} + echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) - echo ia64-unknown-interix${UNAME_RELEASE} + echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin + echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix + echo "$UNAME_MACHINE"-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -884,63 +915,64 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval $set_cc_for_build + eval "$set_cc_for_build" if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el @@ -954,55 +986,74 @@ EOF #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-"$LIBC" + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + if objdump -f /bin/sh | grep -q elf32-x86-64; then + echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 + else + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + fi exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1016,34 +1067,34 @@ EOF # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx + echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop + echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos + echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable + echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} + echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp + echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) @@ -1053,12 +1104,12 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1068,9 +1119,9 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv32 + echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) @@ -1078,7 +1129,7 @@ EOF # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1090,9 +1141,9 @@ EOF exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) @@ -1112,9 +1163,9 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; @@ -1123,28 +1174,28 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} + echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} + echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} + echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} + echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} + echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 @@ -1155,7 +1206,7 @@ EOF *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 + echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi @@ -1175,23 +1226,23 @@ EOF exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos + echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} + echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv"$UNAME_RELEASE" else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. @@ -1210,65 +1261,93 @@ EOF echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} + echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} + echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} + echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} + echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} + echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} + echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + eval "$set_cc_for_build" + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} + echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux @@ -1277,18 +1356,18 @@ EOF echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi - echo ${UNAME_MACHINE}-unknown-plan9 + echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 @@ -1309,14 +1388,14 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in + case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; @@ -1325,182 +1404,48 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos + echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros + echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs exit ;; esac -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; +echo "$0: unable to guess system type" >&2 - uname(&un); +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 < -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} +NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize +the system type. Please install a C compiler and try again. EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi + ;; +esac cat >&2 < in order to provide the needed -information to handle your system. +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp @@ -1519,16 +1464,16 @@ hostinfo = `(hostinfo) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" EOF exit 1 # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/build-aux/config.sub b/build-aux/config.sub index 52f04bcd..1d8e98bc 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -1,10 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012, 2013 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2012-12-29' +timestamp='2018-02-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,7 +15,7 @@ timestamp='2012-12-29' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -27,7 +25,7 @@ timestamp='2012-12-29' # of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -35,7 +33,7 @@ timestamp='2012-12-29' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -55,12 +53,11 @@ timestamp='2012-12-29' me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -70,9 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, -2012, 2013 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -99,7 +94,7 @@ while test $# -gt 0 ; do *local*) # First pass through any local machine types. - echo $1 + echo "$1" exit ;; * ) @@ -117,24 +112,24 @@ esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` + basic_machine=`echo "$1" | sed 's/-[^-]*$//'` + if [ "$basic_machine" != "$1" ] + then os=`echo "$1" | sed 's/.*-/-/'` else os=; fi ;; esac @@ -183,44 +178,44 @@ case $os in ;; -sco6) os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 @@ -232,10 +227,7 @@ case $os in os=-lynxos ;; -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` ;; -psos*) os=-psos @@ -256,19 +248,21 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc \ + | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ + | ba \ | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | epiphany \ - | fido | fr30 | frv \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ - | i370 | i860 | i960 | ia64 \ + | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ + | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ @@ -286,26 +280,30 @@ case $basic_machine in | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | open8 \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ | pyramid \ + | riscv32 | riscv64 \ | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ @@ -313,7 +311,8 @@ case $basic_machine in | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | we32k \ + | visium \ + | wasm32 \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown @@ -327,11 +326,14 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) ;; ms1) basic_machine=mt-unknown @@ -360,7 +362,7 @@ case $basic_machine in ;; # Object if more than one company name word. *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. @@ -369,21 +371,23 @@ case $basic_machine in | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ @@ -403,28 +407,34 @@ case $basic_machine in | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ | pyramid-* \ + | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ @@ -432,6 +442,8 @@ case $basic_machine in | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ + | visium-* \ + | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -445,7 +457,7 @@ case $basic_machine in # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) - basic_machine=i386-unknown + basic_machine=i386-pc os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) @@ -479,7 +491,7 @@ case $basic_machine in basic_machine=x86_64-pc ;; amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl @@ -508,6 +520,9 @@ case $basic_machine in basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -521,7 +536,7 @@ case $basic_machine in os=-linux ;; blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) @@ -529,13 +544,13 @@ case $basic_machine in os=-cnk ;; c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray @@ -624,10 +639,18 @@ case $basic_machine in basic_machine=rs6000-bull os=-bosx ;; - dpx2* | dpx2*-bull) + dpx2*) basic_machine=m68k-bull os=-sysv3 ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=$os"spe" + ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -717,9 +740,6 @@ case $basic_machine in hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; - hppa-next) - os=-nextstep3 - ;; hppaosf) basic_machine=hppa1.1-hp os=-osf @@ -732,26 +752,26 @@ case $basic_machine in basic_machine=i370-ibm ;; i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; - i386-vsta | vsta) + vsta) basic_machine=i386-unknown os=-vsta ;; @@ -769,17 +789,17 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; - m88k-omron*) - basic_machine=m88k-omron - ;; magnum | m3230) basic_machine=mips-mips os=-sysv @@ -796,7 +816,7 @@ case $basic_machine in os=-mingw64 ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -811,10 +831,10 @@ case $basic_machine in os=-mint ;; mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k @@ -824,15 +844,19 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -871,7 +895,7 @@ case $basic_machine in basic_machine=v70-nec os=-sysv ;; - next | m*-next ) + next | m*-next) basic_machine=m68k-next case $os in -nextstep* ) @@ -916,6 +940,12 @@ case $basic_machine in nsr-tandem) basic_machine=nsr-tandem ;; + nsv-tandem) + basic_machine=nsv-tandem + ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -948,7 +978,7 @@ case $basic_machine in os=-linux ;; parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; pbd) @@ -964,7 +994,7 @@ case $basic_machine in basic_machine=i386-pc ;; pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc @@ -979,16 +1009,16 @@ case $basic_machine in basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould @@ -998,23 +1028,23 @@ case $basic_machine in ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - ppcle | powerpclittle | ppc-le | powerpc-little) + ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; - ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) + ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm @@ -1068,17 +1098,10 @@ case $basic_machine in sequent) basic_machine=i386-sequent ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; sh5el) basic_machine=sh5le-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) + simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -1097,7 +1120,7 @@ case $basic_machine in os=-sysv4 ;; strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun @@ -1219,6 +1242,9 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; + x64) + basic_machine=x86_64-pc + ;; xbox) basic_machine=i686-pc os=-mingw32 @@ -1227,20 +1253,12 @@ case $basic_machine in basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; none) basic_machine=none-none os=-none @@ -1269,10 +1287,6 @@ case $basic_machine in vax) basic_machine=vax-dec ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; pdp11) basic_machine=pdp11-dec ;; @@ -1282,9 +1296,6 @@ case $basic_machine in sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; cydra) basic_machine=cydra-cydrome ;; @@ -1304,7 +1315,7 @@ case $basic_machine in # Make sure to match an already-canonicalized machine name. ;; *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; esac @@ -1312,10 +1323,10 @@ esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; @@ -1326,8 +1337,8 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases that might get confused + # with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux @@ -1338,45 +1349,48 @@ case $os in -solaris) os=-solaris2 ;; - -svr4*) - os=-sysv4 - ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; - # First accept the basic system types. + # es1800 is here to avoid being matched by es* (a different OS) + -es1800*) + os=-ose + ;; + # Now accept the basic system types. # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. + # Each alternative MUST end in a * to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ + | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -morphos* | -superux* | -rtmk* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1393,12 +1407,12 @@ case $os in -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + -sim | -xray | -os68k* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) - os=`echo $os | sed -e 's|mac|macos|'` + os=`echo "$os" | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc @@ -1407,10 +1421,10 @@ case $os in os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition @@ -1421,12 +1435,6 @@ case $os in -wince*) os=-wince ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; -utek*) os=-bsd ;; @@ -1451,7 +1459,7 @@ case $os in -nova*) os=-rtmk-nova ;; - -ns2 ) + -ns2) os=-nextstep2 ;; -nsk*) @@ -1473,7 +1481,7 @@ case $os in -oss*) os=-sysv3 ;; - -svr4) + -svr4*) os=-sysv4 ;; -svr3) @@ -1488,35 +1496,38 @@ case $os in -ose*) os=-ose ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; + -pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $basic_machine in + arm*) + os=-eabi + ;; + *) + os=-elf + ;; + esac + ;; -nacl*) ;; + -ios) + ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; esac @@ -1551,6 +1562,9 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; hexagon-*) os=-elf ;; @@ -1603,12 +1617,12 @@ case $basic_machine in sparc-* | *-sun) os=-sunos4.1.1 ;; + pru-*) + os=-elf + ;; *-be) os=-beos ;; - *-haiku) - os=-haiku - ;; *-ibm) os=-aix ;; @@ -1648,7 +1662,7 @@ case $basic_machine in m88k-omron*) os=-luna ;; - *-next ) + *-next) os=-nextstep ;; *-sequent) @@ -1663,9 +1677,6 @@ case $basic_machine in i370-*) os=-mvs ;; - *-next) - os=-nextstep3 - ;; *-gould) os=-sysv ;; @@ -1775,15 +1786,15 @@ case $basic_machine in vendor=stratus ;; esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo $basic_machine$os +echo "$basic_machine$os" exit # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/build-aux/depcomp b/build-aux/depcomp index 4ebd5b3a..b39f98f9 100755 --- a/build-aux/depcomp +++ b/build-aux/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2013-05-30.07; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # 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 @@ -786,6 +786,6 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/build-aux/install-sh b/build-aux/install-sh index 377bb868..59990a10 100755 --- a/build-aux/install-sh +++ b/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-11-20.07; # UTC +scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,17 +64,6 @@ mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - posix_mkdir= # Desired mode of installed file. @@ -97,7 +82,7 @@ dir_arg= dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -137,46 +122,57 @@ while test $# -ne 0; do -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -207,6 +203,15 @@ if test $# -eq 0; then exit 0 fi +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 @@ -223,16 +228,16 @@ if test -z "$dir_arg"; then *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -269,41 +274,15 @@ do # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - + dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi @@ -314,74 +293,81 @@ do if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + # $RANDOM is not portable (e.g. dash); use it when possible to + # lower collision chance + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + + # As "mkdir -p" follows symlinks and we work in /tmp possibly; so + # create the $tmpdir first (and fail if unsuccessful) to make sure + # that nobody tries to guess the $tmpdir name. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -391,53 +377,51 @@ do # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac - eval "$initialize_posix_glob" - oIFS=$IFS IFS=/ - $posix_glob set -f + set -f set fnord $dstdir shift - $posix_glob set +f + set +f IFS=$oIFS prefixes= for d do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -472,15 +456,12 @@ do # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - + set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -493,24 +474,24 @@ do # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh index 63ae69dc..e4eda6d6 100644 --- a/build-aux/ltmain.sh +++ b/build-aux/ltmain.sh @@ -1,9 +1,12 @@ +#! /bin/sh +## DO NOT EDIT - This file generated from ./build-aux/ltmain.in +## by inline-source v2014-01-03.01 -# libtool (GNU libtool) 2.4.2 +# libtool (GNU libtool) 2.4.6 +# Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 1996-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -23,881 +26,2281 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --no-quiet, --no-silent -# print informational messages (default) -# --no-warn don't display warning messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print more informational messages than default -# --no-verbose don't print the extra informational messages -# --version print version information -# -h, --help, --help-all print short, long, or detailed help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. When passed as first option, -# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . -# GNU libtool home page: . -# General help using GNU software: . PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.2 -TIMESTAMP="" -package_revision=1.3337 +VERSION="2.4.6 Debian-2.4.6-2.1" +package_revision=2.4.6 -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + +## ------ ## +## Usage. ## +## ------ ## + +# Run './libtool --help' for help with using this script from the +# command line. + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# After configure completes, it has a better idea of some of the +# shell tools we need than the defaults used by the functions shared +# with bootstrap, so set those here where they can still be over- +# ridden by the user, but otherwise take precedence. + +: ${AUTOCONF="autoconf"} +: ${AUTOMAKE="automake"} + + +## -------------------------- ## +## Source external libraries. ## +## -------------------------- ## + +# Much of our low-level functionality needs to be sourced from external +# libraries, which are installed to $pkgauxdir. + +# Set a version string for this script. +scriptversion=2015-10-12.13; # UTC + +# General shell script boiler plate, and helper functions. +# Written by Gary V. Vaughan, 2004 + +# Copyright (C) 2004-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# 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 3 of the License, or +# (at your option) any later version. + +# As a special exception to the GNU General Public License, if you distribute +# this file as part of a program or library that is built using GNU Libtool, +# you may include this file under the same distribution terms that you use +# for the rest of that program. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES 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, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# Evaluate this file near the top of your script to gain access to +# the functions and variables defined here: +# +# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh +# +# If you need to override any of the default environment variable +# settings, do that before evaluating this file. + + +## -------------------- ## +## Shell normalisation. ## +## -------------------- ## + +# Some shells need a little help to be as Bourne compatible as possible. +# Before doing anything else, make sure all that help has been provided! + +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} -# NLS nuisances: We save the old values to restore during execute mode. -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +# NLS nuisances: We save the old values in case they are required later. +_G_user_locale= +_G_safe_locale= +for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + eval "if test set = \"\${$_G_var+set}\"; then + save_$_G_var=\$$_G_var + $_G_var=C + export $_G_var + _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" + _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done -LC_ALL=C -LANGUAGE=C -export LANGUAGE LC_ALL -$lt_unset CDPATH +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Make sure IFS has a sensible default +sp=' ' +nl=' +' +IFS="$sp $nl" + +# There are apparently some retarded systems that use ';' as a PATH separator! +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" +## ------------------------- ## +## Locate command utilities. ## +## ------------------------- ## + + +# func_executable_p FILE +# ---------------------- +# Check that FILE is an executable regular file. +func_executable_p () +{ + test -f "$1" && test -x "$1" +} + + +# func_path_progs PROGS_LIST CHECK_FUNC [PATH] +# -------------------------------------------- +# Search for either a program that responds to --version with output +# containing "GNU", or else returned by CHECK_FUNC otherwise, by +# trying all the directories in PATH with each of the elements of +# PROGS_LIST. +# +# CHECK_FUNC should accept the path to a candidate program, and +# set $func_check_prog_result if it truncates its output less than +# $_G_path_prog_max characters. +func_path_progs () +{ + _G_progs_list=$1 + _G_check_func=$2 + _G_PATH=${3-"$PATH"} + + _G_path_prog_max=0 + _G_path_prog_found=false + _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} + for _G_dir in $_G_PATH; do + IFS=$_G_save_IFS + test -z "$_G_dir" && _G_dir=. + for _G_prog_name in $_G_progs_list; do + for _exeext in '' .EXE; do + _G_path_prog=$_G_dir/$_G_prog_name$_exeext + func_executable_p "$_G_path_prog" || continue + case `"$_G_path_prog" --version 2>&1` in + *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; + *) $_G_check_func $_G_path_prog + func_path_progs_result=$func_check_prog_result + ;; + esac + $_G_path_prog_found && break 3 + done + done + done + IFS=$_G_save_IFS + test -z "$func_path_progs_result" && { + echo "no acceptable sed could be found in \$PATH" >&2 + exit 1 + } +} + + +# We want to be able to use the functions in this file before configure +# has figured out where the best binaries are kept, which means we have +# to search for them ourselves - except when the results are already set +# where we skip the searches. + +# Unless the user overrides by setting SED, search the path for either GNU +# sed, or the sed that truncates its output the least. +test -z "$SED" && { + _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for _G_i in 1 2 3 4 5 6 7; do + _G_sed_script=$_G_sed_script$nl$_G_sed_script + done + echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed + _G_sed_script= + + func_check_prog_sed () + { + _G_path_prog=$1 + + _G_count=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo '' >> conftest.nl + "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + rm -f conftest.sed + SED=$func_path_progs_result +} + + +# Unless the user overrides by setting GREP, search the path for either GNU +# grep, or the grep that truncates its output the least. +test -z "$GREP" && { + func_check_prog_grep () + { + _G_path_prog=$1 + + _G_count=0 + _G_path_prog_max=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo 'GREP' >> conftest.nl + "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + GREP=$func_path_progs_result +} + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# All uppercase variable names are used for environment variables. These +# variables can be overridden by the user before calling a script that +# uses them if a suitable command of that name is not already available +# in the command search PATH. : ${CP="cp -f"} -test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${ECHO="printf %s\n"} +: ${EGREP="$GREP -E"} +: ${FGREP="$GREP -F"} +: ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" -dirname="s,/[^/]*$,," -basename="s,^.*/,," -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} # func_dirname may be replaced by extended shell implementation +## -------------------- ## +## Useful sed snippets. ## +## -------------------- ## +sed_dirname='s|/[^/]*$||' +sed_basename='s|^.*/||' -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} # func_basename may be replaced by extended shell implementation +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' +# Same as above, but do not quote variable references. +sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} # func_dirname_and_basename may be replaced by extended shell implementation +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' +# Sed substitution that converts a w32 file name or path +# that contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-'\' parameter expansions in output of sed_double_quote_subst that +# were '\'-ed in input to the same. If an odd number of '\' preceded a +# '$' in input to sed_double_quote_subst, that '$' was protected from +# expansion. Since each input '\' is now two '\'s, look for any number +# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. +_G_bs='\\' +_G_bs2='\\\\' +_G_bs4='\\\\\\\\' +_G_dollar='\$' +sed_double_backslash="\ + s/$_G_bs4/&\\ +/g + s/^$_G_bs2$_G_dollar/$_G_bs&/ + s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g + s/\n//g" -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname may be replaced by extended shell implementation +## ----------------- ## +## Global variables. ## +## ----------------- ## -# These SED scripts presuppose an absolute path with a trailing slash. -pathcar='s,^/\([^/]*\).*$,\1,' -pathcdr='s,^/[^/]*,,' -removedotparts=':dotsl - s@/\./@/@g - t dotsl - s,/\.$,/,' -collapseslashes='s@/\{1,\}@/@g' -finalslash='s,/*$,/,' +# Except for the global variables explicitly listed below, the following +# functions in the '^func_' namespace, and the '^require_' namespace +# variables initialised in the 'Resource management' section, sourcing +# this file will not pollute your global namespace with anything +# else. There's no portable way to scope variables in Bourne shell +# though, so actually running these functions will sometimes place +# results into a variable named after the function, and often use +# temporary variables in the '^_G_' namespace. If you are careful to +# avoid using those namespaces casually in your sourcing script, things +# should continue to work as you expect. And, of course, you can freely +# overwrite any of the functions or variables defined here before +# calling anything to customize them. -# func_normal_abspath PATH -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -# value returned in "$func_normal_abspath_result" -func_normal_abspath () -{ - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` - while :; do - # Processed it all yet? - if test "$func_normal_abspath_tpath" = / ; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result" ; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. -# func_relative_path SRCDIR DSTDIR -# generates a relative path from SRCDIR to DSTDIR, with a trailing -# slash if non-empty, suitable for immediately appending a filename -# without needing to append a separator. -# value returned in "$func_relative_path_result" -func_relative_path () -{ - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=${func_dirname_result} - if test "x$func_relative_path_tlibdir" = x ; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done +# Allow overriding, eg assuming that you follow the convention of +# putting '$debug_cmd' at the start of all your functions, you can get +# bash to show function call trace with: +# +# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +debug_cmd=${debug_cmd-":"} +exit_cmd=: - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test "x$func_stripname_result" != x ; then - func_relative_path_result=${func_relative_path_result}/${func_stripname_result} - fi +# By convention, finish your script with: +# +# exit $exit_status +# +# so that you can set exit_status to non-zero if you want to indicate +# something went wrong during execution without actually bailing out at +# the point of failure. +exit_status=$EXIT_SUCCESS - # Normalisation. If bindir is libdir, return empty string, - # else relative path ending with a slash; either way, target - # file name can be directly appended. - if test ! -z "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result/" - func_relative_path_result=$func_stripname_result - fi -} +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath=$0 -# The name of this program: -func_dirname_and_basename "$progpath" -progname=$func_basename_result +# The name of this program. +progname=`$ECHO "$progpath" |$SED "$sed_basename"` -# Make sure we have an absolute path for reexecution: +# Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) - progdir=$func_dirname_result + progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" + progpath=$progdir/$progname ;; *) - save_IFS="$IFS" + _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do - IFS="$save_IFS" + IFS=$_G_IFS test -x "$progdir/$progname" && break done - IFS="$save_IFS" + IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" + progpath=$progdir/$progname ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' +## ----------------- ## +## Standard options. ## +## ----------------- ## -# Sed substitution that converts a w32 file name or path -# which contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" +# The following options affect the operation of the functions defined +# below, and should be set appropriately depending on run-time para- +# meters passed on the command line. -# Standard options: opt_dry_run=false -opt_help=false opt_quiet=false opt_verbose=false -opt_warning=: -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }$*" -} +# Categories 'all' and 'none' are always available. Append any others +# you will pass as the first argument to func_warning from your own +# code. +warning_categories= -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} +# By default, display warnings according to 'opt_warning_types'. Set +# 'warning_func' to ':' to elide all warnings, or func_fatal_error to +# treat the next displayed warning as a fatal error. +warning_func=func_warn_and_continue - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} +# Set to 'all' to display all warnings, 'none' to suppress all +# warnings, or a space delimited list of some subset of +# 'warning_categories' to display only the listed warnings. +opt_warning_types=all -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 -} +## -------------------- ## +## Resource management. ## +## -------------------- ## -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 +# This section contains definitions for functions that each ensure a +# particular resource (a file, or a non-empty configuration variable for +# example) is available, and if appropriate to extract default values +# from pertinent package files. Call them using their associated +# 'require_*' variable to ensure that they are executed, at most, once. +# +# It's entirely deliberate that calling these functions can set +# variables that don't obey the namespace limitations obeyed by the rest +# of this file, in order that that they be as useful as possible to +# callers. - # bash bug again: - : -} -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () +# require_term_colors +# ------------------- +# Allow display of bold text on terminals that support it. +require_term_colors=func_require_term_colors +func_require_term_colors () { - func_error ${1+"$@"} - exit $EXIT_FAILURE + $debug_cmd + + test -t 1 && { + # COLORTERM and USE_ANSI_COLORS environment variables take + # precedence, because most terminfo databases neglect to describe + # whether color sequences are supported. + test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} + + if test 1 = "$USE_ANSI_COLORS"; then + # Standard ANSI escape sequences + tc_reset='' + tc_bold=''; tc_standout='' + tc_red=''; tc_green='' + tc_blue=''; tc_cyan='' + else + # Otherwise trust the terminfo database after all. + test -n "`tput sgr0 2>/dev/null`" && { + tc_reset=`tput sgr0` + test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` + tc_standout=$tc_bold + test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` + test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` + test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` + test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` + test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` + } + fi + } + + require_term_colors=: } -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" + +## ----------------- ## +## Function library. ## +## ----------------- ## + +# This section contains a variety of useful functions to call in your +# scripts. Take note of the portable wrappers for features provided by +# some modern shells, which will fall back to slower equivalents on +# less featureful shells. + + +# func_append VAR VALUE +# --------------------- +# Append VALUE onto the existing contents of VAR. + + # We should try to minimise forks, especially on Windows where they are + # unreasonably slow, so skip the feature probes when bash or zsh are + # being used: + if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then + : ${_G_HAVE_ARITH_OP="yes"} + : ${_G_HAVE_XSI_OPS="yes"} + # The += operator was introduced in bash 3.1 + case $BASH_VERSION in + [12].* | 3.0 | 3.0*) ;; + *) + : ${_G_HAVE_PLUSEQ_OP="yes"} + ;; + esac + fi + + # _G_HAVE_PLUSEQ_OP + # Can be empty, in which case the shell is probed, "yes" if += is + # useable or anything else if it does not work. + test -z "$_G_HAVE_PLUSEQ_OP" \ + && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ + && _G_HAVE_PLUSEQ_OP=yes + +if test yes = "$_G_HAVE_PLUSEQ_OP" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_append () + { + $debug_cmd + + eval "$1+=\$2" + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_append () + { + $debug_cmd + + eval "$1=\$$1\$2" + } +fi + + +# func_append_quoted VAR VALUE +# ---------------------------- +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +if test yes = "$_G_HAVE_PLUSEQ_OP"; then + eval 'func_append_quoted () + { + $debug_cmd + + func_quote_arg pretty "$2" + eval "$1+=\\ \$func_quote_arg_result" + }' +else + func_append_quoted () + { + $debug_cmd + + func_quote_arg pretty "$2" + eval "$1=\$$1\\ \$func_quote_arg_result" + } +fi + + +# func_append_uniq VAR VALUE +# -------------------------- +# Append unique VALUE onto the existing contents of VAR, assuming +# entries are delimited by the first character of VALUE. For example: +# +# func_append_uniq options " --another-option option-argument" +# +# will only append to $options if " --another-option option-argument " +# is not already present somewhere in $options already (note spaces at +# each end implied by leading space in second argument). +func_append_uniq () +{ + $debug_cmd + + eval _G_current_value='`$ECHO $'$1'`' + _G_delim=`expr "$2" : '\(.\)'` + + case $_G_delim$_G_current_value$_G_delim in + *"$2$_G_delim"*) ;; + *) func_append "$@" ;; + esac +} + + +# func_arith TERM... +# ------------------ +# Set func_arith_result to the result of evaluating TERMs. + test -z "$_G_HAVE_ARITH_OP" \ + && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ + && _G_HAVE_ARITH_OP=yes + +if test yes = "$_G_HAVE_ARITH_OP"; then + eval 'func_arith () + { + $debug_cmd + + func_arith_result=$(( $* )) + }' +else + func_arith () + { + $debug_cmd + + func_arith_result=`expr "$@"` + } +fi + + +# func_basename FILE +# ------------------ +# Set func_basename_result to FILE with everything up to and including +# the last / stripped. +if test yes = "$_G_HAVE_XSI_OPS"; then + # If this shell supports suffix pattern removal, then use it to avoid + # forking. Hide the definitions single quotes in case the shell chokes + # on unsupported syntax... + _b='func_basename_result=${1##*/}' + _d='case $1 in + */*) func_dirname_result=${1%/*}$2 ;; + * ) func_dirname_result=$3 ;; + esac' + +else + # ...otherwise fall back to using sed. + _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' + _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` + if test "X$func_dirname_result" = "X$1"; then + func_dirname_result=$3 + else + func_append func_dirname_result "$2" + fi' +fi + +eval 'func_basename () +{ + $debug_cmd + + '"$_b"' +}' + + +# func_dirname FILE APPEND NONDIR_REPLACEMENT +# ------------------------------------------- +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +eval 'func_dirname () +{ + $debug_cmd + + '"$_d"' +}' + + +# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT +# -------------------------------------------------------- +# Perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# For efficiency, we do not delegate to the functions above but instead +# duplicate the functionality here. +eval 'func_dirname_and_basename () +{ + $debug_cmd + + '"$_b"' + '"$_d"' +}' + + +# func_echo ARG... +# ---------------- +# Echo program name prefixed message. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_echo_all ARG... +# -------------------- +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + + +# func_echo_infix_1 INFIX ARG... +# ------------------------------ +# Echo program name, followed by INFIX on the first line, with any +# additional lines not showing INFIX. +func_echo_infix_1 () +{ + $debug_cmd + + $require_term_colors + + _G_infix=$1; shift + _G_indent=$_G_infix + _G_prefix="$progname: $_G_infix: " + _G_message=$* + + # Strip color escape sequences before counting printable length + for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" + do + test -n "$_G_tc" && { + _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` + _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` + } + done + _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes + + func_echo_infix_1_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_infix_1_IFS + $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 + _G_prefix=$_G_indent + done + IFS=$func_echo_infix_1_IFS +} + + +# func_error ARG... +# ----------------- +# Echo program name prefixed message to standard error. +func_error () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } -help="Try \`$progname --help' for more information." ## default -# func_grep expression filename +# func_fatal_error ARG... +# ----------------------- +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + $debug_cmd + + func_error "$*" + exit $EXIT_FAILURE +} + + +# func_grep EXPRESSION FILENAME +# ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { + $debug_cmd + $GREP "$1" "$2" >/dev/null 2>&1 } -# func_mkdir_p directory-path +# func_len STRING +# --------------- +# Set func_len_result to the length of STRING. STRING may not +# start with a hyphen. + test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_len () + { + $debug_cmd + + func_len_result=${#1} + }' +else + func_len () + { + $debug_cmd + + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` + } +fi + + +# func_mkdir_p DIRECTORY-PATH +# --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { - my_directory_path="$1" - my_dir_list= + $debug_cmd - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + _G_directory_path=$1 + _G_dir_list= - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; + if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then + + # Protect directory names starting with '-' + case $_G_directory_path in + -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do + while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" + _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac + case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` + _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done - my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` + _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes + func_mkdir_p_IFS=$IFS; IFS=: + for _G_dir in $_G_dir_list; do + IFS=$func_mkdir_p_IFS + # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : + $MKDIR "$_G_dir" 2>/dev/null || : done - IFS="$save_mkdir_p_IFS" + IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" + test -d "$_G_directory_path" || \ + func_fatal_error "Failed to create '$1'" fi } -# func_mktempdir [string] +# func_mktempdir [BASENAME] +# ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. +# given, BASENAME is the basename for that directory. func_mktempdir () { - my_template="${TMPDIR-/tmp}/${1-$progname}" + $debug_cmd + + _G_template=${TMPDIR-/tmp}/${1-$progname} - if test "$opt_dry_run" = ":"; then + if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" + _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` - if test ! -d "$my_tmpdir"; then + if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" + _G_tmpdir=$_G_template-${RANDOM-0}$$ - save_mktempdir_umask=`umask` + func_mktempdir_umask=`umask` umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask + $MKDIR "$_G_tmpdir" + umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + test -d "$_G_tmpdir" || \ + func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi - $ECHO "$my_tmpdir" + $ECHO "$_G_tmpdir" } -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () +# func_normal_abspath PATH +# ------------------------ +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +func_normal_abspath () { - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; + $debug_cmd + + # These SED scripts presuppose an absolute path with a trailing slash. + _G_pathcar='s|^/\([^/]*\).*$|\1|' + _G_pathcdr='s|^/[^/]*||' + _G_removedotparts=':dotsl + s|/\./|/|g + t dotsl + s|/\.$|/|' + _G_collapseslashes='s|/\{1,\}|/|g' + _G_finalslash='s|/*$|/|' + + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; *) - func_quote_for_eval_unquoted_result="$1" ;; + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; esac - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` + while :; do + # Processed it all yet? + if test / = "$func_normal_abspath_tpath"; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result"; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + + +# func_notquiet ARG... +# -------------------- +# Echo program name prefixed message only when not in quiet mode. +func_notquiet () +{ + $debug_cmd + + $opt_quiet || func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + + +# func_relative_path SRCDIR DSTDIR +# -------------------------------- +# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. +func_relative_path () +{ + $debug_cmd + + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=$func_dirname_result + if test -z "$func_relative_path_tlibdir"; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test -n "$func_stripname_result"; then + func_append func_relative_path_result "/$func_stripname_result" + fi + + # Normalisation. If bindir is libdir, return '.' else relative path. + if test -n "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + fi + + test -n "$func_relative_path_result" || func_relative_path_result=. + + : +} + + +# func_quote_portable EVAL ARG +# ---------------------------- +# Internal function to portably implement func_quote_arg. Note that we still +# keep attention to performance here so we as much as possible try to avoid +# calling sed binary (so far O(N) complexity as long as func_append is O(1)). +func_quote_portable () +{ + $debug_cmd + + func_quote_portable_result=$2 + + # one-time-loop (easy break) + while true + do + if $1; then + func_quote_portable_result=`$ECHO "$2" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` + break + fi + + # Quote for eval. + case $func_quote_portable_result in + *[\\\`\"\$]*) + case $func_quote_portable_result in + *[\[\*\?]*) + func_quote_portable_result=`$ECHO "$func_quote_portable_result" | $SED "$sed_quote_subst"` + break + ;; + esac + + func_quote_portable_old_IFS=$IFS + for _G_char in '\' '`' '"' '$' + do + # STATE($1) PREV($2) SEPARATOR($3) + set start "" "" + func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy + IFS=$_G_char + for _G_part in $func_quote_portable_result + do + case $1 in + quote) + func_append func_quote_portable_result "$3$2" + set quote "$_G_part" "\\$_G_char" + ;; + start) + set first "" "" + func_quote_portable_result= + ;; + first) + set quote "$_G_part" "" + ;; + esac + done + done + IFS=$func_quote_portable_old_IFS + ;; + *) ;; + esac + break + done + + func_quote_portable_unquoted_result=$func_quote_portable_result + case $func_quote_portable_result in + # double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # many bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + func_quote_portable_result=\"$func_quote_portable_result\" + ;; + esac +} + + +# func_quotefast_eval ARG +# ----------------------- +# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', +# but optimized for speed. Result is stored in $func_quotefast_eval. +if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then + func_quotefast_eval () + { + printf -v func_quotefast_eval_result %q "$1" + } +else + func_quotefast_eval () + { + func_quote_portable false "$1" + func_quotefast_eval_result=$func_quote_portable_result + } +fi + + +# func_quote_arg MODEs ARG +# ------------------------ +# Quote one ARG to be evaled later. MODEs argument may contain zero ore more +# specifiers listed below separated by ',' character. This function returns two +# values: +# i) func_quote_arg_result +# double-quoted (when needed), suitable for a subsequent eval +# ii) func_quote_arg_unquoted_result +# has all characters that are still active within double +# quotes backslashified. Available only if 'unquoted' is specified. +# +# Available modes: +# ---------------- +# 'eval' (default) +# - escape shell special characters +# 'expand' +# - the same as 'eval'; but do not quote variable references +# 'pretty' +# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might +# later used in func_quote to get output like: 'echo "a b"' instead of +# 'echo a\ b'. This is slower than default on some shells. +# 'unquoted' +# - produce also $func_quote_arg_unquoted_result which does not contain +# wrapping double-quotes. +# +# Examples for 'func_quote_arg pretty,unquoted string': +# +# string | *_result | *_unquoted_result +# ------------+-----------------------+------------------- +# " | \" | \" +# a b | "a b" | a b +# "a b" | "\"a b\"" | \"a b\" +# * | "*" | * +# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" +# +# Examples for 'func_quote_arg pretty,unquoted,expand string': +# +# string | *_result | *_unquoted_result +# --------------+---------------------+-------------------- +# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" +func_quote_arg () +{ + _G_quote_expand=false + case ,$1, in + *,expand,*) + _G_quote_expand=: + ;; + esac + + case ,$1, in + *,pretty,*|*,expand,*|*,unquoted,*) + func_quote_portable $_G_quote_expand "$2" + func_quote_arg_result=$func_quote_portable_result + func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result ;; *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + # Faster quote-for-eval for some shells. + func_quotefast_eval "$2" + func_quote_arg_result=$func_quotefast_eval_result + ;; + esac +} + + +# func_quote MODEs ARGs... +# ------------------------ +# Quote all ARGs to be evaled later and join them into single command. See +# func_quote_arg's description for more info. +func_quote () +{ + $debug_cmd + _G_func_quote_mode=$1 ; shift + func_quote_result= + while test 0 -lt $#; do + func_quote_arg "$_G_func_quote_mode" "$1" + if test -n "$func_quote_result"; then + func_append func_quote_result " $func_quote_arg_result" + else + func_append func_quote_result "$func_quote_arg_result" + fi + shift + done +} + + +# func_stripname PREFIX SUFFIX NAME +# --------------------------------- +# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_stripname () + { + $debug_cmd + + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary variable first. + func_stripname_result=$3 + func_stripname_result=${func_stripname_result#"$1"} + func_stripname_result=${func_stripname_result%"$2"} + }' +else + func_stripname () + { + $debug_cmd + + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac + } +fi + + +# func_show_eval CMD [FAIL_EXP] +# ----------------------------- +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + func_quote_arg pretty,expand "$_G_cmd" + eval "func_notquiet $func_quote_arg_result" + + $opt_dry_run || { + eval "$_G_cmd" + _G_status=$? + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } } -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () +# func_show_eval_locale CMD [FAIL_EXP] +# ------------------------------------ +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () { + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + $opt_quiet || { + func_quote_arg expand,pretty "$_G_cmd" + eval "func_echo $func_quote_arg_result" + } + + $opt_dry_run || { + eval "$_G_user_locale + $_G_cmd" + _G_status=$? + eval "$_G_safe_locale" + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_tr_sh +# ---------- +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + $debug_cmd + case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "$1" | $SED \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; esac +} - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; + +# func_verbose ARG... +# ------------------- +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $debug_cmd + + $opt_verbose && func_echo "$*" + + : +} + + +# func_warn_and_continue ARG... +# ----------------------------- +# Echo program name prefixed warning message to standard error. +func_warn_and_continue () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 +} + + +# func_warning CATEGORY ARG... +# ---------------------------- +# Echo program name prefixed warning message to standard error. Warning +# messages can be filtered according to CATEGORY, where this function +# elides messages where CATEGORY is not listed in the global variable +# 'opt_warning_types'. +func_warning () +{ + $debug_cmd + + # CATEGORY must be in the warning_categories list! + case " $warning_categories " in + *" $1 "*) ;; + *) func_internal_error "invalid warning category '$1'" ;; + esac + + _G_category=$1 + shift + + case " $opt_warning_types " in + *" $_G_category "*) $warning_func ${1+"$@"} ;; + esac +} + + +# func_sort_ver VER1 VER2 +# ----------------------- +# 'sort -V' is not generally available. +# Note this deviates from the version comparison in automake +# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a +# but this should suffice as we won't be specifying old +# version formats or redundant trailing .0 in bootstrap.conf. +# If we did want full compatibility then we should probably +# use m4_version_compare from autoconf. +func_sort_ver () +{ + $debug_cmd + + printf '%s\n%s\n' "$1" "$2" \ + | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n +} + +# func_lt_ver PREV CURR +# --------------------- +# Return true if PREV and CURR are in the correct order according to +# func_sort_ver, otherwise false. Use it like this: +# +# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." +func_lt_ver () +{ + $debug_cmd + + test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: +#! /bin/sh + +# Set a version string for this script. +scriptversion=2015-10-12.13; # UTC + +# A portable, pluggable option parser for Bourne shell. +# Written by Gary V. Vaughan, 2010 + +# Copyright (C) 2010-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# 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 3 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, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# This file is a library for parsing options in your shell scripts along +# with assorted other useful supporting features that you can make use +# of too. +# +# For the simplest scripts you might need only: +# +# #!/bin/sh +# . relative/path/to/funclib.sh +# . relative/path/to/options-parser +# scriptversion=1.0 +# func_options ${1+"$@"} +# eval set dummy "$func_options_result"; shift +# ...rest of your script... +# +# In order for the '--version' option to work, you will need to have a +# suitably formatted comment like the one at the top of this file +# starting with '# Written by ' and ending with '# warranty; '. +# +# For '-h' and '--help' to work, you will also need a one line +# description of your script's purpose in a comment directly above the +# '# Written by ' line, like the one at the top of this file. +# +# The default options also support '--debug', which will turn on shell +# execution tracing (see the comment above debug_cmd below for another +# use), and '--verbose' and the func_verbose function to allow your script +# to display verbose messages only when your user has specified +# '--verbose'. +# +# After sourcing this file, you can plug processing for additional +# options by amending the variables from the 'Configuration' section +# below, and following the instructions in the 'Option parsing' +# section further down. + +## -------------- ## +## Configuration. ## +## -------------- ## + +# You should override these variables in your script after sourcing this +# file so that they reflect the customisations you have added to the +# option parser. + +# The usage line for option parsing errors and the start of '-h' and +# '--help' output messages. You can embed shell variables for delayed +# expansion at the time the message is displayed, but you will need to +# quote other shell meta-characters carefully to prevent them being +# expanded when the contents are evaled. +usage='$progpath [OPTION]...' + +# Short help message in response to '-h' and '--help'. Add to this or +# override it after sourcing this library to reflect the full set of +# options your script accepts. +usage_message="\ + --debug enable verbose shell tracing + -W, --warnings=CATEGORY + report the warnings falling in CATEGORY [all] + -v, --verbose verbosely report processing + --version print version information and exit + -h, --help print short or long help message and exit +" + +# Additional text appended to 'usage_message' in response to '--help'. +long_help_message=" +Warning categories include: + 'all' show all warnings + 'none' turn off all the warnings + 'error' warnings are treated as fatal errors" + +# Help message printed before fatal option parsing errors. +fatal_help="Try '\$progname --help' for more information." + + + +## ------------------------- ## +## Hook function management. ## +## ------------------------- ## + +# This section contains functions for adding, removing, and running hooks +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. + +# func_hookable FUNC_NAME +# ----------------------- +# Declare that FUNC_NAME will run hooks added with +# 'func_add_hook FUNC_NAME ...'. +func_hookable () +{ + $debug_cmd + + func_append hookable_fns " $1" +} + + +# func_add_hook FUNC_NAME HOOK_FUNC +# --------------------------------- +# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must +# first have been declared "hookable" by a call to 'func_hookable'. +func_add_hook () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not accept hook functions." ;; esac - func_quote_for_expand_result="$my_arg" + eval func_append ${1}_hooks '" $2"' +} + + +# func_remove_hook FUNC_NAME HOOK_FUNC +# ------------------------------------ +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +func_remove_hook () +{ + $debug_cmd + + eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' +} + + +# func_run_hooks FUNC_NAME [ARG]... +# --------------------------------- +# Run all hook functions registered to FUNC_NAME. +# It is assumed that the list of hook functions contains nothing more +# than a whitespace-delimited list of legal shell function names, and +# no effort is wasted trying to catch shell meta-characters or preserve +# whitespace. +func_run_hooks () +{ + $debug_cmd + + _G_rc_run_hooks=false + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; + esac + + eval _G_hook_fns=\$$1_hooks; shift + + for _G_hook in $_G_hook_fns; do + if eval $_G_hook '"$@"'; then + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + _G_rc_run_hooks=: + fi + done + + $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result +} + + + +## --------------- ## +## Option parsing. ## +## --------------- ## + +# In order to add your own option parsing hooks, you must accept the +# full positional parameter list in your hook function, you may remove/edit +# any options that you action, and then pass back the remaining unprocessed +# options in '_result', escaped suitably for +# 'eval'. In this case you also must return $EXIT_SUCCESS to let the +# hook's caller know that it should pay attention to +# '_result'. Returning $EXIT_FAILURE signalizes that +# arguments are left untouched by the hook and therefore caller will ignore the +# result variable. +# +# Like this: +# +# my_options_prep () +# { +# $debug_cmd +# +# # Extend the existing usage message. +# usage_message=$usage_message' +# -s, --silent don'\''t print informational messages +# ' +# # No change in '$@' (ignored completely by this hook). There is +# # no need to do the equivalent (but slower) action: +# # func_quote eval ${1+"$@"} +# # my_options_prep_result=$func_quote_result +# false +# } +# func_add_hook func_options_prep my_options_prep +# +# +# my_silent_option () +# { +# $debug_cmd +# +# args_changed=false +# +# # Note that for efficiency, we parse as many options as we can +# # recognise in a loop before passing the remainder back to the +# # caller on the first unrecognised argument we encounter. +# while test $# -gt 0; do +# opt=$1; shift +# case $opt in +# --silent|-s) opt_silent=: +# args_changed=: +# ;; +# # Separate non-argument short options: +# -s*) func_split_short_opt "$_G_opt" +# set dummy "$func_split_short_opt_name" \ +# "-$func_split_short_opt_arg" ${1+"$@"} +# shift +# args_changed=: +# ;; +# *) # Make sure the first unrecognised option "$_G_opt" +# # is added back to "$@", we could need that later +# # if $args_changed is true. +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; +# esac +# done +# +# if $args_changed; then +# func_quote eval ${1+"$@"} +# my_silent_option_result=$func_quote_result +# fi +# +# $args_changed +# } +# func_add_hook func_parse_options my_silent_option +# +# +# my_option_validation () +# { +# $debug_cmd +# +# $opt_silent && $opt_verbose && func_fatal_help "\ +# '--silent' and '--verbose' options are mutually exclusive." +# +# false +# } +# func_add_hook func_validate_options my_option_validation +# +# You'll also need to manually amend $usage_message to reflect the extra +# options you parse. It's preferable to append if you can, so that +# multiple option parsing hooks can be added safely. + + +# func_options_finish [ARG]... +# ---------------------------- +# Finishing the option parse loop (call 'func_options' hooks ATM). +func_options_finish () +{ + $debug_cmd + + _G_func_options_finish_exit=false + if func_run_hooks func_options ${1+"$@"}; then + func_options_finish_result=$func_run_hooks_result + _G_func_options_finish_exit=: + fi + + $_G_func_options_finish_exit +} + + +# func_options [ARG]... +# --------------------- +# All the functions called inside func_options are hookable. See the +# individual implementations for details. +func_hookable func_options +func_options () +{ + $debug_cmd + + _G_rc_options=false + + for my_func in options_prep parse_options validate_options options_finish + do + if eval func_$my_func '${1+"$@"}'; then + eval _G_res_var='$'"func_${my_func}_result" + eval set dummy "$_G_res_var" ; shift + _G_rc_options=: + fi + done + + # Save modified positional parameters for caller. As a top-level + # options-parser function we always need to set the 'func_options_result' + # variable (regardless the $_G_rc_options value). + if $_G_rc_options; then + func_options_result=$_G_res_var + else + func_quote eval ${1+"$@"} + func_options_result=$func_quote_result + fi + + $_G_rc_options +} + + +# func_options_prep [ARG]... +# -------------------------- +# All initialisations required before starting the option parse loop. +# Note that when calling hook functions, we pass through the list of +# positional parameters. If a hook function modifies that list, and +# needs to propagate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). +func_hookable func_options_prep +func_options_prep () +{ + $debug_cmd + + # Option defaults: + opt_verbose=false + opt_warning_types= + + _G_rc_options_prep=false + if func_run_hooks func_options_prep ${1+"$@"}; then + _G_rc_options_prep=: + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result + fi + + $_G_rc_options_prep } -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () +# func_parse_options [ARG]... +# --------------------------- +# The main option parsing loop. +func_hookable func_parse_options +func_parse_options () { - my_cmd="$1" - my_fail_exp="${2-:}" + $debug_cmd + + func_parse_options_result= + + _G_rc_parse_options=false + # this just eases exit handling + while test $# -gt 0; do + # Defer to hook functions for initial option parsing, so they + # get priority in the event of reusing an option name. + if func_run_hooks func_parse_options ${1+"$@"}; then + eval set dummy "$func_run_hooks_result"; shift + _G_rc_parse_options=: + fi - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } + # Break out of the loop if we already parsed every option. + test $# -gt 0 || break - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi + _G_match_parse_options=: + _G_opt=$1 + shift + case $_G_opt in + --debug|-x) debug_cmd='set -x' + func_echo "enabling shell trace mode" + $debug_cmd + ;; + + --no-warnings|--no-warning|--no-warn) + set dummy --warnings none ${1+"$@"} + shift + ;; + + --warnings|--warning|-W) + if test $# = 0 && func_missing_arg $_G_opt; then + _G_rc_parse_options=: + break + fi + case " $warning_categories $1" in + *" $1 "*) + # trailing space prevents matching last $1 above + func_append_uniq opt_warning_types " $1" + ;; + *all) + opt_warning_types=$warning_categories + ;; + *none) + opt_warning_types=none + warning_func=: + ;; + *error) + opt_warning_types=$warning_categories + warning_func=func_fatal_error + ;; + *) + func_fatal_error \ + "unsupported warning category: '$1'" + ;; + esac + shift + ;; + + --verbose|-v) opt_verbose=: ;; + --version) func_version ;; + -\?|-h) func_usage ;; + --help) func_help ;; + + # Separate optargs to long options (plugins may need this): + --*=*) func_split_equals "$_G_opt" + set dummy "$func_split_equals_lhs" \ + "$func_split_equals_rhs" ${1+"$@"} + shift + ;; + + # Separate optargs to short options: + -W*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-v*|-x*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) _G_rc_parse_options=: ; break ;; + -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift + _G_match_parse_options=false + break + ;; + esac + + $_G_match_parse_options && _G_rc_parse_options=: + done + + + if $_G_rc_parse_options; then + # save modified positional parameters for caller + func_quote eval ${1+"$@"} + func_parse_options_result=$func_quote_result fi + + $_G_rc_parse_options } -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () +# func_validate_options [ARG]... +# ------------------------------ +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +func_hookable func_validate_options +func_validate_options () { - my_cmd="$1" - my_fail_exp="${2-:}" + $debug_cmd - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } + _G_rc_validate_options=false - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi + # Display all warnings if -W was not given. + test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" + + if func_run_hooks func_validate_options ${1+"$@"}; then + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result + _G_rc_validate_options=: fi -} -# func_tr_sh -# Turn $1 into a string suitable for a shell variable name. -# Result is stored in $func_tr_sh_result. All characters -# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -# if $1 begins with a digit, a '_' is prepended as well. -func_tr_sh () -{ - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac + # Bail if the options were screwed! + $exit_cmd $EXIT_FAILURE + + $_G_rc_validate_options } -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $opt_debug - $SED -n '/(C)/!b go - :more - /\./!{ - N - s/\n# / / - b more - } - :go - /^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} +## ----------------- ## +## Helper functions. ## +## ----------------- ## -# func_usage -# Echo short help message to standard output and exit. -func_usage () +# This section contains the helper functions used by the rest of the +# hookable option parser framework in ascii-betical order. + + +# func_fatal_help ARG... +# ---------------------- +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () { - $opt_debug + $debug_cmd - $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - echo - $ECHO "run \`$progname --help | more' for full usage" - exit $? + eval \$ECHO \""Usage: $usage"\" + eval \$ECHO \""$fatal_help"\" + func_error ${1+"$@"} + exit $EXIT_FAILURE } -# func_help [NOEXIT] -# Echo long help message to standard output and exit, -# unless 'noexit' is passed as argument. + +# func_help +# --------- +# Echo long help message to standard output and exit. func_help () { - $opt_debug - - $SED -n '/^# Usage:/,/# Report bugs to/ { - :print - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ - p - d - } - /^# .* home page:/b print - /^# General help using/b print - ' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret - fi + $debug_cmd + + func_usage_message + $ECHO "$long_help_message" + exit 0 } -# func_missing_arg argname + +# func_missing_arg ARGNAME +# ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { - $opt_debug + $debug_cmd - func_error "missing argument for $1." + func_error "Missing argument for '$1'." exit_cmd=exit } -# func_split_short_opt shortopt +# func_split_equals STRING +# ------------------------ +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. +test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=${1%%=*} + func_split_equals_rhs=${1#*=} + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` + func_split_equals_rhs= + test "x$func_split_equals_lhs" = "x$1" \ + || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` + } +fi #func_split_equals + + +# func_split_short_opt SHORTOPT +# ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. -func_split_short_opt () +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"} + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` + } +fi #func_split_short_opt + + +# func_usage +# ---------- +# Echo short help message to standard output and exit. +func_usage () { - my_sed_short_opt='1s/^\(..\).*$/\1/;q' - my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + $debug_cmd - func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` - func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` -} # func_split_short_opt may be replaced by extended shell implementation + func_usage_message + $ECHO "Run '$progname --help |${PAGER-more}' for full usage" + exit 0 +} -# func_split_long_opt longopt -# Set func_split_long_opt_name and func_split_long_opt_arg shell -# variables after splitting LONGOPT at the `=' sign. -func_split_long_opt () +# func_usage_message +# ------------------ +# Echo short help message to standard output. +func_usage_message () { - my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' - my_sed_long_arg='1s/^--[^=]*=//' + $debug_cmd - func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` - func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` -} # func_split_long_opt may be replaced by extended shell implementation + eval \$ECHO \""Usage: $usage"\" + echo + $SED -n 's|^# || + /^Written by/{ + x;p;x + } + h + /^Written by/q' < "$progpath" + echo + eval \$ECHO \""$usage_message"\" +} -exit_cmd=: +# func_version +# ------------ +# Echo version message to standard output and exit. +func_version () +{ + $debug_cmd + printf '%s\n' "$progname $scriptversion" + $SED -n ' + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more + } + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p + } + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" + exit $? +} -magic="%%%MAGIC variable%%%" -magic_exe="%%%MAGIC EXE variable%%%" +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: -# Global variables. -nonopt= -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 +# Set a version string. +scriptversion='(GNU libtool) 2.4.6' -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () +# func_echo ARG... +# ---------------- +# Libtool also displays the current mode in messages, so override +# funclib.sh func_echo with this custom definition. +func_echo () { - eval "${1}=\$${1}\${2}" -} # func_append may be replaced by extended shell implementation + $debug_cmd -# func_append_quoted var value -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -func_append_quoted () -{ - func_quote_for_eval "${2}" - eval "${1}=\$${1}\\ \$func_quote_for_eval_result" -} # func_append_quoted may be replaced by extended shell implementation + _G_message=$* + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" + done + IFS=$func_echo_IFS +} -# func_arith arithmetic-term... -func_arith () + +# func_warning ARG... +# ------------------- +# Libtool warnings are not categorized, so override funclib.sh +# func_warning with this simpler definition. +func_warning () { - func_arith_result=`expr "${@}"` -} # func_arith may be replaced by extended shell implementation + $debug_cmd + $warning_func ${1+"$@"} +} -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` -} # func_len may be replaced by extended shell implementation +## ---------------- ## +## Options parsing. ## +## ---------------- ## + +# Hook in the functions to make sure our own options are parsed during +# the option parsing loop. + +usage='$progpath [OPTION]... [MODE-ARG]...' + +# Short help message in response to '-h'. +usage_message="Options: + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --mode=MODE use operation mode MODE + --no-warnings equivalent to '-Wnone' + --preserve-dup-deps don't remove duplicate dependency libraries + --quiet, --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + -v, --verbose print more informational messages than default + --version print version information + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] + -h, --help, --help-all print short, long, or detailed help message +" -# func_lo2o object -func_lo2o () +# Additional text appended to 'usage_message' in response to '--help'. +func_help () { - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} # func_lo2o may be replaced by extended shell implementation + $debug_cmd + + func_usage_message + $ECHO "$long_help_message + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. When passed as first option, +'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. +Try '$progname --help --mode=MODE' for a more detailed description of MODE. + +When reporting a bug, please describe a test case to reproduce it and +include the following information: + + host-triplet: $host + shell: $SHELL + compiler: $LTCC + compiler flags: $LTCFLAGS + linker: $LD (gnu? $with_gnu_ld) + version: $progname $scriptversion Debian-2.4.6-2.1 + automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` + autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` + +Report bugs to . +GNU libtool home page: . +General help using GNU software: ." + exit 0 +} -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} # func_xform may be replaced by extended shell implementation +# func_lo2o OBJECT-NAME +# --------------------- +# Transform OBJECT-NAME from a '.lo' suffix to the platform specific +# object suffix. + +lo2o=s/\\.lo\$/.$objext/ +o2lo=s/\\.$objext\$/.lo/ + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_lo2o () + { + case $1 in + *.lo) func_lo2o_result=${1%.lo}.$objext ;; + * ) func_lo2o_result=$1 ;; + esac + }' + + # func_xform LIBOBJ-OR-SOURCE + # --------------------------- + # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) + # suffix to a '.lo' libtool-object suffix. + eval 'func_xform () + { + func_xform_result=${1%.*}.lo + }' +else + # ...otherwise fall back to using sed. + func_lo2o () + { + func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` + } + + func_xform () + { + func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` + } +fi -# func_fatal_configuration arg... +# func_fatal_configuration ARG... +# ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { - func_error ${1+"$@"} - func_error "See the $PACKAGE documentation for more information." - func_fatal_error "Fatal configuration error." + func__fatal_error ${1+"$@"} \ + "See the $PACKAGE documentation for more information." \ + "Fatal configuration error." } # func_config +# ----------- # Display the configuration for all the tags in this script. func_config () { @@ -915,17 +2318,19 @@ func_config () exit $? } + # func_features +# ------------- # Display the features supported by this script. func_features () { echo "host: $host" - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" @@ -934,289 +2339,316 @@ func_features () exit $? } -# func_enable_tag tagname + +# func_enable_tag TAGNAME +# ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { - # Global variable: - tagname="$1" + # Global variable: + tagname=$1 - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf="/$re_begincf/,/$re_endcf/p" + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf=/$re_begincf/,/$re_endcf/p - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac } + # func_check_version_match +# ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF - else - cat >&2 <<_LT_EOF + else + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF - fi - else - cat >&2 <<_LT_EOF + fi + else + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF - fi + fi - exit $EXIT_MISMATCH - fi + exit $EXIT_MISMATCH + fi } -# Shorthand for --mode=foo, only valid as the first argument -case $1 in -clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; -compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; -execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; -finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; -install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; -link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; -uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; -esac - +# libtool_options_prep [ARG]... +# ----------------------------- +# Preparation for options parsed by libtool. +libtool_options_prep () +{ + $debug_mode + # Option defaults: + opt_config=false + opt_dlopen= + opt_dry_run=false + opt_help=false + opt_mode= + opt_preserve_dup_deps=false + opt_quiet=false -# Option defaults: -opt_debug=: -opt_dry_run=false -opt_config=false -opt_preserve_dup_deps=false -opt_features=false -opt_finish=false -opt_help=false -opt_help_all=false -opt_silent=: -opt_warning=: -opt_verbose=: -opt_silent=false -opt_verbose=false + nonopt= + preserve_args= + _G_rc_lt_options_prep=: -# Parse options once, thoroughly. This comes as soon as possible in the -# script to make things like `--version' happen as quickly as we can. -{ - # this just eases exit handling - while test $# -gt 0; do - opt="$1" - shift - case $opt in - --debug|-x) opt_debug='set -x' - func_echo "enabling shell trace mode" - $opt_debug - ;; - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - --config) - opt_config=: -func_config - ;; - --dlopen|-dlopen) - optarg="$1" - opt_dlopen="${opt_dlopen+$opt_dlopen -}$optarg" - shift - ;; - --preserve-dup-deps) - opt_preserve_dup_deps=: - ;; - --features) - opt_features=: -func_features - ;; - --finish) - opt_finish=: -set dummy --mode finish ${1+"$@"}; shift - ;; - --help) - opt_help=: - ;; - --help-all) - opt_help_all=: -opt_help=': help-all' - ;; - --mode) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_mode="$optarg" -case $optarg in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; -esac - shift - ;; - --no-silent|--no-quiet) - opt_silent=false -func_append preserve_args " $opt" - ;; - --no-warning|--no-warn) - opt_warning=false -func_append preserve_args " $opt" - ;; - --no-verbose) - opt_verbose=false -func_append preserve_args " $opt" - ;; - --silent|--quiet) - opt_silent=: -func_append preserve_args " $opt" - opt_verbose=false - ;; - --verbose|-v) - opt_verbose=: -func_append preserve_args " $opt" -opt_silent=false - ;; - --tag) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_tag="$optarg" -func_append preserve_args " $opt $optarg" -func_enable_tag "$optarg" - shift - ;; - - -\?|-h) func_usage ;; - --help) func_help ;; - --version) func_version ;; - - # Separate optargs to long options: - --*=*) - func_split_long_opt "$opt" - set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-n*|-v*) - func_split_short_opt "$opt" - set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognized option \`$opt'" ;; - *) set dummy "$opt" ${1+"$@"}; shift; break ;; + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + *) + _G_rc_lt_options_prep=false + ;; esac - done - # Validate options: + if $_G_rc_lt_options_prep; then + # Pass back the list of options. + func_quote eval ${1+"$@"} + libtool_options_prep_result=$func_quote_result + fi - # save first non-option argument - if test "$#" -gt 0; then - nonopt="$opt" - shift - fi + $_G_rc_lt_options_prep +} +func_add_hook func_options_prep libtool_options_prep - # preserve --debug - test "$opt_debug" = : || func_append preserve_args " --debug" - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac +# libtool_parse_options [ARG]... +# --------------------------------- +# Provide handling for libtool specific options. +libtool_parse_options () +{ + $debug_cmd + + _G_rc_lt_parse_options=false - $opt_help || { - # Sanity checks first: - func_check_version_match + # Perform our own loop to consume as many options as possible in + # each iteration. + while test $# -gt 0; do + _G_match_lt_parse_options=: + _G_opt=$1 + shift + case $_G_opt in + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + + --config) func_config ;; + + --dlopen|-dlopen) + opt_dlopen="${opt_dlopen+$opt_dlopen +}$1" + shift + ;; + + --preserve-dup-deps) + opt_preserve_dup_deps=: ;; + + --features) func_features ;; + + --finish) set dummy --mode finish ${1+"$@"}; shift ;; + + --help) opt_help=: ;; + + --help-all) opt_help=': help-all' ;; + + --mode) test $# = 0 && func_missing_arg $_G_opt && break + opt_mode=$1 + case $1 in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $_G_opt" + exit_cmd=exit + break + ;; + esac + shift + ;; + + --no-silent|--no-quiet) + opt_quiet=false + func_append preserve_args " $_G_opt" + ;; + + --no-warnings|--no-warning|--no-warn) + opt_warning=false + func_append preserve_args " $_G_opt" + ;; + + --no-verbose) + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --silent|--quiet) + opt_quiet=: + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --tag) test $# = 0 && func_missing_arg $_G_opt && break + opt_tag=$1 + func_append preserve_args " $_G_opt $1" + func_enable_tag "$1" + shift + ;; + + --verbose|-v) opt_quiet=false + opt_verbose=: + func_append preserve_args " $_G_opt" + ;; + + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"} ; shift + _G_match_lt_parse_options=false + break + ;; + esac + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: + done - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" + if $_G_rc_lt_parse_options; then + # save modified positional parameters for caller + func_quote eval ${1+"$@"} + libtool_parse_options_result=$func_quote_result fi - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" + $_G_rc_lt_parse_options +} +func_add_hook func_parse_options libtool_parse_options + + - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test "$opt_mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE +# libtool_validate_options [ARG]... +# --------------------------------- +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +libtool_validate_options () +{ + # save first non-option argument + if test 0 -lt $#; then + nonopt=$1 + shift fi - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$opt_mode' for more information." - } + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" + + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + test yes != "$build_libtool_libs" \ + && test yes != "$build_old_libs" \ + && func_fatal_configuration "not configured to build any kind of library" - # Bail if the options were screwed - $exit_cmd $EXIT_FAILURE + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test execute != "$opt_mode"; then + func_error "unrecognized option '-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help=$help + help="Try '$progname --help --mode=$opt_mode' for more information." + } + + # Pass back the unparsed argument list + func_quote eval ${1+"$@"} + libtool_validate_options_result=$func_quote_result } +func_add_hook func_validate_options libtool_validate_options + +# Process options as early as possible so that --help and --version +# can return quickly. +func_options ${1+"$@"} +eval set dummy "$func_options_result"; shift @@ -1224,24 +2656,52 @@ func_enable_tag "$optarg" ## Main. ## ## ----------- ## +magic='%%%MAGIC variable%%%' +magic_exe='%%%MAGIC EXE variable%%%' + +# Global variables. +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# func_generated_by_libtool +# True iff stdin has been generated by Libtool. This function is only +# a basic sanity check; it will hardly flush out determined imposters. +func_generated_by_libtool_p () +{ + $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + # func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. +# True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 + $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. +# True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. +# fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no @@ -1249,13 +2709,13 @@ func_lalib_unsafe_p () for lalib_p_l in 1 2 3 4 do read lalib_p_line - case "$lalib_p_line" in + case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi - test "$lalib_p" = yes + test yes = "$lalib_p" } # func_ltwrapper_script_p file @@ -1264,7 +2724,8 @@ func_lalib_unsafe_p () # determined imposters. func_ltwrapper_script_p () { - func_lalib_p "$1" + test -f "$1" && + $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file @@ -1289,7 +2750,7 @@ func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file @@ -1308,11 +2769,13 @@ func_ltwrapper_p () # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { - $opt_debug + $debug_cmd + save_ifs=$IFS; IFS='~' for cmd in $1; do - IFS=$save_ifs + IFS=$sp$nl eval cmd=\"$cmd\" + IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs @@ -1324,10 +2787,11 @@ func_execute_cmds () # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. +# 'FILE.' does not work on cygwin managed mounts. func_source () { - $opt_debug + $debug_cmd + case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; @@ -1354,10 +2818,10 @@ func_resolve_sysroot () # store the result into func_replace_sysroot_result. func_replace_sysroot () { - case "$lt_sysroot:$1" in + case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result="=$func_stripname_result" + func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. @@ -1374,7 +2838,8 @@ func_replace_sysroot () # arg is usually of the form 'gcc ...' func_infer_tag () { - $opt_debug + $debug_cmd + if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do @@ -1393,7 +2858,7 @@ func_infer_tag () for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. @@ -1418,7 +2883,7 @@ func_infer_tag () # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" + func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi @@ -1434,15 +2899,15 @@ func_infer_tag () # but don't create it if we're doing a dry run. func_write_libtool_object () { - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' + write_libobj=$1 + if test yes = "$build_libtool_libs"; then + write_lobj=\'$2\' else write_lobj=none fi - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' + if test yes = "$build_old_libs"; then + write_oldobj=\'$3\' else write_oldobj=none fi @@ -1450,7 +2915,7 @@ func_write_libtool_object () $opt_dry_run || { cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$lt_sed_naive_backslashify"` + $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi @@ -1514,18 +2980,19 @@ func_convert_core_file_wine_to_w32 () # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { - $opt_debug + $debug_cmd + # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result="" + func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi @@ -1554,7 +3021,8 @@ func_convert_core_path_wine_to_w32 () # environment variable; do not put it in $PATH. func_cygpath () { - $opt_debug + $debug_cmd + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then @@ -1563,7 +3031,7 @@ func_cygpath () fi else func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath @@ -1574,10 +3042,11 @@ func_cygpath () # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { - $opt_debug + $debug_cmd + # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` + $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 @@ -1588,13 +3057,14 @@ func_convert_core_msys_to_w32 () # func_to_host_file_result to ARG1). func_convert_file_check () { - $opt_debug - if test -z "$2" && test -n "$1" ; then + $debug_cmd + + if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" - func_error " \`$1'" + func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: - func_to_host_file_result="$1" + func_to_host_file_result=$1 fi } # end func_convert_file_check @@ -1606,10 +3076,11 @@ func_convert_file_check () # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { - $opt_debug + $debug_cmd + if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" - func_error " \`$3'" + func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. @@ -1618,7 +3089,7 @@ func_convert_path_check () func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else - func_to_host_path_result="$3" + func_to_host_path_result=$3 fi fi } @@ -1630,9 +3101,10 @@ func_convert_path_check () # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { - $opt_debug + $debug_cmd + case $4 in - $1 ) func_to_host_path_result="$3$func_to_host_path_result" + $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in @@ -1646,7 +3118,7 @@ func_convert_path_front_back_pathsep () ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## -# invoked via `$to_host_file_cmd ARG' +# invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. @@ -1657,7 +3129,8 @@ func_convert_path_front_back_pathsep () # in func_to_host_file_result. func_to_host_file () { - $opt_debug + $debug_cmd + $to_host_file_cmd "$1" } # end func_to_host_file @@ -1669,7 +3142,8 @@ func_to_host_file () # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { - $opt_debug + $debug_cmd + case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 @@ -1687,7 +3161,7 @@ func_to_tool_file () # Copy ARG to func_to_host_file_result. func_convert_file_noop () { - func_to_host_file_result="$1" + func_to_host_file_result=$1 } # end func_convert_file_noop @@ -1698,11 +3172,12 @@ func_convert_file_noop () # func_to_host_file_result. func_convert_file_msys_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" - func_to_host_file_result="$func_convert_core_msys_to_w32_result" + func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1714,8 +3189,9 @@ func_convert_file_msys_to_w32 () # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. @@ -1731,11 +3207,12 @@ func_convert_file_cygwin_to_w32 () # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1747,12 +3224,13 @@ func_convert_file_nix_to_w32 () # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result="$func_cygpath_result" + func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1765,13 +3243,14 @@ func_convert_file_msys_to_cygwin () # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result="$func_cygpath_result" + func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1781,7 +3260,7 @@ func_convert_file_nix_to_cygwin () ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# -# invoked via `$to_host_path_cmd ARG' +# invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. @@ -1805,10 +3284,11 @@ func_convert_file_nix_to_cygwin () to_host_path_cmd= func_init_to_host_path_cmd () { - $opt_debug + $debug_cmd + if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd="func_convert_path_${func_stripname_result}" + to_host_path_cmd=func_convert_path_$func_stripname_result fi } @@ -1818,7 +3298,8 @@ func_init_to_host_path_cmd () # in func_to_host_path_result. func_to_host_path () { - $opt_debug + $debug_cmd + func_init_to_host_path_cmd $to_host_path_cmd "$1" } @@ -1829,7 +3310,7 @@ func_to_host_path () # Copy ARG to func_to_host_path_result. func_convert_path_noop () { - func_to_host_path_result="$1" + func_to_host_path_result=$1 } # end func_convert_path_noop @@ -1840,8 +3321,9 @@ func_convert_path_noop () # func_to_host_path_result. func_convert_path_msys_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; @@ -1849,7 +3331,7 @@ func_convert_path_msys_to_w32 () func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" @@ -1863,8 +3345,9 @@ func_convert_path_msys_to_w32 () # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" @@ -1883,14 +3366,15 @@ func_convert_path_cygwin_to_w32 () # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" @@ -1904,15 +3388,16 @@ func_convert_path_nix_to_w32 () # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result="$func_cygpath_result" + func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" @@ -1927,8 +3412,9 @@ func_convert_path_msys_to_cygwin () # func_to_host_file_result. func_convert_path_nix_to_cygwin () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them @@ -1937,7 +3423,7 @@ func_convert_path_nix_to_cygwin () func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result="$func_cygpath_result" + func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" @@ -1946,13 +3432,31 @@ func_convert_path_nix_to_cygwin () # end func_convert_path_nix_to_cygwin +# func_dll_def_p FILE +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with _LT_DLL_DEF_P in libtool.m4 +func_dll_def_p () +{ + $debug_cmd + + func_dll_def_p_tmp=`$SED -n \ + -e 's/^[ ]*//' \ + -e '/^\(;.*\)*$/d' \ + -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ + -e q \ + "$1"` + test DEF = "$func_dll_def_p_tmp" +} + + # func_mode_compile arg... func_mode_compile () { - $opt_debug + $debug_cmd + # Get the compilation command and the source file. base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" + srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal @@ -1965,12 +3469,12 @@ func_mode_compile () case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile - lastarg="$arg" + lastarg=$arg arg_mode=normal ;; target ) - libobj="$arg" + libobj=$arg arg_mode=normal continue ;; @@ -1980,7 +3484,7 @@ func_mode_compile () case $arg in -o) test -n "$libobj" && \ - func_fatal_error "you cannot specify \`-o' more than once" + func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; @@ -2009,12 +3513,12 @@ func_mode_compile () func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for arg in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_append_quoted lastarg "$arg" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result @@ -2027,8 +3531,8 @@ func_mode_compile () # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # - lastarg="$srcfile" - srcfile="$arg" + lastarg=$srcfile + srcfile=$arg ;; esac # case $arg ;; @@ -2043,13 +3547,13 @@ func_mode_compile () func_fatal_error "you must specify an argument for -Xcompile" ;; target) - func_fatal_error "you must specify a target with \`-o'" + func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" - libobj="$func_basename_result" + libobj=$func_basename_result } ;; esac @@ -2069,7 +3573,7 @@ func_mode_compile () case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) - func_fatal_error "cannot determine name of library object from \`$libobj'" + func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac @@ -2078,8 +3582,8 @@ func_mode_compile () for arg in $later; do case $arg in -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" + test yes = "$build_libtool_libs" \ + || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; @@ -2102,20 +3606,20 @@ func_mode_compile () esac done - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ + func_quote_arg pretty "$libobj" + test "X$libobj" != "X$func_quote_arg_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." + && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname + objname=$func_basename_result + xdir=$func_dirname_result + lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" @@ -2127,16 +3631,16 @@ func_mode_compile () pic_mode=default ;; esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" + if test no = "$compiler_c_o"; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext + lockfile=$output_obj.lock else output_obj= need_locks=no @@ -2145,12 +3649,12 @@ func_mode_compile () # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then + if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done - elif test "$need_locks" = warn; then + elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: @@ -2158,7 +3662,7 @@ func_mode_compile () This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2176,15 +3680,15 @@ compiler." func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result + func_quote_arg pretty "$srcfile" + qsrcfile=$func_quote_arg_result # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile - if test "$pic_mode" != no; then + if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code @@ -2201,7 +3705,7 @@ compiler." func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - if test "$need_locks" = warn && + if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -2212,7 +3716,7 @@ $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2228,20 +3732,20 @@ compiler." fi # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then + if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then + if test yes = "$build_old_libs"; then + if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi - if test "$compiler_c_o" = yes; then + if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi @@ -2250,7 +3754,7 @@ compiler." func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - if test "$need_locks" = warn && + if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -2261,7 +3765,7 @@ $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2281,7 +3785,7 @@ compiler." func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked - if test "$need_locks" != no; then + if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi @@ -2291,7 +3795,7 @@ compiler." } $opt_help || { - test "$opt_mode" = compile && func_mode_compile ${1+"$@"} + test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () @@ -2311,7 +3815,7 @@ func_mode_help () Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated @@ -2330,16 +3834,16 @@ This mode accepts the following additional options: -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking + -shared do not build a '.o' file suitable for static linking + -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler -COMPILE-COMMAND is a command to be used in creating a \`standard' object file +COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." +SOURCEFILE, then substituting the C source code suffix '.c' with the +library object suffix, '.lo'." ;; execute) @@ -2352,7 +3856,7 @@ This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path -This mode sets the library path environment variable according to \`-dlopen' +This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated @@ -2371,7 +3875,7 @@ Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." +the '--dry-run' option if you just want to see what would be executed." ;; install) @@ -2381,7 +3885,7 @@ the \`--dry-run' option if you just want to see what would be executed." Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. +either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: @@ -2407,7 +3911,7 @@ The following components of LINK-COMMAND are treated specially: -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE @@ -2421,7 +3925,8 @@ The following components of LINK-COMMAND are treated specially: -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects + -objectlist FILE use a list of object files found in FILE to specify objects + -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information @@ -2441,20 +3946,20 @@ The following components of LINK-COMMAND are treated specially: -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) -All other options (arguments beginning with \`-') are ignored. +All other options (arguments beginning with '-') are ignored. -Every other argument is treated as a filename. Files ending in \`.la' are +Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is +If the OUTPUT-FILE ends in '.la', then a libtool library is created, +only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. +If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created +using 'ar' and 'ranlib', or on Windows using 'lib'. -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; @@ -2465,7 +3970,7 @@ is created, otherwise an executable program is created." Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. @@ -2473,17 +3978,17 @@ Otherwise, only FILE itself is deleted using RM." ;; *) - func_fatal_help "invalid operation mode \`$opt_mode'" + func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo - $ECHO "Try \`$progname --help' for more information about other modes." + $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then - if test "$opt_help" = :; then + if test : = "$opt_help"; then func_mode_help else { @@ -2491,7 +3996,7 @@ if $opt_help; then for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done - } | sed -n '1p; 2,$s/^Usage:/ or: /p' + } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do @@ -2499,7 +4004,7 @@ if $opt_help; then func_mode_help done } | - sed '1d + $SED '1d /^When reporting/,/^Report/{ H d @@ -2516,16 +4021,17 @@ fi # func_mode_execute arg... func_mode_execute () { - $opt_debug + $debug_cmd + # The first argument is the command name. - cmd="$nonopt" + cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ - || func_fatal_help "\`$file' is not a file" + || func_fatal_help "'$file' is not a file" dir= case $file in @@ -2535,7 +4041,7 @@ func_mode_execute () # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" + || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= @@ -2546,18 +4052,18 @@ func_mode_execute () if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" + func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; @@ -2565,18 +4071,18 @@ func_mode_execute () *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result ;; *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" + test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then @@ -2588,7 +4094,7 @@ func_mode_execute () # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. - libtool_execute_magic="$magic" + libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= @@ -2601,12 +4107,12 @@ func_mode_execute () if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. - file="$progdir/$program" + file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. - file="$progdir/$program" + file=$progdir/$program fi ;; esac @@ -2614,7 +4120,15 @@ func_mode_execute () func_append_quoted args "$file" done - if test "X$opt_dry_run" = Xfalse; then + if $opt_dry_run; then + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" @@ -2631,25 +4145,18 @@ func_mode_execute () done # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS + exec_cmd=\$cmd$args fi } -test "$opt_mode" = execute && func_mode_execute ${1+"$@"} +test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { - $opt_debug + $debug_cmd + libs= libdirs= admincmds= @@ -2663,11 +4170,11 @@ func_mode_finish () if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else - func_warning "\`$opt' is not a valid libtool archive" + func_warning "'$opt' is not a valid libtool archive" fi else - func_fatal_error "invalid argument \`$opt'" + func_fatal_error "invalid argument '$opt'" fi done @@ -2682,12 +4189,12 @@ func_mode_finish () # Remove sysroot references if $opt_dry_run; then for lib in $libs; do - echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do - sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done @@ -2712,7 +4219,7 @@ func_mode_finish () fi # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS + $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" @@ -2723,27 +4230,27 @@ func_mode_finish () echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" - $ECHO " - use the \`$flag' linker flag" + $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo @@ -2762,21 +4269,23 @@ func_mode_finish () exit $EXIT_SUCCESS } -test "$opt_mode" = finish && func_mode_finish ${1+"$@"} +test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { - $opt_debug + $debug_cmd + # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac; then + case $nonopt in *shtool*) :;; *) false;; esac + then # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " + func_quote_arg pretty "$nonopt" + install_prog="$func_quote_arg_result " arg=$1 shift else @@ -2786,8 +4295,8 @@ func_mode_install () # The real first argument should be the name of the installation program. # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" + func_quote_arg pretty "$arg" + func_append install_prog "$func_quote_arg_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; @@ -2800,7 +4309,7 @@ func_mode_install () opts= prev= install_type= - isdir=no + isdir=false stripme= no_mode=: for arg @@ -2813,7 +4322,7 @@ func_mode_install () fi case $arg in - -d) isdir=yes ;; + -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg @@ -2831,7 +4340,7 @@ func_mode_install () *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then - if test "x$prev" = x-m && test -n "$install_override_mode"; then + if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi @@ -2844,24 +4353,24 @@ func_mode_install () esac # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" + func_quote_arg pretty "$arg" + func_append install_prog " $func_quote_arg_result" if test -n "$arg2"; then - func_quote_for_eval "$arg2" + func_quote_arg pretty "$arg2" fi - func_append install_shared_prog " $func_quote_for_eval_result" + func_append install_shared_prog " $func_quote_arg_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" + func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" + func_quote_arg pretty "$install_override_mode" + func_append install_shared_prog " -m $func_quote_arg_result" fi fi @@ -2878,19 +4387,19 @@ func_mode_install () dest=$func_stripname_result # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" + test -d "$dest" && isdir=: + if $isdir; then + destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" + destdir=$func_dirname_result + destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" + func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; @@ -2899,7 +4408,7 @@ func_mode_install () case $file in *.lo) ;; *) - func_fatal_help "\`$destdir' must be an absolute directory name" + func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done @@ -2908,7 +4417,7 @@ func_mode_install () # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic="$magic" + libtool_install_magic=$magic staticlibs= future_libdirs= @@ -2928,7 +4437,7 @@ func_mode_install () # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" + || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= @@ -2950,7 +4459,7 @@ func_mode_install () fi func_dirname "$file" "/" "" - dir="$func_dirname_result" + dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then @@ -2964,7 +4473,7 @@ func_mode_install () # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. @@ -2973,29 +4482,36 @@ func_mode_install () relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi - func_warning "relinking \`$file'" + func_warning "relinking '$file'" func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then - realname="$1" + realname=$1 shift - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T + srcname=$realname + test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' - tstripme="$stripme" + tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) - tstripme="" + tstripme= + ;; + esac + ;; + os2*) + case $realname in + *_dll.a) + tstripme= ;; esac ;; @@ -3006,7 +4522,7 @@ func_mode_install () if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on + # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname @@ -3017,14 +4533,14 @@ func_mode_install () fi # Do each command in the postinstall commands. - lib="$destdir/$realname" + lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i + name=$func_basename_result + instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. @@ -3036,11 +4552,11 @@ func_mode_install () # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile="$destdir/$destname" + destfile=$destdir/$destname else func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + destfile=$func_basename_result + destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. @@ -3050,11 +4566,11 @@ func_mode_install () staticdest=$func_lo2o_result ;; *.$objext) - staticdest="$destfile" + staticdest=$destfile destfile= ;; *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" + func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac @@ -3063,7 +4579,7 @@ func_mode_install () func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result @@ -3075,23 +4591,23 @@ func_mode_install () *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile="$destdir/$destname" + destfile=$destdir/$destname else func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + destfile=$func_basename_result + destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install - stripped_ext="" + stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result - stripped_ext=".exe" + stripped_ext=.exe fi ;; esac @@ -3119,19 +4635,19 @@ func_mode_install () # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" + func_fatal_error "invalid libtool wrapper script '$wrapper'" - finalize=yes + finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi - libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no + func_warning "'$lib' has not been installed in '$libdir'" + finalize=false fi done @@ -3139,29 +4655,29 @@ func_mode_install () func_source "$wrapper" outputname= - if test "$fast_install" = no && test -n "$relink_command"; then + if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { - if test "$finalize" = yes; then + if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" + file=$func_basename_result + outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" + $opt_quiet || { + func_quote_arg expand,pretty "$relink_command" + eval "func_echo $func_quote_arg_result" } if eval "$relink_command"; then : else - func_error "error: relink \`$file' with the above command before installing it" + func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi - file="$outputname" + file=$outputname else - func_warning "cannot relink \`$file'" + func_warning "cannot relink '$file'" fi } else @@ -3198,10 +4714,10 @@ func_mode_install () for file in $staticlibs; do func_basename "$file" - name="$func_basename_result" + name=$func_basename_result # Set up the ranlib parameters. - oldlib="$destdir/$name" + oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result @@ -3216,18 +4732,18 @@ func_mode_install () done test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" + func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } -test "$opt_mode" = install && func_mode_install ${1+"$@"} +test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p @@ -3235,16 +4751,17 @@ test "$opt_mode" = install && func_mode_install ${1+"$@"} # a dlpreopen symbol table. func_generate_dlsyms () { - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + $debug_cmd + + my_outputname=$1 + my_originator=$2 + my_pic_p=${3-false} + my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" + my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi @@ -3255,7 +4772,7 @@ func_generate_dlsyms () "") ;; *.c) # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" + nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" @@ -3263,34 +4780,36 @@ func_generate_dlsyms () func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ +/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif -#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + /* External symbol declarations for the compiler. */\ " - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" + if test yes = "$dlself"; then + func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" @@ -3298,7 +4817,7 @@ extern \"C\" { progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done @@ -3318,10 +4837,10 @@ extern \"C\" { # Prepare the list of exported symbols if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" + export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' @@ -3331,7 +4850,7 @@ extern \"C\" { } else $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in @@ -3345,22 +4864,22 @@ extern \"C\" { fi for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" + func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" - name="$func_basename_result" + name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename="" + dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname" ; then + if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" - dlprefile_dlbasename="$func_basename_result" + dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" @@ -3368,7 +4887,7 @@ extern \"C\" { fi fi $opt_dry_run || { - if test -n "$dlprefile_dlbasename" ; then + if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" @@ -3424,6 +4943,11 @@ extern \"C\" { echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi + func_show_eval '$RM "${nlist}I"' + if test -n "$global_symbol_to_import"; then + eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' + fi + echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ @@ -3432,11 +4956,30 @@ typedef struct { void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; +lt_${my_prefix}_LTX_preloaded_symbols[];\ +" + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ +static void lt_syminit(void) +{ + LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; + for (; symbol->name; ++symbol) + {" + $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" + echo >> "$output_objdir/$my_dlsyms" "\ + } +}" + fi + echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," +{ {\"$my_originator\", (void *) 0}," + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ + {\"@INIT@\", (void *) <_syminit}," + fi case $need_lib_prefix in no) @@ -3478,9 +5021,7 @@ static const void *lt_preloaded_setup() { *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi + $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; @@ -3497,10 +5038,10 @@ static const void *lt_preloaded_setup() { func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" + symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then @@ -3518,7 +5059,7 @@ static const void *lt_preloaded_setup() { esac ;; *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" + func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else @@ -3532,6 +5073,32 @@ static const void *lt_preloaded_setup() { fi } +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + # func_win32_libid arg # return the library type of file 'arg' # @@ -3541,8 +5108,9 @@ static const void *lt_preloaded_setup() { # Despite the name, also deal with 64 bit binaries. func_win32_libid () { - $opt_debug - win32_libid_type="unknown" + $debug_cmd + + win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import @@ -3552,16 +5120,29 @@ func_win32_libid () # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' + case $nm_interface in + "MS dumpbin") + if func_cygming_ms_implib_p "$1" || + func_cygming_gnu_implib_p "$1" + then + win32_nmres=import + else + win32_nmres= + fi + ;; + *) + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' 1,100{ / I /{ - s,.*,import, + s|.*|import| p q } }'` + ;; + esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; @@ -3593,7 +5174,8 @@ func_win32_libid () # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { - $opt_debug + $debug_cmd + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } @@ -3610,7 +5192,8 @@ func_cygming_dll_for_implib () # specified import library. func_cygming_dll_for_implib_fallback_core () { - $opt_debug + $debug_cmd + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ @@ -3646,8 +5229,8 @@ func_cygming_dll_for_implib_fallback_core () /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the - # archive which possess that section. Heuristic: eliminate - # all those which have a first or second character that is + # archive that possess that section. Heuristic: eliminate + # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually @@ -3658,30 +5241,6 @@ func_cygming_dll_for_implib_fallback_core () $SED -e '/^\./d;/^.\./d;q' } -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified @@ -3695,16 +5254,17 @@ func_cygming_ms_implib_p () # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { - $opt_debug - if func_cygming_gnu_implib_p "$1" ; then + $debug_cmd + + if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1" ; then + elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown - sharedlib_from_linklib_result="" + sharedlib_from_linklib_result= fi } @@ -3712,10 +5272,11 @@ func_cygming_dll_for_implib_fallback () # func_extract_an_archive dir oldlib func_extract_an_archive () { - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - if test "$lock_old_archive_extraction" = yes; then + $debug_cmd + + f_ex_an_ar_dir=$1; shift + f_ex_an_ar_oldlib=$1 + if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" @@ -3724,7 +5285,7 @@ func_extract_an_archive () fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' - if test "$lock_old_archive_extraction" = yes; then + if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then @@ -3738,22 +5299,23 @@ func_extract_an_archive () # func_extract_archives gentop oldlib ... func_extract_archives () { - $opt_debug - my_gentop="$1"; shift + $debug_cmd + + my_gentop=$1; shift my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" + my_oldobjs= + my_xlib= + my_xabs= + my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" - my_xlib="$func_basename_result" + my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in @@ -3765,7 +5327,7 @@ func_extract_archives () esac done extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" + my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" @@ -3778,22 +5340,23 @@ func_extract_archives () cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` + func_basename "$darwin_archive" + darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" + for darwin_arch in $darwin_arches; do + func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" + $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" + cd "unfat-$$/$darwin_base_archive-$darwin_arch" + func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do @@ -3815,7 +5378,7 @@ func_extract_archives () my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done - func_extract_archives_result="$my_oldobjs" + func_extract_archives_result=$my_oldobjs } @@ -3830,7 +5393,7 @@ func_extract_archives () # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is +# will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () @@ -3841,7 +5404,7 @@ func_emit_wrapper () #! $SHELL # $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. @@ -3883,7 +5446,8 @@ else if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + func_quote_arg pretty "$ECHO" + qECHO=$func_quote_arg_result $ECHO "\ # A function that is used when there is no print builtin or printf. @@ -3893,14 +5457,14 @@ func_fallback_echo () \$1 _LTECHO_EOF' } - ECHO=\"$qECHO\" + ECHO=$qECHO fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on +# /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options which match +# (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and @@ -3933,7 +5497,7 @@ func_parse_lt_options () # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then - echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } @@ -3944,7 +5508,7 @@ func_lt_dump_args () lt_dump_args_N=1; for lt_arg do - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } @@ -3958,7 +5522,7 @@ func_exec_program_core () *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} @@ -3968,7 +5532,7 @@ func_exec_program_core () *) $ECHO "\ if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} @@ -4043,13 +5607,13 @@ func_exec_program () test -n \"\$absdir\" && thisdir=\"\$absdir\" " - if test "$fast_install" = yes; then + if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" @@ -4066,7 +5630,7 @@ func_exec_program () if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else - $ECHO \"\$relink_command_output\" >&2 + \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi @@ -4101,7 +5665,7 @@ func_exec_program () fi # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" @@ -4121,7 +5685,7 @@ func_exec_program () fi else # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 @@ -4140,7 +5704,7 @@ func_emit_cwrapperexe_src () cat < #include +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + /* declarations of non-ANSI functions */ -#if defined(__MINGW32__) +#if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif -#elif defined(__CYGWIN__) +#elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif -/* #elif defined (other platforms) ... */ +/* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ -#if defined(_MSC_VER) +#if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC -# ifndef _INTPTR_T_DEFINED -# define _INTPTR_T_DEFINED -# define intptr_t int -# endif -#elif defined(__MINGW32__) +#elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv -#elif defined(__CYGWIN__) +#elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" -/* #elif defined (other platforms) ... */ +/* #elif defined other platforms ... */ #endif -#if defined(PATH_MAX) +#if defined PATH_MAX # define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) +#elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 @@ -4234,8 +5796,8 @@ int setenv (const char *, const char *, int); # define PATH_SEPARATOR ':' #endif -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) +#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ + defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 @@ -4268,10 +5830,10 @@ int setenv (const char *, const char *, int); #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ + if (stale) { free (stale); stale = 0; } \ } while (0) -#if defined(LT_DEBUGWRAPPER) +#if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; @@ -4300,11 +5862,16 @@ void lt_dump_script (FILE *f); EOF cat < 0) && IS_PATH_SEPARATOR (new_value[len-1])) + size_t len = strlen (new_value); + while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { - new_value[len-1] = '\0'; + new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); @@ -5082,27 +6649,47 @@ EOF # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { - $opt_debug + $debug_cmd + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } +# func_suncc_cstd_abi +# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! +# Several compiler flags select an ABI that is incompatible with the +# Cstd library. Avoid specifying it if any are in CXXFLAGS. +func_suncc_cstd_abi () +{ + $debug_cmd + + case " $compile_command " in + *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) + suncc_use_cstd_abi=no + ;; + *) + suncc_use_cstd_abi=yes + ;; + esac +} + # func_mode_link arg... func_mode_link () { - $opt_debug + $debug_cmd + case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra + # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not + # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. @@ -5146,10 +6733,11 @@ func_mode_link () module=no no_install=no objs= + os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no - preload=no + preload=false prev= prevarg= release= @@ -5161,7 +6749,7 @@ func_mode_link () vinfo= vinfo_number=no weak_libs= - single_module="${wl}-single_module" + single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. @@ -5169,15 +6757,15 @@ func_mode_link () do case $arg in -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" + test yes != "$build_libtool_libs" \ + && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then @@ -5210,11 +6798,11 @@ func_mode_link () # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do - arg="$1" + arg=$1 shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" + func_quote_arg pretty,unquoted "$arg" + qarg=$func_quote_arg_unquoted_result + func_append libtool_args " $func_quote_arg_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then @@ -5227,21 +6815,21 @@ func_mode_link () case $prev in bindir) - bindir="$arg" + bindir=$arg prev= continue ;; dlfiles|dlprefiles) - if test "$preload" = no; then + $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" - preload=yes - fi + preload=: + } case $arg in *.la | *.lo) ;; # We handle these cases below. force) - if test "$dlself" = no; then + if test no = "$dlself"; then dlself=needless export_dynamic=yes fi @@ -5249,9 +6837,9 @@ func_mode_link () continue ;; self) - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless @@ -5261,7 +6849,7 @@ func_mode_link () continue ;; *) - if test "$prev" = dlfiles; then + if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" @@ -5272,14 +6860,14 @@ func_mode_link () esac ;; expsyms) - export_symbols="$arg" + export_symbols=$arg test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" + || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) - export_symbols_regex="$arg" + export_symbols_regex=$arg prev= continue ;; @@ -5297,7 +6885,13 @@ func_mode_link () continue ;; inst_prefix) - inst_prefix_dir="$arg" + inst_prefix_dir=$arg + prev= + continue + ;; + mllvm) + # Clang does not use LLVM to link, so we can simply discard any + # '-mllvm $arg' options when doing the link step. prev= continue ;; @@ -5321,21 +6915,21 @@ func_mode_link () if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result - if test "$pic_object" != none; then + if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + pic_object=$xdir$pic_object - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue @@ -5346,7 +6940,7 @@ func_mode_link () fi # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= @@ -5354,23 +6948,23 @@ func_mode_link () # A PIC object. func_append libobjs " $pic_object" - arg="$pic_object" + arg=$pic_object fi # Non-PIC object. - if test "$non_pic_object" != none; then + if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" + non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" + non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else @@ -5378,7 +6972,7 @@ func_mode_link () if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -5386,24 +6980,29 @@ func_mode_link () func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "\`$arg' is not a valid libtool object" + func_fatal_error "'$arg' is not a valid libtool object" fi fi done else - func_fatal_error "link input file \`$arg' does not exist" + func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; + os2dllname) + os2dllname=$arg + prev= + continue + ;; precious_regex) - precious_files_regex="$arg" + precious_files_regex=$arg prev= continue ;; release) - release="-$arg" + release=-$arg prev= continue ;; @@ -5415,7 +7014,7 @@ func_mode_link () func_fatal_error "only absolute run-paths are allowed" ;; esac - if test "$prev" = rpath; then + if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; @@ -5430,7 +7029,7 @@ func_mode_link () continue ;; shrext) - shrext_cmds="$arg" + shrext_cmds=$arg prev= continue ;; @@ -5470,7 +7069,7 @@ func_mode_link () esac fi # test -n "$prev" - prevarg="$arg" + prevarg=$arg case $arg in -all-static) @@ -5484,7 +7083,7 @@ func_mode_link () -allow-undefined) # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" + func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) @@ -5516,7 +7115,7 @@ func_mode_link () if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi - if test "X$arg" = "X-export-symbols"; then + if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex @@ -5550,9 +7149,9 @@ func_mode_link () func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" + func_fatal_error "require no space between '-L' and '$1'" else - func_fatal_error "need path for \`-L' option" + func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" @@ -5563,8 +7162,8 @@ func_mode_link () *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" + func_fatal_error "cannot determine absolute directory name of '$dir'" + dir=$absdir ;; esac case "$deplibs " in @@ -5599,7 +7198,7 @@ func_mode_link () ;; -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) @@ -5607,11 +7206,11 @@ func_mode_link () ;; *-*-os2*) # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework @@ -5620,16 +7219,16 @@ func_mode_link () ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; esac - elif test "X$arg" = "X-lc_r"; then + elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -5639,6 +7238,11 @@ func_mode_link () continue ;; + -mllvm) + prev=mllvm + continue + ;; + -module) module=yes continue @@ -5668,7 +7272,7 @@ func_mode_link () ;; -multi_module) - single_module="${wl}-multi_module" + single_module=$wl-multi_module continue ;; @@ -5682,8 +7286,8 @@ func_mode_link () *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" + func_warning "'-no-install' is ignored for $host" + func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; @@ -5701,6 +7305,11 @@ func_mode_link () continue ;; + -os2dllname) + prev=os2dllname + continue + ;; + -o) prev=output ;; -precious-files-regex) @@ -5788,14 +7397,14 @@ func_mode_link () func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" + IFS=$save_ifs + func_quote_arg pretty "$flag" + func_append arg " $func_quote_arg_result" + func_append compiler_flags " $func_quote_arg_result" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -5804,15 +7413,15 @@ func_mode_link () func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" + IFS=$save_ifs + func_quote_arg pretty "$flag" + func_append arg " $wl$func_quote_arg_result" + func_append compiler_flags " $wl$func_quote_arg_result" + func_append linker_flags " $func_quote_arg_result" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -5834,8 +7443,8 @@ func_mode_link () # -msg_* for osf cc -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; # Flags to be passed through unchanged, with rationale: @@ -5847,25 +7456,49 @@ func_mode_link () # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support - # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -specs=* GCC specs files + # -stdlib=* select c++ std lib with clang + # -fsanitize=* Clang/GCC memory and address sanitizer -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-flto*|-fwhopr*|-fuse-linker-plugin) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ + -specs=*|-fsanitize=*) + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; + -Z*) + if test os2 = "`expr $host : '.*\(os2\)'`"; then + # OS/2 uses -Zxxx to specify OS/2-specific options + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case $arg in + -Zlinker | -Zstack) + prev=xcompiler + ;; + esac + continue + else + # Otherwise treat like 'Some other compiler flag' below + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result + fi + ;; + # Some other compiler flag. -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; *.$objext) @@ -5886,21 +7519,21 @@ func_mode_link () if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result - if test "$pic_object" != none; then + test none = "$pic_object" || { # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + pic_object=$xdir$pic_object - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue @@ -5911,7 +7544,7 @@ func_mode_link () fi # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= @@ -5919,23 +7552,23 @@ func_mode_link () # A PIC object. func_append libobjs " $pic_object" - arg="$pic_object" - fi + arg=$pic_object + } # Non-PIC object. - if test "$non_pic_object" != none; then + if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" + non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" + non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else @@ -5943,7 +7576,7 @@ func_mode_link () if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -5951,7 +7584,7 @@ func_mode_link () func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "\`$arg' is not a valid libtool object" + func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; @@ -5967,11 +7600,11 @@ func_mode_link () # A libtool-controlled library. func_resolve_sysroot "$arg" - if test "$prev" = dlfiles; then + if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= - elif test "$prev" = dlprefiles; then + elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= @@ -5985,8 +7618,8 @@ func_mode_link () *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; esac # arg @@ -5998,9 +7631,9 @@ func_mode_link () done # argument parsing loop test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" + func_fatal_help "the '$prevarg' option requires an argument" - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -6009,20 +7642,23 @@ func_mode_link () oldlibs= # calculate the name of the file, without its directory func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" + outputname=$func_basename_result + libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` + eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + # Definition is injected by LT_CONFIG during libtool generation. + func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" + func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" + output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. @@ -6045,7 +7681,7 @@ func_mode_link () # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -6053,7 +7689,7 @@ func_mode_link () func_append libs " $deplib" done - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps @@ -6085,7 +7721,7 @@ func_mode_link () case $file in *.la) ;; *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done @@ -6093,7 +7729,7 @@ func_mode_link () prog) compile_deplibs= finalize_deplibs= - alldeplibs=no + alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" @@ -6105,29 +7741,32 @@ func_mode_link () for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then + if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done - deplibs="$tmp_deplibs" + deplibs=$tmp_deplibs fi - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass"; then + libs=$deplibs deplibs= fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + dlopen) libs=$dlfiles ;; + dlpreopen) libs=$dlprefiles ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; esac fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then + if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs @@ -6148,26 +7787,26 @@ func_mode_link () esac done done - libs="$dlprefiles" + libs=$dlprefiles fi - if test "$pass" = dlopen; then + if test dlopen = "$pass"; then # Collect dlpreopened libraries - save_deplibs="$deplibs" + save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= - found=no + found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" - if test "$linkmode" = lib ; then + if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; @@ -6177,13 +7816,13 @@ func_mode_link () continue ;; -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" + if test lib != "$linkmode" && test prog != "$linkmode"; then + func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" @@ -6191,31 +7830,22 @@ func_mode_link () for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" + lib=$searchdir/lib$name$search_ext if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes + if test .la = "$search_ext"; then + found=: else - found=no + found=false fi break 2 fi done done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library + if $found; then + # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then @@ -6223,19 +7853,19 @@ func_mode_link () old_library= func_source "$lib" for l in $old_library $library_names; do - ll="$l" + ll=$l done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no + if test "X$ll" = "X$old_library"; then # only static version available + found=false func_dirname "$lib" "" "." - ladir="$func_dirname_result" + ladir=$func_dirname_result lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi @@ -6244,15 +7874,25 @@ func_mode_link () *) ;; esac fi + else + # deplib doesn't seem to be a libtool library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue fi ;; # -l *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then + if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; @@ -6265,18 +7905,18 @@ func_mode_link () case $linkmode in lib) deplibs="$deplib $deplibs" - test "$pass" = conv && continue + test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi - if test "$pass" = scan; then + if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -6287,13 +7927,13 @@ func_mode_link () func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) - func_warning "\`-L' is ignored for archives/objects" + func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) - if test "$pass" = link; then + if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result @@ -6311,7 +7951,7 @@ func_mode_link () lib=$func_resolve_sysroot_result ;; *.$libext) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi @@ -6322,21 +7962,26 @@ func_mode_link () case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) - valid_a_lib=no + valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes + valid_a_lib=: fi ;; pass_all) - valid_a_lib=yes + valid_a_lib=: ;; esac - if test "$valid_a_lib" != yes; then + if $valid_a_lib; then + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" @@ -6344,18 +7989,13 @@ func_mode_link () echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." - else - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) - if test "$pass" != link; then + if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -6366,10 +8006,10 @@ func_mode_link () esac # linkmode ;; # *.$libext *.lo | *.$objext) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + elif test prog = "$linkmode"; then + if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" @@ -6382,22 +8022,20 @@ func_mode_link () continue ;; %DEPLIBS%) - alldeplibs=yes + alldeplibs=: continue ;; esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi + $found || test -f "$lib" \ + || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" + || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." - ladir="$func_dirname_result" + ladir=$func_dirname_result dlname= dlopen= @@ -6427,36 +8065,36 @@ func_mode_link () done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass" || + { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi - if test "$pass" = conv; then + if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" + func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done + elif test prog != "$linkmode" && test lib != "$linkmode"; then + func_fatal_error "'$lib' is not a convenience library" fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done continue fi # $pass = conv @@ -6464,26 +8102,26 @@ func_mode_link () # Get the name of the library we link against. linklib= if test -n "$old_library" && - { test "$prefer_static_libs" = yes || - test "$prefer_static_libs,$installed" = "built,no"; }; then + { test yes = "$prefer_static_libs" || + test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do - linklib="$l" + linklib=$l done fi if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" + func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi + if test dlopen = "$pass"; then + test -z "$libdir" \ + && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then + test yes != "$dlopen_support" || + test no = "$build_libtool_libs" + then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't @@ -6497,40 +8135,40 @@ func_mode_link () # We need an absolute path. case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" + abs_ladir=$ladir fi ;; esac func_basename "$lib" - laname="$func_basename_result" + laname=$func_basename_result # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then + if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" + func_warning "library '$lib' was moved." + dir=$ladir + absdir=$abs_ladir + libdir=$abs_ladir else - dir="$lt_sysroot$libdir" - absdir="$lt_sysroot$libdir" + dir=$lt_sysroot$libdir + absdir=$lt_sysroot$libdir fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" + dir=$ladir + absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" + dir=$ladir/$objdir + absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi @@ -6539,11 +8177,11 @@ func_mode_link () name=$func_stripname_result # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + if test dlpreopen = "$pass"; then + if test -z "$libdir" && test prog = "$linkmode"; then + func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi - case "$host" in + case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both @@ -6587,9 +8225,9 @@ func_mode_link () if test -z "$libdir"; then # Link the convenience library - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then + elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else @@ -6599,14 +8237,14 @@ func_mode_link () fi - if test "$linkmode" = prog && test "$pass" != link; then + if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes + linkalldeplibs=false + if test no != "$link_all_deplibs" || test -z "$library_names" || + test no = "$build_libtool_libs"; then + linkalldeplibs=: fi tmp_libs= @@ -6618,14 +8256,14 @@ func_mode_link () ;; esac # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then + if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -6635,15 +8273,15 @@ func_mode_link () continue fi # $linkmode = prog... - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || + { { test no = "$prefer_static_libs" || + test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in + case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac @@ -6672,9 +8310,9 @@ func_mode_link () esac fi # $linkmode,$pass = prog,link... - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && + if $alldeplibs && + { test pass_all = "$deplibs_check_method" || + { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue @@ -6683,19 +8321,19 @@ func_mode_link () link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then + if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then + { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in - *cygwin* | *mingw* | *cegcc*) + *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) - if test "$installed" = no; then + if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi @@ -6705,24 +8343,24 @@ func_mode_link () # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" + dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" + dlopenmodule=$dlpremoduletest break fi done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then + if test lib = "$linkmode" && + test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. @@ -6750,43 +8388,43 @@ func_mode_link () # figure out the soname set dummy $library_names shift - realname="$1" + realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then - soname="$dlname" + soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in - *cygwin* | mingw* | *cegcc*) + *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result - versuffix="-$major" + versuffix=-$major ;; esac eval soname=\"$soname_spec\" else - soname="$realname" + soname=$realname fi # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" + soroot=$soname func_basename "$soroot" - soname="$func_basename_result" + soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else - func_verbose "extracting exported symbol list from \`$soname'" + func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" + func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library @@ -6794,58 +8432,58 @@ func_mode_link () linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" - if test "$linkmode" = prog || test "$opt_mode" != relink; then + if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" + if test no = "$hardcode_direct"; then + add=$dir/$linklib case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; + *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; + *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not + # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then + $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then + if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else - add="$dir/$old_library" + add=$dir/$old_library fi elif test -n "$old_library"; then - add="$dir/$old_library" + add=$dir/$old_library fi fi esac - elif test "$hardcode_minus_L" = no; then + elif test no = "$hardcode_minus_L"; then case $host in - *-*-sunos*) add_shlibpath="$dir" ;; + *-*-sunos*) add_shlibpath=$dir ;; esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" + add_dir=-L$dir + add=-l$name + elif test no = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name else lib_linked=no fi ;; relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$absdir" + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$dir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -6854,10 +8492,10 @@ func_mode_link () ;; esac fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name else lib_linked=no fi @@ -6865,7 +8503,7 @@ func_mode_link () *) lib_linked=no ;; esac - if test "$lib_linked" != yes; then + if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi @@ -6875,15 +8513,15 @@ func_mode_link () *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then + if test yes != "$hardcode_direct" && + test yes != "$hardcode_minus_L" && + test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; @@ -6892,33 +8530,33 @@ func_mode_link () fi fi - if test "$linkmode" = prog || test "$opt_mode" = relink; then + if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$libdir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$libdir + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then + add=-l$name + elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" + test -f "$inst_prefix_dir$libdir/$linklib"; then + add=$inst_prefix_dir$libdir/$linklib else - add="$libdir/$linklib" + add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" + add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -6927,10 +8565,10 @@ func_mode_link () ;; esac fi - add="-l$name" + add=-l$name fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else @@ -6938,43 +8576,43 @@ func_mode_link () test -n "$add" && deplibs="$add $deplibs" fi fi - elif test "$linkmode" = prog; then + elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" + if test unsupported != "$hardcode_direct"; then + test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi - elif test "$build_libtool_libs" = yes; then + elif test yes = "$build_libtool_libs"; then # Not a shared library - if test "$deplibs_check_method" != pass_all; then + if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo - $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then + if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." + echo "*** 'nm' from GNU binutils and a full rebuild may help." fi - if test "$build_old_libs" = no; then + if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else @@ -6987,11 +8625,11 @@ func_mode_link () fi fi # link shared/static library? - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then + { test yes != "$hardcode_into_libs" || + test yes = "$build_old_libs" || + test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do @@ -7005,12 +8643,12 @@ func_mode_link () *) func_append temp_deplibs " $libdir";; esac done - dependency_libs="$temp_deplibs" + dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do @@ -7020,7 +8658,7 @@ func_mode_link () func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; @@ -7029,12 +8667,12 @@ func_mode_link () func_append tmp_libs " $func_resolve_sysroot_result" done - if test "$link_all_deplibs" != no; then + if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in - -L*) path="$deplib" ;; + -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result @@ -7042,12 +8680,12 @@ func_mode_link () dir=$func_dirname_result # We need an absolute path. case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" + func_warning "cannot determine absolute directory name of '$dir'" + absdir=$dir fi ;; esac @@ -7055,35 +8693,35 @@ func_mode_link () case $host in *-*-darwin*) depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do + eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names"; then + for tmp in $deplibrary_names; do depdepl=$tmp done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -f "$absdir/$objdir/$depdepl"; then + depdepl=$absdir/$objdir/$depdepl + darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi - func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" + func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" + func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) - path="-L$absdir/$objdir" + path=-L$absdir/$objdir ;; esac else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" + func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" + func_warning "'$deplib' seems to be moved" - path="-L$absdir" + path=-L$absdir fi ;; esac @@ -7095,23 +8733,23 @@ func_mode_link () fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then + if test link = "$pass"; then + if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then + dependency_libs=$newdependency_libs + if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then + if test dlopen != "$pass"; then + test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do @@ -7121,12 +8759,12 @@ func_mode_link () esac done newlib_search_path= - fi + } - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else + if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" + else + vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order @@ -7184,62 +8822,93 @@ func_mode_link () eval $var=\"$tmp_libs\" done # for var fi + + # Add Sun CC postdeps if required: + test CXX = "$tagname" && { + case $host_os in + linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C++ 5.9 + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + + solaris*) + func_cc_basename "$CC" + case $func_cc_basename_result in + CC* | sunCC*) + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + esac + } + # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= - for i in $dependency_libs ; do + for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) - i="" + i= ;; esac - if test -n "$i" ; then + if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" + if test prog = "$linkmode"; then + dlfiles=$newdlfiles fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" + if test prog = "$linkmode" || test lib = "$linkmode"; then + dlprefiles=$newdlprefiles fi case $linkmode in oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; + func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" + func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" + func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" + func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ - func_warning "\`-release' is ignored for archives" + func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" + func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no - oldlibs="$output" + oldlibs=$output func_append objs "$old_deplibs" ;; lib) - # Make sure we only generate libraries of the form `libNAME.la'. + # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" @@ -7248,10 +8917,10 @@ func_mode_link () eval libname=\"$libname_spec\" ;; *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" + test no = "$module" \ + && func_fatal_help "libtool library '$output' must begin with 'lib'" - if test "$need_lib_prefix" != no; then + if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result @@ -7265,8 +8934,8 @@ func_mode_link () esac if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + if test pass_all != "$deplibs_check_method"; then + func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" @@ -7275,21 +8944,21 @@ func_mode_link () fi fi - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" + test no = "$dlself" \ + || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" + test 1 -lt "$#" \ + && func_warning "ignoring multiple '-rpath's for a libtool library" - install_libdir="$1" + install_libdir=$1 oldlibs= if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so + # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" @@ -7298,20 +8967,20 @@ func_mode_link () fi test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" + func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. - save_ifs="$IFS"; IFS=':' + save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift - IFS="$save_ifs" + IFS=$save_ifs test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" + func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts @@ -7319,42 +8988,45 @@ func_mode_link () case $vinfo_number in yes) - number_major="$1" - number_minor="$2" - number_revision="$3" + number_major=$1 + number_minor=$2 + number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix - # which has an extra 1 added just for fun + # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor - darwin|linux|osf|windows|none) + darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result - age="$number_minor" - revision="$number_revision" + age=$number_minor + revision=$number_revision ;; - freebsd-aout|freebsd-elf|qnx|sunos) - current="$number_major" - revision="$number_minor" - age="0" + freebsd-aout|qnx|sunos) + current=$number_major + revision=$number_minor + age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result - age="$number_minor" - revision="$number_minor" + age=$number_minor + revision=$number_minor lt_irix_increment=no ;; + *) + func_fatal_configuration "$modename: unknown library version type '$version_type'" + ;; esac ;; no) - current="$1" - revision="$2" - age="$3" + current=$1 + revision=$2 + age=$3 ;; esac @@ -7362,30 +9034,30 @@ func_mode_link () case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "CURRENT '$current' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "REVISION '$revision' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "AGE '$age' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "AGE '$age' is greater than the current interface number '$current'" + func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. @@ -7400,26 +9072,36 @@ func_mode_link () # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result - versuffix="$major.$age.$revision" + versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + # On Darwin other compilers + case $CC in + nagfor*) + verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + ;; + *) + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + esac ;; freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; + major=.$current + versuffix=.$current.$revision ;; freebsd-elf) - major=".$current" - versuffix=".$current" + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision ;; irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then + if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 @@ -7430,69 +9112,74 @@ func_mode_link () nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac - verstring="$verstring_prefix$major.$revision" + verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision - while test "$loop" -ne 0; do + while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" + verstring=$verstring_prefix$major.$iface:$verstring done - # Before this point, $major must not contain `.'. + # Before this point, $major must not contain '.'. major=.$major - versuffix="$major.$revision" + versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result - versuffix="$major.$age.$revision" + versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" + versuffix=.$current.$age.$revision + verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age - while test "$loop" -ne 0; do + while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result - verstring="$verstring:${iface}.0" + verstring=$verstring:$iface.0 done # Make executables depend on our current version. - func_append verstring ":${current}.0" + func_append verstring ":$current.0" ;; qnx) - major=".$current" - versuffix=".$current" + major=.$current + versuffix=.$current + ;; + + sco) + major=.$current + versuffix=.$current ;; sunos) - major=".$current" - versuffix=".$current.$revision" + major=.$current + versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. + # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result - versuffix="-$major" + versuffix=-$major ;; *) - func_fatal_configuration "unknown library version type \`$version_type'" + func_fatal_configuration "unknown library version type '$version_type'" ;; esac @@ -7506,42 +9193,45 @@ func_mode_link () verstring= ;; *) - verstring="0.0" + verstring=0.0 ;; esac - if test "$need_version" = no; then + if test no = "$need_version"; then versuffix= else - versuffix=".0.0" + versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then + if test yes,no = "$avoid_version,$need_version"; then major= versuffix= - verstring="" + verstring= fi # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes + if test yes = "$allow_undefined"; then + if test unsupported = "$allow_undefined_flag"; then + if test yes = "$build_old_libs"; then + func_warning "undefined symbols not allowed in $host shared libraries; building static only" + build_libtool_libs=no + else + func_fatal_error "can't build $host shared library unless -no-undefined is specified" + fi fi else # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" + allow_undefined_flag=$no_undefined_flag fi fi - func_generate_dlsyms "$libname" "$libname" "yes" + func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" - test "X$libobjs" = "X " && libobjs= + test " " = "$libobjs" && libobjs= - if test "$opt_mode" != relink; then + if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= @@ -7550,8 +9240,8 @@ func_mode_link () case $p in *.$objext | *.gcno) ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) + if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue @@ -7567,11 +9257,11 @@ func_mode_link () fi # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. @@ -7592,13 +9282,13 @@ func_mode_link () *) func_append finalize_rpath " $libdir" ;; esac done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" + old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in @@ -7608,7 +9298,7 @@ func_mode_link () done # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" + old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in @@ -7617,7 +9307,7 @@ func_mode_link () esac done - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) @@ -7641,7 +9331,7 @@ func_mode_link () ;; *) # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then + if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; @@ -7657,9 +9347,9 @@ func_mode_link () # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? - release="" - versuffix="" - major="" + release= + versuffix= + major= newdeplibs= droppeddeps=no case $deplibs_check_method in @@ -7688,20 +9378,20 @@ EOF -l*) func_stripname -l '' "$i" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" - i="" + i= ;; esac fi - if test -n "$i" ; then + if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then func_append newdeplibs " $i" else droppeddeps=yes @@ -7731,20 +9421,20 @@ EOF $opt_dry_run || $RM conftest if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" - i="" + i= ;; esac fi - if test -n "$i" ; then + if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then func_append newdeplibs " $i" else droppeddeps=yes @@ -7781,24 +9471,24 @@ EOF -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= ;; esac fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` if test -n "$file_magic_glob"; then libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` else libnameglob=$libname fi - test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` + test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - if test "$want_nocaseglob" = yes; then + if test yes = "$want_nocaseglob"; then shopt -s nocaseglob potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` $nocaseglob @@ -7816,25 +9506,25 @@ EOF # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? - potlib="$potent_lib" + potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; + *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= break 2 fi done done fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." @@ -7842,7 +9532,7 @@ EOF echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then + if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" @@ -7865,30 +9555,30 @@ EOF -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= ;; esac fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test + potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= break 2 fi done done fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." @@ -7896,7 +9586,7 @@ EOF echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then + if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" @@ -7912,18 +9602,18 @@ EOF done # Gone through all deplibs. ;; none | unknown | *) - newdeplibs="" + newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo - if test "X$deplibs_check_method" = "Xnone"; then + if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." @@ -7947,8 +9637,8 @@ EOF ;; esac - if test "$droppeddeps" = yes; then - if test "$module" = yes; then + if test yes = "$droppeddeps"; then + if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" @@ -7957,12 +9647,12 @@ EOF if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." + echo "*** 'nm' from GNU binutils and a full rebuild may help." fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else @@ -7973,14 +9663,14 @@ EOF echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." - if test "$allow_undefined" = no; then + if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else @@ -8026,7 +9716,7 @@ EOF *) func_append new_libs " $deplib" ;; esac done - deplibs="$new_libs" + deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= @@ -8034,25 +9724,25 @@ EOF dlname= # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - # Remove ${wl} instances when linking with ld. + if test yes = "$build_libtool_libs"; then + # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac - if test "$hardcode_into_libs" = yes; then + if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= - rpath="$finalize_rpath" - test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + rpath=$finalize_rpath + test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8077,7 +9767,7 @@ EOF # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then @@ -8091,8 +9781,8 @@ EOF test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi - shlibpath="$finalize_shlibpath" - test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + shlibpath=$finalize_shlibpath + test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi @@ -8102,19 +9792,19 @@ EOF eval library_names=\"$library_names_spec\" set dummy $library_names shift - realname="$1" + realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else - soname="$realname" + soname=$realname fi if test -z "$dlname"; then dlname=$soname fi - lib="$output_objdir/$realname" + lib=$output_objdir/$realname linknames= for link do @@ -8128,7 +9818,7 @@ EOF delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" + export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi @@ -8137,31 +9827,31 @@ EOF cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. - orig_export_symbols="$export_symbols" + orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes - fi + } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" + if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do - IFS="$save_ifs" + IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in @@ -8175,7 +9865,7 @@ EOF try_normal_branch=no ;; esac - if test "$try_normal_branch" = yes \ + if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then @@ -8186,7 +9876,7 @@ EOF output_la=$func_basename_result save_libobjs=$libobjs save_output=$output - output=${output_objdir}/${output_la}.nm + output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" @@ -8209,8 +9899,8 @@ EOF break fi done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + IFS=$save_ifs + if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi @@ -8218,16 +9908,16 @@ EOF fi if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine + # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. @@ -8246,11 +9936,11 @@ EOF ;; esac done - deplibs="$tmp_deplibs" + deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && + test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. @@ -8261,7 +9951,7 @@ EOF eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience @@ -8270,18 +9960,18 @@ EOF fi fi - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then + if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds @@ -8299,7 +9989,7 @@ EOF fi fi - if test "X$skipped_export" != "X:" && + if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then @@ -8332,8 +10022,8 @@ EOF last_robj= k=1 - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript + if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then + output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs @@ -8345,14 +10035,14 @@ EOF func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk + elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then + output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= - if test "$compiler_needs_object" = yes; then + if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi @@ -8367,7 +10057,7 @@ EOF else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext + output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result @@ -8379,13 +10069,13 @@ EOF func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result - if test "X$objlist" = X || + if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. - if test "$k" -eq 1 ; then + if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" @@ -8395,10 +10085,10 @@ EOF reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi - last_robj=$output_objdir/$output_la-${k}.$objext + last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext + output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result @@ -8410,9 +10100,9 @@ EOF # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" - eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" @@ -8420,9 +10110,9 @@ EOF output= fi - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" + ${skipped_export-false} && { + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. @@ -8431,24 +10121,24 @@ EOF if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi - fi + } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" + IFS=$save_ifs + $opt_quiet || { + func_quote_arg expand,pretty "$cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -8457,7 +10147,7 @@ EOF exit $lt_exit } done - IFS="$save_ifs" + IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' @@ -8465,18 +10155,18 @@ EOF fi fi - if ${skipped_export-false}; then + ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine + # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. @@ -8485,7 +10175,7 @@ EOF export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi - fi + } libobjs=$output # Restore the value of output. @@ -8499,7 +10189,7 @@ EOF # value of $libobjs for piecewise linking. # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then + if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else @@ -8521,7 +10211,7 @@ EOF # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles @@ -8529,19 +10219,20 @@ EOF test "X$libobjs" = "X " && libobjs= fi - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd in $cmds; do - IFS="$save_ifs" + IFS=$sp$nl eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" + IFS=$save_ifs + $opt_quiet || { + func_quote_arg expand,pretty "$cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -8550,10 +10241,10 @@ EOF exit $lt_exit } done - IFS="$save_ifs" + IFS=$save_ifs # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then @@ -8573,39 +10264,39 @@ EOF done # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then + if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. - dlname="$soname" + dlname=$soname fi fi ;; obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; + func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" + func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" + func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" + func_warning "'-version-info' is ignored for objects" test -n "$release" && \ - func_warning "\`-release' is ignored for objects" + func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" + func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" @@ -8613,7 +10304,7 @@ EOF ;; *) libobj= - obj="$output" + obj=$output ;; esac @@ -8626,17 +10317,19 @@ EOF # the extraction. reload_conv_objs= gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - + # if reload_cmds runs $LD directly, get rid of -Wl from + # whole_archive_flag_spec and hope we can get by with turning comma + # into space. + case $reload_cmds in + *\$LD[\ \$]*) wl= ;; + esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else - gentop="$output_objdir/${obj}x" + gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience @@ -8645,12 +10338,12 @@ EOF fi # If we're not building shared, we need to use non_pic_objs - test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs - output="$obj" + output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. @@ -8662,7 +10355,7 @@ EOF exit $EXIT_SUCCESS fi - if test "$build_libtool_libs" != yes; then + test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi @@ -8672,12 +10365,12 @@ EOF # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS - fi + } - if test -n "$pic_flag" || test "$pic_mode" != default; then + if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" - output="$libobj" + output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi @@ -8694,16 +10387,14 @@ EOF output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" + func_warning "'-version-info' is ignored for programs" test -n "$release" && \ - func_warning "\`-release' is ignored for programs" + func_warning "'-release' is ignored for programs" - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + $preload \ + && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ + && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) @@ -8717,11 +10408,11 @@ EOF *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then + if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) - func_append compile_command " ${wl}-bind_at_load" - func_append finalize_command " ${wl}-bind_at_load" + func_append compile_command " $wl-bind_at_load" + func_append finalize_command " $wl-bind_at_load" ;; esac fi @@ -8757,7 +10448,7 @@ EOF *) func_append new_libs " $deplib" ;; esac done - compile_deplibs="$new_libs" + compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" @@ -8781,7 +10472,7 @@ EOF if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8804,7 +10495,7 @@ EOF fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; @@ -8821,10 +10512,10 @@ EOF # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi - compile_rpath="$rpath" + compile_rpath=$rpath rpath= hardcode_libdirs= @@ -8832,7 +10523,7 @@ EOF if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8857,45 +10548,43 @@ EOF # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi - finalize_rpath="$rpath" + finalize_rpath=$rpath - if test -n "$libobjs" && test "$build_old_libs" = yes; then + if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi - wrappers_required=yes + wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=no + wrappers_required=false ;; *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi + test yes = "$build_libtool_libs" || wrappers_required=false ;; *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no + if test no = "$need_relink" || test yes != "$build_libtool_libs"; then + wrappers_required=false fi ;; esac - if test "$wrappers_required" = no; then + $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" + link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 @@ -8908,12 +10597,12 @@ EOF fi # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + if test -f "$output_objdir/${outputname}S.$objext"; then + func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status - fi + } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" @@ -8943,9 +10632,9 @@ EOF fi fi - if test "$no_install" = yes; then + if test yes = "$no_install"; then # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" + link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. @@ -8962,27 +10651,28 @@ EOF exit $EXIT_SUCCESS fi - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" + case $hardcode_action,$fast_install in + relink,*) + # Fast installation is not supported + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi + func_warning "this platform does not like uninstalled shared libraries" + func_warning "'$output' will be relinked during installation" + ;; + *,yes) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + ;; + *,no) + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + ;; + *,needless) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command= + ;; + esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` @@ -9010,12 +10700,12 @@ EOF elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + func_quote_arg pretty "$var_value" + relink_command="$var=$func_quote_arg_result; export $var; $relink_command" fi done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote_arg pretty,unquoted "(cd `pwd`; $relink_command)" + relink_command=$func_quote_arg_unquoted_result fi # Only actually do things if not in dry run mode. @@ -9039,8 +10729,8 @@ EOF func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" + cwrappersource=$output_path/$objdir/lt-$output_name.c + cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 @@ -9061,7 +10751,7 @@ EOF trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then + if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result @@ -9084,25 +10774,27 @@ EOF # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" + case $build_libtool_libs in + convenience) + oldobjs="$libobjs_save $symfileobj" + addlibs=$convenience build_libtool_libs=no - else + ;; + module) + oldobjs=$libobjs_save + addlibs=$old_convenience + build_libtool_libs=no + ;; + *) oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - func_append oldobjs " $symfileobj" - fi - fi - addlibs="$old_convenience" - fi + $preload && test -f "$symfileobj" \ + && func_append oldobjs " $symfileobj" + addlibs=$old_convenience + ;; + esac if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs @@ -9110,13 +10802,13 @@ EOF fi # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles @@ -9137,7 +10829,7 @@ EOF : else echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs @@ -9146,7 +10838,7 @@ EOF for obj in $save_oldobjs do func_basename "$obj" - objbase="$func_basename_result" + objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) @@ -9215,18 +10907,18 @@ EOF else # the above command should be used before it gets too long oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then + if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist - if test "X$oldobjs" = "X" ; then + if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" @@ -9243,7 +10935,7 @@ EOF case $output in *.la) old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" + test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior @@ -9253,36 +10945,37 @@ EOF elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + func_quote_arg pretty,unquoted "$var_value" + relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + func_quote_arg pretty,unquoted "$relink_command" + relink_command=$func_quote_arg_unquoted_result + if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do - if test "$installed" = yes; then + if test yes = "$installed"; then if test -z "$install_libdir"; then break fi - output="$output_objdir/$outputname"i + output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" - name="$func_basename_result" + name=$func_basename_result func_resolve_sysroot "$deplib" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" + func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) @@ -9298,23 +10991,23 @@ EOF *) func_append newdependency_libs " $deplib" ;; esac done - dependency_libs="$newdependency_libs" + dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" + func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done - dlfiles="$newdlfiles" + dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in @@ -9324,34 +11017,34 @@ EOF # didn't already link the preopened objects directly into # the library: func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" + func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done - dlprefiles="$newdlprefiles" + dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done - dlfiles="$newdlfiles" + dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done - dlprefiles="$newdlprefiles" + dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin @@ -9367,10 +11060,9 @@ EOF case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. - if test "x$bindir" != x ; - then + if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result$dlname + tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname @@ -9379,7 +11071,7 @@ EOF esac $ECHO > $output "\ # $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. @@ -9393,7 +11085,7 @@ library_names='$library_names' # The name of the static archive. old_library='$old_library' -# Linker flags that can not go in dependency_libs. +# Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. @@ -9419,7 +11111,7 @@ dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then + if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi @@ -9434,27 +11126,29 @@ relink_command=\"$relink_command\"" exit $EXIT_SUCCESS } -{ test "$opt_mode" = link || test "$opt_mode" = relink; } && - func_mode_link ${1+"$@"} +if test link = "$opt_mode" || test relink = "$opt_mode"; then + func_mode_link ${1+"$@"} +fi # func_mode_uninstall arg... func_mode_uninstall () { - $opt_debug - RM="$nonopt" + $debug_cmd + + RM=$nonopt files= - rmforce= + rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic="$magic" + libtool_install_magic=$magic for arg do case $arg in - -f) func_append RM " $arg"; rmforce=yes ;; + -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac @@ -9467,18 +11161,18 @@ func_mode_uninstall () for file in $files; do func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - odir="$objdir" + dir=$func_dirname_result + if test . = "$dir"; then + odir=$objdir else - odir="$dir/$objdir" + odir=$dir/$objdir fi func_basename "$file" - name="$func_basename_result" - test "$opt_mode" = uninstall && odir="$dir" + name=$func_basename_result + test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates - if test "$opt_mode" = clean; then + if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; @@ -9493,11 +11187,11 @@ func_mode_uninstall () elif test -d "$file"; then exit_status=1 continue - elif test "$rmforce" = yes; then + elif $rmforce; then continue fi - rmfiles="$file" + rmfiles=$file case $name in *.la) @@ -9511,7 +11205,7 @@ func_mode_uninstall () done test -n "$old_library" && func_append rmfiles " $odir/$old_library" - case "$opt_mode" in + case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; @@ -9522,12 +11216,12 @@ func_mode_uninstall () uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; @@ -9543,21 +11237,19 @@ func_mode_uninstall () func_source $dir/$name # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then + if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then + if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) - if test "$opt_mode" = clean ; then + if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) @@ -9584,12 +11276,12 @@ func_mode_uninstall () # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then + func_append rmfiles " $odir/$name $odir/${name}S.$objext" + if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi - if test "X$noexename" != "X$name" ; then - func_append rmfiles " $odir/lt-${noexename}.c" + if test "X$noexename" != "X$name"; then + func_append rmfiles " $odir/lt-$noexename.c" fi fi fi @@ -9598,7 +11290,7 @@ func_mode_uninstall () func_show_eval "$RM $rmfiles" 'exit_status=1' done - # Try to remove the ${objdir}s in the directories where we deleted files + # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" @@ -9608,16 +11300,17 @@ func_mode_uninstall () exit $exit_status } -{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && - func_mode_uninstall ${1+"$@"} +if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then + func_mode_uninstall ${1+"$@"} +fi test -z "$opt_mode" && { - help="$generic_help" + help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$opt_mode'" + func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" @@ -9628,7 +11321,7 @@ exit $exit_status # The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting +# where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support @@ -9651,5 +11344,3 @@ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # mode:shell-script # sh-indentation:2 # End: -# vi:sw=2 - diff --git a/build-aux/missing b/build-aux/missing index cdea5149..f62bbae3 100755 --- a/build-aux/missing +++ b/build-aux/missing @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-06-26.16; # UTC +scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -160,7 +160,7 @@ give_advice () ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'automa4te' program to be rebuilt." + echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) diff --git a/build-aux/test-driver b/build-aux/test-driver index 32bf39e8..8e575b01 100755 --- a/build-aux/test-driver +++ b/build-aux/test-driver @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2012-06-27.10; # UTC +scriptversion=2013-07-13.22; # UTC -# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# Copyright (C) 2011-2014 Free Software Foundation, Inc. # # 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 @@ -44,13 +44,12 @@ print_usage () Usage: test-driver --test-name=NAME --log-file=PATH --trs-file=PATH [--expect-failure={yes|no}] [--color-tests={yes|no}] - [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT + [--enable-hard-errors={yes|no}] [--] + TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] The '--test-name', '--log-file' and '--trs-file' options are mandatory. END } -# TODO: better error handling in option parsing (in particular, ensure -# TODO: $log_file, $trs_file and $test_name are defined). test_name= # Used for reporting. log_file= # Where to save the output of the test script. trs_file= # Where to save the metadata of the test run. @@ -69,10 +68,23 @@ while test $# -gt 0; do --enable-hard-errors) enable_hard_errors=$2; shift;; --) shift; break;; -*) usage_error "invalid option: '$1'";; + *) break;; esac shift done +missing_opts= +test x"$test_name" = x && missing_opts="$missing_opts --test-name" +test x"$log_file" = x && missing_opts="$missing_opts --log-file" +test x"$trs_file" = x && missing_opts="$missing_opts --trs-file" +if test x"$missing_opts" != x; then + usage_error "the following mandatory options are missing:$missing_opts" +fi + +if test $# -eq 0; then + usage_error "missing argument" +fi + if test $color_tests = yes; then # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'. red='' # Red. @@ -94,11 +106,14 @@ trap "st=143; $do_exit" 15 # Test script is run here. "$@" >$log_file 2>&1 estatus=$? + if test $enable_hard_errors = no && test $estatus -eq 99; then - estatus=1 + tweaked_estatus=1 +else + tweaked_estatus=$estatus fi -case $estatus:$expect_failure in +case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; @@ -107,6 +122,12 @@ case $estatus:$expect_failure in *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac +# Report the test outcome and exit status in the logs, so that one can +# know whether the test passed or failed simply by looking at the '.log' +# file, without the need of also peaking into the corresponding '.trs' +# file (automake bug#11814). +echo "$res $test_name (exit status: $estatus)" >>$log_file + # Report outcome to console. echo "${col}${res}${std}: $test_name" diff --git a/compile b/compile new file mode 100755 index 00000000..a85b723c --- /dev/null +++ b/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# 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, 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, see . + +# 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 maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/config.guess b/config.guess new file mode 100755 index 00000000..f50dcdb6 --- /dev/null +++ b/config.guess @@ -0,0 +1,1480 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2018 Free Software Foundation, Inc. + +timestamp='2018-02-24' + +# This file 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 3 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, see . +# +# 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 Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to . + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2018 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > "$dummy.c" ; + for c in cc gcc c89 c99 ; do + if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "$UNAME_SYSTEM" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval "$set_cc_for_build" + cat <<-EOF > "$dummy.c" + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval "$set_cc_for_build" + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "$UNAME_VERSION" in + Debian*) + release='-gnu' + ;; + *) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "$machine-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; + *:ekkoBSD:*:*) + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" + exit ;; + *:SolidBSD:*:*) + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:MirBSD:*:*) + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix"$UNAME_RELEASE" + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux"$UNAME_RELEASE" + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval "$set_cc_for_build" + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos"$UNAME_RELEASE" + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos"$UNAME_RELEASE" + ;; + sun4) + echo sparc-sun-sunos"$UNAME_RELEASE" + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos"$UNAME_RELEASE" + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint"$UNAME_RELEASE" + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint"$UNAME_RELEASE" + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint"$UNAME_RELEASE" + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten"$UNAME_RELEASE" + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten"$UNAME_RELEASE" + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix"$UNAME_RELEASE" + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix"$UNAME_RELEASE" + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix"$UNAME_RELEASE" + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos"$UNAME_RELEASE" + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + then + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] + then + echo m88k-dg-dgux"$UNAME_RELEASE" + else + echo m88k-dg-dguxbcs"$UNAME_RELEASE" + fi + else + echo i586-dg-dgux"$UNAME_RELEASE" + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "$HP_ARCH" = "" ]; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ "$HP_ARCH" = hppa2.0w ] + then + eval "$set_cc_for_build" + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" + exit ;; + 3050*:HI-UX:*:*) + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo "$UNAME_MACHINE"-unknown-osf1mk + else + echo "$UNAME_MACHINE"-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:BSD/OS:*:*) + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case "$UNAME_PROCESSOR" in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + i*:CYGWIN*:*) + echo "$UNAME_MACHINE"-pc-cygwin + exit ;; + *:MINGW64*:*) + echo "$UNAME_MACHINE"-pc-mingw64 + exit ;; + *:MINGW*:*) + echo "$UNAME_MACHINE"-pc-mingw32 + exit ;; + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys + exit ;; + i*:PW*:*) + echo "$UNAME_MACHINE"-pc-pw32 + exit ;; + *:Interix*:*) + case "$UNAME_MACHINE" in + x86) + echo i586-pc-interix"$UNAME_RELEASE" + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix"$UNAME_RELEASE" + exit ;; + IA64) + echo ia64-unknown-interix"$UNAME_RELEASE" + exit ;; + esac ;; + i*:UWIN*:*) + echo "$UNAME_MACHINE"-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + *:GNU:*:*) + # the GNU system + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + exit ;; + i*86:Minix:*:*) + echo "$UNAME_MACHINE"-pc-minix + exit ;; + aarch64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arm*:Linux:*:*) + eval "$set_cc_for_build" + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + else + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + cris:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + crisv32:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + frv:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + hexagon:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + ia64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m32r*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m68*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + ;; + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-"$LIBC" + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-"$LIBC" + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-"$LIBC" + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-"$LIBC" + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" + exit ;; + sh64*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sh*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + tile*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + vax:Linux:*:*) + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" + exit ;; + x86_64:Linux:*:*) + if objdump -f /bin/sh | grep -q elf32-x86-64; then + echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 + else + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + fi + exit ;; + xtensa*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo "$UNAME_MACHINE"-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo "$UNAME_MACHINE"-unknown-stop + exit ;; + i*86:atheos:*:*) + echo "$UNAME_MACHINE"-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo "$UNAME_MACHINE"-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos"$UNAME_RELEASE" + exit ;; + i*86:*DOS:*:*) + echo "$UNAME_MACHINE"-pc-msdosdjgpp + exit ;; + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos"$UNAME_RELEASE" + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos"$UNAME_RELEASE" + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv"$UNAME_RELEASE" + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo "$UNAME_MACHINE"-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo "$UNAME_MACHINE"-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux"$UNAME_RELEASE" + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv"$UNAME_RELEASE" + else + echo mips-unknown-sysv"$UNAME_RELEASE" + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux"$UNAME_RELEASE" + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux"$UNAME_RELEASE" + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux"$UNAME_RELEASE" + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Rhapsody:*:*) + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval "$set_cc_for_build" + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = 386; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo "$UNAME_MACHINE"-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux"$UNAME_RELEASE" + exit ;; + *:DragonFly:*:*) + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "$UNAME_MACHINE" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + exit ;; + i*86:rdos:*:*) + echo "$UNAME_MACHINE"-pc-rdos + exit ;; + i*86:AROS:*:*) + echo "$UNAME_MACHINE"-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; +esac + +echo "$0: unable to guess system type" >&2 + +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 </dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-functions 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.h.in b/config.h.in index 91054354..227df013 100644 --- a/config.h.in +++ b/config.h.in @@ -9,12 +9,6 @@ /* Whether or not apache can be used for tests */ #undef HAVE_APACHE -/* Apache is 2.2.x */ -#undef HAVE_APACHE_2_2 - -/* Apache is 2.4.x */ -#undef HAVE_APACHE_2_4 - /* Whether or not curl can be used for tests */ #undef HAVE_CURL @@ -57,8 +51,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ +/* Whether or not GSSAPI libs are available */ +#undef LIBSOUP_HAVE_GSSAPI + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Samba's 'winbind' daemon helper 'ntlm_auth' which can be used for NTLM @@ -95,3 +91,6 @@ /* Version number of package */ #undef VERSION + +/* defines how to decorate public symbols while building */ +#undef _SOUP_EXTERN diff --git a/config.h.win32 b/config.h.win32 new file mode 100644 index 00000000..1705bd36 --- /dev/null +++ b/config.h.win32 @@ -0,0 +1,116 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Apache httpd */ +/* #undef APACHE_HTTPD */ + +/* The gettext domain name */ +#define GETTEXT_PACKAGE "libsoup" + +/* Whether or not apache can be used for tests */ +/* #undef HAVE_APACHE */ + +/* Apache is 2.2.x */ +/* #undef HAVE_APACHE_2_2 */ + +/* Apache is 2.4.x */ +/* #undef HAVE_APACHE_2_4 */ + +/* Whether or not curl can be used for tests */ +#define HAVE_CURL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define to 1 if you have the `gmtime_r' function. */ +/* #undef HAVE_GMTIME_R */ + +/* Defined if GNOME support is enabled */ +#define HAVE_GNOME 1 + +/* Define to 1 if you have the header file. */ +#if !defined (_MSC_VER) || (_MSC_VER >= 1800) +#define HAVE_INTTYPES_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Have php-xmlrpc */ +/* #undef HAVE_PHP_XMLRPC */ + +/* Define to 1 if you have the header file. */ +#if !defined (_MSC_VER) || (_MSC_VER >= 1600) +#define HAVE_STDINT_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#ifndef _MSC_VER +#define HAVE_STRINGS_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#ifndef _MSC_VER +#defin HAVE_UNISTD_H 1 +#endif + +/* Whether or not GSSAPI libs are available */ +/* Note: This is activated in the projects when the appropriate config is selected */ +/* #undef LIBSOUP_HAVE_GSSAPI */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Samba's 'winbind' daemon helper 'ntlm_auth' which can be used for NTLM + single-sign-on */ +/* #undef NTLM_AUTH */ + +/* Name of package */ +#define PACKAGE "libsoup" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=libsoup" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libsoup" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libsoup 2.62.2" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libsoup" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.62.2" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Whether or not use Samba's 'winbind' daemon helper 'ntlm_auth' for NTLM + single-sign-on */ +/* #undef USE_NTLM_AUTH */ + +/* Version number of package */ +#define VERSION "@PACKAGE_VERSION" + +/* defines how to decorate public symbols while building */ +#ifdef _MSC_VER +#define _SOUP_EXTERN __declspec (dllexport) extern +#else +#define _SOUP_EXTERN __attribute__((visibility("default"))) __declspec (dllexport) extern +#endif diff --git a/config.h.win32.in b/config.h.win32.in new file mode 100644 index 00000000..6231dad5 --- /dev/null +++ b/config.h.win32.in @@ -0,0 +1,116 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Apache httpd */ +/* #undef APACHE_HTTPD */ + +/* The gettext domain name */ +#define GETTEXT_PACKAGE "libsoup" + +/* Whether or not apache can be used for tests */ +/* #undef HAVE_APACHE */ + +/* Apache is 2.2.x */ +/* #undef HAVE_APACHE_2_2 */ + +/* Apache is 2.4.x */ +/* #undef HAVE_APACHE_2_4 */ + +/* Whether or not curl can be used for tests */ +#define HAVE_CURL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define to 1 if you have the `gmtime_r' function. */ +/* #undef HAVE_GMTIME_R */ + +/* Defined if GNOME support is enabled */ +#define HAVE_GNOME 1 + +/* Define to 1 if you have the header file. */ +#if !defined (_MSC_VER) || (_MSC_VER >= 1800) +#define HAVE_INTTYPES_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Have php-xmlrpc */ +/* #undef HAVE_PHP_XMLRPC */ + +/* Define to 1 if you have the header file. */ +#if !defined (_MSC_VER) || (_MSC_VER >= 1600) +#define HAVE_STDINT_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#ifndef _MSC_VER +#define HAVE_STRINGS_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#ifndef _MSC_VER +#defin HAVE_UNISTD_H 1 +#endif + +/* Whether or not GSSAPI libs are available */ +/* Note: This is activated in the projects when the appropriate config is selected */ +/* #undef LIBSOUP_HAVE_GSSAPI */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Samba's 'winbind' daemon helper 'ntlm_auth' which can be used for NTLM + single-sign-on */ +/* #undef NTLM_AUTH */ + +/* Name of package */ +#define PACKAGE "@PACKAGE@" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "@PACKAGE_NAME@" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "@PACKAGE_NAME@ @PACKAGE_VERSION@" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "@PACKAGE_TARNAME@" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "@PACKAGE_VERSION@" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Whether or not use Samba's 'winbind' daemon helper 'ntlm_auth' for NTLM + single-sign-on */ +/* #undef USE_NTLM_AUTH */ + +/* Version number of package */ +#define VERSION "@PACKAGE_VERSION" + +/* defines how to decorate public symbols while building */ +#ifdef _MSC_VER +#define _SOUP_EXTERN __declspec (dllexport) extern +#else +#define _SOUP_EXTERN __attribute__((visibility("default"))) __declspec (dllexport) extern +#endif diff --git a/config.sub b/config.sub new file mode 100755 index 00000000..1d8e98bc --- /dev/null +++ b/config.sub @@ -0,0 +1,1801 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2018 Free Software Foundation, Inc. + +timestamp='2018-02-22' + +# This file 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 3 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, see . +# +# 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 Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2018 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo "$1" | sed 's/-[^-]*$//'` + if [ "$basic_machine" != "$1" ] + then os=`echo "$1" | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ + | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | wasm32 \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | e2k-* | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ + | pyramid-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | wasm32-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-pc + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + asmjs) + basic_machine=asmjs-unknown + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2*) + basic_machine=m68k-bull + os=-sysv3 + ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=$os"spe" + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + nsv-tandem) + basic_machine=nsv-tandem + ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + x64) + basic_machine=x86_64-pc + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases that might get confused + # with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # es1800 is here to avoid being matched by es* (a different OS) + -es1800*) + os=-ose + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -xray | -os68k* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo "$os" | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4*) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $basic_machine in + arm*) + os=-eabi + ;; + *) + os=-elf + ;; + esac + ;; + -nacl*) + ;; + -ios) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + pru-*) + os=-elf + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` + ;; +esac + +echo "$basic_machine$os" +exit + +# Local variables: +# eval: (add-hook 'write-file-functions 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/configure b/configure index 0d4abdd4..db768fd4 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libsoup 2.46.0. +# Generated by GNU Autoconf 2.69 for libsoup 2.62.2. # # Report bugs to . # @@ -567,6 +567,66 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} +as_awk_strverscmp=' + # Use only awk features that work with 7th edition Unix awk (1978). + # My, what an old awk you have, Mr. Solaris! + END { + while (length(v1) && length(v2)) { + # Set d1 to be the next thing to compare from v1, and likewise for d2. + # Normally this is a single character, but if v1 and v2 contain digits, + # compare them as integers and fractions as strverscmp does. + if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) { + # Split v1 and v2 into their leading digit string components d1 and d2, + # and advance v1 and v2 past the leading digit strings. + for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue + for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue + d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1) + d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1) + if (d1 ~ /^0/) { + if (d2 ~ /^0/) { + # Compare two fractions. + while (d1 ~ /^0/ && d2 ~ /^0/) { + d1 = substr(d1, 2); len1-- + d2 = substr(d2, 2); len2-- + } + if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) { + # The two components differ in length, and the common prefix + # contains only leading zeros. Consider the longer to be less. + d1 = -len1 + d2 = -len2 + } else { + # Otherwise, compare as strings. + d1 = "x" d1 + d2 = "x" d2 + } + } else { + # A fraction is less than an integer. + exit 1 + } + } else { + if (d2 ~ /^0/) { + # An integer is greater than a fraction. + exit 2 + } else { + # Compare two integers. + d1 += 0 + d2 += 0 + } + } + } else { + # The normal case, without worrying about digits. + d1 = substr(v1, 1, 1); v1 = substr(v1, 2) + d2 = substr(v2, 1, 1); v2 = substr(v2, 2) + } + if (d1 < d2) exit 1 + if (d1 > d2) exit 2 + } + # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10), + # which mishandles some comparisons of empty strings to integers. + if (length(v2)) exit 1 + if (length(v1)) exit 2 + } +' test -n "$DJDIR" || exec 7<&0 &1 @@ -591,8 +651,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libsoup' PACKAGE_TARNAME='libsoup' -PACKAGE_VERSION='2.46.0' -PACKAGE_STRING='libsoup 2.46.0' +PACKAGE_VERSION='2.62.2' +PACKAGE_STRING='libsoup 2.62.2' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=libsoup' PACKAGE_URL='' @@ -637,21 +697,43 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +MSVC_NO_TOOLSET_SET_FALSE +MSVC_NO_TOOLSET_SET_TRUE +MSVC_BASE_NO_TOOLSET_SET_FALSE +MSVC_BASE_NO_TOOLSET_SET_TRUE +SOUP_HIDDEN_VISIBILITY_CFLAGS +KRB5_LIBS +KRB5_CFLAGS +KRB5_CONFIG +CODE_COVERAGE_RULES +CODE_COVERAGE_LDFLAGS +CODE_COVERAGE_CXXFLAGS +CODE_COVERAGE_CFLAGS +CODE_COVERAGE_CPPFLAGS +GENHTML +LCOV +GCOV +CODE_COVERAGE_ENABLED +CODE_COVERAGE_ENABLED_FALSE +CODE_COVERAGE_ENABLED_TRUE ntlm_auth CURL +IF_HAVE_MOD_UNIXD IF_HAVE_PHP PHP -HAVE_APACHE_2_4_FALSE -HAVE_APACHE_2_4_TRUE -HAVE_APACHE_2_2_FALSE -HAVE_APACHE_2_2_TRUE HAVE_APACHE_FALSE HAVE_APACHE_TRUE -APACHE_PHP_MODULE APACHE_PHP_MODULE_DIR APACHE_SSL_MODULE_DIR APACHE_MODULE_DIR APACHE_HTTPD +ENABLE_VAPIGEN_FALSE +ENABLE_VAPIGEN_TRUE +VAPIGEN_MAKEFILE +VAPIDIR +VAPIGEN_VAPIDIR +VAPIGEN +VALAC HAVE_INTROSPECTION_FALSE HAVE_INTROSPECTION_TRUE INTROSPECTION_MAKEFILE @@ -720,6 +802,8 @@ INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE USE_NLS +OS_LINUX_FALSE +OS_LINUX_TRUE OS_WIN32_FALSE OS_WIN32_TRUE SQLITE_LIBS @@ -743,6 +827,7 @@ PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG CPP +LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO @@ -844,6 +929,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -873,6 +959,7 @@ enable_shared enable_static with_pic enable_fast_install +with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock @@ -886,10 +973,15 @@ enable_gtk_doc enable_gtk_doc_html enable_gtk_doc_pdf enable_introspection +enable_vala enable_tls_check with_apache_httpd with_apache_module_dir with_ntlm_auth +with_gcov +enable_code_coverage +with_gssapi +with_krb5_config enable_more_warnings ' ac_precious_vars='build_alias @@ -900,6 +992,7 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +LT_SYS_LIBRARY_PATH CPP PKG_CONFIG PKG_CONFIG_PATH @@ -948,6 +1041,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1200,6 +1294,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1337,7 +1440,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1450,7 +1553,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libsoup 2.46.0 to adapt to many kinds of systems. +\`configure' configures libsoup 2.62.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1490,6 +1593,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1520,7 +1624,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libsoup 2.46.0:";; + short | recursive ) echo "Configuration of libsoup 2.62.2:";; esac cat <<\_ACEOF @@ -1552,7 +1656,10 @@ Optional Features: --enable-gtk-doc-pdf build documentation in pdf format [[default=no]] --enable-introspection=[no/auto/yes] Enable introspection for this build + --enable-vala=[no/auto/yes] + build Vala bindings [default=auto] --disable-tls-check Don't error out if glib-networking is unavailable + --enable-code-coverage Whether to enable code coverage support --disable-more-warnings Inhibit compiler warnings Optional Packages: @@ -1560,9 +1667,12 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot=DIR Search for dependent libraries within DIR - (or the compiler's sysroot if not specified). + --with-sysroot[=DIR] Search for dependent libraries within DIR (or the + compiler's sysroot if not specified). --without-gnome Do not build libsoup-gnome --with-html-dir=PATH path to installed docs --with-apache-httpd Path to apache httpd (for tests) @@ -1570,6 +1680,11 @@ Optional Packages: Apache modules dirs (for tests) --with-ntlm-auth=PATH Where to look for ntlm_auth, path points to ntlm_auth installation (default: /usr/bin/ntlm_auth) + --with-gcov=GCOV use given GCOV for coverage (GCOV=gcov). + --with-gssapi Build with GSSAPI support [default=auto] + --with-krb5-config=PATH Where to look for krb5-config, path points to + krb5-config installation (default: + /usr/kerberos/bin/) Some influential environment variables: CC C compiler command @@ -1579,6 +1694,8 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + LT_SYS_LIBRARY_PATH + User-defined run-time library search path. CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH @@ -1661,7 +1778,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libsoup configure 2.46.0 +libsoup configure 2.62.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1939,7 +2056,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libsoup $as_me 2.46.0, which was +It was created by libsoup $as_me 2.62.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2319,7 +2436,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -am__api_version='1.13' +am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2491,8 +2608,8 @@ test "$program_suffix" != NONE && ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -2511,7 +2628,7 @@ else $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -2805,7 +2922,7 @@ fi # Define the identity of the package. PACKAGE='libsoup' - VERSION='2.46.0' + VERSION='2.62.2' cat >>confdefs.h <<_ACEOF @@ -2839,8 +2956,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' @@ -2856,6 +2973,48 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; @@ -2929,8 +3088,8 @@ fi SOUP_MAJOR_VERSION=2 -SOUP_MINOR_VERSION=46 -SOUP_MICRO_VERSION=0 +SOUP_MINOR_VERSION=62 +SOUP_MICRO_VERSION=2 @@ -2939,10 +3098,10 @@ SOUP_API_VERSION=2.4 # Increment on interface addition. Reset on removal. -SOUP_AGE=7 +SOUP_AGE=8 # Increment on interface add, remove, or change. -SOUP_CURRENT=8 +SOUP_CURRENT=9 # Increment on source change. Reset when CURRENT changes. SOUP_REVISION=0 @@ -3764,6 +3923,65 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -3967,8 +4185,8 @@ esac -macro_version='2.4.2' -macro_revision='1.3337' +macro_version='2.4.6' +macro_revision='2.4.6' @@ -3982,7 +4200,7 @@ macro_revision='1.3337' -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || @@ -4102,7 +4320,7 @@ func_echo_all () $ECHO "" } -case "$ECHO" in +case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 @@ -4425,19 +4643,19 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw + # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -4451,7 +4669,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; } while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD="$ac_prog" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -4462,7 +4680,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; } with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else @@ -4473,32 +4691,32 @@ if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" + lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } @@ -4541,33 +4759,38 @@ if ${lt_cv_path_NM+:} false; then : else if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM="$NM" + lt_cv_path_NM=$NM else - lt_nm_to_check="${ac_tool_prefix}nm" + lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break + break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break + break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -4578,15 +4801,15 @@ else esac fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : @@ -4692,9 +4915,9 @@ esac fi fi - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols" + DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: @@ -4702,8 +4925,8 @@ fi esac fi - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + if test : != "$DUMPBIN"; then + NM=$DUMPBIN fi fi test -z "$NM" && NM=nm @@ -4754,7 +4977,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 - teststring="ABCD" + teststring=ABCD case $build_os in msdosdjgpp*) @@ -4794,7 +5017,7 @@ else lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -4844,22 +5067,23 @@ else ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do + for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough + test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -4877,7 +5101,7 @@ else fi -if test -n $lt_cv_sys_max_cmd_len ; then +if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else @@ -4895,30 +5119,6 @@ max_cmd_len=$lt_cv_sys_max_cmd_len : ${MV="mv -f"} : ${RM="rm -f"} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else @@ -5041,13 +5241,13 @@ esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then + if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + if test yes = "$GCC"; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi @@ -5172,13 +5372,13 @@ lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. +# 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) @@ -5205,8 +5405,7 @@ mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else @@ -5242,10 +5441,6 @@ freebsd* | dragonfly*) fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -5284,11 +5479,11 @@ irix5* | irix6* | nonstopux*) ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else @@ -5306,8 +5501,8 @@ newos6*) lt_cv_deplibs_check_method=pass_all ;; -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' @@ -5360,6 +5555,9 @@ sysv4 | sysv4.3*) tpf*) lt_cv_deplibs_check_method=pass_all ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; esac fi @@ -5514,8 +5712,8 @@ else case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -5527,7 +5725,7 @@ cygwin* | mingw* | pw32* | cegcc*) ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" + lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac @@ -5682,7 +5880,7 @@ if ac_fn_c_try_compile "$LINENO"; then : ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test "$ac_status" -eq 0; then + if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 @@ -5690,7 +5888,7 @@ if ac_fn_c_try_compile "$LINENO"; then : ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test "$ac_status" -ne 0; then + if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi @@ -5703,7 +5901,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } -if test "x$lt_cv_ar_at_file" = xno; then +if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -5920,7 +6118,7 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in - openbsd*) + bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -6010,7 +6208,7 @@ cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; @@ -6043,14 +6241,44 @@ case `$NM -V 2>&1` in symcode='[ABCDGIRSTW]' ;; esac +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -6068,21 +6296,24 @@ for ac_symprfx in "" "_"; do # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" @@ -6130,11 +6361,11 @@ _LT_EOF if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else @@ -6160,7 +6391,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -6180,13 +6411,13 @@ _LT_EOF mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" + LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then + test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -6207,7 +6438,7 @@ _LT_EOF rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then + if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= @@ -6249,6 +6480,16 @@ fi + + + + + + + + + + @@ -6272,9 +6513,9 @@ fi lt_sysroot= -case ${with_sysroot} in #( +case $with_sysroot in #( yes) - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -6284,8 +6525,8 @@ case ${with_sysroot} in #( no|'') ;; #( *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 -$as_echo "${with_sysroot}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +$as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac @@ -6297,18 +6538,99 @@ $as_echo "${lt_sysroot:-no}" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +$as_echo_n "checking for a working dd... " >&6; } +if ${ac_cv_path_lt_DD+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +if test -z "$lt_DD"; then + ac_path_lt_DD_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in dd; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_lt_DD" || continue +if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi + $ac_path_lt_DD_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_lt_DD"; then + : + fi +else + ac_cv_path_lt_DD=$lt_DD +fi + +rm -f conftest.i conftest2.i conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +$as_echo "$ac_cv_path_lt_DD" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +$as_echo_n "checking how to truncate binary pipes... " >&6; } +if ${lt_cv_truncate_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +$as_echo "$lt_cv_truncate_bin" >&6; } + + + + + + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -6317,24 +6639,25 @@ ia64-*-hpux*) test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE="32" + HPUX_IA64_MODE=32 ;; *ELF-64*) - HPUX_IA64_MODE="64" + HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -6363,9 +6686,50 @@ ia64-*-hpux*) rm -rf conftest* ;; +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -6379,7 +6743,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" @@ -6424,7 +6795,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" + SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } @@ -6464,13 +6835,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then + if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -6482,7 +6854,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } case $lt_cv_prog_gnu_ld in yes*) case $host in - i?86-*-solaris*) + i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) @@ -6491,7 +6863,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" + LD=${LD-ld}_sol2 fi ;; *) @@ -6507,7 +6879,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } ;; esac -need_locks="$enable_libtool_lock" +need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. @@ -6618,7 +6990,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test "x$lt_cv_path_mainfest_tool" != xyes; then +if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi @@ -7121,7 +7493,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then + if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the @@ -7139,7 +7511,7 @@ else cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -7178,7 +7550,7 @@ else fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 @@ -7207,7 +7579,7 @@ _LT_EOF _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -7220,32 +7592,32 @@ fi $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then + if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -7253,6 +7625,41 @@ $as_echo "$lt_cv_ld_force_load" >&6; } ;; esac +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7854,14 +8261,14 @@ if test "${enable_shared+set}" = set; then : *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -7885,14 +8292,14 @@ if test "${enable_static+set}" = set; then : *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -7916,14 +8323,14 @@ if test "${with_pic+set}" = set; then : *) pic_mode=default # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -7931,8 +8338,6 @@ else fi -test -z "$pic_mode" && pic_mode=default - @@ -7948,14 +8353,14 @@ if test "${enable_fast_install+set}" = set; then : *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -7969,11 +8374,63 @@ fi + shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[5-9]*,yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + +# Check whether --with-aix-soname was given. +if test "${with_aix_soname+set}" = set; then : + withval=$with_aix_soname; case $withval in + aix|svr4|both) + ;; + *) + as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname +else + if ${lt_cv_with_aix_soname+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_with_aix_soname=aix +fi + + with_aix_soname=$lt_cv_with_aix_soname +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +$as_echo "$with_aix_soname" >&6; } + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + + + + + + + # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" +LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -8022,7 +8479,7 @@ test -z "$LN_S" && LN_S="ln -s" -if test -n "${ZSH_VERSION+set}" ; then +if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi @@ -8061,7 +8518,7 @@ aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then + if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -8072,14 +8529,14 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -with_gnu_ld="$lt_cv_prog_gnu_ld" +with_gnu_ld=$lt_cv_prog_gnu_ld -old_CC="$CC" -old_CFLAGS="$CFLAGS" +old_CC=$CC +old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -8088,15 +8545,8 @@ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +func_cc_basename $compiler +cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it @@ -8111,22 +8561,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then : else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -f "$ac_dir/${ac_tool_prefix}file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -8149,13 +8599,13 @@ _LT_EOF break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } @@ -8177,22 +8627,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then : else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -f "$ac_dir/file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -8215,13 +8665,13 @@ _LT_EOF break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } @@ -8242,7 +8692,7 @@ esac # Use C for the default configuration in the libtool script -lt_save_CC="$CC" +lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -8304,7 +8754,7 @@ if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; @@ -8320,7 +8770,7 @@ else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" + lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -8350,7 +8800,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then +if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : @@ -8368,17 +8818,18 @@ lt_prog_compiler_pic= lt_prog_compiler_static= - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi + lt_prog_compiler_pic='-fPIC' ;; amigaos*) @@ -8389,8 +8840,8 @@ lt_prog_compiler_static= ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -8406,6 +8857,11 @@ lt_prog_compiler_static= # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac ;; darwin* | rhapsody*) @@ -8476,7 +8932,7 @@ lt_prog_compiler_static= case $host_os in aix*) lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else @@ -8484,10 +8940,29 @@ lt_prog_compiler_static= fi ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac ;; hpux9* | hpux10* | hpux11*) @@ -8503,7 +8978,7 @@ lt_prog_compiler_static= ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' + lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -8512,9 +8987,9 @@ lt_prog_compiler_static= lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. + # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' @@ -8539,6 +9014,12 @@ lt_prog_compiler_static= lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -8636,7 +9117,7 @@ lt_prog_compiler_static= ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi @@ -8665,7 +9146,7 @@ lt_prog_compiler_static= fi case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; @@ -8697,7 +9178,7 @@ else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -8727,7 +9208,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then +if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; @@ -8759,7 +9240,7 @@ if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -8778,13 +9259,13 @@ else fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } -if test x"$lt_cv_prog_compiler_static_works" = xyes; then +if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= @@ -8904,8 +9385,8 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } @@ -8917,9 +9398,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; } ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + if test no = "$hard_links"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -8962,9 +9443,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if @@ -8979,7 +9460,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. - if test "$GCC" != yes; then + if test yes != "$GCC"; then with_gnu_ld=no fi ;; @@ -8987,9 +9468,12 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd*) + openbsd* | bitrig*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs=no + ;; esac ld_shlibs=yes @@ -8997,7 +9481,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility @@ -9019,24 +9503,24 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie esac fi - if test "$lt_use_gnu_ld_interface" = yes; then + if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no - case `$LD -v 2>&1` in + case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -9049,7 +9533,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then + if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 @@ -9068,7 +9552,7 @@ _LT_EOF case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -9084,7 +9568,7 @@ _LT_EOF allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi @@ -9094,7 +9578,7 @@ _LT_EOF # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' + export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes @@ -9102,61 +9586,89 @@ _LT_EOF exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + ;; + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no - if test "$host_os" = linux-dietlibc; then + if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no + && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -9167,42 +9679,47 @@ _LT_EOF lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in + tcc*) + export_dynamic_flag_spec='-rdynamic' + ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -9211,13 +9728,13 @@ _LT_EOF fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -9235,8 +9752,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -9248,7 +9765,7 @@ _LT_EOF ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify @@ -9263,9 +9780,9 @@ _LT_EOF # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -9282,15 +9799,15 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac - if test "$ld_shlibs" = no; then + if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= @@ -9306,7 +9823,7 @@ _LT_EOF # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported @@ -9314,34 +9831,57 @@ _LT_EOF ;; aix[4-9]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -9360,13 +9900,21 @@ _LT_EOF hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes - file_list_spec='${wl}-f,' + file_list_spec='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct=no + hardcode_direct_absolute=no + ;; + esac - if test "$GCC" = yes; then + if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -9385,35 +9933,42 @@ _LT_EOF ;; esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - export_dynamic_flag_spec='${wl}-bexpall' + export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then + if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : @@ -9448,7 +10003,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" + lt_cv_aix_libpath_=/usr/lib:/lib fi fi @@ -9456,17 +10011,17 @@ fi aix_libpath=$lt_cv_aix_libpath_ fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then + if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : @@ -9501,7 +10056,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" + lt_cv_aix_libpath_=/usr/lib:/lib fi fi @@ -9509,21 +10064,33 @@ fi aix_libpath=$lt_cv_aix_libpath_ fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + no_undefined_flag=' $wl-bernotok' + allow_undefined_flag=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -9532,7 +10099,7 @@ fi case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -9562,16 +10129,17 @@ fi # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes @@ -9580,18 +10148,18 @@ fi # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # Assume MSVC wrapper @@ -9600,7 +10168,7 @@ fi # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. @@ -9619,24 +10187,24 @@ fi hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" + allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then + if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no @@ -9678,33 +10246,33 @@ fi ;; hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GCC"; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + 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 - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' ;; hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test yes,no = "$GCC,$with_gnu_ld"; then + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes @@ -9712,25 +10280,25 @@ fi ;; hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then + if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) @@ -9742,7 +10310,7 @@ if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -9761,14 +10329,14 @@ else fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +if test yes = "$lt_cv_prog_compiler__b"; then + archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -9776,8 +10344,8 @@ fi ;; esac fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in @@ -9788,7 +10356,7 @@ fi *) hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -9799,8 +10367,8 @@ fi ;; irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. @@ -9810,8 +10378,8 @@ $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " > if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } @@ -9823,25 +10391,36 @@ else fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test "$lt_cv_irix_exported_symbol" = yes; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi + link_all_deplibs=no else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; - netbsd*) + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + ld_shlibs=yes + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -9855,7 +10434,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; @@ -9863,27 +10442,19 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } *nto* | *qnx*) ;; - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no @@ -9894,33 +10465,53 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes ;; osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -9931,24 +10522,24 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } solaris*) no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + wlarc='$wl' + archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + wlarc='$wl' + archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -9958,11 +10549,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', + # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + if test yes = "$GCC"; then + whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi @@ -9972,10 +10563,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } ;; sunos4*) - if test "x$host_vendor" = xsequent; then + if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi @@ -10024,43 +10615,43 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' + no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' + no_undefined_flag='$wl-z,text' + allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' + export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; @@ -10075,10 +10666,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } ;; esac - if test x$host_vendor = xsni; then + if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' + export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi @@ -10086,7 +10677,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no +test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -10112,7 +10703,7 @@ x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -10327,14 +10918,14 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; + mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in @@ -10350,28 +10941,35 @@ if test "$GCC" = yes; then ;; esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. + # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; + lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } @@ -10385,7 +10983,7 @@ BEGIN {RS=" "; FS="/|\n";} { # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; + $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else @@ -10394,7 +10992,7 @@ fi library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -10411,14 +11009,16 @@ hardcode_into_libs=no # flags to be left without arguments need_version=unknown + + case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' + soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) @@ -10426,41 +11026,91 @@ aix[4-9]*) need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -10470,18 +11120,18 @@ amigaos*) powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='${libname}${shared_ext}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -10489,8 +11139,8 @@ beos*) bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -10502,7 +11152,7 @@ bsdi[45]*) cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll need_version=no need_lib_prefix=no @@ -10511,8 +11161,8 @@ cygwin* | mingw* | pw32* | cegcc*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ @@ -10528,17 +11178,17 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' @@ -10547,8 +11197,8 @@ cygwin* | mingw* | pw32* | cegcc*) *,cl*) # Native MSVC libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' case $build_os in mingw*) @@ -10575,7 +11225,7 @@ cygwin* | mingw* | pw32* | cegcc*) sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec="$LIB" + sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -10588,8 +11238,8 @@ cygwin* | mingw* | pw32* | cegcc*) esac # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' @@ -10602,7 +11252,7 @@ cygwin* | mingw* | pw32* | cegcc*) *) # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -10615,8 +11265,8 @@ darwin* | rhapsody*) version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -10629,8 +11279,8 @@ dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -10648,12 +11298,13 @@ freebsd* | dragonfly*) version_type=freebsd-$objformat case $version_type in freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac @@ -10678,26 +11329,15 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -haiku*) +haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -10715,14 +11355,15 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -10730,8 +11371,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -10740,8 +11381,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... @@ -10754,8 +11395,8 @@ interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -10766,7 +11407,7 @@ irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -10774,8 +11415,8 @@ irix5* | irix6* | nonstopux*) esac need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -10794,8 +11435,8 @@ irix5* | irix6* | nonstopux*) esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; @@ -10804,13 +11445,33 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + hardcode_libdir_flag_spec='-L$libdir' + ;; + # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -10854,14 +11515,15 @@ fi # before this can be enabled. hardcode_into_libs=yes - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - - # Append ld.so.conf contents to the search path + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -10873,17 +11535,29 @@ fi dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -10893,7 +11567,7 @@ netbsd*) newsos6) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; @@ -10902,58 +11576,68 @@ newsos6) version_type=qnx need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no else - shlibpath_overrides_runpath=yes + need_version=yes fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH 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" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -10964,8 +11648,8 @@ solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes @@ -10975,11 +11659,11 @@ solaris*) sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes @@ -10987,8 +11671,8 @@ sunos4*) sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) @@ -11009,24 +11693,24 @@ sysv4 | sysv4.3*) ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=sco need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -11044,7 +11728,7 @@ tpf*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -11052,8 +11736,8 @@ tpf*) uts4*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -11063,20 +11747,35 @@ uts4*) esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + + + + @@ -11173,15 +11872,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then + test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && + if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && + test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else @@ -11196,12 +11895,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then +if test relink = "$hardcode_action" || + test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -11211,7 +11910,7 @@ fi - if test "x$enable_dlopen" != xyes; then + if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -11221,23 +11920,23 @@ else case $host_os in beos*) - lt_cv_dlopen="load_add_on" + lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : @@ -11275,10 +11974,10 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else - lt_cv_dlopen="dyld" + lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes @@ -11286,10 +11985,18 @@ fi ;; + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" + lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } @@ -11328,11 +12035,11 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" + lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } @@ -11371,7 +12078,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } @@ -11410,7 +12117,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } @@ -11449,7 +12156,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" + lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi @@ -11470,21 +12177,21 @@ fi ;; esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else + if test no = "$lt_cv_dlopen"; then enable_dlopen=no + else + enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS="$LIBS" + save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 @@ -11492,7 +12199,7 @@ $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -11539,9 +12246,9 @@ else # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -11571,7 +12278,7 @@ _LT_EOF (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -11591,14 +12298,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } - if test "x$lt_cv_dlopen_self" = xyes; then + if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -11645,9 +12352,9 @@ else # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -11677,7 +12384,7 @@ _LT_EOF (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -11698,9 +12405,9 @@ fi $as_echo "$lt_cv_dlopen_self_static" >&6; } fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS ;; esac @@ -11744,7 +12451,7 @@ else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP" ; then + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -11772,7 +12479,7 @@ fi - # Report which library types will actually be built + # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 @@ -11780,13 +12487,13 @@ $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -11794,8 +12501,12 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } ;; aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -11805,7 +12516,7 @@ $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } @@ -11819,7 +12530,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -CC="$lt_save_CC" +CC=$lt_save_CC @@ -12053,7 +12764,7 @@ else #include int -main () +main (void) { unsigned int major, minor, micro; @@ -12444,10 +13155,16 @@ $as_echo_n "checking for Win32... " >&6; } case "$host" in *-*-mingw*) os_win32=yes + os_linux=yes CFLAGS="$CFLAGS -D_REENTRANT" ;; + *-*-linux*) + os_win32=no + os_linux=yes + ;; *) os_win32=no + os_linux=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $os_win32" >&5 @@ -12460,6 +13177,14 @@ else OS_WIN32_FALSE= fi + if test $os_linux = yes; then + OS_LINUX_TRUE= + OS_LINUX_FALSE='#' +else + OS_LINUX_TRUE='#' + OS_LINUX_FALSE= +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 @@ -13052,10 +13777,13 @@ fi +# gtkdocize greps for ^GTK_DOC_CHECK and parses it, so you need to have +# it on it's own line. + - gtk_doc_requires="gtk-doc >= 1.10" + gtk_doc_requires="gtk-doc >= 1.20" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk-doc" >&5 $as_echo_n "checking for gtk-doc... " >&6; } if test -n "$PKG_CONFIG" && \ @@ -13426,6 +14154,7 @@ fi + # Check whether --enable-introspection was given. if test "${enable_introspection+set}" = set; then : enableval=$enable_introspection; @@ -13517,85 +14246,29 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glib-networking (glib TLS implementation)" >&5 -$as_echo_n "checking for glib-networking (glib TLS implementation)... " >&6; } -save_CFLAGS="$CFLAGS" -save_LIBS="$LIBS" -CFLAGS="$CFLAGS $GLIB_CFLAGS" -LIBS="$LIBS $GLIB_LIBS" -if test "$cross_compiling" = yes; then : - have_glib_networking="unknown (cross-compiling)" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -return !g_tls_backend_supports_tls (g_tls_backend_get_default ()); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - have_glib_networking=yes -else - have_glib_networking=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -CFLAGS="$save_CFLAGS" -LIBS="$save_LIBS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glib_networking" >&5 -$as_echo "$have_glib_networking" >&6; } - -# Check whether --enable-tls-check was given. -if test "${enable_tls_check+set}" = set; then : - enableval=$enable_tls_check; -fi - -if test "$enable_tls_check" != "no" -a "$have_glib_networking" = "no"; then - as_fn_error $? "libsoup requires glib-networking for TLS support. - -If you are building a package, you can pass --disable-tls-check to -allow building libsoup anyway (since glib-networking is not actually -required at compile time), but you should be sure to add a runtime -dependency on it." "$LINENO" 5 +if test "$found_introspection" != "yes" -a "$enable_vala" = ""; then + enable_vala=no fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for programs needed for regression tests" >&5 -$as_echo "$as_me: checking for programs needed for regression tests" >&6;} - - -# Check whether --with-apache-httpd was given. -if test "${with_apache_httpd+set}" = set; then : - withval=$with_apache_httpd; APACHE_HTTPD="$withval" -else - for ac_prog in httpd2 httpd apache2 apache -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 +# Extract the first word of "valac", so it can be a program name with args. +set dummy valac; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_APACHE_HTTPD+:} false; then : +if ${ac_cv_path_VALAC+:} false; then : $as_echo_n "(cached) " >&6 else - case $APACHE_HTTPD in + case $VALAC in [\\/]* | ?:[\\/]*) - ac_cv_path_APACHE_HTTPD="$APACHE_HTTPD" # Let the user override the test with a path. + ac_cv_path_VALAC="$VALAC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy="${PATH}:/usr/sbin" -for as_dir in $as_dummy +for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_APACHE_HTTPD="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_VALAC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -13603,147 +14276,711 @@ done done IFS=$as_save_IFS + test -z "$ac_cv_path_VALAC" && ac_cv_path_VALAC="valac" ;; esac fi -APACHE_HTTPD=$ac_cv_path_APACHE_HTTPD -if test -n "$APACHE_HTTPD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $APACHE_HTTPD" >&5 -$as_echo "$APACHE_HTTPD" >&6; } +VALAC=$ac_cv_path_VALAC +if test -n "$VALAC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALAC" >&5 +$as_echo "$VALAC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$APACHE_HTTPD" && break -done -test -n "$APACHE_HTTPD" || APACHE_HTTPD="no" - + if test "$VALAC" != valac && test -n ""; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $VALAC is at least version " >&5 +$as_echo_n "checking whether $VALAC is at least version ... " >&6; } + am__vala_version=`$VALAC --version | sed 's/Vala *//'` + as_arg_v1= +as_arg_v2="$am__vala_version" +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ;; #( + 0) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ;; #( + 2) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + VALAC=valac ;; #( + *) : + ;; +esac fi + if test "$VALAC" = valac; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no proper vala compiler found" >&5 +$as_echo "$as_me: WARNING: no proper vala compiler found" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: you will not be able to compile vala source files" >&5 +$as_echo "$as_me: WARNING: you will not be able to compile vala source files" >&2;} + else + : + fi -if test "$APACHE_HTTPD" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Apache version" >&5 -$as_echo_n "checking Apache version... " >&6; } - apache_version=`$APACHE_HTTPD -v 2>/dev/null | sed -ne 's/Server version: Apache\///p'` - case $apache_version in - 2.2.*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apache_version (ok)" >&5 -$as_echo "$apache_version (ok)" >&6; } - apache_version=2.2 - ;; - 2.4.*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apache_version (ok)" >&5 -$as_echo "$apache_version (ok)" >&6; } - apache_version=2.4 - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apache_version (ignoring)" >&5 -$as_echo "$apache_version (ignoring)" >&6; } - APACHE_HTTPD="no" - ;; - esac -fi -cat >>confdefs.h <<_ACEOF -#define APACHE_HTTPD "$APACHE_HTTPD" -_ACEOF + # Check whether --enable-vala was given. +if test "${enable_vala+set}" = set; then : + enableval=$enable_vala; +else -if test "$APACHE_HTTPD" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Apache module directory" >&5 -$as_echo_n "checking for Apache module directory... " >&6; } + if test "x" = "x"; then : + + enable_vala=auto -# Check whether --with-apache-module-dir was given. -if test "${with_apache_module_dir+set}" = set; then : - withval=$with_apache_module_dir; apache_module_dirs="$withval" else - apache_prefix=`dirname \`dirname $APACHE_HTTPD\`` - mpm=`$APACHE_HTTPD -V -C "ServerName localhost" | sed -ne 's/^Server MPM: */-/p' | tr 'A-Z' 'a-z'` - # This only works with bash, but should fail harmlessly in sh - apache_module_dirs=`echo $apache_prefix/lib{64,}/{apache,apache2,http,http2,httpd}{$mpm,}{/modules,}` + + enable_vala= + fi - for dir in $apache_module_dirs; do - if test -f $dir/mod_auth_digest.so; then - APACHE_MODULE_DIR="$dir" - fi - if test -f $dir/mod_ssl.so; then - APACHE_SSL_MODULE_DIR="$dir" - IF_HAVE_APACHE_SSL="" - fi - if test -f $dir/mod_php5.so; then - APACHE_PHP_MODULE_DIR="$dir" - APACHE_PHP_MODULE=mod_php5.so - fi - if test -f $dir/libphp5.so; then - APACHE_PHP_MODULE_DIR="$dir" - APACHE_PHP_MODULE=libphp5.so - fi - done - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $APACHE_MODULE_DIR" >&5 -$as_echo "$APACHE_MODULE_DIR" >&6; } +fi + if test "x$enable_vala" = "xyes" -o "x$enable_vala" = "xauto"; then : + if test "x" != "xyes" -a "x$found_introspection" != "xyes"; then : + as_fn_error $? "Vala bindings require GObject Introspection" "$LINENO" 5 fi -if test "$APACHE_HTTPD" != "no" -a -n "$APACHE_MODULE_DIR" -a -n "$APACHE_SSL_MODULE_DIR"; then - -$as_echo "#define HAVE_APACHE 1" >>confdefs.h +else - if test $apache_version = 2.2; then + if test "x$enable_vala" != "no"; then : -$as_echo "#define HAVE_APACHE_2_2 1" >>confdefs.h + vapigen_pkg_found=no - else +else -$as_echo "#define HAVE_APACHE_2_4 1" >>confdefs.h + as_fn_error $? "Invalid argument passed to --enable-vala, should be one of [no/auto/yes]" "$LINENO" 5 - fi - have_apache=1 -else - have_apache=0 fi - if test "$have_apache" = 1; then - HAVE_APACHE_TRUE= - HAVE_APACHE_FALSE='#' -else - HAVE_APACHE_TRUE='#' - HAVE_APACHE_FALSE= + fi + if test "x" = "x"; then : + + vapigen_pkg_name=vapigen - if test "$apache_version" = 2.2; then - HAVE_APACHE_2_2_TRUE= - HAVE_APACHE_2_2_FALSE='#' else - HAVE_APACHE_2_2_TRUE='#' - HAVE_APACHE_2_2_FALSE= + + vapigen_pkg_name=vapigen- + fi + if test "x" = "x"; then : + + vapigen_pkg="$vapigen_pkg_name" - if test "$apache_version" = 2.4; then - HAVE_APACHE_2_4_TRUE= - HAVE_APACHE_2_4_FALSE='#' else - HAVE_APACHE_2_4_TRUE='#' - HAVE_APACHE_2_4_FALSE= + + vapigen_pkg="$vapigen_pkg_name >= " + fi + if test "x$enable_vala" = "xyes" -o "x$enable_vala" = "xauto"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vapigen $vapigen_pkg_name" >&5 +$as_echo_n "checking for vapigen $vapigen_pkg_name... " >&6; } + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" \$vapigen_pkg \""; } >&5 + ($PKG_CONFIG --exists --print-errors " $vapigen_pkg ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then -if test "$have_apache" = 1; then - for ac_prog in php php5 -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } + vapigen_pkg_found=yes + +else + + vapigen_pkg_found=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Searching for $vapigen_pkg_name program..." >&5 +$as_echo "$as_me: Searching for $vapigen_pkg_name program..." >&6;} + # Extract the first word of "$vapigen_pkg_name", so it can be a program name with args. +set dummy $vapigen_pkg_name; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_VAPIGEN+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $VAPIGEN in + [\\/]* | ?:[\\/]*) + ac_cv_path_VAPIGEN="$VAPIGEN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_VAPIGEN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_VAPIGEN" && ac_cv_path_VAPIGEN="no" + ;; +esac +fi +VAPIGEN=$ac_cv_path_VAPIGEN +if test -n "$VAPIGEN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VAPIGEN" >&5 +$as_echo "$VAPIGEN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$VAPIGEN" = "xno" + then + check_prog=no + else + check_prog=yes + fi + +fi + + case $vapigen_pkg_found in #( + yes) : + + VAPIGEN=`$PKG_CONFIG --variable=vapigen vapigen` + VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir vapigen`/vala/Makefile.vapigen + VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen` + if test "x" = "x"; then : + + VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen` + +else + + VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned vapigen` + +fi + ;; #( + no) : + + case $check_prog in #( + no) : + + as_fn_error $? "Can't locate $vapigen_pkg program" "$LINENO" 5 + ;; #( + yes) : + + if test "x" = "x"; then : + + vala_pkg_name=libvala + +else + + vala_pkg_name=libvala- + +fi + if test "x" = "x"; then : + + vala_pkg="$vala_pkg_name" + +else + + vala_pkg="$vala_pkg_name >= " + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $vala_pkg" >&5 +$as_echo_n "checking for $vala_pkg... " >&6; } + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$vala_pkg\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$vala_pkg") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + + VALA_DATADIR=`pkg-config $vala_pkg --variable=datadir` + VAPIDIR="$VALA_DATADIR/vala/vapi" + VAPIGEN_MAKEFILE="$VALA_DATADIR/vala/Makefile.vapigen" + if test "x" = "x"; then : + + VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen` + +else + + VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned vapigen` + +fi + vapigen_pkg_found=yes + +else + + case $enable_vala in #( + yes) : + + as_fn_error $? "$vala_pkg not found" "$LINENO" 5 + ;; #( + auto) : + + vapigen_pkg_found=no + ;; #( + *) : + ;; +esac + +fi + ;; #( + *) : + ;; +esac + ;; #( + *) : + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vapigen_pkg_found" >&5 +$as_echo "$vapigen_pkg_found" >&6; } + + + +fi + + + + + + if test "x$vapigen_pkg_found" = "xyes"; then + ENABLE_VAPIGEN_TRUE= + ENABLE_VAPIGEN_FALSE='#' +else + ENABLE_VAPIGEN_TRUE='#' + ENABLE_VAPIGEN_FALSE= +fi + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glib-networking (glib TLS implementation)" >&5 +$as_echo_n "checking for glib-networking (glib TLS implementation)... " >&6; } +save_CFLAGS="$CFLAGS" +save_LIBS="$LIBS" +CFLAGS="$CFLAGS $GLIB_CFLAGS" +LIBS="$LIBS $GLIB_LIBS" +if test "$cross_compiling" = yes; then : + have_glib_networking="unknown (cross-compiling)" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +return !g_tls_backend_supports_tls (g_tls_backend_get_default ()); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + have_glib_networking=yes +else + have_glib_networking=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +CFLAGS="$save_CFLAGS" +LIBS="$save_LIBS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glib_networking" >&5 +$as_echo "$have_glib_networking" >&6; } + +# Check whether --enable-tls-check was given. +if test "${enable_tls_check+set}" = set; then : + enableval=$enable_tls_check; +fi + +if test "$enable_tls_check" != "no" -a "$have_glib_networking" = "no"; then + as_fn_error $? "libsoup requires glib-networking for TLS support. + +If you are building a package, you can pass --disable-tls-check to +allow building libsoup anyway (since glib-networking is not actually +required at compile time), but you should be sure to add a runtime +dependency on it." "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for programs needed for regression tests" >&5 +$as_echo "$as_me: checking for programs needed for regression tests" >&6;} + + +# Check whether --with-apache-httpd was given. +if test "${with_apache_httpd+set}" = set; then : + withval=$with_apache_httpd; APACHE_HTTPD="$withval" +else + for ac_prog in httpd2 httpd apache2 apache +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_APACHE_HTTPD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $APACHE_HTTPD in + [\\/]* | ?:[\\/]*) + ac_cv_path_APACHE_HTTPD="$APACHE_HTTPD" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="${PATH}:/usr/sbin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_APACHE_HTTPD="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +APACHE_HTTPD=$ac_cv_path_APACHE_HTTPD +if test -n "$APACHE_HTTPD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $APACHE_HTTPD" >&5 +$as_echo "$APACHE_HTTPD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$APACHE_HTTPD" && break +done +test -n "$APACHE_HTTPD" || APACHE_HTTPD="no" + +fi + +if test "$APACHE_HTTPD" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Apache version" >&5 +$as_echo_n "checking Apache version... " >&6; } + apache_version=`$APACHE_HTTPD -v 2>/dev/null | sed -ne 's/Server version: Apache\///p'` + case $apache_version in + 2.4.*) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apache_version (ok)" >&5 +$as_echo "$apache_version (ok)" >&6; } + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apache_version (ignoring)" >&5 +$as_echo "$apache_version (ignoring)" >&6; } + APACHE_HTTPD="no" + ;; + esac +fi + + +cat >>confdefs.h <<_ACEOF +#define APACHE_HTTPD "$APACHE_HTTPD" +_ACEOF + + +if test "$APACHE_HTTPD" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Apache module directory" >&5 +$as_echo_n "checking for Apache module directory... " >&6; } + +# Check whether --with-apache-module-dir was given. +if test "${with_apache_module_dir+set}" = set; then : + withval=$with_apache_module_dir; apache_module_dirs="$withval" +else + apache_prefix=`dirname \`dirname $APACHE_HTTPD\`` + mpm=`$APACHE_HTTPD -V -C "ServerName localhost" | sed -ne 's/^Server MPM: */-/p' | tr 'A-Z' 'a-z'` + # This only works with bash, but should fail harmlessly in sh + apache_module_dirs=`echo $apache_prefix/lib{64,}/{apache,apache2,http,http2,httpd}{$mpm,}{/modules,}` +fi + + for dir in $apache_module_dirs; do + if test -f $dir/mod_auth_digest.so; then + APACHE_MODULE_DIR="$dir" + fi + if test -f $dir/mod_ssl.so; then + APACHE_SSL_MODULE_DIR="$dir" + IF_HAVE_APACHE_SSL="" + fi + if test -f $dir/libphp7.so; then + APACHE_PHP_MODULE_DIR="$dir" + fi + done + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $APACHE_MODULE_DIR" >&5 +$as_echo "$APACHE_MODULE_DIR" >&6; } + + + +fi + +if test "$APACHE_HTTPD" != "no" -a -n "$APACHE_MODULE_DIR" -a -n "$APACHE_SSL_MODULE_DIR"; then + +$as_echo "#define HAVE_APACHE 1" >>confdefs.h + + have_apache=1 +else + have_apache=0 +fi + if test "$have_apache" = 1; then + HAVE_APACHE_TRUE= + HAVE_APACHE_FALSE='#' +else + HAVE_APACHE_TRUE='#' + HAVE_APACHE_FALSE= +fi + + +if test "$have_apache" = 1; then + for ac_prog in php +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PHP+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$PHP"; then - ac_cv_prog_PHP="$PHP" # Let the user override the test. + if test -n "$PHP"; then + ac_cv_prog_PHP="$PHP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PHP="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PHP=$ac_cv_prog_PHP +if test -n "$PHP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PHP" >&5 +$as_echo "$PHP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PHP" && break +done + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Apache PHP module" >&5 +$as_echo_n "checking for Apache PHP module... " >&6; } + if test -d "$APACHE_PHP_MODULE_DIR"; then + have_php="yes" + IF_HAVE_PHP="" + else + have_php="no" + IF_HAVE_PHP="#" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_php" >&5 +$as_echo "$have_php" >&6; } + + + if test "$have_php" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for php-xmlrpc" >&5 +$as_echo_n "checking for php-xmlrpc... " >&6; } + if $PHP --rf xmlrpc_server_create | grep -q "does not exist"; then + have_php_xmlrpc=no + else + have_php_xmlrpc=yes + +$as_echo "#define HAVE_PHP_XMLRPC 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_php_xmlrpc" >&5 +$as_echo "$have_php_xmlrpc" >&6; } + fi + + if test -f "$APACHE_MODULE_DIR/mod_unixd.so"; then + IF_HAVE_MOD_UNIXD="" + else + IF_HAVE_MOD_UNIXD="#" + fi + +fi + +# Extract the first word of "curl", so it can be a program name with args. +set dummy curl; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_CURL+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $CURL in + [\\/]* | ?:[\\/]*) + ac_cv_path_CURL="$CURL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_CURL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_CURL" && ac_cv_path_CURL="no" + ;; +esac +fi +CURL=$ac_cv_path_CURL +if test -n "$CURL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL" >&5 +$as_echo "$CURL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "$CURL" != no; then + +$as_echo "#define HAVE_CURL 1" >>confdefs.h + +fi + + +# Check whether --with-ntlm-auth was given. +if test "${with_ntlm_auth+set}" = set; then : + withval=$with_ntlm_auth; ntlm_auth="$withval" +else + if test $os_win32 = yes; then ntlm_auth="no"; else ntlm_auth="/usr/bin/ntlm_auth"; fi +fi + +if test "$ntlm_auth" != "no"; then + +$as_echo "#define USE_NTLM_AUTH 1" >>confdefs.h + + if test "$ntlm_auth" = "yes"; then + ntlm_auth="/usr/bin/ntlm_auth" + fi +fi + + +cat >>confdefs.h <<_ACEOF +#define NTLM_AUTH "$ntlm_auth" +_ACEOF + + + + + + # allow to override gcov location + +# Check whether --with-gcov was given. +if test "${with_gcov+set}" = set; then : + withval=$with_gcov; _AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov +else + _AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with code coverage support" >&5 +$as_echo_n "checking whether to build with code coverage support... " >&6; } + # Check whether --enable-code-coverage was given. +if test "${enable_code_coverage+set}" = set; then : + enableval=$enable_code_coverage; +else + enable_code_coverage=no +fi + + + if test x$enable_code_coverage = xyes; then + CODE_COVERAGE_ENABLED_TRUE= + CODE_COVERAGE_ENABLED_FALSE='#' +else + CODE_COVERAGE_ENABLED_TRUE='#' + CODE_COVERAGE_ENABLED_FALSE= +fi + + CODE_COVERAGE_ENABLED=$enable_code_coverage + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_code_coverage" >&5 +$as_echo "$enable_code_coverage" >&6; } + + if test "$enable_code_coverage" = "yes" ; then : + + # check for gcov + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. +set dummy ${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GCOV"; then + ac_cv_prog_GCOV="$GCOV" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GCOV="${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GCOV=$ac_cv_prog_GCOV +if test -n "$GCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5 +$as_echo "$GCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_GCOV"; then + ac_ct_GCOV=$GCOV + # Extract the first word of "$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. +set dummy $_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_GCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_GCOV"; then + ac_cv_prog_ac_ct_GCOV="$ac_ct_GCOV" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -13752,7 +14989,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PHP="$ac_prog" + ac_cv_prog_ac_ct_GCOV="$_AX_CODE_COVERAGE_GCOV_PROG_WITH" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -13762,69 +14999,330 @@ IFS=$as_save_IFS fi fi -PHP=$ac_cv_prog_PHP -if test -n "$PHP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PHP" >&5 -$as_echo "$PHP" >&6; } +ac_ct_GCOV=$ac_cv_prog_ac_ct_GCOV +if test -n "$ac_ct_GCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GCOV" >&5 +$as_echo "$ac_ct_GCOV" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + if test "x$ac_ct_GCOV" = x; then + GCOV=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + GCOV=$ac_ct_GCOV + fi +else + GCOV="$ac_cv_prog_GCOV" +fi + + if test "X$GCOV" = "X:"; then : + as_fn_error $? "gcov is needed to do coverage" "$LINENO" 5 +fi + - test -n "$PHP" && break + if test "$GCC" = "no" ; then : + + as_fn_error $? "not compiling with gcc, which is required for gcov code coverage" "$LINENO" 5 + +fi + + # List of supported lcov versions. + lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12" + + # Extract the first word of "lcov", so it can be a program name with args. +set dummy lcov; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LCOV"; then + ac_cv_prog_LCOV="$LCOV" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LCOV="lcov" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS + +fi +fi +LCOV=$ac_cv_prog_LCOV +if test -n "$LCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5 +$as_echo "$LCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Apache PHP module" >&5 -$as_echo_n "checking for Apache PHP module... " >&6; } - if test -f $APACHE_PHP_MODULE_DIR/$APACHE_PHP_MODULE; then - have_php=yes - IF_HAVE_PHP="" - else - have_php=no - IF_HAVE_PHP="\#" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_php" >&5 -$as_echo "$have_php" >&6; } + # Extract the first word of "genhtml", so it can be a program name with args. +set dummy genhtml; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GENHTML+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GENHTML"; then + ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GENHTML="genhtml" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +GENHTML=$ac_cv_prog_GENHTML +if test -n "$GENHTML"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5 +$as_echo "$GENHTML" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - if test "$have_php" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for php-xmlrpc" >&5 -$as_echo_n "checking for php-xmlrpc... " >&6; } - if $PHP --rf xmlrpc_server_create | grep -q "does not exist"; then - have_php_xmlrpc=no - else - have_php_xmlrpc=yes -$as_echo "#define HAVE_PHP_XMLRPC 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_php_xmlrpc" >&5 -$as_echo "$have_php_xmlrpc" >&6; } - fi + if test "$LCOV" ; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcov version" >&5 +$as_echo_n "checking for lcov version... " >&6; } +if ${ax_cv_lcov_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_cv_lcov_version=invalid + lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'` + for lcov_check_version in $lcov_version_list; do + if test "$lcov_version" = "$lcov_check_version"; then + ax_cv_lcov_version="$lcov_check_version (ok)" + fi + done + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lcov_version" >&5 +$as_echo "$ax_cv_lcov_version" >&6; } -# Extract the first word of "curl", so it can be a program name with args. -set dummy curl; ac_word=$2 +else + + lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list" + as_fn_error $? "$lcov_msg" "$LINENO" 5 + +fi + + case $ax_cv_lcov_version in + ""|invalid) + lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)." + as_fn_error $? "$lcov_msg" "$LINENO" 5 + LCOV="exit 0;" + ;; + esac + + if test -z "$GENHTML" ; then : + + as_fn_error $? "Could not find genhtml from the lcov package" "$LINENO" 5 + +fi + + CODE_COVERAGE_CPPFLAGS="-DNDEBUG" + CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_LDFLAGS="-lgcov" + + + + + + +fi + +CODE_COVERAGE_RULES=' +# Code coverage +# +# Optional: +# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. +# Multiple directories may be specified, separated by whitespace. +# (Default: $(top_builddir)) +# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated +# by lcov for code coverage. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info) +# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage +# reports to be created. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) +# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, +# set to 0 to disable it and leave empty to stay with the default. +# (Default: empty) +# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov +# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov +# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov +# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the +# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov +# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering +# lcov instance. (Default: empty) +# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov +# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the +# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml +# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) +# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore +# +# The generated report will be titled using the $(PACKAGE_NAME) and +# $(PACKAGE_VERSION). In order to add the current git hash to the title, +# use the git-version-gen script, available online. + +# Optional variables +CODE_COVERAGE_DIRECTORY ?= $(top_builddir) +CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info +CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage +CODE_COVERAGE_BRANCH_COVERAGE ?= +CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" +CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= +CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ +$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS) +CODE_COVERAGE_IGNORE_PATTERN ?= + +code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) +code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ + $(CODE_COVERAGE_OUTPUT_FILE); +code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) +code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ + $(CODE_COVERAGE_IGNORE_PATTERN); +code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) +code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); +code_coverage_quiet = $(code_coverage_quiet_$(V)) +code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) +code_coverage_quiet_0 = --quiet + +# sanitizes the test-name: replaces with underscores: dashes and dots +code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) + +# Use recursive makes in order to ignore errors during check +check-code-coverage: +ifeq ($(CODE_COVERAGE_ENABLED),yes) + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture +else + @echo "Need to reconfigure with --enable-code-coverage" +endif + +# Capture code coverage data +code-coverage-capture: code-coverage-capture-hook +ifeq ($(CODE_COVERAGE_ENABLED),yes) + $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) + $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) + -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp + $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) + @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" +else + @echo "Need to reconfigure with --enable-code-coverage" +endif + +# Hook rule executed before code-coverage-capture, overridable by the user +code-coverage-capture-hook: + +ifeq ($(CODE_COVERAGE_ENABLED),yes) +clean: code-coverage-clean +distclean: code-coverage-clean +code-coverage-clean: + -$(LCOV) --directory $(top_builddir) -z + -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete +endif + +GITIGNOREFILES ?= +GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) + +A''M_DISTCHECK_CONFIGURE_FLAGS ?= +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage + +.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean +' + + + + + + +# Check whether --with-gssapi was given. +if test "${with_gssapi+set}" = set; then : + withval=$with_gssapi; +fi + + +if test "$with_gssapi" != "no"; then + +# Check whether --with-krb5-config was given. +if test "${with_krb5_config+set}" = set; then : + withval=$with_krb5_config; KRB5_CONFIG="$withval" +else + for ac_prog in krb5-config +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_CURL+:} false; then : +if ${ac_cv_path_KRB5_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else - case $CURL in + case $KRB5_CONFIG in [\\/]* | ?:[\\/]*) - ac_cv_path_CURL="$CURL" # Let the user override the test with a path. + ac_cv_path_KRB5_CONFIG="$KRB5_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH +as_dummy="${PATH}:/usr/kerberos/bin" +for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_CURL="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_KRB5_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -13832,50 +15330,44 @@ done done IFS=$as_save_IFS - test -z "$ac_cv_path_CURL" && ac_cv_path_CURL="no" ;; esac fi -CURL=$ac_cv_path_CURL -if test -n "$CURL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL" >&5 -$as_echo "$CURL" >&6; } +KRB5_CONFIG=$ac_cv_path_KRB5_CONFIG +if test -n "$KRB5_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5_CONFIG" >&5 +$as_echo "$KRB5_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -if test "$CURL" != no; then - -$as_echo "#define HAVE_CURL 1" >>confdefs.h + test -n "$KRB5_CONFIG" && break +done +test -n "$KRB5_CONFIG" || KRB5_CONFIG="no" fi -# Check whether --with-ntlm-auth was given. -if test "${with_ntlm_auth+set}" = set; then : - withval=$with_ntlm_auth; ntlm_auth="$withval" -else - if test $os_win32 = yes; then ntlm_auth="no"; else ntlm_auth="/usr/bin/ntlm_auth"; fi -fi + if test "$KRB5_CONFIG" != "no"; then + KRB5_LIBS="`${KRB5_CONFIG} --libs gssapi`" + KRB5_CFLAGS="`${KRB5_CONFIG} --cflags gssapi`" -if test "$ntlm_auth" != "no"; then -$as_echo "#define USE_NTLM_AUTH 1" >>confdefs.h + if test "$KRB5_CONFIG" != none; then - if test "$ntlm_auth" = "yes"; then - ntlm_auth="/usr/bin/ntlm_auth" +$as_echo "#define LIBSOUP_HAVE_GSSAPI 1" >>confdefs.h + + fi + else + if test "$with_gssapi" = "yes"; then + as_fn_error $? "GSSAPI support requested but failed to found krb5-config. Try to set KRB5_CONFIG." "$LINENO" 5 + fi fi fi -cat >>confdefs.h <<_ACEOF -#define NTLM_AUTH "$ntlm_auth" -_ACEOF - - - # Check whether --enable-more-warnings was given. if test "${enable_more_warnings+set}" = set; then : enableval=$enable_more_warnings; set_more_warnings=no @@ -13892,10 +15384,80 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then -Werror=declaration-after-statement" fi +################################################## +# Visibility handling +################################################## + +SOUP_HIDDEN_VISIBILITY_CFLAGS="" +case "$host" in + *-*-mingw*) + +$as_echo "#define _SOUP_EXTERN __attribute__((visibility(\"default\"))) __declspec(dllexport) extern" >>confdefs.h + + SOUP_HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden" + ;; + *) + SAVED_CFLAGS="${CFLAGS}" + CFLAGS="-fvisibility=hidden" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fvisibility=hidden compiler flag" >&5 +$as_echo_n "checking for -fvisibility=hidden compiler flag... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +return 0 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + enable_fvisibility_hidden=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + enable_fvisibility_hidden=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="${SAVED_CFLAGS}" + + if test "${enable_fvisibility_hidden}" = "yes"; then : + + +$as_echo "#define _SOUP_EXTERN __attribute__((visibility(\"default\"))) extern" >>confdefs.h + + SOUP_HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden" + +fi + ;; +esac + + + if test x$MSVC_BASE_TOOLSET = x; then + MSVC_BASE_NO_TOOLSET_SET_TRUE= + MSVC_BASE_NO_TOOLSET_SET_FALSE='#' +else + MSVC_BASE_NO_TOOLSET_SET_TRUE='#' + MSVC_BASE_NO_TOOLSET_SET_FALSE= +fi + + if test x$MSVC_TOOLSET = x; then + MSVC_NO_TOOLSET_SET_TRUE= + MSVC_NO_TOOLSET_SET_FALSE='#' +else + MSVC_NO_TOOLSET_SET_TRUE='#' + MSVC_NO_TOOLSET_SET_FALSE= +fi + + + ac_config_headers="$ac_config_headers config.h" -ac_config_files="$ac_config_files libsoup-2.4.pc libsoup-gnome-2.4.pc Makefile libsoup-zip libsoup/Makefile po/Makefile.in po/Makefile tests/Makefile examples/Makefile docs/Makefile docs/reference/Makefile libsoup/soup-version.h" +ac_config_files="$ac_config_files libsoup-2.4.pc libsoup-gnome-2.4.pc Makefile libsoup-zip libsoup/Makefile po/Makefile.in po/Makefile tests/Makefile tests/httpd.conf examples/Makefile docs/Makefile docs/reference/Makefile libsoup/soup-version.h config.h.win32 win32/Makefile win32/vs9/Makefile win32/vs9/soup-version-paths.vsprops win32/vs10/Makefile win32/vs10/soup-version-paths.props win32/vs11/Makefile win32/vs12/Makefile win32/vs14/Makefile win32/vs15/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -14041,6 +15603,10 @@ fi if test -z "${OS_WIN32_TRUE}" && test -z "${OS_WIN32_FALSE}"; then as_fn_error $? "conditional \"OS_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${OS_LINUX_TRUE}" && test -z "${OS_LINUX_FALSE}"; then + as_fn_error $? "conditional \"OS_LINUX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi ac_config_commands="$ac_config_commands po/stamp-it" @@ -14078,16 +15644,24 @@ if test -z "${HAVE_INTROSPECTION_TRUE}" && test -z "${HAVE_INTROSPECTION_FALSE}" as_fn_error $? "conditional \"HAVE_INTROSPECTION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_VAPIGEN_TRUE}" && test -z "${ENABLE_VAPIGEN_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_VAPIGEN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_APACHE_TRUE}" && test -z "${HAVE_APACHE_FALSE}"; then as_fn_error $? "conditional \"HAVE_APACHE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_APACHE_2_2_TRUE}" && test -z "${HAVE_APACHE_2_2_FALSE}"; then - as_fn_error $? "conditional \"HAVE_APACHE_2_2\" was never defined. +if test -z "${CODE_COVERAGE_ENABLED_TRUE}" && test -z "${CODE_COVERAGE_ENABLED_FALSE}"; then + as_fn_error $? "conditional \"CODE_COVERAGE_ENABLED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MSVC_BASE_NO_TOOLSET_SET_TRUE}" && test -z "${MSVC_BASE_NO_TOOLSET_SET_FALSE}"; then + as_fn_error $? "conditional \"MSVC_BASE_NO_TOOLSET_SET\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_APACHE_2_4_TRUE}" && test -z "${HAVE_APACHE_2_4_FALSE}"; then - as_fn_error $? "conditional \"HAVE_APACHE_2_4\" was never defined. +if test -z "${MSVC_NO_TOOLSET_SET_TRUE}" && test -z "${MSVC_NO_TOOLSET_SET_FALSE}"; then + as_fn_error $? "conditional \"MSVC_NO_TOOLSET_SET\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -14487,7 +16061,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libsoup $as_me 2.46.0, which was +This file was extended by libsoup $as_me 2.62.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14553,7 +16127,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libsoup config.status 2.46.0 +libsoup config.status 2.62.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -14691,6 +16265,7 @@ enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' @@ -14738,10 +16313,13 @@ compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' @@ -14806,7 +16384,8 @@ finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' +configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' @@ -14858,9 +16437,12 @@ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +lt_cv_nm_interface \ nm_file_list_spec \ +lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ @@ -14895,7 +16477,7 @@ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -14922,10 +16504,11 @@ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do +configure_time_dlsearch_path \ +configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -14934,19 +16517,16 @@ sys_lib_dlsearch_path_spec; do done ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' -# See if we are running on zsh, and set the options which allow our +# See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then +if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' @@ -14972,10 +16552,21 @@ do "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + "tests/httpd.conf") CONFIG_FILES="$CONFIG_FILES tests/httpd.conf" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "docs/reference/Makefile") CONFIG_FILES="$CONFIG_FILES docs/reference/Makefile" ;; "libsoup/soup-version.h") CONFIG_FILES="$CONFIG_FILES libsoup/soup-version.h" ;; + "config.h.win32") CONFIG_FILES="$CONFIG_FILES config.h.win32" ;; + "win32/Makefile") CONFIG_FILES="$CONFIG_FILES win32/Makefile" ;; + "win32/vs9/Makefile") CONFIG_FILES="$CONFIG_FILES win32/vs9/Makefile" ;; + "win32/vs9/soup-version-paths.vsprops") CONFIG_FILES="$CONFIG_FILES win32/vs9/soup-version-paths.vsprops" ;; + "win32/vs10/Makefile") CONFIG_FILES="$CONFIG_FILES win32/vs10/Makefile" ;; + "win32/vs10/soup-version-paths.props") CONFIG_FILES="$CONFIG_FILES win32/vs10/soup-version-paths.props" ;; + "win32/vs11/Makefile") CONFIG_FILES="$CONFIG_FILES win32/vs11/Makefile" ;; + "win32/vs12/Makefile") CONFIG_FILES="$CONFIG_FILES win32/vs12/Makefile" ;; + "win32/vs14/Makefile") CONFIG_FILES="$CONFIG_FILES win32/vs14/Makefile" ;; + "win32/vs15/Makefile") CONFIG_FILES="$CONFIG_FILES win32/vs15/Makefile" ;; "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -15667,55 +17258,52 @@ $as_echo X"$file" | ;; "libtool":C) - # See if we are running on zsh, and set the options which allow our + # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then + if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi - cfgfile="${ofile}T" + cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + +# Copyright (C) 2014 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool 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 of the License, or +# (at your option) any later version. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. # -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . # The names of the tagged configurations supported by this script. -available_tags="" +available_tags='' + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG @@ -15744,6 +17332,9 @@ pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shared archive member basename,for filename based shared library versioning on AIX. +shared_archive_member_spec=$shared_archive_member_spec + # Shell to use when invoking shell scripts. SHELL=$lt_SHELL @@ -15855,18 +17446,27 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl +# Transform the output of nm into a list of symbols to manually relocate. +global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import + # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# The name lister interface. +nm_interface=$lt_lt_cv_nm_interface + # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec -# The root where to search for dependent libraries,and in which our libraries should be installed. +# The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot +# Command to truncate a binary pipe. +lt_truncate_bin=$lt_lt_cv_truncate_bin + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -15957,8 +17557,11 @@ hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec +# Detected run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path + +# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. +configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen @@ -16051,13 +17654,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute @@ -16107,6 +17710,65 @@ hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + + +# ### END FUNCTIONS SHARED WITH CONFIGURE + _LT_EOF case $host_os in @@ -16115,7 +17777,7 @@ _LT_EOF # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then +if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -16124,7 +17786,7 @@ _LT_EOF esac -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if @@ -16134,165 +17796,6 @@ ltmain="$ac_aux_dir/ltmain.sh" sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) - if test x"$xsi_shell" = xyes; then - sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -func_dirname ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_basename ()$/,/^} # func_basename /c\ -func_basename ()\ -{\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -func_dirname_and_basename ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -func_stripname ()\ -{\ -\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -\ # positional parameters, so assign one to ordinary parameter first.\ -\ func_stripname_result=${3}\ -\ func_stripname_result=${func_stripname_result#"${1}"}\ -\ func_stripname_result=${func_stripname_result%"${2}"}\ -} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -func_split_long_opt ()\ -{\ -\ func_split_long_opt_name=${1%%=*}\ -\ func_split_long_opt_arg=${1#*=}\ -} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -func_split_short_opt ()\ -{\ -\ func_split_short_opt_arg=${1#??}\ -\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -func_lo2o ()\ -{\ -\ case ${1} in\ -\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -\ *) func_lo2o_result=${1} ;;\ -\ esac\ -} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_xform ()$/,/^} # func_xform /c\ -func_xform ()\ -{\ - func_xform_result=${1%.*}.lo\ -} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_arith ()$/,/^} # func_arith /c\ -func_arith ()\ -{\ - func_arith_result=$(( $* ))\ -} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_len ()$/,/^} # func_len /c\ -func_len ()\ -{\ - func_len_result=${#1}\ -} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - -fi - -if test x"$lt_shell_append" = xyes; then - sed -e '/^func_append ()$/,/^} # func_append /c\ -func_append ()\ -{\ - eval "${1}+=\\${2}"\ -} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -func_append_quoted ()\ -{\ -\ func_quote_for_eval "${2}"\ -\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -fi - - mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" diff --git a/configure.ac b/configure.ac index 96bb378a..d8f2dd81 100644 --- a/configure.ac +++ b/configure.ac @@ -3,8 +3,8 @@ dnl *** Initialize automake and set version *** dnl ******************************************* m4_define([soup_major_version], [2]) -m4_define([soup_minor_version], [46]) -m4_define([soup_micro_version], [0]) +m4_define([soup_minor_version], [62]) +m4_define([soup_micro_version], [2]) AC_PREREQ(2.63) AC_INIT([libsoup],[soup_major_version.soup_minor_version.soup_micro_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=libsoup]) @@ -28,10 +28,10 @@ SOUP_API_VERSION=2.4 AC_SUBST(SOUP_API_VERSION) # Increment on interface addition. Reset on removal. -SOUP_AGE=7 +SOUP_AGE=8 # Increment on interface add, remove, or change. -SOUP_CURRENT=8 +SOUP_CURRENT=9 # Increment on source change. Reset when CURRENT changes. SOUP_REVISION=0 @@ -47,7 +47,7 @@ dnl *************************** debug_default=minimum # Declare --enable-* args and collect ac_help strings -AC_ARG_ENABLE(debug, +AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug=[no/minimum/yes]], [turn on debugging (default=$debug_default)]),, enable_debug=$debug_default) @@ -106,14 +106,21 @@ AC_MSG_CHECKING([for Win32]) case "$host" in *-*-mingw*) os_win32=yes + os_linux=yes CFLAGS="$CFLAGS -D_REENTRANT" ;; + *-*-linux*) + os_win32=no + os_linux=yes + ;; *) os_win32=no + os_linux=no ;; esac AC_MSG_RESULT([$os_win32]) AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes]) +AM_CONDITIONAL(OS_LINUX, [test $os_linux = yes]) dnl ************************ dnl *** gettext/intltool *** @@ -148,13 +155,22 @@ AC_SUBST(HAVE_GNOME) dnl *************** dnl *** gtk-doc *** dnl *************** -GTK_DOC_CHECK([1.10]) +# gtkdocize greps for ^GTK_DOC_CHECK and parses it, so you need to have +# it on it's own line. +m4_ifdef([GTK_DOC_CHECK], [ +GTK_DOC_CHECK([1.20], [--flavour no-tmpl]) +],[]) dnl ***************************** dnl *** gobject-introspection *** dnl ***************************** GOBJECT_INTROSPECTION_CHECK([0.9.5]) +if test "$found_introspection" != "yes" -a "$enable_vala" = ""; then + enable_vala=no +fi +VAPIGEN_CHECK() + AC_MSG_CHECKING([for glib-networking (glib TLS implementation)]) save_CFLAGS="$CFLAGS" save_LIBS="$LIBS" @@ -193,13 +209,8 @@ if test "$APACHE_HTTPD" != "no"; then AC_MSG_CHECKING([Apache version]) apache_version=`$APACHE_HTTPD -v 2>/dev/null | sed -ne 's/Server version: Apache\///p'` case $apache_version in - 2.2.*) - AC_MSG_RESULT([$apache_version (ok)]) - apache_version=2.2 - ;; 2.4.*) AC_MSG_RESULT([$apache_version (ok)]) - apache_version=2.4 ;; *) AC_MSG_RESULT([$apache_version (ignoring)]) @@ -227,47 +238,34 @@ if test "$APACHE_HTTPD" != "no"; then APACHE_SSL_MODULE_DIR="$dir" IF_HAVE_APACHE_SSL="" fi - if test -f $dir/mod_php5.so; then - APACHE_PHP_MODULE_DIR="$dir" - APACHE_PHP_MODULE=mod_php5.so - fi - if test -f $dir/libphp5.so; then + if test -f $dir/libphp7.so; then APACHE_PHP_MODULE_DIR="$dir" - APACHE_PHP_MODULE=libphp5.so fi done AC_MSG_RESULT($APACHE_MODULE_DIR) AC_SUBST(APACHE_MODULE_DIR) AC_SUBST(APACHE_SSL_MODULE_DIR) AC_SUBST(APACHE_PHP_MODULE_DIR) - AC_SUBST(APACHE_PHP_MODULE) fi if test "$APACHE_HTTPD" != "no" -a -n "$APACHE_MODULE_DIR" -a -n "$APACHE_SSL_MODULE_DIR"; then AC_DEFINE(HAVE_APACHE, 1, [Whether or not apache can be used for tests]) - if test $apache_version = 2.2; then - AC_DEFINE(HAVE_APACHE_2_2, 1, [Apache is 2.2.x]) - else - AC_DEFINE(HAVE_APACHE_2_4, 1, [Apache is 2.4.x]) - fi have_apache=1 else have_apache=0 fi AM_CONDITIONAL(HAVE_APACHE, test "$have_apache" = 1) -AM_CONDITIONAL(HAVE_APACHE_2_2, test "$apache_version" = 2.2) -AM_CONDITIONAL(HAVE_APACHE_2_4, test "$apache_version" = 2.4) if test "$have_apache" = 1; then - AC_CHECK_PROGS(PHP, php php5) + AC_CHECK_PROGS(PHP, php) AC_MSG_CHECKING([for Apache PHP module]) - if test -f $APACHE_PHP_MODULE_DIR/$APACHE_PHP_MODULE; then - have_php=yes + if test -d "$APACHE_PHP_MODULE_DIR"; then + have_php="yes" IF_HAVE_PHP="" else - have_php=no - IF_HAVE_PHP="\#" + have_php="no" + IF_HAVE_PHP="#" fi AC_MSG_RESULT($have_php) AC_SUBST(IF_HAVE_PHP) @@ -282,6 +280,13 @@ if test "$have_apache" = 1; then fi AC_MSG_RESULT($have_php_xmlrpc) fi + + if test -f "$APACHE_MODULE_DIR/mod_unixd.so"; then + IF_HAVE_MOD_UNIXD="" + else + IF_HAVE_MOD_UNIXD="#" + fi + AC_SUBST(IF_HAVE_MOD_UNIXD) fi AC_PATH_PROG(CURL, curl, no) @@ -306,6 +311,36 @@ fi AC_SUBST(ntlm_auth) AC_DEFINE_UNQUOTED(NTLM_AUTH, "$ntlm_auth", [Samba's 'winbind' daemon helper 'ntlm_auth' which can be used for NTLM single-sign-on]) +AX_CODE_COVERAGE + +dnl ********************** +dnl *** GSSAPI support *** +dnl ********************** +AC_ARG_WITH(gssapi, + AS_HELP_STRING([--with-gssapi], + [Build with GSSAPI support [default=auto]])) + +if test "$with_gssapi" != "no"; then + AC_ARG_WITH(krb5-config, + AS_HELP_STRING([--with-krb5-config=PATH],[Where to look for krb5-config, path points to krb5-config installation (default: /usr/kerberos/bin/)]), + KRB5_CONFIG="$withval", + [AC_PATH_PROGS(KRB5_CONFIG, krb5-config, no, ${PATH}:/usr/kerberos/bin)]) + + if test "$KRB5_CONFIG" != "no"; then + KRB5_LIBS="`${KRB5_CONFIG} --libs gssapi`" + KRB5_CFLAGS="`${KRB5_CONFIG} --cflags gssapi`" + AC_SUBST(KRB5_CFLAGS) + AC_SUBST(KRB5_LIBS) + if test "$KRB5_CONFIG" != none; then + AC_DEFINE(LIBSOUP_HAVE_GSSAPI, 1, [Whether or not GSSAPI libs are available]) + fi + else + if test "$with_gssapi" = "yes"; then + AC_MSG_ERROR([GSSAPI support requested but failed to found krb5-config. Try to set KRB5_CONFIG.]) + fi + fi +fi + dnl **************************************************** dnl *** Warnings to show if using GCC *** dnl *** (do this last so -Werror won't mess up tests *** @@ -325,6 +360,46 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then -Werror=declaration-after-statement" fi +################################################## +# Visibility handling +################################################## + +SOUP_HIDDEN_VISIBILITY_CFLAGS="" +case "$host" in + *-*-mingw*) + dnl on mingw32 we do -fvisibility=hidden and __declspec(dllexport) + AC_DEFINE([_SOUP_EXTERN], [__attribute__((visibility("default"))) __declspec(dllexport) extern], + [defines how to decorate public symbols while building]) + SOUP_HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden" + ;; + *) + dnl on other compilers, check if we can do -fvisibility=hidden + SAVED_CFLAGS="${CFLAGS}" + CFLAGS="-fvisibility=hidden" + AC_MSG_CHECKING([for -fvisibility=hidden compiler flag]) + AC_TRY_COMPILE([], [return 0], + AC_MSG_RESULT(yes) + enable_fvisibility_hidden=yes, + AC_MSG_RESULT(no) + enable_fvisibility_hidden=no) + CFLAGS="${SAVED_CFLAGS}" + + AS_IF([test "${enable_fvisibility_hidden}" = "yes"], [ + AC_DEFINE([_SOUP_EXTERN], [__attribute__((visibility("default"))) extern], + [defines how to decorate public symbols while building]) + SOUP_HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden" + ]) + ;; +esac +AC_SUBST(SOUP_HIDDEN_VISIBILITY_CFLAGS) + +dnl **************************************************** +dnl *** Check whether MSVC toolset is explicitly set *** +dnl **************************************************** +AM_CONDITIONAL(MSVC_BASE_NO_TOOLSET_SET, [test x$MSVC_BASE_TOOLSET = x]) +AM_CONDITIONAL(MSVC_NO_TOOLSET_SET, [test x$MSVC_TOOLSET = x]) + + dnl ************************* dnl *** Output Everything *** dnl ************************* @@ -339,9 +414,20 @@ AC_CONFIG_FILES([ po/Makefile.in po/Makefile tests/Makefile + tests/httpd.conf examples/Makefile docs/Makefile docs/reference/Makefile libsoup/soup-version.h + config.h.win32 + win32/Makefile + win32/vs9/Makefile + win32/vs9/soup-version-paths.vsprops + win32/vs10/Makefile + win32/vs10/soup-version-paths.props + win32/vs11/Makefile + win32/vs12/Makefile + win32/vs14/Makefile + win32/vs15/Makefile ]) AC_OUTPUT diff --git a/data/effective_tld_names.dat b/data/effective_tld_names.dat index 95a555aa..b2d261ec 100644 --- a/data/effective_tld_names.dat +++ b/data/effective_tld_names.dat @@ -1,10 +1,15 @@ // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +// Please pull this list from, and only from https://publicsuffix.org/list/public_suffix_list.dat, +// rather than any other VCS sites. Pulling from any other URL is not guaranteed to be supported. + +// Instructions on pulling and using this list can be found at https://publicsuffix.org/list/. // ===BEGIN ICANN DOMAINS=== -// ac : http://en.wikipedia.org/wiki/.ac +// ac : https://en.wikipedia.org/wiki/.ac ac com.ac edu.ac @@ -13,11 +18,11 @@ net.ac mil.ac org.ac -// ad : http://en.wikipedia.org/wiki/.ad +// ad : https://en.wikipedia.org/wiki/.ad ad nom.ad -// ae : http://en.wikipedia.org/wiki/.ae +// ae : https://en.wikipedia.org/wiki/.ae // see also: "Domain Name Eligibility Policy" at http://www.aeda.ae/eng/aepolicy.php ae co.ae @@ -28,7 +33,7 @@ ac.ae gov.ae mil.ae -// aero : see http://www.information.aero/index.php?id=66 +// aero : see https://www.information.aero/index.php?id=66 aero accident-investigation.aero accident-prevention.aero @@ -89,7 +94,6 @@ leasing.aero logistics.aero magazine.aero maintenance.aero -marketplace.aero media.aero microlight.aero modelling.aero @@ -112,7 +116,6 @@ show.aero skydiving.aero software.aero student.aero -taxi.aero trader.aero trading.aero trainer.aero @@ -152,17 +155,10 @@ mil.al net.al org.al -// am : http://en.wikipedia.org/wiki/.am +// am : https://en.wikipedia.org/wiki/.am am -// an : http://www.una.an/an_domreg/default.asp -an -com.an -net.an -org.an -edu.an - -// ao : http://en.wikipedia.org/wiki/.ao +// ao : https://en.wikipedia.org/wiki/.ao // http://www.dns.ao/REGISTR.DOC ao ed.ao @@ -172,22 +168,25 @@ co.ao pb.ao it.ao -// aq : http://en.wikipedia.org/wiki/.aq +// aq : https://en.wikipedia.org/wiki/.aq aq -// ar : https://nic.ar/normativa-vigente.xhtml +// ar : https://nic.ar/nic-argentina/normativa-vigente ar com.ar edu.ar gob.ar +gov.ar int.ar mil.ar +musica.ar net.ar org.ar tur.ar -// arpa : http://en.wikipedia.org/wiki/.arpa +// arpa : https://en.wikipedia.org/wiki/.arpa // Confirmed by registry 2008-06-18 +arpa e164.arpa in-addr.arpa ip6.arpa @@ -195,14 +194,14 @@ iris.arpa uri.arpa urn.arpa -// as : http://en.wikipedia.org/wiki/.as +// as : https://en.wikipedia.org/wiki/.as as gov.as -// asia : http://en.wikipedia.org/wiki/.asia +// asia : https://en.wikipedia.org/wiki/.asia asia -// at : http://en.wikipedia.org/wiki/.at +// at : https://en.wikipedia.org/wiki/.at // Confirmed by registry 2008-06-17 at ac.at @@ -210,8 +209,9 @@ co.at gv.at or.at -// au : http://en.wikipedia.org/wiki/.au +// au : https://en.wikipedia.org/wiki/.au // http://www.auda.org.au/ +au // 2LDs com.au net.au @@ -220,7 +220,6 @@ edu.au gov.au asn.au id.au -csiro.au // Historic 2LDs (closed to new registration, but sites still exist) info.au conf.au @@ -243,7 +242,7 @@ sa.edu.au tas.edu.au vic.edu.au wa.edu.au -act.gov.au +// act.gov.au Bug 984824 - Removed at request of Greg Tankard // nsw.gov.au Bug 547985 - Removed at request of // nt.gov.au Bug 940478 - Removed at request of Greg Connors qld.gov.au @@ -252,14 +251,14 @@ tas.gov.au vic.gov.au wa.gov.au -// aw : http://en.wikipedia.org/wiki/.aw +// aw : https://en.wikipedia.org/wiki/.aw aw com.aw -// ax : http://en.wikipedia.org/wiki/.ax +// ax : https://en.wikipedia.org/wiki/.ax ax -// az : http://en.wikipedia.org/wiki/.az +// az : https://en.wikipedia.org/wiki/.az az com.az net.az @@ -274,22 +273,19 @@ name.az pro.az biz.az -// ba : http://en.wikipedia.org/wiki/.ba +// ba : http://nic.ba/users_data/files/pravilnik_o_registraciji.pdf ba -org.ba -net.ba +com.ba edu.ba gov.ba mil.ba -unsa.ba -unbi.ba -co.ba -com.ba -rs.ba +net.ba +org.ba -// bb : http://en.wikipedia.org/wiki/.bb +// bb : https://en.wikipedia.org/wiki/.bb bb biz.bb +co.bb com.bb edu.bb gov.bb @@ -297,20 +293,21 @@ info.bb net.bb org.bb store.bb +tv.bb -// bd : http://en.wikipedia.org/wiki/.bd +// bd : https://en.wikipedia.org/wiki/.bd *.bd -// be : http://en.wikipedia.org/wiki/.be +// be : https://en.wikipedia.org/wiki/.be // Confirmed by registry 2008-06-08 be ac.be -// bf : http://en.wikipedia.org/wiki/.bf +// bf : https://en.wikipedia.org/wiki/.bf bf gov.bf -// bg : http://en.wikipedia.org/wiki/.bg +// bg : https://en.wikipedia.org/wiki/.bg // https://www.register.bg/user/static/rules/en/index.html bg a.bg @@ -350,7 +347,7 @@ z.bg 8.bg 9.bg -// bh : http://en.wikipedia.org/wiki/.bh +// bh : https://en.wikipedia.org/wiki/.bh bh com.bh edu.bh @@ -358,7 +355,7 @@ net.bh org.bh gov.bh -// bi : http://en.wikipedia.org/wiki/.bi +// bi : https://en.wikipedia.org/wiki/.bi // http://whois.nic.bi/ bi co.bi @@ -367,10 +364,10 @@ edu.bi or.bi org.bi -// biz : http://en.wikipedia.org/wiki/.biz +// biz : https://en.wikipedia.org/wiki/.biz biz -// bj : http://en.wikipedia.org/wiki/.bj +// bj : https://en.wikipedia.org/wiki/.bj bj asso.bj barreau.bj @@ -384,40 +381,90 @@ gov.bm net.bm org.bm -// bn : http://en.wikipedia.org/wiki/.bn +// bn : https://en.wikipedia.org/wiki/.bn *.bn -// bo : http://www.nic.bo/ +// bo : https://nic.bo/delegacion2015.php#h-1.10 bo com.bo edu.bo -gov.bo gob.bo int.bo org.bo net.bo mil.bo tv.bo - -// br : http://registro.br/dominio/dpn.html -// Submitted by registry 2011-03-01 +web.bo +// Social Domains +academia.bo +agro.bo +arte.bo +blog.bo +bolivia.bo +ciencia.bo +cooperativa.bo +democracia.bo +deporte.bo +ecologia.bo +economia.bo +empresa.bo +indigena.bo +industria.bo +info.bo +medicina.bo +movimiento.bo +musica.bo +natural.bo +nombre.bo +noticias.bo +patria.bo +politica.bo +profesional.bo +plurinacional.bo +pueblo.bo +revista.bo +salud.bo +tecnologia.bo +tksat.bo +transporte.bo +wiki.bo + +// br : http://registro.br/dominio/categoria.html +// Submitted by registry br +9guacu.br +abc.br adm.br adv.br agr.br +aju.br am.br +anani.br +aparecida.br arq.br art.br ato.br b.br +belem.br +bhz.br bio.br blog.br bmd.br +boavista.br +bsb.br +campinagrande.br +campinas.br +caxias.br cim.br cng.br cnt.br com.br +contagem.br coop.br +cri.br +cuiaba.br +curitiba.br +def.br ecn.br eco.br edu.br @@ -427,47 +474,115 @@ esp.br etc.br eti.br far.br +feira.br flog.br +floripa.br fm.br fnd.br +fortal.br fot.br +foz.br fst.br g12.br ggf.br +goiania.br gov.br +// gov.br 26 states + df https://en.wikipedia.org/wiki/States_of_Brazil +ac.gov.br +al.gov.br +am.gov.br +ap.gov.br +ba.gov.br +ce.gov.br +df.gov.br +es.gov.br +go.gov.br +ma.gov.br +mg.gov.br +ms.gov.br +mt.gov.br +pa.gov.br +pb.gov.br +pe.gov.br +pi.gov.br +pr.gov.br +rj.gov.br +rn.gov.br +ro.gov.br +rr.gov.br +rs.gov.br +sc.gov.br +se.gov.br +sp.gov.br +to.gov.br +gru.br imb.br ind.br inf.br +jab.br +jampa.br +jdf.br +joinville.br jor.br jus.br leg.br lel.br +londrina.br +macapa.br +maceio.br +manaus.br +maringa.br mat.br med.br mil.br +morena.br +mp.br mus.br +natal.br net.br -nom.br +niteroi.br +*.nom.br not.br ntr.br odo.br org.br +osasco.br +palmas.br +poa.br ppg.br pro.br psc.br psi.br +pvh.br qsl.br radio.br rec.br +recife.br +ribeirao.br +rio.br +riobranco.br +riopreto.br +salvador.br +sampa.br +santamaria.br +santoandre.br +saobernardo.br +saogonca.br +sjc.br slg.br +slz.br +sorocaba.br srv.br taxi.br teo.br +the.br tmp.br trd.br tur.br tv.br +udi.br vet.br +vix.br vlog.br wiki.br zlg.br @@ -480,7 +595,7 @@ org.bs edu.bs gov.bs -// bt : http://en.wikipedia.org/wiki/.bt +// bt : https://en.wikipedia.org/wiki/.bt bt com.bt edu.bt @@ -489,16 +604,17 @@ net.bt org.bt // bv : No registrations at this time. -// Submitted by registry 2006-06-16 +// Submitted by registry +bv -// bw : http://en.wikipedia.org/wiki/.bw +// bw : https://en.wikipedia.org/wiki/.bw // http://www.gobin.info/domainname/bw.doc // list of other 2nd level tlds ? bw co.bw org.bw -// by : http://en.wikipedia.org/wiki/.by +// by : https://en.wikipedia.org/wiki/.by // http://tld.by/rules_2006_en.html // list of other 2nd level tlds ? by @@ -512,7 +628,7 @@ com.by // http://hoster.by/ of.by -// bz : http://en.wikipedia.org/wiki/.bz +// bz : https://en.wikipedia.org/wiki/.bz // http://www.belizenic.bz/ bz com.bz @@ -521,7 +637,7 @@ org.bz edu.bz gov.bz -// ca : http://en.wikipedia.org/wiki/.ca +// ca : https://en.wikipedia.org/wiki/.ca ca // ca geographical names ab.ca @@ -538,31 +654,31 @@ pe.ca qc.ca sk.ca yk.ca -// gc.ca: http://en.wikipedia.org/wiki/.gc.ca +// gc.ca: https://en.wikipedia.org/wiki/.gc.ca // see also: http://registry.gc.ca/en/SubdomainFAQ gc.ca -// cat : http://en.wikipedia.org/wiki/.cat +// cat : https://en.wikipedia.org/wiki/.cat cat -// cc : http://en.wikipedia.org/wiki/.cc +// cc : https://en.wikipedia.org/wiki/.cc cc -// cd : http://en.wikipedia.org/wiki/.cd +// cd : https://en.wikipedia.org/wiki/.cd // see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1 cd gov.cd -// cf : http://en.wikipedia.org/wiki/.cf +// cf : https://en.wikipedia.org/wiki/.cf cf -// cg : http://en.wikipedia.org/wiki/.cg +// cg : https://en.wikipedia.org/wiki/.cg cg -// ch : http://en.wikipedia.org/wiki/.ch +// ch : https://en.wikipedia.org/wiki/.ch ch -// ci : http://en.wikipedia.org/wiki/.ci +// ci : https://en.wikipedia.org/wiki/.ci // http://www.nic.ci/index.php?page=charte ci org.ci @@ -581,23 +697,26 @@ presse.ci md.ci gouv.ci -// ck : http://en.wikipedia.org/wiki/.ck +// ck : https://en.wikipedia.org/wiki/.ck *.ck !www.ck -// cl : http://en.wikipedia.org/wiki/.cl +// cl : https://en.wikipedia.org/wiki/.cl cl gov.cl gob.cl co.cl mil.cl -// cm : http://en.wikipedia.org/wiki/.cm +// cm : https://en.wikipedia.org/wiki/.cm plus bug 981927 cm +co.cm +com.cm gov.cm +net.cm -// cn : http://en.wikipedia.org/wiki/.cn -// Submitted by registry 2008-06-11 +// cn : https://en.wikipedia.org/wiki/.cn +// Submitted by registry cn ac.cn com.cn @@ -645,8 +764,8 @@ hk.cn mo.cn tw.cn -// co : http://en.wikipedia.org/wiki/.co -// Submitted by registry 2008-06-11 +// co : https://en.wikipedia.org/wiki/.co +// Submitted by registry co arts.co com.co @@ -662,10 +781,10 @@ org.co rec.co web.co -// com : http://en.wikipedia.org/wiki/.com +// com : https://en.wikipedia.org/wiki/.com com -// coop : http://en.wikipedia.org/wiki/.coop +// coop : https://en.wikipedia.org/wiki/.coop coop // cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do @@ -678,7 +797,7 @@ go.cr or.cr sa.cr -// cu : http://en.wikipedia.org/wiki/.cu +// cu : https://en.wikipedia.org/wiki/.cu cu com.cu edu.cu @@ -687,7 +806,7 @@ net.cu gov.cu inf.cu -// cv : http://en.wikipedia.org/wiki/.cv +// cv : https://en.wikipedia.org/wiki/.cv cv // cw : http://www.una.cw/cw_registry/ @@ -698,30 +817,44 @@ edu.cw net.cw org.cw -// cx : http://en.wikipedia.org/wiki/.cx +// cx : https://en.wikipedia.org/wiki/.cx // list of other 2nd level tlds ? cx gov.cx -// cy : http://en.wikipedia.org/wiki/.cy -*.cy - -// cz : http://en.wikipedia.org/wiki/.cz +// cy : http://www.nic.cy/ +// Submitted by registry Panayiotou Fotia +cy +ac.cy +biz.cy +com.cy +ekloges.cy +gov.cy +ltd.cy +name.cy +net.cy +org.cy +parliament.cy +press.cy +pro.cy +tm.cy + +// cz : https://en.wikipedia.org/wiki/.cz cz -// de : http://en.wikipedia.org/wiki/.de +// de : https://en.wikipedia.org/wiki/.de // Confirmed by registry (with technical // reservations) 2008-07-01 de -// dj : http://en.wikipedia.org/wiki/.dj +// dj : https://en.wikipedia.org/wiki/.dj dj -// dk : http://en.wikipedia.org/wiki/.dk +// dk : https://en.wikipedia.org/wiki/.dk // Confirmed by registry 2008-06-17 dk -// dm : http://en.wikipedia.org/wiki/.dm +// dm : https://en.wikipedia.org/wiki/.dm dm com.dm net.dm @@ -729,7 +862,7 @@ org.dm edu.dm gov.dm -// do : http://en.wikipedia.org/wiki/.do +// do : https://en.wikipedia.org/wiki/.do do art.do com.do @@ -742,7 +875,7 @@ org.do sld.do web.do -// dz : http://en.wikipedia.org/wiki/.dz +// dz : https://en.wikipedia.org/wiki/.dz dz com.dz org.dz @@ -754,7 +887,7 @@ pol.dz art.dz // ec : http://www.nic.ec/reg/paso1.asp -// Submitted by registry 2008-07-04 +// Submitted by registry ec com.ec info.ec @@ -769,7 +902,7 @@ gov.ec gob.ec mil.ec -// edu : http://en.wikipedia.org/wiki/.edu +// edu : https://en.wikipedia.org/wiki/.edu edu // ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B @@ -785,7 +918,7 @@ aip.ee org.ee fie.ee -// eg : http://en.wikipedia.org/wiki/.eg +// eg : https://en.wikipedia.org/wiki/.eg eg com.eg edu.eg @@ -797,7 +930,7 @@ net.eg org.eg sci.eg -// er : http://en.wikipedia.org/wiki/.er +// er : https://en.wikipedia.org/wiki/.er *.er // es : https://www.nic.es/site_ingles/ingles/dominios/index.html @@ -808,31 +941,39 @@ org.es gob.es edu.es -// et : http://en.wikipedia.org/wiki/.et -*.et - -// eu : http://en.wikipedia.org/wiki/.eu +// et : https://en.wikipedia.org/wiki/.et +et +com.et +gov.et +org.et +edu.et +biz.et +name.et +info.et +net.et + +// eu : https://en.wikipedia.org/wiki/.eu eu -// fi : http://en.wikipedia.org/wiki/.fi +// fi : https://en.wikipedia.org/wiki/.fi fi -// aland.fi : http://en.wikipedia.org/wiki/.ax +// aland.fi : https://en.wikipedia.org/wiki/.ax // This domain is being phased out in favor of .ax. As there are still many // domains under aland.fi, we still keep it on the list until aland.fi is // completely removed. // TODO: Check for updates (expected to be phased out around Q1/2009) aland.fi -// fj : http://en.wikipedia.org/wiki/.fj +// fj : https://en.wikipedia.org/wiki/.fj *.fj -// fk : http://en.wikipedia.org/wiki/.fk +// fk : https://en.wikipedia.org/wiki/.fk *.fk -// fm : http://en.wikipedia.org/wiki/.fm +// fm : https://en.wikipedia.org/wiki/.fm fm -// fo : http://en.wikipedia.org/wiki/.fo +// fo : https://en.wikipedia.org/wiki/.fo fo // fr : http://www.afnic.fr/ @@ -863,13 +1004,14 @@ pharmacien.fr port.fr veterinaire.fr -// ga : http://en.wikipedia.org/wiki/.ga +// ga : https://en.wikipedia.org/wiki/.ga ga // gb : This registry is effectively dormant -// Submitted by registry 2008-06-12 +// Submitted by registry +gb -// gd : http://en.wikipedia.org/wiki/.gd +// gd : https://en.wikipedia.org/wiki/.gd gd // ge : http://www.nic.net.ge/policy_en.pdf @@ -882,7 +1024,7 @@ mil.ge net.ge pvt.ge -// gf : http://en.wikipedia.org/wiki/.gf +// gf : https://en.wikipedia.org/wiki/.gf gf // gg : http://www.channelisles.net/register-domains/ @@ -892,7 +1034,7 @@ co.gg net.gg org.gg -// gh : http://en.wikipedia.org/wiki/.gh +// gh : https://en.wikipedia.org/wiki/.gh // see also: http://www.nic.gh/reg_now.php // Although domains directly at second level are not possible at the moment, // they have been possible for some time and may come back. @@ -912,15 +1054,21 @@ mod.gi edu.gi org.gi -// gl : http://en.wikipedia.org/wiki/.gl +// gl : https://en.wikipedia.org/wiki/.gl // http://nic.gl gl +co.gl +com.gl +edu.gl +net.gl +org.gl // gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm gm // gn : http://psg.com/dns/gn/gn.txt -// Submitted by registry 2008-06-17 +// Submitted by registry +gn ac.gn com.gn edu.gn @@ -928,7 +1076,7 @@ gov.gn org.gn net.gn -// gov : http://en.wikipedia.org/wiki/.gov +// gov : https://en.wikipedia.org/wiki/.gov gov // gp : http://www.nic.gp/index.php?lang=en @@ -940,11 +1088,11 @@ edu.gp org.gp asso.gp -// gq : http://en.wikipedia.org/wiki/.gq +// gq : https://en.wikipedia.org/wiki/.gq gq // gr : https://grweb.ics.forth.gr/english/1617-B-2005.html -// Submitted by registry 2008-06-09 +// Submitted by registry gr com.gr edu.gr @@ -952,7 +1100,7 @@ net.gr org.gr gov.gr -// gs : http://en.wikipedia.org/wiki/.gs +// gs : https://en.wikipedia.org/wiki/.gs gs // gt : http://www.gt/politicas_de_registro.html @@ -968,18 +1116,21 @@ org.gt // gu : http://gadao.gov.gu/registration.txt *.gu -// gw : http://en.wikipedia.org/wiki/.gw +// gw : https://en.wikipedia.org/wiki/.gw gw -// gy : http://en.wikipedia.org/wiki/.gy +// gy : https://en.wikipedia.org/wiki/.gy // http://registry.gy/ gy co.gy com.gy +edu.gy +gov.gy net.gy +org.gy // hk : https://www.hkdnr.hk -// Submitted by registry 2008-06-11 +// Submitted by registry hk com.hk edu.hk @@ -1003,7 +1154,7 @@ org.hk 組織.hk 組织.hk -// hm : http://en.wikipedia.org/wiki/.hm +// hm : https://en.wikipedia.org/wiki/.hm hm // hn : http://www.nic.hn/politicas/ps02,,05.html @@ -1082,6 +1233,7 @@ id ac.id biz.id co.id +desa.id go.id mil.id my.id @@ -1090,15 +1242,23 @@ or.id sch.id web.id -// ie : http://en.wikipedia.org/wiki/.ie +// ie : https://en.wikipedia.org/wiki/.ie ie gov.ie -// il : http://en.wikipedia.org/wiki/.il -*.il +// il : http://www.isoc.org.il/domains/ +il +ac.il +co.il +gov.il +idf.il +k12.il +muni.il +net.il +org.il // im : https://www.nic.im/ -// Submitted by registry 2013-11-15 +// Submitted by registry im ac.im co.im @@ -1110,9 +1270,9 @@ plc.co.im tt.im tv.im -// in : http://en.wikipedia.org/wiki/.in -// see also: http://www.inregistry.in/policies/ -// Please note, that nic.in is not an offical eTLD, but used by most +// in : https://en.wikipedia.org/wiki/.in +// see also: https://registry.in/Policies +// Please note, that nic.in is not an official eTLD, but used by most // government institutions. in co.in @@ -1128,10 +1288,10 @@ res.in gov.in mil.in -// info : http://en.wikipedia.org/wiki/.info +// info : https://en.wikipedia.org/wiki/.info info -// int : http://en.wikipedia.org/wiki/.int +// int : https://en.wikipedia.org/wiki/.int // Confirmed by registry 2008-06-18 int eu.int @@ -1176,290 +1336,382 @@ gov.is org.is int.is -// it : http://en.wikipedia.org/wiki/.it +// it : https://en.wikipedia.org/wiki/.it it gov.it edu.it -// list of reserved geo-names : +// Reserved geo-names: // http://www.nic.it/documenti/regolamenti-e-linee-guida/regolamento-assegnazione-versione-6.0.pdf -// (There is also a list of reserved geo-names corresponding to Italian -// municipalities : http://www.nic.it/documenti/appendice-c.pdf , but it is -// not included here.) -agrigento.it +// There is also a list of reserved geo-names corresponding to Italian municipalities +// http://www.nic.it/documenti/appendice-c.pdf, but it is not included here. +// Regions +abr.it +abruzzo.it +aosta-valley.it +aostavalley.it +bas.it +basilicata.it +cal.it +calabria.it +cam.it +campania.it +emilia-romagna.it +emiliaromagna.it +emr.it +friuli-v-giulia.it +friuli-ve-giulia.it +friuli-vegiulia.it +friuli-venezia-giulia.it +friuli-veneziagiulia.it +friuli-vgiulia.it +friuliv-giulia.it +friulive-giulia.it +friulivegiulia.it +friulivenezia-giulia.it +friuliveneziagiulia.it +friulivgiulia.it +fvg.it +laz.it +lazio.it +lig.it +liguria.it +lom.it +lombardia.it +lombardy.it +lucania.it +mar.it +marche.it +mol.it +molise.it +piedmont.it +piemonte.it +pmn.it +pug.it +puglia.it +sar.it +sardegna.it +sardinia.it +sic.it +sicilia.it +sicily.it +taa.it +tos.it +toscana.it +trentino-a-adige.it +trentino-aadige.it +trentino-alto-adige.it +trentino-altoadige.it +trentino-s-tirol.it +trentino-stirol.it +trentino-sud-tirol.it +trentino-sudtirol.it +trentino-sued-tirol.it +trentino-suedtirol.it +trentinoa-adige.it +trentinoaadige.it +trentinoalto-adige.it +trentinoaltoadige.it +trentinos-tirol.it +trentinostirol.it +trentinosud-tirol.it +trentinosudtirol.it +trentinosued-tirol.it +trentinosuedtirol.it +tuscany.it +umb.it +umbria.it +val-d-aosta.it +val-daosta.it +vald-aosta.it +valdaosta.it +valle-aosta.it +valle-d-aosta.it +valle-daosta.it +valleaosta.it +valled-aosta.it +valledaosta.it +vallee-aoste.it +valleeaoste.it +vao.it +vda.it +ven.it +veneto.it +// Provinces ag.it -alessandria.it +agrigento.it al.it -ancona.it +alessandria.it +alto-adige.it +altoadige.it an.it +ancona.it +andria-barletta-trani.it +andria-trani-barletta.it +andriabarlettatrani.it +andriatranibarletta.it +ao.it aosta.it aoste.it -ao.it -arezzo.it +ap.it +aq.it +aquila.it ar.it +arezzo.it ascoli-piceno.it ascolipiceno.it -ap.it asti.it at.it -avellino.it av.it -bari.it +avellino.it ba.it -andria-barletta-trani.it -andriabarlettatrani.it -trani-barletta-andria.it -tranibarlettaandria.it +balsan.it +bari.it barletta-trani-andria.it barlettatraniandria.it -andria-trani-barletta.it -andriatranibarletta.it -trani-andria-barletta.it -traniandriabarletta.it -bt.it belluno.it -bl.it benevento.it -bn.it bergamo.it bg.it -biella.it bi.it -bologna.it +biella.it +bl.it +bn.it bo.it +bologna.it bolzano.it bozen.it -balsan.it -alto-adige.it -altoadige.it -suedtirol.it -bz.it +br.it brescia.it -bs.it brindisi.it -br.it -cagliari.it +bs.it +bt.it +bz.it ca.it +cagliari.it caltanissetta.it -cl.it +campidano-medio.it +campidanomedio.it campobasso.it -cb.it -carboniaiglesias.it carbonia-iglesias.it -iglesias-carbonia.it -iglesiascarbonia.it -ci.it +carboniaiglesias.it +carrara-massa.it +carraramassa.it caserta.it -ce.it catania.it -ct.it catanzaro.it -cz.it -chieti.it +cb.it +ce.it +cesena-forli.it +cesenaforli.it ch.it -como.it +chieti.it +ci.it +cl.it +cn.it co.it +como.it cosenza.it -cs.it -cremona.it cr.it +cremona.it crotone.it -kr.it +cs.it +ct.it cuneo.it -cn.it +cz.it dell-ogliastra.it dellogliastra.it -ogliastra.it -og.it -enna.it en.it -ferrara.it +enna.it +fc.it fe.it fermo.it -fm.it +ferrara.it +fg.it +fi.it firenze.it florence.it -fi.it +fm.it foggia.it -fg.it forli-cesena.it forlicesena.it -cesena-forli.it -cesenaforli.it -fc.it -frosinone.it fr.it -genova.it -genoa.it +frosinone.it ge.it -gorizia.it +genoa.it +genova.it go.it -grosseto.it +gorizia.it gr.it -imperia.it +grosseto.it +iglesias-carbonia.it +iglesiascarbonia.it im.it -isernia.it +imperia.it is.it -laquila.it -aquila.it -aq.it +isernia.it +kr.it la-spezia.it +laquila.it laspezia.it -sp.it latina.it -lt.it -lecce.it +lc.it le.it +lecce.it lecco.it -lc.it -livorno.it li.it -lodi.it +livorno.it lo.it -lucca.it +lodi.it +lt.it lu.it +lucca.it macerata.it -mc.it mantova.it -mn.it massa-carrara.it massacarrara.it -carrara-massa.it -carraramassa.it -ms.it matera.it -mt.it +mb.it +mc.it +me.it medio-campidano.it mediocampidano.it -campidano-medio.it -campidanomedio.it -vs.it messina.it -me.it -milano.it -milan.it mi.it -modena.it +milan.it +milano.it +mn.it mo.it -monza.it +modena.it monza-brianza.it +monza-e-della-brianza.it +monza.it monzabrianza.it monzaebrianza.it monzaedellabrianza.it -monza-e-della-brianza.it -mb.it -napoli.it -naples.it +ms.it +mt.it na.it -novara.it +naples.it +napoli.it no.it -nuoro.it +novara.it nu.it -oristano.it +nuoro.it +og.it +ogliastra.it +olbia-tempio.it +olbiatempio.it or.it +oristano.it +ot.it +pa.it padova.it padua.it -pd.it palermo.it -pa.it parma.it -pr.it pavia.it -pv.it -perugia.it -pg.it -pescara.it +pc.it +pd.it pe.it +perugia.it pesaro-urbino.it pesarourbino.it -urbino-pesaro.it -urbinopesaro.it -pu.it +pescara.it +pg.it +pi.it piacenza.it -pc.it pisa.it -pi.it pistoia.it -pt.it -pordenone.it pn.it +po.it +pordenone.it potenza.it -pz.it +pr.it prato.it -po.it +pt.it +pu.it +pv.it +pz.it +ra.it ragusa.it -rg.it ravenna.it -ra.it -reggio-calabria.it -reggiocalabria.it rc.it +re.it +reggio-calabria.it reggio-emilia.it +reggiocalabria.it reggioemilia.it -re.it -rieti.it +rg.it ri.it +rieti.it rimini.it +rm.it rn.it +ro.it roma.it rome.it -rm.it rovigo.it -ro.it -salerno.it sa.it +salerno.it sassari.it -ss.it savona.it -sv.it -siena.it si.it +siena.it siracusa.it -sr.it -sondrio.it so.it -taranto.it +sondrio.it +sp.it +sr.it +ss.it +suedtirol.it +sv.it ta.it +taranto.it +te.it tempio-olbia.it tempioolbia.it -olbia-tempio.it -olbiatempio.it -ot.it teramo.it -te.it terni.it -tr.it -torino.it -turin.it +tn.it to.it -trapani.it +torino.it tp.it -trento.it +tr.it +trani-andria-barletta.it +trani-barletta-andria.it +traniandriabarletta.it +tranibarlettaandria.it +trapani.it trentino.it -tn.it +trento.it treviso.it -tv.it trieste.it ts.it -udine.it +turin.it +tv.it ud.it -varese.it +udine.it +urbino-pesaro.it +urbinopesaro.it va.it +varese.it +vb.it +vc.it +ve.it venezia.it venice.it -ve.it verbania.it -vb.it vercelli.it -vc.it verona.it -vr.it +vi.it vibo-valentia.it vibovalentia.it -vv.it vicenza.it -vi.it viterbo.it +vr.it +vs.it vt.it +vv.it // je : http://www.channelisles.net/register-domains/ // Confirmed by registry 2013-11-28 @@ -1482,12 +1734,12 @@ gov.jo mil.jo name.jo -// jobs : http://en.wikipedia.org/wiki/.jobs +// jobs : https://en.wikipedia.org/wiki/.jobs jobs -// jp : http://en.wikipedia.org/wiki/.jp +// jp : https://en.wikipedia.org/wiki/.jp // http://jprs.co.jp/en/jpdomain.html -// Submitted by registry 2012-05-28 +// Submitted by registry jp // jp organizational type names ac.jp @@ -1499,7 +1751,7 @@ gr.jp lg.jp ne.jp or.jp -// jp preficture type names +// jp prefecture type names aichi.jp akita.jp aomori.jp @@ -1547,6 +1799,53 @@ wakayama.jp yamagata.jp yamaguchi.jp yamanashi.jp +栃木.jp +愛知.jp +愛媛.jp +兵庫.jp +熊本.jp +茨城.jp +北海道.jp +千葉.jp +和歌山.jp +長崎.jp +長野.jp +新潟.jp +青森.jp +静岡.jp +東京.jp +石川.jp +埼玉.jp +三重.jp +京都.jp +佐賀.jp +大分.jp +大阪.jp +奈良.jp +宮城.jp +宮崎.jp +富山.jp +山口.jp +山形.jp +山梨.jp +岩手.jp +岐阜.jp +岡山.jp +島根.jp +広島.jp +徳島.jp +沖縄.jp +滋賀.jp +神奈川.jp +福井.jp +福岡.jp +福島.jp +秋田.jp +群馬.jp +香川.jp +高知.jp +鳥取.jp +鹿児島.jp // jp geographic type names // http://jprs.jp/doc/rule/saisoku-1.html *.kawasaki.jp @@ -1591,7 +1890,6 @@ konan.aichi.jp kota.aichi.jp mihama.aichi.jp miyoshi.aichi.jp -nagakute.aichi.jp nishio.aichi.jp nisshin.aichi.jp obu.aichi.jp @@ -2263,7 +2561,6 @@ rikuzentakata.iwate.jp shiwa.iwate.jp shizukuishi.iwate.jp sumita.iwate.jp -takizawa.iwate.jp tanohata.iwate.jp tono.iwate.jp yahaba.iwate.jp @@ -2369,11 +2666,8 @@ arao.kumamoto.jp aso.kumamoto.jp choyo.kumamoto.jp gyokuto.kumamoto.jp -hitoyoshi.kumamoto.jp kamiamakusa.kumamoto.jp -kashima.kumamoto.jp kikuchi.kumamoto.jp -kosa.kumamoto.jp kumamoto.kumamoto.jp mashiki.kumamoto.jp mifune.kumamoto.jp @@ -2458,7 +2752,6 @@ iwanuma.miyagi.jp kakuda.miyagi.jp kami.miyagi.jp kawasaki.miyagi.jp -kesennuma.miyagi.jp marumori.miyagi.jp matsushima.miyagi.jp minamisanriku.miyagi.jp @@ -3244,8 +3537,17 @@ uenohara.yamanashi.jp yamanakako.yamanashi.jp yamanashi.yamanashi.jp -// ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145 -*.ke +// ke : http://www.kenic.or.ke/index.php/en/ke-domains/ke-domains +ke +ac.ke +co.ke +go.ke +info.ke +me.ke +mobi.ke +ne.ke +or.ke +sc.ke // kg : http://www.domain.kg/dmn_n.html kg @@ -3269,7 +3571,7 @@ gov.ki info.ki com.ki -// km : http://en.wikipedia.org/wiki/.km +// km : https://en.wikipedia.org/wiki/.km // http://www.domaine.km/documents/charte.doc km org.km @@ -3282,7 +3584,7 @@ mil.km ass.km com.km // These are only mentioned as proposed suggestions at domaine.km, but -// http://en.wikipedia.org/wiki/.km says they're available for registration: +// https://en.wikipedia.org/wiki/.km says they're available for registration: coop.km asso.km presse.km @@ -3292,7 +3594,7 @@ pharmaciens.km veterinaire.km gouv.km -// kn : http://en.wikipedia.org/wiki/.kn +// kn : https://en.wikipedia.org/wiki/.kn // http://www.dot.kn/domainRules.html kn net.kn @@ -3301,6 +3603,7 @@ edu.kn gov.kn // kp : http://www.kcce.kp/en_index.php +kp com.kp edu.kp gov.kp @@ -3308,7 +3611,7 @@ org.kp rep.kp tra.kp -// kr : http://en.wikipedia.org/wiki/.kr +// kr : https://en.wikipedia.org/wiki/.kr // see also: http://domain.nida.or.kr/eng/registration.jsp kr ac.kr @@ -3342,7 +3645,7 @@ jeonnam.kr seoul.kr ulsan.kr -// kw : http://en.wikipedia.org/wiki/.kw +// kw : https://en.wikipedia.org/wiki/.kw *.kw // ky : http://www.icta.ky/da_ky_reg_dom.php @@ -3354,7 +3657,7 @@ com.ky org.ky net.ky -// kz : http://en.wikipedia.org/wiki/.kz +// kz : https://en.wikipedia.org/wiki/.kz // see also: http://www.nic.kz/rules/index.jsp kz org.kz @@ -3364,8 +3667,8 @@ gov.kz mil.kz com.kz -// la : http://en.wikipedia.org/wiki/.la -// Submitted by registry 2008-06-10 +// la : https://en.wikipedia.org/wiki/.la +// Submitted by registry la int.la net.la @@ -3376,15 +3679,16 @@ per.la com.la org.la -// lb : http://en.wikipedia.org/wiki/.lb -// Submitted by registry 2008-06-17 +// lb : https://en.wikipedia.org/wiki/.lb +// Submitted by registry +lb com.lb edu.lb gov.lb net.lb org.lb -// lc : http://en.wikipedia.org/wiki/.lc +// lc : https://en.wikipedia.org/wiki/.lc // see also: http://www.nic.lc/rules.htm lc com.lc @@ -3394,7 +3698,7 @@ org.lc edu.lc gov.lc -// li : http://en.wikipedia.org/wiki/.li +// li : https://en.wikipedia.org/wiki/.li li // lk : http://www.nic.lk/seclevpr.html @@ -3413,21 +3717,23 @@ ltd.lk assn.lk grp.lk hotel.lk +ac.lk // lr : http://psg.com/dns/lr/lr.txt -// Submitted by registry 2008-06-17 +// Submitted by registry +lr com.lr edu.lr gov.lr org.lr net.lr -// ls : http://en.wikipedia.org/wiki/.ls +// ls : https://en.wikipedia.org/wiki/.ls ls co.ls org.ls -// lt : http://en.wikipedia.org/wiki/.lt +// lt : https://en.wikipedia.org/wiki/.lt lt // gov.lt : http://www.gov.lt/index_en.php gov.lt @@ -3459,7 +3765,7 @@ med.ly org.ly id.ly -// ma : http://en.wikipedia.org/wiki/.ma +// ma : https://en.wikipedia.org/wiki/.ma // http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf ma co.ma @@ -3474,10 +3780,10 @@ mc tm.mc asso.mc -// md : http://en.wikipedia.org/wiki/.md +// md : https://en.wikipedia.org/wiki/.md md -// me : http://en.wikipedia.org/wiki/.me +// me : https://en.wikipedia.org/wiki/.me me co.me net.me @@ -3488,7 +3794,7 @@ gov.me its.me priv.me -// mg : http://www.nic.mg/tarif.htm +// mg : http://nic.mg/nicmg/?page_id=39 mg org.mg nom.mg @@ -3498,14 +3804,15 @@ tm.mg edu.mg mil.mg com.mg +co.mg -// mh : http://en.wikipedia.org/wiki/.mh +// mh : https://en.wikipedia.org/wiki/.mh mh -// mil : http://en.wikipedia.org/wiki/.mil +// mil : https://en.wikipedia.org/wiki/.mil mil -// mk : http://en.wikipedia.org/wiki/.mk +// mk : https://en.wikipedia.org/wiki/.mk // see also: http://dns.marnet.net.mk/postapka.php mk com.mk @@ -3517,7 +3824,7 @@ inf.mk name.mk // ml : http://www.gobin.info/domainname/ml-template.doc -// see also: http://en.wikipedia.org/wiki/.ml +// see also: https://en.wikipedia.org/wiki/.ml ml com.ml edu.ml @@ -3527,10 +3834,10 @@ net.ml org.ml presse.ml -// mm : http://en.wikipedia.org/wiki/.mm +// mm : https://en.wikipedia.org/wiki/.mm *.mm -// mn : http://en.wikipedia.org/wiki/.mn +// mn : https://en.wikipedia.org/wiki/.mn mn gov.mn edu.mn @@ -3544,32 +3851,37 @@ org.mo edu.mo gov.mo -// mobi : http://en.wikipedia.org/wiki/.mobi +// mobi : https://en.wikipedia.org/wiki/.mobi mobi // mp : http://www.dot.mp/ // Confirmed by registry 2008-06-17 mp -// mq : http://en.wikipedia.org/wiki/.mq +// mq : https://en.wikipedia.org/wiki/.mq mq -// mr : http://en.wikipedia.org/wiki/.mr +// mr : https://en.wikipedia.org/wiki/.mr mr gov.mr -// ms : http://en.wikipedia.org/wiki/.ms +// ms : http://www.nic.ms/pdf/MS_Domain_Name_Rules.pdf ms +com.ms +edu.ms +gov.ms +net.ms +org.ms // mt : https://www.nic.org.mt/go/policy -// Submitted by registry 2013-11-19 +// Submitted by registry mt com.mt edu.mt net.mt org.mt -// mu : http://en.wikipedia.org/wiki/.mu +// mu : https://en.wikipedia.org/wiki/.mu mu com.mu net.mu @@ -4131,7 +4443,7 @@ zoology.museum ירושלים.museum иком.museum -// mv : http://en.wikipedia.org/wiki/.mv +// mv : https://en.wikipedia.org/wiki/.mv // "mv" included because, contra Wikipedia, google.mv exists. mv aero.mv @@ -4164,7 +4476,7 @@ net.mw org.mw // mx : http://www.nic.mx/ -// Submitted by registry 2008-06-19 +// Submitted by registry mx com.mx org.mx @@ -4182,9 +4494,17 @@ edu.my mil.my name.my -// mz : http://www.gobin.info/domainname/mz-template.doc -*.mz -!teledata.mz +// mz : http://www.uem.mz/ +// Submitted by registry +mz +ac.mz +adv.mz +co.mz +edu.mz +gov.mz +mil.mz +net.mz +org.mz // na : http://www.na-nic.com.na/ // http://www.info.na/domain/ @@ -4213,14 +4533,15 @@ name // nc : http://www.cctld.nc/ nc asso.nc +nom.nc -// ne : http://en.wikipedia.org/wiki/.ne +// ne : https://en.wikipedia.org/wiki/.ne ne -// net : http://en.wikipedia.org/wiki/.net +// net : https://en.wikipedia.org/wiki/.net net -// nf : http://en.wikipedia.org/wiki/.nf +// nf : https://en.wikipedia.org/wiki/.nf nf com.nf net.nf @@ -4233,24 +4554,39 @@ info.nf other.nf store.nf -// ng : http://psg.com/dns/ng/ +// ng : http://www.nira.org.ng/index.php/join-us/register-ng-domain/189-nira-slds ng com.ng edu.ng +gov.ng +i.ng +mil.ng +mobi.ng name.ng net.ng org.ng sch.ng -gov.ng -mil.ng -mobi.ng -// ni : http://www.nic.ni/dominios.htm -*.ni - -// nl : http://www.domain-registry.nl/ace.php/c,728,122,,,,Home.html -// Confirmed by registry (with technical -// reservations) 2008-06-08 +// ni : http://www.nic.ni/ +ni +ac.ni +biz.ni +co.ni +com.ni +edu.ni +gob.ni +in.ni +info.ni +int.ni +mil.ni +net.ni +nom.ni +org.ni +web.ni + +// nl : https://en.wikipedia.org/wiki/.nl +// https://www.sidn.nl/ +// ccTLD for the Netherlands nl // BV.nl will be a registry for dutch BV's (besloten vennootschap) @@ -5027,7 +5363,7 @@ våler.hedmark.no *.np // nr : http://cenpac.net.nr/dns/index.html -// Confirmed by registry 2008-06-17 +// Submitted by registry nr biz.nr info.nr @@ -5037,13 +5373,30 @@ org.nr net.nr com.nr -// nu : http://en.wikipedia.org/wiki/.nu +// nu : https://en.wikipedia.org/wiki/.nu nu -// nz : http://en.wikipedia.org/wiki/.nz -*.nz - -// om : http://en.wikipedia.org/wiki/.om +// nz : https://en.wikipedia.org/wiki/.nz +// Submitted by registry +nz +ac.nz +co.nz +cri.nz +geek.nz +gen.nz +govt.nz +health.nz +iwi.nz +kiwi.nz +maori.nz +mil.nz +māori.nz +net.nz +org.nz +parliament.nz +school.nz + +// om : https://en.wikipedia.org/wiki/.om om co.om com.om @@ -5055,7 +5408,10 @@ net.om org.om pro.om -// org : http://en.wikipedia.org/wiki/.org +// onion : https://tools.ietf.org/html/rfc7686 +onion + +// org : https://en.wikipedia.org/wiki/.org org // pa : http://www.nic.pa/ @@ -5090,11 +5446,11 @@ com.pf org.pf edu.pf -// pg : http://en.wikipedia.org/wiki/.pg +// pg : https://en.wikipedia.org/wiki/.pg *.pg // ph : http://www.domains.ph/FAQ2.asp -// Submitted by registry 2008-06-13 +// Submitted by registry ph com.ph net.ph @@ -5122,15 +5478,18 @@ gop.pk gos.pk info.pk -// pl : http://www.dns.pl/english/ +// pl http://www.dns.pl/english/index.html +// Submitted by registry pl -// NASK functional domains (nask.pl / dns.pl) : http://www.dns.pl/english/dns-funk.html +com.pl +net.pl +org.pl +// pl functional domains (http://www.dns.pl/english/index.html) aid.pl agro.pl atm.pl auto.pl biz.pl -com.pl edu.pl gmina.pl gsm.pl @@ -5139,10 +5498,8 @@ mail.pl miasta.pl media.pl mil.pl -net.pl nieruchomosci.pl nom.pl -org.pl pc.pl powiat.pl priv.pl @@ -5158,26 +5515,56 @@ tm.pl tourism.pl travel.pl turystyka.pl -// ICM functional domains (icm.edu.pl) -6bone.pl -art.pl -mbone.pl -// Government domains (administred by ippt.gov.pl) +// Government domains gov.pl -uw.gov.pl -um.gov.pl +ap.gov.pl +ic.gov.pl +is.gov.pl +us.gov.pl +kmpsp.gov.pl +kppsp.gov.pl +kwpsp.gov.pl +psp.gov.pl +wskr.gov.pl +kwp.gov.pl +mw.gov.pl ug.gov.pl +um.gov.pl +umig.gov.pl +ugim.gov.pl upow.gov.pl +uw.gov.pl starostwo.gov.pl +pa.gov.pl +po.gov.pl +psse.gov.pl +pup.gov.pl +rzgw.gov.pl +sa.gov.pl so.gov.pl sr.gov.pl -po.gov.pl -pa.gov.pl -// other functional domains -ngo.pl -irc.pl -usenet.pl -// NASK geographical domains : http://www.dns.pl/english/dns-regiony.html +wsa.gov.pl +sko.gov.pl +uzs.gov.pl +wiih.gov.pl +winb.gov.pl +pinb.gov.pl +wios.gov.pl +witd.gov.pl +wzmiuw.gov.pl +piw.gov.pl +wiw.gov.pl +griw.gov.pl +wif.gov.pl +oum.gov.pl +sdn.gov.pl +zp.gov.pl +uppo.gov.pl +mup.gov.pl +wuoz.gov.pl +konsulat.gov.pl +oirm.gov.pl +// pl regional domains (http://www.dns.pl/english/index.html) augustow.pl babia-gora.pl bedzin.pl @@ -5263,7 +5650,6 @@ rybnik.pl rzeszow.pl sanok.pl sejny.pl -siedlce.pl slask.pl slupsk.pl sosnowiec.pl @@ -5298,18 +5684,6 @@ zagan.pl zarow.pl zgora.pl zgorzelec.pl -// TASK geographical domains (www.task.gda.pl/uslugi/dns) -gda.pl -gdansk.pl -gdynia.pl -med.pl -sopot.pl -// other geographical domains -gliwice.pl -krakow.pl -poznan.pl -wroc.pl -zakopane.pl // pm : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf pm @@ -5322,7 +5696,7 @@ org.pn edu.pn net.pn -// post : http://en.wikipedia.org/wiki/.post +// post : https://en.wikipedia.org/wiki/.post post // pr : http://www.nic.pr/index.asp?f=1 @@ -5337,22 +5711,26 @@ pro.pr biz.pr info.pr name.pr -// these aren't mentioned on nic.pr, but on http://en.wikipedia.org/wiki/.pr +// these aren't mentioned on nic.pr, but on https://en.wikipedia.org/wiki/.pr est.pr prof.pr ac.pr -// pro : http://www.nic.pro/support_faq.htm +// pro : http://registry.pro/get-pro pro +aaa.pro aca.pro +acct.pro +avocat.pro bar.pro cpa.pro +eng.pro jur.pro law.pro med.pro -eng.pro +recht.pro -// ps : http://en.wikipedia.org/wiki/.ps +// ps : https://en.wikipedia.org/wiki/.ps // http://www.nic.ps/registration/policy.html#reg ps edu.ps @@ -5374,7 +5752,7 @@ publ.pt com.pt nome.pt -// pw : http://en.wikipedia.org/wiki/.pw +// pw : https://en.wikipedia.org/wiki/.pw pw co.pw ne.pw @@ -5384,7 +5762,7 @@ go.pw belau.pw // py : http://www.nic.py/pautas.html#seccion_9 -// Confirmed by registry 2012-10-03 +// Submitted by registry py com.py coop.py @@ -5407,172 +5785,40 @@ sch.qa // re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs re -com.re asso.re +com.re nom.re // ro : http://www.rotld.ro/ ro +arts.ro com.ro -org.ro -tm.ro -nt.ro -nom.ro +firm.ro info.ro +nom.ro +nt.ro +org.ro rec.ro -arts.ro -firm.ro store.ro +tm.ro www.ro -// rs : http://en.wikipedia.org/wiki/.rs +// rs : https://www.rnids.rs/en/domains/national-domains rs +ac.rs co.rs -org.rs edu.rs -ac.rs gov.rs in.rs +org.rs -// ru : http://www.cctld.ru/ru/docs/aktiv_8.php -// Industry domains +// ru : https://cctld.ru/en/domains/domens_ru/reserved/ ru ac.ru -com.ru edu.ru -int.ru -net.ru -org.ru -pp.ru -// Geographical domains -adygeya.ru -altai.ru -amur.ru -arkhangelsk.ru -astrakhan.ru -bashkiria.ru -belgorod.ru -bir.ru -bryansk.ru -buryatia.ru -cbg.ru -chel.ru -chelyabinsk.ru -chita.ru -chukotka.ru -chuvashia.ru -dagestan.ru -dudinka.ru -e-burg.ru -grozny.ru -irkutsk.ru -ivanovo.ru -izhevsk.ru -jar.ru -joshkar-ola.ru -kalmykia.ru -kaluga.ru -kamchatka.ru -karelia.ru -kazan.ru -kchr.ru -kemerovo.ru -khabarovsk.ru -khakassia.ru -khv.ru -kirov.ru -koenig.ru -komi.ru -kostroma.ru -krasnoyarsk.ru -kuban.ru -kurgan.ru -kursk.ru -lipetsk.ru -magadan.ru -mari.ru -mari-el.ru -marine.ru -mordovia.ru -mosreg.ru -msk.ru -murmansk.ru -nalchik.ru -nnov.ru -nov.ru -novosibirsk.ru -nsk.ru -omsk.ru -orenburg.ru -oryol.ru -palana.ru -penza.ru -perm.ru -pskov.ru -ptz.ru -rnd.ru -ryazan.ru -sakhalin.ru -samara.ru -saratov.ru -simbirsk.ru -smolensk.ru -spb.ru -stavropol.ru -stv.ru -surgut.ru -tambov.ru -tatarstan.ru -tom.ru -tomsk.ru -tsaritsyn.ru -tsk.ru -tula.ru -tuva.ru -tver.ru -tyumen.ru -udm.ru -udmurtia.ru -ulan-ude.ru -vladikavkaz.ru -vladimir.ru -vladivostok.ru -volgograd.ru -vologda.ru -voronezh.ru -vrn.ru -vyatka.ru -yakutia.ru -yamal.ru -yaroslavl.ru -yekaterinburg.ru -yuzhno-sakhalinsk.ru -// More geographical domains -amursk.ru -baikal.ru -cmw.ru -fareast.ru -jamal.ru -kms.ru -k-uralsk.ru -kustanai.ru -kuzbass.ru -magnitka.ru -mytis.ru -nakhodka.ru -nkz.ru -norilsk.ru -oskol.ru -pyatigorsk.ru -rubtsovsk.ru -snz.ru -syzran.ru -vdonsk.ru -zgrad.ru -// State domains gov.ru +int.ru mil.ru -// Technical domains test.ru // rw : http://www.nic.rw/cgi-bin/policy.pl @@ -5599,7 +5845,7 @@ edu.sa sch.sa // sb : http://www.sbnic.net.sb/ -// Submitted by registry 2008-06-08 +// Submitted by registry sb com.sb edu.sb @@ -5616,7 +5862,7 @@ org.sc edu.sc // sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm -// Submitted by registry 2008-06-17 +// Submitted by registry sd com.sd net.sd @@ -5627,8 +5873,8 @@ tv.sd gov.sd info.sd -// se : http://en.wikipedia.org/wiki/.se -// Submitted by registry 2008-06-24 +// se : https://en.wikipedia.org/wiki/.se +// Submitted by registry se a.se ac.se @@ -5662,7 +5908,6 @@ pp.se press.se r.se s.se -sshn.se t.se tm.se u.se @@ -5688,18 +5933,19 @@ gov.sh org.sh mil.sh -// si : http://en.wikipedia.org/wiki/.si +// si : https://en.wikipedia.org/wiki/.si si // sj : No registrations at this time. -// Submitted by registry 2008-06-16 +// Submitted by registry +sj -// sk : http://en.wikipedia.org/wiki/.sk +// sk : https://en.wikipedia.org/wiki/.sk // list of 2nd level domains ? sk // sl : http://www.nic.sl -// Submitted by registry 2008-06-12 +// Submitted by registry sl com.sl net.sl @@ -5707,10 +5953,10 @@ edu.sl gov.sl org.sl -// sm : http://en.wikipedia.org/wiki/.sm +// sm : https://en.wikipedia.org/wiki/.sm sm -// sn : http://en.wikipedia.org/wiki/.sn +// sn : https://en.wikipedia.org/wiki/.sn sn art.sn com.sn @@ -5726,7 +5972,7 @@ com.so net.so org.so -// sr : http://en.wikipedia.org/wiki/.sr +// sr : https://en.wikipedia.org/wiki/.sr sr // st : http://www.nic.st/html/policyrules/ @@ -5744,7 +5990,7 @@ principe.st saotome.st store.st -// su : http://en.wikipedia.org/wiki/.su +// su : https://en.wikipedia.org/wiki/.su su // sv : http://www.svnet.org.sv/niveldos.pdf @@ -5755,12 +6001,12 @@ gob.sv org.sv red.sv -// sx : http://en.wikipedia.org/wiki/.sx -// Confirmed by registry 2012-05-31 +// sx : https://en.wikipedia.org/wiki/.sx +// Submitted by registry sx gov.sx -// sy : http://en.wikipedia.org/wiki/.sy +// sy : https://en.wikipedia.org/wiki/.sy // see also: http://www.gobin.info/domainname/sy.doc sy edu.sy @@ -5770,32 +6016,32 @@ mil.sy com.sy org.sy -// sz : http://en.wikipedia.org/wiki/.sz +// sz : https://en.wikipedia.org/wiki/.sz // http://www.sispa.org.sz/ sz co.sz ac.sz org.sz -// tc : http://en.wikipedia.org/wiki/.tc +// tc : https://en.wikipedia.org/wiki/.tc tc -// td : http://en.wikipedia.org/wiki/.td +// td : https://en.wikipedia.org/wiki/.td td -// tel: http://en.wikipedia.org/wiki/.tel +// tel: https://en.wikipedia.org/wiki/.tel // http://www.telnic.org/ tel -// tf : http://en.wikipedia.org/wiki/.tf +// tf : https://en.wikipedia.org/wiki/.tf tf -// tg : http://en.wikipedia.org/wiki/.tg +// tg : https://en.wikipedia.org/wiki/.tg // http://www.nic.tg/ tg -// th : http://en.wikipedia.org/wiki/.th -// Submitted by registry 2008-06-17 +// th : https://en.wikipedia.org/wiki/.th +// Submitted by registry th ac.th co.th @@ -5823,10 +6069,10 @@ org.tj test.tj web.tj -// tk : http://en.wikipedia.org/wiki/.tk +// tk : https://en.wikipedia.org/wiki/.tk tk -// tl : http://en.wikipedia.org/wiki/.tl +// tl : https://en.wikipedia.org/wiki/.tl tl gov.tl @@ -5841,7 +6087,7 @@ gov.tm mil.tm edu.tm -// tn : http://en.wikipedia.org/wiki/.tn +// tn : https://en.wikipedia.org/wiki/.tn // http://whois.ati.tn/ tn com.tn @@ -5865,8 +6111,8 @@ agrinet.tn defense.tn turen.tn -// to : http://en.wikipedia.org/wiki/.to -// Submitted by registry 2008-06-17 +// to : https://en.wikipedia.org/wiki/.to +// Submitted by registry to com.to gov.to @@ -5875,14 +6121,38 @@ org.to edu.to mil.to -// tr : http://en.wikipedia.org/wiki/.tr -*.tr -!nic.tr -// Used by government in the TRNC -// http://en.wikipedia.org/wiki/.nc.tr +// subTLDs: https://www.nic.tr/forms/eng/policies.pdf +// and: https://www.nic.tr/forms/politikalar.pdf +// Submitted by +tr +com.tr +info.tr +biz.tr +net.tr +org.tr +web.tr +gen.tr +tv.tr +av.tr +dr.tr +bbs.tr +name.tr +tel.tr +gov.tr +bel.tr +pol.tr +mil.tr +k12.tr +edu.tr +kep.tr + +// Used by Northern Cyprus +nc.tr + +// Used by government agencies of Northern Cyprus gov.nc.tr -// travel : http://en.wikipedia.org/wiki/.travel +// travel : https://en.wikipedia.org/wiki/.travel travel // tt : http://www.nic.tt/ @@ -5905,12 +6175,12 @@ name.tt gov.tt edu.tt -// tv : http://en.wikipedia.org/wiki/.tv +// tv : https://en.wikipedia.org/wiki/.tv // Not listing any 2LDs as reserved since none seem to exist in practice, // Wikipedia notwithstanding. tv -// tw : http://en.wikipedia.org/wiki/.tw +// tw : https://en.wikipedia.org/wiki/.tw tw edu.tw gov.tw @@ -5927,7 +6197,8 @@ club.tw 商業.tw // tz : http://www.tznic.or.tz/index.php/domains -// Confirmed by registry 2013-01-22 +// Submitted by registry +tz ac.tz co.tz go.tz @@ -5942,7 +6213,7 @@ sc.tz tv.tz // ua : https://hostmaster.ua/policy/?ua -// Submitted by registry 2012-04-27 +// Submitted by registry ua // ua 2LD com.ua @@ -6024,10 +6295,6 @@ zhytomyr.ua zp.ua zt.ua -// Private registries in .ua -co.ua -pp.ua - // ug : https://www.registry.co.ug/ ug co.ug @@ -6039,22 +6306,22 @@ ne.ug com.ug org.ug -// uk : http://en.wikipedia.org/wiki/.uk -// Submitted by registry 2012-10-02 -// and tweaked by us pending further consultation. -*.uk +// uk : https://en.wikipedia.org/wiki/.uk +// Submitted by registry +uk +ac.uk +co.uk +gov.uk +ltd.uk +me.uk +net.uk +nhs.uk +org.uk +plc.uk +police.uk *.sch.uk -!bl.uk -!british-library.uk -!jet.uk -!mod.uk -!national-library-scotland.uk -!nel.uk -!nic.uk -!nls.uk -!parliament.uk - -// us : http://en.wikipedia.org/wiki/.us + +// us : https://en.wikipedia.org/wiki/.us us dni.us fed.us @@ -6153,7 +6420,7 @@ k12.mo.us k12.ms.us k12.mt.us k12.nc.us -k12.nd.us +// k12.nd.us Bug 1028347 - Removed at request of Travis Rosso k12.ne.us k12.nh.us k12.nj.us @@ -6176,9 +6443,8 @@ k12.vt.us k12.va.us k12.wa.us k12.wi.us -k12.wv.us +// k12.wv.us Bug 947705 - Removed at request of Verne Britton k12.wy.us - cc.ak.us cc.al.us cc.ar.us @@ -6234,7 +6500,6 @@ cc.wa.us cc.wi.us cc.wv.us cc.wy.us - lib.ak.us lib.al.us lib.ar.us @@ -6244,7 +6509,7 @@ lib.ca.us lib.co.us lib.ct.us lib.dc.us -lib.de.us +// lib.de.us Issue #243 - Moved to Private section at request of Ed Moore lib.fl.us lib.ga.us lib.gu.us @@ -6290,14 +6555,24 @@ lib.wa.us lib.wi.us // lib.wv.us Bug 941670 - Removed at request of Larry W Arnold lib.wy.us - // k12.ma.us contains school districts in Massachusetts. The 4LDs are -// managed indepedently except for private (PVT), charter (CHTR) and -// parochial (PAROCH) schools. Those are delegated dorectly to the +// managed independently except for private (PVT), charter (CHTR) and +// parochial (PAROCH) schools. Those are delegated directly to the // 5LD operators. pvt.k12.ma.us chtr.k12.ma.us paroch.k12.ma.us +// Merit Network, Inc. maintains the registry for =~ /(k12|cc|lib).mi.us/ and the following +// see also: http://domreg.merit.edu +// see also: whois -h whois.domreg.merit.edu help +ann-arbor.mi.us +cog.mi.us +dst.mi.us +eaton.mi.us +gen.mi.us +mus.mi.us +tec.mi.us +washtenaw.mi.us // uy : http://www.nic.org.uy/ uy @@ -6315,11 +6590,11 @@ com.uz net.uz org.uz -// va : http://en.wikipedia.org/wiki/.va +// va : https://en.wikipedia.org/wiki/.va va -// vc : http://en.wikipedia.org/wiki/.vc -// Submitted by registry 2008-06-13 +// vc : https://en.wikipedia.org/wiki/.vc +// Submitted by registry vc com.vc net.vc @@ -6329,20 +6604,27 @@ mil.vc edu.vc // ve : https://registro.nic.ve/ -// Confirmed by registry 2012-10-04 +// Submitted by registry ve +arts.ve co.ve com.ve e12.ve edu.ve +firm.ve +gob.ve gov.ve info.ve +int.ve mil.ve net.ve org.ve +rec.ve +store.ve +tec.ve web.ve -// vg : http://en.wikipedia.org/wiki/.vg +// vg : https://en.wikipedia.org/wiki/.vg vg // vi : http://www.nic.vi/newdomainform.htm @@ -6371,14 +6653,18 @@ name.vn pro.vn health.vn -// vu : http://en.wikipedia.org/wiki/.vu -// list of 2nd level tlds ? +// vu : https://en.wikipedia.org/wiki/.vu +// http://www.vunic.vu/ vu +com.vu +edu.vu +net.vu +org.vu // wf : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf wf -// ws : http://en.wikipedia.org/wiki/.ws +// ws : https://en.wikipedia.org/wiki/.ws // http://samoanic.ws/index.dhtml ws com.ws @@ -6391,163 +6677,256 @@ edu.ws yt // IDN ccTLDs -// Please sort by ISO 3166 ccTLD, then punicode string -// when submitting patches and follow this format: -// ("" ) : -// [optional sponsoring org] -// +// When submitting patches, please maintain a sort by ISO 3166 ccTLD, then +// U-label, and follow this format: +// // A-Label ("", [, variant info]) : +// // [sponsoring org] +// U-Label -// xn--mgbaam7a8h ("Emerat" Arabic) : AE +// xn--mgbaam7a8h ("Emerat", Arabic) : AE // http://nic.ae/english/arabicdomain/rules.jsp امارات -// xn--54b7fta0cc ("Bangla" Bangla) : BD +// xn--y9a3aq ("hye", Armenian) : AM +// ISOC AM (operated by .am Registry) +հայ + +// xn--54b7fta0cc ("Bangla", Bangla) : BD বাংলা -// xn--fiqs8s ("China" Chinese-Han-Simplified <.Zhonggou>) : CN +// xn--90ae ("bg", Bulgarian) : BG +бг + +// xn--90ais ("bel", Belarusian/Russian Cyrillic) : BY +// Operated by .by registry +бел + +// xn--fiqs8s ("Zhongguo/China", Chinese, Simplified) : CN // CNNIC // http://cnnic.cn/html/Dir/2005/10/11/3218.htm 中国 -// xn--fiqz9s ("China" Chinese-Han-Traditional <.Zhonggou>) : CN +// xn--fiqz9s ("Zhongguo/China", Chinese, Traditional) : CN // CNNIC // http://cnnic.cn/html/Dir/2005/10/11/3218.htm 中國 -// xn--lgbbat1ad8j ("Algeria / Al Jazair" Arabic) : DZ +// xn--lgbbat1ad8j ("Algeria/Al Jazair", Arabic) : DZ الجزائر -// xn--wgbh1c ("Egypt" Arabic .masr) : EG +// xn--wgbh1c ("Egypt/Masr", Arabic) : EG // http://www.dotmasr.eg/ مصر -// xn--node ("ge" Georgian (Mkhedruli)) : GE +// xn--e1a4c ("eu", Cyrillic) : EU +ею + +// xn--node ("ge", Georgian Mkhedruli) : GE გე -// xn--j6w193g ("Hong Kong" Chinese-Han) : HK +// xn--qxam ("el", Greek) : GR +// Hellenic Ministry of Infrastructure, Transport, and Networks +ελ + +// xn--j6w193g ("Hong Kong", Chinese) : HK // https://www2.hkirc.hk/register/rules.jsp 香港 -// xn--h2brj9c ("Bharat" Devanagari) : IN +// xn--2scrj9c ("Bharat", Kannada) : IN +// India +ಭಾರತ + +// xn--3hcrj9c ("Bharat", Oriya) : IN +// India +ଭାରତ + +// xn--45br5cyl ("Bharatam", Assamese) : IN +// India +ভাৰত + +// xn--h2breg3eve ("Bharatam", Sanskrit) : IN +// India +भारतम् + +// xn--h2brj9c8c ("Bharot", Santali) : IN +// India +भारोत + +// xn--mgbgu82a ("Bharat", Sindhi) : IN +// India +ڀارت + +// xn--rvc1e0am3e ("Bharatam", Malayalam) : IN +// India +ഭാരതം + +// xn--h2brj9c ("Bharat", Devanagari) : IN // India भारत -// xn--mgbbh1a71e ("Bharat" Arabic) : IN +// xn--mgbbh1a71e ("Bharat", Arabic) : IN // India بھارت -// xn--fpcrj9c3d ("Bharat" Telugu) : IN +// xn--fpcrj9c3d ("Bharat", Telugu) : IN // India భారత్ -// xn--gecrj9c ("Bharat" Gujarati) : IN +// xn--gecrj9c ("Bharat", Gujarati) : IN // India ભારત -// xn--s9brj9c ("Bharat" Gurmukhi) : IN +// xn--s9brj9c ("Bharat", Gurmukhi) : IN // India ਭਾਰਤ -// xn--45brj9c ("Bharat" Bengali) : IN +// xn--45brj9c ("Bharat", Bengali) : IN // India ভারত -// xn--xkc2dl3a5ee0h ("India" Tamil) : IN +// xn--xkc2dl3a5ee0h ("India", Tamil) : IN // India இந்தியா -// xn--mgba3a4f16a ("Iran" Persian) : IR +// xn--mgba3a4f16a ("Iran", Persian) : IR ایران -// xn--mgba3a4fra ("Iran" Arabic) : IR +// xn--mgba3a4fra ("Iran", Arabic) : IR ايران -// xn--mgbayh7gpa ("al-Ordon" Arabic) : JO +// xn--mgbtx2b ("Iraq", Arabic) : IQ +// Communications and Media Commission +عراق + +// xn--mgbayh7gpa ("al-Ordon", Arabic) : JO // National Information Technology Center (NITC) // Royal Scientific Society, Al-Jubeiha الاردن -// xn--3e0b707e ("Republic of Korea" Hangul) : KR +// xn--3e0b707e ("Republic of Korea", Hangul) : KR 한국 -// xn--fzc2c9e2c ("Lanka" Sinhalese-Sinhala) : LK +// xn--80ao21a ("Kaz", Kazakh) : KZ +қаз + +// xn--fzc2c9e2c ("Lanka", Sinhalese-Sinhala) : LK // http://nic.lk ලංකා -// xn--xkc2al3hye2a ("Ilangai" Tamil) : LK +// xn--xkc2al3hye2a ("Ilangai", Tamil) : LK // http://nic.lk இலங்கை -// xn--mgbc0a9azcg ("Morocco / al-Maghrib" Arabic) : MA +// xn--mgbc0a9azcg ("Morocco/al-Maghrib", Arabic) : MA المغرب -// xn--mgb9awbf ("Oman" Arabic) : OM +// xn--d1alf ("mkd", Macedonian) : MK +// MARnet +мкд + +// xn--l1acc ("mon", Mongolian) : MN +мон + +// xn--mix891f ("Macao", Chinese, Traditional) : MO +// MONIC / HNET Asia (Registry Operator for .mo) +澳門 + +// xn--mix082f ("Macao", Chinese, Simplified) : MO +澳门 + +// xn--mgbx4cd0ab ("Malaysia", Malay) : MY +مليسيا + +// xn--mgb9awbf ("Oman", Arabic) : OM عمان -// xn--ygbi2ammx ("Falasteen" Arabic) : PS +// xn--mgbai9azgqp6j ("Pakistan", Urdu/Arabic) : PK +پاکستان + +// xn--mgbai9a5eva00b ("Pakistan", Urdu/Arabic, variant) : PK +پاكستان + +// xn--ygbi2ammx ("Falasteen", Arabic) : PS // The Palestinian National Internet Naming Authority (PNINA) // http://www.pnina.ps فلسطين -// xn--90a3ac ("srb" Cyrillic) : RS +// xn--90a3ac ("srb", Cyrillic) : RS +// https://www.rnids.rs/en/domains/national-domains срб - -// xn--p1ai ("rf" Russian-Cyrillic) : RU +пр.срб +орг.срб +обр.срб +од.срб +упр.срб +ак.срб + +// xn--p1ai ("rf", Russian-Cyrillic) : RU // http://www.cctld.ru/en/docs/rulesrf.php рф -// xn--wgbl6a ("Qatar" Arabic) : QA +// xn--wgbl6a ("Qatar", Arabic) : QA // http://www.ict.gov.qa/ قطر -// xn--mgberp4a5d4ar ("AlSaudiah" Arabic) : SA +// xn--mgberp4a5d4ar ("AlSaudiah", Arabic) : SA // http://www.nic.net.sa/ السعودية -// xn--mgberp4a5d4a87g ("AlSaudiah" Arabic) variant : SA +// xn--mgberp4a5d4a87g ("AlSaudiah", Arabic, variant) : SA السعودیة -// xn--mgbqly7c0a67fbc ("AlSaudiah" Arabic) variant : SA +// xn--mgbqly7c0a67fbc ("AlSaudiah", Arabic, variant) : SA السعودیۃ -// xn--mgbqly7cvafr ("AlSaudiah" Arabic) variant : SA +// xn--mgbqly7cvafr ("AlSaudiah", Arabic, variant) : SA السعوديه -// xn--ogbpf8fl ("Syria" Arabic) : SY -سورية - -// xn--mgbtf8fl ("Syria" Arabic) variant : SY -سوريا +// xn--mgbpl2fh ("sudan", Arabic) : SD +// Operated by .sd registry +سودان -// xn--yfro4i67o Singapore ("Singapore" Chinese-Han) : SG +// xn--yfro4i67o Singapore ("Singapore", Chinese) : SG 新加坡 -// xn--clchc0ea0b2g2a9gcd ("Singapore" Tamil) : SG +// xn--clchc0ea0b2g2a9gcd ("Singapore", Tamil) : SG சிங்கப்பூர் -// xn--o3cw4h ("Thai" Thai) : TH +// xn--ogbpf8fl ("Syria", Arabic) : SY +سورية + +// xn--mgbtf8fl ("Syria", Arabic, variant) : SY +سوريا + +// xn--o3cw4h ("Thai", Thai) : TH // http://www.thnic.co.th ไทย - -// xn--pgbs0dh ("Tunis") : TN +ศึกษา.ไทย +ธุรกิจ.ไทย +รัฐบาล.ไทย +ทหาร.ไทย +เน็ต.ไทย +องค์กร.ไทย + +// xn--pgbs0dh ("Tunisia", Arabic) : TN // http://nic.tn تونس -// xn--kpry57d ("Taiwan" Chinese-Han-Traditional) : TW +// xn--kpry57d ("Taiwan", Chinese, Traditional) : TW // http://www.twnic.net/english/dn/dn_07a.htm 台灣 -// xn--kprw13d ("Taiwan" Chinese-Han-Simplified) : TW +// xn--kprw13d ("Taiwan", Chinese, Simplified) : TW // http://www.twnic.net/english/dn/dn_07a.htm 台湾 -// xn--nnx388a ("Taiwan") variant : TW +// xn--nnx388a ("Taiwan", Chinese, variant) : TW 臺灣 -// xn--j1amh ("ukr" Cyrillic) : UA +// xn--j1amh ("ukr", Cyrillic) : UA укр -// xn--mgb2ddes ("AlYemen" Arabic) : YE +// xn--mgb2ddes ("AlYemen", Arabic) : YE اليمن // xxx : http://icmregistry.com @@ -6556,475 +6935,3911 @@ xxx // ye : http://www.y.net.ye/services/domain_name.htm *.ye -// za : http://www.zadna.org.za/slds.html -*.za +// za : http://www.zadna.org.za/content/page/domain-information +ac.za +agric.za +alt.za +co.za +edu.za +gov.za +grondar.za +law.za +mil.za +net.za +ngo.za +nis.za +nom.za +org.za +school.za +tm.za +web.za + +// zm : https://zicta.zm/ +// Submitted by registry +zm +ac.zm +biz.zm +co.zm +com.zm +edu.zm +gov.zm +info.zm +mil.zm +net.zm +org.zm +sch.zm + +// zw : https://www.potraz.gov.zw/ +// Confirmed by registry 2017-01-25 +zw +ac.zw +co.zw +gov.zw +mil.zw +org.zw + +// List of new gTLDs imported from https://newgtlds.icann.org/newgtlds.csv on 2017-02-23T00:46:09Z + +// aaa : 2015-02-26 American Automobile Association, Inc. +aaa + +// aarp : 2015-05-21 AARP +aarp + +// abarth : 2015-07-30 Fiat Chrysler Automobiles N.V. +abarth + +// abb : 2014-10-24 ABB Ltd +abb + +// abbott : 2014-07-24 Abbott Laboratories, Inc. +abbott + +// abbvie : 2015-07-30 AbbVie Inc. +abbvie + +// abc : 2015-07-30 Disney Enterprises, Inc. +abc + +// able : 2015-06-25 Able Inc. +able + +// abogado : 2014-04-24 Top Level Domain Holdings Limited +abogado + +// abudhabi : 2015-07-30 Abu Dhabi Systems and Information Centre +abudhabi + +// academy : 2013-11-07 Half Oaks, LLC +academy -// zm : http://en.wikipedia.org/wiki/.zm -*.zm +// accenture : 2014-08-15 Accenture plc +accenture -// zw : http://en.wikipedia.org/wiki/.zw -*.zw +// accountant : 2014-11-20 dot Accountant Limited +accountant +// accountants : 2014-03-20 Knob Town, LLC +accountants -// xn--80asehdb : 2013-07-14 CORE Association -онлайн +// aco : 2015-01-08 ACO Severin Ahlmann GmbH & Co. KG +aco -// xn--80aswg : 2013-07-14 CORE Association -сайт +// active : 2014-05-01 The Active Network, Inc +active -// xn--ngbc5azd : 2013-07-14 International Domain Registry Pty. Ltd. -شبكة +// actor : 2013-12-12 United TLD Holdco Ltd. +actor -// xn--unup4y : 2013-07-14 Spring Fields, LLC -游戏 +// adac : 2015-07-16 Allgemeiner Deutscher Automobil-Club e.V. (ADAC) +adac -// xn--vhquv : 2013-08-28 Dash McCook, LLC -企业 +// ads : 2014-12-04 Charleston Road Registry Inc. +ads -// camera : 2013-08-28 Atomic Maple, LLC -camera +// adult : 2014-10-16 ICM Registry AD LLC +adult -// clothing : 2013-08-28 Steel Lake, LLC -clothing +// aeg : 2015-03-19 Aktiebolaget Electrolux +aeg -// lighting : 2013-08-28 John McCook, LLC -lighting +// aetna : 2015-05-21 Aetna Life Insurance Company +aetna -// singles : 2013-08-28 Fern Madison, LLC -singles +// afamilycompany : 2015-07-23 Johnson Shareholdings, Inc. +afamilycompany -// ventures : 2013-08-28 Binky Lake, LLC -ventures +// afl : 2014-10-02 Australian Football League +afl -// voyage : 2013-08-28 Ruby House, LLC -voyage +// africa : 2014-03-24 ZA Central Registry NPC trading as Registry.Africa +africa -// guru : 2013-08-28 Pioneer Cypress, LLC -guru +// agakhan : 2015-04-23 Fondation Aga Khan (Aga Khan Foundation) +agakhan -// holdings : 2013-08-28 John Madison, LLC -holdings +// agency : 2013-11-14 Steel Falls, LLC +agency -// equipment : 2013-08-28 Corn Station, LLC -equipment +// aig : 2014-12-18 American International Group, Inc. +aig -// bike : 2013-08-28 Grand Hollow, LLC -bike +// aigo : 2015-08-06 aigo Digital Technology Co,Ltd. +aigo -// estate : 2013-08-28 Trixy Park, LLC -estate +// airbus : 2015-07-30 Airbus S.A.S. +airbus -// tattoo : 2013-08-30 Uniregistry,Corp. -tattoo +// airforce : 2014-03-06 United TLD Holdco Ltd. +airforce -// xn--3ds443g : 2013-09-09 TLD Registry Limited -在线 +// airtel : 2014-10-24 Bharti Airtel Limited +airtel -// xn--fiq228c5hs : 2013-09-09 TLD Registry Limited -中文网 +// akdn : 2015-04-23 Fondation Aga Khan (Aga Khan Foundation) +akdn -// land : 2013-09-10 Pine Moon, LLC -land +// alfaromeo : 2015-07-31 Fiat Chrysler Automobiles N.V. +alfaromeo -// plumbing : 2013-09-10 Spring Tigers, LLC -plumbing +// alibaba : 2015-01-15 Alibaba Group Holding Limited +alibaba -// contractors : 2013-09-10 Magic Woods, LLC -contractors +// alipay : 2015-01-15 Alibaba Group Holding Limited +alipay -// sexy : 2013-09-11 Uniregistry,Corp. -sexy +// allfinanz : 2014-07-03 Allfinanz Deutsche Vermögensberatung Aktiengesellschaft +allfinanz -// menu : 2013-09-11 Wedding TLD2, LLC -menu +// allstate : 2015-07-31 Allstate Fire and Casualty Insurance Company +allstate -// xn--rhqv96g : 2013-09-11 Stable Tone Limited -世界 +// ally : 2015-06-18 Ally Financial Inc. +ally -// uno : 2013-09-11 Dot Latin, LLC -uno +// alsace : 2014-07-02 REGION D ALSACE +alsace -// gallery : 2013-09-13 Sugar House, LLC -gallery +// alstom : 2015-07-30 ALSTOM +alstom -// technology : 2013-09-13 Auburn Falls -technology +// americanexpress : 2015-07-31 American Express Travel Related Services Company, Inc. +americanexpress -// xn--3bst00m : 2013-09-13 Eagle Horizon Limited -集团 +// americanfamily : 2015-07-23 AmFam, Inc. +americanfamily -// reviews : 2013-09-13 Extra Cover, LLC -reviews +// amex : 2015-07-31 American Express Travel Related Services Company, Inc. +amex -// guide : 2013-09-13 Snow Moon, LLC -guide +// amfam : 2015-07-23 AmFam, Inc. +amfam -// xn--6qq986b3x1 : 2013-09-13 Tycoon Treasure Limited -我爱你 +// amica : 2015-05-28 Amica Mutual Insurance Company +amica -// graphics : 2013-09-13 Over Madison, LLC -graphics +// amsterdam : 2014-07-24 Gemeente Amsterdam +amsterdam -// construction : 2013-09-13 Fox Dynamite, LLC -construction +// analytics : 2014-12-18 Campus IP LLC +analytics -// onl : 2013-09-16 I-Registry Ltd. -onl +// android : 2014-08-07 Charleston Road Registry Inc. +android -// xn--q9jyb4c : 2013-09-17 Charleston Road Registry -みんな +// anquan : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD. +anquan -// diamonds : 2013-09-23 John Edge, LLC -diamonds +// anz : 2015-07-31 Australia and New Zealand Banking Group Limited +anz -// kiwi : 2013-09-23 Dot Kiwi Limited -kiwi +// aol : 2015-09-17 AOL Inc. +aol -// enterprises : 2013-09-23 Snow Oaks LLC -enterprises +// apartments : 2014-12-11 June Maple, LLC +apartments -// today : 2013-09-23 Pearl Woods, LLC -today +// app : 2015-05-14 Charleston Road Registry Inc. +app -// futbol : 2013-09-23 Atomic Falls, LLC -futbol +// apple : 2015-05-14 Apple Inc. +apple -// photography : 2013-09-23 Sugar Glen, LLC -photography +// aquarelle : 2014-07-24 Aquarelle.com +aquarelle -// tips : 2013-09-23 Corn Willow, LLC -tips +// arab : 2015-11-12 League of Arab States +arab -// directory : 2013-09-23 Extra Madison, LLC -directory +// aramco : 2014-11-20 Aramco Services Company +aramco -// kitchen : 2013-09-23 Just Goodbye, LLC -kitchen +// archi : 2014-02-06 STARTING DOT LIMITED +archi -// xn--6frz82g : 2013-09-24 Afilias Limited -移动 +// army : 2014-03-06 United TLD Holdco Ltd. +army -// kim : 2013-09-24 Afilias Limited -kim +// art : 2016-03-24 UK Creative Ideas Limited +art -// xn--cg4bki : 2013-09-27 Samsung SDS Co., LTD -삼성 +// arte : 2014-12-11 Association Relative à la Télévision Européenne G.E.I.E. +arte -// monash : 2013-10-01 Monash University -monash +// asda : 2015-07-31 Wal-Mart Stores, Inc. +asda -// wed : 2013-10-02 Atgron, Inc. -wed +// associates : 2014-03-06 Baxter Hill, LLC +associates -// pink : 2013-10-02 Afilias Limited -pink +// athleta : 2015-07-30 The Gap, Inc. +athleta -// ruhr : 2013-10-02 regiodot GmbH & Co. KG -ruhr +// attorney : 2014-03-20 +attorney -// buzz : 2013-10-03 DOTSTRATEGY CO. -buzz +// auction : 2014-03-20 +auction -// careers : 2013-10-03 Wild Corner, LLC -careers +// audi : 2015-05-21 AUDI Aktiengesellschaft +audi -// shoes : 2013-10-03 Binky Galley, LLC -shoes +// audible : 2015-06-25 Amazon EU S.à r.l. +audible -// xn--4gbrim : 2013-10-07 Suhub Electronic Establishment -موقع +// audio : 2014-03-20 Uniregistry, Corp. +audio -// career : 2013-10-09 dotCareer, LLC -career +// auspost : 2015-08-13 Australian Postal Corporation +auspost -// otsuka : 2013-10-11 Otsuka Holdings Co. Ltd. -otsuka +// author : 2014-12-18 Amazon EU S.à r.l. +author -// xn--fiQ64b : 2013-10-14 CITIC Group Corporation -中信 +// auto : 2014-11-13 +auto -// wed : 2013-10-02 Atgron, Inc. -wed +// autos : 2014-01-09 DERAutos, LLC +autos -// pink : 2013-10-02 Afilias Limited -pink +// avianca : 2015-01-08 Aerovias del Continente Americano S.A. Avianca +avianca -// ruhr : 2013-10-02 regiodot GmbH & Co. KG -ruhr +// aws : 2015-06-25 Amazon EU S.à r.l. +aws -// buzz : 2013-10-03 DOTSTRATEGY CO. -buzz +// axa : 2013-12-19 AXA SA +axa -// careers : 2013-10-03 Wild Corner, LLC -careers +// azure : 2014-12-18 Microsoft Corporation +azure -// shoes : 2013-10-03 Binky Galley, LLC -shoes +// baby : 2015-04-09 Johnson & Johnson Services, Inc. +baby -// xn--4gbrim : 2013-10-07 Suhub Electronic Establishment -موقع +// baidu : 2015-01-08 Baidu, Inc. +baidu -// career : 2013-10-09 dotCareer, LLC -career +// banamex : 2015-07-30 Citigroup Inc. +banamex -// otsuka : 2013-10-11 Otsuka Holdings Co. Ltd. -otsuka +// bananarepublic : 2015-07-31 The Gap, Inc. +bananarepublic -// xn--fiQ64b : 2013-10-14 CITIC Group Corporation -中信 +// band : 2014-06-12 +band -// gift : 2013-10-18 Uniregistry Corp. -gift +// bank : 2014-09-25 fTLD Registry Services LLC +bank -// recipes : 2013-10-18 Grand Island, LLC -recipes +// bar : 2013-12-12 Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable +bar -// coffee : 2013-10-18 Trixy Cover, LLC -coffee +// barcelona : 2014-07-24 Municipi de Barcelona +barcelona -// luxury : 2013-10-18 Luxury Partners, LLC -luxury +// barclaycard : 2014-11-20 Barclays Bank PLC +barclaycard -// domains : 2013-10-18 Sugar Cross, LLC -domains +// barclays : 2014-11-20 Barclays Bank PLC +barclays -// photos : 2013-10-18 Sea Corner, LLC -photos +// barefoot : 2015-06-11 Gallo Vineyards, Inc. +barefoot -// limo : 2013-10-18 Hidden Frostbite, LLC -limo +// bargains : 2013-11-14 Half Hallow, LLC +bargains -// viajes : 2013-10-18 Black Madison, LLC +// baseball : 2015-10-29 MLB Advanced Media DH, LLC +baseball + +// basketball : 2015-08-20 Fédération Internationale de Basketball (FIBA) +basketball + +// bauhaus : 2014-04-17 Werkhaus GmbH +bauhaus + +// bayern : 2014-01-23 Bayern Connect GmbH +bayern + +// bbc : 2014-12-18 British Broadcasting Corporation +bbc + +// bbt : 2015-07-23 BB&T Corporation +bbt + +// bbva : 2014-10-02 BANCO BILBAO VIZCAYA ARGENTARIA, S.A. +bbva + +// bcg : 2015-04-02 The Boston Consulting Group, Inc. +bcg + +// bcn : 2014-07-24 Municipi de Barcelona +bcn + +// beats : 2015-05-14 Beats Electronics, LLC +beats + +// beauty : 2015-12-03 L'Oréal +beauty + +// beer : 2014-01-09 Top Level Domain Holdings Limited +beer + +// bentley : 2014-12-18 Bentley Motors Limited +bentley + +// berlin : 2013-10-31 dotBERLIN GmbH & Co. KG +berlin + +// best : 2013-12-19 BestTLD Pty Ltd +best + +// bestbuy : 2015-07-31 BBY Solutions, Inc. +bestbuy + +// bet : 2015-05-07 Afilias plc +bet + +// bharti : 2014-01-09 Bharti Enterprises (Holding) Private Limited +bharti + +// bible : 2014-06-19 American Bible Society +bible + +// bid : 2013-12-19 dot Bid Limited +bid + +// bike : 2013-08-27 Grand Hollow, LLC +bike + +// bing : 2014-12-18 Microsoft Corporation +bing + +// bingo : 2014-12-04 Sand Cedar, LLC +bingo + +// bio : 2014-03-06 STARTING DOT LIMITED +bio + +// black : 2014-01-16 Afilias Limited +black + +// blackfriday : 2014-01-16 Uniregistry, Corp. +blackfriday + +// blanco : 2015-07-16 BLANCO GmbH + Co KG +blanco + +// blockbuster : 2015-07-30 Dish DBS Corporation +blockbuster + +// blog : 2015-05-14 +blog + +// bloomberg : 2014-07-17 Bloomberg IP Holdings LLC +bloomberg + +// blue : 2013-11-07 Afilias Limited +blue + +// bms : 2014-10-30 Bristol-Myers Squibb Company +bms + +// bmw : 2014-01-09 Bayerische Motoren Werke Aktiengesellschaft +bmw + +// bnl : 2014-07-24 Banca Nazionale del Lavoro +bnl + +// bnpparibas : 2014-05-29 BNP Paribas +bnpparibas + +// boats : 2014-12-04 DERBoats, LLC +boats + +// boehringer : 2015-07-09 Boehringer Ingelheim International GmbH +boehringer + +// bofa : 2015-07-31 NMS Services, Inc. +bofa + +// bom : 2014-10-16 Núcleo de Informação e Coordenação do Ponto BR - NIC.br +bom + +// bond : 2014-06-05 Bond University Limited +bond + +// boo : 2014-01-30 Charleston Road Registry Inc. +boo + +// book : 2015-08-27 Amazon EU S.à r.l. +book + +// booking : 2015-07-16 Booking.com B.V. +booking + +// boots : 2015-01-08 THE BOOTS COMPANY PLC +boots + +// bosch : 2015-06-18 Robert Bosch GMBH +bosch + +// bostik : 2015-05-28 Bostik SA +bostik + +// boston : 2015-12-10 +boston + +// bot : 2014-12-18 Amazon EU S.à r.l. +bot + +// boutique : 2013-11-14 Over Galley, LLC +boutique + +// box : 2015-11-12 NS1 Limited +box + +// bradesco : 2014-12-18 Banco Bradesco S.A. +bradesco + +// bridgestone : 2014-12-18 Bridgestone Corporation +bridgestone + +// broadway : 2014-12-22 Celebrate Broadway, Inc. +broadway + +// broker : 2014-12-11 IG Group Holdings PLC +broker + +// brother : 2015-01-29 Brother Industries, Ltd. +brother + +// brussels : 2014-02-06 DNS.be vzw +brussels + +// budapest : 2013-11-21 Top Level Domain Holdings Limited +budapest + +// bugatti : 2015-07-23 Bugatti International SA +bugatti + +// build : 2013-11-07 Plan Bee LLC +build + +// builders : 2013-11-07 Atomic Madison, LLC +builders + +// business : 2013-11-07 Spring Cross, LLC +business + +// buy : 2014-12-18 Amazon EU S.à r.l. +buy + +// buzz : 2013-10-02 DOTSTRATEGY CO. +buzz + +// bzh : 2014-02-27 Association www.bzh +bzh + +// cab : 2013-10-24 Half Sunset, LLC +cab + +// cafe : 2015-02-11 Pioneer Canyon, LLC +cafe + +// cal : 2014-07-24 Charleston Road Registry Inc. +cal + +// call : 2014-12-18 Amazon EU S.à r.l. +call + +// calvinklein : 2015-07-30 PVH gTLD Holdings LLC +calvinklein + +// cam : 2016-04-21 AC Webconnecting Holding B.V. +cam + +// camera : 2013-08-27 Atomic Maple, LLC +camera + +// camp : 2013-11-07 Delta Dynamite, LLC +camp + +// cancerresearch : 2014-05-15 Australian Cancer Research Foundation +cancerresearch + +// canon : 2014-09-12 Canon Inc. +canon + +// capetown : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry +capetown + +// capital : 2014-03-06 Delta Mill, LLC +capital + +// capitalone : 2015-08-06 Capital One Financial Corporation +capitalone + +// car : 2015-01-22 +car + +// caravan : 2013-12-12 Caravan International, Inc. +caravan + +// cards : 2013-12-05 Foggy Hollow, LLC +cards + +// care : 2014-03-06 Goose Cross +care + +// career : 2013-10-09 dotCareer LLC +career + +// careers : 2013-10-02 Wild Corner, LLC +careers + +// cars : 2014-11-13 +cars + +// cartier : 2014-06-23 Richemont DNS Inc. +cartier + +// casa : 2013-11-21 Top Level Domain Holdings Limited +casa + +// case : 2015-09-03 CNH Industrial N.V. +case + +// caseih : 2015-09-03 CNH Industrial N.V. +caseih + +// cash : 2014-03-06 Delta Lake, LLC +cash + +// casino : 2014-12-18 Binky Sky, LLC +casino + +// catering : 2013-12-05 New Falls. LLC +catering + +// catholic : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +catholic + +// cba : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA +cba + +// cbn : 2014-08-22 The Christian Broadcasting Network, Inc. +cbn + +// cbre : 2015-07-02 CBRE, Inc. +cbre + +// cbs : 2015-08-06 CBS Domains Inc. +cbs + +// ceb : 2015-04-09 The Corporate Executive Board Company +ceb + +// center : 2013-11-07 Tin Mill, LLC +center + +// ceo : 2013-11-07 CEOTLD Pty Ltd +ceo + +// cern : 2014-06-05 European Organization for Nuclear Research ("CERN") +cern + +// cfa : 2014-08-28 CFA Institute +cfa + +// cfd : 2014-12-11 IG Group Holdings PLC +cfd + +// chanel : 2015-04-09 Chanel International B.V. +chanel + +// channel : 2014-05-08 Charleston Road Registry Inc. +channel + +// chase : 2015-04-30 JPMorgan Chase & Co. +chase + +// chat : 2014-12-04 Sand Fields, LLC +chat + +// cheap : 2013-11-14 Sand Cover, LLC +cheap + +// chintai : 2015-06-11 CHINTAI Corporation +chintai + +// christmas : 2013-11-21 Uniregistry, Corp. +christmas + +// chrome : 2014-07-24 Charleston Road Registry Inc. +chrome + +// chrysler : 2015-07-30 FCA US LLC. +chrysler + +// church : 2014-02-06 Holly Fields, LLC +church + +// cipriani : 2015-02-19 Hotel Cipriani Srl +cipriani + +// circle : 2014-12-18 Amazon EU S.à r.l. +circle + +// cisco : 2014-12-22 Cisco Technology, Inc. +cisco + +// citadel : 2015-07-23 Citadel Domain LLC +citadel + +// citi : 2015-07-30 Citigroup Inc. +citi + +// citic : 2014-01-09 CITIC Group Corporation +citic + +// city : 2014-05-29 Snow Sky, LLC +city + +// cityeats : 2014-12-11 Lifestyle Domain Holdings, Inc. +cityeats + +// claims : 2014-03-20 Black Corner, LLC +claims + +// cleaning : 2013-12-05 Fox Shadow, LLC +cleaning + +// click : 2014-06-05 Uniregistry, Corp. +click + +// clinic : 2014-03-20 Goose Park, LLC +clinic + +// clinique : 2015-10-01 The Estée Lauder Companies Inc. +clinique + +// clothing : 2013-08-27 Steel Lake, LLC +clothing + +// cloud : 2015-04-16 ARUBA S.p.A. +cloud + +// club : 2013-11-08 .CLUB DOMAINS, LLC +club + +// clubmed : 2015-06-25 Club Méditerranée S.A. +clubmed + +// coach : 2014-10-09 Koko Island, LLC +coach + +// codes : 2013-10-31 Puff Willow, LLC +codes + +// coffee : 2013-10-17 Trixy Cover, LLC +coffee + +// college : 2014-01-16 XYZ.COM LLC +college + +// cologne : 2014-02-05 NetCologne Gesellschaft für Telekommunikation mbH +cologne + +// comcast : 2015-07-23 Comcast IP Holdings I, LLC +comcast + +// commbank : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA +commbank + +// community : 2013-12-05 Fox Orchard, LLC +community + +// company : 2013-11-07 Silver Avenue, LLC +company + +// compare : 2015-10-08 iSelect Ltd +compare + +// computer : 2013-10-24 Pine Mill, LLC +computer + +// comsec : 2015-01-08 VeriSign, Inc. +comsec + +// condos : 2013-12-05 Pine House, LLC +condos + +// construction : 2013-09-16 Fox Dynamite, LLC +construction + +// consulting : 2013-12-05 +consulting + +// contact : 2015-01-08 Top Level Spectrum, Inc. +contact + +// contractors : 2013-09-10 Magic Woods, LLC +contractors + +// cooking : 2013-11-21 Top Level Domain Holdings Limited +cooking + +// cookingchannel : 2015-07-02 Lifestyle Domain Holdings, Inc. +cookingchannel + +// cool : 2013-11-14 Koko Lake, LLC +cool + +// corsica : 2014-09-25 Collectivité Territoriale de Corse +corsica + +// country : 2013-12-19 Top Level Domain Holdings Limited +country + +// coupon : 2015-02-26 Amazon EU S.à r.l. +coupon + +// coupons : 2015-03-26 Black Island, LLC +coupons + +// courses : 2014-12-04 OPEN UNIVERSITIES AUSTRALIA PTY LTD +courses + +// credit : 2014-03-20 Snow Shadow, LLC +credit + +// creditcard : 2014-03-20 Binky Frostbite, LLC +creditcard + +// creditunion : 2015-01-22 CUNA Performance Resources, LLC +creditunion + +// cricket : 2014-10-09 dot Cricket Limited +cricket + +// crown : 2014-10-24 Crown Equipment Corporation +crown + +// crs : 2014-04-03 Federated Co-operatives Limited +crs + +// cruise : 2015-12-10 Viking River Cruises (Bermuda) Ltd. +cruise + +// cruises : 2013-12-05 Spring Way, LLC +cruises + +// csc : 2014-09-25 Alliance-One Services, Inc. +csc + +// cuisinella : 2014-04-03 SALM S.A.S. +cuisinella + +// cymru : 2014-05-08 Nominet UK +cymru + +// cyou : 2015-01-22 Beijing Gamease Age Digital Technology Co., Ltd. +cyou + +// dabur : 2014-02-06 Dabur India Limited +dabur + +// dad : 2014-01-23 Charleston Road Registry Inc. +dad + +// dance : 2013-10-24 United TLD Holdco Ltd. +dance + +// data : 2016-06-02 Dish DBS Corporation +data + +// date : 2014-11-20 dot Date Limited +date + +// dating : 2013-12-05 Pine Fest, LLC +dating + +// datsun : 2014-03-27 NISSAN MOTOR CO., LTD. +datsun + +// day : 2014-01-30 Charleston Road Registry Inc. +day + +// dclk : 2014-11-20 Charleston Road Registry Inc. +dclk + +// dds : 2015-05-07 Top Level Domain Holdings Limited +dds + +// deal : 2015-06-25 Amazon EU S.à r.l. +deal + +// dealer : 2014-12-22 Dealer Dot Com, Inc. +dealer + +// deals : 2014-05-22 Sand Sunset, LLC +deals + +// degree : 2014-03-06 +degree + +// delivery : 2014-09-11 Steel Station, LLC +delivery + +// dell : 2014-10-24 Dell Inc. +dell + +// deloitte : 2015-07-31 Deloitte Touche Tohmatsu +deloitte + +// delta : 2015-02-19 Delta Air Lines, Inc. +delta + +// democrat : 2013-10-24 United TLD Holdco Ltd. +democrat + +// dental : 2014-03-20 Tin Birch, LLC +dental + +// dentist : 2014-03-20 +dentist + +// desi : 2013-11-14 Desi Networks LLC +desi + +// design : 2014-11-07 Top Level Design, LLC +design + +// dev : 2014-10-16 Charleston Road Registry Inc. +dev + +// dhl : 2015-07-23 Deutsche Post AG +dhl + +// diamonds : 2013-09-22 John Edge, LLC +diamonds + +// diet : 2014-06-26 Uniregistry, Corp. +diet + +// digital : 2014-03-06 Dash Park, LLC +digital + +// direct : 2014-04-10 Half Trail, LLC +direct + +// directory : 2013-09-20 Extra Madison, LLC +directory + +// discount : 2014-03-06 Holly Hill, LLC +discount + +// discover : 2015-07-23 Discover Financial Services +discover + +// dish : 2015-07-30 Dish DBS Corporation +dish + +// diy : 2015-11-05 Lifestyle Domain Holdings, Inc. +diy + +// dnp : 2013-12-13 Dai Nippon Printing Co., Ltd. +dnp + +// docs : 2014-10-16 Charleston Road Registry Inc. +docs + +// doctor : 2016-06-02 Brice Trail, LLC +doctor + +// dodge : 2015-07-30 FCA US LLC. +dodge + +// dog : 2014-12-04 Koko Mill, LLC +dog + +// doha : 2014-09-18 Communications Regulatory Authority (CRA) +doha + +// domains : 2013-10-17 Sugar Cross, LLC +domains + +// dot : 2015-05-21 Dish DBS Corporation +dot + +// download : 2014-11-20 dot Support Limited +download + +// drive : 2015-03-05 Charleston Road Registry Inc. +drive + +// dtv : 2015-06-04 Dish DBS Corporation +dtv + +// dubai : 2015-01-01 Dubai Smart Government Department +dubai + +// duck : 2015-07-23 Johnson Shareholdings, Inc. +duck + +// dunlop : 2015-07-02 The Goodyear Tire & Rubber Company +dunlop + +// duns : 2015-08-06 The Dun & Bradstreet Corporation +duns + +// dupont : 2015-06-25 E. I. du Pont de Nemours and Company +dupont + +// durban : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry +durban + +// dvag : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG +dvag + +// dvr : 2016-05-26 Hughes Satellite Systems Corporation +dvr + +// earth : 2014-12-04 Interlink Co., Ltd. +earth + +// eat : 2014-01-23 Charleston Road Registry Inc. +eat + +// eco : 2016-07-08 Big Room Inc. +eco + +// edeka : 2014-12-18 EDEKA Verband kaufmännischer Genossenschaften e.V. +edeka + +// education : 2013-11-07 Brice Way, LLC +education + +// email : 2013-10-31 Spring Madison, LLC +email + +// emerck : 2014-04-03 Merck KGaA +emerck + +// energy : 2014-09-11 Binky Birch, LLC +energy + +// engineer : 2014-03-06 United TLD Holdco Ltd. +engineer + +// engineering : 2014-03-06 Romeo Canyon +engineering + +// enterprises : 2013-09-20 Snow Oaks, LLC +enterprises + +// epost : 2015-07-23 Deutsche Post AG +epost + +// epson : 2014-12-04 Seiko Epson Corporation +epson + +// equipment : 2013-08-27 Corn Station, LLC +equipment + +// ericsson : 2015-07-09 Telefonaktiebolaget L M Ericsson +ericsson + +// erni : 2014-04-03 ERNI Group Holding AG +erni + +// esq : 2014-05-08 Charleston Road Registry Inc. +esq + +// estate : 2013-08-27 Trixy Park, LLC +estate + +// esurance : 2015-07-23 Esurance Insurance Company +esurance + +// etisalat : 2015-09-03 Emirates Telecommunications Corporation (trading as Etisalat) +etisalat + +// eurovision : 2014-04-24 European Broadcasting Union (EBU) +eurovision + +// eus : 2013-12-12 Puntueus Fundazioa +eus + +// events : 2013-12-05 Pioneer Maple, LLC +events + +// everbank : 2014-05-15 EverBank +everbank + +// exchange : 2014-03-06 Spring Falls, LLC +exchange + +// expert : 2013-11-21 Magic Pass, LLC +expert + +// exposed : 2013-12-05 Victor Beach, LLC +exposed + +// express : 2015-02-11 Sea Sunset, LLC +express + +// extraspace : 2015-05-14 Extra Space Storage LLC +extraspace + +// fage : 2014-12-18 Fage International S.A. +fage + +// fail : 2014-03-06 Atomic Pipe, LLC +fail + +// fairwinds : 2014-11-13 FairWinds Partners, LLC +fairwinds + +// faith : 2014-11-20 dot Faith Limited +faith + +// family : 2015-04-02 +family + +// fan : 2014-03-06 +fan + +// fans : 2014-11-07 Asiamix Digital Limited +fans + +// farm : 2013-11-07 Just Maple, LLC +farm + +// farmers : 2015-07-09 Farmers Insurance Exchange +farmers + +// fashion : 2014-07-03 Top Level Domain Holdings Limited +fashion + +// fast : 2014-12-18 Amazon EU S.à r.l. +fast + +// fedex : 2015-08-06 Federal Express Corporation +fedex + +// feedback : 2013-12-19 Top Level Spectrum, Inc. +feedback + +// ferrari : 2015-07-31 Fiat Chrysler Automobiles N.V. +ferrari + +// ferrero : 2014-12-18 Ferrero Trading Lux S.A. +ferrero + +// fiat : 2015-07-31 Fiat Chrysler Automobiles N.V. +fiat + +// fidelity : 2015-07-30 Fidelity Brokerage Services LLC +fidelity + +// fido : 2015-08-06 Rogers Communications Partnership +fido + +// film : 2015-01-08 Motion Picture Domain Registry Pty Ltd +film + +// final : 2014-10-16 Núcleo de Informação e Coordenação do Ponto BR - NIC.br +final + +// finance : 2014-03-20 Cotton Cypress, LLC +finance + +// financial : 2014-03-06 Just Cover, LLC +financial + +// fire : 2015-06-25 Amazon EU S.à r.l. +fire + +// firestone : 2014-12-18 Bridgestone Corporation +firestone + +// firmdale : 2014-03-27 Firmdale Holdings Limited +firmdale + +// fish : 2013-12-12 Fox Woods, LLC +fish + +// fishing : 2013-11-21 Top Level Domain Holdings Limited +fishing + +// fit : 2014-11-07 Top Level Domain Holdings Limited +fit + +// fitness : 2014-03-06 Brice Orchard, LLC +fitness + +// flickr : 2015-04-02 Yahoo! Domain Services Inc. +flickr + +// flights : 2013-12-05 Fox Station, LLC +flights + +// flir : 2015-07-23 FLIR Systems, Inc. +flir + +// florist : 2013-11-07 Half Cypress, LLC +florist + +// flowers : 2014-10-09 Uniregistry, Corp. +flowers + +// fly : 2014-05-08 Charleston Road Registry Inc. +fly + +// foo : 2014-01-23 Charleston Road Registry Inc. +foo + +// food : 2016-04-21 Lifestyle Domain Holdings, Inc. +food + +// foodnetwork : 2015-07-02 Lifestyle Domain Holdings, Inc. +foodnetwork + +// football : 2014-12-18 Foggy Farms, LLC +football + +// ford : 2014-11-13 Ford Motor Company +ford + +// forex : 2014-12-11 IG Group Holdings PLC +forex + +// forsale : 2014-05-22 +forsale + +// forum : 2015-04-02 Fegistry, LLC +forum + +// foundation : 2013-12-05 John Dale, LLC +foundation + +// fox : 2015-09-11 FOX Registry, LLC +fox + +// free : 2015-12-10 Amazon EU S.à r.l. +free + +// fresenius : 2015-07-30 Fresenius Immobilien-Verwaltungs-GmbH +fresenius + +// frl : 2014-05-15 FRLregistry B.V. +frl + +// frogans : 2013-12-19 OP3FT +frogans + +// frontdoor : 2015-07-02 Lifestyle Domain Holdings, Inc. +frontdoor + +// frontier : 2015-02-05 Frontier Communications Corporation +frontier + +// ftr : 2015-07-16 Frontier Communications Corporation +ftr + +// fujitsu : 2015-07-30 Fujitsu Limited +fujitsu + +// fujixerox : 2015-07-23 Xerox DNHC LLC +fujixerox + +// fun : 2016-01-14 +fun + +// fund : 2014-03-20 John Castle, LLC +fund + +// furniture : 2014-03-20 Lone Fields, LLC +furniture + +// futbol : 2013-09-20 +futbol + +// fyi : 2015-04-02 Silver Tigers, LLC +fyi + +// gal : 2013-11-07 Asociación puntoGAL +gal + +// gallery : 2013-09-13 Sugar House, LLC +gallery + +// gallo : 2015-06-11 Gallo Vineyards, Inc. +gallo + +// gallup : 2015-02-19 Gallup, Inc. +gallup + +// game : 2015-05-28 Uniregistry, Corp. +game + +// games : 2015-05-28 +games + +// gap : 2015-07-31 The Gap, Inc. +gap + +// garden : 2014-06-26 Top Level Domain Holdings Limited +garden + +// gbiz : 2014-07-17 Charleston Road Registry Inc. +gbiz + +// gdn : 2014-07-31 Joint Stock Company "Navigation-information systems" +gdn + +// gea : 2014-12-04 GEA Group Aktiengesellschaft +gea + +// gent : 2014-01-23 COMBELL GROUP NV/SA +gent + +// genting : 2015-03-12 Resorts World Inc Pte. Ltd. +genting + +// george : 2015-07-31 Wal-Mart Stores, Inc. +george + +// ggee : 2014-01-09 GMO Internet, Inc. +ggee + +// gift : 2013-10-17 Uniregistry, Corp. +gift + +// gifts : 2014-07-03 Goose Sky, LLC +gifts + +// gives : 2014-03-06 United TLD Holdco Ltd. +gives + +// giving : 2014-11-13 Giving Limited +giving + +// glade : 2015-07-23 Johnson Shareholdings, Inc. +glade + +// glass : 2013-11-07 Black Cover, LLC +glass + +// gle : 2014-07-24 Charleston Road Registry Inc. +gle + +// global : 2014-04-17 Dot GLOBAL AS +global + +// globo : 2013-12-19 Globo Comunicação e Participações S.A +globo + +// gmail : 2014-05-01 Charleston Road Registry Inc. +gmail + +// gmbh : 2016-01-29 Extra Dynamite, LLC +gmbh + +// gmo : 2014-01-09 GMO Internet, Inc. +gmo + +// gmx : 2014-04-24 1&1 Mail & Media GmbH +gmx + +// godaddy : 2015-07-23 Go Daddy East, LLC +godaddy + +// gold : 2015-01-22 June Edge, LLC +gold + +// goldpoint : 2014-11-20 YODOBASHI CAMERA CO.,LTD. +goldpoint + +// golf : 2014-12-18 Lone falls, LLC +golf + +// goo : 2014-12-18 NTT Resonant Inc. +goo + +// goodhands : 2015-07-31 Allstate Fire and Casualty Insurance Company +goodhands + +// goodyear : 2015-07-02 The Goodyear Tire & Rubber Company +goodyear + +// goog : 2014-11-20 Charleston Road Registry Inc. +goog + +// google : 2014-07-24 Charleston Road Registry Inc. +google + +// gop : 2014-01-16 Republican State Leadership Committee, Inc. +gop + +// got : 2014-12-18 Amazon EU S.à r.l. +got + +// grainger : 2015-05-07 Grainger Registry Services, LLC +grainger + +// graphics : 2013-09-13 Over Madison, LLC +graphics + +// gratis : 2014-03-20 Pioneer Tigers, LLC +gratis + +// green : 2014-05-08 Afilias Limited +green + +// gripe : 2014-03-06 Corn Sunset, LLC +gripe + +// grocery : 2016-06-16 Wal-Mart Stores, Inc. +grocery + +// group : 2014-08-15 Romeo Town, LLC +group + +// guardian : 2015-07-30 The Guardian Life Insurance Company of America +guardian + +// gucci : 2014-11-13 Guccio Gucci S.p.a. +gucci + +// guge : 2014-08-28 Charleston Road Registry Inc. +guge + +// guide : 2013-09-13 Snow Moon, LLC +guide + +// guitars : 2013-11-14 Uniregistry, Corp. +guitars + +// guru : 2013-08-27 Pioneer Cypress, LLC +guru + +// hair : 2015-12-03 L'Oréal +hair + +// hamburg : 2014-02-20 Hamburg Top-Level-Domain GmbH +hamburg + +// hangout : 2014-11-13 Charleston Road Registry Inc. +hangout + +// haus : 2013-12-05 +haus + +// hbo : 2015-07-30 HBO Registry Services, Inc. +hbo + +// hdfc : 2015-07-30 HOUSING DEVELOPMENT FINANCE CORPORATION LIMITED +hdfc + +// hdfcbank : 2015-02-12 HDFC Bank Limited +hdfcbank + +// health : 2015-02-11 DotHealth, LLC +health + +// healthcare : 2014-06-12 Silver Glen, LLC +healthcare + +// help : 2014-06-26 Uniregistry, Corp. +help + +// helsinki : 2015-02-05 City of Helsinki +helsinki + +// here : 2014-02-06 Charleston Road Registry Inc. +here + +// hermes : 2014-07-10 HERMES INTERNATIONAL +hermes + +// hgtv : 2015-07-02 Lifestyle Domain Holdings, Inc. +hgtv + +// hiphop : 2014-03-06 Uniregistry, Corp. +hiphop + +// hisamitsu : 2015-07-16 Hisamitsu Pharmaceutical Co.,Inc. +hisamitsu + +// hitachi : 2014-10-31 Hitachi, Ltd. +hitachi + +// hiv : 2014-03-13 +hiv + +// hkt : 2015-05-14 PCCW-HKT DataCom Services Limited +hkt + +// hockey : 2015-03-19 Half Willow, LLC +hockey + +// holdings : 2013-08-27 John Madison, LLC +holdings + +// holiday : 2013-11-07 Goose Woods, LLC +holiday + +// homedepot : 2015-04-02 Homer TLC, Inc. +homedepot + +// homegoods : 2015-07-16 The TJX Companies, Inc. +homegoods + +// homes : 2014-01-09 DERHomes, LLC +homes + +// homesense : 2015-07-16 The TJX Companies, Inc. +homesense + +// honda : 2014-12-18 Honda Motor Co., Ltd. +honda + +// honeywell : 2015-07-23 Honeywell GTLD LLC +honeywell + +// horse : 2013-11-21 Top Level Domain Holdings Limited +horse + +// hospital : 2016-10-20 Ruby Pike, LLC +hospital + +// host : 2014-04-17 DotHost Inc. +host + +// hosting : 2014-05-29 Uniregistry, Corp. +hosting + +// hot : 2015-08-27 Amazon EU S.à r.l. +hot + +// hoteles : 2015-03-05 Travel Reservations SRL +hoteles + +// hotels : 2016-04-07 Booking.com B.V. +hotels + +// hotmail : 2014-12-18 Microsoft Corporation +hotmail + +// house : 2013-11-07 Sugar Park, LLC +house + +// how : 2014-01-23 Charleston Road Registry Inc. +how + +// hsbc : 2014-10-24 HSBC Holdings PLC +hsbc + +// hughes : 2015-07-30 Hughes Satellite Systems Corporation +hughes + +// hyatt : 2015-07-30 Hyatt GTLD, L.L.C. +hyatt + +// hyundai : 2015-07-09 Hyundai Motor Company +hyundai + +// ibm : 2014-07-31 International Business Machines Corporation +ibm + +// icbc : 2015-02-19 Industrial and Commercial Bank of China Limited +icbc + +// ice : 2014-10-30 IntercontinentalExchange, Inc. +ice + +// icu : 2015-01-08 One.com A/S +icu + +// ieee : 2015-07-23 IEEE Global LLC +ieee + +// ifm : 2014-01-30 ifm electronic gmbh +ifm + +// ikano : 2015-07-09 Ikano S.A. +ikano + +// imamat : 2015-08-06 Fondation Aga Khan (Aga Khan Foundation) +imamat + +// imdb : 2015-06-25 Amazon EU S.à r.l. +imdb + +// immo : 2014-07-10 Auburn Bloom, LLC +immo + +// immobilien : 2013-11-07 United TLD Holdco Ltd. +immobilien + +// industries : 2013-12-05 Outer House, LLC +industries + +// infiniti : 2014-03-27 NISSAN MOTOR CO., LTD. +infiniti + +// ing : 2014-01-23 Charleston Road Registry Inc. +ing + +// ink : 2013-12-05 Top Level Design, LLC +ink + +// institute : 2013-11-07 Outer Maple, LLC +institute + +// insurance : 2015-02-19 fTLD Registry Services LLC +insurance + +// insure : 2014-03-20 Pioneer Willow, LLC +insure + +// intel : 2015-08-06 Intel Corporation +intel + +// international : 2013-11-07 Wild Way, LLC +international + +// intuit : 2015-07-30 Intuit Administrative Services, Inc. +intuit + +// investments : 2014-03-20 Holly Glen, LLC +investments + +// ipiranga : 2014-08-28 Ipiranga Produtos de Petroleo S.A. +ipiranga + +// irish : 2014-08-07 Dot-Irish LLC +irish + +// iselect : 2015-02-11 iSelect Ltd +iselect + +// ismaili : 2015-08-06 Fondation Aga Khan (Aga Khan Foundation) +ismaili + +// ist : 2014-08-28 Istanbul Metropolitan Municipality +ist + +// istanbul : 2014-08-28 Istanbul Metropolitan Municipality +istanbul + +// itau : 2014-10-02 Itau Unibanco Holding S.A. +itau + +// itv : 2015-07-09 ITV Services Limited +itv + +// iveco : 2015-09-03 CNH Industrial N.V. +iveco + +// iwc : 2014-06-23 Richemont DNS Inc. +iwc + +// jaguar : 2014-11-13 Jaguar Land Rover Ltd +jaguar + +// java : 2014-06-19 Oracle Corporation +java + +// jcb : 2014-11-20 JCB Co., Ltd. +jcb + +// jcp : 2015-04-23 JCP Media, Inc. +jcp + +// jeep : 2015-07-30 FCA US LLC. +jeep + +// jetzt : 2014-01-09 +jetzt + +// jewelry : 2015-03-05 Wild Bloom, LLC +jewelry + +// jio : 2015-04-02 Affinity Names, Inc. +jio + +// jlc : 2014-12-04 Richemont DNS Inc. +jlc + +// jll : 2015-04-02 Jones Lang LaSalle Incorporated +jll + +// jmp : 2015-03-26 Matrix IP LLC +jmp + +// jnj : 2015-06-18 Johnson & Johnson Services, Inc. +jnj + +// joburg : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry +joburg + +// jot : 2014-12-18 Amazon EU S.à r.l. +jot + +// joy : 2014-12-18 Amazon EU S.à r.l. +joy + +// jpmorgan : 2015-04-30 JPMorgan Chase & Co. +jpmorgan + +// jprs : 2014-09-18 Japan Registry Services Co., Ltd. +jprs + +// juegos : 2014-03-20 Uniregistry, Corp. +juegos + +// juniper : 2015-07-30 JUNIPER NETWORKS, INC. +juniper + +// kaufen : 2013-11-07 United TLD Holdco Ltd. +kaufen + +// kddi : 2014-09-12 KDDI CORPORATION +kddi + +// kerryhotels : 2015-04-30 Kerry Trading Co. Limited +kerryhotels + +// kerrylogistics : 2015-04-09 Kerry Trading Co. Limited +kerrylogistics + +// kerryproperties : 2015-04-09 Kerry Trading Co. Limited +kerryproperties + +// kfh : 2014-12-04 Kuwait Finance House +kfh + +// kia : 2015-07-09 KIA MOTORS CORPORATION +kia + +// kim : 2013-09-23 Afilias Limited +kim + +// kinder : 2014-11-07 Ferrero Trading Lux S.A. +kinder + +// kindle : 2015-06-25 Amazon EU S.à r.l. +kindle + +// kitchen : 2013-09-20 Just Goodbye, LLC +kitchen + +// kiwi : 2013-09-20 DOT KIWI LIMITED +kiwi + +// koeln : 2014-01-09 NetCologne Gesellschaft für Telekommunikation mbH +koeln + +// komatsu : 2015-01-08 Komatsu Ltd. +komatsu + +// kosher : 2015-08-20 Kosher Marketing Assets LLC +kosher + +// kpmg : 2015-04-23 KPMG International Cooperative (KPMG International Genossenschaft) +kpmg + +// kpn : 2015-01-08 Koninklijke KPN N.V. +kpn + +// krd : 2013-12-05 KRG Department of Information Technology +krd + +// kred : 2013-12-19 KredTLD Pty Ltd +kred + +// kuokgroup : 2015-04-09 Kerry Trading Co. Limited +kuokgroup + +// kyoto : 2014-11-07 Academic Institution: Kyoto Jyoho Gakuen +kyoto + +// lacaixa : 2014-01-09 CAIXA D'ESTALVIS I PENSIONS DE BARCELONA +lacaixa + +// ladbrokes : 2015-08-06 LADBROKES INTERNATIONAL PLC +ladbrokes + +// lamborghini : 2015-06-04 Automobili Lamborghini S.p.A. +lamborghini + +// lamer : 2015-10-01 The Estée Lauder Companies Inc. +lamer + +// lancaster : 2015-02-12 LANCASTER +lancaster + +// lancia : 2015-07-31 Fiat Chrysler Automobiles N.V. +lancia + +// lancome : 2015-07-23 L'Oréal +lancome + +// land : 2013-09-10 Pine Moon, LLC +land + +// landrover : 2014-11-13 Jaguar Land Rover Ltd +landrover + +// lanxess : 2015-07-30 LANXESS Corporation +lanxess + +// lasalle : 2015-04-02 Jones Lang LaSalle Incorporated +lasalle + +// lat : 2014-10-16 ECOM-LAC Federaciòn de Latinoamèrica y el Caribe para Internet y el Comercio Electrònico +lat + +// latino : 2015-07-30 Dish DBS Corporation +latino + +// latrobe : 2014-06-16 La Trobe University +latrobe + +// law : 2015-01-22 Minds + Machines Group Limited +law + +// lawyer : 2014-03-20 +lawyer + +// lds : 2014-03-20 IRI Domain Management, LLC ("Applicant") +lds + +// lease : 2014-03-06 Victor Trail, LLC +lease + +// leclerc : 2014-08-07 A.C.D. LEC Association des Centres Distributeurs Edouard Leclerc +leclerc + +// lefrak : 2015-07-16 LeFrak Organization, Inc. +lefrak + +// legal : 2014-10-16 Blue Falls, LLC +legal + +// lego : 2015-07-16 LEGO Juris A/S +lego + +// lexus : 2015-04-23 TOYOTA MOTOR CORPORATION +lexus + +// lgbt : 2014-05-08 Afilias Limited +lgbt + +// liaison : 2014-10-02 Liaison Technologies, Incorporated +liaison + +// lidl : 2014-09-18 Schwarz Domains und Services GmbH & Co. KG +lidl + +// life : 2014-02-06 Trixy Oaks, LLC +life + +// lifeinsurance : 2015-01-15 American Council of Life Insurers +lifeinsurance + +// lifestyle : 2014-12-11 Lifestyle Domain Holdings, Inc. +lifestyle + +// lighting : 2013-08-27 John McCook, LLC +lighting + +// like : 2014-12-18 Amazon EU S.à r.l. +like + +// lilly : 2015-07-31 Eli Lilly and Company +lilly + +// limited : 2014-03-06 Big Fest, LLC +limited + +// limo : 2013-10-17 Hidden Frostbite, LLC +limo + +// lincoln : 2014-11-13 Ford Motor Company +lincoln + +// linde : 2014-12-04 Linde Aktiengesellschaft +linde + +// link : 2013-11-14 Uniregistry, Corp. +link + +// lipsy : 2015-06-25 Lipsy Ltd +lipsy + +// live : 2014-12-04 +live + +// living : 2015-07-30 Lifestyle Domain Holdings, Inc. +living + +// lixil : 2015-03-19 LIXIL Group Corporation +lixil + +// loan : 2014-11-20 dot Loan Limited +loan + +// loans : 2014-03-20 June Woods, LLC +loans + +// locker : 2015-06-04 Dish DBS Corporation +locker + +// locus : 2015-06-25 Locus Analytics LLC +locus + +// loft : 2015-07-30 Annco, Inc. +loft + +// lol : 2015-01-30 Uniregistry, Corp. +lol + +// london : 2013-11-14 Dot London Domains Limited +london + +// lotte : 2014-11-07 Lotte Holdings Co., Ltd. +lotte + +// lotto : 2014-04-10 Afilias Limited +lotto + +// love : 2014-12-22 Merchant Law Group LLP +love + +// lpl : 2015-07-30 LPL Holdings, Inc. +lpl + +// lplfinancial : 2015-07-30 LPL Holdings, Inc. +lplfinancial + +// ltd : 2014-09-25 Over Corner, LLC +ltd + +// ltda : 2014-04-17 DOMAIN ROBOT SERVICOS DE HOSPEDAGEM NA INTERNET LTDA +ltda + +// lundbeck : 2015-08-06 H. Lundbeck A/S +lundbeck + +// lupin : 2014-11-07 LUPIN LIMITED +lupin + +// luxe : 2014-01-09 Top Level Domain Holdings Limited +luxe + +// luxury : 2013-10-17 Luxury Partners, LLC +luxury + +// macys : 2015-07-31 Macys, Inc. +macys + +// madrid : 2014-05-01 Comunidad de Madrid +madrid + +// maif : 2014-10-02 Mutuelle Assurance Instituteur France (MAIF) +maif + +// maison : 2013-12-05 Victor Frostbite, LLC +maison + +// makeup : 2015-01-15 L'Oréal +makeup + +// man : 2014-12-04 MAN SE +man + +// management : 2013-11-07 John Goodbye, LLC +management + +// mango : 2013-10-24 PUNTO FA S.L. +mango + +// map : 2016-06-09 Charleston Road Registry Inc. +map + +// market : 2014-03-06 +market + +// marketing : 2013-11-07 Fern Pass, LLC +marketing + +// markets : 2014-12-11 IG Group Holdings PLC +markets + +// marriott : 2014-10-09 Marriott Worldwide Corporation +marriott + +// marshalls : 2015-07-16 The TJX Companies, Inc. +marshalls + +// maserati : 2015-07-31 Fiat Chrysler Automobiles N.V. +maserati + +// mattel : 2015-08-06 Mattel Sites, Inc. +mattel + +// mba : 2015-04-02 Lone Hollow, LLC +mba + +// mckinsey : 2015-07-31 McKinsey Holdings, Inc. +mckinsey + +// med : 2015-08-06 Medistry LLC +med + +// media : 2014-03-06 Grand Glen, LLC +media + +// meet : 2014-01-16 +meet + +// melbourne : 2014-05-29 The Crown in right of the State of Victoria, represented by its Department of State Development, Business and Innovation +melbourne + +// meme : 2014-01-30 Charleston Road Registry Inc. +meme + +// memorial : 2014-10-16 Dog Beach, LLC +memorial + +// men : 2015-02-26 Exclusive Registry Limited +men + +// menu : 2013-09-11 Wedding TLD2, LLC +menu + +// meo : 2014-11-07 PT Comunicacoes S.A. +meo + +// merckmsd : 2016-07-14 MSD Registry Holdings, Inc. +merckmsd + +// metlife : 2015-05-07 MetLife Services and Solutions, LLC +metlife + +// miami : 2013-12-19 Top Level Domain Holdings Limited +miami + +// microsoft : 2014-12-18 Microsoft Corporation +microsoft + +// mini : 2014-01-09 Bayerische Motoren Werke Aktiengesellschaft +mini + +// mint : 2015-07-30 Intuit Administrative Services, Inc. +mint + +// mit : 2015-07-02 Massachusetts Institute of Technology +mit + +// mitsubishi : 2015-07-23 Mitsubishi Corporation +mitsubishi + +// mlb : 2015-05-21 MLB Advanced Media DH, LLC +mlb + +// mls : 2015-04-23 The Canadian Real Estate Association +mls + +// mma : 2014-11-07 MMA IARD +mma + +// mobile : 2016-06-02 Dish DBS Corporation +mobile + +// mobily : 2014-12-18 GreenTech Consultancy Company W.L.L. +mobily + +// moda : 2013-11-07 United TLD Holdco Ltd. +moda + +// moe : 2013-11-13 Interlink Co., Ltd. +moe + +// moi : 2014-12-18 Amazon EU S.à r.l. +moi + +// mom : 2015-04-16 Uniregistry, Corp. +mom + +// monash : 2013-09-30 Monash University +monash + +// money : 2014-10-16 Outer McCook, LLC +money + +// monster : 2015-09-11 Monster Worldwide, Inc. +monster + +// mopar : 2015-07-30 FCA US LLC. +mopar + +// mormon : 2013-12-05 IRI Domain Management, LLC ("Applicant") +mormon + +// mortgage : 2014-03-20 +mortgage + +// moscow : 2013-12-19 Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID) +moscow + +// moto : 2015-06-04 +moto + +// motorcycles : 2014-01-09 DERMotorcycles, LLC +motorcycles + +// mov : 2014-01-30 Charleston Road Registry Inc. +mov + +// movie : 2015-02-05 New Frostbite, LLC +movie + +// movistar : 2014-10-16 Telefónica S.A. +movistar + +// msd : 2015-07-23 MSD Registry Holdings, Inc. +msd + +// mtn : 2014-12-04 MTN Dubai Limited +mtn + +// mtpc : 2014-11-20 Mitsubishi Tanabe Pharma Corporation +mtpc + +// mtr : 2015-03-12 MTR Corporation Limited +mtr + +// mutual : 2015-04-02 Northwestern Mutual MU TLD Registry, LLC +mutual + +// nab : 2015-08-20 National Australia Bank Limited +nab + +// nadex : 2014-12-11 IG Group Holdings PLC +nadex + +// nagoya : 2013-10-24 GMO Registry, Inc. +nagoya + +// nationwide : 2015-07-23 Nationwide Mutual Insurance Company +nationwide + +// natura : 2015-03-12 NATURA COSMÉTICOS S.A. +natura + +// navy : 2014-03-06 United TLD Holdco Ltd. +navy + +// nba : 2015-07-31 NBA REGISTRY, LLC +nba + +// nec : 2015-01-08 NEC Corporation +nec + +// netbank : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA +netbank + +// netflix : 2015-06-18 Netflix, Inc. +netflix + +// network : 2013-11-14 Trixy Manor, LLC +network + +// neustar : 2013-12-05 NeuStar, Inc. +neustar + +// new : 2014-01-30 Charleston Road Registry Inc. +new + +// newholland : 2015-09-03 CNH Industrial N.V. +newholland + +// news : 2014-12-18 +news + +// next : 2015-06-18 Next plc +next + +// nextdirect : 2015-06-18 Next plc +nextdirect + +// nexus : 2014-07-24 Charleston Road Registry Inc. +nexus + +// nfl : 2015-07-23 NFL Reg Ops LLC +nfl + +// ngo : 2014-03-06 Public Interest Registry +ngo + +// nhk : 2014-02-13 Japan Broadcasting Corporation (NHK) +nhk + +// nico : 2014-12-04 DWANGO Co., Ltd. +nico + +// nike : 2015-07-23 NIKE, Inc. +nike + +// nikon : 2015-05-21 NIKON CORPORATION +nikon + +// ninja : 2013-11-07 United TLD Holdco Ltd. +ninja + +// nissan : 2014-03-27 NISSAN MOTOR CO., LTD. +nissan + +// nissay : 2015-10-29 Nippon Life Insurance Company +nissay + +// nokia : 2015-01-08 Nokia Corporation +nokia + +// northwesternmutual : 2015-06-18 Northwestern Mutual Registry, LLC +northwesternmutual + +// norton : 2014-12-04 Symantec Corporation +norton + +// now : 2015-06-25 Amazon EU S.à r.l. +now + +// nowruz : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. +nowruz + +// nowtv : 2015-05-14 Starbucks (HK) Limited +nowtv + +// nra : 2014-05-22 NRA Holdings Company, INC. +nra + +// nrw : 2013-11-21 Minds + Machines GmbH +nrw + +// ntt : 2014-10-31 NIPPON TELEGRAPH AND TELEPHONE CORPORATION +ntt + +// nyc : 2014-01-23 The City of New York by and through the New York City Department of Information Technology & Telecommunications +nyc + +// obi : 2014-09-25 OBI Group Holding SE & Co. KGaA +obi + +// observer : 2015-04-30 +observer + +// off : 2015-07-23 Johnson Shareholdings, Inc. +off + +// office : 2015-03-12 Microsoft Corporation +office + +// okinawa : 2013-12-05 BusinessRalliart Inc. +okinawa + +// olayan : 2015-05-14 Crescent Holding GmbH +olayan + +// olayangroup : 2015-05-14 Crescent Holding GmbH +olayangroup + +// oldnavy : 2015-07-31 The Gap, Inc. +oldnavy + +// ollo : 2015-06-04 Dish DBS Corporation +ollo + +// omega : 2015-01-08 The Swatch Group Ltd +omega + +// one : 2014-11-07 One.com A/S +one + +// ong : 2014-03-06 Public Interest Registry +ong + +// onl : 2013-09-16 I-Registry Ltd. +onl + +// online : 2015-01-15 DotOnline Inc. +online + +// onyourside : 2015-07-23 Nationwide Mutual Insurance Company +onyourside + +// ooo : 2014-01-09 INFIBEAM INCORPORATION LIMITED +ooo + +// open : 2015-07-31 American Express Travel Related Services Company, Inc. +open + +// oracle : 2014-06-19 Oracle Corporation +oracle + +// orange : 2015-03-12 Orange Brand Services Limited +orange + +// organic : 2014-03-27 Afilias Limited +organic + +// origins : 2015-10-01 The Estée Lauder Companies Inc. +origins + +// osaka : 2014-09-04 Interlink Co., Ltd. +osaka + +// otsuka : 2013-10-11 Otsuka Holdings Co., Ltd. +otsuka + +// ott : 2015-06-04 Dish DBS Corporation +ott + +// ovh : 2014-01-16 OVH SAS +ovh + +// page : 2014-12-04 Charleston Road Registry Inc. +page + +// panasonic : 2015-07-30 Panasonic Corporation +panasonic + +// panerai : 2014-11-07 Richemont DNS Inc. +panerai + +// paris : 2014-01-30 City of Paris +paris + +// pars : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. +pars + +// partners : 2013-12-05 Magic Glen, LLC +partners + +// parts : 2013-12-05 Sea Goodbye, LLC +parts + +// party : 2014-09-11 Blue Sky Registry Limited +party + +// passagens : 2015-03-05 Travel Reservations SRL +passagens + +// pay : 2015-08-27 Amazon EU S.à r.l. +pay + +// pccw : 2015-05-14 PCCW Enterprises Limited +pccw + +// pet : 2015-05-07 Afilias plc +pet + +// pfizer : 2015-09-11 Pfizer Inc. +pfizer + +// pharmacy : 2014-06-19 National Association of Boards of Pharmacy +pharmacy + +// phd : 2016-07-28 Charleston Road Registry Inc. +phd + +// philips : 2014-11-07 Koninklijke Philips N.V. +philips + +// phone : 2016-06-02 Dish DBS Corporation +phone + +// photo : 2013-11-14 Uniregistry, Corp. +photo + +// photography : 2013-09-20 Sugar Glen, LLC +photography + +// photos : 2013-10-17 Sea Corner, LLC +photos + +// physio : 2014-05-01 PhysBiz Pty Ltd +physio + +// piaget : 2014-10-16 Richemont DNS Inc. +piaget + +// pics : 2013-11-14 Uniregistry, Corp. +pics + +// pictet : 2014-06-26 Pictet Europe S.A. +pictet + +// pictures : 2014-03-06 Foggy Sky, LLC +pictures + +// pid : 2015-01-08 Top Level Spectrum, Inc. +pid + +// pin : 2014-12-18 Amazon EU S.à r.l. +pin + +// ping : 2015-06-11 Ping Registry Provider, Inc. +ping + +// pink : 2013-10-01 Afilias Limited +pink + +// pioneer : 2015-07-16 Pioneer Corporation +pioneer + +// pizza : 2014-06-26 Foggy Moon, LLC +pizza + +// place : 2014-04-24 Snow Galley, LLC +place + +// play : 2015-03-05 Charleston Road Registry Inc. +play + +// playstation : 2015-07-02 Sony Computer Entertainment Inc. +playstation + +// plumbing : 2013-09-10 Spring Tigers, LLC +plumbing + +// plus : 2015-02-05 Sugar Mill, LLC +plus + +// pnc : 2015-07-02 PNC Domain Co., LLC +pnc + +// pohl : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG +pohl + +// poker : 2014-07-03 Afilias Domains No. 5 Limited +poker + +// politie : 2015-08-20 Politie Nederland +politie + +// porn : 2014-10-16 ICM Registry PN LLC +porn + +// pramerica : 2015-07-30 Prudential Financial, Inc. +pramerica + +// praxi : 2013-12-05 Praxi S.p.A. +praxi + +// press : 2014-04-03 DotPress Inc. +press + +// prime : 2015-06-25 Amazon EU S.à r.l. +prime + +// prod : 2014-01-23 Charleston Road Registry Inc. +prod + +// productions : 2013-12-05 Magic Birch, LLC +productions + +// prof : 2014-07-24 Charleston Road Registry Inc. +prof + +// progressive : 2015-07-23 Progressive Casualty Insurance Company +progressive + +// promo : 2014-12-18 +promo + +// properties : 2013-12-05 Big Pass, LLC +properties + +// property : 2014-05-22 Uniregistry, Corp. +property + +// protection : 2015-04-23 +protection + +// pru : 2015-07-30 Prudential Financial, Inc. +pru + +// prudential : 2015-07-30 Prudential Financial, Inc. +prudential + +// pub : 2013-12-12 United TLD Holdco Ltd. +pub + +// pwc : 2015-10-29 PricewaterhouseCoopers LLP +pwc + +// qpon : 2013-11-14 dotCOOL, Inc. +qpon + +// quebec : 2013-12-19 PointQuébec Inc +quebec + +// quest : 2015-03-26 Quest ION Limited +quest + +// qvc : 2015-07-30 QVC, Inc. +qvc + +// racing : 2014-12-04 Premier Registry Limited +racing + +// radio : 2016-07-21 European Broadcasting Union (EBU) +radio + +// raid : 2015-07-23 Johnson Shareholdings, Inc. +raid + +// read : 2014-12-18 Amazon EU S.à r.l. +read + +// realestate : 2015-09-11 dotRealEstate LLC +realestate + +// realtor : 2014-05-29 Real Estate Domains LLC +realtor + +// realty : 2015-03-19 Fegistry, LLC +realty + +// recipes : 2013-10-17 Grand Island, LLC +recipes + +// red : 2013-11-07 Afilias Limited +red + +// redstone : 2014-10-31 Redstone Haute Couture Co., Ltd. +redstone + +// redumbrella : 2015-03-26 Travelers TLD, LLC +redumbrella + +// rehab : 2014-03-06 United TLD Holdco Ltd. +rehab + +// reise : 2014-03-13 +reise + +// reisen : 2014-03-06 New Cypress, LLC +reisen + +// reit : 2014-09-04 National Association of Real Estate Investment Trusts, Inc. +reit + +// reliance : 2015-04-02 Reliance Industries Limited +reliance + +// ren : 2013-12-12 Beijing Qianxiang Wangjing Technology Development Co., Ltd. +ren + +// rent : 2014-12-04 DERRent, LLC +rent + +// rentals : 2013-12-05 Big Hollow,LLC +rentals + +// repair : 2013-11-07 Lone Sunset, LLC +repair + +// report : 2013-12-05 Binky Glen, LLC +report + +// republican : 2014-03-20 United TLD Holdco Ltd. +republican + +// rest : 2013-12-19 Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable +rest + +// restaurant : 2014-07-03 Snow Avenue, LLC +restaurant + +// review : 2014-11-20 dot Review Limited +review + +// reviews : 2013-09-13 +reviews + +// rexroth : 2015-06-18 Robert Bosch GMBH +rexroth + +// rich : 2013-11-21 I-Registry Ltd. +rich + +// richardli : 2015-05-14 Pacific Century Asset Management (HK) Limited +richardli + +// ricoh : 2014-11-20 Ricoh Company, Ltd. +ricoh + +// rightathome : 2015-07-23 Johnson Shareholdings, Inc. +rightathome + +// ril : 2015-04-02 Reliance Industries Limited +ril + +// rio : 2014-02-27 Empresa Municipal de Informática SA - IPLANRIO +rio + +// rip : 2014-07-10 United TLD Holdco Ltd. +rip + +// rmit : 2015-11-19 Royal Melbourne Institute of Technology +rmit + +// rocher : 2014-12-18 Ferrero Trading Lux S.A. +rocher + +// rocks : 2013-11-14 +rocks + +// rodeo : 2013-12-19 Top Level Domain Holdings Limited +rodeo + +// rogers : 2015-08-06 Rogers Communications Partnership +rogers + +// room : 2014-12-18 Amazon EU S.à r.l. +room + +// rsvp : 2014-05-08 Charleston Road Registry Inc. +rsvp + +// rugby : 2016-12-15 World Rugby Strategic Developments Limited +rugby + +// ruhr : 2013-10-02 regiodot GmbH & Co. KG +ruhr + +// run : 2015-03-19 Snow Park, LLC +run + +// rwe : 2015-04-02 RWE AG +rwe + +// ryukyu : 2014-01-09 BusinessRalliart Inc. +ryukyu + +// saarland : 2013-12-12 dotSaarland GmbH +saarland + +// safe : 2014-12-18 Amazon EU S.à r.l. +safe + +// safety : 2015-01-08 Safety Registry Services, LLC. +safety + +// sakura : 2014-12-18 SAKURA Internet Inc. +sakura + +// sale : 2014-10-16 +sale + +// salon : 2014-12-11 Outer Orchard, LLC +salon + +// samsclub : 2015-07-31 Wal-Mart Stores, Inc. +samsclub + +// samsung : 2014-04-03 SAMSUNG SDS CO., LTD +samsung + +// sandvik : 2014-11-13 Sandvik AB +sandvik + +// sandvikcoromant : 2014-11-07 Sandvik AB +sandvikcoromant + +// sanofi : 2014-10-09 Sanofi +sanofi + +// sap : 2014-03-27 SAP AG +sap + +// sapo : 2014-11-07 PT Comunicacoes S.A. +sapo + +// sarl : 2014-07-03 Delta Orchard, LLC +sarl + +// sas : 2015-04-02 Research IP LLC +sas + +// save : 2015-06-25 Amazon EU S.à r.l. +save + +// saxo : 2014-10-31 Saxo Bank A/S +saxo + +// sbi : 2015-03-12 STATE BANK OF INDIA +sbi + +// sbs : 2014-11-07 SPECIAL BROADCASTING SERVICE CORPORATION +sbs + +// sca : 2014-03-13 SVENSKA CELLULOSA AKTIEBOLAGET SCA (publ) +sca + +// scb : 2014-02-20 The Siam Commercial Bank Public Company Limited ("SCB") +scb + +// schaeffler : 2015-08-06 Schaeffler Technologies AG & Co. KG +schaeffler + +// schmidt : 2014-04-03 SALM S.A.S. +schmidt + +// scholarships : 2014-04-24 Scholarships.com, LLC +scholarships + +// school : 2014-12-18 Little Galley, LLC +school + +// schule : 2014-03-06 Outer Moon, LLC +schule + +// schwarz : 2014-09-18 Schwarz Domains und Services GmbH & Co. KG +schwarz + +// science : 2014-09-11 dot Science Limited +science + +// scjohnson : 2015-07-23 Johnson Shareholdings, Inc. +scjohnson + +// scor : 2014-10-31 SCOR SE +scor + +// scot : 2014-01-23 Dot Scot Registry Limited +scot + +// search : 2016-06-09 Charleston Road Registry Inc. +search + +// seat : 2014-05-22 SEAT, S.A. (Sociedad Unipersonal) +seat + +// secure : 2015-08-27 Amazon EU S.à r.l. +secure + +// security : 2015-05-14 +security + +// seek : 2014-12-04 Seek Limited +seek + +// select : 2015-10-08 iSelect Ltd +select + +// sener : 2014-10-24 Sener Ingeniería y Sistemas, S.A. +sener + +// services : 2014-02-27 Fox Castle, LLC +services + +// ses : 2015-07-23 SES +ses + +// seven : 2015-08-06 Seven West Media Ltd +seven + +// sew : 2014-07-17 SEW-EURODRIVE GmbH & Co KG +sew + +// sex : 2014-11-13 ICM Registry SX LLC +sex + +// sexy : 2013-09-11 Uniregistry, Corp. +sexy + +// sfr : 2015-08-13 Societe Francaise du Radiotelephone - SFR +sfr + +// shangrila : 2015-09-03 Shangri‐La International Hotel Management Limited +shangrila + +// sharp : 2014-05-01 Sharp Corporation +sharp + +// shaw : 2015-04-23 Shaw Cablesystems G.P. +shaw + +// shell : 2015-07-30 Shell Information Technology International Inc +shell + +// shia : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. +shia + +// shiksha : 2013-11-14 Afilias Limited +shiksha + +// shoes : 2013-10-02 Binky Galley, LLC +shoes + +// shop : 2016-04-08 GMO Registry, Inc. +shop + +// shopping : 2016-03-31 +shopping + +// shouji : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD. +shouji + +// show : 2015-03-05 Snow Beach, LLC +show + +// showtime : 2015-08-06 CBS Domains Inc. +showtime + +// shriram : 2014-01-23 Shriram Capital Ltd. +shriram + +// silk : 2015-06-25 Amazon EU S.à r.l. +silk + +// sina : 2015-03-12 Sina Corporation +sina + +// singles : 2013-08-27 Fern Madison, LLC +singles + +// site : 2015-01-15 DotSite Inc. +site + +// ski : 2015-04-09 STARTING DOT LIMITED +ski + +// skin : 2015-01-15 L'Oréal +skin + +// sky : 2014-06-19 Sky IP International Ltd, a company incorporated in England and Wales, operating via its registered Swiss branch +sky + +// skype : 2014-12-18 Microsoft Corporation +skype + +// sling : 2015-07-30 Hughes Satellite Systems Corporation +sling + +// smart : 2015-07-09 Smart Communications, Inc. (SMART) +smart + +// smile : 2014-12-18 Amazon EU S.à r.l. +smile + +// sncf : 2015-02-19 Société Nationale des Chemins de fer Francais S N C F +sncf + +// soccer : 2015-03-26 Foggy Shadow, LLC +soccer + +// social : 2013-11-07 United TLD Holdco Ltd. +social + +// softbank : 2015-07-02 SoftBank Corp. +softbank + +// software : 2014-03-20 +software + +// sohu : 2013-12-19 Sohu.com Limited +sohu + +// solar : 2013-11-07 Ruby Town, LLC +solar + +// solutions : 2013-11-07 Silver Cover, LLC +solutions + +// song : 2015-02-26 Amazon EU S.à r.l. +song + +// sony : 2015-01-08 Sony Corporation +sony + +// soy : 2014-01-23 Charleston Road Registry Inc. +soy + +// space : 2014-04-03 DotSpace Inc. +space + +// spiegel : 2014-02-05 SPIEGEL-Verlag Rudolf Augstein GmbH & Co. KG +spiegel + +// spot : 2015-02-26 Amazon EU S.à r.l. +spot + +// spreadbetting : 2014-12-11 IG Group Holdings PLC +spreadbetting + +// srl : 2015-05-07 mySRL GmbH +srl + +// srt : 2015-07-30 FCA US LLC. +srt + +// stada : 2014-11-13 STADA Arzneimittel AG +stada + +// staples : 2015-07-30 Staples, Inc. +staples + +// star : 2015-01-08 Star India Private Limited +star + +// starhub : 2015-02-05 StarHub Ltd +starhub + +// statebank : 2015-03-12 STATE BANK OF INDIA +statebank + +// statefarm : 2015-07-30 State Farm Mutual Automobile Insurance Company +statefarm + +// statoil : 2014-12-04 Statoil ASA +statoil + +// stc : 2014-10-09 Saudi Telecom Company +stc + +// stcgroup : 2014-10-09 Saudi Telecom Company +stcgroup + +// stockholm : 2014-12-18 Stockholms kommun +stockholm + +// storage : 2014-12-22 Self Storage Company LLC +storage + +// store : 2015-04-09 DotStore Inc. +store + +// stream : 2016-01-08 dot Stream Limited +stream + +// studio : 2015-02-11 +studio + +// study : 2014-12-11 OPEN UNIVERSITIES AUSTRALIA PTY LTD +study + +// style : 2014-12-04 Binky Moon, LLC +style + +// sucks : 2014-12-22 Vox Populi Registry Inc. +sucks + +// supplies : 2013-12-19 Atomic Fields, LLC +supplies + +// supply : 2013-12-19 Half Falls, LLC +supply + +// support : 2013-10-24 Grand Orchard, LLC +support + +// surf : 2014-01-09 Top Level Domain Holdings Limited +surf + +// surgery : 2014-03-20 Tin Avenue, LLC +surgery + +// suzuki : 2014-02-20 SUZUKI MOTOR CORPORATION +suzuki + +// swatch : 2015-01-08 The Swatch Group Ltd +swatch + +// swiftcover : 2015-07-23 Swiftcover Insurance Services Limited +swiftcover + +// swiss : 2014-10-16 Swiss Confederation +swiss + +// sydney : 2014-09-18 State of New South Wales, Department of Premier and Cabinet +sydney + +// symantec : 2014-12-04 Symantec Corporation +symantec + +// systems : 2013-11-07 Dash Cypress, LLC +systems + +// tab : 2014-12-04 Tabcorp Holdings Limited +tab + +// taipei : 2014-07-10 Taipei City Government +taipei + +// talk : 2015-04-09 Amazon EU S.à r.l. +talk + +// taobao : 2015-01-15 Alibaba Group Holding Limited +taobao + +// target : 2015-07-31 Target Domain Holdings, LLC +target + +// tatamotors : 2015-03-12 Tata Motors Ltd +tatamotors + +// tatar : 2014-04-24 Limited Liability Company "Coordination Center of Regional Domain of Tatarstan Republic" +tatar + +// tattoo : 2013-08-30 Uniregistry, Corp. +tattoo + +// tax : 2014-03-20 Storm Orchard, LLC +tax + +// taxi : 2015-03-19 Pine Falls, LLC +taxi + +// tci : 2014-09-12 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. +tci + +// tdk : 2015-06-11 TDK Corporation +tdk + +// team : 2015-03-05 Atomic Lake, LLC +team + +// tech : 2015-01-30 Dot Tech LLC +tech + +// technology : 2013-09-13 Auburn Falls +technology + +// telecity : 2015-02-19 TelecityGroup International Limited +telecity + +// telefonica : 2014-10-16 Telefónica S.A. +telefonica + +// temasek : 2014-08-07 Temasek Holdings (Private) Limited +temasek + +// tennis : 2014-12-04 Cotton Bloom, LLC +tennis + +// teva : 2015-07-02 Teva Pharmaceutical Industries Limited +teva + +// thd : 2015-04-02 Homer TLC, Inc. +thd + +// theater : 2015-03-19 Blue Tigers, LLC +theater + +// theatre : 2015-05-07 +theatre + +// tiaa : 2015-07-23 Teachers Insurance and Annuity Association of America +tiaa + +// tickets : 2015-02-05 Accent Media Limited +tickets + +// tienda : 2013-11-14 Victor Manor, LLC +tienda + +// tiffany : 2015-01-30 Tiffany and Company +tiffany + +// tips : 2013-09-20 Corn Willow, LLC +tips + +// tires : 2014-11-07 Dog Edge, LLC +tires + +// tirol : 2014-04-24 punkt Tirol GmbH +tirol + +// tjmaxx : 2015-07-16 The TJX Companies, Inc. +tjmaxx + +// tjx : 2015-07-16 The TJX Companies, Inc. +tjx + +// tkmaxx : 2015-07-16 The TJX Companies, Inc. +tkmaxx + +// tmall : 2015-01-15 Alibaba Group Holding Limited +tmall + +// today : 2013-09-20 Pearl Woods, LLC +today + +// tokyo : 2013-11-13 GMO Registry, Inc. +tokyo + +// tools : 2013-11-21 Pioneer North, LLC +tools + +// top : 2014-03-20 Jiangsu Bangning Science & Technology Co.,Ltd. +top + +// toray : 2014-12-18 Toray Industries, Inc. +toray + +// toshiba : 2014-04-10 TOSHIBA Corporation +toshiba + +// total : 2015-08-06 Total SA +total + +// tours : 2015-01-22 Sugar Station, LLC +tours + +// town : 2014-03-06 Koko Moon, LLC +town + +// toyota : 2015-04-23 TOYOTA MOTOR CORPORATION +toyota + +// toys : 2014-03-06 Pioneer Orchard, LLC +toys + +// trade : 2014-01-23 Elite Registry Limited +trade + +// trading : 2014-12-11 IG Group Holdings PLC +trading + +// training : 2013-11-07 Wild Willow, LLC +training + +// travelchannel : 2015-07-02 Lifestyle Domain Holdings, Inc. +travelchannel + +// travelers : 2015-03-26 Travelers TLD, LLC +travelers + +// travelersinsurance : 2015-03-26 Travelers TLD, LLC +travelersinsurance + +// trust : 2014-10-16 +trust + +// trv : 2015-03-26 Travelers TLD, LLC +trv + +// tube : 2015-06-11 Latin American Telecom LLC +tube + +// tui : 2014-07-03 TUI AG +tui + +// tunes : 2015-02-26 Amazon EU S.à r.l. +tunes + +// tushu : 2014-12-18 Amazon EU S.à r.l. +tushu + +// tvs : 2015-02-19 T V SUNDRAM IYENGAR & SONS LIMITED +tvs + +// ubank : 2015-08-20 National Australia Bank Limited +ubank + +// ubs : 2014-12-11 UBS AG +ubs + +// uconnect : 2015-07-30 FCA US LLC. +uconnect + +// unicom : 2015-10-15 China United Network Communications Corporation Limited +unicom + +// university : 2014-03-06 Little Station, LLC +university + +// uno : 2013-09-11 Dot Latin LLC +uno + +// uol : 2014-05-01 UBN INTERNET LTDA. +uol + +// ups : 2015-06-25 UPS Market Driver, Inc. +ups + +// vacations : 2013-12-05 Atomic Tigers, LLC +vacations + +// vana : 2014-12-11 Lifestyle Domain Holdings, Inc. +vana + +// vanguard : 2015-09-03 The Vanguard Group, Inc. +vanguard + +// vegas : 2014-01-16 Dot Vegas, Inc. +vegas + +// ventures : 2013-08-27 Binky Lake, LLC +ventures + +// verisign : 2015-08-13 VeriSign, Inc. +verisign + +// versicherung : 2014-03-20 +versicherung + +// vet : 2014-03-06 +vet + +// viajes : 2013-10-17 Black Madison, LLC viajes -// wang : 2013-10-24 Zodiac Leo Limited -wang +// video : 2014-10-16 +video + +// vig : 2015-05-14 VIENNA INSURANCE GROUP AG Wiener Versicherung Gruppe +vig + +// viking : 2015-04-02 Viking River Cruises (Bermuda) Ltd. +viking + +// villas : 2013-12-05 New Sky, LLC +villas + +// vin : 2015-06-18 Holly Shadow, LLC +vin + +// vip : 2015-01-22 Minds + Machines Group Limited +vip + +// virgin : 2014-09-25 Virgin Enterprises Limited +virgin + +// visa : 2015-07-30 Visa Worldwide Pte. Limited +visa + +// vision : 2013-12-05 Koko Station, LLC +vision + +// vista : 2014-09-18 Vistaprint Limited +vista + +// vistaprint : 2014-09-18 Vistaprint Limited +vistaprint + +// viva : 2014-11-07 Saudi Telecom Company +viva + +// vivo : 2015-07-31 Telefonica Brasil S.A. +vivo + +// vlaanderen : 2014-02-06 DNS.be vzw +vlaanderen + +// vodka : 2013-12-19 Top Level Domain Holdings Limited +vodka + +// volkswagen : 2015-05-14 Volkswagen Group of America Inc. +volkswagen + +// volvo : 2015-11-12 Volvo Holding Sverige Aktiebolag +volvo + +// vote : 2013-11-21 Monolith Registry LLC +vote + +// voting : 2013-11-13 Valuetainment Corp. +voting + +// voto : 2013-11-21 Monolith Registry LLC +voto + +// voyage : 2013-08-27 Ruby House, LLC +voyage + +// vuelos : 2015-03-05 Travel Reservations SRL +vuelos + +// wales : 2014-05-08 Nominet UK +wales + +// walmart : 2015-07-31 Wal-Mart Stores, Inc. +walmart + +// walter : 2014-11-13 Sandvik AB +walter + +// wang : 2013-10-24 Zodiac Leo Limited +wang + +// wanggou : 2014-12-18 Amazon EU S.à r.l. +wanggou + +// warman : 2015-06-18 Weir Group IP Limited +warman + +// watch : 2013-11-14 Sand Shadow, LLC +watch + +// watches : 2014-12-22 Richemont DNS Inc. +watches + +// weather : 2015-01-08 The Weather Channel, LLC +weather + +// weatherchannel : 2015-03-12 The Weather Channel, LLC +weatherchannel + +// webcam : 2014-01-23 dot Webcam Limited +webcam + +// weber : 2015-06-04 Saint-Gobain Weber SA +weber + +// website : 2014-04-03 DotWebsite Inc. +website + +// wed : 2013-10-01 Atgron, Inc. +wed + +// wedding : 2014-04-24 Top Level Domain Holdings Limited +wedding + +// weibo : 2015-03-05 Sina Corporation +weibo + +// weir : 2015-01-29 Weir Group IP Limited +weir + +// whoswho : 2014-02-20 Who's Who Registry +whoswho + +// wien : 2013-10-28 punkt.wien GmbH +wien + +// wiki : 2013-11-07 Top Level Design, LLC +wiki + +// williamhill : 2014-03-13 William Hill Organization Limited +williamhill + +// win : 2014-11-20 First Registry Limited +win + +// windows : 2014-12-18 Microsoft Corporation +windows + +// wine : 2015-06-18 June Station, LLC +wine + +// winners : 2015-07-16 The TJX Companies, Inc. +winners + +// wme : 2014-02-13 William Morris Endeavor Entertainment, LLC +wme + +// wolterskluwer : 2015-08-06 Wolters Kluwer N.V. +wolterskluwer + +// woodside : 2015-07-09 Woodside Petroleum Limited +woodside + +// work : 2013-12-19 Top Level Domain Holdings Limited +work + +// works : 2013-11-14 Little Dynamite, LLC +works + +// world : 2014-06-12 Bitter Fields, LLC +world + +// wow : 2015-10-08 Amazon EU S.à r.l. +wow + +// wtc : 2013-12-19 World Trade Centers Association, Inc. +wtc + +// wtf : 2014-03-06 Hidden Way, LLC +wtf + +// xbox : 2014-12-18 Microsoft Corporation +xbox + +// xerox : 2014-10-24 Xerox DNHC LLC +xerox + +// xfinity : 2015-07-09 Comcast IP Holdings I, LLC +xfinity + +// xihuan : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD. +xihuan + +// xin : 2014-12-11 Elegant Leader Limited +xin + +// xn--11b4c3d : 2015-01-15 VeriSign Sarl +कॉम + +// xn--1ck2e1b : 2015-02-26 Amazon EU S.à r.l. +セール + +// xn--1qqw23a : 2014-01-09 Guangzhou YU Wei Information Technology Co., Ltd. +佛山 + +// xn--30rr7y : 2014-06-12 Excellent First Limited +慈善 + +// xn--3bst00m : 2013-09-13 Eagle Horizon Limited +集团 + +// xn--3ds443g : 2013-09-08 TLD REGISTRY LIMITED +在线 + +// xn--3oq18vl8pn36a : 2015-07-02 Volkswagen (China) Investment Co., Ltd. +大众汽车 + +// xn--3pxu8k : 2015-01-15 VeriSign Sarl +点看 + +// xn--42c2d9a : 2015-01-15 VeriSign Sarl +คอม + +// xn--45q11c : 2013-11-21 Zodiac Scorpio Limited +八卦 + +// xn--4gbrim : 2013-10-04 Suhub Electronic Establishment +موقع + +// xn--55qw42g : 2013-11-08 China Organizational Name Administration Center +公益 -// democrat : 2013-10-24 United TLD Holdco Ltd. -democrat +// xn--55qx5d : 2013-11-14 Computer Network Information Center of Chinese Academy of Sciences (China Internet Network Information Center) +公司 -// mango : 2013-10-25 PUNTO FA S.L. -mango +// xn--5su34j936bgsg : 2015-09-03 Shangri‐La International Hotel Management Limited +香格里拉 -// cab : 2013-10-25 Half Sunset, LLC -cab +// xn--5tzm5g : 2014-12-22 Global Website TLD Asia Limited +网站 -// support : 2013-10-25 Grand Orchard, LLC -support +// xn--6frz82g : 2013-09-23 Afilias Limited +移动 -// dance : 2013-10-25 United TLD Holdco Ltd. -dance +// xn--6qq986b3xl : 2013-09-13 Tycoon Treasure Limited +我爱你 -// nagoya : 2013-10-25 GMO Registry, Inc. -nagoya +// xn--80adxhks : 2013-12-19 Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID) +москва -// computer : 2013-10-25 Pine Mill, LLC -computer +// xn--80aqecdr1a : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +католик -// wien : 2013-10-28 punkt.wien GmbH -wien +// xn--80asehdb : 2013-07-14 CORE Association +онлайн -// berlin : 2013-10-31 dotBERLIN GmbH & Co. KG -berlin +// xn--80aswg : 2013-07-14 CORE Association +сайт -// codes : 2013-10-31 Puff Willow, LLC -codes +// xn--8y0a063a : 2015-03-26 China United Network Communications Corporation Limited +联通 -// email : 2013-10-31 Spring Madison, LLC -email +// xn--9dbq2a : 2015-01-15 VeriSign Sarl +קום -// xn--mgbab2bd : 2013-10-31 CORE Association -بازار +// xn--9et52u : 2014-06-12 RISE VICTORY LIMITED +时尚 -// repair : 2013-11-07 Lone Sunset, LLC -repair +// xn--9krt00a : 2015-03-12 Sina Corporation +微博 -// holiday : 2013-11-07 Goose Woods, LLC -holiday +// xn--b4w605ferd : 2014-08-07 Temasek Holdings (Private) Limited +淡马锡 -// center : 2013-11-07 Tin Mill, LLC -center +// xn--bck1b9a5dre4c : 2015-02-26 Amazon EU S.à r.l. +ファッション -// systems : 2013-11-07 Dash Cypress, LLC -systems +// xn--c1avg : 2013-11-14 Public Interest Registry +орг -// wiki : 2013-11-07 Top Level Design, LLC -wiki +// xn--c2br7g : 2015-01-15 VeriSign Sarl +नेट -// ceo : 2013-11-07 CEOTLD Pty Ltd -ceo +// xn--cck2b3b : 2015-02-26 Amazon EU S.à r.l. +ストア -// international : 2013-11-07 Wild Way, LLC -international +// xn--cg4bki : 2013-09-27 SAMSUNG SDS CO., LTD +삼성 -// solar : 2013-11-07 Ruby Town, LLC -solar +// xn--czr694b : 2014-01-16 Dot Trademark TLD Holding Company Limited +商标 -// company : 2013-11-07 Silver Avenue, LLC -company +// xn--czrs0t : 2013-12-19 Wild Island, LLC +商店 -// education : 2013-11-07 Brice Way, LLC -education +// xn--czru2d : 2013-11-21 Zodiac Capricorn Limited +商城 -// training : 2013-11-07 Wild Willow, LLC -training +// xn--d1acj3b : 2013-11-20 The Foundation for Network Initiatives “The Smart Internet” +дети -// academy : 2013-11-07 Half Oaks, LLC -academy +// xn--eckvdtc9d : 2014-12-18 Amazon EU S.à r.l. +ポイント -// marketing : 2013-11-07 Fern Pass, LLC -marketing +// xn--efvy88h : 2014-08-22 Xinhua News Agency Guangdong Branch 新华通讯社广东分社 +新闻 -// florist : 2013-11-08 Half Cypress, LLC -florist +// xn--estv75g : 2015-02-19 Industrial and Commercial Bank of China Limited +工行 -// solutions : 2013-11-07 Silver Cover, LLC -solutions +// xn--fct429k : 2015-04-09 Amazon EU S.à r.l. +家電 -// build : 2013-11-07 Plan Bee LLC -build +// xn--fhbei : 2015-01-15 VeriSign Sarl +كوم -// institute : 2013-11-07 Outer Maple, LLC -institute +// xn--fiq228c5hs : 2013-09-08 TLD REGISTRY LIMITED +中文网 -// builders : 2013-11-07 Atomic Madison, LLC -builders +// xn--fiq64b : 2013-10-14 CITIC Group Corporation +中信 -// red : 2013-11-07 Afilias Limited -red +// xn--fjq720a : 2014-05-22 Will Bloom, LLC +娱乐 -// blue : 2013-11-07 Afilias Limited -blue +// xn--flw351e : 2014-07-31 Charleston Road Registry Inc. +谷歌 -// ninja : 2013-11-07 United TLD Holdco Ltd. -ninja +// xn--fzys8d69uvgm : 2015-05-14 PCCW Enterprises Limited +電訊盈科 -// business : 2013-11-07 Spring Cross, LLC -business +// xn--g2xx48c : 2015-01-30 Minds + Machines Group Limited +购物 -// gal : 2013-11-07 Asociación puntoGAL -gal +// xn--gckr3f0f : 2015-02-26 Amazon EU S.à r.l. +クラウド -// social : 2013-11-07 United TLD Holdco Ltd. -social +// xn--gk3at1e : 2015-10-08 Amazon EU S.à r.l. +通販 -// house : 2013-11-07 Sugar Park, LLC -house +// xn--hxt814e : 2014-05-15 Zodiac Libra Limited +网店 -// camp : 2013-11-07 Delta Dynamite, LLC -camp +// xn--i1b6b1a6a2e : 2013-11-14 Public Interest Registry +संगठन -// immobilien : 2013-11-07 United TLD Holdco Ltd. -immobilien +// xn--imr513n : 2014-12-11 Dot Trademark TLD Holding Company Limited +餐厅 -// moda : 2013-11-07 United TLD Holdco Ltd. -moda +// xn--io0a7i : 2013-11-14 Computer Network Information Center of Chinese Academy of Sciences (China Internet Network Information Center) +网络 -// glass : 2013-11-07 Black Cover, LLC -glass +// xn--j1aef : 2015-01-15 VeriSign Sarl +ком -// management : 2013-11-07 John Goodbye, LLC -management +// xn--jlq61u9w7b : 2015-01-08 Nokia Corporation +诺基亚 -// kaufen : 2013-11-07 United TLD Holdco Ltd. -kaufen +// xn--jvr189m : 2015-02-26 Amazon EU S.à r.l. +食品 -// farm : 2013-11-07 Just Maple, LLC -farm +// xn--kcrx77d1x4a : 2014-11-07 Koninklijke Philips N.V. +飞利浦 -// xn--55qw42g : 2013-11-08 China Organizational Name Administration Center -公益 +// xn--kpu716f : 2014-12-22 Richemont DNS Inc. +手表 + +// xn--kput3i : 2014-02-13 Beijing RITT-Net Technology Development Co., Ltd +手机 + +// xn--mgba3a3ejt : 2014-11-20 Aramco Services Company +ارامكو + +// xn--mgba7c0bbn0a : 2015-05-14 Crescent Holding GmbH +العليان + +// xn--mgbaakc7dvf : 2015-09-03 Emirates Telecommunications Corporation (trading as Etisalat) +اتصالات + +// xn--mgbab2bd : 2013-10-31 CORE Association +بازار + +// xn--mgbb9fbpob : 2014-12-18 GreenTech Consultancy Company W.L.L. +موبايلي -// xn--zfr164b : 2013-11-08 China Organizational Name Administration Center +// xn--mgbca7dzdo : 2015-07-30 Abu Dhabi Systems and Information Centre +ابوظبي + +// xn--mgbi4ecexp : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +كاثوليك + +// xn--mgbt3dhd : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. +همراه + +// xn--mk1bu44c : 2015-01-15 VeriSign Sarl +닷컴 + +// xn--mxtq1m : 2014-03-06 Net-Chinese Co., Ltd. +政府 + +// xn--ngbc5azd : 2013-07-13 International Domain Registry Pty. Ltd. +شبكة + +// xn--ngbe9e0a : 2014-12-04 Kuwait Finance House +بيتك + +// xn--ngbrx : 2015-11-12 League of Arab States +عرب + +// xn--nqv7f : 2013-11-14 Public Interest Registry +机构 + +// xn--nqv7fs00ema : 2013-11-14 Public Interest Registry +组织机构 + +// xn--nyqy26a : 2014-11-07 Stable Tone Limited +健康 + +// xn--p1acf : 2013-12-12 Rusnames Limited +рус + +// xn--pbt977c : 2014-12-22 Richemont DNS Inc. +珠宝 + +// xn--pssy2u : 2015-01-15 VeriSign Sarl +大拿 + +// xn--q9jyb4c : 2013-09-17 Charleston Road Registry Inc. +みんな + +// xn--qcka1pmc : 2014-07-31 Charleston Road Registry Inc. +グーグル + +// xn--rhqv96g : 2013-09-11 Stable Tone Limited +世界 + +// xn--rovu88b : 2015-02-26 Amazon EU S.à r.l. +書籍 + +// xn--ses554g : 2014-01-16 +网址 + +// xn--t60b56a : 2015-01-15 VeriSign Sarl +닷넷 + +// xn--tckwe : 2015-01-15 VeriSign Sarl +コム + +// xn--tiq49xqyj : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +天主教 + +// xn--unup4y : 2013-07-14 Spring Fields, LLC +游戏 + +// xn--vermgensberater-ctb : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG +vermögensberater + +// xn--vermgensberatung-pwb : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG +vermögensberatung + +// xn--vhquv : 2013-08-27 Dash McCook, LLC +企业 + +// xn--vuq861b : 2014-10-16 Beijing Tele-info Network Technology Co., Ltd. +信息 + +// xn--w4r85el8fhu5dnra : 2015-04-30 Kerry Trading Co. Limited +嘉里大酒店 + +// xn--w4rs40l : 2015-07-30 Kerry Trading Co. Limited +嘉里 + +// xn--xhq521b : 2013-11-14 Guangzhou YU Wei Information Technology Co., Ltd. +广东 + +// xn--zfr164b : 2013-11-08 China Organizational Name Administration Center 政务 -// club : 2013-11-08 .CLUB DOMAINS, LLC -club +// xperia : 2015-05-14 Sony Mobile Communications AB +xperia -// voting : 2013-11-13 Valuetainment Corp. -voting +// xyz : 2013-12-05 XYZ.COM LLC +xyz -// TOKYO : 2013-11-13 GMO Registry, Inc. -TOKYO +// yachts : 2014-01-09 DERYachts, LLC +yachts -// moe : 2013-11-13 Interlink Co., Ltd. -moe +// yahoo : 2015-04-02 Yahoo! Domain Services Inc. +yahoo + +// yamaxun : 2014-12-18 Amazon EU S.à r.l. +yamaxun + +// yandex : 2014-04-10 YANDEX, LLC +yandex + +// yodobashi : 2014-11-20 YODOBASHI CAMERA CO.,LTD. +yodobashi + +// yoga : 2014-05-29 Top Level Domain Holdings Limited +yoga + +// yokohama : 2013-12-12 GMO Registry, Inc. +yokohama + +// you : 2015-04-09 Amazon EU S.à r.l. +you + +// youtube : 2014-05-01 Charleston Road Registry Inc. +youtube + +// yun : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD. +yun + +// zappos : 2015-06-25 Amazon EU S.à r.l. +zappos + +// zara : 2014-11-07 Industria de Diseño Textil, S.A. (INDITEX, S.A.) +zara + +// zero : 2014-12-18 Amazon EU S.à r.l. +zero + +// zip : 2014-05-08 Charleston Road Registry Inc. +zip + +// zippo : 2015-07-02 Zadco Company +zippo + +// zone : 2013-11-14 Outer Falls, LLC +zone + +// zuerich : 2014-11-07 Kanton Zürich (Canton of Zurich) +zuerich // ===END ICANN DOMAINS=== // ===BEGIN PRIVATE DOMAINS=== +// (Note: these are in alphabetical order by company name) + +// 1GB LLC : https://www.1gb.ua/ +// Submitted by 1GB LLC +cc.ua +inf.ua +ltd.ua + +// AgileBits Inc : https://agilebits.com +// Submitted by Roustem Karimov +1password.ca +1password.com +1password.eu + +// Agnat sp. z o.o. : https://domena.pl +// Submitted by Przemyslaw Plewa +beep.pl + +// Alces Software Ltd : http://alces-software.com +// Submitted by Mark J. Titorenko +*.compute.estate +*.alces.network + +// alwaysdata : https://www.alwaysdata.com +// Submitted by Cyril +alwaysdata.net // Amazon CloudFront : https://aws.amazon.com/cloudfront/ -// Submitted by Donavan Miller 2013-03-22 +// Submitted by Donavan Miller cloudfront.net -// Amazon Elastic Compute Cloud: https://aws.amazon.com/ec2/ -// Submitted by Osman Surkatty 2013-04-02 -compute.amazonaws.com +// Amazon Elastic Compute Cloud : https://aws.amazon.com/ec2/ +// Submitted by Luke Wells +*.compute.amazonaws.com +*.compute-1.amazonaws.com +*.compute.amazonaws.com.cn us-east-1.amazonaws.com -compute-1.amazonaws.com -z-1.compute-1.amazonaws.com -z-2.compute-1.amazonaws.com -ap-northeast-1.compute.amazonaws.com -ap-southeast-1.compute.amazonaws.com -ap-southeast-2.compute.amazonaws.com -eu-west-1.compute.amazonaws.com -sa-east-1.compute.amazonaws.com -us-gov-west-1.compute.amazonaws.com -us-west-1.compute.amazonaws.com -us-west-2.compute.amazonaws.com // Amazon Elastic Beanstalk : https://aws.amazon.com/elasticbeanstalk/ -// Submitted by Adam Stein 2013-04-02 +// Submitted by Luke Wells +cn-north-1.eb.amazonaws.com.cn elasticbeanstalk.com +ap-northeast-1.elasticbeanstalk.com +ap-northeast-2.elasticbeanstalk.com +ap-south-1.elasticbeanstalk.com +ap-southeast-1.elasticbeanstalk.com +ap-southeast-2.elasticbeanstalk.com +ca-central-1.elasticbeanstalk.com +eu-central-1.elasticbeanstalk.com +eu-west-1.elasticbeanstalk.com +eu-west-2.elasticbeanstalk.com +eu-west-3.elasticbeanstalk.com +sa-east-1.elasticbeanstalk.com +us-east-1.elasticbeanstalk.com +us-east-2.elasticbeanstalk.com +us-gov-west-1.elasticbeanstalk.com +us-west-1.elasticbeanstalk.com +us-west-2.elasticbeanstalk.com // Amazon Elastic Load Balancing : https://aws.amazon.com/elasticloadbalancing/ -// Submitted by Scott Vidmar 2013-03-27 -elb.amazonaws.com +// Submitted by Luke Wells +*.elb.amazonaws.com +*.elb.amazonaws.com.cn // Amazon S3 : https://aws.amazon.com/s3/ -// Submitted by Courtney Eckhardt 2013-03-22 +// Submitted by Luke Wells s3.amazonaws.com -s3-us-west-2.amazonaws.com -s3-us-west-1.amazonaws.com -s3-eu-west-1.amazonaws.com +s3-ap-northeast-1.amazonaws.com +s3-ap-northeast-2.amazonaws.com +s3-ap-south-1.amazonaws.com s3-ap-southeast-1.amazonaws.com s3-ap-southeast-2.amazonaws.com -s3-ap-northeast-1.amazonaws.com +s3-ca-central-1.amazonaws.com +s3-eu-central-1.amazonaws.com +s3-eu-west-1.amazonaws.com +s3-eu-west-2.amazonaws.com +s3-eu-west-3.amazonaws.com +s3-external-1.amazonaws.com +s3-fips-us-gov-west-1.amazonaws.com s3-sa-east-1.amazonaws.com s3-us-gov-west-1.amazonaws.com -s3-fips-us-gov-west-1.amazonaws.com +s3-us-east-2.amazonaws.com +s3-us-west-1.amazonaws.com +s3-us-west-2.amazonaws.com +s3.ap-northeast-2.amazonaws.com +s3.ap-south-1.amazonaws.com +s3.cn-north-1.amazonaws.com.cn +s3.ca-central-1.amazonaws.com +s3.eu-central-1.amazonaws.com +s3.eu-west-2.amazonaws.com +s3.eu-west-3.amazonaws.com +s3.us-east-2.amazonaws.com +s3.dualstack.ap-northeast-1.amazonaws.com +s3.dualstack.ap-northeast-2.amazonaws.com +s3.dualstack.ap-south-1.amazonaws.com +s3.dualstack.ap-southeast-1.amazonaws.com +s3.dualstack.ap-southeast-2.amazonaws.com +s3.dualstack.ca-central-1.amazonaws.com +s3.dualstack.eu-central-1.amazonaws.com +s3.dualstack.eu-west-1.amazonaws.com +s3.dualstack.eu-west-2.amazonaws.com +s3.dualstack.eu-west-3.amazonaws.com +s3.dualstack.sa-east-1.amazonaws.com +s3.dualstack.us-east-1.amazonaws.com +s3.dualstack.us-east-2.amazonaws.com s3-website-us-east-1.amazonaws.com -s3-website-us-west-2.amazonaws.com s3-website-us-west-1.amazonaws.com -s3-website-eu-west-1.amazonaws.com +s3-website-us-west-2.amazonaws.com +s3-website-ap-northeast-1.amazonaws.com s3-website-ap-southeast-1.amazonaws.com s3-website-ap-southeast-2.amazonaws.com -s3-website-ap-northeast-1.amazonaws.com +s3-website-eu-west-1.amazonaws.com s3-website-sa-east-1.amazonaws.com -s3-website-us-gov-west-1.amazonaws.com +s3-website.ap-northeast-2.amazonaws.com +s3-website.ap-south-1.amazonaws.com +s3-website.ca-central-1.amazonaws.com +s3-website.eu-central-1.amazonaws.com +s3-website.eu-west-2.amazonaws.com +s3-website.eu-west-3.amazonaws.com +s3-website.us-east-2.amazonaws.com + +// Amune : https://amune.org/ +// Submitted by Team Amune +t3l3p0rt.net +tele.amune.org + +// Aptible : https://www.aptible.com/ +// Submitted by Thomas Orozco +on-aptible.com + +// Asociación Amigos de la Informática "Euskalamiga" : http://encounter.eus/ +// Submitted by Hector Martin +user.party.eus + +// Association potager.org : https://potager.org/ +// Submitted by Lunar +pimienta.org +poivron.org +potager.org +sweetpepper.org + +// ASUSTOR Inc. : http://www.asustor.com +// Submitted by Vincent Tseng +myasustor.com + +// AVM : https://avm.de +// Submitted by Andreas Weise +myfritz.net + +// AW AdvisorWebsites.com Software Inc : https://advisorwebsites.com +// Submitted by James Kennedy +*.awdev.ca +*.advisor.ws + +// backplane : https://www.backplane.io +// Submitted by Anthony Voutas +backplaneapp.io // BetaInABox -// Submitted by adrian@betainabox.com 2012-09-13 +// Submitted by Adrian betainabox.com +// BinaryLane : http://www.binarylane.com +// Submitted by Nathan O'Sullivan +bnr.la + +// Boomla : https://boomla.com +// Submitted by Tibor Halter +boomla.net + +// Boxfuse : https://boxfuse.com +// Submitted by Axel Fontaine +boxfuse.io + +// bplaced : https://www.bplaced.net/ +// Submitted by Miroslav Bozic +square7.ch +bplaced.com +bplaced.de +square7.de +bplaced.net +square7.net + +// BrowserSafetyMark +// Submitted by Dave Tharp +browsersafetymark.io + +// callidomus : https://www.callidomus.com/ +// Submitted by Marcus Popp +mycd.eu + // CentralNic : http://www.centralnic.com/names/domains -// Submitted by registry 2012-09-27 +// Submitted by registry ae.org ar.com br.com cn.com com.de +com.se de.com eu.com gb.com gb.net -gr.com hu.com hu.net jp.net jpn.com kr.com +mex.com no.com qc.com ru.com @@ -7034,33 +10849,180 @@ se.net uk.com uk.net us.com -us.org uy.com +za.bz za.com +// Africa.com Web Solutions Ltd : https://registry.africa.com +// Submitted by Gavin Brown +africa.com + +// iDOT Services Limited : http://www.domain.gr.com +// Submitted by Gavin Brown +gr.com + +// Radix FZC : http://domains.in.net +// Submitted by Gavin Brown +in.net + +// US REGISTRY LLC : http://us.org +// Submitted by Gavin Brown +us.org + +// co.com Registry, LLC : https://registry.co.com +// Submitted by Gavin Brown +co.com + // c.la : http://www.c.la/ c.la +// certmgr.org : https://certmgr.org +// Submitted by B. Blechschmidt +certmgr.org + +// Citrix : https://citrix.com +// Submitted by Alex Stoddard +xenapponazure.com + +// ClearVox : http://www.clearvox.nl/ +// Submitted by Leon Rowland +virtueeldomein.nl + +// Cloud66 : https://www.cloud66.com/ +// Submitted by Khash Sajadi +c66.me + +// CloudAccess.net : https://www.cloudaccess.net/ +// Submitted by Pawel Panek +jdevcloud.com +wpdevcloud.com +cloudaccess.host +freesite.host +cloudaccess.net + // cloudControl : https://www.cloudcontrol.com/ -// Submitted by Tobias Wilken 2013-07-23 +// Submitted by Tobias Wilken cloudcontrolled.com cloudcontrolapp.com // co.ca : http://registry.co.ca/ co.ca +// i-registry s.r.o. : http://www.i-registry.cz/ +// Submitted by Martin Semrad +co.cz + +// CDN77.com : http://www.cdn77.com +// Submitted by Jan Krpes +c.cdn77.org +cdn77-ssl.net +r.cdn77.net +rsc.cdn77.org +ssl.origin.cdn77-secure.org + +// Cloud DNS Ltd : http://www.cloudns.net +// Submitted by Aleksander Hristov +cloudns.asia +cloudns.biz +cloudns.club +cloudns.cc +cloudns.eu +cloudns.in +cloudns.info +cloudns.org +cloudns.pro +cloudns.pw +cloudns.us + // CoDNS B.V. co.nl co.no +// Combell.com : https://www.combell.com +// Submitted by Thomas Wouters +webhosting.be +hosting-cluster.nl + +// COSIMO GmbH : http://www.cosimo.de +// Submitted by Rene Marticke +dyn.cosidns.de +dynamisches-dns.de +dnsupdater.de +internet-dns.de +l-o-g-i-n.de +dynamic-dns.info +feste-ip.net +knx-server.net +static-access.net + +// Craynic, s.r.o. : http://www.craynic.com/ +// Submitted by Ales Krajnik +realm.cz + +// Cryptonomic : https://cryptonomic.net/ +// Submitted by Andrew Cady +*.cryptonomic.net + // Cupcake : https://cupcake.io/ -// Submitted by Jonathan Rudenberg 2013-10-08 +// Submitted by Jonathan Rudenberg cupcake.is +// cyon GmbH : https://www.cyon.ch/ +// Submitted by Dominic Luechinger +cyon.link +cyon.site + +// Daplie, Inc : https://daplie.com +// Submitted by AJ ONeal +daplie.me +localhost.daplie.me + +// Dansk.net : http://www.dansk.net/ +// Submitted by Anani Voule +biz.dk +co.dk +firm.dk +reg.dk +store.dk + +// Debian : https://www.debian.org/ +// Submitted by Peter Palfrader / Debian Sysadmin Team +debian.net + +// deSEC : https://desec.io/ +// Submitted by Peter Thomassen +dedyn.io + +// DNShome : https://www.dnshome.de/ +// Submitted by Norbert Auler +dnshome.de + +// DrayTek Corp. : https://www.draytek.com/ +// Submitted by Paul Fang +drayddns.com + // DreamHost : http://www.dreamhost.com/ -// Submitted by Andrew Farmer 2012-10-02 +// Submitted by Andrew Farmer dreamhosters.com +// Drobo : http://www.drobo.com/ +// Submitted by Ricardo Padilha +mydrobo.com + +// Drud Holdings, LLC. : https://www.drud.com/ +// Submitted by Kevin Bridges +drud.io +drud.us + +// DuckDNS : http://www.duckdns.org/ +// Submitted by Richard Harper +duckdns.org + +// dy.fi : http://dy.fi/ +// Submitted by Heikki Hannikainen +dy.fi +tunk.org + // DynDNS.com : http://www.dyndns.com/services/dns/dyndns/ dyndns-at-home.com dyndns-at-work.com @@ -7342,39 +11304,339 @@ webhop.org worse-than.tv writesthisblog.com -// Fastly Inc. http://www.fastly.com/ -// Submitted by Vladimir Vuksan 2013-05-31 +// ddnss.de : https://www.ddnss.de/ +// Submitted by Robert Niedziela +ddnss.de +dyn.ddnss.de +dyndns.ddnss.de +dyndns1.de +dyn-ip24.de +home-webserver.de +dyn.home-webserver.de +myhome-server.de +ddnss.org + +// Definima : http://www.definima.com/ +// Submitted by Maxence Bitterli +definima.net +definima.io + +// Dynu.com : https://www.dynu.com/ +// Submitted by Sue Ye +ddnsfree.com +ddnsgeek.com +giize.com +gleeze.com +kozow.com +loseyourip.com +ooguy.com +theworkpc.com +casacam.net +dynu.net +accesscam.org +camdvr.org +freeddns.org +mywire.org +webredirect.org +myddns.rocks +blogsite.xyz + +// dynv6 : https://dynv6.com +// Submitted by Dominik Menke +dynv6.net + +// E4YOU spol. s.r.o. : https://e4you.cz/ +// Submitted by Vladimir Dudr +e4.cz + +// Enalean SAS: https://www.enalean.com +// Submitted by Thomas Cottier +mytuleap.com + +// Enonic : http://enonic.com/ +// Submitted by Erik Kaareng-Sunde +enonic.io +customer.enonic.io + +// EU.org https://eu.org/ +// Submitted by Pierre Beyssac +eu.org +al.eu.org +asso.eu.org +at.eu.org +au.eu.org +be.eu.org +bg.eu.org +ca.eu.org +cd.eu.org +ch.eu.org +cn.eu.org +cy.eu.org +cz.eu.org +de.eu.org +dk.eu.org +edu.eu.org +ee.eu.org +es.eu.org +fi.eu.org +fr.eu.org +gr.eu.org +hr.eu.org +hu.eu.org +ie.eu.org +il.eu.org +in.eu.org +int.eu.org +is.eu.org +it.eu.org +jp.eu.org +kr.eu.org +lt.eu.org +lu.eu.org +lv.eu.org +mc.eu.org +me.eu.org +mk.eu.org +mt.eu.org +my.eu.org +net.eu.org +ng.eu.org +nl.eu.org +no.eu.org +nz.eu.org +paris.eu.org +pl.eu.org +pt.eu.org +q-a.eu.org +ro.eu.org +ru.eu.org +se.eu.org +si.eu.org +sk.eu.org +tr.eu.org +uk.eu.org +us.eu.org + +// Evennode : http://www.evennode.com/ +// Submitted by Michal Kralik +eu-1.evennode.com +eu-2.evennode.com +eu-3.evennode.com +eu-4.evennode.com +us-1.evennode.com +us-2.evennode.com +us-3.evennode.com +us-4.evennode.com + +// eDirect Corp. : https://hosting.url.com.tw/ +// Submitted by C.S. chang +twmail.cc +twmail.net +twmail.org +mymailer.com.tw +url.tw + +// Facebook, Inc. +// Submitted by Peter Ruibal +apps.fbsbx.com + +// FAITID : https://faitid.org/ +// Submitted by Maxim Alzoba +// https://www.flexireg.net/stat_info +ru.net +adygeya.ru +bashkiria.ru +bir.ru +cbg.ru +com.ru +dagestan.ru +grozny.ru +kalmykia.ru +kustanai.ru +marine.ru +mordovia.ru +msk.ru +mytis.ru +nalchik.ru +nov.ru +pyatigorsk.ru +spb.ru +vladikavkaz.ru +vladimir.ru +abkhazia.su +adygeya.su +aktyubinsk.su +arkhangelsk.su +armenia.su +ashgabad.su +azerbaijan.su +balashov.su +bashkiria.su +bryansk.su +bukhara.su +chimkent.su +dagestan.su +east-kazakhstan.su +exnet.su +georgia.su +grozny.su +ivanovo.su +jambyl.su +kalmykia.su +kaluga.su +karacol.su +karaganda.su +karelia.su +khakassia.su +krasnodar.su +kurgan.su +kustanai.su +lenug.su +mangyshlak.su +mordovia.su +msk.su +murmansk.su +nalchik.su +navoi.su +north-kazakhstan.su +nov.su +obninsk.su +penza.su +pokrovsk.su +sochi.su +spb.su +tashkent.su +termez.su +togliatti.su +troitsk.su +tselinograd.su +tula.su +tuva.su +vladikavkaz.su +vladimir.su +vologda.su + +// Fancy Bits, LLC : http://getchannels.com +// Submitted by Aman Gupta +channelsdvr.net + +// Fastly Inc. : http://www.fastly.com/ +// Submitted by Fastly Security +fastlylb.net +map.fastlylb.net +freetls.fastly.net +map.fastly.net +a.prod.fastly.net +global.prod.fastly.net a.ssl.fastly.net b.ssl.fastly.net global.ssl.fastly.net -a.prod.fastly.net -global.prod.fastly.net + +// Featherhead : https://featherhead.xyz/ +// Submitted by Simon Menke +fhapp.xyz + +// Fedora : https://fedoraproject.org/ +// submitted by Patrick Uiterwijk +fedorainfracloud.org +fedorapeople.org +cloud.fedoraproject.org +app.os.fedoraproject.org +app.os.stg.fedoraproject.org + +// Filegear Inc. : https://www.filegear.com +// Submitted by Jason Zhu +filegear.me + +// Firebase, Inc. +// Submitted by Chris Raynor +firebaseapp.com + +// Flynn : https://flynn.io +// Submitted by Jonathan Rudenberg +flynnhub.com +flynnhosting.net + +// Freebox : http://www.freebox.fr +// Submitted by Romain Fliedel +freebox-os.com +freeboxos.com +fbx-os.fr +fbxos.fr +freebox-os.fr +freeboxos.fr + +// Futureweb OG : http://www.futureweb.at +// Submitted by Andreas Schnederle-Wagner +*.futurecms.at +futurehosting.at +futuremailing.at +*.ex.ortsinfo.at +*.kunden.ortsinfo.at +*.statics.cloud + +// GDS : https://www.gov.uk/service-manual/operations/operating-servicegovuk-subdomains +// Submitted by David Illsley +service.gov.uk // GitHub, Inc. -// Submitted by Ben Toews 2013-04-18 +// Submitted by Patrick Toomey github.io +githubusercontent.com + +// GitLab, Inc. +// Submitted by Alex Hanselka +gitlab.io + +// UKHomeOffice : https://www.gov.uk/government/organisations/home-office +// Submitted by Jon Shanks +homeoffice.gov.uk // GlobeHosting, Inc. -// Submitted by Zoltan Egresi 2013-07-12 -ro.com +// Submitted by Zoltan Egresi +ro.im +shop.ro + +// GoIP DNS Services : http://www.goip.de +// Submitted by Christian Poulter +goip.de // Google, Inc. -// Submitted by Eduardo Vela 2012-10-24 +// Submitted by Eduardo Vela +*.0emm.com appspot.com +blogspot.ae +blogspot.al +blogspot.am +blogspot.ba blogspot.be +blogspot.bg blogspot.bj blogspot.ca blogspot.cf blogspot.ch +blogspot.cl blogspot.co.at +blogspot.co.id blogspot.co.il +blogspot.co.ke blogspot.co.nz blogspot.co.uk +blogspot.co.za blogspot.com blogspot.com.ar blogspot.com.au blogspot.com.br +blogspot.com.by +blogspot.com.co +blogspot.com.cy +blogspot.com.ee +blogspot.com.eg blogspot.com.es +blogspot.com.mt +blogspot.com.ng +blogspot.com.tr +blogspot.com.uy blogspot.cv blogspot.cz blogspot.de @@ -7383,63 +11645,726 @@ blogspot.fi blogspot.fr blogspot.gr blogspot.hk +blogspot.hr blogspot.hu blogspot.ie blogspot.in +blogspot.is blogspot.it blogspot.jp blogspot.kr +blogspot.li +blogspot.lt +blogspot.lu +blogspot.md +blogspot.mk blogspot.mr blogspot.mx +blogspot.my blogspot.nl blogspot.no +blogspot.pe blogspot.pt +blogspot.qa blogspot.re blogspot.ro +blogspot.rs +blogspot.ru blogspot.se blogspot.sg +blogspot.si blogspot.sk +blogspot.sn blogspot.td blogspot.tw +blogspot.ug +blogspot.vn +cloudfunctions.net +cloud.goog codespot.com googleapis.com googlecode.com +pagespeedmobilizer.com +publishproxy.com +withgoogle.com +withyoutube.com + +// Hashbang : https://hashbang.sh +hashbang.sh + +// Hasura : https://hasura.io +// Submitted by Shahidh K Muhammed +hasura-app.io + +// Hepforge : https://www.hepforge.org +// Submitted by David Grellscheid +hepforge.org // Heroku : https://www.heroku.com/ -// Submitted by Tom Maher 2013-05-02 +// Submitted by Tom Maher herokuapp.com herokussl.com +// Ici la Lune : http://www.icilalune.com/ +// Submitted by Simon Morvan +moonscale.net + // iki.fi -// Submitted by Hannu Aronsson 2009-11-05 +// Submitted by Hannu Aronsson iki.fi // info.at : http://www.info.at/ biz.at info.at +// info.cx : http://info.cx +// Submitted by Jacob Slater +info.cx + +// Interlegis : http://www.interlegis.leg.br +// Submitted by Gabriel Ferreira +ac.leg.br +al.leg.br +am.leg.br +ap.leg.br +ba.leg.br +ce.leg.br +df.leg.br +es.leg.br +go.leg.br +ma.leg.br +mg.leg.br +ms.leg.br +mt.leg.br +pa.leg.br +pb.leg.br +pe.leg.br +pi.leg.br +pr.leg.br +rj.leg.br +rn.leg.br +ro.leg.br +rr.leg.br +rs.leg.br +sc.leg.br +se.leg.br +sp.leg.br +to.leg.br + +// intermetrics GmbH : https://pixolino.com/ +// Submitted by Wolfgang Schwarz +pixolino.com + +// IPiFony Systems, Inc. : https://www.ipifony.com/ +// Submitted by Matthew Hardeman +ipifony.net + +// Joyent : https://www.joyent.com/ +// Submitted by Brian Bennett +*.triton.zone +*.cns.joyent.com + +// JS.ORG : http://dns.js.org +// Submitted by Stefan Keim +js.org + +// Keyweb AG : https://www.keyweb.de +// Submitted by Martin Dannehl +keymachine.de + +// KnightPoint Systems, LLC : http://www.knightpoint.com/ +// Submitted by Roy Keene +knightpoint.systems + +// .KRD : http://nic.krd/data/krd/Registration%20Policy.pdf +co.krd +edu.krd + +// LCube - Professional hosting e.K. : https://www.lcube-webhosting.de +// Submitted by Lars Laehn +git-repos.de +lcube-server.de +svn-repos.de + +// LiquidNet Ltd : http://www.liquidnetlimited.com/ +// Submitted by Victor Velchev +we.bs + +// Lukanet Ltd : https://lukanet.com +// Submitted by Anton Avramov +barsy.bg +barsyonline.com +barsy.de +barsy.eu +barsy.in +barsy.net +barsy.online +barsy.support + +// Magento Commerce +// Submitted by Damien Tournoud +*.magentosite.cloud + +// Mail.Ru Group : https://hb.cldmail.ru +// Submitted by Ilya Zaretskiy +hb.cldmail.ru + +// MetaCentrum, CESNET z.s.p.o. : https://www.metacentrum.cz/en/ +// Submitted by Zdeněk Šustr +cloud.metacentrum.cz +custom.metacentrum.cz + +// Meteor Development Group : https://www.meteor.com/hosting +// Submitted by Pierre Carrier +meteorapp.com +eu.meteorapp.com + // Michau Enterprises Limited : http://www.co.pl/ co.pl +// Microsoft : http://microsoft.com +// Submitted by Barry Dorrans +azurewebsites.net +azure-mobile.net +cloudapp.net + +// Mozilla Foundation : https://mozilla.org/ +// Submitted by glob +bmoattachments.org + +// MSK-IX : https://www.msk-ix.ru/ +// Submitted by Khannanov Roman +net.ru +org.ru +pp.ru + +// Netlify : https://www.netlify.com +// Submitted by Jessica Parsons +bitballoon.com +netlify.com + +// Neustar Inc. +// Submitted by Trung Tran +4u.com + +// ngrok : https://ngrok.com/ +// Submitted by Alan Shreve +ngrok.io + +// Nimbus Hosting Ltd. : https://www.nimbushosting.co.uk/ +// Submitted by Nicholas Ford +nh-serv.co.uk + +// NFSN, Inc. : https://www.NearlyFreeSpeech.NET/ +// Submitted by Jeff Wheelhouse +nfshost.com + +// nsupdate.info : https://www.nsupdate.info/ +// Submitted by Thomas Waldmann +nsupdate.info +nerdpol.ovh + +// No-IP.com : https://noip.com/ +// Submitted by Deven Reza +blogsyte.com +brasilia.me +cable-modem.org +ciscofreak.com +collegefan.org +couchpotatofries.org +damnserver.com +ddns.me +ditchyourip.com +dnsfor.me +dnsiskinky.com +dvrcam.info +dynns.com +eating-organic.net +fantasyleague.cc +geekgalaxy.com +golffan.us +health-carereform.com +homesecuritymac.com +homesecuritypc.com +hopto.me +ilovecollege.info +loginto.me +mlbfan.org +mmafan.biz +myactivedirectory.com +mydissent.net +myeffect.net +mymediapc.net +mypsx.net +mysecuritycamera.com +mysecuritycamera.net +mysecuritycamera.org +net-freaks.com +nflfan.org +nhlfan.net +no-ip.ca +no-ip.co.uk +no-ip.net +noip.us +onthewifi.com +pgafan.net +point2this.com +pointto.us +privatizehealthinsurance.net +quicksytes.com +read-books.org +securitytactics.com +serveexchange.com +servehumour.com +servep2p.com +servesarcasm.com +stufftoread.com +ufcfan.org +unusualperson.com +workisboring.com +3utilities.com +bounceme.net +ddns.net +ddnsking.com +gotdns.ch +hopto.org +myftp.biz +myftp.org +myvnc.com +no-ip.biz +no-ip.info +no-ip.org +noip.me +redirectme.net +servebeer.com +serveblog.net +servecounterstrike.com +serveftp.com +servegame.com +servehalflife.com +servehttp.com +serveirc.com +serveminecraft.net +servemp3.com +servepics.com +servequake.com +sytes.net +webhop.me +zapto.org + +// NodeArt : https://nodeart.io +// Submitted by Konstantin Nosov +stage.nodeart.io + +// Nodum B.V. : https://nodum.io/ +// Submitted by Wietse Wind +nodum.co +nodum.io + // NYC.mn : http://www.information.nyc.mn -// Submitted by Matthew Brown 2013-03-11 +// Submitted by Matthew Brown nyc.mn +// NymNom : https://nymnom.com/ +// Submitted by Dave McCormack +nom.ae +nom.ai +nom.al +nym.by +nym.bz +nom.cl +nom.gd +nom.gl +nym.gr +nom.gt +nom.hn +nom.im +nym.kz +nym.la +nom.li +nym.li +nym.lt +nym.lu +nym.me +nom.mk +nym.mx +nom.nu +nym.nz +nym.pe +nym.pt +nom.pw +nom.qa +nom.rs +nom.si +nym.sk +nym.su +nym.sx +nym.tw +nom.ug +nom.uy +nom.vc +nom.vg + +// Octopodal Solutions, LLC. : https://ulterius.io/ +// Submitted by Andrew Sampson +cya.gg + +// One Fold Media : http://www.onefoldmedia.com/ +// Submitted by Eddie Jones +nid.io + +// OpenCraft GmbH : http://opencraft.com/ +// Submitted by Sven Marnach +opencraft.hosting + // Opera Software, A.S.A. -// Submitted by Yngve Pettersen 2009-11-26 +// Submitted by Yngve Pettersen operaunite.com -// Red Hat, Inc. OpenShift : https://openshift.redhat.com/ -// Submitted by Tim Kramer 2012-10-24 -rhcloud.com +// OutSystems +// Submitted by Duarte Santos +outsystemscloud.com + +// OwnProvider : http://www.ownprovider.com +// Submitted by Jan Moennich +ownprovider.com + +// oy.lc +// Submitted by Charly Coste +oy.lc + +// Pagefog : https://pagefog.com/ +// Submitted by Derek Myers +pgfog.com + +// Pagefront : https://www.pagefronthq.com/ +// Submitted by Jason Kriss +pagefrontapp.com + +// .pl domains (grandfathered) +art.pl +gliwice.pl +krakow.pl +poznan.pl +wroc.pl +zakopane.pl + +// Pantheon Systems, Inc. : https://pantheon.io/ +// Submitted by Gary Dylina +pantheonsite.io +gotpantheon.com + +// Peplink | Pepwave : http://peplink.com/ +// Submitted by Steve Leung +mypep.link + +// Planet-Work : https://www.planet-work.com/ +// Submitted by Frédéric VANNIÈRE +on-web.fr + +// Platform.sh : https://platform.sh +// Submitted by Nikola Kotur +*.platform.sh +*.platformsh.site + +// prgmr.com : https://prgmr.com/ +// Submitted by Sarah Newman +xen.prgmr.com // priv.at : http://www.nic.priv.at/ -// Submitted by registry 2008-06-09 +// Submitted by registry priv.at +// Protonet GmbH : http://protonet.io +// Submitted by Martin Meier +protonet.io + +// Publication Presse Communication SARL : https://ppcom.fr +// Submitted by Yaacov Akiba Slama +chirurgiens-dentistes-en-france.fr +byen.site + +// QA2 +// Submitted by Daniel Dent (https://www.danieldent.com/) +qa2.com + +// QNAP System Inc : https://www.qnap.com +// Submitted by Nick Chang +dev-myqnapcloud.com +alpha-myqnapcloud.com +myqnapcloud.com + +// Quip : https://quip.com +// Submitted by Patrick Linehan +*.quipelements.com + +// Qutheory LLC : http://qutheory.io +// Submitted by Jonas Schwartz +vapor.cloud +vaporcloud.io + +// Rackmaze LLC : https://www.rackmaze.com +// Submitted by Kirill Pertsev +rackmaze.com +rackmaze.net + +// Red Hat, Inc. OpenShift : https://openshift.redhat.com/ +// Submitted by Tim Kramer +rhcloud.com + +// Resin.io : https://resin.io +// Submitted by Tim Perry +resindevice.io +devices.resinstaging.io + +// RethinkDB : https://www.rethinkdb.com/ +// Submitted by Chris Kastorff +hzc.io + +// Revitalised Limited : http://www.revitalised.co.uk +// Submitted by Jack Price +wellbeingzone.eu +ptplus.fit +wellbeingzone.co.uk + +// Sandstorm Development Group, Inc. : https://sandcats.io/ +// Submitted by Asheesh Laroia +sandcats.io + +// SBE network solutions GmbH : https://www.sbe.de/ +// Submitted by Norman Meilick +logoip.de +logoip.com + +// Scry Security : http://www.scrysec.com +// Submitted by Shante Adam +scrysec.com + +// Securepoint GmbH : https://www.securepoint.de +// Submitted by Erik Anders +firewall-gateway.com +firewall-gateway.de +my-gateway.de +my-router.de +spdns.de +spdns.eu +firewall-gateway.net +my-firewall.org +myfirewall.org +spdns.org + +// SensioLabs, SAS : https://sensiolabs.com/ +// Submitted by Fabien Potencier +*.s5y.io +*.sensiosite.cloud + +// Service Online LLC : http://drs.ua/ +// Submitted by Serhii Bulakh +biz.ua +co.ua +pp.ua + +// ShiftEdit : https://shiftedit.net/ +// Submitted by Adam Jimenez +shiftedit.io + +// Shopblocks : http://www.shopblocks.com/ +// Submitted by Alex Bowers +myshopblocks.com + +// SinaAppEngine : http://sae.sina.com.cn/ +// Submitted by SinaAppEngine +1kapp.com +appchizi.com +applinzi.com +sinaapp.com +vipsinaapp.com + +// Skyhat : http://www.skyhat.io +// Submitted by Shante Adam +bounty-full.com +alpha.bounty-full.com +beta.bounty-full.com + +// staticland : https://static.land +// Submitted by Seth Vincent +static.land +dev.static.land +sites.static.land + +// SourceLair PC : https://www.sourcelair.com +// Submitted by Antonis Kalipetis +apps.lair.io +*.stolos.io + +// SpaceKit : https://www.spacekit.io/ +// Submitted by Reza Akhavan +spacekit.io + +// Stackspace : https://www.stackspace.io/ +// Submitted by Lina He +stackspace.space + +// Storj Labs Inc. : https://storj.io/ +// Submitted by Philip Hutchins +storj.farm + +// Sub 6 Limited: http://www.sub6.com +// Submitted by Dan Miller +temp-dns.com + +// Synology, Inc. : https://www.synology.com/ +// Submitted by Rony Weng +diskstation.me +dscloud.biz +dscloud.me +dscloud.mobi +dsmynas.com +dsmynas.net +dsmynas.org +familyds.com +familyds.net +familyds.org +i234.me +myds.me +synology.me +vpnplus.to + +// TAIFUN Software AG : http://taifun-software.de +// Submitted by Bjoern Henke +taifun-dns.de + +// TASK geographical domains (www.task.gda.pl/uslugi/dns) +gda.pl +gdansk.pl +gdynia.pl +med.pl +sopot.pl + +// Thingdust AG : https://thingdust.com/ +// Submitted by Adrian Imboden +cust.dev.thingdust.io +cust.disrec.thingdust.io +cust.prod.thingdust.io +cust.testing.thingdust.io + +// TownNews.com : http://www.townnews.com +// Submitted by Dustin Ward +bloxcms.com +townnews-staging.com + +// TrafficPlex GmbH : https://www.trafficplex.de/ +// Submitted by Phillipp Röll +12hp.at +2ix.at +4lima.at +lima-city.at +12hp.ch +2ix.ch +4lima.ch +lima-city.ch +trafficplex.cloud +de.cool +12hp.de +2ix.de +4lima.de +lima-city.de +1337.pictures +clan.rip +lima-city.rocks +webspace.rocks +lima.zone + +// TransIP : htts://www.transip.nl +// Submitted by Rory Breuk +*.transurl.be +*.transurl.eu +*.transurl.nl + +// TuxFamily : http://tuxfamily.org +// Submitted by TuxFamily administrators +tuxfamily.org + +// TwoDNS : https://www.twodns.de/ +// Submitted by TwoDNS-Support +dd-dns.de +diskstation.eu +diskstation.org +dray-dns.de +draydns.de +dyn-vpn.de +dynvpn.de +mein-vigor.de +my-vigor.de +my-wan.de +syno-ds.de +synology-diskstation.de +synology-ds.de + +// Uberspace : https://uberspace.de +// Submitted by Moritz Werner +uber.space + +// UDR Limited : http://www.udr.hk.com +// Submitted by registry +hk.com +hk.org +ltd.hk +inc.hk + +// .US +// Submitted by Ed Moore +lib.de.us + +// Viprinet Europe GmbH : http://www.viprinet.com +// Submitted by Simon Kissel +router.management + +// Virtual-Info : https://www.virtual-info.info/ +// Submitted by Adnan RIHAN +v-info.info + +// WeDeploy by Liferay, Inc. : https://www.wedeploy.com +// Submitted by Henrique Vicente +wedeploy.io +wedeploy.me +wedeploy.sh + +// Western Digital Technologies, Inc : https://www.wdc.com +// Submitted by Jung Jin +remotewd.com + +// Wikimedia Labs : https://wikitech.wikimedia.org +// Submitted by Yuvi Panda +wmflabs.org + +// XS4ALL Internet bv : https://www.xs4all.nl/ +// Submitted by Daniel Mostertman +cistron.nl +demon.nl +xs4all.space + +// Yola : https://www.yola.com/ +// Submitted by Stefano Rivera +yolasite.com + +// Yombo : https://yombo.net +// Submitted by Mitch Schwenk +ybo.faith +yombo.me +homelink.one +ybo.party +ybo.review +ybo.science +ybo.trade + // ZaNiC : http://www.za.net/ -// Submitted by registry 2009-10-03 +// Submitted by registry za.net za.org +// Zeit, Inc. : https://zeit.domains/ +// Submitted by Olli Vanhoja +now.sh + // ===END PRIVATE DOMAINS=== diff --git a/depcomp b/depcomp new file mode 100755 index 00000000..b39f98f9 --- /dev/null +++ b/depcomp @@ -0,0 +1,791 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2016-01-11.22; # UTC + +# Copyright (C) 1999-2017 Free Software Foundation, Inc. + +# 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, 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, see . + +# 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. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Avoid interferences from the environment. +gccflag= dashmflag= + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The second -e expression handles DOS-style file names with drive + # letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the "deleted header file" problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. +## Some versions of gcc put a space before the ':'. On the theory +## that the space means something, we add a space to the output as +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts '$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for ':' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + "$@" $dashmflag | + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/docs/Makefile.in b/docs/Makefile.in index c0a497b9..67e6a6c1 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,16 +88,17 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = docs -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/glibtests.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/intltool.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/glibtests.m4 $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/vapigen.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -147,6 +158,7 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -179,7 +191,6 @@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APACHE_HTTPD = @APACHE_HTTPD@ APACHE_MODULE_DIR = @APACHE_MODULE_DIR@ -APACHE_PHP_MODULE = @APACHE_PHP_MODULE@ APACHE_PHP_MODULE_DIR = @APACHE_PHP_MODULE_DIR@ APACHE_SSL_MODULE_DIR = @APACHE_SSL_MODULE_DIR@ AR = @AR@ @@ -191,6 +202,11 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL = @CURL@ @@ -206,6 +222,8 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ @@ -224,6 +242,7 @@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HAVE_GNOME = @HAVE_GNOME@ HTML_DIR = @HTML_DIR@ +IF_HAVE_MOD_UNIXD = @IF_HAVE_MOD_UNIXD@ IF_HAVE_PHP = @IF_HAVE_PHP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -246,6 +265,10 @@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +KRB5_CFLAGS = @KRB5_CFLAGS@ +KRB5_CONFIG = @KRB5_CONFIG@ +KRB5_LIBS = @KRB5_LIBS@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -254,6 +277,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -285,6 +309,7 @@ SOUP_AGE = @SOUP_AGE@ SOUP_API_VERSION = @SOUP_API_VERSION@ SOUP_CURRENT = @SOUP_CURRENT@ SOUP_DEBUG_FLAGS = @SOUP_DEBUG_FLAGS@ +SOUP_HIDDEN_VISIBILITY_CFLAGS = @SOUP_HIDDEN_VISIBILITY_CFLAGS@ SOUP_MAJOR_VERSION = @SOUP_MAJOR_VERSION@ SOUP_MICRO_VERSION = @SOUP_MICRO_VERSION@ SOUP_MINOR_VERSION = @SOUP_MINOR_VERSION@ @@ -293,6 +318,11 @@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ +VALAC = @VALAC@ +VAPIDIR = @VAPIDIR@ +VAPIGEN = @VAPIGEN@ +VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ +VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XML_CFLAGS = @XML_CFLAGS@ @@ -346,6 +376,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -370,7 +401,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign docs/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -665,6 +695,8 @@ uninstall-am: mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am index d47693a1..425d42e0 100644 --- a/docs/reference/Makefile.am +++ b/docs/reference/Makefile.am @@ -29,9 +29,9 @@ HFILE_GLOB= CFILE_GLOB= # Header files to ignore when scanning. -IGNORE_HFILES= soup.h soup-enum-types.h \ +IGNORE_HFILES= soup.h soup-autocleanups.h soup-enum-types.h \ soup-message-private.h soup-session-private.h \ - soup-auth-basic.h soup-auth-digest.h soup-auth-ntlm.h \ + soup-auth-basic.h soup-auth-digest.h soup-auth-ntlm.h soup-auth-negotiate.h \ soup-connection.h soup-connection-auth.h \ soup-message-queue.h soup-path-map.h soup-gnome-features.h \ soup-proxy-resolver.h soup-proxy-resolver-gnome.h \ @@ -45,7 +45,8 @@ IGNORE_HFILES= soup.h soup-enum-types.h \ soup-cookie-jar-sqlite.h soup-requester.h soup-tld-private.h \ soup-misc-private.h soup-proxy-uri-resolver.h \ soup-proxy-resolver-wrapper.h soup-proxy-uri-resolver.h \ - soup-cache-private.h + soup-cache-private.h soup-cache-client-input-stream.h \ + soup-socket-private.h soup-value-utils.h soup-xmlrpc-old.h # Images to copy into HTML directory. HTML_IMAGES = diff --git a/docs/reference/Makefile.in b/docs/reference/Makefile.in index dc68e8f4..76ee5213 100644 --- a/docs/reference/Makefile.in +++ b/docs/reference/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,12 +15,40 @@ @SET_MAKE@ # -*- mode: makefile -*- +# +# gtk-doc.make - make rules for gtk-doc +# Copyright (C) 2003 James Henstridge +# 2004-2007 Damon Chaplin +# 2007-2017 Stefan Sauer +# +# 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 3 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, see . #################################### # Everything below here is generic # #################################### VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,18 +111,18 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(top_srcdir)/gtk-doc.make $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am subdir = docs/reference ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/glibtests.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/intltool.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/glibtests.m4 $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/vapigen.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -119,6 +147,7 @@ am__can_run_installinfo = \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/gtk-doc.make DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ @@ -126,7 +155,6 @@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APACHE_HTTPD = @APACHE_HTTPD@ APACHE_MODULE_DIR = @APACHE_MODULE_DIR@ -APACHE_PHP_MODULE = @APACHE_PHP_MODULE@ APACHE_PHP_MODULE_DIR = @APACHE_PHP_MODULE_DIR@ APACHE_SSL_MODULE_DIR = @APACHE_SSL_MODULE_DIR@ AR = @AR@ @@ -138,6 +166,11 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL = @CURL@ @@ -153,6 +186,8 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ @@ -171,6 +206,7 @@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HAVE_GNOME = @HAVE_GNOME@ HTML_DIR = @HTML_DIR@ +IF_HAVE_MOD_UNIXD = @IF_HAVE_MOD_UNIXD@ IF_HAVE_PHP = @IF_HAVE_PHP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -193,6 +229,10 @@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +KRB5_CFLAGS = @KRB5_CFLAGS@ +KRB5_CONFIG = @KRB5_CONFIG@ +KRB5_LIBS = @KRB5_LIBS@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -201,6 +241,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -232,6 +273,7 @@ SOUP_AGE = @SOUP_AGE@ SOUP_API_VERSION = @SOUP_API_VERSION@ SOUP_CURRENT = @SOUP_CURRENT@ SOUP_DEBUG_FLAGS = @SOUP_DEBUG_FLAGS@ +SOUP_HIDDEN_VISIBILITY_CFLAGS = @SOUP_HIDDEN_VISIBILITY_CFLAGS@ SOUP_MAJOR_VERSION = @SOUP_MAJOR_VERSION@ SOUP_MICRO_VERSION = @SOUP_MICRO_VERSION@ SOUP_MINOR_VERSION = @SOUP_MINOR_VERSION@ @@ -240,6 +282,11 @@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ +VALAC = @VALAC@ +VAPIDIR = @VAPIDIR@ +VAPIGEN = @VAPIGEN@ +VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ +VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XML_CFLAGS = @XML_CFLAGS@ @@ -293,6 +340,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -331,9 +379,9 @@ HFILE_GLOB = CFILE_GLOB = # Header files to ignore when scanning. -IGNORE_HFILES = soup.h soup-enum-types.h \ +IGNORE_HFILES = soup.h soup-autocleanups.h soup-enum-types.h \ soup-message-private.h soup-session-private.h \ - soup-auth-basic.h soup-auth-digest.h soup-auth-ntlm.h \ + soup-auth-basic.h soup-auth-digest.h soup-auth-ntlm.h soup-auth-negotiate.h \ soup-connection.h soup-connection-auth.h \ soup-message-queue.h soup-path-map.h soup-gnome-features.h \ soup-proxy-resolver.h soup-proxy-resolver-gnome.h \ @@ -347,7 +395,8 @@ IGNORE_HFILES = soup.h soup-enum-types.h \ soup-cookie-jar-sqlite.h soup-requester.h soup-tld-private.h \ soup-misc-private.h soup-proxy-uri-resolver.h \ soup-proxy-resolver-wrapper.h soup-proxy-uri-resolver.h \ - soup-cache-private.h + soup-cache-private.h soup-cache-client-input-stream.h \ + soup-socket-private.h soup-value-utils.h soup-xmlrpc-old.h # Images to copy into HTML directory. @@ -394,6 +443,7 @@ GPATH = $(srcdir) TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ + $(expand_content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt @@ -402,9 +452,9 @@ EXTRA_DIST = \ $(HTML_IMAGES) \ $(SETUP_FILES) -DOC_STAMPS = setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ +DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ - tmpl.stamp sgml.stamp html.stamp pdf.stamp + sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ @@ -425,39 +475,34 @@ CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test @GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp #### setup #### -GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_$(V)) -GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_@AM_V@) +GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_@AM_DEFAULT_V@) GTK_DOC_V_SETUP_0 = @echo " DOC Preparing build"; #### scan #### -GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_$(V)) -GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_@AM_V@) +GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_@AM_DEFAULT_V@) GTK_DOC_V_SCAN_0 = @echo " DOC Scanning header files"; -GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_$(V)) -GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_@AM_V@) +GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_@AM_DEFAULT_V@) GTK_DOC_V_INTROSPECT_0 = @echo " DOC Introspecting gobjects"; -#### templates #### -GTK_DOC_V_TMPL = $(GTK_DOC_V_TMPL_$(V)) -GTK_DOC_V_TMPL_ = $(GTK_DOC_V_TMPL_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_TMPL_0 = @echo " DOC Rebuilding template files"; - #### xml #### -GTK_DOC_V_XML = $(GTK_DOC_V_XML_$(V)) -GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XML = $(GTK_DOC_V_XML_@AM_V@) +GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_@AM_DEFAULT_V@) GTK_DOC_V_XML_0 = @echo " DOC Building XML"; #### html #### -GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_$(V)) -GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_@AM_V@) +GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_@AM_DEFAULT_V@) GTK_DOC_V_HTML_0 = @echo " DOC Building HTML"; -GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_$(V)) -GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_@AM_V@) +GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_@AM_DEFAULT_V@) GTK_DOC_V_XREF_0 = @echo " DOC Fixing cross-references"; #### pdf #### -GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_$(V)) -GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_@AM_V@) +GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_@AM_DEFAULT_V@) GTK_DOC_V_PDF_0 = @echo " DOC Building PDF"; all: all-am @@ -474,7 +519,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__c echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/reference/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign docs/reference/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -483,7 +527,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/gtk-doc.make: +$(top_srcdir)/gtk-doc.make $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -656,6 +700,8 @@ uninstall-am: uninstall-local mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-local +.PRECIOUS: Makefile + gtkdoc-check.test: Makefile $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ @@ -673,66 +719,48 @@ $(REPORT_FILES): sgml-build.stamp setup-build.stamp: -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ - if test "x$$files" != "x" ; then \ - for file in $$files ; do \ - destdir=`dirname $(abs_builddir)/$$file` ;\ - test -d "$$destdir" || mkdir -p "$$destdir"; \ - test -f $(abs_srcdir)/$$file && \ - cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ - done; \ - fi; \ - test -d $(abs_srcdir)/tmpl && \ - { cp -pR $(abs_srcdir)/tmpl $(abs_builddir)/; \ - chmod -R u+w $(abs_builddir)/tmpl; } \ + files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ + if test "x$$files" != "x" ; then \ + for file in $$files ; do \ + destdir=`dirname $(abs_builddir)/$$file`; \ + test -d "$$destdir" || mkdir -p "$$destdir"; \ + test -f $(abs_srcdir)/$$file && \ + cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ + done; \ + fi; \ fi $(AM_V_at)touch setup-build.stamp scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ + _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ - scanobj_options=""; \ - gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$(?)" = "0"; then \ - if test "x$(V)" = "x1"; then \ - scanobj_options="--verbose"; \ - fi; \ + scanobj_options=""; \ + gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$$?" = "0"; then \ + if test "x$(V)" = "x1"; then \ + scanobj_options="--verbose"; \ fi; \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ - gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ + fi; \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ + gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ - for i in $(SCANOBJ_FILES) ; do \ - test -f $$i || touch $$i ; \ - done \ + for i in $(SCANOBJ_FILES) ; do \ + test -f $$i || touch $$i ; \ + done \ fi $(AM_V_at)touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true -tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt - $(GTK_DOC_V_TMPL)gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) - $(AM_V_at)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - if test -w $(abs_srcdir) ; then \ - cp -pR $(abs_builddir)/tmpl $(abs_srcdir)/; \ - fi \ - fi - $(AM_V_at)touch tmpl-build.stamp - -tmpl.stamp: tmpl-build.stamp - @true - -$(srcdir)/tmpl/*.sgml: - @true - -sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) - -$(GTK_DOC_V_XML)chmod -R u+w $(srcdir) && _source_dir='' ; \ +sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent + $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ + _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) $(AM_V_at)touch sgml-build.stamp @@ -740,37 +768,47 @@ sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $( sgml.stamp: sgml-build.stamp @true -html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) +$(DOC_MAIN_SGML_FILE): sgml-build.stamp + @true + +xml/gtkdocentities.ent: Makefile + $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ + echo ""; \ + echo ""; \ + echo ""; \ + echo ""; \ + echo ""; \ + echo ""; \ + echo ""; \ + ) > $@ + +html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$(?)" = "0"; then \ + if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ - if test "$(?)" = "0"; then \ + if test "$$?" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ - if test -f $(abs_srcdir)/$$file ; then \ - cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ - fi; \ - if test -f $(abs_builddir)/$$file ; then \ - cp $(abs_builddir)/$$file $(abs_builddir)/html; \ - fi; \ + test -f $(abs_srcdir)/$$file && cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ + test -f $(abs_builddir)/$$file && cp $(abs_builddir)/$$file $(abs_builddir)/html; \ done; $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) $(AM_V_at)touch html-build.stamp -pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) +pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$(?)" = "0"; then \ + if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ @@ -795,13 +833,15 @@ clean-local: @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ rm -f $(DOC_MODULE).types; \ fi + @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ + rm -f $(DOC_MODULE)-sections.txt; \ + fi distclean-local: @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ - rm -rf tmpl; \ + rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ fi maintainer-clean-local: @@ -848,9 +888,7 @@ uninstall-local: @HAVE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local - @mkdir $(distdir)/tmpl @mkdir $(distdir)/html - @-cp ./tmpl/*.sgml $(distdir)/tmpl @cp ./html/* $(distdir)/html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ diff --git a/docs/reference/html/SoupAddress.html b/docs/reference/html/SoupAddress.html index 87f4251d..1a8f8ae8 100644 --- a/docs/reference/html/SoupAddress.html +++ b/docs/reference/html/SoupAddress.html @@ -2,22 +2,22 @@ -libsoup Reference Manual: SoupAddress - +SoupAddress: libsoup Reference Manual + - + - + @@ -36,7 +36,7 @@

Functions

-
+
@@ -84,7 +84,7 @@ + stream =soup_session_send_finish(SOUP_SESSION(object), result, &error); + ... +}
-guint +guint soup_address_resolve_sync () @@ -92,7 +92,7 @@
-gboolean +gboolean soup_address_is_resolved () @@ -129,7 +129,7 @@
-guint +guint soup_address_get_port () @@ -137,7 +137,7 @@
-gboolean +gboolean soup_address_equal_by_name () @@ -145,7 +145,7 @@
-guint +guint soup_address_hash_by_name () @@ -153,7 +153,7 @@
-gboolean +gboolean soup_address_equal_by_ip () @@ -161,7 +161,7 @@
-guint +guint soup_address_hash_by_ip () @@ -172,7 +172,7 @@

Properties

-
+
@@ -186,29 +186,29 @@ +gchar * +gchar * - + +gchar * - + @@ -217,7 +217,7 @@

Types and Values

-
-gchar * name Read / Write / Construct Only
-gchar * physical Read
gintgint port Read / Write / Construct Only
-gchar * protocol Read / Write / Construct Only
gpointergpointer sockaddr Read / Write / Construct Only
+
@@ -264,7 +264,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupAddress
 
@@ -294,7 +294,7 @@ should not be used in new code; use GLib's GNetworkAddress

soup_address_new ()

SoupAddress *
 soup_address_new (const char *name,
-                  guint port);
+ guint port);

Creates a SoupAddress from name and port . The SoupAddress's IP @@ -302,8 +302,8 @@ address may not be available right away; the caller can call soup_address_resolve_async() or soup_address_resolve_sync() to force a DNS resolution.

-

Parameters

-
+

Parameters

+
@@ -324,9 +324,8 @@ force a DNS resolution.

-

Returns

+

Returns

a SoupAddress

-


@@ -336,12 +335,12 @@ force a DNS resolution.

soup_address_new_from_sockaddr (struct sockaddr *sa, int len);

Returns a SoupAddress equivalent to sa - (or NULL if sa + (or NULL if sa 's address family isn't supported)

-

Parameters

-
+

Parameters

+
@@ -363,9 +362,9 @@ address family isn't supported)

-

Returns

-

the new SoupAddress.

-

[allow-none]

+

Returns

+

the new SoupAddress.

+

[nullable]


@@ -373,15 +372,15 @@ address family isn't supported)

soup_address_new_any ()

SoupAddress *
 soup_address_new_any (SoupAddressFamily family,
-                      guint port);
+ guint port);

Returns a SoupAddress corresponding to the "any" address for family - (or NULL if family + (or NULL if family isn't supported), suitable for using as a listening SoupSocket.

-

Parameters

-
+

Parameters

+
@@ -402,9 +401,9 @@ using as a listening <
-

Returns

-

the new SoupAddress.

-

[allow-none]

+

Returns

+

the new SoupAddress.

+

[nullable]


@@ -412,12 +411,12 @@ using as a listening <

SoupAddressCallback ()

void
 (*SoupAddressCallback) (SoupAddress *addr,
-                        guint status,
-                        gpointer user_data);
+ guint status, + gpointer user_data);

The callback function passed to soup_address_resolve_async().

-

Parameters

-
+

Parameters

+
@@ -450,17 +449,17 @@ using as a listening <

soup_address_resolve_async ()

void
 soup_address_resolve_async (SoupAddress *addr,
-                            GMainContext *async_context,
+                            GMainContext *async_context,
                             GCancellable *cancellable,
                             SoupAddressCallback callback,
-                            gpointer user_data);
+ gpointer user_data);

Asynchronously resolves the missing half of addr (its IP address if it was created with soup_address_new(), or its hostname if it was created with soup_address_new_from_sockaddr() or soup_address_new_any().)

If cancellable - is non-NULL, it can be used to cancel the + is non-NULL, it can be used to cancel the resolution. callback will still be invoked in this case, with a status of SOUP_STATUS_CANCELLED.

@@ -472,8 +471,8 @@ call from multiple threads, or with different async_ , or mixed with calls to soup_address_resolve_sync().

-

Parameters

-
+

Parameters

+
@@ -487,18 +486,18 @@ mixed with calls to

async_context

-
- + - + - + @@ -514,14 +513,14 @@ from.


soup_address_resolve_sync ()

-
guint
+
guint
 soup_address_resolve_sync (SoupAddress *addr,
                            GCancellable *cancellable);

Synchronously resolves the missing half of addr , as with soup_address_resolve_async().

If cancellable - is non-NULL, it can be used to cancel the + is non-NULL, it can be used to cancel the resolution. soup_address_resolve_sync() will then return a status of SOUP_STATUS_CANCELLED.

It is safe to call this more than once, even from different @@ -529,8 +528,8 @@ threads, but it is not safe to mix calls to soup_address_resolve_sync() with calls to soup_address_resolve_async() on the same address.

-

Parameters

-

the GMainContext to call callback +

the GMainContext to call callback from.

[allow-none][allow-none]

cancellable

a GCancellable object, or NULL

a GCancellable object, or NULL

 

callback

callback to call with the result.

callback to call with the result.

[scope async]
+

Parameters

+
@@ -544,23 +543,22 @@ threads, but it is not safe to mix calls to - +

cancellable

a GCancellable object, or NULL

a GCancellable object, or NULL

 

soup_address_is_resolved ()

-
gboolean
+
gboolean
 soup_address_is_resolved (SoupAddress *addr);

Tests if addr has already been resolved. Unlike the other @@ -568,8 +566,8 @@ soup_address_is_resolved ( -

Parameters

-
+

Parameters

+
@@ -583,10 +581,9 @@ be being resolved in another thread.

-

Returns

-

TRUE if addr +

Returns

+

TRUE if addr has been resolved.

-


@@ -602,8 +599,8 @@ resolved in another thread, it may return garbage. You can use soup_address_is_resolved() to safely test whether or not an address is resolved before fetching its name or address.

-

Parameters

-
+

Parameters

+
@@ -617,9 +614,9 @@ is resolved before fetching its name or address.

-

Returns

-

the hostname, or NULL if it is not known.

-

[allow-none]

+

Returns

+

the hostname, or NULL if it is not known.

+

[nullable]


@@ -631,15 +628,15 @@ soup_address_get_sockaddr (addr , with its length in *len -. If the sockaddr is not yet known, returns NULL.

+. If the sockaddr is not yet known, returns NULL.

This method is not thread-safe; if you call it while addr is being resolved in another thread, it may return garbage. You can use soup_address_is_resolved() to safely test whether or not an address is resolved before fetching its name or address.

-

Parameters

-
+

Parameters

+
@@ -660,9 +657,9 @@ is resolved before fetching its name or address.

-

Returns

-

the sockaddr, or NULL.

-

[allow-none][transfer none]

+

Returns

+

the sockaddr, or NULL.

+

[nullable][transfer none]


@@ -674,8 +671,8 @@ soup_address_get_gsockaddr ( -

Parameters

-
+

Parameters

+
@@ -689,11 +686,11 @@ to only have one socket address associated with it).

-

Returns

-

a new GSocketAddress.

+

Returns

+

a new GSocketAddress.

[transfer full]

-

Since 2.32

+

Since: 2.32


@@ -702,15 +699,15 @@ to only have one socket address associated with it).

soup_address_get_physical (SoupAddress *addr);

Returns the physical address associated with addr as a string. -(Eg, "127.0.0.1"). If the address is not yet known, returns NULL.

+(Eg, "127.0.0.1"). If the address is not yet known, returns NULL.

This method is not thread-safe; if you call it while addr is being resolved in another thread, it may return garbage. You can use soup_address_is_resolved() to safely test whether or not an address is resolved before fetching its name or address.

-

Parameters

-
+

Parameters

+
@@ -724,21 +721,21 @@ is resolved before fetching its name or address.

-

Returns

-

the physical address, or NULL.

-

[allow-none]

+

Returns

+

the physical address, or NULL.

+

[nullable]


soup_address_get_port ()

-
guint
+
guint
 soup_address_get_port (SoupAddress *addr);

Returns the port associated with addr .

-

Parameters

-
+

Parameters

+
@@ -752,21 +749,20 @@ soup_address_get_port ( -

Returns

+

Returns

the port

-


soup_address_equal_by_name ()

-
gboolean
-soup_address_equal_by_name (gconstpointer addr1,
-                            gconstpointer addr2);
+
gboolean
+soup_address_equal_by_name (gconstpointer addr1,
+                            gconstpointer addr2);

Tests if addr1 and addr2 have the same "name". This method can be -used with soup_address_hash_by_name() to create a GHashTable that +used with soup_address_hash_by_name() to create a GHashTable that hashes on address "names".

Comparing by name normally means comparing the addresses by their hostnames. But if the address was originally created using an IP @@ -785,8 +781,8 @@ to be different hosts.

See also soup_address_equal_by_ip(), which compares by IP address rather than by name.

-

Parameters

-
+

Parameters

+
@@ -795,12 +791,12 @@ rather than by name.

- + - @@ -808,24 +804,23 @@ name.

addr1

a SoupAddress with a resolved name.

a SoupAddress with a resolved name.

[type Soup.Address]

addr2

another SoupAddress with a resolved +

another SoupAddress with a resolved name.

[type Soup.Address]
-

Returns

+

Returns

whether or not addr1 and addr2 have the same name

-

-

Since 2.26

+

Since: 2.26


soup_address_hash_by_name ()

-
guint
-soup_address_hash_by_name (gconstpointer addr);
-

A hash function (for GHashTable) that corresponds to +

guint
+soup_address_hash_by_name (gconstpointer addr);
+

A hash function (for GHashTable) that corresponds to soup_address_equal_by_name(), qv

-

Parameters

-
+

Parameters

+
@@ -833,30 +828,29 @@ soup_address_hash_by_name (

addr

-
+

a SoupAddress.

a SoupAddress.

[type Soup.Address]
-

Returns

+

Returns

the named-based hash value for addr .

-

-

Since 2.26

+

Since: 2.26


soup_address_equal_by_ip ()

-
gboolean
-soup_address_equal_by_ip (gconstpointer addr1,
-                          gconstpointer addr2);
+
gboolean
+soup_address_equal_by_ip (gconstpointer addr1,
+                          gconstpointer addr2);

Tests if addr1 and addr2 have the same IP address. This method can be used with soup_address_hash_by_ip() to create a -GHashTable that hashes on IP address.

+GHashTable that hashes on IP address.

This would be used to distinguish hosts in situations where different virtual hosts on the same IP address should be considered the same. Eg, if "www.example.com" and "www.example.net" have the @@ -865,8 +859,8 @@ to either of them.

See also soup_address_equal_by_name(), which compares by name rather than by IP address.

-

Parameters

-
+

Parameters

+
@@ -875,13 +869,13 @@ rather than by IP address.

- - @@ -889,25 +883,24 @@ IP address.

addr1

a SoupAddress with a resolved IP +

a SoupAddress with a resolved IP address.

[type Soup.Address]

addr2

another SoupAddress with a resolved +

another SoupAddress with a resolved IP address.

[type Soup.Address]
-

Returns

+

Returns

whether or not addr1 and addr2 have the same IP address.

-

-

Since 2.26

+

Since: 2.26


soup_address_hash_by_ip ()

-
guint
-soup_address_hash_by_ip (gconstpointer addr);
-

A hash function (for GHashTable) that corresponds to +

guint
+soup_address_hash_by_ip (gconstpointer addr);
+

A hash function (for GHashTable) that corresponds to soup_address_equal_by_ip(), qv

-

Parameters

-
+

Parameters

+
@@ -915,18 +908,17 @@ soup_address_hash_by_ip (

addr

-
+

a SoupAddress.

a SoupAddress.

[type Soup.Address]
-

Returns

+

Returns

the IP-based hash value for addr .

-

-

Since 2.26

+

Since: 2.26

@@ -934,16 +926,14 @@ soup_address_hash_by_ip (

SoupAddress

typedef struct _SoupAddress SoupAddress;
-

-


enum SoupAddressFamily

The supported address families.

-

Members

-
+

Members

+
@@ -1044,7 +1034,7 @@ used with this address.)


The “name” property

-
  “name”                     gchar *
+
  “name”                     gchar *

Hostname for this address.

Flags: Read / Write / Construct Only

Default value: NULL

@@ -1052,7 +1042,7 @@ used with this address.)


The “physical” property

-
  “physical”                 gchar *
+
  “physical”                 gchar *

IP address for this address.

Flags: Read

Default value: NULL

@@ -1060,7 +1050,7 @@ used with this address.)


The “port” property

-
  “port”                     gint
+
  “port”                     gint

Port for this address.

Flags: Read / Write / Construct Only

Allowed values: [-1,65535]

@@ -1069,7 +1059,7 @@ used with this address.)


The “protocol” property

-
  “protocol”                 gchar *
+
  “protocol”                 gchar *

URI scheme for this address.

Flags: Read / Write / Construct Only

Default value: NULL

@@ -1077,14 +1067,13 @@ used with this address.)


The “sockaddr” property

-
  “sockaddr”                 gpointer
+
  “sockaddr”                 gpointer

struct sockaddr for this address.

Flags: Read / Write / Construct Only

+
Generated by GTK-Doc V1.28.1
\ No newline at end of file diff --git a/docs/reference/html/SoupAuth.html b/docs/reference/html/SoupAuth.html index 794d1ff3..fb2a7a7d 100644 --- a/docs/reference/html/SoupAuth.html +++ b/docs/reference/html/SoupAuth.html @@ -2,21 +2,21 @@ -libsoup Reference Manual: SoupAuth - +SoupAuth: libsoup Reference Manual + - + -
+ @@ -35,7 +35,7 @@

Functions

-
+
@@ -51,27 +51,23 @@ - - - - - - - - - - + + + + + + - +status =soup_session_send_message(session, msg);
-gboolean +gboolean soup_auth_update ()
#defineSOUP_TYPE_AUTH_BASIC
#defineSOUP_TYPE_AUTH_DIGEST
#defineSOUP_TYPE_AUTH_NTLM +gboolean + +soup_auth_negotiate_supported () +
-gboolean +gboolean soup_auth_is_for_proxy () @@ -116,7 +112,15 @@
-gboolean +gboolean + +soup_auth_can_authenticate () +
+gboolean soup_auth_is_authenticated () @@ -124,7 +128,7 @@
-gboolean +gboolean soup_auth_is_ready () @@ -140,7 +144,7 @@
-GSList * +GSList * soup_auth_get_protection_space () @@ -159,7 +163,7 @@

Properties

-
+
@@ -168,29 +172,29 @@ +gchar * - + - + +gchar * +gchar * @@ -199,7 +203,7 @@

Types and Values

-
-gchar * host Read / Write
gbooleangboolean is-authenticated Read
gbooleangboolean is-for-proxy Read / Write
-gchar * realm Read / Write
-gchar * scheme-name Read
+
@@ -211,6 +215,22 @@ + + + + + + + + + + + + + + + + @@ -234,7 +254,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupAuth
 
@@ -254,7 +274,7 @@ given bit of web space. They are created automatically by

soup_auth_new ()

SoupAuth *
-soup_auth_new (GType type,
+soup_auth_new (GType type,
                SoupMessage *msg,
                const char *auth_header);

Creates a new SoupAuth of type type @@ -265,8 +285,8 @@ soup_auth_new (SoupSession; you will normally not create auths yourself.

-

Parameters

-
#defineSOUP_TYPE_AUTH_BASIC
#defineSOUP_TYPE_AUTH_DIGEST
#defineSOUP_TYPE_AUTH_NTLM
#defineSOUP_TYPE_AUTH_NEGOTIATE
#define SOUP_AUTH_SCHEME_NAME
+

Parameters

+
@@ -292,16 +312,16 @@ yourself.

-

Returns

-

the new SoupAuth, or NULL if it could not be -created

-

+

Returns

+

the new SoupAuth, or NULL if it could +not be created.

+

[nullable]


soup_auth_update ()

-
gboolean
+
gboolean
 soup_auth_update (SoupAuth *auth,
                   SoupMessage *msg,
                   const char *auth_header);
@@ -312,8 +332,8 @@ soup_auth_update (soup_auth_new(), this is normally only used by SoupSession.

-

Parameters

-
+

Parameters

+
@@ -340,59 +360,36 @@ is being updated for

-

Returns

-

TRUE if auth +

Returns

+

TRUE if auth is still a valid (but potentially -unauthenticated) SoupAuth. FALSE if something about auth_params +unauthenticated) SoupAuth. FALSE if something about auth_params could not be parsed or incorporated into auth at all.

-

-
-
-
-

SOUP_TYPE_AUTH_BASIC

-
#define SOUP_TYPE_AUTH_BASIC  (soup_auth_basic_get_type ())
-
-

A GType corresponding to HTTP "Basic" authentication. -SoupSessions support this by default; if you want to disable -support for it, call soup_session_remove_feature_by_type(), -passing SOUP_TYPE_AUTH_BASIC.

-

Since 2.34


-

SOUP_TYPE_AUTH_DIGEST

-
#define SOUP_TYPE_AUTH_DIGEST (soup_auth_digest_get_type ())
-
-

A GType corresponding to HTTP "Digest" authentication. -SoupSessions support this by default; if you want to disable -support for it, call soup_session_remove_feature_by_type(), -passing SOUP_TYPE_AUTH_DIGEST.

-

Since 2.34

-
-
-
-

SOUP_TYPE_AUTH_NTLM

-
#define SOUP_TYPE_AUTH_NTLM   (soup_auth_ntlm_get_type ())
-
-

A GType corresponding to HTTP-based NTLM authentication. -SoupSessions do not support this type by default; if you want to -enable support for it, call soup_session_add_feature_by_type(), -passing SOUP_TYPE_AUTH_NTLM.

-

Since 2.34

+

soup_auth_negotiate_supported ()

+
gboolean
+soup_auth_negotiate_supported (void);
+

Indicates whether libsoup was built with GSSAPI support. If this is +FALSE, SOUP_TYPE_AUTH_NEGOTIATE will still be defined and can +still be added to a SoupSession, but libsoup will never attempt to +actually use this auth type.

+

Since: 2.54


soup_auth_is_for_proxy ()

-
gboolean
+
gboolean
 soup_auth_is_for_proxy (SoupAuth *auth);

Tests whether or not auth is associated with a proxy server rather than an "origin" server.

-

Parameters

-
+

Parameters

+
@@ -406,9 +403,8 @@ than an "origin" server.

-

Returns

-

TRUE or FALSE

-

+

Returns

+

TRUE or FALSE


@@ -419,8 +415,8 @@ soup_auth_get_scheme_name (auth 's scheme name. (Eg, "Basic", "Digest", or "NTLM")

-

Parameters

-
+

Parameters

+
@@ -434,9 +430,8 @@ soup_auth_get_scheme_name ( -

Returns

+

Returns

the scheme name

-


@@ -447,8 +442,8 @@ soup_auth_get_host (auth is associated with.

-

Parameters

-
+

Parameters

+
@@ -462,9 +457,8 @@ soup_auth_get_host ( -

Returns

+

Returns

the hostname

-


@@ -478,8 +472,8 @@ separate authentication spaces on a given server, and may be some string that is meaningful to the user. (Although it is probably not localized.)

-

Parameters

-
+

Parameters

+
@@ -493,9 +487,8 @@ localized.)

-

Returns

+

Returns

the realm name

-


@@ -509,8 +502,8 @@ like. S identifier refer to the same authentication domain (eg, the URLs associated with them take the same usernames and passwords).

-

Parameters

-
+

Parameters

+
@@ -524,9 +517,8 @@ associated with them take the same usernames and passwords).

-

Returns

+

Returns

the identifier

-


@@ -539,8 +531,8 @@ soup_auth_authenticate ( -

Parameters

-
+

Parameters

+
@@ -568,14 +560,44 @@ the auth's message to be requeued with the new authentication info.


+

soup_auth_can_authenticate ()

+
gboolean
+soup_auth_can_authenticate (SoupAuth *auth);
+

Tests if auth + is able to authenticate by providing credentials to the +soup_auth_authenticate().

+
+

Parameters

+
+++++ + + + + + +

auth

a SoupAuth

 
+ +
+

Returns

+

TRUE if auth +is able to accept credentials.

+
+

Since: 2.54

+ +
+

soup_auth_is_authenticated ()

-
gboolean
+
gboolean
 soup_auth_is_authenticated (SoupAuth *auth);

Tests if auth has been given a username and password

-

Parameters

-
+

Parameters

+
@@ -589,16 +611,15 @@ soup_auth_is_authenticated ( -

Returns

-

TRUE if auth +

Returns

+

TRUE if auth has been given a username and password

-


soup_auth_is_ready ()

-
gboolean
+
gboolean
 soup_auth_is_ready (SoupAuth *auth,
                     SoupMessage *msg);

Tests if auth @@ -608,8 +629,8 @@ auths, this is equivalent to -

Parameters

-
+

Parameters

+
@@ -630,12 +651,11 @@ authentication request) even before it is authenticated.

-

Returns

-

TRUE if auth +

Returns

+

TRUE if auth is ready to make a request with.

-

-

Since 2.42

+

Since: 2.42


@@ -646,10 +666,10 @@ soup_auth_get_authorization (msg . (The session will only call this if soup_auth_is_authenticated() -returned TRUE.)

+returned TRUE.)

-

Parameters

-
+

Parameters

+
@@ -670,15 +690,14 @@ returned -

Returns

+

Returns

the "Authorization" header, which must be freed.

-


soup_auth_get_protection_space ()

-
GSList *
+
GSList *
 soup_auth_get_protection_space (SoupAuth *auth,
                                 SoupURI *source_uri);

Returns a list of paths on the server which auth @@ -688,8 +707,8 @@ of auth 's protection space, unless otherwise discovered not to be.)

-

Parameters

-
+

Parameters

+
@@ -712,8 +731,8 @@ response to.

-

Returns

-

the list of +

Returns

+

the list of paths, which can be freed with soup_auth_free_protection_space().

[element-type utf8][transfer full]

@@ -723,12 +742,13 @@ paths, which can be freed with

soup_auth_free_protection_space ()

void
 soup_auth_free_protection_space (SoupAuth *auth,
-                                 GSList *space);
+ GSList *space);

Frees space .

+

[skip]

-

Parameters

-
+

Parameters

+
@@ -762,6 +782,53 @@ being used.


+

SOUP_TYPE_AUTH_BASIC

+
#define SOUP_TYPE_AUTH_BASIC  (soup_auth_basic_get_type ())
+
+

A GType corresponding to HTTP "Basic" authentication. +SoupSessions support this by default; if you want to disable +support for it, call soup_session_remove_feature_by_type(), +passing SOUP_TYPE_AUTH_BASIC.

+

Since: 2.34

+
+
+
+

SOUP_TYPE_AUTH_DIGEST

+
#define SOUP_TYPE_AUTH_DIGEST (soup_auth_digest_get_type ())
+
+

A GType corresponding to HTTP "Digest" authentication. +SoupSessions support this by default; if you want to disable +support for it, call soup_session_remove_feature_by_type(), +passing SOUP_TYPE_AUTH_DIGEST.

+

Since: 2.34

+
+
+
+

SOUP_TYPE_AUTH_NTLM

+
#define SOUP_TYPE_AUTH_NTLM   (soup_auth_ntlm_get_type ())
+
+

A GType corresponding to HTTP-based NTLM authentication. +SoupSessions do not support this type by default; if you want to +enable support for it, call soup_session_add_feature_by_type(), +passing SOUP_TYPE_AUTH_NTLM.

+

Since: 2.34

+
+
+
+

SOUP_TYPE_AUTH_NEGOTIATE

+
#define SOUP_TYPE_AUTH_NEGOTIATE  (soup_auth_negotiate_get_type ())
+
+

A GType corresponding to HTTP-based GSS-Negotiate authentication. +SoupSessions do not support this type by default; if you want to +enable support for it, call soup_session_add_feature_by_type(), +passing SOUP_TYPE_AUTH_NEGOTIATE.

+

This auth type will only work if libsoup was compiled with GSSAPI +support; you can check soup_auth_negotiate_supported() to see if it +was.

+

Since: 2.54

+
+
+

SOUP_AUTH_SCHEME_NAME

#define SOUP_AUTH_SCHEME_NAME      "scheme-name"
 
@@ -805,7 +872,7 @@ or not the auth is for a proxy server.)

Property Details

The “host” property

-
  “host”                     gchar *
+
  “host”                     gchar *

Authentication host.

Flags: Read / Write

Default value: NULL

@@ -813,7 +880,7 @@ or not the auth is for a proxy server.)


The “is-authenticated” property

-
  “is-authenticated”         gboolean
+
  “is-authenticated”         gboolean

Whether or not the auth is authenticated.

Flags: Read

Default value: FALSE

@@ -821,7 +888,7 @@ or not the auth is for a proxy server.)


The “is-for-proxy” property

-
  “is-for-proxy”             gboolean
+
  “is-for-proxy”             gboolean

Whether or not the auth is for a proxy server.

Flags: Read / Write

Default value: FALSE

@@ -829,7 +896,7 @@ or not the auth is for a proxy server.)


The “realm” property

-
  “realm”                    gchar *
+
  “realm”                    gchar *

Authentication realm.

Flags: Read / Write

Default value: NULL

@@ -837,7 +904,7 @@ or not the auth is for a proxy server.)


The “scheme-name” property

-
  “scheme-name”              gchar *
+
  “scheme-name”              gchar *

Authentication scheme name.

Flags: Read

Default value: NULL

@@ -849,7 +916,6 @@ or not the auth is for a proxy server.)

+
Generated by GTK-Doc V1.28.1
\ No newline at end of file diff --git a/docs/reference/html/SoupAuthDomain.html b/docs/reference/html/SoupAuthDomain.html index db5ac04f..dcc3d3d2 100644 --- a/docs/reference/html/SoupAuthDomain.html +++ b/docs/reference/html/SoupAuthDomain.html @@ -2,21 +2,21 @@ -libsoup Reference Manual: SoupAuthDomain - +SoupAuthDomain: libsoup Reference Manual + - + -
+ @@ -35,7 +35,7 @@

Functions

-
+
@@ -59,7 +59,7 @@ - +
-gboolean +gboolean (*SoupAuthDomainFilter) () @@ -82,7 +82,7 @@
-gboolean +gboolean (*SoupAuthDomainGenericAuthCallback) () @@ -98,7 +98,7 @@
-gboolean +gboolean soup_auth_domain_check_password () @@ -106,7 +106,7 @@
-gboolean +gboolean soup_auth_domain_covers () @@ -133,7 +133,7 @@

Properties

-
+
@@ -142,44 +142,44 @@ +gchar * - + - + - + - + - + +gchar * +gchar * @@ -188,7 +188,7 @@

Types and Values

-
-gchar * add-path Write
gpointergpointer filter Read / Write
gpointergpointer filter-data Read / Write
gpointergpointer generic-auth-callback Read / Write
gpointergpointer generic-auth-data Read / Write
gbooleangboolean proxy Read / Write / Construct Only
-gchar * realm Read / Write / Construct Only
-gchar * remove-path Write
+
@@ -235,7 +235,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupAuthDomain
         ├── SoupAuthDomainBasic
         ╰── SoupAuthDomainDigest
@@ -282,8 +282,8 @@ server will require authentication (unless overridden by
 property, which can also be used to add one or more paths at
 construct time.

-

Parameters

-
+

Parameters

+
@@ -328,8 +328,8 @@ otherwise be unnecessary.

SOUP_AUTH_DOMAIN_REMOVE_PATH property, which can also be used to remove one or more paths at construct time.

-

Parameters

-
+

Parameters

+
@@ -354,15 +354,15 @@ remove one or more paths at construct time.


SoupAuthDomainFilter ()

-
gboolean
+
gboolean
 (*SoupAuthDomainFilter) (SoupAuthDomain *domain,
                          SoupMessage *msg,
-                         gpointer user_data);
+ gpointer user_data);

The prototype for a SoupAuthDomain filter; see soup_auth_domain_set_filter() for details.

-

Parameters

-
+

Parameters

+
@@ -388,10 +388,9 @@ remove one or more paths at construct time.

-

Returns

-

TRUE if msg -requires authentication, FALSE if not.

-

+

Returns

+

TRUE if msg +requires authentication, FALSE if not.


@@ -400,8 +399,8 @@ requires authentication, void soup_auth_domain_set_filter (SoupAuthDomain *domain, SoupAuthDomainFilter filter, - gpointer filter_data, - GDestroyNotify dnotify); + gpointer filter_data, + GDestroyNotify dnotify);

Adds filter as an authentication filter to domain . The filter @@ -409,16 +408,16 @@ gets a chance to bypass authentication for certain requests that would otherwise require it. Eg, it might check the message's path in some way that is too complicated to do via the other methods, or it might check the message's method, and allow GETs but not PUTs.

-

The filter function returns TRUE if the request should still -require authentication, or FALSE if authentication is unnecessary +

The filter function returns TRUE if the request should still +require authentication, or FALSE if authentication is unnecessary for this request.

-

To help prevent security holes, your filter should return TRUE by -default, and only return FALSE under specifically-tested +

To help prevent security holes, your filter should return TRUE by +default, and only return FALSE under specifically-tested circumstances, rather than the other way around. Eg, in the example above, where you want to authenticate PUTs but not GETs, you should -check if the method is GET and return FALSE in that case, and then -return TRUE for all other methods (rather than returning TRUE for -PUT and FALSE for all other methods). This way if it turned out +check if the method is GET and return FALSE in that case, and then +return TRUE for all other methods (rather than returning TRUE for +PUT and FALSE for all other methods). This way if it turned out (now or later) that some paths supported additional methods besides GET and PUT, those methods would default to being NOT allowed for unauthenticated users.

@@ -426,8 +425,8 @@ unauthenticated users.

and SOUP_AUTH_DOMAIN_FILTER_DATA properties, which can also be used to set the filter at construct time.

-

Parameters

-
+

Parameters

+
@@ -470,8 +469,8 @@ soup_auth_domain_get_realm (domain

-

Parameters

-
+

Parameters

+
@@ -485,20 +484,19 @@ soup_auth_domain_get_realm ( -

Returns

+

Returns

domain 's realm

-


SoupAuthDomainGenericAuthCallback ()

-
gboolean
+
gboolean
 (*SoupAuthDomainGenericAuthCallback) (SoupAuthDomain *domain,
                                       SoupMessage *msg,
                                       const char *username,
-                                      gpointer user_data);
+ gpointer user_data);

The prototype for a SoupAuthDomain generic authentication callback.

The callback should look up the user's password, call soup_auth_domain_check_password(), and use the return value from @@ -514,8 +512,8 @@ servers might be compromised as well. For many of the cases where SoupServer is used, this is not really relevant, but it may still be worth considering.

-

Parameters

-
+

Parameters

+
@@ -548,10 +546,9 @@ be worth considering.

-

Returns

-

TRUE if msg -is authenticated, FALSE if not.

-

+

Returns

+

TRUE if msg +is authenticated, FALSE if not.


@@ -561,8 +558,8 @@ is authenticated, SoupAuthDomain *domain
, SoupAuthDomainGenericAuthCallback auth_callback, - gpointer auth_data, - GDestroyNotify dnotify); + gpointer auth_data, + GDestroyNotify dnotify);

Sets auth_callback as an authentication-handling callback for domain @@ -573,8 +570,8 @@ authenticated via a domain-specific auth callback (eg, will be invoked. See SoupAuthDomainGenericAuthCallback for information on what the callback should do.

-

Parameters

-
+

Parameters

+
@@ -611,7 +608,7 @@ is destroyed


soup_auth_domain_check_password ()

-
gboolean
+
gboolean
 soup_auth_domain_check_password (SoupAuthDomain *domain,
                                  SoupMessage *msg,
                                  const char *username,
@@ -624,8 +621,8 @@ soup_auth_domain_check_password (SoupAuthDomainGenericAuthCallback.

-

Parameters

-
+

Parameters

+
@@ -656,15 +653,14 @@ soup_auth_domain_check_password (
-

Returns

+

Returns

whether or not the message is authenticated

-


soup_auth_domain_covers ()

-
gboolean
+
gboolean
 soup_auth_domain_covers (SoupAuthDomain *domain,
                          SoupMessage *msg);

Checks if domain @@ -677,8 +673,8 @@ or not it needs to be.

This is used by SoupServer internally and is probably of no use to anyone else.

-

Parameters

-
+

Parameters

+
@@ -699,11 +695,10 @@ anyone else.

-

Returns

-

TRUE if domain +

Returns

+

TRUE if domain requires msg to be authenticated

-


@@ -723,8 +718,8 @@ authorized.

This is used by SoupServer internally and is probably of no use to anyone else.

-

Parameters

-
+

Parameters

+
@@ -745,11 +740,11 @@ anyone else.

-

Returns

-

the username that msg -has authenticated as, if in -fact it has authenticated. NULL otherwise.

-

+

Returns

+

the username that msg +has authenticated +as, if in fact it has authenticated. NULL otherwise.

+

[nullable]


@@ -766,8 +761,8 @@ accordingly.

This is used by SoupServer internally and is probably of no use to anyone else.

-

Parameters

-
+

Parameters

+
@@ -794,8 +789,6 @@ anyone else.

SoupAuthDomain

typedef struct _SoupAuthDomain SoupAuthDomain;
-

-


@@ -866,7 +859,7 @@ to pass to the

Property Details

The “add-path” property

-
  “add-path”                 gchar *
+
  “add-path”                 gchar *

Add a path covered by this auth domain.

Flags: Write

Default value: NULL

@@ -874,35 +867,35 @@ to pass to the

The “filter” property

-
  “filter”                   gpointer
+
  “filter”                   gpointer

A filter for deciding whether or not to require authentication.

Flags: Read / Write


The “filter-data” property

-
  “filter-data”              gpointer
+
  “filter-data”              gpointer

Data to pass to filter.

Flags: Read / Write


The “generic-auth-callback” property

-
  “generic-auth-callback”    gpointer
+
  “generic-auth-callback”    gpointer

An authentication callback that can be used with any SoupAuthDomain subclass.

Flags: Read / Write


The “generic-auth-data” property

-
  “generic-auth-data”        gpointer
+
  “generic-auth-data”        gpointer

Data to pass to auth callback.

Flags: Read / Write


The “proxy” property

-
  “proxy”                    gboolean
+
  “proxy”                    gboolean

Whether or not this is a proxy auth domain.

Flags: Read / Write / Construct Only

Default value: FALSE

@@ -910,7 +903,7 @@ to pass to the

The “realm” property

-
  “realm”                    gchar *
+
  “realm”                    gchar *

The realm of this auth domain.

Flags: Read / Write / Construct Only

Default value: NULL

@@ -918,7 +911,7 @@ to pass to the

The “remove-path” property

-
  “remove-path”              gchar *
+
  “remove-path”              gchar *

Remove a path covered by this auth domain.

Flags: Write

Default value: NULL

@@ -930,7 +923,6 @@ to pass to the
+
Generated by GTK-Doc V1.28.1
\ No newline at end of file diff --git a/docs/reference/html/SoupAuthDomainBasic.html b/docs/reference/html/SoupAuthDomainBasic.html index ba7874fb..cef727f1 100644 --- a/docs/reference/html/SoupAuthDomainBasic.html +++ b/docs/reference/html/SoupAuthDomainBasic.html @@ -2,21 +2,21 @@ -libsoup Reference Manual: SoupAuthDomainBasic - +SoupAuthDomainBasic: libsoup Reference Manual + - + -
+ @@ -35,7 +35,7 @@

Functions

-
+
@@ -51,7 +51,7 @@

SoupAuthManager

typedef struct _SoupAuthManager SoupAuthManager;
-

-

+
+
+
+

SOUP_TYPE_AUTH_MANAGER

+
#define SOUP_TYPE_AUTH_MANAGER            (soup_auth_manager_get_type ())
+
+

The GType of SoupAuthManager; you can use this with +soup_session_remove_feature_by_type() or +soup_message_disable_feature().

+

(Although this type has only been publicly visible since libsoup +2.42, it has always existed in the background, and you can use +g_type_from_name ("SoupAuthManager") +to get its GType in earlier releases.)

+

Since: 2.42

@@ -193,16 +226,16 @@ is to be used

user_function (SoupAuthManager *manager, SoupMessage *msg, SoupAuth *auth, - gboolean retrying, - gpointer user_data) + gboolean retrying, + gpointer user_data)

Emitted when the manager requires the application to provide authentication credentials.

SoupSession connects to this signal and emits its own “authenticate” signal when it is emitted, so you shouldn't need to use this signal directly.

-

Parameters

-
-gboolean +gboolean (*SoupAuthDomainBasicAuthCallback) () @@ -70,7 +70,7 @@

Properties

-
+
@@ -78,12 +78,12 @@ - + - + @@ -92,7 +92,7 @@

Types and Values

-
gpointergpointer auth-callback Read / Write
gpointergpointer auth-data Read / Write
+
@@ -115,7 +115,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupAuthDomain
         ╰── SoupAuthDomainBasic
 
@@ -142,8 +142,8 @@ soup_auth_domain_basic_new (const
-

Parameters

-
+

Parameters

+
@@ -152,7 +152,7 @@ parameters are optional.

- + @@ -164,25 +164,24 @@ parameters are optional.

optname1

name of first option, or NULL

name of first option, or NULL

 
-

Returns

+

Returns

the new SoupAuthDomain

-


SoupAuthDomainBasicAuthCallback ()

-
gboolean
+
gboolean
 (*SoupAuthDomainBasicAuthCallback) (SoupAuthDomain *domain,
                                     SoupMessage *msg,
                                     const char *username,
                                     const char *password,
-                                    gpointer user_data);
+ gpointer user_data);

Callback used by SoupAuthDomainBasic for authentication purposes. The application should verify that username and password and valid -and return TRUE or FALSE.

+and return TRUE or FALSE.

If you are maintaining your own password database (rather than using the password to authenticate against some other system like PAM or a remote server), you should make sure you know what you are @@ -194,8 +193,8 @@ compromising any site with a cleartext (or easily-cracked) password database may give attackers access to other more-interesting sites as well.

-

Parameters

-
+

Parameters

+
@@ -231,11 +230,10 @@ as well.

-

Returns

-

TRUE if username +

Returns

+

TRUE if username and password are valid

-


@@ -245,8 +243,8 @@ are valid

soup_auth_domain_basic_set_auth_callback (SoupAuthDomain *domain, SoupAuthDomainBasicAuthCallback callback, - gpointer user_data, - GDestroyNotify dnotify); + gpointer user_data, + GDestroyNotify dnotify);

Sets the callback that domain will use to authenticate incoming requests. For each request containing authorization, domain @@ -259,8 +257,8 @@ based on callback SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA properties, which can also be used to set the callback at construct time.

-

Parameters

-
+

Parameters

+
@@ -300,8 +298,6 @@ is destroyed

SoupAuthDomainBasic

typedef struct _SoupAuthDomainBasic SoupAuthDomainBasic;
-

-


@@ -324,21 +320,20 @@ is destroyed

Property Details

The “auth-callback” property

-
  “auth-callback”            gpointer
+
  “auth-callback”            gpointer

Password-checking callback.

Flags: Read / Write


The “auth-data” property

-
  “auth-data”                gpointer
+
  “auth-data”                gpointer

Data to pass to authentication callback.

Flags: Read / Write

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupAuthDomainDigest.html b/docs/reference/html/SoupAuthDomainDigest.html index 90f63fc8..3e6f780f 100644 --- a/docs/reference/html/SoupAuthDomainDigest.html +++ b/docs/reference/html/SoupAuthDomainDigest.html @@ -2,21 +2,21 @@ -libsoup Reference Manual: SoupAuthDomainDigest - +SoupAuthDomainDigest: libsoup Reference Manual + - + -
+ @@ -35,7 +35,7 @@

Functions

-
+
@@ -78,7 +78,7 @@

Properties

-
+
@@ -86,12 +86,12 @@ - + - + @@ -100,7 +100,7 @@

Types and Values

-
gpointergpointer auth-callback Read / Write
gpointergpointer auth-data Read / Write
+
@@ -123,7 +123,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupAuthDomain
         ╰── SoupAuthDomainDigest
 
@@ -150,8 +150,8 @@ soup_auth_domain_digest_new (const -

Parameters

-
+

Parameters

+
@@ -160,7 +160,7 @@ parameters are optional.

- + @@ -172,9 +172,8 @@ parameters are optional.

optname1

name of first option, or NULL

name of first option, or NULL

 
-

Returns

+

Returns

the new SoupAuthDomain

-


@@ -184,15 +183,15 @@ parameters are optional.

(*SoupAuthDomainDigestAuthCallback) (SoupAuthDomain *domain, SoupMessage *msg, const char *username, - gpointer user_data); + gpointer user_data);

Callback used by SoupAuthDomainDigest for authentication purposes. The application should look up username in its password database, and return the corresponding encoded password (see soup_auth_domain_digest_encode_password()).

-

Parameters

-
+

Parameters

+
@@ -223,12 +222,13 @@ and return the corresponding encoded password (see
-

Returns

-

the encoded password, or NULL if username -is not a -valid user. domain -will free the password when it is done with it.

-

+

Returns

+

the encoded password, or NULL if +username +is not a valid user. domain +will free the password when +it is done with it.

+

[nullable]


@@ -238,8 +238,8 @@ will free the password when it is done with it.

soup_auth_domain_digest_set_auth_callback (SoupAuthDomain *domain, SoupAuthDomainDigestAuthCallback callback, - gpointer user_data, - GDestroyNotify dnotify); + gpointer user_data, + GDestroyNotify dnotify);

Sets the callback that domain will use to authenticate incoming requests. For each request containing authorization, domain @@ -252,8 +252,8 @@ based on callback SOUP_AUTH_DOMAIN_DIGEST_AUTH_DATA properties, which can also be used to set the callback at construct time.

-

Parameters

-
+

Parameters

+
@@ -311,8 +311,8 @@ passwords which might also be usable at other sites. (Note also that the encoded password returned by this method is identical to the encoded password stored in an Apache .htdigest file.)

-

Parameters

-
+

Parameters

+
@@ -340,9 +340,8 @@ in realm
-

Returns

+

Returns

the encoded password

-

@@ -351,8 +350,6 @@ in realm

SoupAuthDomainDigest

typedef struct _SoupAuthDomainDigest SoupAuthDomainDigest;
-

-


@@ -375,21 +372,20 @@ in realm

Property Details

The “auth-callback” property

-
  “auth-callback”            gpointer
+
  “auth-callback”            gpointer

Password-finding callback.

Flags: Read / Write


The “auth-data” property

-
  “auth-data”                gpointer
+
  “auth-data”                gpointer

Data to pass to authentication callback.

Flags: Read / Write

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupAuthManager.html b/docs/reference/html/SoupAuthManager.html index 537ce8ee..62839636 100644 --- a/docs/reference/html/SoupAuthManager.html +++ b/docs/reference/html/SoupAuthManager.html @@ -2,22 +2,22 @@ -libsoup Reference Manual: SoupAuthManager - +SoupAuthManager: libsoup Reference Manual + - + - + @@ -36,22 +36,26 @@

Functions

-
+
- - + + @@ -59,7 +63,7 @@

Signals

-
#defineSOUP_TYPE_AUTH_MANAGER +void + +soup_auth_manager_use_auth () +
void -soup_auth_manager_use_auth () +soup_auth_manager_clear_cached_credentials ()
+
@@ -68,26 +72,32 @@ - +
void authenticateRun FirstRun First

Types and Values

-
+
- + + - + + + + + +
  SoupAuthManager
#defineSOUP_TYPE_AUTH_MANAGER

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupAuthManager
 
@@ -115,20 +125,6 @@ individual requests with

Functions

-

SOUP_TYPE_AUTH_MANAGER

-
#define SOUP_TYPE_AUTH_MANAGER            (soup_auth_manager_get_type ())
-
-

The GType of SoupAuthManager; you can use this with -soup_session_remove_feature_by_type() or -soup_message_disable_feature().

-

(Although this type has only been publicly visible since libsoup -2.42, it has always existed in the background, and you can use -g_type_from_name ("SoupAuthManager") -to get its GType in earlier releases.)

-

Since 2.42

-
-
-

soup_auth_manager_use_auth ()

void
 soup_auth_manager_use_auth (SoupAuthManager *manager,
@@ -146,8 +142,8 @@ response will be returned.

Authorization header does not depend on any additional information from the server. (Eg, Basic or NTLM, but not Digest.)

-

Parameters

-
+

Parameters

+
@@ -173,7 +169,32 @@ is to be used

-

Since 2.42

+

Since: 2.42

+
+
+
+

soup_auth_manager_clear_cached_credentials ()

+
void
+soup_auth_manager_clear_cached_credentials
+                               (SoupAuthManager *manager);
+

Clear all credentials cached by manager +

+
+

Parameters

+
+++++ + + + + + +

manager

a SoupAuthManager

 
+
+

Since: 2.58

@@ -181,8 +202,20 @@ is to be used

+

Parameters

+
@@ -226,7 +259,7 @@ you shouldn't need to use this signal directly.

- + @@ -237,7 +270,7 @@ you shouldn't need to use this signal directly.

retrying

TRUE if this is the second (or later) attempt

TRUE if this is the second (or later) attempt

 
-

Flags: Run First

+

Flags: Run First

@@ -246,7 +279,6 @@ you shouldn't need to use this signal directly.

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupCache.html b/docs/reference/html/SoupCache.html index 31aeacf0..e1122014 100644 --- a/docs/reference/html/SoupCache.html +++ b/docs/reference/html/SoupCache.html @@ -2,22 +2,22 @@ -libsoup Reference Manual: SoupCache - +SoupCache: libsoup Reference Manual + - + - + @@ -36,7 +36,7 @@

Functions

-
+
@@ -84,7 +84,7 @@

soup_message_disable_feature ()

void
 soup_message_disable_feature (SoupMessage *msg,
-                              GType feature_type);
+ GType feature_type);

This disables the actions of SoupSessionFeatures with the given feature_type (or a subclass of that type) on msg @@ -1523,8 +1437,8 @@ a message that has already been queued is undefined. In particular, you cannot call this on a message that is being requeued after a redirect or authentication.

-

Parameters

-
-guint +guint soup_cache_get_max_size () @@ -103,7 +103,7 @@

Properties

-
+
@@ -112,7 +112,7 @@ +gchar * @@ -126,7 +126,7 @@

Types and Values

-
-gchar * cache-dir Read / Write / Construct Only
+
@@ -145,7 +145,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupCache
 
@@ -173,8 +173,8 @@ soup_cache_new (const char SoupCacheType cache_type);

Creates a new SoupCache.

-

Parameters

-
+

Parameters

+
@@ -183,8 +183,11 @@ soup_cache_new (const char - - + + @@ -195,11 +198,10 @@ soup_cache_new (const char

cache_dir

the directory to store the cached data, or NULL to use the default one

 

the directory to store the cached data, or NULL +to use the default one. Note that since the cache isn't safe to access for +multiple processes at once, and the default directory isn't namespaced by +process, clients are strongly discouraged from passing NULL.

[allow-none]

cache_type

-

Returns

+

Returns

a new SoupCache

-

-

Since 2.34

+

Since: 2.34


@@ -208,14 +210,14 @@ soup_cache_new (const char soup_cache_flush (SoupCache *cache);

This function will force all pending writes in the cache to be -committed to disk. For doing so it will iterate the GMainContext +committed to disk. For doing so it will iterate the GMainContext associated with cache 's session as long as needed.

Contrast with soup_cache_dump(), which writes out the cache index file.

-

Parameters

-
+

Parameters

+
@@ -228,7 +230,7 @@ file.

-

Since 2.34

+

Since: 2.34


@@ -238,8 +240,8 @@ soup_cache_clear (cache plus all the cache files.

-

Parameters

-
+

Parameters

+
@@ -252,7 +254,7 @@ soup_cache_clear (Since 2.34

+

Since: 2.34


+

Parameters

+
@@ -279,7 +281,7 @@ persist between sessions.

-

Since 2.34.

+

Since: 2.34.


@@ -289,8 +291,8 @@ soup_cache_load (cache 's index into memory.

-

Parameters

-
+

Parameters

+
@@ -303,17 +305,17 @@ soup_cache_load (Since 2.34

+

Since: 2.34


soup_cache_get_max_size ()

-
guint
+
guint
 soup_cache_get_max_size (SoupCache *cache);

Gets the maximum size of the cache.

-

Parameters

-
+

Parameters

+
@@ -327,22 +329,21 @@ soup_cache_get_max_size ( -

Returns

+

Returns

the maximum size of the cache, in bytes.

-

-

Since 2.34

+

Since: 2.34


soup_cache_set_max_size ()

void
 soup_cache_set_max_size (SoupCache *cache,
-                         guint max_size);
+ guint max_size);

Sets the maximum size of the cache.

-

Parameters

-
+

Parameters

+
@@ -362,7 +363,7 @@ soup_cache_set_max_size (Since 2.34

+

Since: 2.34

@@ -370,8 +371,6 @@ soup_cache_set_max_size (

struct SoupCache

struct SoupCache;
-

-


@@ -379,8 +378,8 @@ soup_cache_set_max_size ( -

Members

-
+

Members

+
@@ -404,14 +403,14 @@ saved.

-

Since 2.34

+

Since: 2.34

Property Details

The “cache-dir” property

-
  “cache-dir”                gchar *
+
  “cache-dir”                gchar *

The directory to store the cache files.

Flags: Read / Write / Construct Only

Default value: NULL

@@ -427,7 +426,6 @@ saved.

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupContentDecoder.html b/docs/reference/html/SoupContentDecoder.html index 27875a03..9082cb93 100644 --- a/docs/reference/html/SoupContentDecoder.html +++ b/docs/reference/html/SoupContentDecoder.html @@ -2,21 +2,21 @@ -libsoup Reference Manual: SoupContentDecoder - +SoupContentDecoder: libsoup Reference Manual + - + - + @@ -35,7 +35,7 @@

Types and Values

-
+
@@ -48,7 +48,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupContentDecoder
 
@@ -92,19 +92,17 @@ encoding types to support.)

Functions

+

Types and Values

SoupContentDecoder

typedef struct _SoupContentDecoder SoupContentDecoder;
-

-

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupContentSniffer.html b/docs/reference/html/SoupContentSniffer.html index 2cdde7cf..7bfe8abf 100644 --- a/docs/reference/html/SoupContentSniffer.html +++ b/docs/reference/html/SoupContentSniffer.html @@ -2,21 +2,21 @@ -libsoup Reference Manual: SoupContentSniffer - +SoupContentSniffer: libsoup Reference Manual + - + -
+ @@ -35,7 +35,7 @@

Functions

-
+
@@ -59,7 +59,7 @@

SoupCookieJarText

typedef struct _SoupCookieJarText SoupCookieJarText;
-

-


@@ -179,7 +176,7 @@ cookie-storage filename.)

Property Details

The “filename” property

-
  “filename”                 gchar *
+
  “filename”                 gchar *

Cookie-storage filename.

Flags: Read / Write / Construct Only

Default value: NULL

@@ -187,7 +184,6 @@ cookie-storage filename.)

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupLogger.html b/docs/reference/html/SoupLogger.html index fdfcf5d3..7ed95d3a 100644 --- a/docs/reference/html/SoupLogger.html +++ b/docs/reference/html/SoupLogger.html @@ -2,22 +2,23 @@ -libsoup Reference Manual: SoupLogger - +SoupLogger: libsoup Reference Manual + - + -
-gsize +gsize soup_content_sniffer_get_buffer_size () @@ -70,7 +70,7 @@

Types and Values

-
+
@@ -83,7 +83,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupContentSniffer
 
@@ -115,11 +115,10 @@ content sniffing to a session with void);

Creates a new SoupContentSniffer.

-

Returns

+

Returns

a new SoupContentSniffer

-

-

Since 2.28

+

Since: 2.28


@@ -128,15 +127,15 @@ soup_content_sniffer_new (voidSoupContentSniffer *sniffer, SoupMessage *msg, SoupBuffer *buffer, - GHashTable **params); + GHashTable **params);

Sniffs buffer to determine its Content-Type. The result may also be influenced by the Content-Type declared in msg 's response headers.

-

Parameters

-
+

Parameters

+
@@ -161,33 +160,32 @@ headers.

- - + +

params

return -location for Content-Type parameters (eg, "charset"), or NULL.

[element-type utf8 utf8][out][transfer full][allow-none]

return +location for Content-Type parameters (eg, "charset"), or NULL.

[element-type utf8 utf8][out][transfer full][allow-none]
-

Returns

+

Returns

the sniffed Content-Type of buffer -; this will never be NULL, +; this will never be NULL, but may be "application/octet-stream".

-

-

Since 2.28

+

Since: 2.28


soup_content_sniffer_get_buffer_size ()

-
gsize
+
gsize
 soup_content_sniffer_get_buffer_size (SoupContentSniffer *sniffer);

Gets the number of bytes sniffer needs in order to properly sniff a buffer.

-

Parameters

-
+

Parameters

+
@@ -201,11 +199,10 @@ a buffer.

-

Returns

+

Returns

the number of bytes to sniff

-

-

Since 2.28

+

Since: 2.28

@@ -213,13 +210,10 @@ a buffer.

SoupContentSniffer

typedef struct _SoupContentSniffer SoupContentSniffer;
-

-

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupCookie.html b/docs/reference/html/SoupCookie.html index f4c2dbdb..45f6443d 100644 --- a/docs/reference/html/SoupCookie.html +++ b/docs/reference/html/SoupCookie.html @@ -2,20 +2,20 @@ -libsoup Reference Manual: SoupCookie - +SoupCookie: libsoup Reference Manual + - + - + @@ -34,7 +34,7 @@

Functions

-
+
@@ -141,22 +141,6 @@ - - - - - - - - - - - - - - - - @@ -182,7 +166,7 @@ +
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupCookieJar.html b/docs/reference/html/SoupCookieJar.html index 45413d39..1b322e8a 100644 --- a/docs/reference/html/SoupCookieJar.html +++ b/docs/reference/html/SoupCookieJar.html @@ -2,23 +2,23 @@ -libsoup Reference Manual: SoupCookieJar - +SoupCookieJar: libsoup Reference Manual + - + -
#defineSOUP_COOKIE_MAX_AGE_ONE_HOUR
#defineSOUP_COOKIE_MAX_AGE_ONE_DAY
#defineSOUP_COOKIE_MAX_AGE_ONE_WEEK
#defineSOUP_COOKIE_MAX_AGE_ONE_YEAR
void
-gboolean +gboolean soup_cookie_get_secure () @@ -198,7 +182,7 @@
-gboolean +gboolean soup_cookie_get_http_only () @@ -206,7 +190,7 @@
-gboolean +gboolean soup_cookie_applies_to_uri () @@ -214,7 +198,7 @@
-gboolean +gboolean soup_cookie_domain_matches () @@ -238,7 +222,7 @@
-GSList * +GSList * soup_cookies_from_request () @@ -246,7 +230,7 @@
-GSList * +GSList * soup_cookies_from_response () @@ -289,20 +273,38 @@

Types and Values

-

Object Hierarchy

-
    GBoxed
+
    GBoxed
     ╰── SoupCookie
 
@@ -346,8 +348,8 @@ multiples thereof) to calculate this value. (If you really care about setting the exact time that the cookie will expire, use soup_cookie_set_expires().)

-

Parameters

-
+

Parameters

+
@@ -371,7 +373,7 @@ about setting the exact time that the cookie will expire, use - + @@ -383,11 +385,10 @@ about setting the exact time that the cookie will expire, use

path

cookie path, or NULL

cookie path, or NULL

 
-

Returns

+

Returns

a new SoupCookie.

-

-

Since 2.24

+

Since: 2.24


@@ -403,14 +404,14 @@ multiple cookies, only the first one will be parsed.)

does not have "path" or "domain" attributes, they will be defaulted from origin . If origin - is NULL, path will default -to "/", but domain will be left as NULL. Note that this is not a + is NULL, path will default +to "/", but domain will be left as NULL. Note that this is not a valid state for a SoupCookie, and you will need to fill in some appropriate string for the domain if you want to actually make use of the cookie.

-

Parameters

-
+

Parameters

+
@@ -424,21 +425,21 @@ of the cookie.

- +

origin

origin of the cookie, or NULL

origin of the cookie, or NULL

 
-

Returns

-

a new SoupCookie, or NULL if it could not be -parsed, or contained an illegal "domain" attribute for a cookie -originating from origin -.

-

+

Returns

+

a new SoupCookie, or NULL if it could +not be parsed, or contained an illegal "domain" attribute for a +cookie originating from origin +.

+

[nullable]

-

Since 2.24

+

Since: 2.24


@@ -448,8 +449,8 @@ soup_cookie_copy (cookie .

-

Parameters

-
+

Parameters

+
@@ -463,12 +464,11 @@ soup_cookie_copy ( -

Returns

+

Returns

a copy of cookie

-

-

Since 2.24

+

Since: 2.24


@@ -478,8 +478,8 @@ soup_cookie_free (cookie

-

Parameters

-
+

Parameters

+
@@ -492,7 +492,7 @@ soup_cookie_free (Since 2.24

+

Since: 2.24


+

Parameters

+
@@ -525,7 +525,7 @@ soup_cookie_set_name (Since 2.24

+

Since: 2.24


+

Parameters

+
@@ -550,12 +550,11 @@ soup_cookie_get_name ( -

Returns

+

Returns

cookie 's name

-

-

Since 2.32

+

Since: 2.32


@@ -567,8 +566,8 @@ soup_cookie_set_value (value

-

Parameters

-
+

Parameters

+
@@ -588,7 +587,7 @@ soup_cookie_set_value (Since 2.24

+

Since: 2.24


+

Parameters

+
@@ -613,12 +612,11 @@ soup_cookie_get_value ( -

Returns

+

Returns

cookie 's value

-

-

Since 2.32

+

Since: 2.32


@@ -630,8 +628,8 @@ soup_cookie_set_domain (domain

-

Parameters

-
+

Parameters

+
@@ -651,7 +649,7 @@ soup_cookie_set_domain (Since 2.24

+

Since: 2.24


+

Parameters

+
@@ -676,12 +674,11 @@ soup_cookie_get_domain ( -

Returns

+

Returns

cookie 's domain

-

-

Since 2.32

+

Since: 2.32


@@ -693,8 +690,8 @@ soup_cookie_set_path (path

-

Parameters

-
+

Parameters

+
@@ -714,7 +711,7 @@ soup_cookie_set_path (Since 2.24

+

Since: 2.24


+

Parameters

+
@@ -739,12 +736,11 @@ soup_cookie_get_path ( -

Returns

+

Returns

cookie 's path

-

-

Since 2.32

+

Since: 2.32


@@ -765,8 +761,8 @@ this value. (A value of 0 indicates that the cookie should be considered already-expired.)

(This sets the same property as soup_cookie_set_expires().)

-

Parameters

-
+

Parameters

+
@@ -786,43 +782,7 @@ considered already-expired.)

-

Since 2.24

-
-
-
-

SOUP_COOKIE_MAX_AGE_ONE_HOUR

-
#define SOUP_COOKIE_MAX_AGE_ONE_HOUR (60 * 60)
-
-

A constant corresponding to 1 hour, for use with soup_cookie_new() -and soup_cookie_set_max_age().

-

Since 2.24

-
-
-
-

SOUP_COOKIE_MAX_AGE_ONE_DAY

-
#define SOUP_COOKIE_MAX_AGE_ONE_DAY  (SOUP_COOKIE_MAX_AGE_ONE_HOUR * 24)
-
-

A constant corresponding to 1 day, for use with soup_cookie_new() -and soup_cookie_set_max_age().

-

Since 2.24

-
-
-
-

SOUP_COOKIE_MAX_AGE_ONE_WEEK

-
#define SOUP_COOKIE_MAX_AGE_ONE_WEEK (SOUP_COOKIE_MAX_AGE_ONE_DAY * 7)
-
-

A constant corresponding to 1 week, for use with soup_cookie_new() -and soup_cookie_set_max_age().

-

Since 2.24

-
-
-
-

SOUP_COOKIE_MAX_AGE_ONE_YEAR

-
#define SOUP_COOKIE_MAX_AGE_ONE_YEAR (SOUP_COOKIE_MAX_AGE_ONE_DAY * 365.2422)
-
-

A constant corresponding to 1 year, for use with soup_cookie_new() -and soup_cookie_set_max_age().

-

Since 2.24

+

Since: 2.24


@@ -833,14 +793,14 @@ soup_cookie_set_expires (cookie 's expiration time to expires . If expires - is NULL, + is NULL, cookie will be a session cookie and will expire at the end of the client's session.

(This sets the same property as soup_cookie_set_max_age().)

-

Parameters

-
+

Parameters

+
@@ -854,13 +814,13 @@ client's session.

- +

expires

the new expiration time, or NULL

the new expiration time, or NULL

 
-

Since 2.24

+

Since: 2.24


@@ -868,10 +828,10 @@ client's session.

SoupDate *
 soup_cookie_get_expires (SoupCookie *cookie);

Gets cookie -'s expiration time

+'s expiration time.

-

Parameters

-
+

Parameters

+
@@ -885,30 +845,31 @@ soup_cookie_get_expires ( -

Returns

-

cookie -'s expiration time, which is -owned by cookie -and should not be modified or freed.

-

[transfer none]

+

Returns

+

cookie +'s expiration +time, which is owned by cookie +and should not be modified or +freed.

+

[nullable][transfer none]

-

Since 2.32

+

Since: 2.32


soup_cookie_set_secure ()

void
 soup_cookie_set_secure (SoupCookie *cookie,
-                        gboolean secure);
+ gboolean secure);

Sets cookie 's secure attribute to secure -. If TRUE, cookie +. If TRUE, cookie will only be transmitted from the client to the server over secure (https) connections.

-

Parameters

-
+

Parameters

+
@@ -928,18 +889,18 @@ only be transmitted from the client to the server over secure
-

Since 2.24

+

Since: 2.24


soup_cookie_get_secure ()

-
gboolean
+
gboolean
 soup_cookie_get_secure (SoupCookie *cookie);

Gets cookie 's secure attribute

-

Parameters

-
+

Parameters

+
@@ -953,28 +914,27 @@ soup_cookie_get_secure ( -

Returns

+

Returns

cookie 's secure attribute

-

-

Since 2.32

+

Since: 2.32


soup_cookie_set_http_only ()

void
 soup_cookie_set_http_only (SoupCookie *cookie,
-                           gboolean http_only);
+ gboolean http_only);

Sets cookie 's HttpOnly attribute to http_only -. If TRUE, cookie +. If TRUE, cookie will be marked as "http only", meaning it should not be exposed to web page scripts or other untrusted code.

-

Parameters

-
+

Parameters

+
@@ -994,18 +954,18 @@ web page scripts or other untrusted code.

-

Since 2.24

+

Since: 2.24


soup_cookie_get_http_only ()

-
gboolean
+
gboolean
 soup_cookie_get_http_only (SoupCookie *cookie);

Gets cookie 's HttpOnly attribute

-

Parameters

-
+

Parameters

+
@@ -1019,17 +979,16 @@ soup_cookie_get_http_only ( -

Returns

+

Returns

cookie 's HttpOnly attribute

-

-

Since 2.32

+

Since: 2.32


soup_cookie_applies_to_uri ()

-
gboolean
+
gboolean
 soup_cookie_applies_to_uri (SoupCookie *cookie,
                             SoupURI *uri);

Tests if cookie @@ -1041,8 +1000,8 @@ soup_cookie_applies_to_uri ( -

Parameters

-
+

Parameters

+
@@ -1063,19 +1022,18 @@ But don't rely on that; it may change in the future.)

-

Returns

-

TRUE if cookie +

Returns

+

TRUE if cookie should be sent to uri -, FALSE if +, FALSE if not

-

-

Since 2.24

+

Since: 2.24


soup_cookie_domain_matches ()

-
gboolean
+
gboolean
 soup_cookie_domain_matches (SoupCookie *cookie,
                             const char *host);

Checks if the cookie @@ -1088,8 +1046,8 @@ soup_cookie_domain_matches (host .

-

Parameters

-
+

Parameters

+
@@ -1110,11 +1068,10 @@ soup_cookie_domain_matches ( -

Returns

-

TRUE if the domains match, FALSE otherwise

-

+

Returns

+

TRUE if the domains match, FALSE otherwise

-

Since 2.30

+

Since: 2.30


@@ -1125,8 +1082,8 @@ soup_cookie_to_cookie_header (SoupSession to a server).

-

Parameters

-
+

Parameters

+
@@ -1140,11 +1097,10 @@ returning a cookie from a -

Returns

+

Returns

the header

-

-

Since 2.24

+

Since: 2.24


@@ -1155,8 +1111,8 @@ soup_cookie_to_set_cookie_header (SoupServer to a client).

-

Parameters

-
+

Parameters

+
@@ -1170,27 +1126,26 @@ soup_cookie_to_set_cookie_header (
-

Returns

+

Returns

the header

-

-

Since 2.24

+

Since: 2.24


soup_cookies_from_request ()

-
GSList *
+
GSList *
 soup_cookies_from_request (SoupMessage *msg);

Parses msg -'s Cookie request header and returns a GSList of +'s Cookie request header and returns a GSList of SoupCookies. As the "Cookie" header, unlike "Set-Cookie", only contains cookie names and values, none of the other SoupCookie fields will be filled in. (Thus, you can't generally pass a cookie returned from this method directly to soup_cookies_to_response().)

-

Parameters

-
+

Parameters

+
@@ -1204,27 +1159,27 @@ pass a cookie returned from this method directly to
-

Returns

-

a GSList +

Returns

+

a GSList of SoupCookies, which can be freed with soup_cookies_free().

[element-type SoupCookie][transfer full]

-

Since 2.24

+

Since: 2.24


soup_cookies_from_response ()

-
GSList *
+
GSList *
 soup_cookies_from_response (SoupMessage *msg);

Parses msg -'s Set-Cookie response headers and returns a GSList of +'s Set-Cookie response headers and returns a GSList of SoupCookies. Cookies that do not specify "path" or "domain" attributes will have their values defaulted from msg .

-

Parameters

-
+

Parameters

+
@@ -1238,19 +1193,19 @@ soup_cookies_from_response ( -

Returns

-

a GSList +

Returns

+

a GSList of SoupCookies, which can be freed with soup_cookies_free().

[element-type SoupCookie][transfer full]

-

Since 2.24

+

Since: 2.24


soup_cookies_to_request ()

void
-soup_cookies_to_request (GSList *cookies,
+soup_cookies_to_request (GSList *cookies,
                          SoupMessage *msg);

Adds the name and value of each cookie in cookies to msg @@ -1261,8 +1216,8 @@ these cookies will be appended to the cookies already present. Be careful that you do not append the same cookies twice, eg, when requeuing a message.)

-

Parameters

-
+

Parameters

+
@@ -1271,7 +1226,7 @@ requeuing a message.)

- + @@ -1282,13 +1237,13 @@ requeuing a message.)

cookies

a GSList of SoupCookie.

a GSList of SoupCookie.

[element-type SoupCookie]
-

Since 2.24

+

Since: 2.24


soup_cookies_to_response ()

void
-soup_cookies_to_response (GSList *cookies,
+soup_cookies_to_response (GSList *cookies,
                           SoupMessage *msg);

Appends a "Set-Cookie" response header to msg for each cookie in @@ -1297,8 +1252,8 @@ soup_cookies_to_response (msg may already have.)

-

Parameters

-
+

Parameters

+
@@ -1307,7 +1262,7 @@ soup_cookies_to_response (

cookies

-
+ @@ -1318,18 +1273,18 @@ soup_cookies_to_response (Since 2.24

+

Since: 2.24


soup_cookies_to_cookie_header ()

char *
-soup_cookies_to_cookie_header (GSList *cookies);
-

Serializes a GSList of SoupCookie into a string suitable for +soup_cookies_to_cookie_header (GSList *cookies); +

Serializes a GSList of SoupCookie into a string suitable for setting as the value of the "Cookie" header.

-

Parameters

-

a GSList of SoupCookie.

a GSList of SoupCookie.

[element-type SoupCookie]
+

Parameters

+
@@ -1337,29 +1292,29 @@ setting as the value of the "Cookie" header.

- +

cookies

a GSList of SoupCookie.

a GSList of SoupCookie.

[element-type SoupCookie]
-

Returns

+

Returns

the serialization of cookies

-

-

Since 2.24

+

Since: 2.24


soup_cookies_free ()

void
-soup_cookies_free (GSList *cookies);
+soup_cookies_free (GSList *cookies);

Frees cookies .

+

[skip]

-

Parameters

-
+

Parameters

+
@@ -1367,12 +1322,12 @@ soup_cookies_free (

cookies

-
+

a GSList of SoupCookie.

a GSList of SoupCookie.

[element-type SoupCookie]
-

Since 2.24

+

Since: 2.24

@@ -1406,18 +1361,18 @@ host/domain, to restrict this cookie to. If domain

expires - will be non-NULL if the cookie uses either the original + will be non-NULL if the cookie uses either the original "expires" attribute, or the newer "max-age" attribute. If expires -is NULL, it indicates that neither "expires" nor "max-age" was +is NULL, it indicates that neither "expires" nor "max-age" was specified, and the cookie expires at the end of the session.

If http_only is set, the cookie should not be exposed to untrusted code (eg, javascript), so as to minimize the danger posed by cross-site scripting attacks.

-

Members

-
+

Members

+
@@ -1442,28 +1397,64 @@ cookie came from.

- + - + - - + + - - + +

char *path;

the "path" attribute, or NULL

the "path" attribute, or NULL

 

SoupDate *expires;

the cookie expiration time, or NULL for a session cookie

the cookie expiration time, or NULL for a session cookie

 

gboolean secure;

TRUE if the cookie should only be tranferred over SSL

gboolean secure;

TRUE if the cookie should only be tranferred over SSL

 

gboolean http_only;

TRUE if the cookie should not be exposed to scripts

gboolean http_only;

TRUE if the cookie should not be exposed to scripts

 
-

Since 2.24

+

Since: 2.24

+
+
+
+

SOUP_COOKIE_MAX_AGE_ONE_HOUR

+
#define SOUP_COOKIE_MAX_AGE_ONE_HOUR (60 * 60)
+
+

A constant corresponding to 1 hour, for use with soup_cookie_new() +and soup_cookie_set_max_age().

+

Since: 2.24

+
+
+
+

SOUP_COOKIE_MAX_AGE_ONE_DAY

+
#define SOUP_COOKIE_MAX_AGE_ONE_DAY  (SOUP_COOKIE_MAX_AGE_ONE_HOUR * 24)
+
+

A constant corresponding to 1 day, for use with soup_cookie_new() +and soup_cookie_set_max_age().

+

Since: 2.24

+
+
+
+

SOUP_COOKIE_MAX_AGE_ONE_WEEK

+
#define SOUP_COOKIE_MAX_AGE_ONE_WEEK (SOUP_COOKIE_MAX_AGE_ONE_DAY * 7)
+
+

A constant corresponding to 1 week, for use with soup_cookie_new() +and soup_cookie_set_max_age().

+

Since: 2.24

+
+
+
+

SOUP_COOKIE_MAX_AGE_ONE_YEAR

+
#define SOUP_COOKIE_MAX_AGE_ONE_YEAR (SOUP_COOKIE_MAX_AGE_ONE_DAY * 365.2422)
+
+

A constant corresponding to 1 year, for use with soup_cookie_new() +and soup_cookie_set_max_age().

+

Since: 2.24

@@ -1472,7 +1463,6 @@ cookie came from.

+ @@ -37,7 +37,7 @@

Functions

-
+
@@ -61,7 +61,7 @@

SoupCookieJarDB

typedef struct _SoupCookieJarDB SoupCookieJarDB;
-

-


@@ -182,7 +179,7 @@ cookie-storage filename.)

Property Details

The “filename” property

-
  “filename”                 gchar *
+
  “filename”                 gchar *

Cookie-storage filename.

Flags: Read / Write / Construct Only

Default value: NULL

@@ -190,7 +187,6 @@ cookie-storage filename.)

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupCookieJarText.html b/docs/reference/html/SoupCookieJarText.html index cae26465..72ae02dd 100644 --- a/docs/reference/html/SoupCookieJarText.html +++ b/docs/reference/html/SoupCookieJarText.html @@ -2,22 +2,22 @@ -libsoup Reference Manual: SoupCookieJarText - +SoupCookieJarText: libsoup Reference Manual + - + -
-GSList * +GSList * soup_cookie_jar_get_cookie_list () @@ -109,7 +109,7 @@
-GSList * +GSList * soup_cookie_jar_all_cookies () @@ -133,7 +133,7 @@
-gboolean +gboolean soup_cookie_jar_is_persistent () @@ -144,7 +144,7 @@

Properties

-
+
@@ -157,7 +157,7 @@ - + @@ -166,7 +166,7 @@

Signals

-
Read / Write
gbooleangboolean read-only Read / Write / Construct Only
+
@@ -175,13 +175,13 @@ - +
void changedRun FirstRun First

Types and Values

-
+
@@ -208,7 +208,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupCookieJar
         ├── SoupCookieJarDB
         ╰── SoupCookieJarText
@@ -244,11 +244,10 @@ soup_cookie_jar_new (void<
 

Creates a new SoupCookieJar. The base SoupCookieJar class does not support persistent storage of cookies; use a subclass for that.

-

Returns

+

Returns

a new SoupCookieJar

-

-

Since 2.24

+

Since: 2.24


@@ -256,22 +255,22 @@ not support persistent storage of cookies; use a subclass for that.

char *
 soup_cookie_jar_get_cookies (SoupCookieJar *jar,
                              SoupURI *uri,
-                             gboolean for_http);
+ gboolean for_http);

Retrieves (in Cookie-header form) the list of cookies that would be sent with a request to uri .

If for_http - is TRUE, the return value will include cookies marked + is TRUE, the return value will include cookies marked "HttpOnly" (that is, cookies that the server wishes to keep hidden from client-side scripting operations such as the JavaScript document.cookies property). Since SoupCookieJar sets the Cookie header itself when making the actual HTTP request, you should almost certainly be setting for_http - to FALSE if you are calling + to FALSE if you are calling this.

-

Parameters

-
+

Parameters

+
@@ -298,36 +297,36 @@ to an HTTP operation

-

Returns

-

the cookies, in string form, or NULL if there are no -cookies for uri -.

-

+

Returns

+

the cookies, in string form, or NULL if +there are no cookies for uri +.

+

[nullable]

-

Since 2.24

+

Since: 2.24


soup_cookie_jar_get_cookie_list ()

-
GSList *
+
GSList *
 soup_cookie_jar_get_cookie_list (SoupCookieJar *jar,
                                  SoupURI *uri,
-                                 gboolean for_http);
+ gboolean for_http);

Retrieves the list of cookies that would be sent with a request to uri -as a GSList of SoupCookie objects.

+as a GSList of SoupCookie objects.

If for_http - is TRUE, the return value will include cookies marked + is TRUE, the return value will include cookies marked "HttpOnly" (that is, cookies that the server wishes to keep hidden from client-side scripting operations such as the JavaScript document.cookies property). Since SoupCookieJar sets the Cookie header itself when making the actual HTTP request, you should almost certainly be setting for_http - to FALSE if you are calling + to FALSE if you are calling this.

-

Parameters

-
+

Parameters

+
@@ -354,14 +353,14 @@ to an HTTP operation

-

Returns

-

a GSList +

Returns

+

a GSList with the cookies in the jar that would be sent with a request to uri .

[transfer full][element-type Soup.Cookie]

-

Since 2.40

+

Since: 2.40


@@ -381,8 +380,8 @@ Set-Cookie header returned from a request to uri
-

Parameters

-
+

Parameters

+
@@ -407,7 +406,7 @@ party or not.

-

Since 2.24

+

Since: 2.24


@@ -428,8 +427,8 @@ will be used to reject cookies coming from third party resources in case such a security policy is set in the jar .

-

Parameters

-
+

Parameters

+
@@ -459,7 +458,7 @@ case such a security policy is set in the jar
-

Since 2.30

+

Since: 2.30


@@ -475,8 +474,8 @@ that the cookie's expire date is not in the past).

cookie will be 'stolen' by the jar, so don't free it afterwards.

-

Parameters

-
+

Parameters

+
@@ -490,13 +489,13 @@ that the cookie's expire date is not in the past).

- +

cookie

a SoupCookie.

a SoupCookie.

[transfer full]
-

Since 2.26

+

Since: 2.26


@@ -518,8 +517,8 @@ resources in case such a security policy is set in the cookie will be 'stolen' by the jar, so don't free it afterwards.

-

Parameters

-
+

Parameters

+
@@ -538,13 +537,13 @@ resources in case such a security policy is set in the - +

cookie

a SoupCookie.

a SoupCookie.

[transfer full]
-

Since 2.40

+

Since: 2.40


@@ -556,8 +555,8 @@ soup_cookie_jar_delete_cookie (jar , emitting the 'changed' signal.

-

Parameters

-
+

Parameters

+
@@ -577,20 +576,20 @@ soup_cookie_jar_delete_cookie (
-

Since 2.26

+

Since: 2.26


soup_cookie_jar_all_cookies ()

-
GSList *
+
GSList *
 soup_cookie_jar_all_cookies (SoupCookieJar *jar);
-

Constructs a GSList with every cookie inside the jar +

Constructs a GSList with every cookie inside the jar . The cookies in the list are a copy of the original, so you have to free them when you are done with them.

-

Parameters

-
+

Parameters

+
@@ -604,13 +603,13 @@ you have to free them when you are done with them.

-

Returns

-

a GSList +

Returns

+

a GSList with all the cookies in the jar .

[transfer full][element-type Soup.Cookie]

-

Since 2.26

+

Since: 2.26


@@ -620,8 +619,8 @@ soup_cookie_jar_get_accept_policy (Gets jar 's SoupCookieJarAcceptPolicy

-

Parameters

-
+

Parameters

+
@@ -635,12 +634,11 @@ soup_cookie_jar_get_accept_policy (
-

Returns

+

Returns

the SoupCookieJarAcceptPolicy set in the jar

-

-

Since 2.30

+

Since: 2.30


@@ -652,8 +650,8 @@ soup_cookie_jar_set_accept_policy (jar .

-

Parameters

-
+

Parameters

+
@@ -673,18 +671,18 @@ soup_cookie_jar_set_accept_policy (
-

Since 2.30

+

Since: 2.30


soup_cookie_jar_is_persistent ()

-
gboolean
+
gboolean
 soup_cookie_jar_is_persistent (SoupCookieJar *jar);

Gets whether jar stores cookies persistenly.

-

Parameters

-
+

Parameters

+
@@ -698,12 +696,11 @@ soup_cookie_jar_is_persistent (
-

Returns

-

TRUE if jar -storage is persistent or FALSE otherwise.

-

+

Returns

+

TRUE if jar +storage is persistent or FALSE otherwise.

-

Since 2.40

+

Since: 2.40

@@ -711,8 +708,6 @@ storage is persistent or

SoupCookieJar

typedef struct _SoupCookieJar SoupCookieJar;
-

-


@@ -720,8 +715,8 @@ storage is persistent or -

Members

-
+

Members

+
@@ -762,7 +757,7 @@ in effect, cookies will be assumed to be third party by default.

-

Since 2.30

+

Since: 2.30


@@ -778,7 +773,7 @@ or not the cookie jar is read-only.)

#define SOUP_COOKIE_JAR_ACCEPT_POLICY "accept-policy"
 

Alias for the “accept-policy” property.

-

Since 2.30

+

Since: 2.30

@@ -789,12 +784,12 @@ or not the cookie jar is read-only.)

The policy the jar should follow to accept or reject cookies

Flags: Read / Write

Default value: SOUP_COOKIE_JAR_ACCEPT_ALWAYS

-

Since 2.30

+

Since: 2.30


The “read-only” property

-
  “read-only”                gboolean
+
  “read-only”                gboolean

Whether or not the cookie jar is read-only.

Flags: Read / Write / Construct Only

Default value: FALSE

@@ -808,24 +803,24 @@ or not the cookie jar is read-only.)

user_function (SoupCookieJar *jar, SoupCookie *old_cookie, SoupCookie *new_cookie, - gpointer user_data) + gpointer user_data)

Emitted when jar changes. If a cookie has been added, new_cookie will contain the newly-added cookie and old_cookie - will be NULL. If a cookie has been deleted, + will be NULL. If a cookie has been deleted, old_cookie will contain the to-be-deleted cookie and new_cookie - will be NULL. If a cookie has been changed, + will be NULL. If a cookie has been changed, old_cookie will contain its old value, and new_cookie its new value.

-

Parameters

-
+

Parameters

+
@@ -855,12 +850,11 @@ new value.

-

Flags: Run First

+

Flags: Run First

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupCookieJarDB.html b/docs/reference/html/SoupCookieJarDB.html index f0edeed7..1a77cbb9 100644 --- a/docs/reference/html/SoupCookieJarDB.html +++ b/docs/reference/html/SoupCookieJarDB.html @@ -2,22 +2,22 @@ -libsoup Reference Manual: SoupCookieJarDB - +SoupCookieJarDB: libsoup Reference Manual + - + - + @@ -36,7 +36,7 @@

Functions

-
+
@@ -53,7 +53,7 @@

Properties

-
+
@@ -61,7 +61,7 @@ +gchar * @@ -69,7 +69,7 @@

Types and Values

-
-gchar * filename Read / Write / Construct Only
+
@@ -88,7 +88,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupCookieJar
         ╰── SoupCookieJarDB
 
@@ -118,21 +118,21 @@ renamed to avoid conflicting.)

soup_cookie_jar_db_new ()

SoupCookieJar *
 soup_cookie_jar_db_new (const char *filename,
-                        gboolean read_only);
+ gboolean read_only);

Creates a SoupCookieJarDB.

filename will be read in at startup to create an initial set of cookies. If read_only - is FALSE, then the non-session cookies will + is FALSE, then the non-session cookies will be written to filename when the 'changed' signal is emitted from the jar. (If read_only - is TRUE, then the cookie jar will only be + is TRUE, then the cookie jar will only be used for this session, and changes made to it will be lost when the jar is destroyed.)

-

Parameters

-
+

Parameters

+
@@ -141,12 +141,12 @@ jar is destroyed.)

- + - @@ -154,11 +154,10 @@ is read-only

filename

the filename to read to/write from, or NULL

the filename to read to/write from, or NULL

 

read_only

TRUE if filename +

TRUE if filename is read-only

 
-

Returns

+

Returns

the new SoupCookieJar

-

-

Since 2.42

+

Since: 2.42

@@ -166,8 +165,6 @@ is read-only

+ @@ -36,7 +36,7 @@

Functions

-
+
@@ -53,7 +53,7 @@

Properties

-
+
@@ -61,7 +61,7 @@ +gchar * @@ -69,7 +69,7 @@

Types and Values

-
-gchar * filename Read / Write / Construct Only
+
@@ -88,7 +88,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupCookieJar
         ╰── SoupCookieJarText
 
@@ -115,21 +115,21 @@ writes them to a text file in the Mozilla "cookies.txt" format.

soup_cookie_jar_text_new ()

SoupCookieJar *
 soup_cookie_jar_text_new (const char *filename,
-                          gboolean read_only);
+ gboolean read_only);

Creates a SoupCookieJarText.

filename will be read in at startup to create an initial set of cookies. If read_only - is FALSE, then the non-session cookies will + is FALSE, then the non-session cookies will be written to filename when the 'changed' signal is emitted from the jar. (If read_only - is TRUE, then the cookie jar will only be + is TRUE, then the cookie jar will only be used for this session, and changes made to it will be lost when the jar is destroyed.)

-

Parameters

-
+

Parameters

+
@@ -143,7 +143,7 @@ jar is destroyed.)

- @@ -151,11 +151,10 @@ is read-only

read_only

TRUE if filename +

TRUE if filename is read-only

 
-

Returns

+

Returns

the new SoupCookieJar

-

-

Since 2.26

+

Since: 2.26

@@ -163,8 +162,6 @@ is read-only

+ @@ -35,7 +36,7 @@

Functions

-
+
@@ -51,22 +52,6 @@ - - - - - - - -
-void - -soup_logger_attach () -
-void - -soup_logger_detach () -
SoupLoggerLogLevel @@ -109,8 +94,30 @@
+

Properties

+
+++++ + + + + + + + + + + + + +
SoupLoggerLogLevellevelRead / Write
gintmax-body-sizeRead / Write
+
+

Types and Values

-
+
@@ -129,7 +136,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupLogger
 
@@ -164,9 +171,9 @@ and then attach it to a session (or multiple sessions) with > Host: localhost > Content-Type: text/plain > Connection: close -> +> > This is a test. - + < HTTP/1.1 201 Created < Soup-Debug-Timestamp: 1200171744 < Soup-Debug: SoupMessage 1 (0x617000) @@ -186,7 +193,7 @@ used to identify when multiple messages are sent across the same connection.

Currently, the request half of the message is logged just before the first byte of the request gets written to the network (from the -“request_started” signal), which means that if you have +“starting” signal), which means that if you have not made the complete request body available at that point, it will not be logged.

The response is logged just after the last byte of the response @@ -218,8 +225,8 @@ bytes of the body that will be logged. (-1 means "no limit".)

logged, use soup_logger_set_request_filter() and soup_logger_set_response_filter().

-

Parameters

-
+

Parameters

+
@@ -240,86 +247,8 @@ logged, use -

Returns

+

Returns

a new SoupLogger

-

- - -
-
-

soup_logger_attach ()

-
void
-soup_logger_attach (SoupLogger *logger,
-                    SoupSession *session);
-
-

soup_logger_attach is deprecated and should not be used in newly-written code.

-

Use soup_session_add_feature() instead.

-
-

Sets logger - to watch session - and print debug information for -its messages.

-

(The session will take a reference on logger -, which will be -removed when you call soup_logger_detach(), or when the session is -destroyed.)

-
-

Parameters

-
----- - - - - - - - - - - - - -

logger

a SoupLogger

 

session

a SoupSession

 
-
-
-
-
-

soup_logger_detach ()

-
void
-soup_logger_detach (SoupLogger *logger,
-                    SoupSession *session);
-
-

soup_logger_detach is deprecated and should not be used in newly-written code.

-

Use soup_session_remove_feature() instead.

-
-

Stops logger - from watching session -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

logger

a SoupLogger

 

session

a SoupSession

 

@@ -328,15 +257,15 @@ soup_logger_detach (SoupLoggerLogLevel (*SoupLoggerFilter) (SoupLogger *logger, SoupMessage *msg, - gpointer user_data); + gpointer user_data);

The prototype for a logging filter. The filter callback will be invoked for each request or response, and should analyze it and return a SoupLoggerLogLevel value indicating how much of the message to log. Eg, it might choose between SOUP_LOGGER_LOG_BODY and SOUP_LOGGER_LOG_HEADERS depending on the Content-Type.

-

Parameters

-
+

Parameters

+
@@ -363,10 +292,9 @@ or
-

Returns

+

Returns

a SoupLoggerLogLevel value indicating how much of the message to log

-


@@ -375,8 +303,8 @@ the message to log

void
 soup_logger_set_request_filter (SoupLogger *logger,
                                 SoupLoggerFilter request_filter,
-                                gpointer filter_data,
-                                GDestroyNotify destroy);
+ gpointer filter_data, + GDestroyNotify destroy);

Sets up a filter to determine the log level for a given request. For each HTTP request logger will invoke request_filter @@ -386,8 +314,8 @@ set a request filter, logger will just always log requests at the level passed to soup_logger_new().)

-

Parameters

-
+

Parameters

+
@@ -411,7 +339,7 @@ level passed to

destroy

-
@@ -425,8 +353,8 @@ level passed to void soup_logger_set_response_filter (SoupLogger *logger, SoupLoggerFilter response_filter, - gpointer filter_data, - GDestroyNotify destroy); + gpointer filter_data, + GDestroyNotify destroy);

Sets up a filter to determine the log level for a given response. For each HTTP response logger will invoke response_filter @@ -436,8 +364,8 @@ set a response filter, logger will just always log responses at the level passed to soup_logger_new().)

-

Parameters

-

a GDestroyNotify to free filter_data +

a GDestroyNotify to free filter_data

 
+

Parameters

+
@@ -461,7 +389,7 @@ the level passed to - @@ -477,7 +405,7 @@ the level passed to SoupLoggerLogLevel level, char direction, const char *data, - gpointer user_data); + gpointer user_data);

The prototype for a custom printing callback.

level indicates what kind of information is being printed. Eg, it @@ -493,15 +421,15 @@ to print; the printer is expected to add a terminating newline.

- +

destroy

a GDestroyNotify to free filter_data +

a GDestroyNotify to free filter_data

 
1
printf ("%c %s\n", direction, data);
printf ("%c %s\n", direction, data);
-

Parameters

-
+

Parameters

+
@@ -544,13 +472,13 @@ to print; the printer is expected to add a terminating newline.

void
 soup_logger_set_printer (SoupLogger *logger,
                          SoupLoggerPrinter printer,
-                         gpointer printer_data,
-                         GDestroyNotify destroy);
+ gpointer printer_data, + GDestroyNotify destroy);

Sets up an alternate log printing routine, if you don't want the log to go to stdout.

-

Parameters

-
+

Parameters

+
@@ -574,7 +502,7 @@ the log to go to stdout.

- @@ -588,16 +516,14 @@ the log to go to stdout.

SoupLogger

typedef struct _SoupLogger SoupLogger;
-

-


enum SoupLoggerLogLevel

Describes the level of logging output to provide.

-

Members

-

destroy

a GDestroyNotify to free printer_data +

a GDestroyNotify to free printer_data

 
+

Members

+
@@ -639,9 +565,31 @@ bodies.

+
+

Property Details

+
+

The “level” property

+
  “level”                    SoupLoggerLogLevel
+

The level of logging output

+

Flags: Read / Write

+

Default value: SOUP_LOGGER_LOG_MINIMAL

+

Since: 2.56

- +
+

The “max-body-size” property

+
  “max-body-size”            gint
+

If “level” is SOUP_LOGGER_LOG_BODY, this gives +the maximum number of bytes of the body that will be logged. +(-1 means "no limit".)

+

Flags: Read / Write

+

Allowed values: >= -1

+

Default value: -1

+

Since: 2.56

+
+
+ + \ No newline at end of file diff --git a/docs/reference/html/SoupMessage.html b/docs/reference/html/SoupMessage.html index c9dd121e..5c59e8cb 100644 --- a/docs/reference/html/SoupMessage.html +++ b/docs/reference/html/SoupMessage.html @@ -2,22 +2,22 @@ -libsoup Reference Manual: SoupMessage - +SoupMessage: libsoup Reference Manual + - + -
+ @@ -36,7 +36,7 @@

Functions

-
+
@@ -140,7 +140,7 @@ - - - - @@ -255,7 +247,7 @@

Properties

-
-gboolean +gboolean soup_message_is_keepalive () @@ -148,7 +148,7 @@
-gboolean +gboolean soup_message_get_https_status () @@ -172,7 +172,7 @@
-guint +guint soup_message_add_header_handler () @@ -180,7 +180,7 @@
-guint +guint soup_message_add_status_code_handler () @@ -215,14 +215,6 @@ void -soup_message_set_chunk_allocator () -
-void - soup_message_disable_feature ()
+
@@ -280,7 +272,7 @@ +gchar * @@ -291,7 +283,7 @@ +gchar * @@ -303,7 +295,7 @@ +GBytes * @@ -321,7 +313,7 @@ +GBytes * @@ -332,12 +324,12 @@ - + - + @@ -363,7 +355,7 @@

Signals

-
-gchar * method Read / Write
-gchar * reason-phrase Read / Write
-GBytes * request-body-data Read
-GBytes * response-body-data Read
Read
gbooleangboolean server-side Read / Write / Construct Only
guintguint status-code Read / Write
+
@@ -373,74 +365,79 @@ - + - + - + - + - + - + - + - + + + + + + - + - + - + - + - +
void content-sniffedRun FirstRun First
void finishedRun FirstRun First
void got-bodyRun FirstRun First
void got-chunkRun FirstRun First
void got-headersRun FirstRun First
void got-informationalRun FirstRun First
void network-eventRun FirstRun First
void restartedRun FirstRun First
voidstartingRun First
void wrote-bodyRun FirstRun First
void wrote-body-dataRun FirstRun First
void wrote-chunkRun FirstRun First
void wrote-headersRun FirstRun First
void wrote-informationalRun FirstRun First

Types and Values

-
+
@@ -535,7 +532,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupMessage
 
@@ -576,8 +573,8 @@ soup_message_new (const charCreates a new empty SoupMessage, which will connect to uri

-

Parameters

-
+

Parameters

+
@@ -598,11 +595,10 @@ soup_message_new (const char
-

Returns

-

the new SoupMessage (or NULL if uri -could not -be parsed).

-

+

Returns

+

the new SoupMessage (or NULL if uri +could not be parsed).

+

[nullable]


@@ -614,8 +610,8 @@ soup_message_new_from_uri (const

Creates a new empty SoupMessage, which will connect to uri

-

Parameters

-
+

Parameters

+
@@ -636,9 +632,8 @@ soup_message_new_from_uri (const
-

Returns

+

Returns

the new SoupMessage

-


@@ -649,13 +644,13 @@ soup_message_set_request (const char *content_type, SoupMemoryUse req_use, const char *req_body, - gsize req_length); + gsize req_length);

Convenience function to set the request body of a SoupMessage. If content_type - is NULL, the request body must be empty as well.

+ is NULL, the request body must be empty as well.

-

Parameters

-
+

Parameters

+
@@ -669,8 +664,8 @@ soup_message_set_request (

content_type

-
- + + @@ -680,8 +675,8 @@ soup_message_set_request (

req_body

-
- + + @@ -701,13 +696,13 @@ soup_message_set_response (const char *content_type, SoupMemoryUse resp_use, const char *resp_body, - gsize resp_length); + gsize resp_length);

Convenience function to set the response body of a SoupMessage. If content_type - is NULL, the response body must be empty as well.

+ is NULL, the response body must be empty as well.

-

Parameters

-

MIME Content-Type of the body.

[allow-none]

MIME Content-Type of the body.

[allow-none]

req_use

a data buffer containing the body of the message request.

[allow-none][array length=req_length][element-type guint8]

a data buffer containing the body of the message request.

[allow-none][array length=req_length][element-type guint8]

req_length

+

Parameters

+
@@ -721,8 +716,8 @@ soup_message_set_response (

content_type

-
- + + @@ -732,8 +727,8 @@ soup_message_set_response (

resp_body

-
- + + @@ -756,8 +751,8 @@ soup_message_set_http_version (SOUP_HTTP_1_1. Setting it to SOUP_HTTP_1_0 will prevent certain functionality from being used.

-

Parameters

-

MIME Content-Type of the body.

[allow-none]

MIME Content-Type of the body.

[allow-none]

resp_use

a data buffer containing the body of the message response.

[allow-none][array length=resp_length][element-type guint8]

a data buffer containing the body of the message response.

[allow-none][array length=resp_length][element-type guint8]

resp_length

+

Parameters

+
@@ -787,8 +782,8 @@ soup_message_get_http_version (
-

Parameters

-
+

Parameters

+
@@ -802,9 +797,8 @@ version from the request and the version from the response.

-

Returns

+

Returns

the HTTP version

-


@@ -815,8 +809,8 @@ soup_message_get_uri (msg 's URI

-

Parameters

-
+

Parameters

+
@@ -830,8 +824,8 @@ soup_message_get_uri ( -

Returns

-

the URI msg +

Returns

+

the URI msg is targeted for.

[transfer none]

@@ -849,8 +843,8 @@ soup_message_set_uri (soup_session_requeue_message().

-

Parameters

-
+

Parameters

+
@@ -881,8 +875,8 @@ soup_message_get_address ( -

Parameters

-
+

Parameters

+
@@ -896,19 +890,19 @@ session will resolve it before sending the message.

-

Returns

-

the address msg +

Returns

+

the address msg 's URI points to.

[transfer none]

-

Since 2.26

+

Since: 2.26


soup_message_set_status ()

void
 soup_message_set_status (SoupMessage *msg,
-                         guint status_code);
+ guint status_code);

Sets msg 's status code to status_code . If status_code @@ -916,8 +910,8 @@ soup_message_set_status (msg 's reason_phrase.

-

Parameters

-
+

Parameters

+
@@ -943,13 +937,13 @@ known value, it will also set msg

soup_message_set_status_full ()

void
 soup_message_set_status_full (SoupMessage *msg,
-                              guint status_code,
+                              guint status_code,
                               const char *reason_phrase);

Sets msg 's status code and reason phrase.

-

Parameters

-
+

Parameters

+
@@ -980,7 +974,7 @@ soup_message_set_status_full (

soup_message_set_redirect ()

void
 soup_message_set_redirect (SoupMessage *msg,
-                           guint status_code,
+                           guint status_code,
                            const char *redirect_uri);

Sets msg 's status_code to status_code @@ -997,8 +991,8 @@ interpreted relative to msg and query of msg 's URI.

-

Parameters

-
+

Parameters

+
@@ -1024,12 +1018,12 @@ to

-

Since 2.38

+

Since: 2.38


soup_message_is_keepalive ()

-
gboolean
+
gboolean
 soup_message_is_keepalive (SoupMessage *msg);

Determines whether or not msg 's connection can be kept alive for @@ -1037,8 +1031,8 @@ further requests after processing msg , based on the HTTP version, Connection header, etc.

-

Parameters

-
+

Parameters

+
@@ -1052,15 +1046,14 @@ Connection header, etc.

-

Returns

-

TRUE or FALSE.

-

+

Returns

+

TRUE or FALSE.


soup_message_get_https_status ()

-
gboolean
+
gboolean
 soup_message_get_https_status (SoupMessage *msg,
                                GTlsCertificate **certificate,
                                GTlsCertificateFlags *errors);
@@ -1070,9 +1063,11 @@ soup_message_get_https_status (GTlsCertificateFlags showing what problems, if any, have been found with that certificate.

+
-

Parameters

-
+

Parameters

+
@@ -1086,13 +1081,13 @@ certificate.

- - @@ -1100,12 +1095,11 @@ certificate.

certificate

msg +

msg 's TLS certificate.

[out][transfer none]

errors

the verification status of certificate +

the verification status of certificate .

[out]
-

Returns

-

TRUE if msg -used/attempted https, FALSE if not

-

+

Returns

+

TRUE if msg +used/attempted https, FALSE if not

-

Since 2.34

+

Since: 2.34


@@ -1119,8 +1113,8 @@ soup_message_set_first_party (SoupCookieJarAcceptPolicy.

-

Parameters

-
+

Parameters

+
@@ -1141,7 +1135,7 @@ details of when and how this is used refer to the documentation for
-

Since 2.30

+

Since: 2.30


@@ -1151,8 +1145,8 @@ soup_message_get_first_party (msg 's first-party SoupURI

-

Parameters

-
+

Parameters

+
@@ -1166,26 +1160,26 @@ soup_message_get_first_party ( -

Returns

-

the msg +

Returns

+

the msg 's first party SoupURI.

[transfer none]

-

Since 2.30

+

Since: 2.30


soup_message_add_header_handler ()

-
guint
+
guint
 soup_message_add_header_handler (SoupMessage *msg,
                                  const char *signal,
                                  const char *header,
-                                 GCallback callback,
-                                 gpointer user_data);
+ GCallback callback, + gpointer user_data);

Adds a signal handler to msg for signal , as with -g_signal_connect(), but the callback +g_signal_connect(), but the callback will only be run if msg 's incoming messages headers (that is, the @@ -1193,9 +1187,10 @@ incoming messages headers (that is, the the response_headers for a server SoupMessage) contain a header named header .

+

[skip]

-

Parameters

-
+

Parameters

+
@@ -1232,24 +1227,23 @@ contain a header named header
-

Returns

-

the handler ID from g_signal_connect()

-

+

Returns

+

the handler ID from g_signal_connect()


soup_message_add_status_code_handler ()

-
guint
+
guint
 soup_message_add_status_code_handler (SoupMessage *msg,
                                       const char *signal,
-                                      guint status_code,
-                                      GCallback callback,
-                                      gpointer user_data);
+ guint status_code, + GCallback callback, + gpointer user_data);

Adds a signal handler to msg for signal , as with -g_signal_connect(), but the callback +g_signal_connect(), but the callback will only be run if msg has the status status_code @@ -1260,9 +1254,10 @@ the status status_code is set. For a client SoupMessage, this means it can't be a "wrote" signal. For a server SoupMessage, this means it can't be a "got" signal.

+

[skip]

-

Parameters

-
+

Parameters

+
@@ -1299,9 +1294,8 @@ signal.

-

Returns

-

the handler ID from g_signal_connect()

-

+

Returns

+

the handler ID from g_signal_connect()


@@ -1313,8 +1307,8 @@ soup_message_set_flags (msg .

-

Parameters

-
+

Parameters

+
@@ -1343,8 +1337,8 @@ soup_message_get_flags (msg

-

Parameters

-
+

Parameters

+
@@ -1358,9 +1352,8 @@ soup_message_get_flags ( -

Returns

+

Returns

the flags

-


@@ -1368,8 +1361,8 @@ soup_message_get_flags (

SoupChunkAllocator ()

SoupBuffer *
 (*SoupChunkAllocator) (SoupMessage *msg,
-                       gsize max_len,
-                       gpointer user_data);
+ gsize max_len, + gpointer user_data);

SoupChunkAllocator is deprecated and should not be used in newly-written code.

Use SoupRequest if you want to read into your @@ -1387,12 +1380,12 @@ try to allocate that many bytes blindly. If max_len< means that libsoup does not know how many bytes remain to be read, and the allocator should return a buffer of a size that it finds convenient.

-

If the allocator returns NULL, the message will be paused. It is +

If the allocator returns NULL, the message will be paused. It is up to the application to make sure that it gets unpaused when it becomes possible to allocate a new buffer.

-

Parameters

-
+

Parameters

+
@@ -1411,95 +1404,16 @@ becomes possible to allocate a new buffer.

- +

user_data

the data passed to soup_message_set_chunk_allocator()

the data passed to soup_message_set_chunk_allocator()

 
-

Returns

-

the new buffer (or NULL)

-

-
- -
-
-

soup_message_set_chunk_allocator ()

-
void
-soup_message_set_chunk_allocator (SoupMessage *msg,
-                                  SoupChunkAllocator allocator,
-                                  gpointer user_data,
-                                  GDestroyNotify destroy_notify);
-
-

soup_message_set_chunk_allocator is deprecated and should not be used in newly-written code.

-

SoupRequest provides a much simpler API that lets you -read the response directly into your own buffers without needing to -mess with callbacks, pausing/unpausing, etc.

-
-

Sets an alternate chunk-allocation function to use when reading -msg -'s body when using the traditional (ie, -non-SoupRequest-based) API. Every time data is available -to read, libsoup will call allocator -, which should return a -SoupBuffer. (See SoupChunkAllocator for additional details.) -Libsoup will then read data from the network into that buffer, and -update the buffer's length to indicate how much -data it read.

-

Generally, a custom chunk allocator would be used in conjunction -with soup_message_body_set_accumulate() FALSE and -“got_chunk”, as part of a strategy to avoid unnecessary -copying of data. However, you cannot assume that every call to the -allocator will be followed by a call to your -“got_chunk” handler; if an I/O error occurs, then the -buffer will be unreffed without ever having been used. If your -buffer-allocation strategy requires special cleanup, use -soup_buffer_new_with_owner() rather than doing the cleanup from the -“got_chunk” handler.

-

The other thing to remember when using non-accumulating message -bodies is that the buffer passed to the “got_chunk” -handler will be unreffed after the handler returns, just as it -would be in the non-custom-allocated case. If you want to hand the -chunk data off to some other part of your program to use later, -you'll need to ref the SoupBuffer (or its owner, in the -soup_buffer_new_with_owner() case) to ensure that the data remains -valid.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

msg

a SoupMessage

 

allocator

the chunk allocator callback

 

user_data

data to pass to allocator -

 

destroy_notify

destroy notifier to free user_data -when msg -is -destroyed

 
+

Returns

+

the new buffer (or NULL).

+

[nullable]


@@ -1507,7 +1421,7 @@ destroyed

+

Parameters

+
@@ -1538,13 +1452,13 @@ redirect or authentication.

- +

feature_type

the GType of a SoupSessionFeature

the GType of a SoupSessionFeature

 
-

Since 2.28

+

Since: 2.28


@@ -1553,10 +1467,10 @@ redirect or authentication.

soup_message_get_soup_request (SoupMessage *msg);

If msg is associated with a SoupRequest, this returns that -request. Otherwise it returns NULL.

+request. Otherwise it returns NULL.

-

Parameters

-
+

Parameters

+
@@ -1570,12 +1484,12 @@ request. Otherwise it returns -

Returns

-

msg +

Returns

+

msg 's associated SoupRequest.

[transfer none]

-

Since 2.42

+

Since: 2.42


@@ -1585,8 +1499,8 @@ soup_message_get_priority (SoupMessagePriority. If not set this value defaults to SOUP_MESSAGE_PRIORITY_NORMAL.

-

Parameters

-
+

Parameters

+
@@ -1600,11 +1514,10 @@ to
-

Returns

+

Returns

the priority of the message.

-

-

Since 2.44

+

Since: 2.44


@@ -1623,8 +1536,8 @@ processed on a FIFO basis).

the synchronous/blocking case, priority ends up being determined semi-randomly by thread scheduling.

-

Parameters

-
+

Parameters

+
@@ -1644,7 +1557,7 @@ semi-randomly by thread scheduling.

-

Since 2.44

+

Since: 2.44

@@ -1701,7 +1614,7 @@ this; use “finished” is emitted. (If you are using SoupRequest, then the message body is not accumulated by default, so response_body -'s data will always be NULL.)

+'s data will always be NULL.)

For a server-side SoupMessage, request_body 's data will be filled in before “got_body” is emitted.

@@ -1711,10 +1624,10 @@ need to see it all at the end), call soup_message_body_set_accumulate() on response_body or request_body - as appropriate, passing FALSE.

+ as appropriate, passing FALSE.

-

Members

-
+

Members

+
@@ -1727,7 +1640,7 @@ need to see it all at the end), call - + @@ -1766,8 +1679,8 @@ need to see it all at the end), call

enum SoupHTTPVersion

Indicates the HTTP protocol version being used.

-

Members

-
 

guint status_code;

guint status_code;

the HTTP status code

 
+

Members

+
@@ -1798,8 +1711,8 @@ need to see it all at the end), call

Various flags that can be set on a SoupMessage to alter its behavior.

-

Members

-
+

Members

+
@@ -1829,7 +1742,7 @@ behavior.

Deprecated: equivalent to calling soup_message_body_set_accumulate() on the incoming message body (ie, “response_body” for a client-side request), - passing FALSE.

+ passing FALSE.

@@ -1873,6 +1786,31 @@ behavior.

+ + + + + + + + + +
 
 

SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS

+

Request that a new connection is + created for the message if there aren't idle connections available + and it's not possible to create new connections due to any of the + connection limits has been reached. If a dedicated connection is + eventually created for this message, it will be dropped when the + message finishes. Since 2.50

+
 

SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE

+

The SoupAuthManager should not use + the credentials cache for this message, neither to use cached credentials + to automatically authenticate this message nor to cache the credentials + after the message is successfully authenticated. This applies to both server + and proxy authentication. Note that “authenticate” signal will + be emitted, if you want to disable authentication for a message use + soup_message_disable_feature() passing SOUP_TYPE_AUTH_MANAGER instead. Since 2.58

+
 
@@ -1884,8 +1822,8 @@ behavior.

message queue to process it before any other message with lower priority.

-

Members

-
+

Members

+
@@ -1991,7 +1929,7 @@ message's HTTP response reason phrase.)

SOUP_MESSAGE_SERVER_SIDE

#define SOUP_MESSAGE_SERVER_SIDE        "server-side"
 
-

Alias for the “server-side” property. (TRUE if +

Alias for the “server-side” property. (TRUE if the message was created by SoupServer.)


@@ -2002,7 +1940,7 @@ the message was created by “first-party” property. (The SoupURI loaded in the application when the message was queued.)

-

Since 2.30

+

Since: 2.30


@@ -2011,7 +1949,7 @@ queued.)

Sets the priority of the SoupMessage. See soup_message_set_priority() for further details.

-

Since 2.44

+

Since: 2.44


@@ -2027,8 +1965,8 @@ message's HTTP request body.)

#define SOUP_MESSAGE_REQUEST_BODY_DATA  "request-body-data"
 

Alias for the “request-body-data” property. (The -message's HTTP request body, as a GBytes.)

-

Since 2.46

+message's HTTP request body, as a GBytes.)

+

Since: 2.46


@@ -2052,8 +1990,8 @@ message's HTTP response body.)

#define SOUP_MESSAGE_RESPONSE_BODY_DATA "response-body-data"
 

Alias for the “response-body-data” property. (The -message's HTTP response body, as a GBytes.)

-

Since 2.46

+message's HTTP response body, as a GBytes.)

+

Since: 2.46


@@ -2070,7 +2008,7 @@ message's HTTP response headers.)

Alias for the “tls-certificate” property. (The TLS certificate associated with the message, if any.)

-

Since 2.34

+

Since: 2.34


@@ -2079,7 +2017,7 @@ TLS certificate associated with the message, if any.)

Alias for the “tls-errors” property. (The verification errors on “tls-certificate”.)

-

Since 2.34

+

Since: 2.34

@@ -2090,7 +2028,7 @@ verification errors on SoupURI loaded in the application when the message was queued.

Flags: Read / Write

-

Since 2.30

+

Since: 2.30


@@ -2110,7 +2048,7 @@ queued.


The “method” property

-
  “method”                   gchar *
+
  “method”                   gchar *

The message's HTTP method.

Flags: Read / Write

Default value: "GET"

@@ -2126,7 +2064,7 @@ queued.


The “reason-phrase” property

-
  “reason-phrase”            gchar *
+
  “reason-phrase”            gchar *

The HTTP response reason phrase.

Flags: Read / Write

Default value: NULL

@@ -2141,10 +2079,10 @@ queued.


The “request-body-data” property

-
  “request-body-data”        GBytes *
-

The message's HTTP request body, as a GBytes.

+
  “request-body-data”        GBytes *
+

The message's HTTP request body, as a GBytes.

Flags: Read

-

Since 2.46

+

Since: 2.46


@@ -2163,10 +2101,10 @@ queued.


The “response-body-data” property

-
  “response-body-data”       GBytes *
-

The message's HTTP response body, as a GBytes.

+
  “response-body-data”       GBytes *
+

The message's HTTP response body, as a GBytes.

Flags: Read

-

Since 2.46

+

Since: 2.46


@@ -2178,7 +2116,7 @@ queued.


The “server-side” property

-
  “server-side”              gboolean
+
  “server-side”              gboolean

Whether or not the message is server-side rather than client-side.

Flags: Read / Write / Construct Only

Default value: FALSE

@@ -2186,10 +2124,10 @@ queued.


The “status-code” property

-
  “status-code”              guint
+
  “status-code”              guint

The HTTP response status code.

Flags: Read / Write

-

Allowed values: <= 599

+

Allowed values: <= 999

Default value: 0


@@ -2198,7 +2136,7 @@ queued.

  “tls-certificate”          GTlsCertificate *

The GTlsCertificate associated with the message

Flags: Read / Write

-

Since 2.34

+

Since: 2.34


@@ -2206,7 +2144,7 @@ queued.

  “tls-errors”               GTlsCertificateFlags

The verification errors on “tls-certificate”

Flags: Read / Write

-

Since 2.34

+

Since: 2.34


@@ -2222,9 +2160,9 @@ queued.

The “content-sniffed” signal

void
 user_function (SoupMessage *msg,
-               gchar       *type,
-               GHashTable  *params,
-               gpointer     user_data)
+ gchar *type, + GHashTable *params, + gpointer user_data)

This signal is emitted after “got-headers”, and before the first “got-chunk”. If content sniffing is disabled, or no content sniffing will be @@ -2232,7 +2170,7 @@ performed, due to the sniffer deciding to trust the Content-Type sent by the server, this signal is emitted immediately after “got-headers”, and type is -NULL.

+NULL.

If the SoupContentSniffer feature is enabled, and the sniffer decided to perform sniffing, the first “got-chunk” emission may be delayed, so that the @@ -2244,8 +2182,8 @@ message, if desired.

that sniffing could be done is delivered on the first emission of “got-chunk”.

-

Parameters

-
+

Parameters

+
@@ -2264,7 +2202,7 @@ emission of - + @@ -2275,21 +2213,21 @@ emission of

params

a GHashTable with the parameters.

a GHashTable with the parameters.

[element-type utf8 utf8]
-

Flags: Run First

-

Since 2.28

+

Flags: Run First

+

Since: 2.28


The “finished” signal

void
 user_function (SoupMessage *msg,
-               gpointer     user_data)
+ gpointer user_data)

Emitted when all HTTP processing is finished for a message. (After “got_body” for client-side messages, or after “wrote_body” for server-side messages.)

-

Parameters

-
+

Parameters

+
@@ -2309,14 +2247,14 @@ after Run First

+

Flags: Run First


The “got-body” signal

void
 user_function (SoupMessage *msg,
-               gpointer     user_data)
+ gpointer user_data)

Emitted after receiving the complete message body. (For a server-side message, this means it has received the request body. For a client-side message, this means it has received @@ -2325,8 +2263,8 @@ the response body and is nearly done with the message.)

soup_message_add_status_code_handler(), which can be used to connect to a subset of emissions of this signal.

-

Parameters

-
+

Parameters

+
@@ -2346,7 +2284,7 @@ to connect to a subset of emissions of this signal.

-

Flags: Run First

+

Flags: Run First


@@ -2354,7 +2292,7 @@ to connect to a subset of emissions of this signal.

void
 user_function (SoupMessage *msg,
                SoupBuffer  *chunk,
-               gpointer     user_data)
+ gpointer user_data)

Emitted after receiving a chunk of a message body. Note that "chunk" in this context means any subpiece of the body, not necessarily the specific HTTP 1.1 chunks sent by @@ -2365,8 +2303,8 @@ then the current HTTP I/O will be stopped after this signal emission finished, and msg 's connection will be closed.

-

Parameters

-
+

Parameters

+
@@ -2391,14 +2329,14 @@ emission finished, and msg
-

Flags: Run First

+

Flags: Run First


The “got-headers” signal

void
 user_function (SoupMessage *msg,
-               gpointer     user_data)
+ gpointer user_data)

Emitted after receiving all message headers for a message. (For a client-side message, this is after receiving the Status-Line and response headers; for a server-side @@ -2418,8 +2356,8 @@ requeue it from a “got_headers” handler, so that the existing HTTP connection can be reused.)

-

Parameters

-
+

Parameters

+
@@ -2439,14 +2377,14 @@ existing HTTP connection can be reused.)

-

Flags: Run First

+

Flags: Run First


The “got-informational” signal

void
 user_function (SoupMessage *msg,
-               gpointer     user_data)
+ gpointer user_data)

Emitted after receiving a 1xx (Informational) response for a (client-side) message. The response_headers will be filled in with the headers associated with the @@ -2458,8 +2396,8 @@ then the current HTTP I/O will be stopped after this signal emission finished, and msg 's connection will be closed.

-

Parameters

-
+

Parameters

+
@@ -2479,7 +2417,7 @@ emission finished, and msg
-

Flags: Run First

+

Flags: Run First


@@ -2488,7 +2426,7 @@ emission finished, and msg user_function (SoupMessage *msg, GSocketClientEvent event, GIOStream *connection, - gpointer user_data) + gpointer user_data)

Emitted to indicate that some network-related event related to msg has occurred. This essentially proxies the @@ -2506,8 +2444,8 @@ the different values of event connection will be in each case.

-

Parameters

-
+

Parameters

+
@@ -2537,22 +2475,22 @@ the different values of event
-

Flags: Run First

-

Since 2.38

+

Flags: Run First

+

Since: 2.38


The “restarted” signal

void
 user_function (SoupMessage *msg,
-               gpointer     user_data)
+ gpointer user_data)

Emitted when a request that was already sent once is now being sent again (eg, because the first attempt received a redirection response, or because we needed to use authentication).

-

Parameters

-
+

Parameters

+
@@ -2572,14 +2510,46 @@ authentication).

-

Flags: Run First

+

Flags: Run First

+
+
+
+

The “starting” signal

+
void
+user_function (SoupMessage *msg,
+               gpointer     user_data)
+

Emitted just before a message is sent.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

msg

the message

 

user_data

user data set when the signal handler was connected.

 
+
+

Flags: Run First

+

Since: 2.50


The “wrote-body” signal

void
 user_function (SoupMessage *msg,
-               gpointer     user_data)
+ gpointer user_data)

Emitted immediately after writing the complete body for a message. (For a client-side message, this means that libsoup is done writing and is now waiting for the response @@ -2587,8 +2557,8 @@ from the server. For a server-side message, this means that libsoup has finished writing the response and is nearly done with the message.)

-

Parameters

-
+

Parameters

+
@@ -2608,7 +2578,7 @@ done with the message.)

-

Flags: Run First

+

Flags: Run First


@@ -2616,15 +2586,15 @@ done with the message.)

void
 user_function (SoupMessage *msg,
                SoupBuffer  *chunk,
-               gpointer     user_data)
+ gpointer user_data)

Emitted immediately after writing a portion of the message body to the network.

Unlike “wrote_chunk”, this is emitted after every successful write() call, not only after finishing a complete "chunk".

-

Parameters

-
+

Parameters

+
@@ -2649,15 +2619,15 @@ complete "chunk".

-

Flags: Run First

-

Since 2.24

+

Flags: Run First

+

Since: 2.24


The “wrote-chunk” signal

void
 user_function (SoupMessage *msg,
-               gpointer     user_data)
+ gpointer user_data)

Emitted immediately after writing a body chunk for a message.

Note that this signal is not parallel to “got_chunk”; it is emitted only when a complete @@ -2666,8 +2636,8 @@ chunk (added with “wrote_body_data”.

-

Parameters

-
+

Parameters

+
@@ -2687,21 +2657,21 @@ more useful continuous progress information, use
-

Flags: Run First

+

Flags: Run First


The “wrote-headers” signal

void
 user_function (SoupMessage *msg,
-               gpointer     user_data)
+ gpointer user_data)

Emitted immediately after writing the headers for a message. (For a client-side message, this is after writing the request headers; for a server-side message, it is after writing the response headers.)

-

Parameters

-
+

Parameters

+
@@ -2721,19 +2691,19 @@ writing the response headers.)

-

Flags: Run First

+

Flags: Run First


The “wrote-informational” signal

void
 user_function (SoupMessage *msg,
-               gpointer     user_data)
+ gpointer user_data)

Emitted immediately after writing a 1xx (Informational) response for a (server-side) message.

-

Parameters

-
+

Parameters

+
@@ -2753,7 +2723,7 @@ response for a (server-side) message.

-

Flags: Run First

+

Flags: Run First

@@ -2762,7 +2732,6 @@ response for a (server-side) message.

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupMessageBody.html b/docs/reference/html/SoupMessageBody.html index a82bcd9d..ec02c57f 100644 --- a/docs/reference/html/SoupMessageBody.html +++ b/docs/reference/html/SoupMessageBody.html @@ -2,20 +2,20 @@ -libsoup Reference Manual: SoupMessageBody - +SoupMessageBody: libsoup Reference Manual + - + - + @@ -34,7 +34,7 @@

Functions

-
+
@@ -74,7 +74,7 @@

soup_buffer_new_subbuffer ()

SoupBuffer *
 soup_buffer_new_subbuffer (SoupBuffer *parent,
-                           gsize offset,
-                           gsize length);
+ gsize offset, + gsize length);

Creates a new SoupBuffer containing length bytes "copied" from parent @@ -326,8 +325,8 @@ any data, but will instead simply reference the same data as parent does.)

-

Parameters

-
-gpointer +gpointer soup_buffer_get_owner () @@ -106,7 +106,7 @@
-GBytes * +GBytes * soup_buffer_get_as_bytes () @@ -138,7 +138,7 @@
-gboolean +gboolean soup_message_body_get_accumulate () @@ -221,7 +221,7 @@

Types and Values

-
+
@@ -244,7 +244,7 @@

Object Hierarchy

-
    GBoxed
+
    GBoxed
     ├── SoupBuffer
     ╰── SoupMessageBody
 
@@ -270,14 +270,14 @@ represented as a

soup_buffer_new ()

SoupBuffer *
 soup_buffer_new (SoupMemoryUse use,
-                 gconstpointer data,
-                 gsize length);
+ gconstpointer data, + gsize length);

Creates a new SoupBuffer containing length bytes from data .

-

Parameters

-
+

Parameters

+
@@ -292,8 +292,8 @@ is to be used by the buffer

- - + + @@ -305,9 +305,8 @@ is to be used by the buffer

data

data

 

data.

[array length=length][element-type guint8]

length

-

Returns

+

Returns

the new SoupBuffer.

-


@@ -315,8 +314,8 @@ is to be used by the buffer

+

Parameters

+
@@ -355,19 +354,18 @@ to start at

-

Returns

+

Returns

the new SoupBuffer.

-


soup_buffer_new_with_owner ()

SoupBuffer *
-soup_buffer_new_with_owner (gconstpointer data,
-                            gsize length,
-                            gpointer owner,
-                            GDestroyNotify owner_dnotify);
+soup_buffer_new_with_owner (gconstpointer data, + gsize length, + gpointer owner, + GDestroyNotify owner_dnotify);

Creates a new SoupBuffer containing length bytes from data . When @@ -387,9 +385,9 @@ returned from libxml without needing to do an extra copy:

1
 2
 3
xmlDocDumpMemory (doc, &xmlbody, &len);
-return soup_buffer_new_with_owner (xmlbody, len, xmlbody,
-                                   (GDestroyNotify)xmlFree);
xmlDocDumpMemory (doc, &xmlbody, &len);
+return soup_buffer_new_with_owner (xmlbody, len, xmlbody,
+                                   (GDestroyNotify)xmlFree);
@@ -403,8 +401,8 @@ they would be different (eg, owner would be a pointer to one of the object's fields).

-

Parameters

-
+

Parameters

+
@@ -413,8 +411,8 @@ would be a pointer to one of the object's fields).

- - + + @@ -430,35 +428,35 @@ would be a pointer to one of the object's fields).

- - +

data

data

 

data.

[array length=length][element-type guint8]

length

owner_dnotify

a function to free/unref owner +

a function to free/unref owner when the buffer is freed.

[allow-none][allow-none]
-

Returns

+

Returns

the new SoupBuffer.

-


soup_buffer_new_take ()

SoupBuffer *
-soup_buffer_new_take (guchar *data,
-                      gsize length);
+soup_buffer_new_take (guchar *data, + gsize length);

Creates a new SoupBuffer containing length bytes from data .

This function is exactly equivalent to soup_buffer_new() with SOUP_MEMORY_TAKE as first argument; it exists mainly for convenience and simplifying language bindings.

+

[rename-to soup_buffer_new]

-

Parameters

-
+

Parameters

+
@@ -467,7 +465,7 @@ convenience and simplifying language bindings.

- + @@ -480,23 +478,21 @@ convenience and simplifying language bindings.

data

data.

data.

[array length=length][transfer full]
-

Returns

+

Returns

the new SoupBuffer.

-

Rename to: soup_buffer_new

-

-

Since 2.32

+

Since: 2.32


soup_buffer_get_owner ()

-
gpointer
+
gpointer
 soup_buffer_get_owner (SoupBuffer *buffer);

Gets the "owner" object for a buffer created with soup_buffer_new_with_owner().

-

Parameters

-
+

Parameters

+
@@ -510,8 +506,8 @@ soup_buffer_get_owner ( -

Returns

-

the owner pointer.

+

Returns

+

the owner pointer.

[transfer none]

@@ -520,14 +516,14 @@ soup_buffer_get_owner (

soup_buffer_get_data ()

void
 soup_buffer_get_data (SoupBuffer *buffer,
-                      const guint8 **data,
-                      gsize *length);
+ const guint8 **data, + gsize *length);

This function exists for use by language bindings, because it's not currently possible to get the right effect by annotating the fields of SoupBuffer.

-

Parameters

-
+

Parameters

+
@@ -541,19 +537,19 @@ of Sou - - +

data

the pointer +

the pointer to the buffer data is stored here.

[out][array length=length][transfer none]

length

the length of the buffer data is stored here.

the length of the buffer data is stored here.

[out]
-

Since 2.32

+

Since: 2.32


@@ -570,8 +566,8 @@ created with -

Parameters

-
+

Parameters

+
@@ -585,9 +581,8 @@ will remain valid after the temporary buffer is freed.

-

Returns

+

Returns

the new (or newly-reffed) buffer

-


@@ -601,8 +596,8 @@ soup_buffer_free (buffer .)

-

Parameters

-
+

Parameters

+
@@ -619,16 +614,16 @@ or may not actually free buffer

soup_buffer_get_as_bytes ()

-
GBytes *
+
GBytes *
 soup_buffer_get_as_bytes (SoupBuffer *buffer);
-

Creates a GBytes pointing to the same memory as buffer +

Creates a GBytes pointing to the same memory as buffer . The -GBytes will hold a reference on buffer +GBytes will hold a reference on buffer to ensure that it is not -freed while the GBytes is still valid.

+freed while the GBytes is still valid.

-

Parameters

-
+

Parameters

+
@@ -642,12 +637,12 @@ freed while the -

Returns

-

a new GBytes which has the same content +

Returns

+

a new GBytes which has the same content as the SoupBuffer.

[transfer full]

-

Since 2.40

+

Since: 2.40


@@ -657,9 +652,8 @@ soup_message_body_new (voidCreates a new SoupMessageBody. SoupMessage uses this internally; you will not normally need to call it yourself.

-

Returns

+

Returns

a new SoupMessageBody.

-


@@ -671,8 +665,8 @@ soup_message_body_free (SoupMessage frees its associated message bodies automatically.

-

Parameters

-
+

Parameters

+
@@ -691,26 +685,26 @@ soup_message_body_free (

soup_message_body_set_accumulate ()

void
 soup_message_body_set_accumulate (SoupMessageBody *body,
-                                  gboolean accumulate);
+ gboolean accumulate);

Sets or clears the accumulate flag on body . (The default value is -TRUE.) If set to FALSE, body +TRUE.) If set to FALSE, body 's data field will not be filled in after the body is fully sent/received, and the chunks that make up body may be discarded when they are no longer needed.

-

In particular, if you set this flag to FALSE on an "incoming" +

In particular, if you set this flag to FALSE on an "incoming" message body (that is, the “response_body” of a client-side message, or “request_body” of a server-side message), this will cause each chunk of the body to be discarded after its corresponding “got_chunk” signal is emitted. (This is equivalent to setting the deprecated SOUP_MESSAGE_OVERWRITE_CHUNKS flag on the message.)

-

If you set this flag to FALSE on the “response_body” of +

If you set this flag to FALSE on the “response_body” of a server-side message, it will cause each chunk of the body to be discarded after its corresponding “wrote_chunk” signal is emitted.

-

If you set the flag to FALSE on the “request_body” of a +

If you set the flag to FALSE on the “request_body” of a client-side message, it will block the accumulation of chunks into body 's data field, but it will not normally cause the chunks to @@ -722,8 +716,8 @@ due to redirection or authentication. However, if you set the be discarded, and you will be responsible for recreating the request body after the “restarted” signal is emitted.

-

Parameters

-
+

Parameters

+
@@ -744,19 +738,19 @@ request body after the Since 2.24

+

Since: 2.24


soup_message_body_get_accumulate ()

-
gboolean
+
gboolean
 soup_message_body_get_accumulate (SoupMessageBody *body);

Gets the accumulate flag on body ; see soup_message_body_set_accumulate() for details.

-

Parameters

-
+

Parameters

+
@@ -770,12 +764,11 @@ soup_message_body_get_accumulate (
-

Returns

+

Returns

the accumulate flag for body .

-

-

Since 2.24

+

Since: 2.24


@@ -783,16 +776,16 @@ soup_message_body_get_accumulate (void soup_message_body_append (SoupMessageBody *body, SoupMemoryUse use, - gconstpointer data, - gsize length); + gconstpointer data, + gsize length);

Appends length bytes from data to body according to use .

-

Parameters

-
+

Parameters

+
@@ -812,7 +805,7 @@ soup_message_body_append (

data

-
+ @@ -834,13 +827,13 @@ soup_message_body_append_buffer (Appends the data from buffer to body . (SoupMessageBody uses -SoupBuffers internally, so this is normally a constant-time +SoupBuffers internally, so this is normally a constant-time operation that doesn't actually require copying the data in buffer .)

-

Parameters

-

data to append.

data to append.

[array length=length][element-type guint8]
+

Parameters

+
@@ -866,8 +859,8 @@ operation that doesn't actually require copying the data in

soup_message_body_append_take ()

void
 soup_message_body_append_take (SoupMessageBody *body,
-                               guchar *data,
-                               gsize length);
+ guchar *data, + gsize length);

Appends length bytes from data to body @@ -875,10 +868,10 @@ soup_message_body_append_take (This function is exactly equivalent to soup_message_body_append() with SOUP_MEMORY_TAKE as second argument; it exists mainly for convenience and simplifying language bindings.

-

Rename to: soup_message_body_append

+

[rename-to soup_message_body_append]

-

Parameters

-
+

Parameters

+
@@ -892,7 +885,7 @@ convenience and simplifying language bindings.

- + @@ -904,7 +897,7 @@ convenience and simplifying language bindings.

data

data to append.

data to append.

[array length=length][transfer full]
-

Since 2.32

+

Since: 2.32


@@ -914,8 +907,8 @@ soup_message_body_truncate (body .

-

Parameters

-
+

Parameters

+
@@ -938,8 +931,8 @@ soup_message_body_complete ( -

Parameters

-
+

Parameters

+
@@ -965,8 +958,8 @@ data in body 's length field).

-

Parameters

-
+

Parameters

+
@@ -980,11 +973,10 @@ length field).

-

Returns

+

Returns

a SoupBuffer containing the same data as body . (You must free this buffer if you do not want it.)

-


@@ -992,7 +984,7 @@ length field).

soup_message_body_get_chunk ()

SoupBuffer *
 soup_message_body_get_chunk (SoupMessageBody *body,
-                             goffset offset);
+ goffset offset);

Gets a SoupBuffer containing data from body starting at offset . @@ -1009,13 +1001,13 @@ then the return value depends on whether or not then soup_message_body_get_chunk() will return a 0-length chunk (indicating the end of body ). If it has not, then -soup_message_body_get_chunk() will return NULL (indicating that +soup_message_body_get_chunk() will return NULL (indicating that body may still potentially have more data, but that data is not currently available).

-

Parameters

-
+

Parameters

+
@@ -1036,9 +1028,9 @@ currently available).

-

Returns

-

a SoupBuffer, or NULL.

-

+

Returns

+

a SoupBuffer, or NULL.

+

[nullable]


@@ -1053,12 +1045,12 @@ the network. Normally this means appending chunksoup_message_body_append_buffer(), but if you have set body -'s accumulate flag to FALSE, then that will not happen.

+'s accumulate flag to FALSE, then that will not happen.

This is a low-level method which you should not normally need to use.

-

Parameters

-
+

Parameters

+
@@ -1078,7 +1070,7 @@ use.

-

Since 2.24

+

Since: 2.24


@@ -1089,15 +1081,15 @@ soup_message_body_wrote_chunk (Handles the SoupMessageBody part of writing a chunk of data to the network. Normally this is a no-op, but if you have set body 's -accumulate flag to FALSE, then this will cause chunk +accumulate flag to FALSE, then this will cause chunk to be discarded to free up memory.

This is a low-level method which you should not need to use, and there are further restrictions on its proper use which are not documented here.

-

Parameters

-
+

Parameters

+
@@ -1117,7 +1109,7 @@ documented here.

-

Since 2.24

+

Since: 2.24

@@ -1133,10 +1125,10 @@ documented here.

SoupMessageBody.

data is a char because that's generally convenient; in some -situations you may need to cast it to guchar or another type.

+situations you may need to cast it to guchar or another type.

-

Members

-
+

Members

+
@@ -1145,11 +1137,11 @@ situations you may need to cast it to

const char *data;

- + - + @@ -1166,8 +1158,8 @@ caller.

See also soup_buffer_new_with_owner(), which allows to you create a buffer containing data which is owned by another object.

-

Members

-

the data.

the data.

[type gpointer]

gsize length;

gsize length;

length of data

 
+

Members

+
@@ -1188,7 +1180,7 @@ need to worry about it being modified or freed.

@@ -1230,7 +1222,7 @@ as well, rather than reusing the original memory.

Note that while length always reflects the full length of the message body, data - is normally NULL, and will only be filled in + is normally NULL, and will only be filled in after soup_message_body_flatten() is called. For client-side messages, this automatically happens for the response body after it has been fully read, unless you set the @@ -1242,8 +1234,8 @@ read.

with a '\0' byte (which is not reflected in length ).

-

Members

-

The caller has allocated the memory for the SoupBuffer's use; libsoup will assume ownership of it and free it -(with g_free()) when it is done with it.

+(with g_free()) when it is done with it.

 
+

Members

+
@@ -1256,7 +1248,7 @@ with a '\0' byte (which is not reflected in length  - + @@ -1272,7 +1264,6 @@ with a '\0' byte (which is not reflected in length +
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupMessageHeaders.html b/docs/reference/html/SoupMessageHeaders.html index 36f3ef79..237e4fdc 100644 --- a/docs/reference/html/SoupMessageHeaders.html +++ b/docs/reference/html/SoupMessageHeaders.html @@ -2,20 +2,20 @@ -libsoup Reference Manual: SoupMessageHeaders - +SoupMessageHeaders: libsoup Reference Manual + - + -

goffset length;

goffset length;

length of data

 
+ @@ -34,7 +34,7 @@

Functions

-
+
@@ -111,10 +111,27 @@ - + + + + + + + + @@ -143,7 +160,7 @@ +stream =soup_session_send(session, msg, cancellable, &error);
const char * + +SoupMessageHeadersType + +soup_message_headers_get_headers_type () +
+gboolean + +soup_message_headers_header_contains () +
+gboolean -soup_message_headers_get () +soup_message_headers_header_equals ()
-gboolean +gboolean soup_message_headers_iter_next () @@ -167,7 +184,7 @@
-goffset +goffset soup_message_headers_get_content_length () @@ -214,7 +231,7 @@
-gboolean +gboolean soup_message_headers_get_content_disposition () @@ -230,7 +247,7 @@
-gboolean +gboolean soup_message_headers_get_ranges () @@ -262,7 +279,7 @@
-gboolean +gboolean soup_message_headers_get_content_range () @@ -281,7 +298,7 @@

Types and Values

-
+
@@ -316,7 +333,7 @@

Object Hierarchy

-
    GBoxed
+
    GBoxed
     ╰── SoupMessageHeaders
 
@@ -340,8 +357,8 @@ soup_message_headers_new ( -

Parameters

-
+

Parameters

+
@@ -355,9 +372,8 @@ method if you are manually parsing or generating message headers.)

-

Returns

+

Returns

a new SoupMessageHeaders

-


@@ -368,8 +384,8 @@ soup_message_headers_free (hdrs .

-

Parameters

-
+

Parameters

+
@@ -403,8 +419,8 @@ second one, which is only allowed for list-valued headers; see also are syntactically correct.

-

Parameters

-
+

Parameters

+
@@ -448,8 +464,8 @@ also
-

Parameters

-
+

Parameters

+
@@ -488,8 +504,8 @@ soup_message_headers_remove ( -

Parameters

-
+

Parameters

+
@@ -518,8 +534,8 @@ soup_message_headers_clear (hdrs .

-

Parameters

-
+

Parameters

+
@@ -541,8 +557,8 @@ soup_message_headers_clean_connection_headers (SoupMessageHeaders *hdrs);

Removes all the headers listed in the Connection header.

-

Parameters

-
+

Parameters

+
@@ -555,7 +571,7 @@ soup_message_headers_clean_connection_headers
-

Since 2.36

+

Since: 2.36


@@ -575,8 +591,8 @@ is not defined which one will be returned. (Ideally, it will return whichever one makes libsoup most compatible with other HTTP implementations.)

-

Parameters

-
+

Parameters

+
@@ -597,11 +613,11 @@ implementations.)

-

Returns

-

the header's value or NULL if not found.

-

+

Returns

+

the header's value or NULL if not found.

+

[nullable]

-

Since 2.28

+

Since: 2.28


@@ -625,8 +641,8 @@ with it anyway, because the HTTP spec explicitly states that this transformation is allowed, and so an upstream proxy could do the same thing.

-

Parameters

-
+

Parameters

+
@@ -647,36 +663,58 @@ same thing.

-

Returns

-

the header's value or NULL if not found.

-

+

Returns

+

the header's value or NULL if not found.

+

[nullable]

-

Since 2.28

+

Since: 2.28


-

soup_message_headers_get ()

-
const char *
-soup_message_headers_get (SoupMessageHeaders *hdrs,
-                          const char *name);
-
-

soup_message_headers_get is deprecated and should not be used in newly-written code.

-

Use soup_message_headers_get_one() or -soup_message_headers_get_list() instead.

+

soup_message_headers_get_headers_type ()

+
SoupMessageHeadersType
+soup_message_headers_get_headers_type (SoupMessageHeaders *hdrs);
+

Gets the type of headers.

+
+

Parameters

+
+++++ + + + + + +

hdrs

a SoupMessageHeaders

 
-

Gets the value of header name - in hdrs +

+

Returns

+

the header's type.

+
+

Since: 2.50

+
+
+
+

soup_message_headers_header_contains ()

+
gboolean
+soup_message_headers_header_contains (SoupMessageHeaders *hdrs,
+                                      const char *name,
+                                      const char *token);
+

Checks whether the list-valued header name + is present in hdrs +, +and contains a case-insensitive match for token .

-

This method was supposed to work correctly for both single-valued -and list-valued headers, but because some HTTP clients/servers -mistakenly send multiple copies of headers that are supposed to be -single-valued, it sometimes returns incorrect results. To fix this, -the methods soup_message_headers_get_one() and -soup_message_headers_get_list() were introduced, so callers can -explicitly state which behavior they are expecting.

+

(If name + is present in hdrs +, then this is equivalent to calling +soup_header_contains() on its value.)

-

Parameters

-
+

Parameters

+
@@ -693,14 +731,68 @@ explicitly state which behavior they are expecting.

+ + + + +

header name

 

token

token to look for

 
-

Returns

-

as with soup_message_headers_get_list().

-

+

Returns

+

TRUE if the header is present and contains token +, +FALSE otherwise.

+

Since: 2.50

+
+
+
+

soup_message_headers_header_equals ()

+
gboolean
+soup_message_headers_header_equals (SoupMessageHeaders *hdrs,
+                                    const char *name,
+                                    const char *value);
+

Checks whether the header name + is present in hdrs + and is +(case-insensitively) equal to value +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

hdrs

a SoupMessageHeaders

 

name

header name

 

value

expected value

 
+
+
+

Returns

+

TRUE if the header is present and its value is +value +, FALSE otherwise.

+
+

Since: 2.50


@@ -708,11 +800,11 @@ explicitly state which behavior they are expecting.

void
 (*SoupMessageHeadersForeachFunc) (const char *name,
                                   const char *value,
-                                  gpointer user_data);
+ gpointer user_data);

The callback passed to soup_message_headers_foreach().

-

Parameters

-
+

Parameters

+
@@ -744,11 +836,11 @@ explicitly state which behavior they are expecting.

void
 soup_message_headers_foreach (SoupMessageHeaders *hdrs,
                               SoupMessageHeadersForeachFunc func,
-                              gpointer user_data);
+ gpointer user_data);

Calls func once for each header value in hdrs .

-

Beware that unlike soup_message_headers_get(), this processes the +

Beware that unlike soup_message_headers_get(), this processes the headers in exactly the way they were added, rather than concatenating multiple same-named headers into a single value. (This is intentional; it ensures that if you call @@ -759,8 +851,8 @@ required for interoperability in some cases.)

You may not modify the headers from func .

-

Parameters

-
+

Parameters

+
@@ -774,7 +866,7 @@ required for interoperability in some cases.)

- + @@ -797,8 +889,8 @@ soup_message_headers_iter_init (hdrs .

-

Parameters

-

func

callback function to run for each header.

callback function to run for each header.

[scope call]
+

Parameters

+
@@ -807,7 +899,7 @@ soup_message_headers_iter_init ( - @@ -823,7 +915,7 @@ structure.


soup_message_headers_iter_next ()

-
gboolean
+
gboolean
 soup_message_headers_iter_next (SoupMessageHeadersIter *iter,
                                 const char **name,
                                 const char **value);
@@ -831,13 +923,13 @@ soup_message_headers_iter_next (iter . If iter has already yielded the last header, -then soup_message_headers_iter_next() will return FALSE and name +then soup_message_headers_iter_next() will return FALSE and name and value will be unchanged.

-

Parameters

-

iter

a pointer to a SoupMessageHeadersIter +

a pointer to a SoupMessageHeadersIter structure.

[out][transfer none]
+

Parameters

+
@@ -846,18 +938,18 @@ and value - + - - @@ -865,10 +957,9 @@ the header value in.

iter

a SoupMessageHeadersIter.

a SoupMessageHeadersIter.

[inout][transfer none]

name

pointer to a variable to return +

pointer to a variable to return the header name in.

[out][transfer none]

value

pointer to a variable to return +

pointer to a variable to return the header value in.

[out][transfer none]
-

Returns

-

TRUE if another name and value were returned, FALSE +

Returns

+

TRUE if another name and value were returned, FALSE if the end of the headers has been reached.

-


@@ -882,8 +973,8 @@ always correspond to the encoding used on the wire; eg, a HEAD response may declare a Content-Length or Transfer-Encoding, but it will never actually include a body.

-

Parameters

-
+

Parameters

+
@@ -897,10 +988,9 @@ it will never actually include a body.

-

Returns

+

Returns

the encoding declared by hdrs .

-


@@ -914,8 +1004,8 @@ soup_message_headers_set_encoding (
-

Parameters

-
+

Parameters

+
@@ -939,7 +1029,7 @@ chunked encoding.


soup_message_headers_get_content_length ()

-
goffset
+
goffset
 soup_message_headers_get_content_length
                                (SoupMessageHeaders *hdrs);

Gets the message body length that hdrs @@ -947,8 +1037,8 @@ soup_message_headers_get_content_length be non-0 if soup_message_headers_get_encoding() returns SOUP_ENCODING_CONTENT_LENGTH.

-

Parameters

-
+

Parameters

+
@@ -962,10 +1052,9 @@ be non-0 if -

Returns

+

Returns

the message body length declared by hdrs .

-


@@ -974,7 +1063,7 @@ be non-0 if void soup_message_headers_set_content_length (SoupMessageHeaders *hdrs, - goffset content_length); + goffset content_length);

Sets the message body length that hdrs will declare, and sets hdrs @@ -989,8 +1078,8 @@ generating the response to a HEAD request; Calling correct content length into the response without needing to waste memory by filling in a response body which won't actually be sent.

-

Parameters

-
+

Parameters

+
@@ -1021,8 +1110,8 @@ soup_message_headers_get_expectations (SOUP_EXPECTATION_CONTINUE or SOUP_EXPECTATION_UNRECOGNIZED.

-

Parameters

-
+

Parameters

+
@@ -1036,10 +1125,9 @@ Currently this will either be -

Returns

+

Returns

the contents of hdrs 's "Expect" header

-


@@ -1060,8 +1148,8 @@ post, or because you're POSTing to a URL that doesn't exist). This saves you from having to transmit the large request body when the server is just going to ignore it anyway.

-

Parameters

-
+

Parameters

+
@@ -1087,17 +1175,17 @@ server is just going to ignore it anyway.

soup_message_headers_get_content_type ()

const char *
 soup_message_headers_get_content_type (SoupMessageHeaders *hdrs,
-                                       GHashTable **params);
+ GHashTable **params);

Looks up the "Content-Type" header in hdrs , parses it, and returns its value in *content_type and *params . params - can be NULL if you + can be NULL if you are only interested in the content type itself.

-

Parameters

-
+

Parameters

+
@@ -1111,23 +1199,24 @@ are only interested in the content type itself.

- - + +

params

return location for the Content-Type parameters (eg, "charset"), or -NULL.

[out][element-type utf8 utf8][allow-none][transfer full]

return location for the Content-Type parameters (eg, "charset"), or +NULL.

[out][element-type utf8 utf8][allow-none][transfer full]
-

Returns

-

a string with the value of the "Content-Type" header -or NULL if hdrs -does not contain that header or it cannot be -parsed (in which case *params -will be unchanged).

-

+

Returns

+

a string with the value of the +"Content-Type" header or NULL if hdrs +does not contain that +header or it cannot be parsed (in which case *params +will be +unchanged).

+

[nullable]

-

Since 2.26

+

Since: 2.26


@@ -1135,15 +1224,15 @@ will be unchanged).

void
 soup_message_headers_set_content_type (SoupMessageHeaders *hdrs,
                                        const char *content_type,
-                                       GHashTable *params);
+ GHashTable *params);

Sets the "Content-Type" header in hdrs to content_type , optionally with additional parameters specified in params .

-

Parameters

-
+

Parameters

+
@@ -1162,30 +1251,30 @@ optionally with additional parameters specified in p - - + +

params

additional -parameters, or NULL.

[allow-none][element-type utf8 utf8]

additional +parameters, or NULL.

[allow-none][element-type utf8 utf8]
-

Since 2.26

+

Since: 2.26


soup_message_headers_get_content_disposition ()

-
gboolean
+
gboolean
 soup_message_headers_get_content_disposition
                                (SoupMessageHeaders *hdrs,
                                 char **disposition,
-                                GHashTable **params);
+ GHashTable **params);

Looks up the "Content-Disposition" header in hdrs , parses it, and returns its value in *disposition and *params . params can be -NULL if you are only interested in the disposition-type.

+NULL if you are only interested in the disposition-type.

In HTTP, the most common use of this header is to set a disposition-type of "attachment", to suggest to the browser that a response should be saved to disk rather than displayed in the @@ -1199,8 +1288,8 @@ test this yourself.)

this is handled automatically by SoupMultipart and the associated form methods.

-

Parameters

-
+

Parameters

+
@@ -1214,29 +1303,28 @@ form methods.

- + - +

disposition

return location for the -disposition-type, or NULL.

return location for the +disposition-type, or NULL.

[out][transfer full]

params

return -location for the Content-Disposition parameters, or NULL.

return +location for the Content-Disposition parameters, or NULL.

[out][transfer full][element-type utf8 utf8]
-

Returns

-

TRUE if hdrs +

Returns

+

TRUE if hdrs contains a "Content-Disposition" -header, FALSE if not (in which case *disposition +header, FALSE if not (in which case *disposition and *params will be unchanged).

-

-

Since 2.26

+

Since: 2.26


@@ -1245,7 +1333,7 @@ will be unchanged).

soup_message_headers_set_content_disposition (SoupMessageHeaders *hdrs, const char *disposition, - GHashTable *params); + GHashTable *params);

Sets the "Content-Disposition" header in hdrs to disposition , @@ -1254,8 +1342,8 @@ optionally with additional parameters specified in p

See soup_message_headers_get_content_disposition() for a discussion of how Content-Disposition is used in HTTP.

-

Parameters

-
+

Parameters

+
@@ -1274,21 +1362,21 @@ of how Content-Disposition is used in HTTP.

- - + +

params

additional -parameters, or NULL.

[allow-none][element-type utf8 utf8]

additional +parameters, or NULL.

[allow-none][element-type utf8 utf8]
-

Since 2.26

+

Since: 2.26


soup_message_headers_get_ranges ()

-
gboolean
+
gboolean
 soup_message_headers_get_ranges (SoupMessageHeaders *hdrs,
-                                 goffset total_length,
+                                 goffset total_length,
                                  SoupRange **ranges,
                                  int *length);

Parses hdrs @@ -1322,8 +1410,8 @@ body available, and only want to generate the parts that were actually requested by the client.

-

Parameters

-
+

Parameters

+
@@ -1342,8 +1430,9 @@ actually requested by the client. - - + + @@ -1354,15 +1443,14 @@ actually requested by the client.

ranges

return location for an array of SoupRange.

[out]

return location for an array +of SoupRange.

[out][array length=length]

length

-

Returns

-

TRUE if hdrs +

Returns

+

TRUE if hdrs contained a syntactically-valid -"Range" header, FALSE otherwise (in which case range +"Range" header, FALSE otherwise (in which case range and length will not be set).

-

-

Since 2.26

+

Since: 2.26


@@ -1376,8 +1464,8 @@ soup_message_headers_set_ranges (soup_message_headers_set_range().)

-

Parameters

-
+

Parameters

+
@@ -1403,15 +1491,15 @@ only want to request a single range, you can use
-

Since 2.26

+

Since: 2.26


soup_message_headers_set_range ()

void
 soup_message_headers_set_range (SoupMessageHeaders *hdrs,
-                                goffset start,
-                                goffset end);
+ goffset start, + goffset end);

Sets hdrs 's Range header to request the indicated range. start @@ -1420,8 +1508,8 @@ soup_message_headers_set_range (If you need to request multiple ranges, use soup_message_headers_set_ranges().

-

Parameters

-
+

Parameters

+
@@ -1446,7 +1534,7 @@ soup_message_headers_set_range (
-

Since 2.26

+

Since: 2.26


@@ -1456,8 +1544,8 @@ soup_message_headers_free_ranges (SoupRange *ranges);

Frees the array of ranges returned from soup_message_headers_get_ranges().

-

Parameters

-
+

Parameters

+
@@ -1477,17 +1565,17 @@ soup_message_headers_free_ranges (
-

Since 2.26

+

Since: 2.26


soup_message_headers_get_content_range ()

-
gboolean
+
gboolean
 soup_message_headers_get_content_range
                                (SoupMessageHeaders *hdrs,
-                                goffset *start,
-                                goffset *end,
-                                goffset *total_length);
+ goffset *start, + goffset *end, + goffset *total_length);

Parses hdrs 's Content-Range header and returns it in start , @@ -1497,8 +1585,8 @@ soup_message_headers_get_content_range was specified as "*", then total_length will be set to -1.

-

Parameters

-
+

Parameters

+
@@ -1512,31 +1600,30 @@ was specified as "*", then total_length - - + + - - + + - - + +

start

return value for the start of the range

 

return value for the start of the range.

[out]

end

return value for the end of the range

 

return value for the end of the range.

[out]

total_length

return value for the total length of the resource, -or NULL if you don't care.

 

return value for the total length of the +resource, or NULL if you don't care.

[out][optional]
-

Returns

-

TRUE if hdrs +

Returns

+

TRUE if hdrs contained a "Content-Range" header -containing a byte range which could be parsed, FALSE otherwise.

-

+containing a byte range which could be parsed, FALSE otherwise.

-

Since 2.26

+

Since: 2.26


@@ -1544,9 +1631,9 @@ containing a byte range which could be parsed, void soup_message_headers_set_content_range (SoupMessageHeaders *hdrs, - goffset start, - goffset end, - goffset total_length); + goffset start, + goffset end, + goffset total_length);

Sets hdrs 's Content-Range header according to the given values. (Note that total_length @@ -1560,8 +1647,8 @@ not normally need to call this function youself. See soup_message_headers_get_ranges() for more details.

-

Parameters

-
+

Parameters

+
@@ -1591,7 +1678,7 @@ not normally need to call this function youself. See
-

Since 2.26

+

Since: 2.26

@@ -1608,8 +1695,8 @@ not normally need to call this function youself. See

Value passed to soup_message_headers_new() to set certain default behaviors.

-

Members

-
+

Members

+
@@ -1659,8 +1746,8 @@ structure.

enum SoupEncoding

How a message body is encoded for transport

-

Members

-
+

Members

+
@@ -1721,8 +1808,8 @@ use: NOT CURRENTLY IMPLEMENTED)

enum SoupExpectation

Represents the parsed value of the "Expect" header.

-

Members

-
+

Members

+
@@ -1782,8 +1869,8 @@ range", referring to the last -start = -500 and end = -1.)

-

Members

-
+

Members

+
@@ -1791,19 +1878,19 @@ range", referring to the last -start - + - +

goffset start;

goffset start;

the start of the range

 

goffset end;

goffset end;

the end of the range

 
-

Since 2.26

+

Since: 2.26

@@ -1812,7 +1899,6 @@ range", referring to the last -start
+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupMultipart.html b/docs/reference/html/SoupMultipart.html index 25580672..b5bc3c74 100644 --- a/docs/reference/html/SoupMultipart.html +++ b/docs/reference/html/SoupMultipart.html @@ -2,20 +2,20 @@ -libsoup Reference Manual: SoupMultipart - +SoupMultipart: libsoup Reference Manual + - + - + @@ -34,7 +34,7 @@

Functions

-
+
@@ -74,7 +74,7 @@ - +msg =soup_message_new("POST","http://example.com/form.cgi"); +soup_message_set_request(msg,"application/x-www-form-urlencoded", + SOUP_MEMORY_COPY, formdata,strlen(formdata)); +soup_message_headers_append(msg->request_headers,"Referer", referring_url);
-gboolean +gboolean soup_multipart_get_part () @@ -117,7 +117,7 @@

Types and Values

-
+
@@ -130,7 +130,7 @@

Object Hierarchy

-
    GBoxed
+
    GBoxed
     ╰── SoupMultipart
 
@@ -153,8 +153,8 @@ boundary string. Note that mime_type must be the full MIME type, including "multipart/".

-

Parameters

-
+

Parameters

+
@@ -168,12 +168,11 @@ including "multipart/".

-

Returns

+

Returns

a new empty SoupMultipart of the given mime_type

-

-

Since 2.26

+

Since: 2.26


@@ -185,8 +184,8 @@ soup_multipart_new_from_message (body to form a new SoupMultipart

-

Parameters

-
+

Parameters

+
@@ -207,12 +206,12 @@ soup_multipart_new_from_message (
-

Returns

-

a new SoupMultipart (or NULL if the message couldn't -be parsed or wasn't multipart).

-

+

Returns

+

a new SoupMultipart (or NULL if the +message couldn't be parsed or wasn't multipart).

+

[nullable]

-

Since 2.26

+

Since: 2.26


@@ -222,8 +221,8 @@ soup_multipart_free (multipart

-

Parameters

-
+

Parameters

+
@@ -236,7 +235,7 @@ soup_multipart_free (Since 2.26

+

Since: 2.26


+

Parameters

+
@@ -261,17 +260,16 @@ soup_multipart_get_length ( -

Returns

+

Returns

the number of body parts in multipart

-

-

Since 2.26

+

Since: 2.26


soup_multipart_get_part ()

-
gboolean
+
gboolean
 soup_multipart_get_part (SoupMultipart *multipart,
                          int part,
                          SoupMessageHeaders **headers,
@@ -279,8 +277,8 @@ soup_multipart_get_part (multipart
 .

-

Parameters

-
+

Parameters

+
@@ -299,13 +297,13 @@ soup_multipart_get_part (

headers

-
- @@ -313,15 +311,14 @@ body.

return location for the MIME part +

return location for the MIME part headers.

[out][transfer none]

body

return location for the MIME part +

return location for the MIME part body.

[out][transfer none]
-

Returns

-

TRUE on success, FALSE if part +

Returns

+

TRUE on success, FALSE if part is out of range (in which case headers and body won't be set)

-

-

Since 2.26

+

Since: 2.26


@@ -338,8 +335,8 @@ soup_multipart_append_part ( -

Parameters

-
+

Parameters

+
@@ -364,7 +361,7 @@ else.)

-

Since 2.26

+

Since: 2.26


@@ -380,8 +377,8 @@ soup_multipart_append_form_string (soup_form_request_new_from_multipart() for more details.

-

Parameters

-
+

Parameters

+
@@ -407,7 +404,7 @@ details.

-

Since 2.26

+

Since: 2.26


@@ -425,8 +422,8 @@ soup_multipart_append_form_file (soup_form_request_new_from_multipart() for more details.

-

Parameters

-
+

Parameters

+
@@ -445,12 +442,12 @@ details.

- + - + @@ -461,7 +458,7 @@ details.

filename

the name of the file, or NULL if not known

the name of the file, or NULL if not known

 

content_type

the MIME type of the file, or NULL if not known

the MIME type of the file, or NULL if not known

 
-

Since 2.26

+

Since: 2.26


@@ -475,8 +472,8 @@ soup_multipart_to_message (dest_body .

-

Parameters

-
+

Parameters

+
@@ -503,7 +500,7 @@ to

-

Since 2.26

+

Since: 2.26

@@ -522,7 +519,7 @@ according to MIME rules. For example, each body part is assumed to have "binary" Content-Transfer-Encoding, even if its headers explicitly state otherwise. In other words, don't try to use SoupMultipart for handling real MIME multiparts.

-

Since 2.26

+

Since: 2.26

@@ -531,7 +528,6 @@ explicitly state otherwise. In other words, don't try to use
+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupMultipartInputStream.html b/docs/reference/html/SoupMultipartInputStream.html index 725d93ed..1c088301 100644 --- a/docs/reference/html/SoupMultipartInputStream.html +++ b/docs/reference/html/SoupMultipartInputStream.html @@ -2,22 +2,22 @@ -libsoup Reference Manual: SoupMultipartInputStream - +SoupMultipartInputStream: libsoup Reference Manual + - + - + @@ -36,7 +36,7 @@

Functions

-
+
@@ -87,7 +87,7 @@

Properties

-
+
@@ -103,7 +103,7 @@

Types and Values

-
+
@@ -116,7 +116,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── GInputStream
         ╰── GFilterInputStream
             ╰── SoupMultipartInputStream
@@ -157,8 +157,8 @@ not be done directly through this object, use the input streams
 returned by soup_multipart_input_stream_next_part() or its async
 counterpart instead.

-

Parameters

-
+

Parameters

+
@@ -179,11 +179,10 @@ counterpart instead.

-

Returns

+

Returns

a new SoupMultipartInputStream

-

-

Since 2.40

+

Since: 2.40


@@ -200,8 +199,8 @@ made.

Note that if a part had no headers at all an empty SoupMessageHeaders will be returned.

-

Parameters

-
+

Parameters

+
@@ -215,13 +214,13 @@ will be returned.

-

Returns

-

a SoupMessageHeaders containing the headers -for the part currently being processed or NULL if the headers failed to -parse.

-

[transfer none]

+

Returns

+

a SoupMessageHeaders +containing the headers for the part currently being processed or +NULL if the headers failed to parse.

+

[nullable][transfer none]

-

Since 2.40

+

Since: 2.40


@@ -229,7 +228,7 @@ parse.

GInputStream *
 soup_multipart_input_stream_next_part (SoupMultipartInputStream *multipart,
                                        GCancellable *cancellable,
-                                       GError **error);
+ GError **error);

Obtains an input stream for the next part. When dealing with a multipart response the input stream needs to be wrapped in a SoupMultipartInputStream and this function or its async @@ -241,8 +240,8 @@ headers for the first part. A read of 0 bytes indicates the end of the part; a new call to this function should be done at that point, to obtain the next part.

-

Parameters

-
+

Parameters

+
@@ -261,19 +260,19 @@ to obtain the next part.

- +

error

a GError

a GError

 
-

Returns

-

a new GInputStream, or NULL if -there are no more parts.

-

[transfer full]

+

Returns

+

a new GInputStream, or +NULL if there are no more parts.

+

[nullable][transfer full]

-

Since 2.40

+

Since: 2.40


@@ -284,13 +283,13 @@ soup_multipart_input_stream_next_part_async int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, - gpointer data); + gpointer data);

Obtains a GInputStream for the next request. See soup_multipart_input_stream_next_part() for details on the workflow.

-

Parameters

-
+

Parameters

+
@@ -326,7 +325,7 @@ workflow.

-

Since 2.40

+

Since: 2.40


@@ -335,11 +334,11 @@ workflow.

soup_multipart_input_stream_next_part_finish (SoupMultipartInputStream *multipart, GAsyncResult *result, - GError **error); + GError **error);

Finishes an asynchronous request for the next part.

-

Parameters

-
+

Parameters

+
@@ -358,19 +357,20 @@ soup_multipart_input_stream_next_part_finish - +

error

a GError location to store any error, or NULL to ignore.

a GError location to store any error, or NULL to ignore.

 
-

Returns

-

a newly created GInputStream for -reading the next part or NULL if there are no more parts.

-

[transfer full]

+

Returns

+

a newly created +GInputStream for reading the next part or NULL if there are no +more parts.

+

[nullable][transfer full]

-

Since 2.40

+

Since: 2.40

@@ -378,8 +378,6 @@ reading the next part or

struct SoupMultipartInputStream

struct SoupMultipartInputStream;
-

-

@@ -393,7 +391,6 @@ reading the next part or -
- Generated by GTK-Doc V1.20
+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupProxyResolverDefault.html b/docs/reference/html/SoupProxyResolverDefault.html index 6f4b1c72..c52fa23b 100644 --- a/docs/reference/html/SoupProxyResolverDefault.html +++ b/docs/reference/html/SoupProxyResolverDefault.html @@ -2,22 +2,22 @@ -libsoup Reference Manual: SoupProxyResolverDefault - +SoupProxyResolverDefault: libsoup Reference Manual + - + - + @@ -36,7 +36,7 @@

Properties

-
+
@@ -52,7 +52,7 @@

Types and Values

-
+
@@ -65,7 +65,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupProxyResolverDefault
 
@@ -88,19 +88,18 @@ proxies.

In libsoup 2.44 and later, you can set the session's “proxy-resolver” property to the resolver returned by g_proxy_resolver_get_default() to get the same effect. Note that -for "plain" SoupSessions (ie, not SoupSessionAsync or +for "plain" SoupSessions (ie, not SoupSessionAsync or SoupSessionSync), this is done for you automatically.

Functions

+

Types and Values

SoupProxyResolverDefault

typedef struct _SoupProxyResolverDefault SoupProxyResolverDefault;
-

-

@@ -114,7 +113,6 @@ for "plain" SoupSessions
+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupRequest.html b/docs/reference/html/SoupRequest.html index 7c69f464..de7e8ba0 100644 --- a/docs/reference/html/SoupRequest.html +++ b/docs/reference/html/SoupRequest.html @@ -2,22 +2,22 @@ -libsoup Reference Manual: SoupRequest - +SoupRequest: libsoup Reference Manual + - + -
+ @@ -36,7 +36,7 @@

Functions

-
+
@@ -68,7 +68,7 @@
-goffset +goffset soup_request_get_content_length () @@ -102,7 +102,7 @@

Properties

-
+
@@ -126,7 +126,7 @@

Types and Values

-
+
@@ -149,7 +149,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupRequest
         ├── SoupRequestData
         ├── SoupRequestFile
@@ -179,15 +179,15 @@ to retrieve a particular URI.

GInputStream *
 soup_request_send (SoupRequest *request,
                    GCancellable *cancellable,
-                   GError **error);
+ GError **error);

Synchronously requests the URI pointed to by request , and returns a GInputStream that can be used to read its contents.

-

Note that you cannot use this method with SoupRequests attached to +

Note that you cannot use this method with SoupRequests attached to a SoupSessionAsync.

-

Parameters

-
+

Parameters

+
@@ -201,25 +201,25 @@ a - + - +

cancellable

a GCancellable or NULL

a GCancellable or NULL

 

error

return location for a GError, or NULL

return location for a GError, or NULL

 
-

Returns

-

a GInputStream that can be used to +

Returns

+

a GInputStream that can be used to read from the URI pointed to by request .

[transfer full]

-

Since 2.42

+

Since: 2.42


@@ -228,15 +228,15 @@ read from the URI pointed to by request soup_request_send_async (SoupRequest *request, GCancellable *cancellable, GAsyncReadyCallback callback, - gpointer user_data); + gpointer user_data);

Begins an asynchronously request for the URI pointed to by request .

-

Note that you cannot use this method with SoupRequests attached to +

Note that you cannot use this method with SoupRequests attached to a SoupSessionSync.

-

Parameters

-
+

Parameters

+
@@ -250,7 +250,7 @@ a - + @@ -267,7 +267,7 @@ a

cancellable

a GCancellable or NULL

a GCancellable or NULL

 
-

Since 2.42

+

Since: 2.42


@@ -275,11 +275,11 @@ a GInputStream * soup_request_send_finish (SoupRequest *request, GAsyncResult *result, - GError **error); + GError **error);

Gets the result of a soup_request_send_async().

-

Parameters

-
+

Parameters

+
@@ -298,33 +298,33 @@ soup_request_send_finish (

error

-
+

return location for a GError, or NULL

return location for a GError, or NULL

 
-

Returns

-

a GInputStream that can be used to +

Returns

+

a GInputStream that can be used to read from the URI pointed to by request .

[transfer full]

-

Since 2.42

+

Since: 2.42


soup_request_get_content_length ()

-
goffset
+
goffset
 soup_request_get_content_length (SoupRequest *request);

Gets the length of the data represented by request . For most request types, this will not be known until after you call soup_request_send() or soup_request_send_finish().

-

Parameters

-
+

Parameters

+
@@ -338,13 +338,12 @@ request types, this will not be known until after you call
-

Returns

+

Returns

the length of the data represented by request , or -1 if not known.

-

-

Since 2.42

+

Since: 2.42


@@ -358,8 +357,8 @@ types, this will not be known until after you call

As in the HTTP Content-Type header, this may include parameters after the MIME type.

-

Parameters

-
+

Parameters

+
@@ -373,13 +372,13 @@ after the MIME type.

-

Returns

-

the type of the data represented by request -, -or NULL if not known.

-

+

Returns

+

the type of the data represented by +request +, or NULL if not known.

+

[nullable]

-

Since 2.42

+

Since: 2.42


@@ -389,8 +388,8 @@ soup_request_get_session (request 's SoupSession

-

Parameters

-
+

Parameters

+
@@ -404,12 +403,12 @@ soup_request_get_session ( -

Returns

-

request +

Returns

+

request 's SoupSession.

[transfer none]

-

Since 2.42

+

Since: 2.42


@@ -419,8 +418,8 @@ soup_request_get_uri (request 's URI

-

Parameters

-
+

Parameters

+
@@ -434,12 +433,12 @@ soup_request_get_uri ( -

Returns

-

request +

Returns

+

request 's URI.

[transfer none]

-

Since 2.42

+

Since: 2.42

@@ -448,7 +447,7 @@ soup_request_get_uri (

SoupRequest

typedef struct _SoupRequest SoupRequest;

A request to retrieve a particular URI.

-

Since 2.42

+

Since: 2.42


@@ -456,7 +455,7 @@ soup_request_get_uri (#define SOUP_REQUEST_SESSION "session"

Alias for the “session” property, qv.

-

Since 2.42

+

Since: 2.42


@@ -464,7 +463,7 @@ soup_request_get_uri (#define SOUP_REQUEST_URI "uri"

Alias for the “uri” property, qv.

-

Since 2.42

+

Since: 2.42

@@ -474,7 +473,7 @@ soup_request_get_uri ( “session” SoupSession *

The request's SoupSession.

Flags: Read / Write / Construct Only

-

Since 2.42

+

Since: 2.42


@@ -482,12 +481,11 @@ soup_request_get_uri ( “uri” SoupURI *

The request URI.

Flags: Read / Write / Construct Only

-

Since 2.42

+

Since: 2.42

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupRequestData.html b/docs/reference/html/SoupRequestData.html index ae07adf1..0c7251d8 100644 --- a/docs/reference/html/SoupRequestData.html +++ b/docs/reference/html/SoupRequestData.html @@ -2,21 +2,21 @@ -libsoup Reference Manual: SoupRequestData - +SoupRequestData: libsoup Reference Manual + - + -
+ @@ -35,7 +35,7 @@

Types and Values

-
+
@@ -48,7 +48,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupRequest
         ╰── SoupRequestData
 
@@ -70,19 +70,17 @@ SoupRequestData implements

Functions

+

Types and Values

SoupRequestData

typedef struct _SoupRequestData SoupRequestData;
-

-

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupRequestFile.html b/docs/reference/html/SoupRequestFile.html index a8e66d3f..ffe9d07c 100644 --- a/docs/reference/html/SoupRequestFile.html +++ b/docs/reference/html/SoupRequestFile.html @@ -2,21 +2,21 @@ -libsoup Reference Manual: SoupRequestFile - +SoupRequestFile: libsoup Reference Manual + - + -
+ @@ -35,7 +35,7 @@

Functions

-
+
@@ -52,7 +52,7 @@

Types and Values

-
+
@@ -65,7 +65,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupRequest
         ╰── SoupRequestFile
 
@@ -95,8 +95,8 @@ soup_request_file_get_file (GFile corresponding to file 's URI

-

Parameters

-
+

Parameters

+
@@ -110,12 +110,12 @@ soup_request_file_get_file ( -

Returns

-

a GFile corresponding to file +

Returns

+

a GFile corresponding to file .

[transfer full]

-

Since 2.40

+

Since: 2.40

@@ -123,13 +123,10 @@ soup_request_file_get_file (

SoupRequestFile

typedef struct _SoupRequestFile SoupRequestFile;
-

-

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupRequestHTTP.html b/docs/reference/html/SoupRequestHTTP.html index 4aeb9d84..b30d1268 100644 --- a/docs/reference/html/SoupRequestHTTP.html +++ b/docs/reference/html/SoupRequestHTTP.html @@ -2,21 +2,21 @@ -libsoup Reference Manual: SoupRequestHTTP - +SoupRequestHTTP: libsoup Reference Manual + - + -
+ @@ -35,7 +35,7 @@

Functions

-
+
@@ -52,7 +52,7 @@

Types and Values

-
+
@@ -65,7 +65,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupRequest
         ╰── SoupRequestHTTP
 
@@ -97,8 +97,8 @@ call SoupRequestHTTP *http);

Gets a new reference to the SoupMessage associated to this SoupRequest

-

Parameters

-
+

Parameters

+
@@ -112,11 +112,11 @@ soup_request_http_get_message (
-

Returns

-

a new reference to the SoupMessage.

+

Returns

+

a new reference to the SoupMessage.

[transfer full]

-

Since 2.40

+

Since: 2.40

@@ -124,13 +124,10 @@ soup_request_http_get_message (

SoupRequestHTTP

typedef struct _SoupRequestHTTP SoupRequestHTTP;
-

-

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupServer.html b/docs/reference/html/SoupServer.html index 34345f14..fcfbca2d 100644 --- a/docs/reference/html/SoupServer.html +++ b/docs/reference/html/SoupServer.html @@ -2,28 +2,28 @@ -libsoup Reference Manual: SoupServer - +SoupServer: libsoup Reference Manual + - - + + -
+ - +
@@ -36,7 +36,7 @@

Functions

-
+
@@ -52,50 +52,66 @@ + + + + + + + + @@ -108,10 +124,18 @@ + + + + @@ -135,23 +159,47 @@ void + + + + + + + + + + + + @@ -178,6 +226,22 @@ + + + + + + + +
-gboolean +gboolean -soup_server_is_https () +soup_server_set_ssl_cert_file ()
-guint +gboolean -soup_server_get_port () +soup_server_listen ()
-SoupSocket * +gboolean -soup_server_get_listener () +soup_server_listen_all ()
-void +gboolean -soup_server_run () +soup_server_listen_local ()
-void +gboolean -soup_server_run_async () +soup_server_listen_socket ()
-void +gboolean + +soup_server_listen_fd () +
+GSList * + +soup_server_get_listeners () +
+GSList * -soup_server_quit () +soup_server_get_uris ()
-GMainContext * +gboolean -soup_server_get_async_context () +soup_server_is_https () +
+gboolean + +soup_server_accept_iostream ()
+soup_server_add_early_handler () +
+void + soup_server_remove_handler ()
-SoupSocket * +void + +(*SoupServerWebsocketCallback) () +
+void + +soup_server_add_websocket_handler () +
+GSocketAddress * -soup_client_context_get_socket () +soup_client_context_get_local_address ()
-SoupAddress * +GSocketAddress * -soup_client_context_get_address () +soup_client_context_get_remote_address ()
+GSocket * + +soup_client_context_get_gsocket () +
+GIOStream * + +soup_client_context_steal_connection () +
void @@ -213,7 +277,7 @@

Properties

-
+
@@ -221,17 +285,17 @@ - + - + - + @@ -242,30 +306,30 @@ - + - + +gchar * +gchar * +gchar * @@ -280,7 +344,7 @@

Signals

-
gpointergpointer async-context Read / Write / Construct Only
GStrvGStrv http-aliases Read / Write
GStrvGStrv https-aliases Read / Write
Read / Write / Construct Only
guintguint port Read / Write / Construct Only
gbooleangboolean raw-paths Read / Write / Construct Only
-gchar * server-header Read / Write / Construct
-gchar * ssl-cert-file Read / Write / Construct Only
-gchar * ssl-key-file Read / Write / Construct Only
+
@@ -290,29 +354,29 @@ - + - + - + - +
void request-abortedRun FirstRun First
void request-finishedRun FirstRun First
void request-readRun FirstRun First
void request-startedRun FirstRun First

Types and Values

-
+
@@ -323,24 +387,12 @@ - - - - - - - - - - + + - - - - - - + + @@ -348,10 +400,6 @@ - - - - @@ -371,9 +419,9 @@

Object Hierarchy

-
    GBoxed
+
    GBoxed
     ╰── SoupClientContext
-    GObject
+    GObject
     ╰── SoupServer
 
@@ -385,31 +433,79 @@

Description

SoupServer implements a simple HTTP server.

+

(The following documentation describes the current SoupServer API, +available in libsoup 2.48 and later. See +the section "The Old SoupServer +Listening API" in the server how-to documentation for +details on the older SoupServer API.)

To begin, create a server using soup_server_new(). Add at least one -handler by calling soup_server_add_handler(); the handler will be -called to process any requests underneath the path passed to -soup_server_add_handler(). (If you want all requests to go to the -same handler, just pass "/" (or NULL) for the path.) Any request -that does not match any handler will automatically be returned to -the client with a 404 (Not Found) status.

+handler by calling soup_server_add_handler() or +soup_server_add_early_handler(); the handler will be called to +process any requests underneath the path you pass. (If you want all +requests to go to the same handler, just pass "/" (or NULL) for +the path.)

+

When a new connection is accepted (or a new request is started on +an existing persistent connection), the SoupServer will emit +“request-started” and then begin processing the request +as described below, but note that once the message is assigned a +“status-code”, then callbacks after that point will be +skipped. Note also that it is not defined when the callbacks happen +relative to various SoupMessage signals.

+

Once the headers have been read, SoupServer will check if there is +a SoupAuthDomain (qv) covering the Request-URI; if so, and if the +message does not contain suitable authorization, then the +SoupAuthDomain will set a status of SOUP_STATUS_UNAUTHORIZED on +the message.

+

After checking for authorization, SoupServer will look for "early" +handlers (added with soup_server_add_early_handler()) matching the +Request-URI. If one is found, it will be run; in particular, this +can be used to connect to signals to do a streaming read of the +request body.

+

(At this point, if the request headers contain "Expect: +100-continue", and a status code has been set, then +SoupServer will skip the remaining steps and return the response. +If the request headers contain "Expect: +100-continue" and no status code has been set, +SoupServer will return a SOUP_STATUS_CONTINUE status before +continuing.)

+

The server will then read in the response body (if present). At +this point, if there are no handlers at all defined for the +Request-URI, then the server will return SOUP_STATUS_NOT_FOUND to +the client.

+

Otherwise (assuming no previous step assigned a status to the +message) any "normal" handlers (added with +soup_server_add_handler()) for the message's Request-URI will be +run.

+

Then, if the path has a WebSocket handler registered (and has +not yet been assigned a status), SoupServer will attempt to +validate the WebSocket handshake, filling in the response and +setting a status of SOUP_STATUS_SWITCHING_PROTOCOLS or +SOUP_STATUS_BAD_REQUEST accordingly.

+

If the message still has no status code at this point (and has not +been paused with soup_server_pause_message()), then it will be +given a status of SOUP_STATUS_INTERNAL_SERVER_ERROR (because at +least one handler ran, but returned without assigning a status).

+

Finally, the server will emit “request-finished” (or +“request-aborted” if an I/O error occurred before +handling was completed).

If you want to handle the special "*" URI (eg, "OPTIONS *"), you must explicitly register a handler for "*"; the default handler will not be used for that case.

-

To add authentication to some or all paths, create an appropriate -SoupAuthDomain (qv), and add it to the server via -soup_server_add_auth_domain(). (As with handlers, you must -explicitly add "*" to an auth domain if you want it to be covered.)

-

Additional processing options are available via SoupServer's -signals; Connect to “request-started” to be notified -every time a new request is being processed. (This gives you a -chance to connect to the SoupMessage "got-" signals in case you -want to do processing before the body has been fully read.)

-

Once the server is set up, start it processing connections by -calling soup_server_run_async() or soup_server_run(). SoupServer -runs via the glib main loop; if you need to have a server that runs -in another thread (or merely isn't bound to the default main loop), -create a GMainContext for it to use, and set that via the -SOUP_SERVER_ASYNC_CONTEXT property.

+

If you want to process https connections in addition to (or instead +of) http connections, you can either set the +SOUP_SERVER_TLS_CERTIFICATE property when creating the server, or +else call soup_server_set_ssl_certificate() after creating it.

+

Once the server is set up, make one or more calls to +soup_server_listen(), soup_server_listen_local(), or +soup_server_listen_all() to tell it where to listen for +connections. (All ports on a SoupServer use the same handlers; if +you need to handle some ports differently, such as returning +different data for http and https, you'll need to create multiple +SoupServers, or else check the passed-in URI in the handler +function.).

+

SoupServer will begin processing connections as soon as you return +to (or start) the main loop for the current thread-default +GMainContext.

Functions

@@ -418,10 +514,11 @@ create a SoupServer * soup_server_new (const char *optname1, ...); -

Creates a new SoupServer.

+

Creates a new SoupServer. This is exactly equivalent to calling +g_object_new() and specifying SOUP_TYPE_SERVER as the type.

-

Parameters

-
SoupServer
typedefSoupClientContext
#defineSOUP_SERVER_PORT
#defineSOUP_SERVER_INTERFACEenumSoupServerListenOptions
#defineSOUP_SERVER_SSL_CERT_FILE
#defineSOUP_SERVER_SSL_KEY_FILEtypedefSoupClientContext
#define
#defineSOUP_SERVER_ASYNC_CONTEXT
#define SOUP_SERVER_RAW_PATHS
+

Parameters

+
@@ -443,149 +540,390 @@ soup_server_new (const char
-

Returns

-

a new SoupServer

-

+

Returns

+

a new SoupServer. If you are using +certain legacy properties, this may also return NULL if an error +occurs.

+

[nullable]


-

soup_server_is_https ()

-
gboolean
-soup_server_is_https (SoupServer *server);
-

Checks whether server - is running plain http or https.

-

In order for a server to run https, you must set the -SOUP_SERVER_SSL_CERT_FILE and SOUP_SERVER_SSL_KEY_FILE properties -or SOUP_SERVER_TLS_CERTIFICATE property to provide it with an SSL -certificate to use.

+

soup_server_set_ssl_cert_file ()

+
gboolean
+soup_server_set_ssl_cert_file (SoupServer *server,
+                               const char *ssl_cert_file,
+                               const char *ssl_key_file,
+                               GError **error);
+

Sets server + up to do https, using the SSL/TLS certificate +specified by ssl_cert_file + and ssl_key_file + (which may point to +the same file).

+

Alternatively, you can set the “tls-certificate” property +at construction time, if you already have a GTlsCertificate.

-

Parameters

-
+

Parameters

+
- + + - + + + + + + + + + + + + + + + + +

server

a SoupServer

 

ssl_cert_file

path to a file containing a PEM-encoded SSL/TLS +certificate.

 

ssl_key_file

path to a file containing a PEM-encoded private key.

 

error

return location for a GError

 
-

Returns

-

TRUE if server -is serving https.

-

+

Returns

+

success or failure.

+

Since: 2.48


-

soup_server_get_port ()

-
guint
-soup_server_get_port (SoupServer *server);
-

Gets the TCP port that server - is listening on. This is most useful -when you did not request a specific port (or explicitly requested -SOUP_ADDRESS_ANY_PORT).

+

soup_server_listen ()

+
gboolean
+soup_server_listen (SoupServer *server,
+                    GSocketAddress *address,
+                    SoupServerListenOptions options,
+                    GError **error);
+

This attempts to set up server + to listen for connections on +address +.

+

If options + includes SOUP_SERVER_LISTEN_HTTPS, and server + has +been configured for TLS, then server + will listen for https +connections on this port. Otherwise it will listen for plain http.

+

You may call this method (along with the other "listen" methods) +any number of times on a server, if you want to listen on multiple +ports, or set up both http and https service.

+

After calling this method, server + will begin accepting and +processing connections as soon as the appropriate GMainContext is +run.

+

Note that SoupServer never makes use of dual IPv4/IPv6 sockets; if +address + is an IPv6 address, it will only accept IPv6 connections. +You must configure IPv4 listening separately.

-

Parameters

-
+

Parameters

+
- + + - + + + + + + + + + + + + + + + + +

server

a SoupServer

 

address

the address of the interface to listen on

 

options

listening options for this server

 

error

return location for a GError

 
-

Returns

-

the port server -is listening on.

-

+

Returns

+

TRUE on success, FALSE if address +could not be +bound or any other error occurred (in which case error +will be +set).

+

Since: 2.48


-

soup_server_get_listener ()

-
SoupSocket *
-soup_server_get_listener (SoupServer *server);
-

Gets server -'s listening socket. You should treat this as -read-only; writing to it or modifiying it may cause server - to -malfunction.

+

soup_server_listen_all ()

+
gboolean
+soup_server_listen_all (SoupServer *server,
+                        guint port,
+                        SoupServerListenOptions options,
+                        GError **error);
+

This attempts to set up server + to listen for connections on all +interfaces on the system. (That is, it listens on the addresses +0.0.0.0 and/or ::, depending +on whether options + includes SOUP_SERVER_LISTEN_IPV4_ONLY, +SOUP_SERVER_LISTEN_IPV6_ONLY, or neither.) If port + is specified, +server + will listen on that port. If it is 0, server + will find an +unused port to listen on. (In that case, you can use +soup_server_get_uris() to find out what port it ended up choosing.)

+

See soup_server_listen() for more details.

-

Parameters

-
+

Parameters

+
- + + - + + + + + + + + + + + + + + + + +

server

a SoupServer

 

port

the port to listen on, or 0

 

options

listening options for this server

 

error

return location for a GError

 
-

Returns

-

the listening socket.

-

[transfer none]

+

Returns

+

TRUE on success, FALSE if port +could not be bound +or any other error occurred (in which case error +will be set).

+

Since: 2.48


-

soup_server_run ()

-
void
-soup_server_run (SoupServer *server);
-

Starts server -, causing it to listen for and process incoming -connections. Unlike soup_server_run_async(), this creates a -GMainLoop and runs it, and it will not return until someone calls -soup_server_quit() to stop the server.

+

soup_server_listen_local ()

+
gboolean
+soup_server_listen_local (SoupServer *server,
+                          guint port,
+                          SoupServerListenOptions options,
+                          GError **error);
+

This attempts to set up server + to listen for connections on +"localhost" (that is, 127.0.0.1 and/or +::1, depending on whether options + includes +SOUP_SERVER_LISTEN_IPV4_ONLY, SOUP_SERVER_LISTEN_IPV6_ONLY, or +neither). If port + is specified, server + will listen on that port. +If it is 0, server + will find an unused port to listen on. (In that +case, you can use soup_server_get_uris() to find out what port it +ended up choosing.)

+

See soup_server_listen() for more details.

-

Parameters

-
+

Parameters

+
- + + - + + + + + + + + + + + + + + + + +

server

a SoupServer

 

port

the port to listen on, or 0

 

options

listening options for this server

 

error

return location for a GError

 
+
+

Returns

+

TRUE on success, FALSE if port +could not be bound +or any other error occurred (in which case error +will be set).

+
+

Since: 2.48


-

soup_server_run_async ()

-
void
-soup_server_run_async (SoupServer *server);
-

Starts server -, causing it to listen for and process incoming -connections.

-

The server actually runs in server -'s GMainContext. It will not -actually perform any processing unless the appropriate main loop is -running. In the simple case where you did not set the server's -SOUP_SERVER_ASYNC_CONTEXT property, this means the server will run -whenever the glib main loop is running.

+

soup_server_listen_socket ()

+
gboolean
+soup_server_listen_socket (SoupServer *server,
+                           GSocket *socket,
+                           SoupServerListenOptions options,
+                           GError **error);
+

This attempts to set up server + to listen for connections on +socket +.

+

See soup_server_listen() for more details.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

server

a SoupServer

 

socket

a listening GSocket

 

options

listening options for this server

 

error

return location for a GError

 
+
+
+

Returns

+

TRUE on success, FALSE if an error occurred (in +which case error +will be set).

+
+

Since: 2.48

+
+
+
+

soup_server_listen_fd ()

+
gboolean
+soup_server_listen_fd (SoupServer *server,
+                       int fd,
+                       SoupServerListenOptions options,
+                       GError **error);
+

This attempts to set up server + to listen for connections on +fd +.

+

See soup_server_listen() for more details.

+

Note that server + will close fd + when you free it or call +soup_server_disconnect().

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

server

a SoupServer

 

fd

the file descriptor of a listening socket

 

options

listening options for this server

 

error

return location for a GError

 
+
-

Parameters

-
+

Returns

+

TRUE on success, FALSE if an error occurred (in +which case error +will be set).

+ +

Since: 2.48

+ +
+
+

soup_server_get_listeners ()

+
GSList *
+soup_server_get_listeners (SoupServer *server);
+

Gets server +'s list of listening sockets.

+

You should treat these sockets as read-only; writing to or +modifiying any of these sockets may cause server + to malfunction.

+

(Beware that in contrast to the old soup_server_get_listener(), this +function returns GSockets, not SoupSockets.)

+
+

Parameters

+
@@ -598,21 +936,29 @@ whenever the glib main loop is running.

+
+

Returns

+

a +list of listening sockets.

+

[transfer container][element-type Gio.Socket]

+

-

soup_server_quit ()

-
void
-soup_server_quit (SoupServer *server);
-

Stops processing for server -. Call this to clean up after -soup_server_run_async(), or to terminate a call to soup_server_run().

-

server - is still in a working state after this call; you can start -and stop a server as many times as you want.

+

soup_server_get_uris ()

+
GSList *
+soup_server_get_uris (SoupServer *server);
+

Gets a list of URIs corresponding to the interfaces server + is +listening on. These will contain IP addresses, not hostnames, and +will also indicate whether the given listener is http or https.

+

Note that if you used soup_server_listen_all(), the returned URIs +will use the addresses 0.0.0.0 and +::, rather than actually returning separate URIs +for each interface on the system.

-

Parameters

-
+

Parameters

+
@@ -625,27 +971,33 @@ and stop a server as many times as you want.

+
+

Returns

+

a list of +SoupURIs, which you must free when you are done with it.

+

[transfer full][element-type Soup.URI]

+
+

Since: 2.48


soup_server_disconnect ()

void
 soup_server_disconnect (SoupServer *server);
-

Stops processing for server - and closes its socket. This implies -the effects of soup_server_quit(), but additionally closes the -listening socket. Note that messages currently in progress will -continue to be handled, if the main loop associated with the -server is resumed or kept running.

-

After calling this function, server - is no longer functional, so it -has nearly the same effect as destroying server - entirely. The -function is thus useful mainly for language bindings without -explicit control over object lifetime.

+

Closes and frees server +'s listening sockets. If you are using the +old SoupServer APIs, this also includes the effect of +soup_server_quit().

+

Note that if there are currently requests in progress on server +, +that they will continue to be processed if server +'s GMainContext +is still running.

+

You can call soup_server_listen(), etc, after calling this function +if you want to start listening again.

-

Parameters

-
+

Parameters

+
@@ -661,16 +1013,25 @@ explicit control over object lifetime.


-

soup_server_get_async_context ()

-
GMainContext *
-soup_server_get_async_context (SoupServer *server);
-

Gets server -'s async_context. This does not add a ref to the -context, so you will need to ref it yourself if you want it to -outlive its server.

+

soup_server_is_https ()

+
gboolean
+soup_server_is_https (SoupServer *server);
+

Checks whether server + is capable of https.

+

In order for a server to run https, you must call +soup_server_set_ssl_cert_file(), or set the +“tls-certificate” property, to provide it with a +certificate to use.

+

If you are using the deprecated single-listener APIs, then a return +value of TRUE indicates that the SoupServer serves https +exclusively. If you are using soup_server_listen(), etc, then a +TRUE return value merely indicates that the server is +able to do https, regardless of whether it +actually currently is or not. Use soup_server_get_uris() to see if +it currently has any https listeners.

-

Parameters

-
+

Parameters

+
@@ -684,27 +1045,81 @@ outlive its server.

-

Returns

-

server -'s GMainContext, which may be NULL.

-

[transfer none]

+

Returns

+

TRUE if server +is configured to serve https.


+

soup_server_accept_iostream ()

+
gboolean
+soup_server_accept_iostream (SoupServer *server,
+                             GIOStream *stream,
+                             GSocketAddress *local_addr,
+                             GSocketAddress *remote_addr,
+                             GError **error);
+

Add a new client stream to the server +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

server

a SoupServer

 

stream

a GIOStream

 

local_addr

the local GSocketAddress associated with the stream +.

[allow-none]

remote_addr

the remote GSocketAddress associated with the stream +.

[allow-none]

error

return location for a GError

 
+
+
+

Returns

+

TRUE on success, FALSE if the stream could not be +accepted or any other error occurred (in which case error +will be +set).

+
+

Since: 2.50

+
+
+

SoupServerCallback ()

void
 (*SoupServerCallback) (SoupServer *server,
                        SoupMessage *msg,
                        const char *path,
-                       GHashTable *query,
+                       GHashTable *query,
                        SoupClientContext *client,
-                       gpointer user_data);
-

A callback used to handle requests to a SoupServer. The callback -will be invoked after receiving the request body; msg -'s -“method”, “request_headers”, and -“request_body” fields will be filled in.

+ gpointer user_data); +

A callback used to handle requests to a SoupServer.

path and query contain the likewise-named components of the @@ -726,31 +1141,11 @@ server needs to use some other format, you can just ignore soup_message_get_uri() and parse the URI's query field yourself.

-

After determining what to do with the request, the callback must at -a minimum call soup_message_set_status() (or -soup_message_set_status_full()) on msg - to set the response status -code. Additionally, it may set response headers and/or fill in the -response body.

-

If the callback cannot fully fill in the response before returning -(eg, if it needs to wait for information from a database, or -another network server), it should call soup_server_pause_message() -to tell SoupServer to not send the response right away. When the -response is ready, call soup_server_unpause_message() to cause it -to be sent.

-

To send the response body a bit at a time using "chunked" encoding, -first call soup_message_headers_set_encoding() to set -SOUP_ENCODING_CHUNKED on the “response_headers”. Then call -soup_message_body_append() (or soup_message_body_append_buffer()) -to append each chunk as it becomes ready, and -soup_server_unpause_message() to make sure it's running. (The -server will automatically pause the message if it is using chunked -encoding but no more chunks are available.) When you are done, call -soup_message_body_complete() to indicate that no more chunks are -coming.

+

See soup_server_add_handler() and soup_server_add_early_handler() +for details of what handlers can/should do.

-

Parameters

-
+

Parameters

+
@@ -775,10 +1170,10 @@ coming.

- - + @@ -787,8 +1182,8 @@ component of msg - + @@ -802,22 +1197,50 @@ component of msg soup_server_add_handler (SoupServer *server, const char *path, SoupServerCallback callback, - gpointer user_data, - GDestroyNotify destroy); + gpointer user_data, + GDestroyNotify destroy);

Adds a handler to server for requests under path -. See the -documentation for SoupServerCallback for information about -how callbacks should behave.

-

If path - is NULL or "/", then this will be the default handler for -all requests that don't have a more specific handler. Note though -that if you want to handle requests to the special "*" URI, you -must explicitly register a handler for "*"; the default handler -will not be used for that case.

+. If path + is +NULL or "/", then this will be the default handler for all +requests that don't have a more specific handler. (Note though that +if you want to handle requests to the special "*" URI, you must +explicitly register a handler for "*"; the default handler will not +be used for that case.)

+

For requests under path + (that have not already been assigned a +status code by a SoupAuthDomain, an early SoupServerHandler, or a +signal handler), callback + will be invoked after receiving the +request body; the message's “method”, +“request-headers”, and “request-body” fields +will be filled in.

+

After determining what to do with the request, the callback must at +a minimum call soup_message_set_status() (or +soup_message_set_status_full()) on the message to set the response +status code. Additionally, it may set response headers and/or fill +in the response body.

+

If the callback cannot fully fill in the response before returning +(eg, if it needs to wait for information from a database, or +another network server), it should call soup_server_pause_message() +to tell server + to not send the response right away. When the +response is ready, call soup_server_unpause_message() to cause it +to be sent.

+

To send the response body a bit at a time using "chunked" encoding, +first call soup_message_headers_set_encoding() to set +SOUP_ENCODING_CHUNKED on the “response-headers”. Then call +soup_message_body_append() (or soup_message_body_append_buffer()) +to append each chunk as it becomes ready, and +soup_server_unpause_message() to make sure it's running. (The +server will automatically pause the message if it is using chunked +encoding but no more chunks are available.) When you are done, call +soup_message_body_complete() to indicate that no more chunks are +coming.

-

Parameters

-

query

the parsed query +

the parsed query component of msg 's Request-URI.

[element-type utf8 utf8][allow-none][element-type utf8 utf8][allow-none]

client

user_data

the data passed to soup_server_add_handler -

the data passed to soup_server_add_handler() or +soup_server_add_early_handler().

 
+

Parameters

+
@@ -831,8 +1254,8 @@ will not be used for that case.

- - + + @@ -858,15 +1281,95 @@ will not be used for that case.


+

soup_server_add_early_handler ()

+
void
+soup_server_add_early_handler (SoupServer *server,
+                               const char *path,
+                               SoupServerCallback callback,
+                               gpointer user_data,
+                               GDestroyNotify destroy);
+

Adds an "early" handler to server + for requests under path +. Note +that "normal" and "early" handlers are matched up together, so if +you add a normal handler for "/foo" and an early handler for +"/foo/bar", then a request to "/foo/bar" (or any path below it) +will run only the early handler. (But if you add both handlers at +the same path, then both will get run.)

+

For requests under path + (that have not already been assigned a +status code by a SoupAuthDomain or a signal handler), callback + +will be invoked after receiving the request headers, but before +receiving the request body; the message's “method” and +“request-headers” fields will be filled in.

+

Early handlers are generally used for processing requests with +request bodies in a streaming fashion. If you determine that the +request will contain a message body, normally you would call +soup_message_body_set_accumulate() on the message's +“request-body” to turn off request-body accumulation, +and connect to the message's “got-chunk” signal to +process each chunk as it comes in.

+

To complete the message processing after the full message body has +been read, you can either also connect to “got-body”, +or else you can register a non-early handler for path + as well. As +long as you have not set the “status-code” by the time +“got-body” is emitted, the non-early handler will be +run as well.

+
+

Parameters

+

path

the toplevel path for the handler.

[allow-none]

the toplevel path for the handler.

[allow-none]

callback

+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

server

a SoupServer

 

path

the toplevel path for the handler.

[allow-none]

callback

callback to invoke for requests under path +

 

user_data

data for callback +

 

destroy

destroy notifier to free user_data +

 
+
+

Since: 2.50

+
+
+

soup_server_remove_handler ()

void
 soup_server_remove_handler (SoupServer *server,
                             const char *path);
-

Removes the handler registered at path +

Removes all handlers (early and normal) registered at path .

-

Parameters

-
+

Parameters

+
@@ -889,21 +1392,156 @@ soup_server_remove_handler ( -

soup_client_context_get_socket ()

-
SoupSocket *
-soup_client_context_get_socket (SoupClientContext *client);
-

Retrieves the SoupSocket that client - is associated with.

-

If you are using this method to observe when multiple requests are -made on the same persistent HTTP connection (eg, as the ntlm-test -test program does), you will need to pay attention to socket -destruction as well (either by using weak references, or by -connecting to the “disconnected” signal), so that you do -not get fooled when the allocator reuses the memory address of a -previously-destroyed socket to represent a new socket.

+

SoupServerWebsocketCallback ()

+
void
+(*SoupServerWebsocketCallback) (SoupServer *server,
+                                SoupWebsocketConnection *connection,
+                                const char *path,
+                                SoupClientContext *client,
+                                gpointer user_data);
+

A callback used to handle WebSocket requests to a SoupServer. The +callback will be invoked after sending the handshake response back +to the client (and is only invoked if the handshake was +successful).

+

path + contains the path of the Request-URI, subject to the same +rules as SoupServerCallback (qv).

-

Parameters

-
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

server

the SoupServer

 

path

the path component of msg +'s Request-URI

 

connection

the newly created WebSocket connection

 

client

additional contextual information about the client

 

user_data

the data passed to soup_server_add_handler +

 
+
+
+
+
+

soup_server_add_websocket_handler ()

+
void
+soup_server_add_websocket_handler (SoupServer *server,
+                                   const char *path,
+                                   const char *origin,
+                                   char **protocols,
+                                   SoupServerWebsocketCallback callback,
+                                   gpointer user_data,
+                                   GDestroyNotify destroy);
+

Adds a WebSocket handler to server + for requests under path +. (If +path + is NULL or "/", then this will be the default handler for +all requests that don't have a more specific handler.)

+

When a path has a WebSocket handler registered, server + will check +incoming requests for WebSocket handshakes after all other handlers +have run (unless some earlier handler has already set a status code +on the message), and update the request's status, response headers, +and response body accordingly.

+

If origin + is non-NULL, then only requests containing a matching +"Origin" header will be accepted. If protocols + is non-NULL, then +only requests containing a compatible "Sec-WebSocket-Protocols" +header will be accepted. More complicated requirements can be +handled by adding a normal handler to path +, and having it perform +whatever checks are needed (possibly calling +soup_server_check_websocket_handshake() one or more times), and +setting a failure status code if the handshake should be rejected.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

server

a SoupServer

 

path

the toplevel path for the handler.

[allow-none]

origin

the origin of the connection.

[allow-none]

protocols

the protocols +supported by this handler.

[allow-none][array zero-terminated=1]

callback

callback to invoke for successful WebSocket requests under path +

 

user_data

data for callback +

 

destroy

destroy notifier to free user_data +

 
+
+
+
+
+

soup_client_context_get_local_address ()

+
GSocketAddress *
+soup_client_context_get_local_address (SoupClientContext *client);
+

Retrieves the GSocketAddress associated with the local end +of a connection.

+
+

Parameters

+
@@ -917,23 +1555,25 @@ previously-destroyed socket to represent a new socket.

-

Returns

-

the SoupSocket that client -is -associated with.

-

[transfer none]

+

Returns

+

the GSocketAddress +associated with the local end of a connection, it may be +NULL if you used soup_server_accept_iostream().

+

[nullable][transfer none]

+

Since: 2.48


-

soup_client_context_get_address ()

-
SoupAddress *
-soup_client_context_get_address (SoupClientContext *client);
-

Retrieves the SoupAddress associated with the remote end +

soup_client_context_get_remote_address ()

+
GSocketAddress *
+soup_client_context_get_remote_address
+                               (SoupClientContext *client);
+

Retrieves the GSocketAddress associated with the remote end of a connection.

-

Parameters

-
+

Parameters

+
@@ -947,11 +1587,13 @@ of a connection.

-

Returns

-

the SoupAddress associated with the -remote end of a connection.

-

[transfer none]

+

Returns

+

the GSocketAddress +associated with the remote end of a connection, it may be +NULL if you used soup_server_accept_iostream().

+

[nullable][transfer none]

+

Since: 2.48


@@ -959,12 +1601,10 @@ remote end of a connection.

const char *
 soup_client_context_get_host (SoupClientContext *client);

Retrieves the IP address associated with the remote end of a -connection. (If you want the actual hostname, you'll have to call -soup_client_context_get_address() and then call the appropriate -SoupAddress method to resolve it.)

+connection.

-

Parameters

-
+

Parameters

+
@@ -978,10 +1618,11 @@ connection. (If you want the actual hostname, you'll have to call
-

Returns

-

the IP address associated with the remote end of a -connection.

-

+

Returns

+

the IP address associated with the remote +end of a connection, it may be NULL if you used +soup_server_accept_iostream().

+

[nullable]


@@ -994,8 +1635,8 @@ soup_client_context_get_auth_domain (SoupAuthDomain that authenticated it.

-

Parameters

-
+

Parameters

+
@@ -1009,10 +1650,10 @@ authenticated it.

-

Returns

-

a SoupAuthDomain, or -NULL if the request was not authenticated.

-

[transfer none][allow-none]

+

Returns

+

a SoupAuthDomain, or +NULL if the request was not authenticated.

+

[transfer none][nullable]


@@ -1025,8 +1666,84 @@ soup_client_context_get_auth_user (
-

Parameters

-
+

Parameters

+
+++++ + + + + + +

client

a SoupClientContext

 
+
+
+

Returns

+

the authenticated-as user, or NULL if +the request was not authenticated.

+

[nullable]

+
+ +
+
+

soup_client_context_get_gsocket ()

+
GSocket *
+soup_client_context_get_gsocket (SoupClientContext *client);
+

Retrieves the GSocket that client + is associated with.

+

If you are using this method to observe when multiple requests are +made on the same persistent HTTP connection (eg, as the ntlm-test +test program does), you will need to pay attention to socket +destruction as well (eg, by using weak references), so that you do +not get fooled when the allocator reuses the memory address of a +previously-destroyed socket to represent a new socket.

+
+

Parameters

+
+++++ + + + + + +

client

a SoupClientContext

 
+
+
+

Returns

+

the GSocket that client +is +associated with, NULL if you used soup_server_accept_iostream().

+

[nullable][transfer none]

+
+

Since: 2.48

+
+
+
+

soup_client_context_steal_connection ()

+
GIOStream *
+soup_client_context_steal_connection (SoupClientContext *client);
+

"Steals" the HTTP connection associated with client + from its +SoupServer. This happens immediately, regardless of the current +state of the connection; if the response to the current +SoupMessage has not yet finished being sent, then it will be +discarded; you can steal the connection from a +“wrote-informational” or “wrote-body” signal +handler if you need to wait for part or all of the response to be +sent.

+

Note that when calling this function from C, client + will most +likely be freed as a side effect.

+
+

Parameters

+
@@ -1040,11 +1757,16 @@ authenticated as.

-

Returns

-

the authenticated-as user, or NULL if the request -was not authenticated.

-

+

Returns

+

the GIOStream formerly associated +with client +(or NULL if client +was no longer associated with a +connection). No guarantees are made about what kind of GIOStream +is returned.

+

[transfer full]

+

Since: 2.50


@@ -1067,8 +1789,8 @@ Proxy Authentication Required). If the request used the will reject it before the request body is sent.

-

Parameters

-
+

Parameters

+
@@ -1099,8 +1821,8 @@ soup_server_remove_auth_domain (server .

-

Parameters

-
+

Parameters

+
@@ -1131,12 +1853,12 @@ soup_server_pause_message (soup_server_unpause_message() to resume I/O.

-

This must only be called on SoupMessages which were created by the +

This must only be called on SoupMessages which were created by the SoupServer and are currently doing I/O, such as those passed into a SoupServerCallback or emitted in a “request-read” signal.

-

Parameters

-
+

Parameters

+
@@ -1169,12 +1891,12 @@ soup_server_unpause_message (soup_server_pause_message(), or after adding a new chunk to a chunked response.

I/O won't actually resume until you return to the main loop.

-

This must only be called on SoupMessages which were created by the +

This must only be called on SoupMessages which were created by the SoupServer and are currently doing I/O, such as those passed into a SoupServerCallback or emitted in a “request-read” signal.

-

Parameters

-
+

Parameters

+
@@ -1202,8 +1924,51 @@ chunked response.

SoupServer

typedef struct _SoupServer SoupServer;
-

-

+
+
+
+

enum SoupServerListenOptions

+

Options to pass to soup_server_listen(), etc.

+

SOUP_SERVER_LISTEN_IPV4_ONLY and SOUP_SERVER_LISTEN_IPV6_ONLY +only make sense with soup_server_listen_all() and +soup_server_listen_local(), not plain soup_server_listen() (which +simply listens on whatever kind of socket you give it). And you +cannot specify both of them in a single call.

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + +

SOUP_SERVER_LISTEN_HTTPS

+

Listen for https connections rather + than plain http.

+
 

SOUP_SERVER_LISTEN_IPV4_ONLY

+

Only listen on IPv4 interfaces.

+
 

SOUP_SERVER_LISTEN_IPV6_ONLY

+

Only listen on IPv6 interfaces.

+
 
+
+

Since: 2.48


@@ -1215,63 +1980,26 @@ client making a particular request. In particular, you can use soup_client_context_get_auth_domain() and soup_client_context_get_auth_user() to determine if HTTP authentication was used successfully.

-

soup_client_context_get_address() and/or +

soup_client_context_get_remote_address() and/or soup_client_context_get_host() can be used to get information for -logging or debugging purposes. soup_client_context_get_socket() may +logging or debugging purposes. soup_client_context_get_gsocket() may also be of use in some situations (eg, tracking when multiple requests are made on the same connection).


-

SOUP_SERVER_PORT

-
#define SOUP_SERVER_PORT            "port"
-
-

Alias for the “port” property. (The port the -server listens on.)

-
-
-
-

SOUP_SERVER_INTERFACE

-
#define SOUP_SERVER_INTERFACE       "interface"
-
-

Alias for the “interface” property. (The address -of the network interface the server listens on.)

-
-
-
-

SOUP_SERVER_SSL_CERT_FILE

-
#define SOUP_SERVER_SSL_CERT_FILE   "ssl-cert-file"
-
-

Alias for the “ssl-cert-file” property, qv.

-
-
-
-

SOUP_SERVER_SSL_KEY_FILE

-
#define SOUP_SERVER_SSL_KEY_FILE    "ssl-key-file"
-
-

Alias for the “ssl-key-file” property, qv.

-
-
-

SOUP_SERVER_TLS_CERTIFICATE

#define SOUP_SERVER_TLS_CERTIFICATE "tls-certificate"
 

Alias for the “tls-certificate” property, qv.

-
-
-
-

SOUP_SERVER_ASYNC_CONTEXT

-
#define SOUP_SERVER_ASYNC_CONTEXT   "async-context"
-
-

Alias for the “async-context” property. (The -server's GMainContext.)

+

Since: 2.38


SOUP_SERVER_RAW_PATHS

#define SOUP_SERVER_RAW_PATHS       "raw-paths"
 
-

Alias for the “raw-paths” property. (If TRUE, +

Alias for the “raw-paths” property. (If TRUE, percent-encoding in the Request-URI path will not be automatically decoded.)

@@ -1287,8 +2015,8 @@ automatically decoded.)

SOUP_SERVER_HTTP_ALIASES

#define SOUP_SERVER_HTTP_ALIASES    "http-aliases"
 
-

-

+

Alias for the “http-aliases” property, qv.

+

Since: 2.44


@@ -1296,22 +2024,30 @@ automatically decoded.)

#define SOUP_SERVER_HTTPS_ALIASES   "https-aliases"
 

Alias for the “https-aliases” property, qv.

-

Since 2.44

+

Since: 2.44

Property Details

The “async-context” property

-
  “async-context”            gpointer
-

The GMainContext to dispatch async I/O in.

+
  “async-context”            gpointer
+

The server's GMainContext, if you are using the old API. +Servers created using soup_server_listen() will listen on +the GMainContext that was the thread-default context at +the time soup_server_listen() was called.

+
+

SoupServer:async-context is deprecated and should not be used in newly-written code.

+

The new API uses the thread-default GMainContext +rather than having an explicitly-specified one.

+

Flags: Read / Write / Construct Only


The “http-aliases” property

-
  “http-aliases”             GStrv
-

A NULL-terminated array of URI schemes that should be +

  “http-aliases”             GStrv
+

A NULL-terminated array of URI schemes that should be considered to be aliases for "http". Eg, if this included "dav", than a URI of dav://example.com/path would be treated @@ -1325,32 +2061,51 @@ any scheme except "https" is considered to be an alias for "http".

See also “https-aliases”.

Flags: Read / Write

-

Since 2.44

+

Since: 2.44


The “https-aliases” property

-
  “https-aliases”            GStrv
+
  “https-aliases”            GStrv

A comma-delimited list of URI schemes that should be considered to be aliases for "https". See “http-aliases” for more information.

-

The default value is NULL, meaning that no URI schemes +

The default value is NULL, meaning that no URI schemes are considered aliases for "https".

Flags: Read / Write

-

Since 2.44

+

Since: 2.44


The “interface” property

  “interface”                SoupAddress *
-

Address of interface to listen on.

+

The address of the network interface the server is +listening on, if you are using the old SoupServer API. +(This will not be set if you use soup_server_listen(), +etc.)

+
+

SoupServer:interface is deprecated and should not be used in newly-written code.

+

SoupServers can listen on multiple interfaces +at once now. Use soup_server_listen(), etc, to listen on an +interface, and soup_server_get_uris() to see what addresses +are being listened on.

+

Flags: Read / Write / Construct Only


The “port” property

-
  “port”                     guint
-

Port to listen on.

+
  “port”                     guint
+

The port the server is listening on, if you are using the +old SoupServer API. (This will not be set if you use +soup_server_listen(), etc.)

+
+

SoupServer:port is deprecated and should not be used in newly-written code.

+

SoupServers can listen on multiple interfaces +at once now. Use soup_server_listen(), etc, to listen on a +port, and soup_server_get_uris() to see what ports are +being listened on.

+

Flags: Read / Write / Construct Only

Allowed values: <= 65536

Default value: 0

@@ -1358,7 +2113,7 @@ are considered aliases for "https".


The “raw-paths” property

-
  “raw-paths”                gboolean
+
  “raw-paths”                gboolean

If %TRUE, percent-encoding in the Request-URI path will not be automatically decoded.

Flags: Read / Write / Construct Only

Default value: FALSE

@@ -1366,8 +2121,8 @@ are considered aliases for "https".


The “server-header” property

-
  “server-header”            gchar *
-

If non-NULL, the value to use for the "Server" header on +

  “server-header”            gchar *
+

If non-NULL, the value to use for the "Server" header on SoupMessages processed by this server.

The Server header is the server equivalent of the User-Agent header, and provides information about the @@ -1394,26 +2149,34 @@ header for you.


The “ssl-cert-file” property

-
  “ssl-cert-file”            gchar *
-

Path to a file containing a PEM-encoded certificate. If -this and “ssl-key-file” are both set, then the -server will speak https rather than plain http.

-

Alternatively, you can use “tls-certificate” -to provide an arbitrary GTlsCertificate.

+
  “ssl-cert-file”            gchar *
+

Path to a file containing a PEM-encoded certificate.

+

If you set this property and “ssl-key-file” at +construct time, then soup_server_new() will try to read the +files; if it cannot, it will return NULL, with no explicit +indication of what went wrong (and logging a warning with +newer versions of glib, since returning NULL from a +constructor is illegal).

+
+

SoupServer:ssl-cert-file is deprecated and should not be used in newly-written code.

+

use “tls-certificate” or +soup_server_set_ssl_certificate().

+

Flags: Read / Write / Construct Only

Default value: NULL


The “ssl-key-file” property

-
  “ssl-key-file”             gchar *
-

Path to a file containing a PEM-encoded private key. If -this and “ssl-key-file” are both set, then the -server will speak https rather than plain http. Note that -you are allowed to set them to the same value, if you have -a single file containing both the certificate and the key.

-

Alternatively, you can use “tls-certificate” -to provide an arbitrary GTlsCertificate.

+
  “ssl-key-file”             gchar *
+

Path to a file containing a PEM-encoded private key. See +“ssl-cert-file” for more information about how this +is used.

+
+

SoupServer:ssl-key-file is deprecated and should not be used in newly-written code.

+

use “tls-certificate” or +soup_server_set_ssl_certificate().

+

Flags: Read / Write / Construct Only

Default value: NULL

@@ -1422,12 +2185,12 @@ to provide an arbitrary GTlsCertificate.

The “tls-certificate” property

  “tls-certificate”          GTlsCertificate *

A GTlsCertificate that has a “private-key” -set. If this is set, then the server will speak https -rather than plain http.

-

Alternatively, you can use “ssl-cert-file” and -“ssl-key-file” properties, to have SoupServer -read in a a certificate from a file.

+set. If this is set, then the server will be able to speak +https in addition to (or instead of) plain http.

+

Alternatively, you can call soup_server_set_ssl_cert_file() +to have SoupServer read in a a certificate from a file.

Flags: Read / Write / Construct Only

+

Since: 2.38

@@ -1438,7 +2201,7 @@ read in a a certificate from a file.

user_function (SoupServer *server, SoupMessage *message, SoupClientContext *client, - gpointer user_data) + gpointer user_data)

Emitted when processing has failed for a message; this could mean either that it could not be read (if “request_read” has not been emitted for it yet), @@ -1451,8 +2214,8 @@ emitted; the signal exists primarily to allow the server to free any state that it may have allocated in “request_started”.

-

Parameters

-
+

Parameters

+
@@ -1482,7 +2245,7 @@ free any state that it may have allocated in
-

Flags: Run First

+

Flags: Run First


@@ -1491,12 +2254,12 @@ free any state that it may have allocated in user_function (SoupServer *server, SoupMessage *message, SoupClientContext *client, - gpointer user_data) + gpointer user_data)

Emitted when the server has finished writing a response to a request.

-

Parameters

-
+

Parameters

+
@@ -1526,7 +2289,7 @@ a request.

-

Flags: Run First

+

Flags: Run First


@@ -1535,19 +2298,19 @@ a request.

user_function (SoupServer *server, SoupMessage *message, SoupClientContext *client, - gpointer user_data) + gpointer user_data)

Emitted when the server has successfully read a request. message will have all of its request-side information filled in, and if the message was authenticated, client will have information about that. This signal is emitted -before any handlers are called for the message, and if it -sets the message's status_code, then normal handler -processing will be skipped.

+before any (non-early) handlers are called for the message, +and if it sets the message's status_code, then normal +handler processing will be skipped.

-

Parameters

-
+

Parameters

+
@@ -1577,7 +2340,7 @@ processing will be skipped.

-

Flags: Run First

+

Flags: Run First


@@ -1586,7 +2349,7 @@ processing will be skipped.

user_function (SoupServer *server, SoupMessage *message, SoupClientContext *client, - gpointer user_data) + gpointer user_data)

Emitted when the server has started reading a new request. message will be completely blank; not even the @@ -1599,8 +2362,8 @@ a “request_aborted”.

-

Parameters

-
+

Parameters

+
@@ -1630,7 +2393,7 @@ occurs, the processing will instead end with
-

Flags: Run First

+

Flags: Run First

@@ -1639,7 +2402,6 @@ occurs, the processing will instead end with
+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupSession.html b/docs/reference/html/SoupSession.html index edab9e41..29bb00a7 100644 --- a/docs/reference/html/SoupSession.html +++ b/docs/reference/html/SoupSession.html @@ -2,27 +2,27 @@ -libsoup Reference Manual: SoupSession - +SoupSession: libsoup Reference Manual + - + - + - + - +
@@ -36,7 +36,7 @@

Functions

-
+
@@ -116,7 +116,7 @@ + + + + @@ -167,7 +175,7 @@ void @@ -180,7 +188,7 @@ + + + + + + + + + + + + + + + +
-guint +guint soup_session_send_message () @@ -159,7 +159,15 @@ void -soup_session_prefetch_dns () +soup_session_websocket_connect_async () +
+SoupWebsocketConnection * + +soup_session_websocket_connect_finish ()
-soup_session_prepare_for_uri () +soup_session_prefetch_dns ()
-gboolean +gboolean soup_session_would_redirect () @@ -188,7 +196,7 @@
-gboolean +gboolean soup_session_redirect_message () @@ -212,7 +220,7 @@
-GMainContext * +GMainContext * soup_session_get_async_context () @@ -252,7 +260,7 @@
-GSList * +GSList * soup_session_get_features () @@ -276,18 +284,50 @@
-gboolean +gboolean soup_session_has_feature ()
+GIOStream * + +soup_session_steal_connection () +
+void + +(*SoupSessionConnectProgressCallback) () +
+void + +soup_session_connect_async () +
+GIOStream * + +soup_session_connect_finish () +

Properties

-
+
@@ -296,12 +336,12 @@ +gchar * - + @@ -313,27 +353,27 @@ +GType * - + - + - + - + @@ -344,12 +384,12 @@ - + - + @@ -367,28 +407,28 @@ +GType * +gchar * - + - + - + @@ -399,18 +439,24 @@ - + + + + + + - + +gchar * @@ -419,7 +465,7 @@

Signals

-
-gchar * accept-language Read / Write
gbooleangboolean accept-language-auto Read / Write
-GType * add-feature-by-type Read / Write
gpointergpointer async-context Read / Write / Construct Only
GStrvGStrv http-aliases Read / Write
GStrvGStrv https-aliases Read / Write
guintguint idle-timeout Read / Write
Read / Write / Construct Only
gintgint max-conns Read / Write
gintgint max-conns-per-host Read / Write
-GType * remove-feature-by-type Read / Write
-gchar * ssl-ca-file Read / Write
gbooleangboolean ssl-strict Read / Write
gbooleangboolean ssl-use-system-ca-file Read / Write
guintguint timeout Read / Write
Read / Write
gboolean +GTlsInteraction *tls-interactionRead / Write
gboolean use-ntlm Read / Write
gbooleangboolean use-thread-context Read / Write
-gchar * user-agent Read / Write
+
@@ -429,39 +475,39 @@ - + - + - + - + - + - +
void authenticateRun FirstRun First
void connection-createdRun FirstRun First
void request-queuedRun FirstRun First
void request-startedRun FirstRun First
void request-unqueuedRun FirstRun First
void tunnelingRun FirstRun First

Types and Values

-
+
@@ -513,6 +559,10 @@ + + + + @@ -568,7 +618,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupSession
         ├── SoupSessionAsync
         ╰── SoupSessionSync
@@ -596,7 +646,7 @@ one session for the first user, and a second session for the other
 user.)

In the past, SoupSession was an abstract class, and users needed to choose between SoupSessionAsync (which always uses -GMainLoop-based I/O), or SoupSessionSync (which always uses +GMainLoop-based I/O), or SoupSessionSync (which always uses blocking I/O and can be used from multiple threads simultaneously). This is no longer necessary; you can (and should) use a plain SoupSession, which supports both synchronous and asynchronous use. @@ -604,6 +654,23 @@ This is no longer necessary; you can (and should) use a plain behaves like it traditionally did on a SoupSessionAsync, and soup_session_send_message() behaves like it traditionally did on a SoupSessionSync.)

+

Additional SoupSession functionality is provided by +SoupSessionFeature objects, which can be added to a session with +soup_session_add_feature() or soup_session_add_feature_by_type() +(or at construct time with the SOUP_SESSION_ADD_FEATURE_BY_TYPE +pseudo-property). For example, SoupLogger provides support for +logging HTTP traffic, SoupContentDecoder provides support for +compressed response handling, and SoupContentSniffer provides +support for HTML5-style response body content sniffing. +Additionally, subtypes of SoupAuth and SoupRequest can be added +as features, to add support for additional authentication and URI +types.

+

All SoupSessions are created with a SoupAuthManager, and support +for SOUP_TYPE_AUTH_BASIC and SOUP_TYPE_AUTH_DIGEST. For +SoupRequest types, SoupRequestHTTP, SoupRequestFile, and +SoupRequestData are supported. Additionally, sessions using the +plain SoupSession class (rather than one of its deprecated +subtypes) have a SoupContentDecoder by default.

Functions

@@ -613,11 +680,10 @@ behaves like it traditionally did on a void);

Creates a SoupSession with the default options.

-

Returns

+

Returns

the new session.

-

-

Since 2.42

+

Since: 2.42


@@ -627,8 +693,8 @@ soup_session_new_with_options (const ...);

Creates a SoupSession with the specified options.

-

Parameters

-
#defineSOUP_SESSION_TLS_INTERACTION
#define SOUP_SESSION_ASYNC_CONTEXT
+

Parameters

+
@@ -650,11 +716,10 @@ soup_session_new_with_options (const -

Returns

+

Returns

the new session.

-

-

Since 2.42

+

Since: 2.42


@@ -662,12 +727,12 @@ soup_session_new_with_options (const SoupRequest * soup_session_request (SoupSession *session, const char *uri_string, - GError **error); + GError **error);

Creates a SoupRequest for retrieving uri_string .

-

Parameters

-
+

Parameters

+
@@ -686,19 +751,19 @@ soup_session_request (

error

-
+

return location for a GError, or NULL

return location for a GError, or NULL

 
-

Returns

-

a new SoupRequest, or -NULL on error.

+

Returns

+

a new SoupRequest, or +NULL on error.

[transfer full]

-

Since 2.42

+

Since: 2.42


@@ -706,12 +771,12 @@ soup_session_request (SoupRequest * soup_session_request_uri (SoupSession *session, SoupURI *uri, - GError **error); + GError **error);

Creates a SoupRequest for retrieving uri .

-

Parameters

-
+

Parameters

+
@@ -730,19 +795,19 @@ soup_session_request_uri (

error

-
+

return location for a GError, or NULL

return location for a GError, or NULL

 
-

Returns

-

a new SoupRequest, or -NULL on error.

+

Returns

+

a new SoupRequest, or +NULL on error.

[transfer full]

-

Since 2.42

+

Since: 2.42


@@ -751,15 +816,15 @@ soup_session_request_uri (SoupSession *session, const char *method, const char *uri_string, - GError **error); + GError **error);

Creates a SoupRequest for retrieving uri_string , which must be an "http" or "https" URI (or another protocol listed in session 's “http-aliases” or “https-aliases”).

-

Parameters

-
+

Parameters

+
@@ -783,19 +848,19 @@ soup_session_request_http (

error

-
+

return location for a GError, or NULL

return location for a GError, or NULL

 
-

Returns

-

a new SoupRequestHTTP, or -NULL on error.

+

Returns

+

a new SoupRequestHTTP, or +NULL on error.

[transfer full]

-

Since 2.42

+

Since: 2.42


@@ -804,15 +869,15 @@ soup_session_request_http (SoupSession *session, const char *method, SoupURI *uri, - GError **error); + GError **error);

Creates a SoupRequest for retrieving uri , which must be an "http" or "https" URI (or another protocol listed in session 's “http-aliases” or “https-aliases”).

-

Parameters

-
+

Parameters

+
@@ -836,19 +901,19 @@ soup_session_request_http_uri ( - +

error

return location for a GError, or NULL

return location for a GError, or NULL

 
-

Returns

-

a new SoupRequestHTTP, or -NULL on error.

+

Returns

+

a new SoupRequestHTTP, or +NULL on error.

[transfer full]

-

Since 2.42

+

Since: 2.42


@@ -856,12 +921,12 @@ soup_session_request_http_uri (void (*SoupSessionCallback) (SoupSession *session, SoupMessage *msg, - gpointer user_data); + gpointer user_data);

Prototype for the callback passed to soup_session_queue_message(), qv.

-

Parameters

-
+

Parameters

+
@@ -894,10 +959,10 @@ qv.

soup_session_queue_message (SoupSession *session, SoupMessage *msg, SoupSessionCallback callback, - gpointer user_data); + gpointer user_data);

Queues the message msg for asynchronously sending the request and -receiving a response in the current thread-default GMainContext. +receiving a response in the current thread-default GMainContext. If msg has been processed before, any resources related to the time it was last sent are freed.

@@ -907,18 +972,18 @@ be invoked. If after returning from this callback the message has not been requeued, msg will be unreffed.

(The behavior above applies to a plain SoupSession; if you are -using SoupSessionAsync or SoupSessionSync, then the GMainContext +using SoupSessionAsync or SoupSessionSync, then the GMainContext that is used depends on the settings of “async-context” and “use-thread-context”, and for SoupSessionSync, the message will actually be sent and processed in another thread, with -only the final callback occurring in the indicated GMainContext.)

+only the final callback occurring in the indicated GMainContext.)

Contrast this method with soup_session_send_async(), which also asynchronously sends a message, but returns before reading the response body, and allows you to read the response via a GInputStream.

-

Parameters

-
+

Parameters

+
@@ -932,20 +997,20 @@ response body, and allows you to read the response via a - + - - + - - +

msg

the message to queue.

the message to queue.

[transfer full]

callback

a SoupSessionCallback which will +

a SoupSessionCallback which will be called after the message completes or when an unrecoverable error occurs.

[allow-none][scope async][allow-none][scope async]

user_data

a pointer passed to callback +

a pointer passed to callback .

[allow-none][allow-none]
@@ -961,8 +1026,8 @@ soup_session_requeue_message ( -

Parameters

-
+

Parameters

+
@@ -986,7 +1051,7 @@ again.


soup_session_send_message ()

-
guint
+
guint
 soup_session_send_message (SoupSession *session,
                            SoupMessage *msg);

Synchronously send msg @@ -1005,8 +1070,8 @@ synchronously sends a message, but returns before reading the response body, and allows you to read the response via a GInputStream.

-

Parameters

-
+

Parameters

+
@@ -1027,9 +1092,8 @@ response body, and allows you to read the response via a
-

Returns

+

Returns

the HTTP status code of the response

-


@@ -1038,7 +1102,7 @@ response body, and allows you to read the response via a
void
 soup_session_cancel_message (SoupSession *session,
                              SoupMessage *msg,
-                             guint status_code);
+ guint status_code);

Causes session to immediately finish processing msg (regardless @@ -1067,8 +1131,8 @@ before

-

Parameters

-
+

Parameters

+
@@ -1103,14 +1167,14 @@ returning to the main loop.

soup_session_send (SoupSession *session, SoupMessage *msg, GCancellable *cancellable, - GError **error); + GError **error);

Synchronously sends msg and waits for the beginning of a response. On success, a GInputStream will be returned which you can use to read the response body. ("Success" here means only that an HTTP response was received and understood; it does not necessarily mean that a 2xx class status code was received.)

-

If non-NULL, cancellable +

If non-NULL, cancellable can be used to cancel the request; soup_session_send() will return a G_IO_ERROR_CANCELLED error. Note that with requests that have side effects (eg, @@ -1129,8 +1193,8 @@ response has been completely read.

(Note that this method cannot be called on the deprecated SoupSessionAsync subclass.)

-

Parameters

-
+

Parameters

+
@@ -1154,19 +1218,19 @@ response has been completely read.

- +

error

return location for a GError, or NULL

return location for a GError, or NULL

 
-

Returns

-

a GInputStream for reading the -response body, or NULL on error.

+

Returns

+

a GInputStream for reading the +response body, or NULL on error.

[transfer full]

-

Since 2.42

+

Since: 2.42


@@ -1176,7 +1240,7 @@ soup_session_send_async (SoupMessage *msg, GCancellable *cancellable, GAsyncReadyCallback callback, - gpointer user_data); + gpointer user_data);

Asynchronously sends msg and waits for the beginning of a response. When callback @@ -1194,8 +1258,8 @@ callback until the response has been completely read.

SoupSessionAsync if you have set the “use-thread-context” property.)

-

Parameters

-
+

Parameters

+
@@ -1231,7 +1295,7 @@ callback until the response has been completely read.

-

Since 2.42

+

Since: 2.42


@@ -1239,13 +1303,13 @@ callback until the response has been completely read.

GInputStream *
 soup_session_send_finish (SoupSession *session,
                           GAsyncResult *result,
-                          GError **error);
+ GError **error);

Gets the response to a soup_session_send_async() call and (if successful), returns a GInputStream that can be used to read the response body.

-

Parameters

-
+

Parameters

+
@@ -1264,43 +1328,52 @@ response body.

- +

error

return location for a GError, or NULL

return location for a GError, or NULL

 
-

Returns

-

a GInputStream for reading the -response body, or NULL on error.

+

Returns

+

a GInputStream for reading the +response body, or NULL on error.

[transfer full]

-

Since 2.42

+

Since: 2.42


-

soup_session_prefetch_dns ()

+

soup_session_websocket_connect_async ()

void
-soup_session_prefetch_dns (SoupSession *session,
-                           const char *hostname,
-                           GCancellable *cancellable,
-                           SoupAddressCallback callback,
-                           gpointer user_data);
-

Tells session - that an URI from the given hostname - may be requested -shortly, and so the session can try to prepare by resolving the -domain name in advance, in order to work more quickly once the URI -is actually requested.

-

If cancellable - is non-NULL, it can be used to cancel the -resolution. callback - will still be invoked in this case, with a -status of SOUP_STATUS_CANCELLED.

+soup_session_websocket_connect_async (SoupSession *session, + SoupMessage *msg, + const char *origin, + char **protocols, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +

Asynchronously creates a SoupWebsocketConnection to communicate +with a remote server.

+

All necessary WebSocket-related headers will be added to msg +, and +it will then be sent and asynchronously processed normally +(including handling of redirection and HTTP authentication).

+

If the server returns "101 Switching Protocols", then msg +'s status +code and response headers will be updated, and then the WebSocket +handshake will be completed. On success, +soup_session_websocket_connect_finish() will return a new +SoupWebsocketConnection. On failure it will return a GError.

+

If the server returns a status other than "101 Switching +Protocols", then msg + will contain the complete response headers +and body from the server's response, and +soup_session_websocket_connect_finish() will return +SOUP_WEBSOCKET_ERROR_NOT_WEBSOCKET.

-

Parameters

-
+

Parameters

+
@@ -1313,20 +1386,30 @@ status of   - - + + + + + + + + + + + + - - + + - - + + @@ -1337,27 +1420,77 @@ result, or Since 2.38

+

Since: 2.50


-

soup_session_prepare_for_uri ()

-
void
-soup_session_prepare_for_uri (SoupSession *session,
-                              SoupURI *uri);
-
-

soup_session_prepare_for_uri has been deprecated since version 2.38 and should not be used in newly-written code.

-

use soup_session_prefetch_dns() instead

+

soup_session_websocket_connect_finish ()

+
SoupWebsocketConnection *
+soup_session_websocket_connect_finish (SoupSession *session,
+                                       GAsyncResult *result,
+                                       GError **error);
+

Gets the SoupWebsocketConnection response to a +soup_session_websocket_connect_async() call and (if successful), +returns a SoupWebsocketConnection that can be used to communicate +with the server.

+
+

Parameters

+

hostname

a hostname to be resolved

msg

SoupMessage indicating the WebSocket server to connect to

 

origin

origin of the connection.

[allow-none]

protocols

a +NULL-terminated array of protocols supported.

[allow-none][array zero-terminated=1]

cancellable

a GCancellable object, or NULL.

[allow-none]

a GCancellable

 

callback

callback to call with the -result, or NULL.

[scope async][allow-none]

the callback to invoke

 

user_data

+++++ + + + + + + + + + + + + + + + + + +

session

a SoupSession

 

result

the GAsyncResult passed to your callback

 

error

return location for a GError, or NULL

 
+
+
+

Returns

+

a new SoupWebsocketConnection, or +NULL on error.

+

[transfer full]

+

Since: 2.50

+
+
+
+

soup_session_prefetch_dns ()

+
void
+soup_session_prefetch_dns (SoupSession *session,
+                           const char *hostname,
+                           GCancellable *cancellable,
+                           SoupAddressCallback callback,
+                           gpointer user_data);

Tells session - that uri - may be requested shortly, and so the -session can try to prepare (resolving the domain name, obtaining -proxy address, etc.) in order to work more quickly once the URI is -actually requested.

+ that an URI from the given hostname + may be requested +shortly, and so the session can try to prepare by resolving the +domain name in advance, in order to work more quickly once the URI +is actually requested.

+

If cancellable + is non-NULL, it can be used to cancel the +resolution. callback + will still be invoked in this case, with a +status of SOUP_STATUS_CANCELLED.

-

Parameters

-
+

Parameters

+
@@ -1370,14 +1503,31 @@ actually requested.

- - + + + + + + + + + + + + + + + + +
 

uri

a SoupURI which may be required

hostname

a hostname to be resolved

 

cancellable

a GCancellable object, or NULL.

[allow-none]

callback

callback to call with the +result, or NULL.

[scope async][allow-none]

user_data

data for callback +

 
-

Since 2.30

+

Since: 2.38


@@ -1393,8 +1543,8 @@ persistent connections.

soup_session_abort() returns. Requests on a plain SoupSession will not.

-

Parameters

-
+

Parameters

+
@@ -1411,7 +1561,7 @@ not.


soup_session_would_redirect ()

-
gboolean
+
gboolean
 soup_session_would_redirect (SoupSession *session,
                              SoupMessage *msg);

Checks if msg @@ -1421,8 +1571,8 @@ redirect it to a new URL (ignoring msg 's SOUP_MESSAGE_NO_REDIRECT flag, and the number of times it has already been redirected).

-

Parameters

-
+

Parameters

+
@@ -1443,17 +1593,16 @@ flag, and the number of times it has already been redirected).

-

Returns

+

Returns

whether msg would be redirected

-

-

Since 2.38

+

Since: 2.38


soup_session_redirect_message ()

-
gboolean
+
gboolean
 soup_session_redirect_message (SoupSession *session,
                                SoupMessage *msg);

Updates msg @@ -1472,8 +1621,8 @@ request, then msg has already been redirected too many times, this will cause it to fail with SOUP_STATUS_TOO_MANY_REDIRECTS.

-

Parameters

-
+

Parameters

+
@@ -1494,13 +1643,12 @@ cause it to fail with -

Returns

-

TRUE if a redirection was applied, FALSE if not +

Returns

+

TRUE if a redirection was applied, FALSE if not (eg, because there was no Location header, or it could not be parsed).

-

-

Since 2.38

+

Since: 2.38


@@ -1514,8 +1662,8 @@ resume I/O.

This may only be called for asynchronous messages (those sent on a SoupSessionAsync or using soup_session_queue_message()).

-

Parameters

-
+

Parameters

+
@@ -1554,8 +1702,8 @@ reading or writing won't resume until you return to the main loop.

This may only be called for asynchronous messages (those sent on a SoupSessionAsync or using soup_session_queue_message()).

-

Parameters

-
+

Parameters

+
@@ -1580,17 +1728,17 @@ reading or writing won't resume until you return to the main loop.


soup_session_get_async_context ()

-
GMainContext *
+
GMainContext *
 soup_session_get_async_context (SoupSession *session);

Gets session 's “async-context”. This does not add a ref to the context, so you will need to ref it yourself if you want it to outlive its session.

For a modern SoupSession, this will always just return the -thread-default GMainContext, and so is not especially useful.

+thread-default GMainContext, and so is not especially useful.

-

Parameters

-
+

Parameters

+
@@ -1604,11 +1752,11 @@ thread-default -

Returns

-

session -'s GMainContext, which may -be NULL.

-

[transfer none]

+

Returns

+

session +'s GMainContext, +which may be NULL.

+

[nullable][transfer none]


@@ -1622,11 +1770,11 @@ soup_session_add_feature (SOUP_SESSION_ADD_FEATURE property.

-

Note that a SoupContentDecoder is added to the session by default -(unless you are using one of the deprecated session subclasses).

+

See the main SoupSession documentation for information on what +features are present in sessions by default.

-

Parameters

-
+

Parameters

+
@@ -1646,14 +1794,14 @@ feature to the session at construct time by using the
-

Since 2.24

+

Since: 2.24


soup_session_add_feature_by_type ()

void
 soup_session_add_feature_by_type (SoupSession *session,
-                                  GType feature_type);
+ GType feature_type);

If feature_type is the type of a class that implements SoupSessionFeature, this creates a new feature of that type and @@ -1669,11 +1817,11 @@ a "subfeature". This can be used to add new SoupRequest types, for instance.

You can also add a feature to the session at construct time by using the SOUP_SESSION_ADD_FEATURE_BY_TYPE property.

-

Note that a SoupContentDecoder is added to the session by default -(unless you are using one of the deprecated session subclasses).

+

See the main SoupSession documentation for information on what +features are present in sessions by default.

-

Parameters

-
+

Parameters

+
@@ -1687,13 +1835,13 @@ using the

feature_type

-
+

a GType

a GType

 
-

Since 2.24

+

Since: 2.24


@@ -1705,8 +1853,8 @@ soup_session_remove_feature (session .

-

Parameters

-
+

Parameters

+
@@ -1727,14 +1875,14 @@ soup_session_remove_feature (Since 2.24

+

Since: 2.24


soup_session_remove_feature_by_type ()

void
 soup_session_remove_feature_by_type (SoupSession *session,
-                                     GType feature_type);
+ GType feature_type);

Removes all features of type feature_type (or any subclass of feature_type @@ -1743,8 +1891,8 @@ soup_session_remove_feature_by_type (SOUP_SESSION_REMOVE_FEATURE_BY_TYPE property.

-

Parameters

-
+

Parameters

+
@@ -1758,20 +1906,20 @@ from the session at construct time by using the - +

feature_type

a GType

a GType

 
-

Since 2.24

+

Since: 2.24


soup_session_get_features ()

-
GSList *
+
GSList *
 soup_session_get_features (SoupSession *session,
-                           GType feature_type);
+ GType feature_type);

Generates a list of session 's features of type feature_type . (If @@ -1779,8 +1927,8 @@ you want to see all features, you can pass SOUP_TYPE_SESSI for feature_type .)

-

Parameters

-
+

Parameters

+
@@ -1794,33 +1942,33 @@ for feature_type - +

feature_type

the GType of the class of features to get

the GType of the class of features to get

 
-

Returns

+

Returns

a list of features. You must free the list, but not its contents.

[transfer container][element-type Soup.SessionFeature]

-

Since 2.26

+

Since: 2.26


soup_session_get_feature ()

SoupSessionFeature *
 soup_session_get_feature (SoupSession *session,
-                          GType feature_type);
+ GType feature_type);

Gets the first feature in session of type feature_type . For features where there may be more than one feature of a given type, use soup_session_get_features().

-

Parameters

-
+

Parameters

+
@@ -1834,27 +1982,27 @@ use

feature_type

-
+

the GType of the feature to get

the GType of the feature to get

 
-

Returns

-

a SoupSessionFeature, or NULL. The -feature is owned by session +

Returns

+

a SoupSessionFeature, or +NULL. The feature is owned by session .

-

[transfer none]

+

[nullable][transfer none]

-

Since 2.26

+

Since: 2.26


soup_session_get_feature_for_message ()

SoupSessionFeature *
 soup_session_get_feature_for_message (SoupSession *session,
-                                      GType feature_type,
+                                      GType feature_type,
                                       SoupMessage *msg);

Gets the first feature in session of type feature_type @@ -1867,10 +2015,10 @@ where feature_type particular, if there are two matching features, and the first is disabled on msg , and the second is not, then this will return -NULL, not the second feature.

+NULL, not the second feature.

-

Parameters

-
+

Parameters

+
@@ -1884,7 +2032,7 @@ disabled on msg - + @@ -1896,20 +2044,20 @@ disabled on msg

feature_type

the GType of the feature to get

the GType of the feature to get

 
-

Returns

-

a SoupSessionFeature, or NULL. The +

Returns

+

a SoupSessionFeature, or NULL. The feature is owned by session .

-

[transfer none]

+

[nullable][transfer none]

-

Since 2.28

+

Since: 2.28


soup_session_has_feature ()

-
gboolean
+
gboolean
 soup_session_has_feature (SoupSession *session,
-                          GType feature_type);
+ GType feature_type);

Tests if session has at a feature of type feature_type (which can @@ -1917,8 +2065,8 @@ be the type of either a SoupAuth or SoupRequest).

-

Parameters

-
+

Parameters

+
@@ -1932,18 +2080,215 @@ some class managed by another feature, such as

feature_type

-
+ + + + +

the GType of the class of features to check for

the GType of the class of features to check for

 
+
+
+

Returns

+

TRUE or FALSE

+
+

Since: 2.42

+
+
+
+

soup_session_steal_connection ()

+
GIOStream *
+soup_session_steal_connection (SoupSession *session,
+                               SoupMessage *msg);
+

"Steals" the HTTP connection associated with msg + from session +. +This happens immediately, regardless of the current state of the +connection, and msg +'s callback will not be called. You can steal +the connection from a SoupMessage signal handler if you need to +wait for part or all of the response to be received first.

+

Calling this function may cause msg + to be freed if you are not +holding any other reference to it.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

session

a SoupSession

 

msg

the message whose connection is to be stolen

 
+
+
+

Returns

+

the GIOStream formerly associated +with msg +(or NULL if msg +was no longer associated with a +connection). No guarantees are made about what kind of GIOStream +is returned.

+

[transfer full]

+
+

Since: 2.50

+
+
+
+

SoupSessionConnectProgressCallback ()

+
void
+(*SoupSessionConnectProgressCallback) (SoupSession *session,
+                                       GSocketClientEvent event,
+                                       GIOStream *connection,
+                                       gpointer user_data);
+

Prototype for the progress callback passed to soup_session_connect_async().

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

session

the SoupSession

 

event

a GSocketClientEvent

 

connection

the current state of the network connection

 

user_data

the data passed to soup_session_connect_async().

 
+
+

Since: 2.62

+
+
+
+

soup_session_connect_async ()

+
void
+soup_session_connect_async (SoupSession *session,
+                            SoupURI *uri,
+                            GCancellable *cancellable,
+                            SoupSessionConnectProgressCallback progress_callback,
+                            GAsyncReadyCallback callback,
+                            gpointer user_data);
+

Start a connection to uri +. The operation can be monitored by providing a progress_callback + +and finishes when the connection is done or an error ocurred.

+

Call soup_session_connect_finish() to get the GIOStream to communicate with the server.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

session

a SoupSession

 

uri

a SoupURI to connect to

 

cancellable

a GCancellable

 

progress_callback

a SoupSessionConnectProgressCallback which +will be called for every network event that occurs during the connection.

[allow-none][scope async]

callback

the callback to invoke when the operation finishes.

[allow-none][scope async]

user_data

data for progress_callback +and callback +

 
+
+

Since: 2.62

+
+
+
+

soup_session_connect_finish ()

+
GIOStream *
+soup_session_connect_finish (SoupSession *session,
+                             GAsyncResult *result,
+                             GError **error);
+

Gets the GIOStream created for the connection to communicate with the server.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + +

session

a SoupSession

 

result

the GAsyncResult passed to your callback

 

error

return location for a GError, or NULL

 
-

Returns

-

TRUE or FALSE

-

+

Returns

+

a new GIOStream, or NULL on error.

+

[transfer full]

-

Since 2.42

+

Since: 2.62

@@ -1951,16 +2296,14 @@ some class managed by another feature, such as

SoupSession

typedef struct _SoupSession SoupSession;
-

-


enum SoupRequestError

A SoupRequest error.

-

Members

-
+

Members

+
@@ -2001,16 +2344,16 @@ some class managed by another feature, such as Since 2.42

+

Since: 2.42


SOUP_REQUEST_ERROR

#define SOUP_REQUEST_ERROR soup_request_error_quark ()
 
-

A GError domain for SoupRequest-related errors. Used with +

A GError domain for SoupRequest-related errors. Used with SoupRequestError.

-

Since 2.42

+

Since: 2.42


@@ -2046,7 +2389,7 @@ some class managed by another feature, such as #define SOUP_SESSION_TLS_DATABASE "tls-database"

Alias for the “tls-database” property, qv.

-

Since 2.38

+

Since: 2.38


@@ -2055,7 +2398,7 @@ some class managed by another feature, such as “ssl-use-system-ca-file” property, qv.

-

Since 2.38

+

Since: 2.38


@@ -2070,7 +2413,15 @@ qv.

#define SOUP_SESSION_SSL_STRICT             "ssl-strict"
 

Alias for the “ssl-strict” property, qv.

-

Since 2.30

+

Since: 2.30

+
+
+
+

SOUP_SESSION_TLS_INTERACTION

+
#define SOUP_SESSION_TLS_INTERACTION        "tls-interaction"
+
+

Alias for the “tls-interaction” property, qv.

+

Since: 2.48


@@ -2085,7 +2436,7 @@ qv.

#define SOUP_SESSION_USE_THREAD_CONTEXT     "use-thread-context"
 

Alias for the “use-thread-context” property, qv.

-

Since 2.38

+

Since: 2.38


@@ -2100,7 +2451,7 @@ qv.

#define SOUP_SESSION_IDLE_TIMEOUT           "idle-timeout"
 

Alias for the “idle-timeout” property, qv.

-

Since 2.24

+

Since: 2.24


@@ -2115,7 +2466,7 @@ qv.

#define SOUP_SESSION_ADD_FEATURE            "add-feature"
 

Alias for the “add-feature” property, qv.

-

Since 2.24

+

Since: 2.24


@@ -2123,7 +2474,7 @@ qv.

#define SOUP_SESSION_ADD_FEATURE_BY_TYPE    "add-feature-by-type"
 

Alias for the “add-feature-by-type” property, qv.

-

Since 2.24

+

Since: 2.24


@@ -2132,7 +2483,7 @@ qv.

Alias for the “remove-feature-by-type” property, qv.

-

Since 2.24

+

Since: 2.24


@@ -2140,7 +2491,7 @@ qv.

#define SOUP_SESSION_ACCEPT_LANGUAGE        "accept-language"
 

Alias for the “accept-language” property, qv.

-

Since 2.30

+

Since: 2.30


@@ -2148,7 +2499,7 @@ qv.

#define SOUP_SESSION_ACCEPT_LANGUAGE_AUTO   "accept-language-auto"
 

Alias for the “accept-language-auto” property, qv.

-

Since 2.30

+

Since: 2.30


@@ -2156,7 +2507,7 @@ qv.

#define SOUP_SESSION_HTTP_ALIASES       "http-aliases"
 

Alias for the “http-aliases” property, qv.

-

Since 2.38

+

Since: 2.38


@@ -2164,7 +2515,7 @@ qv.

#define SOUP_SESSION_HTTPS_ALIASES      "https-aliases"
 

Alias for the “https-aliases” property, qv.

-

Since 2.38

+

Since: 2.38


@@ -2172,34 +2523,34 @@ qv.

#define SOUP_SESSION_LOCAL_ADDRESS          "local-address"
 

Alias for the “local-address” property, qv.

-

Since 2.42

+

Since: 2.42

Property Details

The “accept-language” property

-
  “accept-language”          gchar *
-

If non-NULL, the value to use for the "Accept-Language" header +

  “accept-language”          gchar *
+

If non-NULL, the value to use for the "Accept-Language" header on SoupMessages sent from this session.

Setting this will disable “accept-language-auto”.

Flags: Read / Write

Default value: NULL

-

Since 2.30

+

Since: 2.30


The “accept-language-auto” property

-
  “accept-language-auto”     gboolean
-

If TRUE, SoupSession will automatically set the string +

  “accept-language-auto”     gboolean
+

If TRUE, SoupSession will automatically set the string for the "Accept-Language" header on every SoupMessage -sent, based on the return value of g_get_language_names().

+sent, based on the return value of g_get_language_names().

Setting this will override any previous value of “accept-language”.

Flags: Read / Write

Default value: FALSE

-

Since 2.30

+

Since: 2.30


@@ -2207,46 +2558,48 @@ sent, based on the return value of “add-feature” SoupSessionFeature *

Add a feature object to the session. (Shortcut for calling soup_session_add_feature().)

+

[skip]

Flags: Read / Write

-

Since 2.24

+

Since: 2.24


The “add-feature-by-type” property

-
  “add-feature-by-type”      GType *
+
  “add-feature-by-type”      GType *

Add a feature object of the given type to the session. (Shortcut for calling soup_session_add_feature_by_type().)

+

[skip]

Flags: Read / Write

Allowed values: GObject

-

Since 2.24

+

Since: 2.24


The “async-context” property

-
  “async-context”            gpointer
-

The GMainContext that miscellaneous session-related +

  “async-context”            gpointer
+

The GMainContext that miscellaneous session-related asynchronous callbacks are invoked on. (Eg, setting “idle-timeout” will add a timeout source on this context.)

For a plain SoupSession, this property is always set to -the GMainContext that is the thread-default at the time +the GMainContext that is the thread-default at the time the session was created, and cannot be overridden. For the deprecated SoupSession subclasses, the default value is -NULL, meaning to use the global default GMainContext.

-

If “use-thread-context” is FALSE, this context +NULL, meaning to use the global default GMainContext.

+

If “use-thread-context” is FALSE, this context will also be used for asynchronous HTTP I/O.

Flags: Read / Write / Construct Only


The “http-aliases” property

-
  “http-aliases”             GStrv
-

A NULL-terminated array of URI schemes that should be +

  “http-aliases”             GStrv
+

A NULL-terminated array of URI schemes that should be considered to be aliases for "http". Eg, if this included "dav", than a URI of dav://example.com/path would be treated identically to http://example.com/path.

-

In a plain SoupSession, the default value is NULL, +

In a plain SoupSession, the default value is NULL, meaning that only "http" is recognized as meaning "http". In SoupSessionAsync and SoupSessionSync, for backward compatibility, the default value is an array containing the @@ -2255,24 +2608,24 @@ which means that any scheme except "https" is considered to be an alias for "http".

See also “https-aliases”.

Flags: Read / Write

-

Since 2.38

+

Since: 2.38


The “https-aliases” property

-
  “https-aliases”            GStrv
+
  “https-aliases”            GStrv

A comma-delimited list of URI schemes that should be considered to be aliases for "https". See “http-aliases” for more information.

-

The default value is NULL, meaning that no URI schemes +

The default value is NULL, meaning that no URI schemes are considered aliases for "https".

Flags: Read / Write

-

Since 2.38

+

Since: 2.38


The “idle-timeout” property

-
  “idle-timeout”             guint
+
  “idle-timeout”             guint

Connection lifetime (in seconds) when idle. Any connection left idle longer than this will be closed.

Although you can change this property at any time, it will @@ -2281,12 +2634,12 @@ ones. You can call

Note that the default value of 60 seconds only applies to -plain SoupSessions. If you are using SoupSessionAsync or +plain SoupSessions. If you are using SoupSessionAsync or SoupSessionSync, the default value is 0 (meaning idle connections will never time out).

Flags: Read / Write

Default value: 60

-

Since 2.24

+

Since: 2.24


@@ -2297,12 +2650,12 @@ the connection.

Use this property if you want for instance to bind the local socket to a specific IP address.

Flags: Read / Write / Construct Only

-

Since 2.42

+

Since: 2.42


The “max-conns” property

-
  “max-conns”                gint
+
  “max-conns”                gint

The maximum number of connections that the session can open at once.

Flags: Read / Write

Allowed values: >= 1

@@ -2311,7 +2664,7 @@ local socket to a specific IP address.


The “max-conns-per-host” property

-
  “max-conns-per-host”       gint
+
  “max-conns-per-host”       gint

The maximum number of connections that the session can open at once to a given host.

Flags: Read / Write

Allowed values: >= 1

@@ -2326,12 +2679,12 @@ will clear the SoupProxyURIResolver features that have been added to the session.

By default, in a plain SoupSession, this is set to the -default GProxyResolver, but you can set it to NULL if you +default GProxyResolver, but you can set it to NULL if you don't want to use proxies, or set it to your own GProxyResolver if you want to control what proxies get used.

Flags: Read / Write

-

Since 2.42

+

Since: 2.42


@@ -2357,17 +2710,18 @@ proxies, you can create a GSimpleProxyResolver and set

The “remove-feature-by-type” property

-
  “remove-feature-by-type”   GType *
+
  “remove-feature-by-type”   GType *

Remove feature objects from the session. (Shortcut for calling soup_session_remove_feature_by_type().)

+

[skip]

Flags: Read / Write

Allowed values: GObject

-

Since 2.24

+

Since: 2.24


The “ssl-ca-file” property

-
  “ssl-ca-file”              gchar *
+
  “ssl-ca-file”              gchar *

File containing SSL CA certificates.

If the specified file does not exist or cannot be read, then libsoup will print a warning, and then behave as @@ -2385,7 +2739,7 @@ else

The “ssl-strict” property

-
  “ssl-strict”               gboolean
+
  “ssl-strict”               gboolean

Normally, if “tls-database” is set (including if it was set via “ssl-use-system-ca-file” or “ssl-ca-file”), then libsoup will reject any @@ -2393,14 +2747,14 @@ certificate that is invalid (ie, expired) or that is not signed by one of the given CA certificates, and the SoupMessage will fail with the status SOUP_STATUS_SSL_FAILED.

-

If you set “ssl-strict” to FALSE, then all +

If you set “ssl-strict” to FALSE, then all certificates will be accepted, and you will need to call soup_message_get_https_status() to distinguish valid from invalid certificates. (This can be used, eg, if you want to accept invalid certificates after giving some sort of warning.)

For a plain SoupSession, if the session has no CA file or -TLS database, and this property is TRUE, then all +TLS database, and this property is TRUE, then all certificates will be rejected. However, beware that the deprecated SoupSession subclasses (SoupSessionAsync and SoupSessionSync) have the opposite behavior: if there is @@ -2408,33 +2762,33 @@ no CA file or TLS database, then all certificates are always accepted, and this property has no effect.

Flags: Read / Write

Default value: TRUE

-

Since 2.30

+

Since: 2.30


The “ssl-use-system-ca-file” property

-
  “ssl-use-system-ca-file”   gboolean
-

Setting this to TRUE is equivalent to setting +

  “ssl-use-system-ca-file”   gboolean
+

Setting this to TRUE is equivalent to setting “tls-database” to the default system CA database. (and likewise, setting “tls-database” to the default database by hand will cause this property to -become TRUE).

-

Setting this to FALSE (when it was previously TRUE) will +become TRUE).

+

Setting this to FALSE (when it was previously TRUE) will clear the “tls-database” field.

See “ssl-strict” for more information on how https certificate validation is handled.

-

Note that the default value of TRUE only applies to plain -SoupSessions. If you are using SoupSessionAsync or -SoupSessionSync, the default value is FALSE, for backward +

Note that the default value of TRUE only applies to plain +SoupSessions. If you are using SoupSessionAsync or +SoupSessionSync, the default value is FALSE, for backward compatibility.

Flags: Read / Write

Default value: TRUE

-

Since 2.38

+

Since: 2.38


The “timeout” property

-
  “timeout”                  guint
+
  “timeout”                  guint

The timeout (in seconds) for socket I/O operations (including connecting to a server, and waiting for a reply to an HTTP request).

@@ -2444,7 +2798,7 @@ ones. You can call

Note that the default value of 60 seconds only applies to -plain SoupSessions. If you are using SoupSessionAsync or +plain SoupSessions. If you are using SoupSessionAsync or SoupSessionSync, the default value is 0 (meaning socket I/O will not time out).

Not to be confused with “idle-timeout” (which is @@ -2466,17 +2820,27 @@ the indicated file or system default.

See “ssl-strict” for more information on how https certificate validation is handled.

If you are using a plain SoupSession then -“ssl-use-system-ca-file” will be TRUE by +“ssl-use-system-ca-file” will be TRUE by default, and so this property will be a copy of the system CA database. If you are using SoupSessionAsync or -SoupSessionSync, this property will be NULL by default.

+SoupSessionSync, this property will be NULL by default.

+

Flags: Read / Write

+

Since: 2.38

+
+
+
+

The “tls-interaction” property

+
  “tls-interaction”          GTlsInteraction *
+

A GTlsInteraction object that will be passed on to any +GTlsConnections created by the session. (This can be used to +provide client-side certificates, for example.)

Flags: Read / Write

-

Since 2.38

+

Since: 2.48


The “use-ntlm” property

-
  “use-ntlm”                 gboolean
+
  “use-ntlm”                 gboolean

Whether or not to use NTLM authentication.

SoupSession:use-ntlm is deprecated and should not be used in newly-written code.

@@ -2489,21 +2853,21 @@ CA database. If you are using

The “use-thread-context” property

-
  “use-thread-context”       gboolean
-

If TRUE (which it always is on a plain SoupSession), +

  “use-thread-context”       gboolean
+

If TRUE (which it always is on a plain SoupSession), asynchronous HTTP requests in this session will run in -whatever the thread-default GMainContext is at the time +whatever the thread-default GMainContext is at the time they are started, rather than always occurring in “async-context”.

Flags: Read / Write

Default value: FALSE

-

Since 2.38

+

Since: 2.38


The “user-agent” property

-
  “user-agent”               gchar *
-

If non-NULL, the value to use for the "User-Agent" header +

  “user-agent”               gchar *
+

If non-NULL, the value to use for the "User-Agent" header on SoupMessages sent from this session.

RFC 2616 says: "The User-Agent request-header field contains information about the user agent originating the @@ -2535,14 +2899,14 @@ header for you.

user_function (SoupSession *session, SoupMessage *msg, SoupAuth *auth, - gboolean retrying, - gpointer user_data) + gboolean retrying, + gpointer user_data)

Emitted when the session requires authentication. If credentials are available call soup_auth_authenticate() on auth . If these credentials fail, the signal will be emitted again, with retrying - set to TRUE, which will + set to TRUE, which will continue until you return without calling soup_auth_authenticate() on auth .

@@ -2553,13 +2917,13 @@ fully read.

before returning, then you can authenticate auth asynchronously -(as long as you g_object_ref() it to make sure it doesn't +(as long as you g_object_ref() it to make sure it doesn't get destroyed), and then unpause msg when you are ready for it to continue.

-

Parameters

-
+

Parameters

+
@@ -2583,7 +2947,7 @@ for it to continue.

- + @@ -2594,21 +2958,21 @@ for it to continue.

retrying

TRUE if this is the second (or later) attempt

TRUE if this is the second (or later) attempt

 
-

Flags: Run First

+

Flags: Run First


The “connection-created” signal

void
 user_function (SoupSession *session,
-               GObject     *connection,
-               gpointer     user_data)
+ GObject *connection, + gpointer user_data)

Emitted when a new connection is created. This is an internal signal intended only to be used for debugging purposes, and may go away in the future.

-

Parameters

-
+

Parameters

+
@@ -2633,8 +2997,8 @@ purposes, and may go away in the future.

-

Flags: Run First

-

Since 2.30

+

Flags: Run First

+

Since: 2.30


@@ -2642,7 +3006,7 @@ purposes, and may go away in the future.

void
 user_function (SoupSession *session,
                SoupMessage *msg,
-               gpointer     user_data)
+ gpointer user_data)

Emitted when a request is queued on session . (Note that "queued" doesn't just mean soup_session_queue_message(); @@ -2675,8 +3039,8 @@ exactly once, but “finished” (and all of the other SoupMessage signals) may be invoked multiple times for a given message.

-

Parameters

-
+

Parameters

+
@@ -2701,8 +3065,8 @@ signals) may be invoked multiple times for a given message.

-

Flags: Run First

-

Since 2.24

+

Flags: Run First

+

Since: 2.24


@@ -2711,13 +3075,17 @@ signals) may be invoked multiple times for a given message.

user_function (SoupSession *session, SoupMessage *msg, SoupSocket *socket, - gpointer user_data) + gpointer user_data)

Emitted just before a request is sent. See “request_queued” for a detailed description of the message lifecycle within a session.

+
+

SoupSession::request-started has been deprecated since version 2.50. and should not be used in newly-written code.

+

Use “starting” instead.

+
-

Parameters

-
+

Parameters

+
@@ -2747,7 +3115,7 @@ the message lifecycle within a session.

-

Flags: Run First

+

Flags: Run First


@@ -2755,7 +3123,7 @@ the message lifecycle within a session.

void
 user_function (SoupSession *session,
                SoupMessage *msg,
-               gpointer     user_data)
+ gpointer user_data)

Emitted when a request is removed from session 's queue, indicating that session @@ -2763,8 +3131,8 @@ indicating that session “request_queued” for a detailed description of the message lifecycle within a session.

-

Parameters

-
+

Parameters

+
@@ -2789,22 +3157,22 @@ message lifecycle within a session.

-

Flags: Run First

-

Since 2.24

+

Flags: Run First

+

Since: 2.24


The “tunneling” signal

void
 user_function (SoupSession *session,
-               GObject     *connection,
-               gpointer     user_data)
+ GObject *connection, + gpointer user_data)

Emitted when an SSL tunnel is being created on a proxy connection. This is an internal signal intended only to be used for debugging purposes, and may go away in the future.

-

Parameters

-
+

Parameters

+
@@ -2829,13 +3197,12 @@ used for debugging purposes, and may go away in the future.

-

Flags: Run First

-

Since 2.30

+

Flags: Run First

+

Since: 2.30

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupSessionAsync.html b/docs/reference/html/SoupSessionAsync.html index 99897028..bf1ce9f5 100644 --- a/docs/reference/html/SoupSessionAsync.html +++ b/docs/reference/html/SoupSessionAsync.html @@ -2,20 +2,20 @@ -libsoup Reference Manual: SoupSessionAsync - +SoupSessionAsync: libsoup Reference Manual + - + - + @@ -28,41 +28,14 @@

SoupSessionAsync

-

SoupSessionAsync — (Deprecated) SoupSession for asynchronous - (main-loop-based) I/O.

+

SoupSessionAsync — SoupSession for asynchronous (main-loop-based) I/O +(deprecated).

-

Functions

-
---- - - - - - - - - - - -
-SoupSession * - -soup_session_async_new () -
-SoupSession * - -soup_session_async_new_with_options () -
-
-

Types and Values

-
+
@@ -75,7 +48,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupSession
         ╰── SoupSessionAsync
 
@@ -89,83 +62,20 @@

Description

SoupSessionAsync is an implementation of SoupSession that uses non-blocking I/O via the glib main loop for all I/O.

-

As of libsoup 2.42, this is deprecated in favor of the plain -SoupSession class (which uses both asynchronous and synchronous -I/O, depending on the API used). See the porting guide.

Functions

-
-

soup_session_async_new ()

-
SoupSession *
-soup_session_async_new (void);
-
-

soup_session_async_new is deprecated and should not be used in newly-written code.

-

SoupSessionAsync is deprecated; use a plain -SoupSession, created with soup_session_new(). See the porting guide.

-
-

Creates an asynchronous SoupSession with the default options.

-
-

Returns

-

the new session.

-
-
-
-

soup_session_async_new_with_options ()

-
SoupSession *
-soup_session_async_new_with_options (const char *optname1,
-                                     ...);
-
-

soup_session_async_new_with_options is deprecated and should not be used in newly-written code.

-

SoupSessionAsync is deprecated; use a plain -SoupSession, created with soup_session_new_with_options(). See the

-porting guide. -
-

Creates an asynchronous SoupSession with the specified options.

-
-

Parameters

-
----- - - - - - - - - - - - - -

optname1

name of first property to set

 

...

value of optname1 -, followed by additional property/value pairs

 
-
-
-

Returns

-

the new session.

-

-
- -

Types and Values

SoupSessionAsync

typedef struct _SoupSessionAsync SoupSessionAsync;
-

-

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupSessionFeature.html b/docs/reference/html/SoupSessionFeature.html index 69154513..01bd0087 100644 --- a/docs/reference/html/SoupSessionFeature.html +++ b/docs/reference/html/SoupSessionFeature.html @@ -2,22 +2,22 @@ -libsoup Reference Manual: SoupSessionFeature - +SoupSessionFeature: libsoup Reference Manual + - + - + @@ -36,7 +36,7 @@

Types and Values

-
+
@@ -55,7 +55,7 @@

Object Hierarchy

-
    GInterface
+
    GInterface
     ╰── SoupSessionFeature
 
@@ -63,7 +63,7 @@

Prerequisites

SoupSessionFeature requires - GObject.

+ GObject.

Known Implementations

@@ -87,6 +87,7 @@ by the application. (Eg,

Functions

+

Types and Values

@@ -95,7 +96,7 @@ by the application. (Eg, typedef struct _SoupSessionFeature SoupSessionFeature;

An object that implement some sort of optional feature for SoupSession.

-

Since 2.24

+

Since: 2.24


@@ -130,8 +131,8 @@ by the application. (Eg, SoupSessionFeatures.

-

Members

-
+

Members

+
@@ -139,7 +140,7 @@ by the application. (Eg,

GTypeInterface parent;

+ @@ -160,7 +161,7 @@ by the application. (Eg,

request_started ()

- + @@ -186,12 +187,11 @@ by the application. (Eg, Since 2.24

+

Since: 2.24

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupSessionSync.html b/docs/reference/html/SoupSessionSync.html index aa035bb4..b9d6f148 100644 --- a/docs/reference/html/SoupSessionSync.html +++ b/docs/reference/html/SoupSessionSync.html @@ -2,20 +2,20 @@ -libsoup Reference Manual: SoupSessionSync - +SoupSessionSync: libsoup Reference Manual + - + -

GTypeInterface parent;

The parent interface.

 

Proxies the session's “request_started” signal

Proxies the session's “request_started” signal. Deprecated 2.50. Use “starting” instead.

 
+ @@ -28,41 +28,14 @@

SoupSessionSync

-

SoupSessionSync — (Deprecated) SoupSession for blocking I/O in - multithreaded programs.

+

SoupSessionSync — SoupSession for blocking I/O in multithreaded programs +(deprecated).

-

Functions

-
---- - - - - - - - - - - -
-SoupSession * - -soup_session_sync_new () -
-SoupSession * - -soup_session_sync_new_with_options () -
-
-

Types and Values

-
+
@@ -75,7 +48,7 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupSession
         ╰── SoupSessionSync
 
@@ -89,83 +62,20 @@

Description

SoupSessionSync is an implementation of SoupSession that uses synchronous I/O, intended for use in multi-threaded programs.

-

As of libsoup 2.42, this is deprecated in favor of the plain -SoupSession class (which uses both asynchronous and synchronous -I/O, depending on the API used). See the porting guide.

Functions

-
-

soup_session_sync_new ()

-
SoupSession *
-soup_session_sync_new (void);
-
-

soup_session_sync_new is deprecated and should not be used in newly-written code.

-

SoupSessionSync is deprecated; use a plain -SoupSession, created with soup_session_new(). See the porting guide.

-
-

Creates an synchronous SoupSession with the default options.

-
-

Returns

-

the new session.

-
-
-
-

soup_session_sync_new_with_options ()

-
SoupSession *
-soup_session_sync_new_with_options (const char *optname1,
-                                    ...);
-
-

soup_session_sync_new_with_options is deprecated and should not be used in newly-written code.

-

SoupSessionSync is deprecated; use a plain -SoupSession, created with soup_session_new_with_options(). See the

-porting guide. -
-

Creates an synchronous SoupSession with the specified options.

-
-

Parameters

-
----- - - - - - - - - - - - - -

optname1

name of first property to set

 

...

value of optname1 -, followed by additional property/value pairs

 
-
-
-

Returns

-

the new session.

-

-
-
-

Types and Values

SoupSessionSync

typedef struct _SoupSessionSync SoupSessionSync;
-

-

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupSocket.html b/docs/reference/html/SoupSocket.html index 6037e3cd..59807f32 100644 --- a/docs/reference/html/SoupSocket.html +++ b/docs/reference/html/SoupSocket.html @@ -2,22 +2,23 @@ -libsoup Reference Manual: SoupSocket - +SoupSocket: libsoup Reference Manual + - + - + @@ -36,7 +37,7 @@

Functions

-
+
@@ -68,7 +69,7 @@

soup_socket_write ()

SoupSocketIOStatus
 soup_socket_write (SoupSocket *sock,
-                   gconstpointer buffer,
-                   gsize len,
-                   gsize *nwrote,
+                   gconstpointer buffer,
+                   gsize len,
+                   gsize *nwrote,
                    GCancellable *cancellable,
-                   GError **error);
+ GError **error);

Attempts to write len bytes from buffer to sock @@ -1044,8 +1060,8 @@ emitted after “non-blocking”.)

-

Parameters

-
-guint +guint soup_socket_connect_sync () @@ -76,7 +77,7 @@
-gboolean +gboolean soup_socket_listen () @@ -84,7 +85,7 @@
-gboolean +gboolean soup_socket_start_ssl () @@ -92,7 +93,7 @@
-gboolean +gboolean soup_socket_start_proxy_ssl () @@ -100,7 +101,7 @@
-gboolean +gboolean soup_socket_is_ssl () @@ -116,7 +117,7 @@
-gboolean +gboolean soup_socket_is_connected () @@ -175,7 +176,7 @@

Properties

-
+
@@ -183,17 +184,34 @@ - + - - + + + + + + + - + + + + + + + + + + + @@ -204,39 +222,39 @@ - + - +SoupAddress * + - - +SoupSocketProperties * + + - + - + - + - + @@ -252,12 +270,12 @@ - + - + @@ -266,7 +284,7 @@

Signals

-
gpointergpointer async-context Read / Write / Construct Only
gbooleanclean-disposegintfdRead / Write / Construct Only
+GSocket *gsocket Write / Construct Only
gboolean +GIOStream *iostreamWrite / Construct Only
gbooleanipv6-onlyRead / Write
gboolean is-server Read
Read / Write / Construct Only
gbooleangboolean non-blocking Read / Write
-GProxyResolver *proxy-resolverremote-address Read / Write / Construct Only
-SoupAddress *remote-addressRead / Write / Construct Onlysocket-propertiesWrite
gpointergpointer ssl-creds Read / Write
gbooleangboolean ssl-fallback Read / Write / Construct Only
gbooleangboolean ssl-strict Read / Write / Construct Only
guintguint timeout Read / Write
Read
gbooleangboolean trusted-certificate Read
gbooleangboolean use-thread-context Read / Write / Construct Only
+
@@ -276,34 +294,34 @@ - + - + - + - + - +
void disconnectedRun LastRun Last
void eventRun LastRun Last
void new-connectionRun FirstRun First
void readableRun LastRun Last
void writableRun LastRun Last

Types and Values

-
+
@@ -374,11 +392,17 @@

Object Hierarchy

-
    GObject
+
    GObject
     ╰── SoupSocket
 
+

Implemented Interfaces

+

+SoupSocket implements + GInitable.

+
+

Includes

#include <libsoup/soup.h>
 
@@ -399,8 +423,8 @@ soup_socket_new (const char...);

Creates a new (disconnected) socket

-

Parameters

-
+

Parameters

+
@@ -409,7 +433,7 @@ soup_socket_new (const char - + @@ -422,9 +446,8 @@ soup_socket_new (const char
-

Returns

+

Returns

the new socket

-


@@ -432,12 +455,12 @@ soup_socket_new (const char

SoupSocketCallback ()

void
 (*SoupSocketCallback) (SoupSocket *sock,
-                       guint status,
-                       gpointer user_data);
+ guint status, + gpointer user_data);

The callback function passed to soup_socket_connect_async().

-

Parameters

-

optname1

name of first property to set (or NULL)

name of first property to set (or NULL)

 
+

Parameters

+
@@ -470,20 +493,20 @@ soup_socket_new (const charSoupSocket *sock, GCancellable *cancellable, SoupSocketCallback callback, - gpointer user_data); + gpointer user_data);

Begins asynchronously connecting to sock 's remote address. The socket will call callback when it succeeds or fails (but not before returning from this function).

If cancellable - is non-NULL, it can be used to cancel the + is non-NULL, it can be used to cancel the connection. callback will still be invoked in this case, with a status of SOUP_STATUS_CANCELLED.

-

Parameters

-
+

Parameters

+
@@ -497,12 +520,12 @@ status of

cancellable

-
+ - + @@ -518,18 +541,18 @@ status of

soup_socket_connect_sync ()

-
guint
+
guint
 soup_socket_connect_sync (SoupSocket *sock,
                           GCancellable *cancellable);

Attempt to synchronously connect sock to its remote address.

If cancellable - is non-NULL, it can be used to cancel the + is non-NULL, it can be used to cancel the connection, in which case soup_socket_connect_sync() will return SOUP_STATUS_CANCELLED.

-

Parameters

-

a GCancellable, or NULL

a GCancellable, or NULL

 

callback

callback to call after connecting.

callback to call after connecting.

[scope async]
+

Parameters

+
@@ -543,30 +566,29 @@ connection, in which case

cancellable

-
+

a GCancellable, or NULL

a GCancellable, or NULL

 
-

Returns

+

Returns

a success or failure code.

-


soup_socket_listen ()

-
gboolean
+
gboolean
 soup_socket_listen (SoupSocket *sock);

Makes sock start listening on its local address. When connections come in, sock will emit “new_connection”.

-

Parameters

-
+

Parameters

+
@@ -581,23 +603,22 @@ listening)

-

Returns

+

Returns

whether or not sock is now listening.

-


soup_socket_start_ssl ()

-
gboolean
+
gboolean
 soup_socket_start_ssl (SoupSocket *sock,
                        GCancellable *cancellable);

Starts using SSL on socket .

-

Parameters

-
+

Parameters

+
@@ -618,15 +639,14 @@ soup_socket_start_ssl ( -

Returns

+

Returns

success or failure

-


soup_socket_start_proxy_ssl ()

-
gboolean
+
gboolean
 soup_socket_start_proxy_ssl (SoupSocket *sock,
                              const char *ssl_host,
                              GCancellable *cancellable);
@@ -635,8 +655,8 @@ soup_socket_start_proxy_ssl (ssl_host .

-

Parameters

-
+

Parameters

+
@@ -662,21 +682,20 @@ soup_socket_start_proxy_ssl ( -

Returns

+

Returns

success or failure

-


soup_socket_is_ssl ()

-
gboolean
+
gboolean
 soup_socket_is_ssl (SoupSocket *sock);

Tests if sock is doing (or has attempted to do) SSL.

-

Parameters

-
+

Parameters

+
@@ -690,10 +709,9 @@ soup_socket_is_ssl ( -

Returns

-

TRUE if sock +

Returns

+

TRUE if sock has SSL credentials set

-


@@ -705,8 +723,8 @@ soup_socket_disconnect ( -

Parameters

-
+

Parameters

+
@@ -723,13 +741,13 @@ fail.


soup_socket_is_connected ()

-
gboolean
+
gboolean
 soup_socket_is_connected (SoupSocket *sock);

Tests if sock is connected to another host

-

Parameters

-
+

Parameters

+
@@ -743,9 +761,8 @@ soup_socket_is_connected ( -

Returns

-

TRUE or FALSE.

-

+

Returns

+

TRUE or FALSE.


@@ -758,8 +775,8 @@ soup_socket_get_local_address (Calling this method on an unconnected socket is considered to be an error, and produces undefined results.

-

Parameters

-
+

Parameters

+
@@ -773,8 +790,8 @@ an error, and produces undefined results.

-

Returns

-

the SoupAddress.

+

Returns

+

the SoupAddress.

[transfer none]

@@ -788,8 +805,8 @@ soup_socket_get_remote_address (Calling this method on an unconnected socket is considered to be an error, and produces undefined results.

-

Parameters

-
+

Parameters

+
@@ -803,8 +820,8 @@ an error, and produces undefined results.

-

Returns

-

the SoupAddress.

+

Returns

+

the SoupAddress.

[transfer none]

@@ -818,8 +835,8 @@ soup_socket_get_fd (SoupSocket.

-

Parameters

-
+

Parameters

+
@@ -833,10 +850,9 @@ soup_socket_get_fd ( -

Returns

+

Returns

sock 's file descriptor.

-


@@ -844,11 +860,11 @@ soup_socket_get_fd (

soup_socket_read ()

SoupSocketIOStatus
 soup_socket_read (SoupSocket *sock,
-                  gpointer buffer,
-                  gsize len,
-                  gsize *nread,
+                  gpointer buffer,
+                  gsize len,
+                  gsize *nread,
                   GCancellable *cancellable,
-                  GError **error);
+ GError **error);

Attempts to read up to len bytes from sock into buffer @@ -867,8 +883,8 @@ socket first. soup_socket_read() returns SOUP_SOCKET_WOULD_BLOCK, and it is only emitted once. See the documentation for “non-blocking”.)

-

Parameters

-
+

Parameters

+
@@ -882,8 +898,9 @@ emitted once. See the documentation for

buffer

-
- + + @@ -893,13 +910,13 @@ in bytes

- - + @@ -911,13 +928,12 @@ in bytes

buffer to read into

 

buffer to read +into.

[array length=len][element-type guint8]

len

nread

on return, the number of bytes read into buffer +

on return, the number of bytes read into buffer .

[out]

cancellable

a GCancellable, or NULL

a GCancellable, or NULL

 
-

Returns

+

Returns

a SoupSocketIOStatus, as described above (or SOUP_SOCKET_EOF if the socket is no longer connected, or SOUP_SOCKET_ERROR on any other error, in which case error will also be set).

-


@@ -925,20 +941,20 @@ also be set).

soup_socket_read_until ()

SoupSocketIOStatus
 soup_socket_read_until (SoupSocket *sock,
-                        gpointer buffer,
-                        gsize len,
-                        gconstpointer boundary,
-                        gsize boundary_len,
-                        gsize *nread,
-                        gboolean *got_boundary,
+                        gpointer buffer,
+                        gsize len,
+                        gconstpointer boundary,
+                        gsize boundary_len,
+                        gsize *nread,
+                        gboolean *got_boundary,
                         GCancellable *cancellable,
-                        GError **error);
+ GError **error);

Like soup_socket_read(), but reads no further than the first occurrence of boundary . (If the boundary is found, it will be included in the returned data, and *got_boundary will be set to -TRUE.) Any data after the boundary will returned in future reads.

+TRUE.) Any data after the boundary will returned in future reads.

soup_socket_read_until() will almost always return fewer than len bytes: if the boundary is found, then it will only return the bytes @@ -950,8 +966,8 @@ boundary string. Thus, len longer than boundary_len if you want to make any progress at all.

-

Parameters

-
+

Parameters

+
@@ -965,8 +981,9 @@ longer than boundary_len - - + + @@ -987,7 +1004,7 @@ in bytes

- @@ -999,7 +1016,7 @@ ends with the boundary string

- + @@ -1011,9 +1028,8 @@ ends with the boundary string

buffer

buffer to read into

 

buffer to read +into.

[array length=len][element-type guint8]

len

nread

on return, the number of bytes read into buffer +

on return, the number of bytes read into buffer .

[out]

cancellable

a GCancellable, or NULL

a GCancellable, or NULL

 
-

Returns

+

Returns

as for soup_socket_read()

-


@@ -1021,11 +1037,11 @@ ends with the boundary string

+

Parameters

+
@@ -1059,8 +1075,8 @@ and it is only emitted once. See the documentation for - - + + @@ -1070,12 +1086,12 @@ and it is only emitted once. See the documentation for - + - + @@ -1087,12 +1103,11 @@ and it is only emitted once. See the documentation for

buffer

data to write

 

data to write.

[array length=len][element-type guint8]

len

nwrote

on return, number of bytes written.

on return, number of bytes written.

[out]

cancellable

a GCancellable, or NULL

a GCancellable, or NULL

 
-

Returns

+

Returns

a SoupSocketIOStatus, as described above (or SOUP_SOCKET_EOF or SOUP_SOCKET_ERROR. error will be set if the return value is SOUP_SOCKET_ERROR.)

-

@@ -1101,16 +1116,14 @@ return value is

SoupSocket

typedef struct _SoupSocket SoupSocket;
-

-


enum SoupSocketIOStatus

Return value from the SoupSocket IO methods.

-

Members

-
+

Members

+
@@ -1178,8 +1191,7 @@ or not the socket uses non-blocking I/O.)

SOUP_SOCKET_IS_SERVER

#define SOUP_SOCKET_IS_SERVER           "is-server"
 
-

Alias for the “is-server” property. (Whether or -not the socket is a server socket.)

+

Alias for the “is-server” property, qv.


@@ -1195,7 +1207,7 @@ not the socket is a server socket.)

#define SOUP_SOCKET_ASYNC_CONTEXT       "async-context"
 

Alias for the “async-context” property. (The -socket's GMainContext.)

+socket's GMainContext.)


@@ -1228,7 +1240,7 @@ in seconds for blocking socket I/O operations.)

property. Note that this property's value is only useful if the socket is for a TLS connection, and only reliable after some data has been transferred to or from it.

-

Since 2.34

+

Since: 2.34


@@ -1239,7 +1251,7 @@ after some data has been transferred to or from it.

property. Note that this property's value is only useful if the socket is for a TLS connection, and only reliable after some data has been transferred to or from it.

-

Since 2.34

+

Since: 2.34


@@ -1255,31 +1267,59 @@ property.

#define SOUP_SOCKET_USE_THREAD_CONTEXT  "use-thread-context"
 

Alias for the “use-thread-context” property. (Use -g_main_context_get_thread_default())

-

Since 2.38

+g_main_context_get_thread_default())

+

Since: 2.38

Property Details

The “async-context” property

-
  “async-context”            gpointer
+
  “async-context”            gpointer

The GMainContext to dispatch this socket's async I/O in.

Flags: Read / Write / Construct Only


-

The “clean-dispose” property

-
  “clean-dispose”            gboolean
-

Warn on unclean dispose.

+

The “fd” property

+
  “fd”                       gint
+

The socket's file descriptor.

+

Flags: Read / Write / Construct Only

+

Allowed values: >= -1

+

Default value: -1

+
+
+
+

The “gsocket” property

+
  “gsocket”                  GSocket *
+

The socket's underlying GSocket.

Flags: Write / Construct Only

+
+
+
+

The “iostream” property

+
  “iostream”                 GIOStream *
+

The socket's underlying GIOStream.

+

Flags: Write / Construct Only

+
+
+
+

The “ipv6-only” property

+
  “ipv6-only”                gboolean
+

IPv6 only.

+

Flags: Read / Write

Default value: FALSE


The “is-server” property

-
  “is-server”                gboolean
+
  “is-server”                gboolean

Whether or not the socket is a server socket.

+

Note that for "ordinary" SoupSockets this will be set for +both listening sockets and the sockets emitted by +“new-connection”, but for sockets created by +setting “fd”, it will only be set for listening +sockets.

Flags: Read

Default value: FALSE

@@ -1293,7 +1333,7 @@ property.


The “non-blocking” property

-
  “non-blocking”             gboolean
+
  “non-blocking”             gboolean

Whether or not the socket uses non-blocking I/O.

SoupSocket's I/O methods are designed around the idea of using a single codepath for both synchronous and @@ -1317,13 +1357,6 @@ code that handles that case just won't get used for them.


-

The “proxy-resolver” property

-
  “proxy-resolver”           GProxyResolver *
-

GProxyResolver to use.

-

Flags: Read / Write / Construct Only

-
-
-

The “remote-address” property

  “remote-address”           SoupAddress *

Address of remote end of socket.

@@ -1331,15 +1364,22 @@ code that handles that case just won't get used for them.


+

The “socket-properties” property

+
  “socket-properties”        SoupSocketProperties *
+

Socket properties.

+

Flags: Write

+
+
+

The “ssl-creds” property

-
  “ssl-creds”                gpointer
+
  “ssl-creds”                gpointer

SSL credential information, passed from the session to the SSL implementation.

Flags: Read / Write


The “ssl-fallback” property

-
  “ssl-fallback”             gboolean
+
  “ssl-fallback”             gboolean

Use SSLv3 instead of TLS (client-side only).

Flags: Read / Write / Construct Only

Default value: FALSE

@@ -1347,7 +1387,7 @@ code that handles that case just won't get used for them.


The “ssl-strict” property

-
  “ssl-strict”               gboolean
+
  “ssl-strict”               gboolean

Whether certificate errors should be considered a connection error.

Flags: Read / Write / Construct Only

Default value: TRUE

@@ -1355,7 +1395,7 @@ code that handles that case just won't get used for them.


The “timeout” property

-
  “timeout”                  guint
+
  “timeout”                  guint

Value in seconds to timeout a blocking I/O.

Flags: Read / Write

Default value: 0

@@ -1377,7 +1417,7 @@ code that handles that case just won't get used for them.


The “trusted-certificate” property

-
  “trusted-certificate”      gboolean
+
  “trusted-certificate”      gboolean

Whether the server certificate is trusted, if this is an SSL socket.

Flags: Read

Default value: FALSE

@@ -1385,11 +1425,11 @@ code that handles that case just won't get used for them.


The “use-thread-context” property

-
  “use-thread-context”       gboolean
-

Use g_main_context_get_thread_default().

+
  “use-thread-context”       gboolean
+

Use g_main_context_get_thread_default().

Flags: Read / Write / Construct Only

Default value: FALSE

-

Since 2.38

+

Since: 2.38

@@ -1398,12 +1438,12 @@ code that handles that case just won't get used for them.

The “disconnected” signal

void
 user_function (SoupSocket *sock,
-               gpointer    user_data)
+ gpointer user_data)

Emitted when the socket is disconnected, for whatever reason.

-

Parameters

-
+

Parameters

+
@@ -1423,7 +1463,7 @@ reason.

-

Flags: Run Last

+

Flags: Run Last


@@ -1432,12 +1472,12 @@ reason.

user_function (SoupSocket *sock, GSocketClientEvent event, GIOStream *connection, - gpointer user_data) + gpointer user_data)

Emitted when a network-related event occurs. See “event” for more details.

-

Parameters

-
+

Parameters

+
@@ -1467,8 +1507,8 @@ user_function (
-

Flags: Run Last

-

Since 2.38

+

Flags: Run Last

+

Since: 2.38


@@ -1476,15 +1516,15 @@ user_function (void user_function (SoupSocket *sock, SoupSocket *new, - gpointer user_data) + gpointer user_data)

Emitted when a listening socket (set up with soup_socket_listen()) receives a new connection.

You must ref the new if you want to keep it; otherwise it will be destroyed after the signal is emitted.

-

Parameters

-
+

Parameters

+
@@ -1509,20 +1549,20 @@ will be destroyed after the signal is emitted.

-

Flags: Run First

+

Flags: Run First


The “readable” signal

void
 user_function (SoupSocket *sock,
-               gpointer    user_data)
+ gpointer user_data)

Emitted when an async socket is readable. See soup_socket_read(), soup_socket_read_until() and “non-blocking”.

-

Parameters

-
+

Parameters

+
@@ -1542,19 +1582,19 @@ user_function (
-

Flags: Run Last

+

Flags: Run Last


The “writable” signal

void
 user_function (SoupSocket *sock,
-               gpointer    user_data)
+ gpointer user_data)

Emitted when an async socket is writable. See soup_socket_write() and “non-blocking”.

-

Parameters

-
+

Parameters

+
@@ -1574,12 +1614,11 @@ user_function (
-

Flags: Run Last

+

Flags: Run Last

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/SoupURI.html b/docs/reference/html/SoupURI.html index 9e0ca074..6c6ad711 100644 --- a/docs/reference/html/SoupURI.html +++ b/docs/reference/html/SoupURI.html @@ -2,20 +2,20 @@ -libsoup Reference Manual: SoupURI - +SoupURI: libsoup Reference Manual + - + - + @@ -34,7 +34,7 @@

Functions

-
+
@@ -82,7 +82,7 @@ - +msg =soup_message_new("GET","http://example.com/");
-gboolean +gboolean soup_uri_equal () @@ -90,7 +90,7 @@
-gboolean +gboolean soup_uri_host_equal () @@ -98,7 +98,7 @@
-guint +guint soup_uri_host_hash () @@ -138,7 +138,7 @@
-gboolean +gboolean soup_uri_uses_default_port () @@ -226,7 +226,7 @@
-guint +guint soup_uri_get_port () @@ -298,7 +298,7 @@

Types and Values

-
+
@@ -332,12 +332,20 @@ + + + + + + + +
#define SOUP_URI_SCHEME_RESOURCE
#defineSOUP_URI_SCHEME_WS
#defineSOUP_URI_SCHEME_WSS

Object Hierarchy

-
    GBoxed
+
    GBoxed
     ╰── SoupURI
 
@@ -365,8 +373,8 @@ soup_uri_new_with_base (base .

-

Parameters

-
+

Parameters

+
@@ -387,9 +395,8 @@ soup_uri_new_with_base ( -

Returns

+

Returns

a parsed SoupURI.

-


@@ -398,14 +405,14 @@ soup_uri_new_with_base (SoupURI * soup_uri_new (const char *uri_string);

Parses an absolute URI.

-

You can also pass NULL for uri_string +

You can also pass NULL for uri_string if you want to get back an "empty" SoupURI that you can fill in by hand. (You will need to call at least soup_uri_set_scheme() and soup_uri_set_path(), since those fields are required.)

-

Parameters

-
+

Parameters

+
@@ -413,16 +420,16 @@ those fields are required.)

- - + +

uri_string

a URI.

[allow-none]

a URI.

[allow-none]
-

Returns

-

a SoupURI, or NULL if the given string was found to be -invalid.

-

+

Returns

+

a SoupURI, or NULL if the given string +was found to be invalid.

+

[nullable]


@@ -430,11 +437,11 @@ invalid.

soup_uri_to_string ()

char *
 soup_uri_to_string (SoupURI *uri,
-                    gboolean just_path_and_query);
+ gboolean just_path_and_query);

Returns a string representing uri .

If just_path_and_query - is TRUE, this concatenates the path and query + is TRUE, this concatenates the path and query together. That is, it constructs the string that would be needed in the Request-Line of an HTTP request for uri .

@@ -442,8 +449,8 @@ the Request-Line of an HTTP request for uri
-

Parameters

-
+

Parameters

+
@@ -457,17 +464,16 @@ does.

- +

just_path_and_query

if TRUE, output just the path and query portions

if TRUE, output just the path and query portions

 
-

Returns

+

Returns

a string representing uri , which the caller must free.

-


@@ -478,8 +484,8 @@ soup_uri_copy (Copies uri

-

Parameters

-
+

Parameters

+
@@ -493,10 +499,9 @@ soup_uri_copy (
-

Returns

+

Returns

a copy of uri , which must be freed with soup_uri_free()

-


@@ -507,8 +512,8 @@ soup_uri_copy_host (uri , considering only the protocol, host, and port

-

Parameters

-
+

Parameters

+
@@ -522,24 +527,23 @@ soup_uri_copy_host ( -

Returns

+

Returns

the new SoupURI

-

-

Since 2.28

+

Since: 2.28


soup_uri_equal ()

-
gboolean
+
gboolean
 soup_uri_equal (SoupURI *uri1,
                 SoupURI *uri2);

Tests whether or not uri1 and uri2 are equal in all parts

-

Parameters

-
+

Parameters

+
@@ -560,23 +564,22 @@ soup_uri_equal (
-

Returns

-

TRUE or FALSE

-

+

Returns

+

TRUE or FALSE


soup_uri_host_equal ()

-
gboolean
-soup_uri_host_equal (gconstpointer v1,
-                     gconstpointer v2);
+
gboolean
+soup_uri_host_equal (gconstpointer v1,
+                     gconstpointer v2);

Compares v1 and v2 , considering only the scheme, host, and port.

-

Parameters

-
+

Parameters

+
@@ -585,13 +588,13 @@ soup_uri_host_equal (

v1

-
- @@ -599,23 +602,22 @@ member.

a SoupURI with a non-NULL host +

a SoupURI with a non-NULL host member.

[type Soup.URI]

v2

a SoupURI with a non-NULL host +

a SoupURI with a non-NULL host member.

[type Soup.URI]
-

Returns

+

Returns

whether or not the URIs are equal in scheme, host, and port.

-

-

Since 2.28

+

Since: 2.28


soup_uri_host_hash ()

-
guint
-soup_uri_host_hash (gconstpointer key);
+
guint
+soup_uri_host_hash (gconstpointer key);

Hashes key , considering only the scheme, host, and port.

-

Parameters

-
+

Parameters

+
@@ -623,18 +625,17 @@ soup_uri_host_hash (

key

-

a SoupURI with a non-NULL host +

a SoupURI with a non-NULL host member.

[type Soup.URI]
-

Returns

+

Returns

a hash

-

-

Since 2.28

+

Since: 2.28


@@ -644,8 +645,8 @@ soup_uri_free (Frees uri .

-

Parameters

-
+

Parameters

+
@@ -669,8 +670,8 @@ soup_uri_encode (const char
-

Parameters

-
+

Parameters

+
@@ -684,17 +685,16 @@ done.

- - + +

escape_extra

additional reserved characters to -escape (or NULL).

[allow-none]

additional reserved characters to +escape (or NULL).

[allow-none]
-

Returns

+

Returns

the encoded URI part

-


@@ -704,13 +704,13 @@ escape (or const char *part
);

Fully %-decodes part .

-

In the past, this would return NULL if part +

In the past, this would return NULL if part contained invalid percent-encoding, but now it just ignores the problem (as soup_uri_new() already did).

-

Parameters

-
+

Parameters

+
@@ -724,9 +724,8 @@ percent-encoding, but now it just ignores the problem (as
-

Returns

+

Returns

the decoded URI part.

-


@@ -738,6 +737,8 @@ soup_uri_normalize (const char%-decodes any "unreserved" characters (or characters in unescape_extra ) in part +, and %-encodes any non-ASCII +characters, spaces, and non-printing characters in part .

"Unreserved" characters are those that are not allowed to be used for punctuation according to the URI spec. For example, letters are @@ -748,13 +749,13 @@ to mean the same thing. However, "/" is "reserved", so http://example.com/foo%2Fbar would not be changed, because it might mean something different to the server.

-

In the past, this would return NULL if part +

In the past, this would return NULL if part contained invalid percent-encoding, but now it just ignores the problem (as soup_uri_new() already did).

-

Parameters

-
+

Parameters

+
@@ -768,30 +769,29 @@ percent-encoding, but now it just ignores the problem (as - - + +

unescape_extra

reserved characters to unescape (or NULL)

 

reserved characters to unescape (or NULL).

[allow-none]
-

Returns

+

Returns

the normalized URI part

-


soup_uri_uses_default_port ()

-
gboolean
+
gboolean
 soup_uri_uses_default_port (SoupURI *uri);

Tests if uri uses the default port for its scheme. (Eg, 80 for http.) (This only works for http, https and ftp; libsoup does not know the default ports of other protocols.)

-

Parameters

-
+

Parameters

+
@@ -805,9 +805,8 @@ the default ports of other protocols.)

-

Returns

-

TRUE or FALSE

-

+

Returns

+

TRUE or FALSE


@@ -816,16 +815,16 @@ the default ports of other protocols.)

#define   SOUP_URI_IS_VALID(uri)       ((uri) && (uri)->scheme && (uri)->path)
 

Tests whether uri - is a valid SoupURI; that is, that it is non-NULL + is a valid SoupURI; that is, that it is non-NULL and its scheme and path - members are also non-NULL.

-

This macro does not check whether http and https URIs have a non-NULL + members are also non-NULL.

+

This macro does not check whether http and https URIs have a non-NULL host member.

-

Parameters

-
+

Parameters

+
@@ -839,12 +838,11 @@ and its scheme
-

Returns

-

TRUE if uri +

Returns

+

TRUE if uri is valid for use.

-

-

Since 2.38

+

Since: 2.38


@@ -855,8 +853,8 @@ is valid for use.

is a valid SoupURI for HTTP communication; that is, if it can be used to construct a SoupMessage.

-

Parameters

-
+

Parameters

+
@@ -870,12 +868,11 @@ it can be used to construct a -

Returns

-

TRUE if uri +

Returns

+

TRUE if uri is a valid "http" or "https" URI.

-

-

Since 2.24

+

Since: 2.24


@@ -890,8 +887,8 @@ soup_uri_set_scheme (scheme , if known.

-

Parameters

-
+

Parameters

+
@@ -920,8 +917,8 @@ soup_uri_get_scheme (uri 's scheme.

-

Parameters

-
+

Parameters

+
@@ -935,12 +932,11 @@ soup_uri_get_scheme ( -

Returns

+

Returns

uri 's scheme.

-

-

Since 2.32

+

Since: 2.32


@@ -952,8 +948,8 @@ soup_uri_set_user (user .

-

Parameters

-
+

Parameters

+
@@ -967,8 +963,8 @@ soup_uri_set_user (

user

-
- + +

the username, or NULL.

[allow-none]

the username, or NULL.

[allow-none]
@@ -982,8 +978,8 @@ soup_uri_get_user (uri 's user.

-

Parameters

-
+

Parameters

+
@@ -997,12 +993,11 @@ soup_uri_get_user ( -

Returns

+

Returns

uri 's user.

-

-

Since 2.32

+

Since: 2.32


@@ -1014,8 +1009,8 @@ soup_uri_set_password (password .

-

Parameters

-
+

Parameters

+
@@ -1029,8 +1024,8 @@ soup_uri_set_password (

password

-
- + +

the password, or NULL.

[allow-none]

the password, or NULL.

[allow-none]
@@ -1044,8 +1039,8 @@ soup_uri_get_password (uri 's password.

-

Parameters

-
+

Parameters

+
@@ -1059,12 +1054,11 @@ soup_uri_get_password ( -

Returns

+

Returns

uri 's password.

-

-

Since 2.32

+

Since: 2.32


@@ -1080,11 +1074,11 @@ soup_uri_set_host (uri to a string.

-

http and https URIs should not have a NULL host +

http and https URIs should not have a NULL host .

-

Parameters

-
+

Parameters

+
@@ -1098,8 +1092,8 @@ converting uri - - + +

host

the hostname or IP address, or NULL.

[allow-none]

the hostname or IP address, or NULL.

[allow-none]
@@ -1113,8 +1107,8 @@ soup_uri_get_host (uri 's host.

-

Parameters

-
+

Parameters

+
@@ -1128,19 +1122,18 @@ soup_uri_get_host ( -

Returns

+

Returns

uri 's host.

-

-

Since 2.32

+

Since: 2.32


soup_uri_set_port ()

void
 soup_uri_set_port (SoupURI *uri,
-                   guint port);
+ guint port);

Sets uri 's port to port . If port @@ -1148,8 +1141,8 @@ soup_uri_set_port ( -

Parameters

-
+

Parameters

+
@@ -1173,13 +1166,13 @@ explicitly-specified port.


soup_uri_get_port ()

-
guint
+
guint
 soup_uri_get_port (SoupURI *uri);

Gets uri 's port.

-

Parameters

-
+

Parameters

+
@@ -1193,12 +1186,11 @@ soup_uri_get_port ( -

Returns

+

Returns

uri 's port.

-

-

Since 2.32

+

Since: 2.32


@@ -1210,8 +1202,8 @@ soup_uri_set_path (path .

-

Parameters

-
+

Parameters

+
@@ -1225,7 +1217,7 @@ soup_uri_set_path (

path

-
+ @@ -1240,8 +1232,8 @@ soup_uri_get_path (uri 's path.

-

Parameters

-

the non-NULL path

the non-NULL path

 
+

Parameters

+
@@ -1255,12 +1247,11 @@ soup_uri_get_path ( -

Returns

+

Returns

uri 's path.

-

-

Since 2.32

+

Since: 2.32


@@ -1272,8 +1263,8 @@ soup_uri_set_query (query .

-

Parameters

-
+

Parameters

+
@@ -1287,8 +1278,8 @@ soup_uri_set_query (

query

-
- + +

the query.

[allow-none]

the query.

[allow-none]
@@ -1299,14 +1290,14 @@ soup_uri_set_query (

soup_uri_set_query_from_form ()

void
 soup_uri_set_query_from_form (SoupURI *uri,
-                              GHashTable *form);
+ GHashTable *form);

Sets uri 's query to the result of encoding form according to the HTML form rules. See soup_form_encode_hash() for more information.

-

Parameters

-
+

Parameters

+
@@ -1320,7 +1311,7 @@ HTML form rules. See

form

-
@@ -1340,8 +1331,8 @@ soup_uri_set_query_from_fields (soup_form_encode() for more information.

-

Parameters

-

a GHashTable containing HTML form +

a GHashTable containing HTML form information.

[element-type utf8 utf8]
+

Parameters

+
@@ -1362,7 +1353,7 @@ and values according to the * HTML form rules. See +and values, terminated by NULL.

@@ -1377,8 +1368,8 @@ soup_uri_get_query (uri 's query.

-

Parameters

-

...

value of first_field , followed by additional field names -and values, terminated by NULL.

 
+

Parameters

+
@@ -1392,12 +1383,11 @@ soup_uri_get_query ( -

Returns

+

Returns

uri 's query.

-

-

Since 2.32

+

Since: 2.32


@@ -1409,8 +1399,8 @@ soup_uri_set_fragment (fragment .

-

Parameters

-
+

Parameters

+
@@ -1424,8 +1414,8 @@ soup_uri_set_fragment (

fragment

-
- + +

the fragment.

[allow-none]

the fragment.

[allow-none]
@@ -1439,8 +1429,8 @@ soup_uri_get_fragment (uri 's fragment.

-

Parameters

-
+

Parameters

+
@@ -1454,12 +1444,11 @@ soup_uri_get_fragment ( -

Returns

+

Returns

uri 's fragment.

-

-

Since 2.32

+

Since: 2.32

@@ -1506,18 +1495,18 @@ fields; authentication is handled via port the port specified in the URI. If the URI doesn't contain a hostname, host - will be NULL, + will be NULL, and if it doesn't specify a port, port may be 0. However, for "http" and "https" URIs, host - is guaranteed to be non-NULL + is guaranteed to be non-NULL (trying to parse an http URI with no host - will return NULL), and + will return NULL), and port will always be non-0 (because libsoup knows the default value to use when it is not specified in the URI).

path - is always non-NULL. For http/https URIs, path + is always non-NULL. For http/https URIs, path will never be an empty string either; if the input URI has no path, the parsed SoupURI will have a path @@ -1541,8 +1530,8 @@ that has exactly the same meaning as the original. (In theory, partially-encoded as well, but this would be more annoying than useful.)

-

Members

-
+

Members

+
@@ -1556,21 +1545,21 @@ as well, but this would be more annoying than useful.)

- + - + - + - + @@ -1584,13 +1573,13 @@ as well, but this would be more annoying than useful.)

+, or NULL

+, or NULL

@@ -1623,7 +1612,7 @@ as well, but this would be more annoying than useful.)

"data" as an interned string; you can compare this directly to a SoupURI's scheme field using ==.

-

Since 2.30

+

Since: 2.30


@@ -1633,7 +1622,7 @@ as well, but this would be more annoying than useful.)

"file" as an interned string; you can compare this directly to a SoupURI's scheme field using ==.

-

Since 2.30

+

Since: 2.30


@@ -1643,7 +1632,7 @@ as well, but this would be more annoying than useful.)

"ftp" as an interned string; you can compare this directly to a SoupURI's scheme field using ==.

-

Since 2.30

+

Since: 2.30


@@ -1653,12 +1642,31 @@ as well, but this would be more annoying than useful.)

"data" as an interned string; you can compare this directly to a SoupURI's scheme field using ==.

-

Since 2.42

+

Since: 2.42

+
+
+
+

SOUP_URI_SCHEME_WS

+
#define SOUP_URI_SCHEME_WS       _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_WS, "ws")
+
+

"ws" (WebSocket) as an interned string; you can compare this +directly to a SoupURI's scheme field using +==.

+

Since: 2.50

+
+
+
+

SOUP_URI_SCHEME_WSS

+
#define SOUP_URI_SCHEME_WSS      _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_WSS, "wss")
+
+

"wss" (WebSocket over TLS) as an interned string; you can compare +this directly to a SoupURI's scheme field using +==.

+

Since: 2.50

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/annotation-glossary.html b/docs/reference/html/annotation-glossary.html index 3ab52763..8b5d180c 100644 --- a/docs/reference/html/annotation-glossary.html +++ b/docs/reference/html/annotation-glossary.html @@ -2,24 +2,28 @@ -libsoup Reference Manual: Annotation Glossary - +Annotation Glossary: libsoup Reference Manual + - + -

char *user;

a username, or NULL

a username, or NULL

 

char *password;

a password, or NULL

a password, or NULL

 

char *host;

the hostname or IP address

the hostname or IP address, or NULL

 

guint port;

guint port;

the port number on host

 

char *query;

a query for path -, or NULL

 

char *fragment;

a fragment identifier within path -, or NULL

 
+ @@ -33,7 +37,7 @@ Annotation Glossary

A

allow-none
-

NULL is ok, both for passing and for returning.

+

NULL is OK, both for passing and for returning.

array

Parameter points to an array of items.

E

@@ -42,14 +46,24 @@

I

inout

Parameter for input and for returning results. Default is transfer full.

+

N

+
nullable
+

NULL may be passed as the value in, out, in-out; or as a return value.

O

+
optional
+

NULL may be passed instead of a pointer to a location.

out

Parameter for returning results. Default is transfer full.

+

R

+
rename-to
+

Rename the original symbol's name to SYMBOL.

S

scope async

The callback is valid until first called.

scope call

The callback is valid only during the call to the method.

+
skip
+

Exposed in C code, not necessarily available in other languages.

T

transfer container

Free data container after the code is done.

@@ -61,7 +75,6 @@

Override the parsed C type with given type.

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/ch01.html b/docs/reference/html/ch01.html index 4c7ea5e7..4836816a 100644 --- a/docs/reference/html/ch01.html +++ b/docs/reference/html/ch01.html @@ -2,17 +2,17 @@ -libsoup Reference Manual: Tutorial - +Tutorial: libsoup Reference Manual + - + -
+ @@ -34,16 +34,15 @@ libsoup with a mix of http and non-http URIs.
-Soup Server Basics — Server-side tutorial -
-
Porting to the new SoupSession — Notes on porting from SoupSessionAsync and SoupSessionSync to SoupSession
+
+libsoup Server Basics — Server-side tutorial +
+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/ch02.html b/docs/reference/html/ch02.html index f81b5c84..f2f15dd2 100644 --- a/docs/reference/html/ch02.html +++ b/docs/reference/html/ch02.html @@ -2,21 +2,21 @@ -libsoup Reference Manual: Core API - +Core API: libsoup Reference Manual + - + - + -
+ - +
@@ -78,15 +78,18 @@ SoupServer — HTTP server
+SoupServer deprecated API +
+
SoupSession — Soup session state object
-SoupSessionAsync — (Deprecated) SoupSession for asynchronous - (main-loop-based) I/O. +SoupSessionAsync — SoupSession for asynchronous (main-loop-based) I/O +(deprecated).
-SoupSessionSync — (Deprecated) SoupSession for blocking I/O in - multithreaded programs. +SoupSessionSync — SoupSession for blocking I/O in multithreaded programs +(deprecated).
soup-status — HTTP (and libsoup) status codes @@ -103,7 +106,6 @@
+
Generated by GTK-Doc V1.28.1
\ No newline at end of file diff --git a/docs/reference/html/ch03.html b/docs/reference/html/ch03.html index 4a5a225c..6c2f5af3 100644 --- a/docs/reference/html/ch03.html +++ b/docs/reference/html/ch03.html @@ -2,17 +2,17 @@ -libsoup Reference Manual: Additional Features - +Additional Features: libsoup Reference Manual + - + - + @@ -53,7 +53,6 @@ +
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/ch04.html b/docs/reference/html/ch04.html index 293cb26a..645bbe16 100644 --- a/docs/reference/html/ch04.html +++ b/docs/reference/html/ch04.html @@ -2,17 +2,17 @@ -libsoup Reference Manual: Web Services APIs - +Web Services APIs: libsoup Reference Manual + - + - + @@ -30,12 +30,11 @@ XMLRPC Support — XML-RPC support
-GValue Support — GValue utilities +WebSockets — The WebSocket Protocol
+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/ch05.html b/docs/reference/html/ch05.html index 3504c583..12099f3c 100644 --- a/docs/reference/html/ch05.html +++ b/docs/reference/html/ch05.html @@ -2,21 +2,21 @@ -libsoup Reference Manual: Low-level Networking API - +Low-level Networking API: libsoup Reference Manual + - + - + - + - +
@@ -32,7 +32,6 @@
+
Generated by GTK-Doc V1.28.1
\ No newline at end of file diff --git a/docs/reference/html/index.html b/docs/reference/html/index.html index a7fdeb6c..fd6bde9a 100644 --- a/docs/reference/html/index.html +++ b/docs/reference/html/index.html @@ -3,10 +3,10 @@ libsoup Reference Manual: libsoup Reference Manual - + - + @@ -29,12 +29,12 @@ libsoup with a mix of http and non-http URIs.
-Soup Server Basics — Server-side tutorial -
-
Porting to the new SoupSession — Notes on porting from SoupSessionAsync and SoupSessionSync to SoupSession
+
+libsoup Server Basics — Server-side tutorial +
Core API
@@ -93,15 +93,18 @@ porting from SoupSessionAsync and SoupSessionSync to SoupSession SoupServer — HTTP server
+SoupServer deprecated API +
+
SoupSession — Soup session state object
-SoupSessionAsync — (Deprecated) SoupSession for asynchronous - (main-loop-based) I/O. +SoupSessionAsync — SoupSession for asynchronous (main-loop-based) I/O +(deprecated).
-SoupSessionSync — (Deprecated) SoupSession for blocking I/O in - multithreaded programs. +SoupSessionSync — SoupSession for blocking I/O in multithreaded programs +(deprecated).
soup-status — HTTP (and libsoup) status codes @@ -155,7 +158,7 @@ porting from SoupSessionAsync and SoupSessionSync to SoupSession XMLRPC Support — XML-RPC support
-GValue Support — GValue utilities +WebSockets — The WebSocket Protocol
Low-level Networking API
@@ -172,7 +175,6 @@ porting from SoupSessionAsync and SoupSessionSync to SoupSession
+
Generated by GTK-Doc V1.28.1
\ No newline at end of file diff --git a/docs/reference/html/index.sgml b/docs/reference/html/index.sgml deleted file mode 100644 index 1bdba53b..00000000 --- a/docs/reference/html/index.sgml +++ /dev/null @@ -1,1128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/html/ix01.html b/docs/reference/html/ix01.html index ab8df725..0f5c2289 100644 --- a/docs/reference/html/ix01.html +++ b/docs/reference/html/ix01.html @@ -2,17 +2,17 @@ -libsoup Reference Manual: Index - +Index: libsoup Reference Manual + - + - + @@ -22,1468 +22,1581 @@

Index

-
+

S

-
SoupAddress, SoupAddress +
SoupAddress, SoupAddress
-
SoupAddress:family, The “family” property +
SoupAddress:family, The “family” property
-
SoupAddress:name, The “name” property +
SoupAddress:name, The “name” property
-
SoupAddress:physical, The “physical” property +
SoupAddress:physical, The “physical” property
-
SoupAddress:port, The “port” property +
SoupAddress:port, The “port” property
-
SoupAddress:protocol, The “protocol” property +
SoupAddress:protocol, The “protocol” property
-
SoupAddress:sockaddr, The “sockaddr” property +
SoupAddress:sockaddr, The “sockaddr” property
-
SoupAddressCallback, SoupAddressCallback () +
SoupAddressCallback, SoupAddressCallback ()
-
SoupAddressFamily, enum SoupAddressFamily +
SoupAddressFamily, enum SoupAddressFamily
-
SoupAuth, SoupAuth +
SoupAuth, SoupAuth
-
SoupAuth:host, The “host” property +
SoupAuth:host, The “host” property
-
SoupAuth:is-authenticated, The “is-authenticated” property +
SoupAuth:is-authenticated, The “is-authenticated” property
-
SoupAuth:is-for-proxy, The “is-for-proxy” property +
SoupAuth:is-for-proxy, The “is-for-proxy” property
-
SoupAuth:realm, The “realm” property +
SoupAuth:realm, The “realm” property
-
SoupAuth:scheme-name, The “scheme-name” property +
SoupAuth:scheme-name, The “scheme-name” property
-
SoupAuthDomain, SoupAuthDomain +
SoupAuthDomain, SoupAuthDomain
-
SoupAuthDomain:add-path, The “add-path” property +
SoupAuthDomain:add-path, The “add-path” property
-
SoupAuthDomain:filter, The “filter” property +
SoupAuthDomain:filter, The “filter” property
-
SoupAuthDomain:filter-data, The “filter-data” property +
SoupAuthDomain:filter-data, The “filter-data” property
-
SoupAuthDomain:generic-auth-callback, The “generic-auth-callback” property +
SoupAuthDomain:generic-auth-callback, The “generic-auth-callback” property
-
SoupAuthDomain:generic-auth-data, The “generic-auth-data” property +
SoupAuthDomain:generic-auth-data, The “generic-auth-data” property
-
SoupAuthDomain:proxy, The “proxy” property +
SoupAuthDomain:proxy, The “proxy” property
-
SoupAuthDomain:realm, The “realm” property +
SoupAuthDomain:realm, The “realm” property
-
SoupAuthDomain:remove-path, The “remove-path” property +
SoupAuthDomain:remove-path, The “remove-path” property
-
SoupAuthDomainBasic, SoupAuthDomainBasic +
SoupAuthDomainBasic, SoupAuthDomainBasic
-
SoupAuthDomainBasic:auth-callback, The “auth-callback” property +
SoupAuthDomainBasic:auth-callback, The “auth-callback” property
-
SoupAuthDomainBasic:auth-data, The “auth-data” property +
SoupAuthDomainBasic:auth-data, The “auth-data” property
-
SoupAuthDomainBasicAuthCallback, SoupAuthDomainBasicAuthCallback () +
SoupAuthDomainBasicAuthCallback, SoupAuthDomainBasicAuthCallback ()
-
SoupAuthDomainDigest, SoupAuthDomainDigest +
SoupAuthDomainDigest, SoupAuthDomainDigest
-
SoupAuthDomainDigest:auth-callback, The “auth-callback” property +
SoupAuthDomainDigest:auth-callback, The “auth-callback” property
-
SoupAuthDomainDigest:auth-data, The “auth-data” property +
SoupAuthDomainDigest:auth-data, The “auth-data” property
-
SoupAuthDomainDigestAuthCallback, SoupAuthDomainDigestAuthCallback () +
SoupAuthDomainDigestAuthCallback, SoupAuthDomainDigestAuthCallback ()
-
SoupAuthDomainFilter, SoupAuthDomainFilter () +
SoupAuthDomainFilter, SoupAuthDomainFilter ()
-
SoupAuthDomainGenericAuthCallback, SoupAuthDomainGenericAuthCallback () +
SoupAuthDomainGenericAuthCallback, SoupAuthDomainGenericAuthCallback ()
-
SoupAuthManager, SoupAuthManager +
SoupAuthManager, SoupAuthManager
-
SoupAuthManager::authenticate, The “authenticate” signal +
SoupAuthManager::authenticate, The “authenticate” signal
-
SoupBuffer, SoupBuffer +
SoupBuffer, SoupBuffer
-
SoupCache, struct SoupCache +
SoupCache, struct SoupCache
-
SoupCache:cache-dir, The “cache-dir” property +
SoupCache:cache-dir, The “cache-dir” property
-
SoupCache:cache-type, The “cache-type” property +
SoupCache:cache-type, The “cache-type” property
-
SoupCacheType, enum SoupCacheType +
SoupCacheType, enum SoupCacheType
-
SoupChunkAllocator, SoupChunkAllocator () +
SoupChunkAllocator, SoupChunkAllocator ()
-
SoupClientContext, SoupServer +
SoupClientContext, SoupServer
-
SoupContentDecoder, SoupContentDecoder +
SoupContentDecoder, SoupContentDecoder
-
SoupContentSniffer, SoupContentSniffer +
SoupContentSniffer, SoupContentSniffer
-
SoupCookie, SoupCookie +
SoupCookie, SoupCookie
-
SoupCookieJar, SoupCookieJar +
SoupCookieJar, SoupCookieJar
-
SoupCookieJar::changed, The “changed” signal +
SoupCookieJar::changed, The “changed” signal
-
SoupCookieJar:accept-policy, The “accept-policy” property +
SoupCookieJar:accept-policy, The “accept-policy” property
-
SoupCookieJar:read-only, The “read-only” property +
SoupCookieJar:read-only, The “read-only” property
-
SoupCookieJarAcceptPolicy, enum SoupCookieJarAcceptPolicy +
SoupCookieJarAcceptPolicy, enum SoupCookieJarAcceptPolicy
-
SoupCookieJarDB, SoupCookieJarDB +
SoupCookieJarDB, SoupCookieJarDB
-
SoupCookieJarDB:filename, The “filename” property +
SoupCookieJarDB:filename, The “filename” property
-
SoupCookieJarText, SoupCookieJarText +
SoupCookieJarText, SoupCookieJarText
-
SoupCookieJarText:filename, The “filename” property +
SoupCookieJarText:filename, The “filename” property
-
SoupDate, SoupDate +
SoupDate, SoupDate
-
SoupDateFormat, enum SoupDateFormat +
SoupDateFormat, enum SoupDateFormat
-
SoupEncoding, enum SoupEncoding +
SoupEncoding, enum SoupEncoding
-
SoupExpectation, enum SoupExpectation +
SoupExpectation, enum SoupExpectation
-
SoupHTTPVersion, enum SoupHTTPVersion +
SoupHTTPVersion, enum SoupHTTPVersion
-
SoupLogger, SoupLogger +
SoupLogger, SoupLogger
-
SoupLoggerFilter, SoupLoggerFilter () +
SoupLogger:level, The “level” property
-
SoupLoggerLogLevel, enum SoupLoggerLogLevel +
SoupLogger:max-body-size, The “max-body-size” property
-
SoupLoggerPrinter, SoupLoggerPrinter () +
SoupLoggerFilter, SoupLoggerFilter ()
-
SoupMemoryUse, enum SoupMemoryUse +
SoupLoggerLogLevel, enum SoupLoggerLogLevel
-
SoupMessage, SoupMessage +
SoupLoggerPrinter, SoupLoggerPrinter ()
-
SoupMessage::content-sniffed, The “content-sniffed” signal +
SoupMemoryUse, enum SoupMemoryUse
-
SoupMessage::finished, The “finished” signal +
SoupMessage, SoupMessage
-
SoupMessage::got-body, The “got-body” signal +
SoupMessage::content-sniffed, The “content-sniffed” signal
-
SoupMessage::got-chunk, The “got-chunk” signal +
SoupMessage::finished, The “finished” signal
-
SoupMessage::got-headers, The “got-headers” signal +
SoupMessage::got-body, The “got-body” signal
-
SoupMessage::got-informational, The “got-informational” signal +
SoupMessage::got-chunk, The “got-chunk” signal
-
SoupMessage::network-event, The “network-event” signal +
SoupMessage::got-headers, The “got-headers” signal
-
SoupMessage::restarted, The “restarted” signal +
SoupMessage::got-informational, The “got-informational” signal
-
SoupMessage::wrote-body, The “wrote-body” signal +
SoupMessage::network-event, The “network-event” signal
-
SoupMessage::wrote-body-data, The “wrote-body-data” signal +
SoupMessage::restarted, The “restarted” signal
-
SoupMessage::wrote-chunk, The “wrote-chunk” signal +
SoupMessage::starting, The “starting” signal
-
SoupMessage::wrote-headers, The “wrote-headers” signal +
SoupMessage::wrote-body, The “wrote-body” signal
-
SoupMessage::wrote-informational, The “wrote-informational” signal +
SoupMessage::wrote-body-data, The “wrote-body-data” signal
-
SoupMessage:first-party, The “first-party” property +
SoupMessage::wrote-chunk, The “wrote-chunk” signal
-
SoupMessage:flags, The “flags” property +
SoupMessage::wrote-headers, The “wrote-headers” signal
-
SoupMessage:http-version, The “http-version” property +
SoupMessage::wrote-informational, The “wrote-informational” signal
-
SoupMessage:method, The “method” property +
SoupMessage:first-party, The “first-party” property
-
SoupMessage:priority, The “priority” property +
SoupMessage:flags, The “flags” property
-
SoupMessage:reason-phrase, The “reason-phrase” property +
SoupMessage:http-version, The “http-version” property
-
SoupMessage:request-body, The “request-body” property +
SoupMessage:method, The “method” property
-
SoupMessage:request-body-data, The “request-body-data” property +
SoupMessage:priority, The “priority” property
-
SoupMessage:request-headers, The “request-headers” property +
SoupMessage:reason-phrase, The “reason-phrase” property
-
SoupMessage:response-body, The “response-body” property +
SoupMessage:request-body, The “request-body” property
-
SoupMessage:response-body-data, The “response-body-data” property +
SoupMessage:request-body-data, The “request-body-data” property
-
SoupMessage:response-headers, The “response-headers” property +
SoupMessage:request-headers, The “request-headers” property
-
SoupMessage:server-side, The “server-side” property +
SoupMessage:response-body, The “response-body” property
-
SoupMessage:status-code, The “status-code” property +
SoupMessage:response-body-data, The “response-body-data” property
-
SoupMessage:tls-certificate, The “tls-certificate” property +
SoupMessage:response-headers, The “response-headers” property
-
SoupMessage:tls-errors, The “tls-errors” property +
SoupMessage:server-side, The “server-side” property
-
SoupMessage:uri, The “uri” property +
SoupMessage:status-code, The “status-code” property
-
SoupMessageBody, SoupMessageBody +
SoupMessage:tls-certificate, The “tls-certificate” property
-
SoupMessageFlags, enum SoupMessageFlags +
SoupMessage:tls-errors, The “tls-errors” property
-
SoupMessageHeaders, SoupMessageHeaders +
SoupMessage:uri, The “uri” property
-
SoupMessageHeadersForeachFunc, SoupMessageHeadersForeachFunc () +
SoupMessageBody, SoupMessageBody
-
SoupMessageHeadersIter, SoupMessageHeadersIter +
SoupMessageFlags, enum SoupMessageFlags
-
SoupMessageHeadersType, enum SoupMessageHeadersType +
SoupMessageHeaders, SoupMessageHeaders
-
SoupMessagePriority, enum SoupMessagePriority +
SoupMessageHeadersForeachFunc, SoupMessageHeadersForeachFunc ()
-
SoupMultipart, SoupMultipart +
SoupMessageHeadersIter, SoupMessageHeadersIter
-
SoupMultipartInputStream, struct SoupMultipartInputStream +
SoupMessageHeadersType, enum SoupMessageHeadersType
-
SoupMultipartInputStream:message, The “message” property +
SoupMessagePriority, enum SoupMessagePriority
-
SoupProxyResolverDefault, SoupProxyResolverDefault +
SoupMultipart, SoupMultipart
-
SoupProxyResolverDefault:gproxy-resolver, The “gproxy-resolver” property +
SoupMultipartInputStream, struct SoupMultipartInputStream
-
SoupRange, SoupRange +
SoupMultipartInputStream:message, The “message” property
-
SoupRequest, SoupRequest +
SoupProxyResolverDefault, SoupProxyResolverDefault
-
SoupRequest:session, The “session” property +
SoupProxyResolverDefault:gproxy-resolver, The “gproxy-resolver” property
-
SoupRequest:uri, The “uri” property +
SoupRange, SoupRange
-
SoupRequestData, SoupRequestData +
SoupRequest, SoupRequest
-
SoupRequestError, enum SoupRequestError +
SoupRequest:session, The “session” property
-
SoupRequestFile, SoupRequestFile +
SoupRequest:uri, The “uri” property
-
SoupRequestHTTP, SoupRequestHTTP +
SoupRequestData, SoupRequestData
-
SoupServer, SoupServer +
SoupRequestError, enum SoupRequestError
-
SoupServer::request-aborted, The “request-aborted” signal +
SoupRequestFile, SoupRequestFile
-
SoupServer::request-finished, The “request-finished” signal +
SoupRequestHTTP, SoupRequestHTTP
-
SoupServer::request-read, The “request-read” signal +
SoupServer, SoupServer
-
SoupServer::request-started, The “request-started” signal +
SoupServer::request-aborted, The “request-aborted” signal
-
SoupServer:async-context, The “async-context” property +
SoupServer::request-finished, The “request-finished” signal
-
SoupServer:http-aliases, The “http-aliases” property +
SoupServer::request-read, The “request-read” signal
-
SoupServer:https-aliases, The “https-aliases” property +
SoupServer::request-started, The “request-started” signal
-
SoupServer:interface, The “interface” property +
SoupServer:async-context, The “async-context” property
-
SoupServer:port, The “port” property +
SoupServer:http-aliases, The “http-aliases” property
-
SoupServer:raw-paths, The “raw-paths” property +
SoupServer:https-aliases, The “https-aliases” property
-
SoupServer:server-header, The “server-header” property +
SoupServer:interface, The “interface” property
-
SoupServer:ssl-cert-file, The “ssl-cert-file” property +
SoupServer:port, The “port” property
-
SoupServer:ssl-key-file, The “ssl-key-file” property +
SoupServer:raw-paths, The “raw-paths” property
-
SoupServer:tls-certificate, The “tls-certificate” property +
SoupServer:server-header, The “server-header” property
-
SoupServerCallback, SoupServerCallback () +
SoupServer:ssl-cert-file, The “ssl-cert-file” property
-
SoupSession, SoupSession +
SoupServer:ssl-key-file, The “ssl-key-file” property
-
SoupSession::authenticate, The “authenticate” signal +
SoupServer:tls-certificate, The “tls-certificate” property
-
SoupSession::connection-created, The “connection-created” signal +
SoupServerCallback, SoupServerCallback ()
-
SoupSession::request-queued, The “request-queued” signal +
SoupServerListenOptions, enum SoupServerListenOptions
-
SoupSession::request-started, The “request-started” signal +
SoupServerWebsocketCallback, SoupServerWebsocketCallback ()
-
SoupSession::request-unqueued, The “request-unqueued” signal +
SoupSession, SoupSession
-
SoupSession::tunneling, The “tunneling” signal +
SoupSession::authenticate, The “authenticate” signal
-
SoupSession:accept-language, The “accept-language” property +
SoupSession::connection-created, The “connection-created” signal
-
SoupSession:accept-language-auto, The “accept-language-auto” property +
SoupSession::request-queued, The “request-queued” signal
-
SoupSession:add-feature, The “add-feature” property +
SoupSession::request-started, The “request-started” signal
-
SoupSession:add-feature-by-type, The “add-feature-by-type” property +
SoupSession::request-unqueued, The “request-unqueued” signal
-
SoupSession:async-context, The “async-context” property +
SoupSession::tunneling, The “tunneling” signal
-
SoupSession:http-aliases, The “http-aliases” property +
SoupSession:accept-language, The “accept-language” property
-
SoupSession:https-aliases, The “https-aliases” property +
SoupSession:accept-language-auto, The “accept-language-auto” property
-
SoupSession:idle-timeout, The “idle-timeout” property +
SoupSession:add-feature, The “add-feature” property
-
SoupSession:local-address, The “local-address” property +
SoupSession:add-feature-by-type, The “add-feature-by-type” property
-
SoupSession:max-conns, The “max-conns” property +
SoupSession:async-context, The “async-context” property
-
SoupSession:max-conns-per-host, The “max-conns-per-host” property +
SoupSession:http-aliases, The “http-aliases” property
-
SoupSession:proxy-resolver, The “proxy-resolver” property +
SoupSession:https-aliases, The “https-aliases” property
-
SoupSession:proxy-uri, The “proxy-uri” property +
SoupSession:idle-timeout, The “idle-timeout” property
-
SoupSession:remove-feature-by-type, The “remove-feature-by-type” property +
SoupSession:local-address, The “local-address” property
-
SoupSession:ssl-ca-file, The “ssl-ca-file” property +
SoupSession:max-conns, The “max-conns” property
-
SoupSession:ssl-strict, The “ssl-strict” property +
SoupSession:max-conns-per-host, The “max-conns-per-host” property
-
SoupSession:ssl-use-system-ca-file, The “ssl-use-system-ca-file” property +
SoupSession:proxy-resolver, The “proxy-resolver” property
-
SoupSession:timeout, The “timeout” property +
SoupSession:proxy-uri, The “proxy-uri” property
-
SoupSession:tls-database, The “tls-database” property +
SoupSession:remove-feature-by-type, The “remove-feature-by-type” property
-
SoupSession:use-ntlm, The “use-ntlm” property +
SoupSession:ssl-ca-file, The “ssl-ca-file” property
-
SoupSession:use-thread-context, The “use-thread-context” property +
SoupSession:ssl-strict, The “ssl-strict” property
-
SoupSession:user-agent, The “user-agent” property +
SoupSession:ssl-use-system-ca-file, The “ssl-use-system-ca-file” property
-
SoupSessionAsync, SoupSessionAsync +
SoupSession:timeout, The “timeout” property
-
SoupSessionCallback, SoupSessionCallback () +
SoupSession:tls-database, The “tls-database” property
-
SoupSessionFeature, SoupSessionFeature +
SoupSession:tls-interaction, The “tls-interaction” property
-
SoupSessionFeatureInterface, SoupSessionFeatureInterface +
SoupSession:use-ntlm, The “use-ntlm” property
-
SoupSessionSync, SoupSessionSync +
SoupSession:use-thread-context, The “use-thread-context” property
-
SoupSocket, SoupSocket +
SoupSession:user-agent, The “user-agent” property
-
SoupSocket::disconnected, The “disconnected” signal +
SoupSessionAsync, SoupSessionAsync
-
SoupSocket::event, The “event” signal +
SoupSessionCallback, SoupSessionCallback ()
-
SoupSocket::new-connection, The “new-connection” signal +
SoupSessionConnectProgressCallback, SoupSessionConnectProgressCallback ()
-
SoupSocket::readable, The “readable” signal +
SoupSessionFeature, SoupSessionFeature
-
SoupSocket::writable, The “writable” signal +
SoupSessionFeatureInterface, SoupSessionFeatureInterface
-
SoupSocket:async-context, The “async-context” property +
SoupSessionSync, SoupSessionSync
-
SoupSocket:clean-dispose, The “clean-dispose” property +
SoupSocket, SoupSocket
-
SoupSocket:is-server, The “is-server” property +
SoupSocket::disconnected, The “disconnected” signal
-
SoupSocket:local-address, The “local-address” property +
SoupSocket::event, The “event” signal
-
SoupSocket:non-blocking, The “non-blocking” property +
SoupSocket::new-connection, The “new-connection” signal
-
SoupSocket:proxy-resolver, The “proxy-resolver” property +
SoupSocket::readable, The “readable” signal
-
SoupSocket:remote-address, The “remote-address” property +
SoupSocket::writable, The “writable” signal
-
SoupSocket:ssl-creds, The “ssl-creds” property +
SoupSocket:async-context, The “async-context” property
-
SoupSocket:ssl-fallback, The “ssl-fallback” property +
SoupSocket:fd, The “fd” property
-
SoupSocket:ssl-strict, The “ssl-strict” property +
SoupSocket:gsocket, The “gsocket” property
-
SoupSocket:timeout, The “timeout” property +
SoupSocket:iostream, The “iostream” property
-
SoupSocket:tls-certificate, The “tls-certificate” property +
SoupSocket:ipv6-only, The “ipv6-only” property
-
SoupSocket:tls-errors, The “tls-errors” property +
SoupSocket:is-server, The “is-server” property
-
SoupSocket:trusted-certificate, The “trusted-certificate” property +
SoupSocket:local-address, The “local-address” property
-
SoupSocket:use-thread-context, The “use-thread-context” property +
SoupSocket:non-blocking, The “non-blocking” property
-
SoupSocketCallback, SoupSocketCallback () +
SoupSocket:remote-address, The “remote-address” property
-
SoupSocketIOStatus, enum SoupSocketIOStatus +
SoupSocket:socket-properties, The “socket-properties” property
-
SoupStatus, enum SoupStatus +
SoupSocket:ssl-creds, The “ssl-creds” property
-
SoupTLDError, enum SoupTLDError +
SoupSocket:ssl-fallback, The “ssl-fallback” property
-
SoupURI, SoupURI +
SoupSocket:ssl-strict, The “ssl-strict” property
-
SoupXMLRPCFault, enum SoupXMLRPCFault +
SoupSocket:timeout, The “timeout” property
-
SOUP_ADDRESS_ANY_PORT, SOUP_ADDRESS_ANY_PORT +
SoupSocket:tls-certificate, The “tls-certificate” property
-
soup_address_equal_by_ip, soup_address_equal_by_ip () +
SoupSocket:tls-errors, The “tls-errors” property
-
soup_address_equal_by_name, soup_address_equal_by_name () +
SoupSocket:trusted-certificate, The “trusted-certificate” property
-
SOUP_ADDRESS_FAMILY, SOUP_ADDRESS_FAMILY +
SoupSocket:use-thread-context, The “use-thread-context” property
-
soup_address_get_gsockaddr, soup_address_get_gsockaddr () +
SoupSocketCallback, SoupSocketCallback ()
-
soup_address_get_name, soup_address_get_name () +
SoupSocketIOStatus, enum SoupSocketIOStatus
-
soup_address_get_physical, soup_address_get_physical () +
SoupStatus, enum SoupStatus
-
soup_address_get_port, soup_address_get_port () +
SoupTLDError, enum SoupTLDError
-
soup_address_get_sockaddr, soup_address_get_sockaddr () +
SoupURI, SoupURI
-
soup_address_hash_by_ip, soup_address_hash_by_ip () +
SoupWebsocketCloseCode, enum SoupWebsocketCloseCode
-
soup_address_hash_by_name, soup_address_hash_by_name () +
SoupWebsocketConnection, SoupWebsocketConnection
-
soup_address_is_resolved, soup_address_is_resolved () +
SoupWebsocketConnection::closed, The “closed” signal
-
SOUP_ADDRESS_NAME, SOUP_ADDRESS_NAME +
SoupWebsocketConnection::closing, The “closing” signal
-
soup_address_new, soup_address_new () +
SoupWebsocketConnection::error, The “error” signal
-
soup_address_new_any, soup_address_new_any () +
SoupWebsocketConnection::message, The “message” signal
-
soup_address_new_from_sockaddr, soup_address_new_from_sockaddr () +
SoupWebsocketConnection::pong, The “pong” signal
-
SOUP_ADDRESS_PHYSICAL, SOUP_ADDRESS_PHYSICAL +
SoupWebsocketConnection:connection-type, The “connection-type” property
-
SOUP_ADDRESS_PORT, SOUP_ADDRESS_PORT +
SoupWebsocketConnection:io-stream, The “io-stream” property
-
SOUP_ADDRESS_PROTOCOL, SOUP_ADDRESS_PROTOCOL +
SoupWebsocketConnection:keepalive-interval, The “keepalive-interval” property
-
soup_address_resolve_async, soup_address_resolve_async () +
SoupWebsocketConnection:max-incoming-payload-size, The “max-incoming-payload-size” property
-
soup_address_resolve_sync, soup_address_resolve_sync () +
SoupWebsocketConnection:origin, The “origin” property
-
SOUP_ADDRESS_SOCKADDR, SOUP_ADDRESS_SOCKADDR +
SoupWebsocketConnection:protocol, The “protocol” property
-
soup_add_completion, soup_add_completion () +
SoupWebsocketConnection:state, The “state” property
-
soup_add_idle, soup_add_idle () +
SoupWebsocketConnection:uri, The “uri” property
-
soup_add_io_watch, soup_add_io_watch () +
SoupWebsocketConnectionType, enum SoupWebsocketConnectionType
-
soup_add_timeout, soup_add_timeout () +
SoupWebsocketDataType, enum SoupWebsocketDataType
-
soup_auth_authenticate, soup_auth_authenticate () +
SoupWebsocketError, enum SoupWebsocketError
-
soup_auth_domain_accepts, soup_auth_domain_accepts () +
SoupWebsocketState, enum SoupWebsocketState
-
soup_auth_domain_add_path, soup_auth_domain_add_path () +
SoupXMLRPCError, enum SoupXMLRPCError
-
SOUP_AUTH_DOMAIN_ADD_PATH, SOUP_AUTH_DOMAIN_ADD_PATH +
SoupXMLRPCFault, enum SoupXMLRPCFault
-
SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK, SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK +
SoupXMLRPCParams, SoupXMLRPCParams
-
SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA, SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA +
SOUP_ADDRESS_ANY_PORT, SOUP_ADDRESS_ANY_PORT
-
soup_auth_domain_basic_new, soup_auth_domain_basic_new () +
soup_address_equal_by_ip, soup_address_equal_by_ip ()
-
soup_auth_domain_basic_set_auth_callback, soup_auth_domain_basic_set_auth_callback () +
soup_address_equal_by_name, soup_address_equal_by_name ()
-
soup_auth_domain_challenge, soup_auth_domain_challenge () +
SOUP_ADDRESS_FAMILY, SOUP_ADDRESS_FAMILY
-
soup_auth_domain_check_password, soup_auth_domain_check_password () +
soup_address_get_gsockaddr, soup_address_get_gsockaddr ()
-
soup_auth_domain_covers, soup_auth_domain_covers () +
soup_address_get_name, soup_address_get_name ()
-
SOUP_AUTH_DOMAIN_DIGEST_AUTH_CALLBACK, SOUP_AUTH_DOMAIN_DIGEST_AUTH_CALLBACK +
soup_address_get_physical, soup_address_get_physical ()
-
SOUP_AUTH_DOMAIN_DIGEST_AUTH_DATA, SOUP_AUTH_DOMAIN_DIGEST_AUTH_DATA +
soup_address_get_port, soup_address_get_port ()
-
soup_auth_domain_digest_encode_password, soup_auth_domain_digest_encode_password () +
soup_address_get_sockaddr, soup_address_get_sockaddr ()
-
soup_auth_domain_digest_new, soup_auth_domain_digest_new () +
soup_address_hash_by_ip, soup_address_hash_by_ip ()
-
soup_auth_domain_digest_set_auth_callback, soup_auth_domain_digest_set_auth_callback () +
soup_address_hash_by_name, soup_address_hash_by_name ()
-
SOUP_AUTH_DOMAIN_FILTER, SOUP_AUTH_DOMAIN_FILTER +
soup_address_is_resolved, soup_address_is_resolved ()
-
SOUP_AUTH_DOMAIN_FILTER_DATA, SOUP_AUTH_DOMAIN_FILTER_DATA +
SOUP_ADDRESS_NAME, SOUP_ADDRESS_NAME
-
SOUP_AUTH_DOMAIN_GENERIC_AUTH_CALLBACK, SOUP_AUTH_DOMAIN_GENERIC_AUTH_CALLBACK +
soup_address_new, soup_address_new ()
-
SOUP_AUTH_DOMAIN_GENERIC_AUTH_DATA, SOUP_AUTH_DOMAIN_GENERIC_AUTH_DATA +
soup_address_new_any, soup_address_new_any ()
-
soup_auth_domain_get_realm, soup_auth_domain_get_realm () +
soup_address_new_from_sockaddr, soup_address_new_from_sockaddr ()
-
SOUP_AUTH_DOMAIN_PROXY, SOUP_AUTH_DOMAIN_PROXY +
SOUP_ADDRESS_PHYSICAL, SOUP_ADDRESS_PHYSICAL
-
SOUP_AUTH_DOMAIN_REALM, SOUP_AUTH_DOMAIN_REALM +
SOUP_ADDRESS_PORT, SOUP_ADDRESS_PORT
-
soup_auth_domain_remove_path, soup_auth_domain_remove_path () +
SOUP_ADDRESS_PROTOCOL, SOUP_ADDRESS_PROTOCOL
-
SOUP_AUTH_DOMAIN_REMOVE_PATH, SOUP_AUTH_DOMAIN_REMOVE_PATH +
soup_address_resolve_async, soup_address_resolve_async ()
-
soup_auth_domain_set_filter, soup_auth_domain_set_filter () +
soup_address_resolve_sync, soup_address_resolve_sync ()
-
soup_auth_domain_set_generic_auth_callback, soup_auth_domain_set_generic_auth_callback () +
SOUP_ADDRESS_SOCKADDR, SOUP_ADDRESS_SOCKADDR
-
soup_auth_free_protection_space, soup_auth_free_protection_space () +
soup_add_completion, soup_add_completion ()
-
soup_auth_get_authorization, soup_auth_get_authorization () +
soup_add_idle, soup_add_idle ()
-
soup_auth_get_host, soup_auth_get_host () +
soup_add_io_watch, soup_add_io_watch ()
-
soup_auth_get_info, soup_auth_get_info () +
soup_add_timeout, soup_add_timeout ()
-
soup_auth_get_protection_space, soup_auth_get_protection_space () +
soup_auth_authenticate, soup_auth_authenticate ()
-
soup_auth_get_realm, soup_auth_get_realm () +
soup_auth_can_authenticate, soup_auth_can_authenticate ()
-
soup_auth_get_scheme_name, soup_auth_get_scheme_name () +
soup_auth_domain_accepts, soup_auth_domain_accepts ()
-
SOUP_AUTH_HOST, SOUP_AUTH_HOST +
soup_auth_domain_add_path, soup_auth_domain_add_path ()
-
soup_auth_is_authenticated, soup_auth_is_authenticated () +
SOUP_AUTH_DOMAIN_ADD_PATH, SOUP_AUTH_DOMAIN_ADD_PATH
-
SOUP_AUTH_IS_AUTHENTICATED, SOUP_AUTH_IS_AUTHENTICATED +
SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK, SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK
-
soup_auth_is_for_proxy, soup_auth_is_for_proxy () +
SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA, SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA
-
SOUP_AUTH_IS_FOR_PROXY, SOUP_AUTH_IS_FOR_PROXY +
soup_auth_domain_basic_new, soup_auth_domain_basic_new ()
-
soup_auth_is_ready, soup_auth_is_ready () +
soup_auth_domain_basic_set_auth_callback, soup_auth_domain_basic_set_auth_callback ()
-
soup_auth_manager_use_auth, soup_auth_manager_use_auth () +
soup_auth_domain_challenge, soup_auth_domain_challenge ()
-
soup_auth_new, soup_auth_new () +
soup_auth_domain_check_password, soup_auth_domain_check_password ()
-
SOUP_AUTH_REALM, SOUP_AUTH_REALM +
soup_auth_domain_covers, soup_auth_domain_covers ()
-
SOUP_AUTH_SCHEME_NAME, SOUP_AUTH_SCHEME_NAME +
SOUP_AUTH_DOMAIN_DIGEST_AUTH_CALLBACK, SOUP_AUTH_DOMAIN_DIGEST_AUTH_CALLBACK
-
soup_auth_update, soup_auth_update () +
SOUP_AUTH_DOMAIN_DIGEST_AUTH_DATA, SOUP_AUTH_DOMAIN_DIGEST_AUTH_DATA
-
soup_buffer_copy, soup_buffer_copy () +
soup_auth_domain_digest_encode_password, soup_auth_domain_digest_encode_password ()
-
soup_buffer_free, soup_buffer_free () +
soup_auth_domain_digest_new, soup_auth_domain_digest_new ()
-
soup_buffer_get_as_bytes, soup_buffer_get_as_bytes () +
soup_auth_domain_digest_set_auth_callback, soup_auth_domain_digest_set_auth_callback ()
-
soup_buffer_get_data, soup_buffer_get_data () +
SOUP_AUTH_DOMAIN_FILTER, SOUP_AUTH_DOMAIN_FILTER
-
soup_buffer_get_owner, soup_buffer_get_owner () +
SOUP_AUTH_DOMAIN_FILTER_DATA, SOUP_AUTH_DOMAIN_FILTER_DATA
-
soup_buffer_new, soup_buffer_new () +
SOUP_AUTH_DOMAIN_GENERIC_AUTH_CALLBACK, SOUP_AUTH_DOMAIN_GENERIC_AUTH_CALLBACK
-
soup_buffer_new_subbuffer, soup_buffer_new_subbuffer () +
SOUP_AUTH_DOMAIN_GENERIC_AUTH_DATA, SOUP_AUTH_DOMAIN_GENERIC_AUTH_DATA
-
soup_buffer_new_take, soup_buffer_new_take () +
soup_auth_domain_get_realm, soup_auth_domain_get_realm ()
-
soup_buffer_new_with_owner, soup_buffer_new_with_owner () +
SOUP_AUTH_DOMAIN_PROXY, SOUP_AUTH_DOMAIN_PROXY
-
soup_cache_clear, soup_cache_clear () +
SOUP_AUTH_DOMAIN_REALM, SOUP_AUTH_DOMAIN_REALM
-
soup_cache_dump, soup_cache_dump () +
soup_auth_domain_remove_path, soup_auth_domain_remove_path ()
-
soup_cache_flush, soup_cache_flush () +
SOUP_AUTH_DOMAIN_REMOVE_PATH, SOUP_AUTH_DOMAIN_REMOVE_PATH
-
soup_cache_get_max_size, soup_cache_get_max_size () +
soup_auth_domain_set_filter, soup_auth_domain_set_filter ()
-
soup_cache_load, soup_cache_load () +
soup_auth_domain_set_generic_auth_callback, soup_auth_domain_set_generic_auth_callback ()
-
soup_cache_new, soup_cache_new () +
soup_auth_free_protection_space, soup_auth_free_protection_space ()
-
soup_cache_set_max_size, soup_cache_set_max_size () +
soup_auth_get_authorization, soup_auth_get_authorization ()
-
soup_check_version, soup_check_version () +
soup_auth_get_host, soup_auth_get_host ()
-
SOUP_CHECK_VERSION, SOUP_CHECK_VERSION() +
soup_auth_get_info, soup_auth_get_info ()
-
soup_client_context_get_address, soup_client_context_get_address () +
soup_auth_get_protection_space, soup_auth_get_protection_space ()
-
soup_client_context_get_auth_domain, soup_client_context_get_auth_domain () +
soup_auth_get_realm, soup_auth_get_realm ()
-
soup_client_context_get_auth_user, soup_client_context_get_auth_user () +
soup_auth_get_scheme_name, soup_auth_get_scheme_name ()
-
soup_client_context_get_host, soup_client_context_get_host () +
SOUP_AUTH_HOST, SOUP_AUTH_HOST
-
soup_client_context_get_socket, soup_client_context_get_socket () +
soup_auth_is_authenticated, soup_auth_is_authenticated ()
-
soup_content_sniffer_get_buffer_size, soup_content_sniffer_get_buffer_size () +
SOUP_AUTH_IS_AUTHENTICATED, SOUP_AUTH_IS_AUTHENTICATED
-
soup_content_sniffer_new, soup_content_sniffer_new () +
soup_auth_is_for_proxy, soup_auth_is_for_proxy ()
-
soup_content_sniffer_sniff, soup_content_sniffer_sniff () +
SOUP_AUTH_IS_FOR_PROXY, SOUP_AUTH_IS_FOR_PROXY
-
soup_cookies_free, soup_cookies_free () +
soup_auth_is_ready, soup_auth_is_ready ()
-
soup_cookies_from_request, soup_cookies_from_request () +
soup_auth_manager_clear_cached_credentials, soup_auth_manager_clear_cached_credentials ()
-
soup_cookies_from_response, soup_cookies_from_response () +
soup_auth_manager_use_auth, soup_auth_manager_use_auth ()
-
soup_cookies_to_cookie_header, soup_cookies_to_cookie_header () +
soup_auth_negotiate_supported, soup_auth_negotiate_supported ()
-
soup_cookies_to_request, soup_cookies_to_request () +
soup_auth_new, soup_auth_new ()
-
soup_cookies_to_response, soup_cookies_to_response () +
SOUP_AUTH_REALM, SOUP_AUTH_REALM
-
soup_cookie_applies_to_uri, soup_cookie_applies_to_uri () +
SOUP_AUTH_SCHEME_NAME, SOUP_AUTH_SCHEME_NAME
-
soup_cookie_copy, soup_cookie_copy () +
soup_auth_update, soup_auth_update ()
-
soup_cookie_domain_matches, soup_cookie_domain_matches () +
soup_buffer_copy, soup_buffer_copy ()
-
soup_cookie_free, soup_cookie_free () +
soup_buffer_free, soup_buffer_free ()
-
soup_cookie_get_domain, soup_cookie_get_domain () +
soup_buffer_get_as_bytes, soup_buffer_get_as_bytes ()
-
soup_cookie_get_expires, soup_cookie_get_expires () +
soup_buffer_get_data, soup_buffer_get_data ()
-
soup_cookie_get_http_only, soup_cookie_get_http_only () +
soup_buffer_get_owner, soup_buffer_get_owner ()
-
soup_cookie_get_name, soup_cookie_get_name () +
soup_buffer_new, soup_buffer_new ()
-
soup_cookie_get_path, soup_cookie_get_path () +
soup_buffer_new_subbuffer, soup_buffer_new_subbuffer ()
-
soup_cookie_get_secure, soup_cookie_get_secure () +
soup_buffer_new_take, soup_buffer_new_take ()
-
soup_cookie_get_value, soup_cookie_get_value () +
soup_buffer_new_with_owner, soup_buffer_new_with_owner ()
-
SOUP_COOKIE_JAR_ACCEPT_POLICY, SOUP_COOKIE_JAR_ACCEPT_POLICY +
soup_cache_clear, soup_cache_clear ()
-
soup_cookie_jar_add_cookie, soup_cookie_jar_add_cookie () +
soup_cache_dump, soup_cache_dump ()
-
soup_cookie_jar_add_cookie_with_first_party, soup_cookie_jar_add_cookie_with_first_party () +
soup_cache_flush, soup_cache_flush ()
-
soup_cookie_jar_all_cookies, soup_cookie_jar_all_cookies () +
soup_cache_get_max_size, soup_cache_get_max_size ()
-
SOUP_COOKIE_JAR_DB_FILENAME, SOUP_COOKIE_JAR_DB_FILENAME +
soup_cache_load, soup_cache_load ()
-
soup_cookie_jar_db_new, soup_cookie_jar_db_new () +
soup_cache_new, soup_cache_new ()
-
soup_cookie_jar_delete_cookie, soup_cookie_jar_delete_cookie () +
soup_cache_set_max_size, soup_cache_set_max_size ()
-
soup_cookie_jar_get_accept_policy, soup_cookie_jar_get_accept_policy () +
soup_check_version, soup_check_version ()
-
soup_cookie_jar_get_cookies, soup_cookie_jar_get_cookies () +
SOUP_CHECK_VERSION, SOUP_CHECK_VERSION()
-
soup_cookie_jar_get_cookie_list, soup_cookie_jar_get_cookie_list () +
soup_client_context_get_address, soup_client_context_get_address ()
-
soup_cookie_jar_is_persistent, soup_cookie_jar_is_persistent () +
soup_client_context_get_auth_domain, soup_client_context_get_auth_domain ()
-
soup_cookie_jar_new, soup_cookie_jar_new () +
soup_client_context_get_auth_user, soup_client_context_get_auth_user ()
-
SOUP_COOKIE_JAR_READ_ONLY, SOUP_COOKIE_JAR_READ_ONLY +
soup_client_context_get_gsocket, soup_client_context_get_gsocket ()
-
soup_cookie_jar_set_accept_policy, soup_cookie_jar_set_accept_policy () +
soup_client_context_get_host, soup_client_context_get_host ()
-
soup_cookie_jar_set_cookie, soup_cookie_jar_set_cookie () +
soup_client_context_get_local_address, soup_client_context_get_local_address ()
-
soup_cookie_jar_set_cookie_with_first_party, soup_cookie_jar_set_cookie_with_first_party () +
soup_client_context_get_remote_address, soup_client_context_get_remote_address ()
-
SOUP_COOKIE_JAR_TEXT_FILENAME, SOUP_COOKIE_JAR_TEXT_FILENAME +
soup_client_context_get_socket, soup_client_context_get_socket ()
-
soup_cookie_jar_text_new, soup_cookie_jar_text_new () +
soup_client_context_steal_connection, soup_client_context_steal_connection ()
-
SOUP_COOKIE_MAX_AGE_ONE_DAY, SOUP_COOKIE_MAX_AGE_ONE_DAY +
soup_content_sniffer_get_buffer_size, soup_content_sniffer_get_buffer_size ()
-
SOUP_COOKIE_MAX_AGE_ONE_HOUR, SOUP_COOKIE_MAX_AGE_ONE_HOUR +
soup_content_sniffer_new, soup_content_sniffer_new ()
-
SOUP_COOKIE_MAX_AGE_ONE_WEEK, SOUP_COOKIE_MAX_AGE_ONE_WEEK +
soup_content_sniffer_sniff, soup_content_sniffer_sniff ()
-
SOUP_COOKIE_MAX_AGE_ONE_YEAR, SOUP_COOKIE_MAX_AGE_ONE_YEAR +
soup_cookies_free, soup_cookies_free ()
-
soup_cookie_new, soup_cookie_new () +
soup_cookies_from_request, soup_cookies_from_request ()
-
soup_cookie_parse, soup_cookie_parse () +
soup_cookies_from_response, soup_cookies_from_response ()
-
soup_cookie_set_domain, soup_cookie_set_domain () +
soup_cookies_to_cookie_header, soup_cookies_to_cookie_header ()
-
soup_cookie_set_expires, soup_cookie_set_expires () +
soup_cookies_to_request, soup_cookies_to_request ()
-
soup_cookie_set_http_only, soup_cookie_set_http_only () +
soup_cookies_to_response, soup_cookies_to_response ()
-
soup_cookie_set_max_age, soup_cookie_set_max_age () +
soup_cookie_applies_to_uri, soup_cookie_applies_to_uri ()
-
soup_cookie_set_name, soup_cookie_set_name () +
soup_cookie_copy, soup_cookie_copy ()
-
soup_cookie_set_path, soup_cookie_set_path () +
soup_cookie_domain_matches, soup_cookie_domain_matches ()
-
soup_cookie_set_secure, soup_cookie_set_secure () +
soup_cookie_free, soup_cookie_free ()
-
soup_cookie_set_value, soup_cookie_set_value () +
soup_cookie_get_domain, soup_cookie_get_domain ()
-
soup_cookie_to_cookie_header, soup_cookie_to_cookie_header () +
soup_cookie_get_expires, soup_cookie_get_expires ()
-
soup_cookie_to_set_cookie_header, soup_cookie_to_set_cookie_header () +
soup_cookie_get_http_only, soup_cookie_get_http_only ()
-
soup_date_free, soup_date_free () +
soup_cookie_get_name, soup_cookie_get_name ()
-
soup_date_get_day, soup_date_get_day () +
soup_cookie_get_path, soup_cookie_get_path ()
-
soup_date_get_hour, soup_date_get_hour () +
soup_cookie_get_secure, soup_cookie_get_secure ()
-
soup_date_get_minute, soup_date_get_minute () +
soup_cookie_get_value, soup_cookie_get_value ()
-
soup_date_get_month, soup_date_get_month () +
SOUP_COOKIE_JAR_ACCEPT_POLICY, SOUP_COOKIE_JAR_ACCEPT_POLICY
-
soup_date_get_offset, soup_date_get_offset () +
soup_cookie_jar_add_cookie, soup_cookie_jar_add_cookie ()
-
soup_date_get_second, soup_date_get_second () +
soup_cookie_jar_add_cookie_with_first_party, soup_cookie_jar_add_cookie_with_first_party ()
-
soup_date_get_utc, soup_date_get_utc () +
soup_cookie_jar_all_cookies, soup_cookie_jar_all_cookies ()
-
soup_date_get_year, soup_date_get_year () +
SOUP_COOKIE_JAR_DB_FILENAME, SOUP_COOKIE_JAR_DB_FILENAME
-
soup_date_is_past, soup_date_is_past () +
soup_cookie_jar_db_new, soup_cookie_jar_db_new ()
-
soup_date_new, soup_date_new () +
soup_cookie_jar_delete_cookie, soup_cookie_jar_delete_cookie ()
-
soup_date_new_from_now, soup_date_new_from_now () +
soup_cookie_jar_get_accept_policy, soup_cookie_jar_get_accept_policy ()
-
soup_date_new_from_string, soup_date_new_from_string () +
soup_cookie_jar_get_cookies, soup_cookie_jar_get_cookies ()
-
soup_date_new_from_time_t, soup_date_new_from_time_t () +
soup_cookie_jar_get_cookie_list, soup_cookie_jar_get_cookie_list ()
-
soup_date_to_string, soup_date_to_string () +
soup_cookie_jar_is_persistent, soup_cookie_jar_is_persistent ()
-
soup_date_to_timeval, soup_date_to_timeval () +
soup_cookie_jar_new, soup_cookie_jar_new ()
-
soup_date_to_time_t, soup_date_to_time_t () +
SOUP_COOKIE_JAR_READ_ONLY, SOUP_COOKIE_JAR_READ_ONLY
-
soup_form_decode, soup_form_decode () +
soup_cookie_jar_set_accept_policy, soup_cookie_jar_set_accept_policy ()
-
soup_form_decode_multipart, soup_form_decode_multipart () +
soup_cookie_jar_set_cookie, soup_cookie_jar_set_cookie ()
-
soup_form_encode, soup_form_encode () +
soup_cookie_jar_set_cookie_with_first_party, soup_cookie_jar_set_cookie_with_first_party ()
-
soup_form_encode_datalist, soup_form_encode_datalist () +
SOUP_COOKIE_JAR_TEXT_FILENAME, SOUP_COOKIE_JAR_TEXT_FILENAME
-
soup_form_encode_hash, soup_form_encode_hash () +
soup_cookie_jar_text_new, soup_cookie_jar_text_new ()
-
soup_form_encode_valist, soup_form_encode_valist () +
SOUP_COOKIE_MAX_AGE_ONE_DAY, SOUP_COOKIE_MAX_AGE_ONE_DAY
-
SOUP_FORM_MIME_TYPE_MULTIPART, SOUP_FORM_MIME_TYPE_MULTIPART +
SOUP_COOKIE_MAX_AGE_ONE_HOUR, SOUP_COOKIE_MAX_AGE_ONE_HOUR
-
SOUP_FORM_MIME_TYPE_URLENCODED, SOUP_FORM_MIME_TYPE_URLENCODED +
SOUP_COOKIE_MAX_AGE_ONE_WEEK, SOUP_COOKIE_MAX_AGE_ONE_WEEK
-
soup_form_request_new, soup_form_request_new () +
SOUP_COOKIE_MAX_AGE_ONE_YEAR, SOUP_COOKIE_MAX_AGE_ONE_YEAR
-
soup_form_request_new_from_datalist, soup_form_request_new_from_datalist () +
soup_cookie_new, soup_cookie_new ()
-
soup_form_request_new_from_hash, soup_form_request_new_from_hash () +
soup_cookie_parse, soup_cookie_parse ()
-
soup_form_request_new_from_multipart, soup_form_request_new_from_multipart () +
soup_cookie_set_domain, soup_cookie_set_domain ()
-
soup_get_major_version, soup_get_major_version () +
soup_cookie_set_expires, soup_cookie_set_expires ()
-
soup_get_micro_version, soup_get_micro_version () +
soup_cookie_set_http_only, soup_cookie_set_http_only ()
-
soup_get_minor_version, soup_get_minor_version () +
soup_cookie_set_max_age, soup_cookie_set_max_age ()
-
soup_headers_parse, soup_headers_parse () +
soup_cookie_set_name, soup_cookie_set_name ()
-
soup_headers_parse_request, soup_headers_parse_request () +
soup_cookie_set_path, soup_cookie_set_path ()
-
soup_headers_parse_response, soup_headers_parse_response () +
soup_cookie_set_secure, soup_cookie_set_secure ()
-
soup_headers_parse_status_line, soup_headers_parse_status_line () +
soup_cookie_set_value, soup_cookie_set_value ()
-
soup_header_contains, soup_header_contains () +
soup_cookie_to_cookie_header, soup_cookie_to_cookie_header ()
-
soup_header_free_list, soup_header_free_list () +
soup_cookie_to_set_cookie_header, soup_cookie_to_set_cookie_header ()
-
soup_header_free_param_list, soup_header_free_param_list () +
soup_date_free, soup_date_free ()
-
soup_header_g_string_append_param, soup_header_g_string_append_param () +
soup_date_get_day, soup_date_get_day ()
-
soup_header_g_string_append_param_quoted, soup_header_g_string_append_param_quoted () +
soup_date_get_hour, soup_date_get_hour ()
-
soup_header_parse_list, soup_header_parse_list () +
soup_date_get_minute, soup_date_get_minute ()
-
soup_header_parse_param_list, soup_header_parse_param_list () +
soup_date_get_month, soup_date_get_month ()
-
soup_header_parse_quality_list, soup_header_parse_quality_list () +
soup_date_get_offset, soup_date_get_offset ()
-
soup_header_parse_semi_param_list, soup_header_parse_semi_param_list () +
soup_date_get_second, soup_date_get_second ()
-
SOUP_HTTP_ERROR, SOUP_HTTP_ERROR +
soup_date_get_utc, soup_date_get_utc ()
-
soup_logger_attach, soup_logger_attach () +
soup_date_get_year, soup_date_get_year ()
-
soup_logger_detach, soup_logger_detach () +
soup_date_is_past, soup_date_is_past ()
-
soup_logger_new, soup_logger_new () +
soup_date_new, soup_date_new ()
-
soup_logger_set_printer, soup_logger_set_printer () +
soup_date_new_from_now, soup_date_new_from_now ()
-
soup_logger_set_request_filter, soup_logger_set_request_filter () +
soup_date_new_from_string, soup_date_new_from_string ()
-
soup_logger_set_response_filter, soup_logger_set_response_filter () +
soup_date_new_from_time_t, soup_date_new_from_time_t ()
-
SOUP_MAJOR_VERSION, SOUP_MAJOR_VERSION +
soup_date_to_string, soup_date_to_string ()
-
soup_message_add_header_handler, soup_message_add_header_handler () +
soup_date_to_timeval, soup_date_to_timeval ()
-
soup_message_add_status_code_handler, soup_message_add_status_code_handler () +
soup_date_to_time_t, soup_date_to_time_t ()
-
soup_message_body_append, soup_message_body_append () +
soup_form_decode, soup_form_decode ()
-
soup_message_body_append_buffer, soup_message_body_append_buffer () +
soup_form_decode_multipart, soup_form_decode_multipart ()
-
soup_message_body_append_take, soup_message_body_append_take () +
soup_form_encode, soup_form_encode ()
-
soup_message_body_complete, soup_message_body_complete () +
soup_form_encode_datalist, soup_form_encode_datalist ()
-
soup_message_body_flatten, soup_message_body_flatten () +
soup_form_encode_hash, soup_form_encode_hash ()
-
soup_message_body_free, soup_message_body_free () +
soup_form_encode_valist, soup_form_encode_valist ()
-
soup_message_body_get_accumulate, soup_message_body_get_accumulate () +
SOUP_FORM_MIME_TYPE_MULTIPART, SOUP_FORM_MIME_TYPE_MULTIPART
-
soup_message_body_get_chunk, soup_message_body_get_chunk () +
SOUP_FORM_MIME_TYPE_URLENCODED, SOUP_FORM_MIME_TYPE_URLENCODED
-
soup_message_body_got_chunk, soup_message_body_got_chunk () +
soup_form_request_new, soup_form_request_new ()
-
soup_message_body_new, soup_message_body_new () +
soup_form_request_new_from_datalist, soup_form_request_new_from_datalist ()
-
soup_message_body_set_accumulate, soup_message_body_set_accumulate () +
soup_form_request_new_from_hash, soup_form_request_new_from_hash ()
-
soup_message_body_truncate, soup_message_body_truncate () +
soup_form_request_new_from_multipart, soup_form_request_new_from_multipart ()
-
soup_message_body_wrote_chunk, soup_message_body_wrote_chunk () +
soup_get_major_version, soup_get_major_version ()
-
soup_message_disable_feature, soup_message_disable_feature () +
soup_get_micro_version, soup_get_micro_version ()
-
SOUP_MESSAGE_FIRST_PARTY, SOUP_MESSAGE_FIRST_PARTY +
soup_get_minor_version, soup_get_minor_version ()
-
SOUP_MESSAGE_FLAGS, SOUP_MESSAGE_FLAGS +
soup_headers_parse, soup_headers_parse ()
-
soup_message_get_address, soup_message_get_address () +
soup_headers_parse_request, soup_headers_parse_request ()
-
soup_message_get_first_party, soup_message_get_first_party () +
soup_headers_parse_response, soup_headers_parse_response ()
-
soup_message_get_flags, soup_message_get_flags () +
soup_headers_parse_status_line, soup_headers_parse_status_line ()
-
soup_message_get_https_status, soup_message_get_https_status () +
soup_header_contains, soup_header_contains ()
-
soup_message_get_http_version, soup_message_get_http_version () +
soup_header_free_list, soup_header_free_list ()
-
soup_message_get_priority, soup_message_get_priority () +
soup_header_free_param_list, soup_header_free_param_list ()
-
soup_message_get_soup_request, soup_message_get_soup_request () +
soup_header_g_string_append_param, soup_header_g_string_append_param ()
-
soup_message_get_uri, soup_message_get_uri () +
soup_header_g_string_append_param_quoted, soup_header_g_string_append_param_quoted ()
-
soup_message_headers_append, soup_message_headers_append () +
soup_header_parse_list, soup_header_parse_list ()
-
soup_message_headers_clean_connection_headers, soup_message_headers_clean_connection_headers () +
soup_header_parse_param_list, soup_header_parse_param_list ()
-
soup_message_headers_clear, soup_message_headers_clear () +
soup_header_parse_quality_list, soup_header_parse_quality_list ()
-
soup_message_headers_foreach, soup_message_headers_foreach () +
soup_header_parse_semi_param_list, soup_header_parse_semi_param_list ()
-
soup_message_headers_free, soup_message_headers_free () +
SOUP_HTTP_ERROR, SOUP_HTTP_ERROR
-
soup_message_headers_free_ranges, soup_message_headers_free_ranges () +
soup_logger_new, soup_logger_new ()
-
soup_message_headers_get, soup_message_headers_get () +
soup_logger_set_printer, soup_logger_set_printer ()
-
soup_message_headers_get_content_disposition, soup_message_headers_get_content_disposition () +
soup_logger_set_request_filter, soup_logger_set_request_filter ()
-
soup_message_headers_get_content_length, soup_message_headers_get_content_length () +
soup_logger_set_response_filter, soup_logger_set_response_filter ()
-
soup_message_headers_get_content_range, soup_message_headers_get_content_range () +
SOUP_MAJOR_VERSION, SOUP_MAJOR_VERSION
-
soup_message_headers_get_content_type, soup_message_headers_get_content_type () +
soup_message_add_header_handler, soup_message_add_header_handler ()
-
soup_message_headers_get_encoding, soup_message_headers_get_encoding () +
soup_message_add_status_code_handler, soup_message_add_status_code_handler ()
-
soup_message_headers_get_expectations, soup_message_headers_get_expectations () +
soup_message_body_append, soup_message_body_append ()
-
soup_message_headers_get_list, soup_message_headers_get_list () +
soup_message_body_append_buffer, soup_message_body_append_buffer ()
-
soup_message_headers_get_one, soup_message_headers_get_one () +
soup_message_body_append_take, soup_message_body_append_take ()
-
soup_message_headers_get_ranges, soup_message_headers_get_ranges () +
soup_message_body_complete, soup_message_body_complete ()
-
soup_message_headers_iter_init, soup_message_headers_iter_init () +
soup_message_body_flatten, soup_message_body_flatten ()
-
soup_message_headers_iter_next, soup_message_headers_iter_next () +
soup_message_body_free, soup_message_body_free ()
-
soup_message_headers_new, soup_message_headers_new () +
soup_message_body_get_accumulate, soup_message_body_get_accumulate ()
-
soup_message_headers_remove, soup_message_headers_remove () +
soup_message_body_get_chunk, soup_message_body_get_chunk ()
-
soup_message_headers_replace, soup_message_headers_replace () +
soup_message_body_got_chunk, soup_message_body_got_chunk ()
-
soup_message_headers_set_content_disposition, soup_message_headers_set_content_disposition () +
soup_message_body_new, soup_message_body_new ()
-
soup_message_headers_set_content_length, soup_message_headers_set_content_length () +
soup_message_body_set_accumulate, soup_message_body_set_accumulate ()
-
soup_message_headers_set_content_range, soup_message_headers_set_content_range () +
soup_message_body_truncate, soup_message_body_truncate ()
-
soup_message_headers_set_content_type, soup_message_headers_set_content_type () +
soup_message_body_wrote_chunk, soup_message_body_wrote_chunk ()
-
soup_message_headers_set_encoding, soup_message_headers_set_encoding () +
soup_message_disable_feature, soup_message_disable_feature ()
-
soup_message_headers_set_expectations, soup_message_headers_set_expectations () +
SOUP_MESSAGE_FIRST_PARTY, SOUP_MESSAGE_FIRST_PARTY
-
soup_message_headers_set_range, soup_message_headers_set_range () +
SOUP_MESSAGE_FLAGS, SOUP_MESSAGE_FLAGS
-
soup_message_headers_set_ranges, soup_message_headers_set_ranges () +
soup_message_get_address, soup_message_get_address ()
-
SOUP_MESSAGE_HTTP_VERSION, SOUP_MESSAGE_HTTP_VERSION +
soup_message_get_first_party, soup_message_get_first_party ()
-
soup_message_is_keepalive, soup_message_is_keepalive () +
soup_message_get_flags, soup_message_get_flags ()
-
SOUP_MESSAGE_METHOD, SOUP_MESSAGE_METHOD +
soup_message_get_https_status, soup_message_get_https_status ()
-
soup_message_new, soup_message_new () +
soup_message_get_http_version, soup_message_get_http_version ()
-
soup_message_new_from_uri, soup_message_new_from_uri () +
soup_message_get_priority, soup_message_get_priority ()
-
SOUP_MESSAGE_PRIORITY, SOUP_MESSAGE_PRIORITY +
soup_message_get_soup_request, soup_message_get_soup_request ()
-
SOUP_MESSAGE_REASON_PHRASE, SOUP_MESSAGE_REASON_PHRASE +
soup_message_get_uri, soup_message_get_uri ()
-
SOUP_MESSAGE_REQUEST_BODY, SOUP_MESSAGE_REQUEST_BODY +
soup_message_headers_append, soup_message_headers_append ()
-
SOUP_MESSAGE_REQUEST_BODY_DATA, SOUP_MESSAGE_REQUEST_BODY_DATA +
soup_message_headers_clean_connection_headers, soup_message_headers_clean_connection_headers ()
-
SOUP_MESSAGE_REQUEST_HEADERS, SOUP_MESSAGE_REQUEST_HEADERS +
soup_message_headers_clear, soup_message_headers_clear ()
-
SOUP_MESSAGE_RESPONSE_BODY, SOUP_MESSAGE_RESPONSE_BODY +
soup_message_headers_foreach, soup_message_headers_foreach ()
-
SOUP_MESSAGE_RESPONSE_BODY_DATA, SOUP_MESSAGE_RESPONSE_BODY_DATA +
soup_message_headers_free, soup_message_headers_free ()
-
SOUP_MESSAGE_RESPONSE_HEADERS, SOUP_MESSAGE_RESPONSE_HEADERS +
soup_message_headers_free_ranges, soup_message_headers_free_ranges ()
-
SOUP_MESSAGE_SERVER_SIDE, SOUP_MESSAGE_SERVER_SIDE +
soup_message_headers_get_content_disposition, soup_message_headers_get_content_disposition ()
-
soup_message_set_chunk_allocator, soup_message_set_chunk_allocator () +
soup_message_headers_get_content_length, soup_message_headers_get_content_length ()
-
soup_message_set_first_party, soup_message_set_first_party () +
soup_message_headers_get_content_range, soup_message_headers_get_content_range ()
-
soup_message_set_flags, soup_message_set_flags () +
soup_message_headers_get_content_type, soup_message_headers_get_content_type ()
-
soup_message_set_http_version, soup_message_set_http_version () +
soup_message_headers_get_encoding, soup_message_headers_get_encoding ()
-
soup_message_set_priority, soup_message_set_priority () +
soup_message_headers_get_expectations, soup_message_headers_get_expectations ()
-
soup_message_set_redirect, soup_message_set_redirect () +
soup_message_headers_get_headers_type, soup_message_headers_get_headers_type ()
-
soup_message_set_request, soup_message_set_request () +
soup_message_headers_get_list, soup_message_headers_get_list ()
-
soup_message_set_response, soup_message_set_response () +
soup_message_headers_get_one, soup_message_headers_get_one ()
-
soup_message_set_status, soup_message_set_status () +
soup_message_headers_get_ranges, soup_message_headers_get_ranges ()
-
soup_message_set_status_full, soup_message_set_status_full () +
soup_message_headers_header_contains, soup_message_headers_header_contains ()
-
soup_message_set_uri, soup_message_set_uri () +
soup_message_headers_header_equals, soup_message_headers_header_equals ()
-
SOUP_MESSAGE_STATUS_CODE, SOUP_MESSAGE_STATUS_CODE +
soup_message_headers_iter_init, soup_message_headers_iter_init ()
-
SOUP_MESSAGE_TLS_CERTIFICATE, SOUP_MESSAGE_TLS_CERTIFICATE +
soup_message_headers_iter_next, soup_message_headers_iter_next ()
-
SOUP_MESSAGE_TLS_ERRORS, SOUP_MESSAGE_TLS_ERRORS +
soup_message_headers_new, soup_message_headers_new ()
-
SOUP_MESSAGE_URI, SOUP_MESSAGE_URI +
soup_message_headers_remove, soup_message_headers_remove ()
-
SOUP_METHOD_CONNECT, SOUP_METHOD_CONNECT +
soup_message_headers_replace, soup_message_headers_replace ()
-
SOUP_METHOD_COPY, SOUP_METHOD_COPY +
soup_message_headers_set_content_disposition, soup_message_headers_set_content_disposition ()
-
SOUP_METHOD_DELETE, SOUP_METHOD_DELETE +
soup_message_headers_set_content_length, soup_message_headers_set_content_length ()
-
SOUP_METHOD_GET, SOUP_METHOD_GET +
soup_message_headers_set_content_range, soup_message_headers_set_content_range ()
-
SOUP_METHOD_HEAD, SOUP_METHOD_HEAD +
soup_message_headers_set_content_type, soup_message_headers_set_content_type ()
-
SOUP_METHOD_LOCK, SOUP_METHOD_LOCK +
soup_message_headers_set_encoding, soup_message_headers_set_encoding ()
-
SOUP_METHOD_MKCOL, SOUP_METHOD_MKCOL +
soup_message_headers_set_expectations, soup_message_headers_set_expectations ()
-
SOUP_METHOD_MOVE, SOUP_METHOD_MOVE +
soup_message_headers_set_range, soup_message_headers_set_range ()
-
SOUP_METHOD_OPTIONS, SOUP_METHOD_OPTIONS +
soup_message_headers_set_ranges, soup_message_headers_set_ranges ()
-
SOUP_METHOD_POST, SOUP_METHOD_POST +
SOUP_MESSAGE_HTTP_VERSION, SOUP_MESSAGE_HTTP_VERSION
-
SOUP_METHOD_PROPFIND, SOUP_METHOD_PROPFIND +
soup_message_is_keepalive, soup_message_is_keepalive ()
-
SOUP_METHOD_PROPPATCH, SOUP_METHOD_PROPPATCH +
SOUP_MESSAGE_METHOD, SOUP_MESSAGE_METHOD
-
SOUP_METHOD_PUT, SOUP_METHOD_PUT +
soup_message_new, soup_message_new ()
-
SOUP_METHOD_TRACE, SOUP_METHOD_TRACE +
soup_message_new_from_uri, soup_message_new_from_uri ()
-
SOUP_METHOD_UNLOCK, SOUP_METHOD_UNLOCK +
SOUP_MESSAGE_PRIORITY, SOUP_MESSAGE_PRIORITY
-
SOUP_MICRO_VERSION, SOUP_MICRO_VERSION +
SOUP_MESSAGE_REASON_PHRASE, SOUP_MESSAGE_REASON_PHRASE
-
SOUP_MINOR_VERSION, SOUP_MINOR_VERSION +
SOUP_MESSAGE_REQUEST_BODY, SOUP_MESSAGE_REQUEST_BODY
-
soup_multipart_append_form_file, soup_multipart_append_form_file () +
SOUP_MESSAGE_REQUEST_BODY_DATA, SOUP_MESSAGE_REQUEST_BODY_DATA
-
soup_multipart_append_form_string, soup_multipart_append_form_string () +
SOUP_MESSAGE_REQUEST_HEADERS, SOUP_MESSAGE_REQUEST_HEADERS
-
soup_multipart_append_part, soup_multipart_append_part () +
SOUP_MESSAGE_RESPONSE_BODY, SOUP_MESSAGE_RESPONSE_BODY
-
soup_multipart_free, soup_multipart_free () +
SOUP_MESSAGE_RESPONSE_BODY_DATA, SOUP_MESSAGE_RESPONSE_BODY_DATA
-
soup_multipart_get_length, soup_multipart_get_length () +
SOUP_MESSAGE_RESPONSE_HEADERS, SOUP_MESSAGE_RESPONSE_HEADERS
-
soup_multipart_get_part, soup_multipart_get_part () +
SOUP_MESSAGE_SERVER_SIDE, SOUP_MESSAGE_SERVER_SIDE
-
soup_multipart_input_stream_get_headers, soup_multipart_input_stream_get_headers () +
soup_message_set_first_party, soup_message_set_first_party ()
-
soup_multipart_input_stream_new, soup_multipart_input_stream_new () +
soup_message_set_flags, soup_message_set_flags ()
-
soup_multipart_input_stream_next_part, soup_multipart_input_stream_next_part () +
soup_message_set_http_version, soup_message_set_http_version ()
-
soup_multipart_input_stream_next_part_async, soup_multipart_input_stream_next_part_async () +
soup_message_set_priority, soup_message_set_priority ()
-
soup_multipart_input_stream_next_part_finish, soup_multipart_input_stream_next_part_finish () +
soup_message_set_redirect, soup_message_set_redirect ()
-
soup_multipart_new, soup_multipart_new () +
soup_message_set_request, soup_message_set_request ()
-
soup_multipart_new_from_message, soup_multipart_new_from_message () +
soup_message_set_response, soup_message_set_response ()
-
soup_multipart_to_message, soup_multipart_to_message () +
soup_message_set_status, soup_message_set_status ()
-
SOUP_REQUEST_ERROR, SOUP_REQUEST_ERROR +
soup_message_set_status_full, soup_message_set_status_full ()
-
soup_request_file_get_file, soup_request_file_get_file () +
soup_message_set_uri, soup_message_set_uri ()
-
soup_request_get_content_length, soup_request_get_content_length () +
SOUP_MESSAGE_STATUS_CODE, SOUP_MESSAGE_STATUS_CODE
-
soup_request_get_content_type, soup_request_get_content_type () +
SOUP_MESSAGE_TLS_CERTIFICATE, SOUP_MESSAGE_TLS_CERTIFICATE
-
soup_request_get_session, soup_request_get_session () +
SOUP_MESSAGE_TLS_ERRORS, SOUP_MESSAGE_TLS_ERRORS
-
soup_request_get_uri, soup_request_get_uri () +
SOUP_MESSAGE_URI, SOUP_MESSAGE_URI
-
soup_request_http_get_message, soup_request_http_get_message () +
SOUP_METHOD_CONNECT, SOUP_METHOD_CONNECT
-
soup_request_send, soup_request_send () +
SOUP_METHOD_COPY, SOUP_METHOD_COPY
-
soup_request_send_async, soup_request_send_async () +
SOUP_METHOD_DELETE, SOUP_METHOD_DELETE
-
soup_request_send_finish, soup_request_send_finish () +
SOUP_METHOD_GET, SOUP_METHOD_GET
-
SOUP_REQUEST_SESSION, SOUP_REQUEST_SESSION +
SOUP_METHOD_HEAD, SOUP_METHOD_HEAD
-
SOUP_REQUEST_URI, SOUP_REQUEST_URI +
SOUP_METHOD_LOCK, SOUP_METHOD_LOCK
-
soup_server_add_auth_domain, soup_server_add_auth_domain () +
SOUP_METHOD_MKCOL, SOUP_METHOD_MKCOL
-
soup_server_add_handler, soup_server_add_handler () +
SOUP_METHOD_MOVE, SOUP_METHOD_MOVE
-
SOUP_SERVER_ASYNC_CONTEXT, SOUP_SERVER_ASYNC_CONTEXT +
SOUP_METHOD_OPTIONS, SOUP_METHOD_OPTIONS
-
soup_server_disconnect, soup_server_disconnect () +
SOUP_METHOD_POST, SOUP_METHOD_POST
-
soup_server_get_async_context, soup_server_get_async_context () +
SOUP_METHOD_PROPFIND, SOUP_METHOD_PROPFIND
-
soup_server_get_listener, soup_server_get_listener () +
SOUP_METHOD_PROPPATCH, SOUP_METHOD_PROPPATCH
-
soup_server_get_port, soup_server_get_port () +
SOUP_METHOD_PUT, SOUP_METHOD_PUT
-
SOUP_SERVER_HTTPS_ALIASES, SOUP_SERVER_HTTPS_ALIASES +
SOUP_METHOD_TRACE, SOUP_METHOD_TRACE
-
SOUP_SERVER_HTTP_ALIASES, SOUP_SERVER_HTTP_ALIASES +
SOUP_METHOD_UNLOCK, SOUP_METHOD_UNLOCK
-
SOUP_SERVER_INTERFACE, SOUP_SERVER_INTERFACE +
SOUP_MICRO_VERSION, SOUP_MICRO_VERSION
-
soup_server_is_https, soup_server_is_https () +
SOUP_MINOR_VERSION, SOUP_MINOR_VERSION
-
soup_server_new, soup_server_new () +
soup_multipart_append_form_file, soup_multipart_append_form_file ()
-
soup_server_pause_message, soup_server_pause_message () +
soup_multipart_append_form_string, soup_multipart_append_form_string ()
-
SOUP_SERVER_PORT, SOUP_SERVER_PORT +
soup_multipart_append_part, soup_multipart_append_part ()
-
soup_server_quit, soup_server_quit () +
soup_multipart_free, soup_multipart_free ()
-
SOUP_SERVER_RAW_PATHS, SOUP_SERVER_RAW_PATHS +
soup_multipart_get_length, soup_multipart_get_length ()
-
soup_server_remove_auth_domain, soup_server_remove_auth_domain () +
soup_multipart_get_part, soup_multipart_get_part ()
-
soup_server_remove_handler, soup_server_remove_handler () +
soup_multipart_input_stream_get_headers, soup_multipart_input_stream_get_headers ()
-
soup_server_run, soup_server_run () +
soup_multipart_input_stream_new, soup_multipart_input_stream_new ()
-
soup_server_run_async, soup_server_run_async () +
soup_multipart_input_stream_next_part, soup_multipart_input_stream_next_part ()
-
SOUP_SERVER_SERVER_HEADER, SOUP_SERVER_SERVER_HEADER +
soup_multipart_input_stream_next_part_async, soup_multipart_input_stream_next_part_async ()
-
SOUP_SERVER_SSL_CERT_FILE, SOUP_SERVER_SSL_CERT_FILE +
soup_multipart_input_stream_next_part_finish, soup_multipart_input_stream_next_part_finish ()
-
SOUP_SERVER_SSL_KEY_FILE, SOUP_SERVER_SSL_KEY_FILE +
soup_multipart_new, soup_multipart_new ()
-
SOUP_SERVER_TLS_CERTIFICATE, SOUP_SERVER_TLS_CERTIFICATE +
soup_multipart_new_from_message, soup_multipart_new_from_message ()
-
soup_server_unpause_message, soup_server_unpause_message () +
soup_multipart_to_message, soup_multipart_to_message ()
-
soup_session_abort, soup_session_abort () +
SOUP_REQUEST_ERROR, SOUP_REQUEST_ERROR
-
SOUP_SESSION_ACCEPT_LANGUAGE, SOUP_SESSION_ACCEPT_LANGUAGE +
soup_request_file_get_file, soup_request_file_get_file ()
-
SOUP_SESSION_ACCEPT_LANGUAGE_AUTO, SOUP_SESSION_ACCEPT_LANGUAGE_AUTO +
soup_request_get_content_length, soup_request_get_content_length ()
-
soup_session_add_feature, soup_session_add_feature () +
soup_request_get_content_type, soup_request_get_content_type ()
-
SOUP_SESSION_ADD_FEATURE, SOUP_SESSION_ADD_FEATURE +
soup_request_get_session, soup_request_get_session ()
-
soup_session_add_feature_by_type, soup_session_add_feature_by_type () +
soup_request_get_uri, soup_request_get_uri ()
-
SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_SESSION_ADD_FEATURE_BY_TYPE +
soup_request_http_get_message, soup_request_http_get_message ()
-
SOUP_SESSION_ASYNC_CONTEXT, SOUP_SESSION_ASYNC_CONTEXT +
soup_request_send, soup_request_send ()
-
soup_session_async_new, soup_session_async_new () +
soup_request_send_async, soup_request_send_async ()
-
soup_session_async_new_with_options, soup_session_async_new_with_options () +
soup_request_send_finish, soup_request_send_finish ()
-
soup_session_cancel_message, soup_session_cancel_message () +
SOUP_REQUEST_SESSION, SOUP_REQUEST_SESSION
-
soup_session_get_async_context, soup_session_get_async_context () +
SOUP_REQUEST_URI, SOUP_REQUEST_URI
-
soup_session_get_feature, soup_session_get_feature () +
soup_server_accept_iostream, soup_server_accept_iostream ()
-
soup_session_get_features, soup_session_get_features () +
soup_server_add_auth_domain, soup_server_add_auth_domain ()
-
soup_session_get_feature_for_message, soup_session_get_feature_for_message () +
soup_server_add_early_handler, soup_server_add_early_handler ()
-
soup_session_has_feature, soup_session_has_feature () +
soup_server_add_handler, soup_server_add_handler ()
-
SOUP_SESSION_HTTPS_ALIASES, SOUP_SESSION_HTTPS_ALIASES +
soup_server_add_websocket_handler, soup_server_add_websocket_handler ()
-
SOUP_SESSION_HTTP_ALIASES, SOUP_SESSION_HTTP_ALIASES +
SOUP_SERVER_ASYNC_CONTEXT, SOUP_SERVER_ASYNC_CONTEXT
-
SOUP_SESSION_IDLE_TIMEOUT, SOUP_SESSION_IDLE_TIMEOUT +
soup_server_disconnect, soup_server_disconnect ()
-
SOUP_SESSION_LOCAL_ADDRESS, SOUP_SESSION_LOCAL_ADDRESS +
soup_server_get_async_context, soup_server_get_async_context ()
-
SOUP_SESSION_MAX_CONNS, SOUP_SESSION_MAX_CONNS +
soup_server_get_listener, soup_server_get_listener ()
-
SOUP_SESSION_MAX_CONNS_PER_HOST, SOUP_SESSION_MAX_CONNS_PER_HOST +
soup_server_get_listeners, soup_server_get_listeners ()
-
soup_session_new, soup_session_new () +
soup_server_get_port, soup_server_get_port ()
-
soup_session_new_with_options, soup_session_new_with_options () +
soup_server_get_uris, soup_server_get_uris ()
-
soup_session_pause_message, soup_session_pause_message () +
SOUP_SERVER_HTTPS_ALIASES, SOUP_SERVER_HTTPS_ALIASES
-
soup_session_prefetch_dns, soup_session_prefetch_dns () +
SOUP_SERVER_HTTP_ALIASES, SOUP_SERVER_HTTP_ALIASES
-
soup_session_prepare_for_uri, soup_session_prepare_for_uri (), soup_session_prepare_for_uri () +
SOUP_SERVER_INTERFACE, SOUP_SERVER_INTERFACE
-
SOUP_SESSION_PROXY_RESOLVER, SOUP_SESSION_PROXY_RESOLVER +
soup_server_is_https, soup_server_is_https ()
-
SOUP_SESSION_PROXY_URI, SOUP_SESSION_PROXY_URI +
soup_server_listen, soup_server_listen ()
-
soup_session_queue_message, soup_session_queue_message () +
soup_server_listen_all, soup_server_listen_all ()
-
soup_session_redirect_message, soup_session_redirect_message () +
soup_server_listen_fd, soup_server_listen_fd ()
-
soup_session_remove_feature, soup_session_remove_feature () +
soup_server_listen_local, soup_server_listen_local ()
-
soup_session_remove_feature_by_type, soup_session_remove_feature_by_type () +
soup_server_listen_socket, soup_server_listen_socket ()
-
SOUP_SESSION_REMOVE_FEATURE_BY_TYPE, SOUP_SESSION_REMOVE_FEATURE_BY_TYPE +
soup_server_new, soup_server_new ()
-
soup_session_request, soup_session_request () +
soup_server_pause_message, soup_server_pause_message ()
-
soup_session_request_http, soup_session_request_http () +
SOUP_SERVER_PORT, SOUP_SERVER_PORT
-
soup_session_request_http_uri, soup_session_request_http_uri () +
soup_server_quit, soup_server_quit ()
-
soup_session_request_uri, soup_session_request_uri () +
SOUP_SERVER_RAW_PATHS, SOUP_SERVER_RAW_PATHS
-
soup_session_requeue_message, soup_session_requeue_message () +
soup_server_remove_auth_domain, soup_server_remove_auth_domain ()
-
soup_session_send, soup_session_send () +
soup_server_remove_handler, soup_server_remove_handler ()
-
soup_session_send_async, soup_session_send_async () +
soup_server_run, soup_server_run ()
-
soup_session_send_finish, soup_session_send_finish () +
soup_server_run_async, soup_server_run_async ()
-
soup_session_send_message, soup_session_send_message () +
SOUP_SERVER_SERVER_HEADER, SOUP_SERVER_SERVER_HEADER
-
SOUP_SESSION_SSL_CA_FILE, SOUP_SESSION_SSL_CA_FILE +
soup_server_set_ssl_cert_file, soup_server_set_ssl_cert_file ()
-
SOUP_SESSION_SSL_STRICT, SOUP_SESSION_SSL_STRICT +
SOUP_SERVER_SSL_CERT_FILE, SOUP_SERVER_SSL_CERT_FILE
-
SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE +
SOUP_SERVER_SSL_KEY_FILE, SOUP_SERVER_SSL_KEY_FILE
-
soup_session_sync_new, soup_session_sync_new () +
SOUP_SERVER_TLS_CERTIFICATE, SOUP_SERVER_TLS_CERTIFICATE
-
soup_session_sync_new_with_options, soup_session_sync_new_with_options () +
soup_server_unpause_message, soup_server_unpause_message ()
-
SOUP_SESSION_TIMEOUT, SOUP_SESSION_TIMEOUT +
soup_session_abort, soup_session_abort ()
-
SOUP_SESSION_TLS_DATABASE, SOUP_SESSION_TLS_DATABASE +
SOUP_SESSION_ACCEPT_LANGUAGE, SOUP_SESSION_ACCEPT_LANGUAGE
-
soup_session_unpause_message, soup_session_unpause_message () +
SOUP_SESSION_ACCEPT_LANGUAGE_AUTO, SOUP_SESSION_ACCEPT_LANGUAGE_AUTO
-
SOUP_SESSION_USER_AGENT, SOUP_SESSION_USER_AGENT +
soup_session_add_feature, soup_session_add_feature ()
-
SOUP_SESSION_USE_THREAD_CONTEXT, SOUP_SESSION_USE_THREAD_CONTEXT +
SOUP_SESSION_ADD_FEATURE, SOUP_SESSION_ADD_FEATURE
-
soup_session_would_redirect, soup_session_would_redirect () +
soup_session_add_feature_by_type, soup_session_add_feature_by_type ()
-
SOUP_SOCKET_ASYNC_CONTEXT, SOUP_SOCKET_ASYNC_CONTEXT +
SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_SESSION_ADD_FEATURE_BY_TYPE
-
soup_socket_connect_async, soup_socket_connect_async () +
SOUP_SESSION_ASYNC_CONTEXT, SOUP_SESSION_ASYNC_CONTEXT
-
soup_socket_connect_sync, soup_socket_connect_sync () +
soup_session_cancel_message, soup_session_cancel_message ()
-
soup_socket_disconnect, soup_socket_disconnect () +
soup_session_connect_async, soup_session_connect_async ()
-
SOUP_SOCKET_FLAG_NONBLOCKING, SOUP_SOCKET_FLAG_NONBLOCKING +
soup_session_connect_finish, soup_session_connect_finish ()
-
soup_socket_get_fd, soup_socket_get_fd () +
soup_session_get_async_context, soup_session_get_async_context ()
-
soup_socket_get_local_address, soup_socket_get_local_address () +
soup_session_get_feature, soup_session_get_feature ()
-
soup_socket_get_remote_address, soup_socket_get_remote_address () +
soup_session_get_features, soup_session_get_features ()
-
soup_socket_is_connected, soup_socket_is_connected () +
soup_session_get_feature_for_message, soup_session_get_feature_for_message ()
-
SOUP_SOCKET_IS_SERVER, SOUP_SOCKET_IS_SERVER +
soup_session_has_feature, soup_session_has_feature ()
-
soup_socket_is_ssl, soup_socket_is_ssl () +
SOUP_SESSION_HTTPS_ALIASES, SOUP_SESSION_HTTPS_ALIASES
-
soup_socket_listen, soup_socket_listen () +
SOUP_SESSION_HTTP_ALIASES, SOUP_SESSION_HTTP_ALIASES
-
SOUP_SOCKET_LOCAL_ADDRESS, SOUP_SOCKET_LOCAL_ADDRESS +
SOUP_SESSION_IDLE_TIMEOUT, SOUP_SESSION_IDLE_TIMEOUT
-
soup_socket_new, soup_socket_new () +
SOUP_SESSION_LOCAL_ADDRESS, SOUP_SESSION_LOCAL_ADDRESS
-
soup_socket_read, soup_socket_read () +
SOUP_SESSION_MAX_CONNS, SOUP_SESSION_MAX_CONNS
-
soup_socket_read_until, soup_socket_read_until () +
SOUP_SESSION_MAX_CONNS_PER_HOST, SOUP_SESSION_MAX_CONNS_PER_HOST
-
SOUP_SOCKET_REMOTE_ADDRESS, SOUP_SOCKET_REMOTE_ADDRESS +
soup_session_new, soup_session_new ()
-
SOUP_SOCKET_SSL_CREDENTIALS, SOUP_SOCKET_SSL_CREDENTIALS +
soup_session_new_with_options, soup_session_new_with_options ()
-
SOUP_SOCKET_SSL_FALLBACK, SOUP_SOCKET_SSL_FALLBACK +
soup_session_pause_message, soup_session_pause_message ()
-
SOUP_SOCKET_SSL_STRICT, SOUP_SOCKET_SSL_STRICT +
soup_session_prefetch_dns, soup_session_prefetch_dns ()
-
soup_socket_start_proxy_ssl, soup_socket_start_proxy_ssl () +
SOUP_SESSION_PROXY_RESOLVER, SOUP_SESSION_PROXY_RESOLVER
-
soup_socket_start_ssl, soup_socket_start_ssl () +
SOUP_SESSION_PROXY_URI, SOUP_SESSION_PROXY_URI
-
SOUP_SOCKET_TIMEOUT, SOUP_SOCKET_TIMEOUT +
soup_session_queue_message, soup_session_queue_message ()
-
SOUP_SOCKET_TLS_CERTIFICATE, SOUP_SOCKET_TLS_CERTIFICATE +
soup_session_redirect_message, soup_session_redirect_message ()
-
SOUP_SOCKET_TLS_ERRORS, SOUP_SOCKET_TLS_ERRORS +
soup_session_remove_feature, soup_session_remove_feature ()
-
SOUP_SOCKET_TRUSTED_CERTIFICATE, SOUP_SOCKET_TRUSTED_CERTIFICATE +
soup_session_remove_feature_by_type, soup_session_remove_feature_by_type ()
-
SOUP_SOCKET_USE_THREAD_CONTEXT, SOUP_SOCKET_USE_THREAD_CONTEXT +
SOUP_SESSION_REMOVE_FEATURE_BY_TYPE, SOUP_SESSION_REMOVE_FEATURE_BY_TYPE
-
soup_socket_write, soup_socket_write () +
soup_session_request, soup_session_request ()
-
soup_status_get_phrase, soup_status_get_phrase () +
soup_session_request_http, soup_session_request_http ()
-
SOUP_STATUS_IS_CLIENT_ERROR, SOUP_STATUS_IS_CLIENT_ERROR() +
soup_session_request_http_uri, soup_session_request_http_uri ()
-
SOUP_STATUS_IS_INFORMATIONAL, SOUP_STATUS_IS_INFORMATIONAL() +
soup_session_request_uri, soup_session_request_uri ()
-
SOUP_STATUS_IS_REDIRECTION, SOUP_STATUS_IS_REDIRECTION() +
soup_session_requeue_message, soup_session_requeue_message ()
-
SOUP_STATUS_IS_SERVER_ERROR, SOUP_STATUS_IS_SERVER_ERROR() +
soup_session_send, soup_session_send ()
-
SOUP_STATUS_IS_SUCCESSFUL, SOUP_STATUS_IS_SUCCESSFUL() +
soup_session_send_async, soup_session_send_async ()
-
SOUP_STATUS_IS_TRANSPORT_ERROR, SOUP_STATUS_IS_TRANSPORT_ERROR() +
soup_session_send_finish, soup_session_send_finish ()
-
soup_status_proxify, soup_status_proxify () +
soup_session_send_message, soup_session_send_message ()
-
soup_str_case_equal, soup_str_case_equal () +
SOUP_SESSION_SSL_CA_FILE, SOUP_SESSION_SSL_CA_FILE
-
soup_str_case_hash, soup_str_case_hash () +
SOUP_SESSION_SSL_STRICT, SOUP_SESSION_SSL_STRICT
-
soup_tld_domain_is_public_suffix, soup_tld_domain_is_public_suffix () +
SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE
-
SOUP_TLD_ERROR, SOUP_TLD_ERROR +
soup_session_steal_connection, soup_session_steal_connection ()
-
soup_tld_get_base_domain, soup_tld_get_base_domain () +
SOUP_SESSION_TIMEOUT, SOUP_SESSION_TIMEOUT
-
SOUP_TYPE_AUTH_BASIC, SOUP_TYPE_AUTH_BASIC +
SOUP_SESSION_TLS_DATABASE, SOUP_SESSION_TLS_DATABASE
-
SOUP_TYPE_AUTH_DIGEST, SOUP_TYPE_AUTH_DIGEST +
SOUP_SESSION_TLS_INTERACTION, SOUP_SESSION_TLS_INTERACTION
-
SOUP_TYPE_AUTH_MANAGER, SOUP_TYPE_AUTH_MANAGER +
soup_session_unpause_message, soup_session_unpause_message ()
-
SOUP_TYPE_AUTH_NTLM, SOUP_TYPE_AUTH_NTLM +
SOUP_SESSION_USER_AGENT, SOUP_SESSION_USER_AGENT
-
SOUP_TYPE_BYTE_ARRAY, SOUP_TYPE_BYTE_ARRAY +
SOUP_SESSION_USE_THREAD_CONTEXT, SOUP_SESSION_USE_THREAD_CONTEXT
-
soup_uri_copy, soup_uri_copy () +
soup_session_websocket_connect_async, soup_session_websocket_connect_async ()
-
soup_uri_copy_host, soup_uri_copy_host () +
soup_session_websocket_connect_finish, soup_session_websocket_connect_finish ()
-
soup_uri_decode, soup_uri_decode () +
soup_session_would_redirect, soup_session_would_redirect ()
-
soup_uri_encode, soup_uri_encode () +
SOUP_SOCKET_ASYNC_CONTEXT, SOUP_SOCKET_ASYNC_CONTEXT
-
soup_uri_equal, soup_uri_equal () +
soup_socket_connect_async, soup_socket_connect_async ()
-
soup_uri_free, soup_uri_free () +
soup_socket_connect_sync, soup_socket_connect_sync ()
-
soup_uri_get_fragment, soup_uri_get_fragment () +
soup_socket_disconnect, soup_socket_disconnect ()
-
soup_uri_get_host, soup_uri_get_host () +
SOUP_SOCKET_FLAG_NONBLOCKING, SOUP_SOCKET_FLAG_NONBLOCKING
-
soup_uri_get_password, soup_uri_get_password () +
soup_socket_get_fd, soup_socket_get_fd ()
-
soup_uri_get_path, soup_uri_get_path () +
soup_socket_get_local_address, soup_socket_get_local_address ()
-
soup_uri_get_port, soup_uri_get_port () +
soup_socket_get_remote_address, soup_socket_get_remote_address ()
-
soup_uri_get_query, soup_uri_get_query () +
soup_socket_is_connected, soup_socket_is_connected ()
-
soup_uri_get_scheme, soup_uri_get_scheme () +
SOUP_SOCKET_IS_SERVER, SOUP_SOCKET_IS_SERVER
-
soup_uri_get_user, soup_uri_get_user () +
soup_socket_is_ssl, soup_socket_is_ssl ()
-
soup_uri_host_equal, soup_uri_host_equal () +
soup_socket_listen, soup_socket_listen ()
-
soup_uri_host_hash, soup_uri_host_hash () +
SOUP_SOCKET_LOCAL_ADDRESS, SOUP_SOCKET_LOCAL_ADDRESS
-
SOUP_URI_IS_VALID, SOUP_URI_IS_VALID() +
soup_socket_new, soup_socket_new ()
-
soup_uri_new, soup_uri_new () +
soup_socket_read, soup_socket_read ()
-
soup_uri_new_with_base, soup_uri_new_with_base () +
soup_socket_read_until, soup_socket_read_until ()
-
soup_uri_normalize, soup_uri_normalize () +
SOUP_SOCKET_REMOTE_ADDRESS, SOUP_SOCKET_REMOTE_ADDRESS
-
SOUP_URI_SCHEME_DATA, SOUP_URI_SCHEME_DATA +
SOUP_SOCKET_SSL_CREDENTIALS, SOUP_SOCKET_SSL_CREDENTIALS
-
SOUP_URI_SCHEME_FILE, SOUP_URI_SCHEME_FILE +
SOUP_SOCKET_SSL_FALLBACK, SOUP_SOCKET_SSL_FALLBACK
-
SOUP_URI_SCHEME_FTP, SOUP_URI_SCHEME_FTP +
SOUP_SOCKET_SSL_STRICT, SOUP_SOCKET_SSL_STRICT
-
SOUP_URI_SCHEME_HTTP, SOUP_URI_SCHEME_HTTP +
soup_socket_start_proxy_ssl, soup_socket_start_proxy_ssl ()
-
SOUP_URI_SCHEME_HTTPS, SOUP_URI_SCHEME_HTTPS +
soup_socket_start_ssl, soup_socket_start_ssl ()
-
SOUP_URI_SCHEME_RESOURCE, SOUP_URI_SCHEME_RESOURCE +
SOUP_SOCKET_TIMEOUT, SOUP_SOCKET_TIMEOUT
-
soup_uri_set_fragment, soup_uri_set_fragment () +
SOUP_SOCKET_TLS_CERTIFICATE, SOUP_SOCKET_TLS_CERTIFICATE
-
soup_uri_set_host, soup_uri_set_host () +
SOUP_SOCKET_TLS_ERRORS, SOUP_SOCKET_TLS_ERRORS
-
soup_uri_set_password, soup_uri_set_password () +
SOUP_SOCKET_TRUSTED_CERTIFICATE, SOUP_SOCKET_TRUSTED_CERTIFICATE
-
soup_uri_set_path, soup_uri_set_path () +
SOUP_SOCKET_USE_THREAD_CONTEXT, SOUP_SOCKET_USE_THREAD_CONTEXT
-
soup_uri_set_port, soup_uri_set_port () +
soup_socket_write, soup_socket_write ()
-
soup_uri_set_query, soup_uri_set_query () +
soup_status_get_phrase, soup_status_get_phrase ()
-
soup_uri_set_query_from_fields, soup_uri_set_query_from_fields () +
SOUP_STATUS_IS_CLIENT_ERROR, SOUP_STATUS_IS_CLIENT_ERROR()
-
soup_uri_set_query_from_form, soup_uri_set_query_from_form () +
SOUP_STATUS_IS_INFORMATIONAL, SOUP_STATUS_IS_INFORMATIONAL()
-
soup_uri_set_scheme, soup_uri_set_scheme () +
SOUP_STATUS_IS_REDIRECTION, SOUP_STATUS_IS_REDIRECTION()
-
soup_uri_set_user, soup_uri_set_user () +
SOUP_STATUS_IS_SERVER_ERROR, SOUP_STATUS_IS_SERVER_ERROR()
-
soup_uri_to_string, soup_uri_to_string () +
SOUP_STATUS_IS_SUCCESSFUL, SOUP_STATUS_IS_SUCCESSFUL()
-
soup_uri_uses_default_port, soup_uri_uses_default_port () +
SOUP_STATUS_IS_TRANSPORT_ERROR, SOUP_STATUS_IS_TRANSPORT_ERROR()
-
SOUP_URI_VALID_FOR_HTTP, SOUP_URI_VALID_FOR_HTTP() +
soup_status_proxify, soup_status_proxify ()
-
soup_value_array_append, soup_value_array_append () +
soup_str_case_equal, soup_str_case_equal ()
-
soup_value_array_append_vals, soup_value_array_append_vals () +
soup_str_case_hash, soup_str_case_hash ()
-
soup_value_array_from_args, soup_value_array_from_args () +
soup_tld_domain_is_public_suffix, soup_tld_domain_is_public_suffix ()
-
soup_value_array_get_nth, soup_value_array_get_nth () +
SOUP_TLD_ERROR, SOUP_TLD_ERROR
-
soup_value_array_insert, soup_value_array_insert () +
soup_tld_get_base_domain, soup_tld_get_base_domain ()
-
soup_value_array_new, soup_value_array_new () +
SOUP_TYPE_AUTH_BASIC, SOUP_TYPE_AUTH_BASIC
-
soup_value_array_new_with_vals, soup_value_array_new_with_vals () +
SOUP_TYPE_AUTH_DIGEST, SOUP_TYPE_AUTH_DIGEST
-
soup_value_array_to_args, soup_value_array_to_args () +
SOUP_TYPE_AUTH_MANAGER, SOUP_TYPE_AUTH_MANAGER
-
SOUP_VALUE_GETV, SOUP_VALUE_GETV() +
SOUP_TYPE_AUTH_NEGOTIATE, SOUP_TYPE_AUTH_NEGOTIATE
-
soup_value_hash_insert, soup_value_hash_insert () +
SOUP_TYPE_AUTH_NTLM, SOUP_TYPE_AUTH_NTLM
-
soup_value_hash_insert_vals, soup_value_hash_insert_vals () +
soup_uri_copy, soup_uri_copy ()
-
soup_value_hash_insert_value, soup_value_hash_insert_value () +
soup_uri_copy_host, soup_uri_copy_host ()
-
soup_value_hash_lookup, soup_value_hash_lookup () +
soup_uri_decode, soup_uri_decode ()
-
soup_value_hash_lookup_vals, soup_value_hash_lookup_vals () +
soup_uri_encode, soup_uri_encode ()
-
soup_value_hash_new, soup_value_hash_new () +
soup_uri_equal, soup_uri_equal ()
-
soup_value_hash_new_with_vals, soup_value_hash_new_with_vals () +
soup_uri_free, soup_uri_free ()
-
SOUP_VALUE_SETV, SOUP_VALUE_SETV() +
soup_uri_get_fragment, soup_uri_get_fragment ()
-
SOUP_VERSION_2_24, SOUP_VERSION_2_24 +
soup_uri_get_host, soup_uri_get_host ()
-
SOUP_VERSION_2_26, SOUP_VERSION_2_26 +
soup_uri_get_password, soup_uri_get_password ()
-
SOUP_VERSION_2_28, SOUP_VERSION_2_28 +
soup_uri_get_path, soup_uri_get_path ()
-
SOUP_VERSION_2_30, SOUP_VERSION_2_30 +
soup_uri_get_port, soup_uri_get_port ()
-
SOUP_VERSION_2_32, SOUP_VERSION_2_32 +
soup_uri_get_query, soup_uri_get_query ()
-
SOUP_VERSION_2_34, SOUP_VERSION_2_34 +
soup_uri_get_scheme, soup_uri_get_scheme ()
-
SOUP_VERSION_2_36, SOUP_VERSION_2_36 +
soup_uri_get_user, soup_uri_get_user ()
-
SOUP_VERSION_2_38, SOUP_VERSION_2_38 +
soup_uri_host_equal, soup_uri_host_equal ()
-
SOUP_VERSION_2_40, SOUP_VERSION_2_40 +
soup_uri_host_hash, soup_uri_host_hash ()
-
SOUP_VERSION_2_42, SOUP_VERSION_2_42 +
SOUP_URI_IS_VALID, SOUP_URI_IS_VALID()
-
SOUP_VERSION_2_44, SOUP_VERSION_2_44 +
soup_uri_new, soup_uri_new ()
-
SOUP_VERSION_2_46, SOUP_VERSION_2_46 +
soup_uri_new_with_base, soup_uri_new_with_base ()
-
SOUP_VERSION_MAX_ALLOWED, SOUP_VERSION_MAX_ALLOWED +
soup_uri_normalize, soup_uri_normalize ()
-
SOUP_VERSION_MIN_REQUIRED, SOUP_VERSION_MIN_REQUIRED +
SOUP_URI_SCHEME_DATA, SOUP_URI_SCHEME_DATA
-
soup_xmlrpc_build_fault, soup_xmlrpc_build_fault () +
SOUP_URI_SCHEME_FILE, SOUP_URI_SCHEME_FILE
-
soup_xmlrpc_build_method_call, soup_xmlrpc_build_method_call () +
SOUP_URI_SCHEME_FTP, SOUP_URI_SCHEME_FTP
-
soup_xmlrpc_build_method_response, soup_xmlrpc_build_method_response () +
SOUP_URI_SCHEME_HTTP, SOUP_URI_SCHEME_HTTP
-
soup_xmlrpc_extract_method_call, soup_xmlrpc_extract_method_call () +
SOUP_URI_SCHEME_HTTPS, SOUP_URI_SCHEME_HTTPS
-
soup_xmlrpc_extract_method_response, soup_xmlrpc_extract_method_response () +
SOUP_URI_SCHEME_RESOURCE, SOUP_URI_SCHEME_RESOURCE
-
SOUP_XMLRPC_FAULT, SOUP_XMLRPC_FAULT +
SOUP_URI_SCHEME_WS, SOUP_URI_SCHEME_WS
-
soup_xmlrpc_parse_method_call, soup_xmlrpc_parse_method_call () +
SOUP_URI_SCHEME_WSS, SOUP_URI_SCHEME_WSS
-
soup_xmlrpc_parse_method_response, soup_xmlrpc_parse_method_response () +
soup_uri_set_fragment, soup_uri_set_fragment ()
-
soup_xmlrpc_request_new, soup_xmlrpc_request_new () +
soup_uri_set_host, soup_uri_set_host ()
-
soup_xmlrpc_set_fault, soup_xmlrpc_set_fault () +
soup_uri_set_password, soup_uri_set_password ()
-
soup_xmlrpc_set_response, soup_xmlrpc_set_response () +
soup_uri_set_path, soup_uri_set_path () +
+
soup_uri_set_port, soup_uri_set_port () +
+
soup_uri_set_query, soup_uri_set_query () +
+
soup_uri_set_query_from_fields, soup_uri_set_query_from_fields () +
+
soup_uri_set_query_from_form, soup_uri_set_query_from_form () +
+
soup_uri_set_scheme, soup_uri_set_scheme () +
+
soup_uri_set_user, soup_uri_set_user () +
+
soup_uri_to_string, soup_uri_to_string () +
+
soup_uri_uses_default_port, soup_uri_uses_default_port () +
+
SOUP_URI_VALID_FOR_HTTP, SOUP_URI_VALID_FOR_HTTP() +
+
SOUP_VERSION_2_24, SOUP_VERSION_2_24 +
+
SOUP_VERSION_2_26, SOUP_VERSION_2_26 +
+
SOUP_VERSION_2_28, SOUP_VERSION_2_28 +
+
SOUP_VERSION_2_30, SOUP_VERSION_2_30 +
+
SOUP_VERSION_2_32, SOUP_VERSION_2_32 +
+
SOUP_VERSION_2_34, SOUP_VERSION_2_34 +
+
SOUP_VERSION_2_36, SOUP_VERSION_2_36 +
+
SOUP_VERSION_2_38, SOUP_VERSION_2_38 +
+
SOUP_VERSION_2_40, SOUP_VERSION_2_40 +
+
SOUP_VERSION_2_42, SOUP_VERSION_2_42 +
+
SOUP_VERSION_2_44, SOUP_VERSION_2_44 +
+
SOUP_VERSION_2_46, SOUP_VERSION_2_46 +
+
SOUP_VERSION_2_48, SOUP_VERSION_2_48 +
+
SOUP_VERSION_2_50, SOUP_VERSION_2_50 +
+
SOUP_VERSION_2_52, SOUP_VERSION_2_52 +
+
SOUP_VERSION_MAX_ALLOWED, SOUP_VERSION_MAX_ALLOWED +
+
SOUP_VERSION_MIN_REQUIRED, SOUP_VERSION_MIN_REQUIRED +
+
soup_websocket_client_prepare_handshake, soup_websocket_client_prepare_handshake () +
+
soup_websocket_client_verify_handshake, soup_websocket_client_verify_handshake () +
+
soup_websocket_connection_close, soup_websocket_connection_close () +
+
soup_websocket_connection_get_close_code, soup_websocket_connection_get_close_code () +
+
soup_websocket_connection_get_close_data, soup_websocket_connection_get_close_data () +
+
soup_websocket_connection_get_connection_type, soup_websocket_connection_get_connection_type () +
+
soup_websocket_connection_get_io_stream, soup_websocket_connection_get_io_stream () +
+
soup_websocket_connection_get_origin, soup_websocket_connection_get_origin () +
+
soup_websocket_connection_get_protocol, soup_websocket_connection_get_protocol () +
+
soup_websocket_connection_get_state, soup_websocket_connection_get_state () +
+
soup_websocket_connection_get_uri, soup_websocket_connection_get_uri () +
+
soup_websocket_connection_new, soup_websocket_connection_new () +
+
soup_websocket_connection_send_binary, soup_websocket_connection_send_binary () +
+
soup_websocket_connection_send_text, soup_websocket_connection_send_text () +
+
SOUP_WEBSOCKET_ERROR, SOUP_WEBSOCKET_ERROR +
+
soup_websocket_server_check_handshake, soup_websocket_server_check_handshake () +
+
soup_websocket_server_process_handshake, soup_websocket_server_process_handshake () +
+
soup_xmlrpc_build_fault, soup_xmlrpc_build_fault () +
+
soup_xmlrpc_build_request, soup_xmlrpc_build_request () +
+
soup_xmlrpc_build_response, soup_xmlrpc_build_response () +
+
SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR +
+
SOUP_XMLRPC_FAULT, SOUP_XMLRPC_FAULT +
+
soup_xmlrpc_message_new, soup_xmlrpc_message_new () +
+
soup_xmlrpc_message_set_fault, soup_xmlrpc_message_set_fault () +
+
soup_xmlrpc_message_set_response, soup_xmlrpc_message_set_response () +
+
soup_xmlrpc_params_free, soup_xmlrpc_params_free () +
+
soup_xmlrpc_params_parse, soup_xmlrpc_params_parse () +
+
soup_xmlrpc_parse_request, soup_xmlrpc_parse_request () +
+
soup_xmlrpc_parse_response, soup_xmlrpc_parse_response () +
+
soup_xmlrpc_variant_get_datetime, soup_xmlrpc_variant_get_datetime () +
+
soup_xmlrpc_variant_new_datetime, soup_xmlrpc_variant_new_datetime ()
+
Generated by GTK-Doc V1.28.1
\ No newline at end of file diff --git a/docs/reference/html/libsoup-2.4-GValue-Support.html b/docs/reference/html/libsoup-2.4-GValue-Support.html deleted file mode 100644 index 1ca50412..00000000 --- a/docs/reference/html/libsoup-2.4-GValue-Support.html +++ /dev/null @@ -1,885 +0,0 @@ - - - - -libsoup Reference Manual: GValue Support - - - - - - - - - -
- - - - - - -
-
-
- - -
-

GValue Support

-

GValue Support — GValue utilities

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GHashTable * - -soup_value_hash_new () -
-GHashTable * - -soup_value_hash_new_with_vals () -
-void - -soup_value_hash_insert_value () -
-void - -soup_value_hash_insert () -
-void - -soup_value_hash_insert_vals () -
-gboolean - -soup_value_hash_lookup () -
-gboolean - -soup_value_hash_lookup_vals () -
-GValueArray * - -soup_value_array_from_args () -
-gboolean - -soup_value_array_to_args () -
-GValueArray * - -soup_value_array_new () -
-GValueArray * - -soup_value_array_new_with_vals () -
-void - -soup_value_array_insert () -
-void - -soup_value_array_append () -
-void - -soup_value_array_append_vals () -
-gboolean - -soup_value_array_get_nth () -
#define -SOUP_VALUE_SETV() -
#define -SOUP_VALUE_GETV() -
#defineSOUP_TYPE_BYTE_ARRAY
-
-
-

Object Hierarchy

-
-
-
-
-

Includes

-
#include <libsoup/soup.h>
-
-
-
-

Description

-

These methods are useful for manipulating GValues, and in -particular, arrays and hash tables of GValues, in a -slightly nicer way than the standard GValue API.

-

They are written for use with soup-xmlrpc, but they also work with -types not used by XML-RPC.

-
-
-

Functions

-
-

soup_value_hash_new ()

-
GHashTable *
-soup_value_hash_new (void);
-

Creates a GHashTable whose keys are strings and whose values -are GValue.

-
-

Returns

-

a new -empty GHashTable.

-

[element-type utf8 GValue][transfer full]

-
-
-
-
-

soup_value_hash_new_with_vals ()

-
GHashTable *
-soup_value_hash_new_with_vals (const char *first_key,
-                               ...);
-

Creates a GHashTable whose keys are strings and whose values -are GValue, and initializes it with the provided data. As -with soup_value_hash_insert(), the keys and values are copied -rather than being inserted directly.

-
-

Parameters

-
----- - - - - - - - - - - - - -

first_key

the key for the first value

 

...

the type of first_key -, followed by the value, followed -by additional key/type/value triplets, terminated by NULL

 
-
-
-

Returns

-

a new -GHashTable, initialized with the given values.

-

[element-type utf8 GValue][transfer full]

-
-
-
-
-

soup_value_hash_insert_value ()

-
void
-soup_value_hash_insert_value (GHashTable *hash,
-                              const char *key,
-                              GValue *value);
-

Inserts value - into hash -. (Unlike with g_hash_table_insert(), both -the key and the value are copied).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

hash

a value hash.

[element-type utf8 GValue]

key

the key

 

value

a value

 
-
-
-
-
-

soup_value_hash_insert ()

-
void
-soup_value_hash_insert (GHashTable *hash,
-                        const char *key,
-                        GType type,
-                        ...);
-

Inserts the provided value of type type - into hash -. (Unlike with -g_hash_table_insert(), both the key and the value are copied).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

hash

a value hash.

[element-type utf8 GValue]

key

the key

 

type

a GType

 

...

a value of type type -

 
-
-
-
-
-

soup_value_hash_insert_vals ()

-
void
-soup_value_hash_insert_vals (GHashTable *hash,
-                             const char *first_key,
-                             ...);
-

Inserts the given data into hash -. As with -soup_value_hash_insert(), the keys and values are copied rather -than being inserted directly.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

hash

a value hash.

[element-type utf8 GValue]

first_key

the key for the first value

 

...

the type of first_key -, followed by the value, followed -by additional key/type/value triplets, terminated by NULL

 
-
-
-
-
-

soup_value_hash_lookup ()

-
gboolean
-soup_value_hash_lookup (GHashTable *hash,
-                        const char *key,
-                        GType type,
-                        ...);
-

Looks up key - in hash - and stores its value into the provided -location.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

hash

a value hash.

[element-type utf8 GValue]

key

the key to look up

 

type

a GType

 

...

a value of type pointer-to-type -

 
-
-
-

Returns

-

TRUE if hash -contained a value with key key -and -type type -, FALSE if not.

-

-
-
-
-
-

soup_value_hash_lookup_vals ()

-
gboolean
-soup_value_hash_lookup_vals (GHashTable *hash,
-                             const char *first_key,
-                             ...);
-

Looks up a number of keys in hash - and returns their values.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

hash

a value hash.

[element-type utf8 GValue]

first_key

the first key to look up

 

...

the type of first_key -, a pointer to that type, and -then additional key/type/pointer triplets, terminated -by NULL.

 
-
-
-

Returns

-

TRUE if all of the keys were found, FALSE -if any were missing; note that you will generally need to -initialize each destination variable to a reasonable default -value, since there is no way to tell which keys were found -and which were not.

-

-
-
-
-
-

soup_value_array_from_args ()

-
GValueArray *
-soup_value_array_from_args (va_list args);
-

Creates a GValueArray from the provided arguments, which must -consist of pairs of a GType and a value of that type, terminated -by G_TYPE_INVALID. (The array will contain copies of the provided -data rather than pointing to the passed-in data directly.)

-
-

Parameters

-
----- - - - - - -

args

arguments to create a GValueArray from

 
-
-
-

Returns

-

a new GValueArray, or NULL if an error occurred.

-

-
-
-
-
-

soup_value_array_to_args ()

-
gboolean
-soup_value_array_to_args (GValueArray *array,
-                          va_list args);
-

Extracts a GValueArray into the provided arguments, which must -consist of pairs of a GType and a value of pointer-to-that-type, -terminated by G_TYPE_INVALID. The returned values will point to the -same memory as the values in the array.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GValueArray

 

args

arguments to extract array -into

 
-
-
-

Returns

-

success or failure

-

-
-
-
-
-

soup_value_array_new ()

-
GValueArray *
-soup_value_array_new (void);
-

Creates a new GValueArray. (This is just a wrapper around -g_value_array_new(), for naming consistency purposes.)

-
-

Returns

-

a new GValueArray

-

-
-
-
-
-

soup_value_array_new_with_vals ()

-
GValueArray *
-soup_value_array_new_with_vals (GType first_type,
-                                ...);
-

Creates a new GValueArray and copies the provided values -into it.

-
-

Parameters

-
----- - - - - - - - - - - - - -

first_type

the type of the first value to add

 

...

the first value to add, followed by other type/value -pairs, terminated by G_TYPE_INVALID

 
-
-
-

Returns

-

a new GValueArray

-

-
-
-
-
-

soup_value_array_insert ()

-
void
-soup_value_array_insert (GValueArray *array,
-                         guint index_,
-                         GType type,
-                         ...);
-

Inserts the provided value of type type - into array - as with -g_value_array_insert(). (The provided data is copied rather than -being inserted directly.)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

array

a GValueArray

 

index_

the index to insert at

 

type

a GType

 

...

a value of type type -

 
-
-
-
-
-

soup_value_array_append ()

-
void
-soup_value_array_append (GValueArray *array,
-                         GType type,
-                         ...);
-

Appends the provided value of type type - to array - as with -g_value_array_append(). (The provided data is copied rather than -being inserted directly.)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

array

a GValueArray

 

type

a GType

 

...

a value of type type -

 
-
-
-
-
-

soup_value_array_append_vals ()

-
void
-soup_value_array_append_vals (GValueArray *array,
-                              GType first_type,
-                              ...);
-

Appends the provided values into array - as with -g_value_array_append(). (The provided data is copied rather than -being inserted directly.)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

array

a GValueArray

 

first_type

the type of the first value to add

 

...

the first value to add, followed by other type/value -pairs, terminated by G_TYPE_INVALID

 
-
-
-
-
-

soup_value_array_get_nth ()

-
gboolean
-soup_value_array_get_nth (GValueArray *array,
-                          guint index_,
-                          GType type,
-                          ...);
-

Gets the index_ - element of array - and stores its value into the -provided location.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

array

a GValueArray

 

index_

the index to look up

 

type

a GType

 

...

a value of type pointer-to-type -

 
-
-
-

Returns

-

TRUE if array -contained a value with index index_ -and type type -, FALSE if not.

-

-
-
-
-
-

SOUP_VALUE_SETV()

-
#define             SOUP_VALUE_SETV(val, type, args)
-

Copies an argument of type type - from args - into val -. val - will -point directly to the value in args - rather than copying it, so you -must g_value_copy() it if you want it to remain valid.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

val

a GValue

 

type

a GType

 

args

va_list pointing to a value of type type -

 
-
-
-
-
-

SOUP_VALUE_GETV()

-
#define             SOUP_VALUE_GETV(val, type, args)
-

Extracts a value of type type - from val - into args -. The return -value will point to the same data as val - rather than being a copy -of it.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

val

a GValue

 

type

a GType

 

args

va_list pointing to a value of type pointer-to-type -

 
-
-
-
-
-

SOUP_TYPE_BYTE_ARRAY

-
#define SOUP_TYPE_BYTE_ARRAY (soup_byte_array_get_type ())
-
-

glib did not used to define a GType for GByteArray, so libsoup -defines this one itself.

-
-
-
-

Types and Values

-
-
- - - \ No newline at end of file diff --git a/docs/reference/html/libsoup-2.4-HTML-Form-Support.html b/docs/reference/html/libsoup-2.4-HTML-Form-Support.html index 1574d1fb..e823d17e 100644 --- a/docs/reference/html/libsoup-2.4-HTML-Form-Support.html +++ b/docs/reference/html/libsoup-2.4-HTML-Form-Support.html @@ -2,21 +2,20 @@ -libsoup Reference Manual: HTML Form Support - +HTML Form Support: libsoup Reference Manual + - + - + @@ -34,7 +33,7 @@

Functions

-
+
@@ -42,7 +41,7 @@ - +
-GHashTable * +GHashTable * soup_form_decode () @@ -50,7 +49,7 @@
-GHashTable * +GHashTable * soup_form_decode_multipart () @@ -125,7 +124,7 @@

Types and Values

-
+
@@ -143,11 +142,6 @@
-

Object Hierarchy

-
-
-
-

Includes

#include <libsoup/soup.h>
 
@@ -162,14 +156,14 @@ HTML 4.01 specification.

Functions

soup_form_decode ()

-
GHashTable *
+
GHashTable *
 soup_form_decode (const char *encoded_form);

Decodes form , which is an urlencoded dataset as defined in the HTML 4.01 spec.

-

Parameters

-
+

Parameters

+
@@ -183,18 +177,18 @@ HTML 4.01 spec.

-

Returns

-

a hash +

Returns

+

a hash table containing the name/value pairs from encoded_form , which you -can free with g_hash_table_destroy().

-

[element-type utf8 utf8][transfer full]

+can free with g_hash_table_destroy().

+

[element-type utf8 utf8][transfer container]


soup_form_decode_multipart ()

-
GHashTable *
+
GHashTable *
 soup_form_decode_multipart (SoupMessage *msg,
                             const char *file_control_name,
                             char **filename,
@@ -213,21 +207,21 @@ into filename
 , and file
 . All of the other form
 control data will be returned (as strings, as with
-soup_form_decode()) in the returned GHashTable.

-

You may pass NULL for filename +soup_form_decode()) in the returned GHashTable.

+

You may pass NULL for filename , content_type and/or file if you do not care about those fields. soup_form_decode_multipart() may also -return NULL in those fields if the client did not provide that +return NULL in those fields if the client did not provide that information. You must free the returned filename and content-type -with g_free(), and the returned file data with soup_buffer_free().

+with g_free(), and the returned file data with soup_buffer_free().

If you have a form with more than one file upload control, you will need to decode it manually, using soup_multipart_new_from_message() and soup_multipart_get_part().

-

Parameters

-
+

Parameters

+
@@ -241,38 +235,37 @@ and

file_control_name

-
- + + - - + + - - + + - - + +

the name of the HTML file upload control, or NULL.

[allow-none]

the name of the HTML file upload control, or NULL.

[allow-none]

filename

return location for the name of the uploaded file, or NULL.

[out][allow-none]

return location for the name of the uploaded file, or NULL.

[out][allow-none]

content_type

return location for the MIME type of the uploaded file, or NULL.

[out][allow-none]

return location for the MIME type of the uploaded file, or NULL.

[out][allow-none]

file

return location for the uploaded file data, or NULL.

[out][allow-none]

return location for the uploaded file data, or NULL.

[out][allow-none]
-

Returns

-

a hash -table containing the name/value pairs (other than +

Returns

+

a hash table containing the name/value pairs (other than file_control_name ) from msg , which you can free with -g_hash_table_destroy(). On error, it will return NULL.

-

[element-type utf8 utf8][transfer full]

+g_hash_table_destroy(). On error, it will return NULL.

+

[nullable][element-type utf8 utf8][transfer container]

-

Since 2.26

+

Since: 2.26


@@ -288,8 +281,8 @@ at the very least, the total number of fields) at compile time; for working with dynamic forms, use soup_form_encode_hash() or soup_form_encode_datalist().

-

Parameters

-
+

Parameters

+
@@ -305,31 +298,30 @@ working with dynamic forms, use

...

+and values, terminated by NULL.

value of first_field , followed by additional field names -and values, terminated by NULL.

 
-

Returns

+

Returns

the encoded form

-


soup_form_encode_datalist ()

char *
-soup_form_encode_datalist (GData **form_data_set);
+soup_form_encode_datalist (GData **form_data_set);

Encodes form_data_set into a value of type "application/x-www-form-urlencoded", as defined in the HTML 4.01 spec. Unlike soup_form_encode_hash(), this preserves the ordering of the form elements, which may be required in some situations.

-

Parameters

-
+

Parameters

+
@@ -343,16 +335,15 @@ of the form elements, which may be required in some situations.

-

Returns

+

Returns

the encoded form

-


soup_form_encode_hash ()

char *
-soup_form_encode_hash (GHashTable *form_data_set);
+soup_form_encode_hash (GHashTable *form_data_set);

Encodes form_data_set into a value of type "application/x-www-form-urlencoded", as defined in the HTML 4.01 @@ -362,8 +353,8 @@ listed in the order they appear in the document." Since this method takes a hash table, it cannot enforce that; if you care about the ordering of the form fields, use soup_form_encode_datalist().

-

Parameters

-
+

Parameters

+
@@ -371,16 +362,15 @@ ordering of the form fields, use

form_data_set

-

a hash table containing +

a hash table containing name/value pairs (as strings).

[element-type utf8 utf8]
-

Returns

+

Returns

the encoded form

-


@@ -393,8 +383,8 @@ soup_form_encode_valist (const ch various other methods such as soup_uri_set_query_from_fields() and soup_form_request_new().

-

Parameters

-
+

Parameters

+
@@ -415,9 +405,8 @@ various other methods such as -

Returns

+

Returns

the encoded form

-


@@ -438,8 +427,8 @@ the form data into uri is "POST", it will encode it into the SoupMessage's request_body.)

-

Parameters

-
+

Parameters

+
@@ -465,15 +454,15 @@ will encode it into the

...

+and values, terminated by NULL.

value of first_field , followed by additional field names -and values, terminated by NULL.

 
-

Returns

-

the new SoupMessage.

+

Returns

+

the new SoupMessage.

[transfer full]

@@ -483,15 +472,15 @@ and values, terminated by SoupMessage * soup_form_request_new_from_datalist (const char *method, const char *uri, - GData **form_data_set); + GData **form_data_set);

Creates a new SoupMessage and sets it up to send form_data_set to uri via method , as with soup_form_request_new().

-

Parameters

-
+

Parameters

+
@@ -518,8 +507,8 @@ soup_form_request_new_from_datalist (const
-

Returns

-

the new SoupMessage.

+

Returns

+

the new SoupMessage.

[transfer full]

@@ -529,15 +518,15 @@ soup_form_request_new_from_datalist (const SoupMessage * soup_form_request_new_from_hash (const char *method, const char *uri, - GHashTable *form_data_set); + GHashTable *form_data_set);

Creates a new SoupMessage and sets it up to send form_data_set to uri via method , as with soup_form_request_new().

-

Parameters

-
+

Parameters

+
@@ -556,7 +545,7 @@ soup_form_request_new_from_hash (const

form_data_set

-
@@ -564,8 +553,8 @@ soup_form_request_new_from_hash (const -

Returns

-

the new SoupMessage.

+

Returns

+

the new SoupMessage.

[transfer full]

@@ -589,8 +578,8 @@ control over the part headers.) Finally, call soup_form_request_new_from_multipart() to serialize the multipart structure and create a SoupMessage.

-

Parameters

-

the data to send to uri +

the data to send to uri .

[element-type utf8 utf8]
+

Parameters

+
@@ -611,11 +600,11 @@ structure and create a -

Returns

-

the new SoupMessage.

+

Returns

+

the new SoupMessage.

[transfer full]

-

Since 2.26

+

Since: 2.26


@@ -637,7 +626,7 @@ posting form data that contains files to be uploaded.

A macro containing the value "application/x-www-form-urlencoded"; the default MIME type for POSTing HTML form data.

-

Since 2.26

+

Since: 2.26

@@ -646,7 +635,6 @@ MIME type for POSTing HTML form data.

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/libsoup-2.4-Soup-Miscellaneous-Utilities.html b/docs/reference/html/libsoup-2.4-Soup-Miscellaneous-Utilities.html index 2693a60a..4b8511c2 100644 --- a/docs/reference/html/libsoup-2.4-Soup-Miscellaneous-Utilities.html +++ b/docs/reference/html/libsoup-2.4-Soup-Miscellaneous-Utilities.html @@ -2,20 +2,20 @@ -libsoup Reference Manual: Soup Miscellaneous Utilities - +Soup Miscellaneous Utilities: libsoup Reference Manual + - + -
+ @@ -34,7 +34,7 @@

Functions

-
+
@@ -98,7 +98,7 @@ - +
-gboolean +gboolean soup_date_is_past () @@ -178,7 +178,7 @@
-guint +guint soup_headers_parse_request () @@ -186,7 +186,7 @@
-gboolean +gboolean soup_headers_parse_response () @@ -194,7 +194,7 @@
-gboolean +gboolean soup_headers_parse_status_line () @@ -202,7 +202,7 @@
-gboolean +gboolean soup_headers_parse () @@ -210,7 +210,7 @@
-GSList * +GSList * soup_header_parse_list () @@ -218,7 +218,7 @@
-GSList * +GSList * soup_header_parse_quality_list () @@ -234,7 +234,7 @@
-gboolean +gboolean soup_header_contains () @@ -242,7 +242,7 @@
-GHashTable * +GHashTable * soup_header_parse_param_list () @@ -250,7 +250,7 @@
-GHashTable * +GHashTable * soup_header_parse_semi_param_list () @@ -282,7 +282,7 @@
-gboolean +gboolean soup_str_case_equal () @@ -290,7 +290,7 @@
-guint +guint soup_str_case_hash () @@ -298,7 +298,7 @@
-GSource * +GSource * soup_add_completion () @@ -306,7 +306,7 @@
-GSource * +GSource * soup_add_idle () @@ -314,7 +314,7 @@
-GSource * +GSource * soup_add_io_watch () @@ -322,7 +322,7 @@
-GSource * +GSource * soup_add_timeout () @@ -333,7 +333,7 @@

Types and Values

-
+
@@ -352,7 +352,7 @@

Object Hierarchy

-
    GBoxed
+
    GBoxed
     ╰── SoupDate
 
@@ -377,8 +377,8 @@ soup_date_new (int yearint second);

Creates a SoupDate representing the indicated time, UTC.

-

Parameters

-
+

Parameters

+
@@ -420,9 +420,8 @@ soup_date_new (int year
-

Returns

+

Returns

a new SoupDate

-


@@ -437,8 +436,8 @@ recognizes all of the "HTTP-date" formats from RFC 2616, all ISO and reasonable approximations thereof. (Eg, it is lenient about whitespace, leading "0"s, etc.)

-

Parameters

-
+

Parameters

+
@@ -452,11 +451,10 @@ whitespace, leading "0"s, etc.)

-

Returns

-

a new SoupDate, or NULL if date_string -could not -be parsed.

-

+

Returns

+

a new SoupDate, or NULL if date_string +could not be parsed.

+

[nullable]


@@ -467,8 +465,8 @@ soup_date_new_from_time_t (time_t

Creates a SoupDate corresponding to when

-

Parameters

-
+

Parameters

+
@@ -482,9 +480,8 @@ soup_date_new_from_time_t (time_t
-

Returns

+

Returns

a new SoupDate

-


@@ -501,8 +498,8 @@ offset_seconds is 0, returns the current time.

would indicate a time not expressible as a

time_t, the return value will be clamped into range.
-

Parameters

-
+

Parameters

+
@@ -516,9 +513,8 @@ offset_seconds is 0, returns the current time.

-

Returns

+

Returns

a new SoupDate

-


@@ -531,8 +527,8 @@ soup_date_to_string (format .

-

Parameters

-
+

Parameters

+
@@ -553,10 +549,9 @@ soup_date_to_string ( -

Returns

+

Returns

date as a string

-


@@ -571,8 +566,8 @@ soup_date_to_time_t (
-

Parameters

-
+

Parameters

+
@@ -586,10 +581,9 @@ expiration dates after "Y2.038k" (2038-01-19T03:14:07Z).)

-

Returns

+

Returns

date as a time_t

-


@@ -597,12 +591,12 @@ as a time_t

soup_date_to_timeval ()

void
 soup_date_to_timeval (SoupDate *date,
-                      GTimeVal *time);
+ GTimeVal *time);

Converts date - to a GTimeVal.

+ to a GTimeVal.

-

Parameters

-
+

Parameters

+
@@ -616,24 +610,24 @@ soup_date_to_timeval (

time

-
+

a GTimeVal structure in which to store the converted time.

a GTimeVal structure in which to store the converted time.

[out]
-

Since 2.24

+

Since: 2.24


soup_date_is_past ()

-
gboolean
+
gboolean
 soup_date_is_past (SoupDate *date);

Determines if date is in the past.

-

Parameters

-
+

Parameters

+
@@ -647,12 +641,11 @@ soup_date_is_past ( -

Returns

-

TRUE if date +

Returns

+

TRUE if date is in the past

-

-

Since 2.24

+

Since: 2.24


@@ -662,8 +655,8 @@ soup_date_get_day (date 's day.

-

Parameters

-
+

Parameters

+
@@ -677,12 +670,11 @@ soup_date_get_day ( -

Returns

+

Returns

date 's day

-

-

Since 2.32

+

Since: 2.32


@@ -692,8 +684,8 @@ soup_date_get_hour (date 's hour.

-

Parameters

-
+

Parameters

+
@@ -707,12 +699,11 @@ soup_date_get_hour ( -

Returns

+

Returns

date 's hour

-

-

Since 2.32

+

Since: 2.32


@@ -722,8 +713,8 @@ soup_date_get_minute (date 's minute.

-

Parameters

-
+

Parameters

+
@@ -737,12 +728,11 @@ soup_date_get_minute ( -

Returns

+

Returns

date 's minute

-

-

Since 2.32

+

Since: 2.32


@@ -752,8 +742,8 @@ soup_date_get_month (date 's month.

-

Parameters

-
+

Parameters

+
@@ -767,12 +757,11 @@ soup_date_get_month ( -

Returns

+

Returns

date 's month

-

-

Since 2.32

+

Since: 2.32


@@ -782,8 +771,8 @@ soup_date_get_offset (date 's offset from UTC.

-

Parameters

-
+

Parameters

+
@@ -797,14 +786,13 @@ soup_date_get_offset ( -

Returns

+

Returns

date 's offset from UTC. If soup_date_get_utc() -returns FALSE but soup_date_get_offset() returns 0, that means the +returns FALSE but soup_date_get_offset() returns 0, that means the date is a "floating" time with no associated offset information.

-

-

Since 2.32

+

Since: 2.32


@@ -814,8 +802,8 @@ soup_date_get_second (date 's second.

-

Parameters

-
+

Parameters

+
@@ -829,12 +817,11 @@ soup_date_get_second ( -

Returns

+

Returns

date 's second

-

-

Since 2.32

+

Since: 2.32


@@ -844,8 +831,8 @@ soup_date_get_utc (date 's UTC flag

-

Parameters

-
+

Parameters

+
@@ -859,12 +846,11 @@ soup_date_get_utc ( -

Returns

-

TRUE if date +

Returns

+

TRUE if date is UTC.

-

-

Since 2.32

+

Since: 2.32


@@ -874,8 +860,8 @@ soup_date_get_year (date 's year.

-

Parameters

-
+

Parameters

+
@@ -889,12 +875,11 @@ soup_date_get_year ( -

Returns

+

Returns

date 's year

-

-

Since 2.32

+

Since: 2.32


@@ -904,8 +889,8 @@ soup_date_free (date .

-

Parameters

-
+

Parameters

+
@@ -918,12 +903,12 @@ soup_date_free (Since 2.24

+

Since: 2.24


soup_headers_parse_request ()

-
guint
+
guint
 soup_headers_parse_request (const char *str,
                             int len,
                             SoupMessageHeaders *req_headers,
@@ -940,8 +925,8 @@ results in req_method
 

Beware that req_headers may be modified even on failure.

-

Parameters

-
+

Parameters

+
@@ -966,41 +951,40 @@ results in req_method - - + - - + - - +

req_method

if non-NULL, will be filled in with the +

if non-NULL, will be filled in with the request method.

[out][allow-none][out][allow-none]

req_path

if non-NULL, will be filled in with the +

if non-NULL, will be filled in with the request path.

[out][allow-none][out][allow-none]

ver

if non-NULL, will be filled in with the HTTP +

if non-NULL, will be filled in with the HTTP version.

[out][allow-none][out][allow-none]
-

Returns

+

Returns

SOUP_STATUS_OK if the headers could be parsed, or an HTTP error to be returned to the client if they could not be.

-


soup_headers_parse_response ()

-
gboolean
+
gboolean
 soup_headers_parse_response (const char *str,
                              int len,
                              SoupMessageHeaders *headers,
                              SoupHTTPVersion *ver,
-                             guint *status_code,
+                             guint *status_code,
                              char **reason_phrase);

Parses the headers of an HTTP response in str and stores the @@ -1012,8 +996,8 @@ results in ver

Beware that headers may be modified even on failure.

-

Parameters

-
+

Parameters

+
@@ -1038,38 +1022,37 @@ results in ver - - + - - + - - +

ver

if non-NULL, will be filled in with the HTTP +

if non-NULL, will be filled in with the HTTP version.

[out][allow-none][out][allow-none]

status_code

if non-NULL, will be filled in with +

if non-NULL, will be filled in with the status code.

[out][allow-none][out][allow-none]

reason_phrase

if non-NULL, will be filled in with +

if non-NULL, will be filled in with the reason phrase.

[out][allow-none][out][allow-none]
-

Returns

+

Returns

success or failure.

-


soup_headers_parse_status_line ()

-
gboolean
+
gboolean
 soup_headers_parse_status_line (const char *status_line,
                                 SoupHTTPVersion *ver,
-                                guint *status_code,
+                                guint *status_code,
                                 char **reason_phrase);

Parses the HTTP Status-Line string in status_line into ver @@ -1080,8 +1063,8 @@ soup_headers_parse_status_line (const

-

Parameters

-
+

Parameters

+
@@ -1095,36 +1078,35 @@ either "\0" or "\r\n".

- - + - - + - - +

ver

if non-NULL, will be filled in with the HTTP +

if non-NULL, will be filled in with the HTTP version.

[out][allow-none][out][allow-none]

status_code

if non-NULL, will be filled in with +

if non-NULL, will be filled in with the status code.

[out][allow-none][out][allow-none]

reason_phrase

if non-NULL, will be filled in with +

if non-NULL, will be filled in with the reason phrase.

[out][allow-none][out][allow-none]
-

Returns

-

TRUE if status_line +

Returns

+

TRUE if status_line was parsed successfully.

-


soup_headers_parse ()

-
gboolean
+
gboolean
 soup_headers_parse (const char *str,
                     int len,
                     SoupMessageHeaders *dest);
@@ -1137,8 +1119,8 @@ on failure.

This is a low-level method; normally you would use soup_headers_parse_request() or soup_headers_parse_response().

-

Parameters

-
+

Parameters

+
@@ -1166,23 +1148,22 @@ but not the trailing blank line)

-

Returns

+

Returns

success or failure

-

-

Since 2.26

+

Since: 2.26


soup_header_parse_list ()

-
GSList *
+
GSList *
 soup_header_parse_list (const char *header);

Parses a header whose content is described by RFC2616 as "something", where "something" does not itself contain commas, except as part of quoted-strings.

-

Parameters

-
+

Parameters

+
@@ -1196,8 +1177,8 @@ except as part of quoted-strings.

-

Returns

-

a GSList of +

Returns

+

a GSList of list elements, as allocated strings.

[transfer full][element-type utf8]

@@ -1205,19 +1186,19 @@ list elements, as allocated strings.


soup_header_parse_quality_list ()

-
GSList *
+
GSList *
 soup_header_parse_quality_list (const char *header,
-                                GSList **unacceptable);
+ GSList **unacceptable);

Parses a header whose content is a list of items with optional "qvalue"s (eg, Accept, Accept-Charset, Accept-Encoding, Accept-Language, TE).

If unacceptable - is not NULL, then on return, it will contain the + is not NULL, then on return, it will contain the items with qvalue 0. Either way, those items will be removed from the main list.

-

Parameters

-
+

Parameters

+
@@ -1231,16 +1212,16 @@ the main list.

- - +

unacceptable

on +

on return, will contain a list of unacceptable values.

[out][allow-none][transfer full][element-type utf8][out][allow-none][transfer full][element-type utf8]
-

Returns

-

a GSList of +

Returns

+

a GSList of acceptable values (as allocated strings), highest-qvalue first.

[transfer full][element-type utf8]

@@ -1249,12 +1230,13 @@ acceptable values (as allocated strings), highest-qvalue first.

soup_header_free_list ()

void
-soup_header_free_list (GSList *list);
+soup_header_free_list (GSList *list);

Frees list .

+

[skip]

-

Parameters

-
+

Parameters

+
@@ -1262,7 +1244,7 @@ soup_header_free_list (

list

-
@@ -1272,7 +1254,7 @@ soup_header_free_list (

soup_header_contains ()

-
gboolean
+
gboolean
 soup_header_contains (const char *header,
                       const char *token);

Parses header @@ -1281,8 +1263,8 @@ soup_header_contains (const char< case-insensitively). Note that this can't be used with lists that have qvalues.

-

Parameters

-

a GSList returned from soup_header_parse_list() or +

a GSList returned from soup_header_parse_list() or soup_header_parse_quality_list()

 
+

Parameters

+
@@ -1304,28 +1286,27 @@ that have qvalues.

-

Returns

+

Returns

whether or not header contains token

-


soup_header_parse_param_list ()

-
GHashTable *
+
GHashTable *
 soup_header_parse_param_list (const char *header);

Parses a header which is a comma-delimited list of something like: token [ "=" ( token | quoted-string ) ].

Tokens that don't have an associated value will still be added to -the resulting hash table, but with a NULL value.

+the resulting hash table, but with a NULL value.

This also handles RFC5987 encoding (which in HTTP is mostly used for giving UTF8-encoded filenames in the Content-Disposition header).

-

Parameters

-
+

Parameters

+
@@ -1339,9 +1320,9 @@ header).

-

Returns

-

a -GHashTable of list elements, which can be freed with +

Returns

+

a +GHashTable of list elements, which can be freed with soup_header_free_param_list().

[element-type utf8 utf8][transfer full]

@@ -1349,18 +1330,18 @@ header).


soup_header_parse_semi_param_list ()

-
GHashTable *
+
GHashTable *
 soup_header_parse_semi_param_list (const char *header);

Parses a header which is a semicolon-delimited list of something like: token [ "=" ( token | quoted-string ) ].

Tokens that don't have an associated value will still be added to -the resulting hash table, but with a NULL value.

+the resulting hash table, but with a NULL value.

This also handles RFC5987 encoding (which in HTTP is mostly used for giving UTF8-encoded filenames in the Content-Disposition header).

-

Parameters

-
+

Parameters

+
@@ -1374,24 +1355,24 @@ header).

-

Returns

-

a -GHashTable of list elements, which can be freed with +

Returns

+

a +GHashTable of list elements, which can be freed with soup_header_free_param_list().

[element-type utf8 utf8][transfer full]

-

Since 2.24

+

Since: 2.24


soup_header_free_param_list ()

void
-soup_header_free_param_list (GHashTable *param_list);
+soup_header_free_param_list (GHashTable *param_list);

Frees param_list .

-

Parameters

-
+

Parameters

+
@@ -1399,7 +1380,7 @@ soup_header_free_param_list (

param_list

-
@@ -1410,7 +1391,7 @@ or

soup_header_g_string_append_param ()

void
-soup_header_g_string_append_param (GString *string,
+soup_header_g_string_append_param (GString *string,
                                    const char *name,
                                    const char *value);

Appends something like name @@ -1428,12 +1409,12 @@ to work anywhere in HTTP that uses this style of parameter, in reality, it can only be used portably with the Content-Disposition "filename" parameter.

If value - is NULL, this will just append name + is NULL, this will just append name to string .

-

Parameters

-

a GHashTable returned from soup_header_parse_param_list() +

a GHashTable returned from soup_header_parse_param_list() or soup_header_parse_semi_param_list().

[element-type utf8 utf8]
+

Parameters

+
@@ -1442,7 +1423,7 @@ reality, it can only be used portably with the Content-Disposition - + @@ -1452,20 +1433,20 @@ reality, it can only be used portably with the Content-Disposition - +

string

a GString being used to construct an HTTP header value

a GString being used to construct an HTTP header value

 

value

a parameter value, or NULL

a parameter value, or NULL

 
-

Since 2.26

+

Since: 2.26


soup_header_g_string_append_param_quoted ()

void
 soup_header_g_string_append_param_quoted
-                               (GString *string,
+                               (GString *string,
                                 const char *name,
                                 const char *value);

Appends something like name @@ -1478,8 +1459,8 @@ soup_header_g_string_append_param_quoted is (non-ASCII) UTF-8, this will instead use RFC 5987 encoding, just like soup_header_g_string_append_param().

-

Parameters

-
+

Parameters

+
@@ -1488,7 +1469,7 @@ encoding, just like

string

-
+ @@ -1504,20 +1485,20 @@ encoding, just like Since 2.30

+

Since: 2.30


soup_str_case_equal ()

-
gboolean
-soup_str_case_equal (gconstpointer v1,
-                     gconstpointer v2);
+
gboolean
+soup_str_case_equal (gconstpointer v1,
+                     gconstpointer v2);

Compares v1 and v2 in a case-insensitive manner

-

Parameters

-

a GString being used to construct an HTTP header value

a GString being used to construct an HTTP header value

 
+

Parameters

+
@@ -1538,21 +1519,20 @@ soup_str_case_equal ( -

Returns

-

TRUE if they are equal (modulo case)

-

+

Returns

+

TRUE if they are equal (modulo case)


soup_str_case_hash ()

-
guint
-soup_str_case_hash (gconstpointer key);
+
guint
+soup_str_case_hash (gconstpointer key);

Hashes key in a case-insensitive manner.

-

Parameters

-
+

Parameters

+
@@ -1566,27 +1546,27 @@ soup_str_case_hash ( -

Returns

+

Returns

the hash code.

-


soup_add_completion ()

-
GSource *
-soup_add_completion (GMainContext *async_context,
-                     GSourceFunc function,
-                     gpointer data);
+
GSource *
+soup_add_completion (GMainContext *async_context,
+                     GSourceFunc function,
+                     gpointer data);

Adds function to be executed from inside async_context with the default priority. Use this when you want to complete an action in async_context 's main loop, as soon as possible.

+

[skip]

-

Parameters

-
+

Parameters

+
@@ -1595,9 +1575,9 @@ default priority. Use this when you want to complete an action in - - + + @@ -1614,30 +1594,30 @@ watch in, or -

Returns

-

a GSource, which can be removed from async_context -with g_source_destroy().

-

+

Returns

+

a GSource, which can be removed from async_context +with g_source_destroy().

-

Since 2.24

+

Since: 2.24


soup_add_idle ()

-
GSource *
-soup_add_idle (GMainContext *async_context,
-               GSourceFunc function,
-               gpointer data);
-

Adds an idle event as with g_idle_add(), but using the given +

GSource *
+soup_add_idle (GMainContext *async_context,
+               GSourceFunc function,
+               gpointer data);
+

Adds an idle event as with g_idle_add(), but using the given async_context .

If you want function to run "right away", use soup_add_completion(), since that sets a higher priority on the -GSource than soup_add_idle() does.

+GSource than soup_add_idle() does.

+

[skip]

-

Parameters

-

async_context

the GMainContext to dispatch the I/O -watch in, or NULL for the default context.

[allow-none]

the GMainContext to dispatch the I/O +watch in, or NULL for the default context.

[allow-none]

function

+

Parameters

+
@@ -1646,9 +1626,9 @@ soup_add_idle (

async_context

-
- + + @@ -1665,27 +1645,27 @@ watch in, or -

Returns

-

a GSource, which can be removed from async_context -with g_source_destroy().

-

+

Returns

+

a GSource, which can be removed from async_context +with g_source_destroy().


soup_add_io_watch ()

-
GSource *
-soup_add_io_watch (GMainContext *async_context,
-                   GIOChannel *chan,
-                   GIOCondition condition,
-                   GIOFunc function,
-                   gpointer data);
-

Adds an I/O watch as with g_io_add_watch(), but using the given +

GSource *
+soup_add_io_watch (GMainContext *async_context,
+                   GIOChannel *chan,
+                   GIOCondition condition,
+                   GIOFunc function,
+                   gpointer data);
+

Adds an I/O watch as with g_io_add_watch(), but using the given async_context .

+

[skip]

-

Parameters

-

the GMainContext to dispatch the I/O -watch in, or NULL for the default context.

[allow-none]

the GMainContext to dispatch the I/O +watch in, or NULL for the default context.

[allow-none]

function

+

Parameters

+
@@ -1694,13 +1674,13 @@ soup_add_io_watch (

async_context

-
- + + - + @@ -1724,26 +1704,26 @@ occurs

the GMainContext to dispatch the I/O -watch in, or NULL for the default context.

[allow-none]

the GMainContext to dispatch the I/O +watch in, or NULL for the default context.

[allow-none]

chan

the GIOChannel to watch

the GIOChannel to watch

 
-

Returns

-

a GSource, which can be removed from async_context -with g_source_destroy().

-

+

Returns

+

a GSource, which can be removed from async_context +with g_source_destroy().


soup_add_timeout ()

-
GSource *
-soup_add_timeout (GMainContext *async_context,
-                  guint interval,
-                  GSourceFunc function,
-                  gpointer data);
-

Adds a timeout as with g_timeout_add(), but using the given +

GSource *
+soup_add_timeout (GMainContext *async_context,
+                  guint interval,
+                  GSourceFunc function,
+                  gpointer data);
+

Adds a timeout as with g_timeout_add(), but using the given async_context .

+

[skip]

-

Parameters

-
+

Parameters

+
@@ -1752,9 +1732,9 @@ soup_add_timeout (

async_context

-
- + + @@ -1776,10 +1756,9 @@ watch in, or -

Returns

-

a GSource, which can be removed from async_context -with g_source_destroy().

-

+

Returns

+

a GSource, which can be removed from async_context +with g_source_destroy().

@@ -1802,19 +1781,19 @@ with utc
- is TRUE. Otherwise, + is TRUE. Otherwise, the time is a local time, and offset gives the offset from UTC in minutes (such that adding offset to the time would give the correct UTC time). If utc - is FALSE and offset + is FALSE and offset is 0, then the SoupDate represents a "floating" time with no associated timezone information.

-

Members

-

the GMainContext to dispatch the I/O -watch in, or NULL for the default context.

[allow-none]

the GMainContext to dispatch the I/O +watch in, or NULL for the default context.

[allow-none]

interval

+

Members

+
@@ -1852,8 +1831,8 @@ information.

- - + + @@ -1880,8 +1859,8 @@ variants use the local time, appending the offset information if available.

This enum may be extended with more values in future releases.

-

Members

-
 

gboolean utc;

TRUE if the date is in UTC

gboolean utc;

TRUE if the date is in UTC

 
+

Members

+
@@ -1950,7 +1929,6 @@ Eg, "19941106T09:49:37".

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/libsoup-2.4-SoupServer-deprecated-API.html b/docs/reference/html/libsoup-2.4-SoupServer-deprecated-API.html new file mode 100644 index 00000000..c0f4c35a --- /dev/null +++ b/docs/reference/html/libsoup-2.4-SoupServer-deprecated-API.html @@ -0,0 +1,515 @@ + + + + +SoupServer deprecated API: libsoup Reference Manual + + + + + + + + + +
+ + + + + + +
+
+
+ + +
+

SoupServer deprecated API

+

SoupServer deprecated API

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+guint + +soup_server_get_port () +
+SoupSocket * + +soup_server_get_listener () +
+void + +soup_server_run () +
+void + +soup_server_run_async () +
+void + +soup_server_quit () +
+GMainContext * + +soup_server_get_async_context () +
+SoupSocket * + +soup_client_context_get_socket () +
+SoupAddress * + +soup_client_context_get_address () +
+
+
+

Types and Values

+
++++ + + + + + + + + + + + + + + + + + + + + + + +
#defineSOUP_SERVER_PORT
#defineSOUP_SERVER_INTERFACE
#defineSOUP_SERVER_SSL_CERT_FILE
#defineSOUP_SERVER_SSL_KEY_FILE
#defineSOUP_SERVER_ASYNC_CONTEXT
+
+
+

Includes

+
#include <libsoup/soup.h>
+
+
+
+

Description

+
+
+

Functions

+
+

soup_server_get_port ()

+
guint
+soup_server_get_port (SoupServer *server);
+
+

soup_server_get_port is deprecated and should not be used in newly-written code.

+

If you are using soup_server_listen(), etc, then use +soup_server_get_uris() to get a list of all listening addresses.

+
+

Gets the TCP port that server + is listening on, if you are using +the old API.

+
+

Parameters

+
+++++ + + + + + +

server

a SoupServer

 
+
+
+

Returns

+

the port server +is listening on.

+
+
+
+
+

soup_server_get_listener ()

+
SoupSocket *
+soup_server_get_listener (SoupServer *server);
+
+

soup_server_get_listener is deprecated and should not be used in newly-written code.

+

If you are using soup_server_listen(), etc, then use +soup_server_get_listeners() to get a list of all listening sockets, +but note that that function returns GSockets, not SoupSockets.

+
+

Gets server +'s listening socket, if you are using the old API.

+

You should treat this socket as read-only; writing to it or +modifiying it may cause server + to malfunction.

+
+

Parameters

+
+++++ + + + + + +

server

a SoupServer

 
+
+
+

Returns

+

the listening socket.

+

[transfer none]

+
+
+
+
+

soup_server_run ()

+
void
+soup_server_run (SoupServer *server);
+
+

soup_server_run is deprecated and should not be used in newly-written code.

+

When using soup_server_listen(), etc, the server will +always listen for connections, and will process them whenever the +thread-default GMainContext is running.

+
+

Starts server +, if you are using the old API, causing it to listen +for and process incoming connections. Unlike +soup_server_run_async(), this creates a GMainLoop and runs it, and +it will not return until someone calls soup_server_quit() to stop +the server.

+
+

Parameters

+
+++++ + + + + + +

server

a SoupServer

 
+
+
+
+
+

soup_server_run_async ()

+
void
+soup_server_run_async (SoupServer *server);
+
+

soup_server_run_async is deprecated and should not be used in newly-written code.

+

When using soup_server_listen(), etc, the server will +always listen for connections, and will process them whenever the +thread-default GMainContext is running.

+
+

Starts server +, if you are using the old API, causing it to listen +for and process incoming connections.

+

The server runs in server +'s GMainContext. It will not actually +perform any processing unless the appropriate main loop is running. +In the simple case where you did not set the server's +SOUP_SERVER_ASYNC_CONTEXT property, this means the server will run +whenever the glib main loop is running.

+
+

Parameters

+
+++++ + + + + + +

server

a SoupServer

 
+
+
+
+
+

soup_server_quit ()

+
void
+soup_server_quit (SoupServer *server);
+
+

soup_server_quit is deprecated and should not be used in newly-written code.

+

When using soup_server_listen(), etc, the server will +always listen for connections, and will process them whenever the +thread-default GMainContext is running.

+
+

Stops processing for server +, if you are using the old API. Call +this to clean up after soup_server_run_async(), or to terminate a +call to soup_server_run().

+

Note that messages currently in progress will continue to be +handled, if the main loop associated with the server is resumed or +kept running.

+

server + is still in a working state after this call; you can start +and stop a server as many times as you want.

+
+

Parameters

+
+++++ + + + + + +

server

a SoupServer

 
+
+
+
+
+

soup_server_get_async_context ()

+
GMainContext *
+soup_server_get_async_context (SoupServer *server);
+
+

soup_server_get_async_context is deprecated and should not be used in newly-written code.

+

If you are using soup_server_listen(), etc, then +the server listens on the thread-default GMainContext, and this +property is ignored.

+
+

Gets server +'s async_context, if you are using the old API. (With +the new API, the server runs in the thread's thread-default +GMainContext, regardless of what this method returns.)

+

This does not add a ref to the context, so you will need to ref it +yourself if you want it to outlive its server.

+
+

Parameters

+
+++++ + + + + + +

server

a SoupServer

 
+
+
+

Returns

+

server +'s GMainContext, +which may be NULL.

+

[nullable][transfer none]

+
+
+
+
+

soup_client_context_get_socket ()

+
SoupSocket *
+soup_client_context_get_socket (SoupClientContext *client);
+
+

soup_client_context_get_socket is deprecated and should not be used in newly-written code.

+

use soup_client_context_get_gsocket(), which returns +a GSocket.

+
+

Retrieves the SoupSocket that client + is associated with.

+

If you are using this method to observe when multiple requests are +made on the same persistent HTTP connection (eg, as the ntlm-test +test program does), you will need to pay attention to socket +destruction as well (either by using weak references, or by +connecting to the “disconnected” signal), so that you do +not get fooled when the allocator reuses the memory address of a +previously-destroyed socket to represent a new socket.

+
+

Parameters

+
+++++ + + + + + +

client

a SoupClientContext

 
+
+
+

Returns

+

the SoupSocket that client +is +associated with.

+

[transfer none]

+
+
+
+
+

soup_client_context_get_address ()

+
SoupAddress *
+soup_client_context_get_address (SoupClientContext *client);
+
+

soup_client_context_get_address is deprecated and should not be used in newly-written code.

+

Use soup_client_context_get_remote_address(), which returns +a GSocketAddress.

+
+

Retrieves the SoupAddress associated with the remote end +of a connection.

+
+

Parameters

+
+++++ + + + + + +

client

a SoupClientContext

 
+
+
+

Returns

+

the SoupAddress +associated with the remote end of a connection, it may be +NULL if you used soup_server_accept_iostream().

+

[nullable][transfer none]

+
+
+
+
+

Types and Values

+
+

SOUP_SERVER_PORT

+
#define SOUP_SERVER_PORT          "port"
+
+
+

SOUP_SERVER_PORT is deprecated and should not be used in newly-written code.

+

SoupServers can listen on multiple interfaces +at once now. Use soup_server_listen(), etc, to listen on a +port, and soup_server_get_uris() to see what ports are +being listened on.

+
+

Alias for the deprecated “port” property, qv.

+
+
+
+

SOUP_SERVER_INTERFACE

+
#define SOUP_SERVER_INTERFACE     "interface"
+
+
+

SOUP_SERVER_INTERFACE is deprecated and should not be used in newly-written code.

+

SoupServers can listen on multiple interfaces +at once now. Use soup_server_listen(), etc, to listen on an +interface, and soup_server_get_uris() to see what addresses +are being listened on.

+
+

Alias for the “interface” property, qv.

+
+
+
+

SOUP_SERVER_SSL_CERT_FILE

+
#define SOUP_SERVER_SSL_CERT_FILE "ssl-cert-file"
+
+
+

SOUP_SERVER_SSL_CERT_FILE is deprecated and should not be used in newly-written code.

+

use “tls-certificate” or +soup_server_set_ssl_certificate().

+
+

Alias for the “ssl-cert-file” property, qv.

+
+
+
+

SOUP_SERVER_SSL_KEY_FILE

+
#define SOUP_SERVER_SSL_KEY_FILE  "ssl-key-file"
+
+
+

SOUP_SERVER_SSL_KEY_FILE is deprecated and should not be used in newly-written code.

+

use “tls-certificate” or +soup_server_set_ssl_certificate().

+
+

Alias for the “ssl-key-file” property, qv.

+
+
+
+

SOUP_SERVER_ASYNC_CONTEXT

+
#define SOUP_SERVER_ASYNC_CONTEXT "async-context"
+
+
+

SOUP_SERVER_ASYNC_CONTEXT is deprecated and should not be used in newly-written code.

+

The new API uses the thread-default GMainContext +rather than having an explicitly-specified one.

+
+

Alias for the deprecated “async-context” +property, qv.

+
+
+
+ + + \ No newline at end of file diff --git a/docs/reference/html/libsoup-2.4-Top-Level-Domain-utils.html b/docs/reference/html/libsoup-2.4-Top-Level-Domain-utils.html index 2d9cc67d..7f7ff961 100644 --- a/docs/reference/html/libsoup-2.4-Top-Level-Domain-utils.html +++ b/docs/reference/html/libsoup-2.4-Top-Level-Domain-utils.html @@ -2,21 +2,20 @@ -libsoup Reference Manual: Top Level Domain utils - +Top Level Domain utils: libsoup Reference Manual + - + - + @@ -34,7 +33,7 @@

Functions

-
+
@@ -49,7 +48,7 @@
-gboolean +gboolean soup_tld_domain_is_public_suffix () @@ -60,7 +59,7 @@

Types and Values

-
+
@@ -78,11 +77,6 @@
-

Object Hierarchy

-
-
-
-

Includes

#include <libsoup/soup.h>
 
@@ -99,13 +93,13 @@ simply a "public suffix" such as ".com".

soup_tld_get_base_domain ()

const char *
 soup_tld_get_base_domain (const char *hostname,
-                          GError **error);
+ GError **error);

Finds the base domain for a given hostname . The base domain is composed by the top level domain (such as .org, .com, .co.uk, etc) plus the second level domain, for example for myhost.mydomain.com it will return mydomain.com.

-

Note that NULL will be returned for private URLs (those not ending +

Note that NULL will be returned for private URLs (those not ending with any well known TLD) because choosing a base domain for them would be totally arbitrary.

Prior to libsoup 2.46, this function required that hostname @@ -114,8 +108,8 @@ UTF-8 if it was an IDN. From 2.46 on, the name can be in either UTF-8 or ASCII format (and the return value will be in the same format).

-

Parameters

-
+

Parameters

+
@@ -129,7 +123,7 @@ format).

- @@ -137,19 +131,18 @@ errors. See -

Returns

+

Returns

a pointer to the start of the base domain in hostname . If -an error occurs, NULL will be returned and error +an error occurs, NULL will be returned and error set.

-

-

Since 2.40

+

Since: 2.40


soup_tld_domain_is_public_suffix ()

-
gboolean
+
gboolean
 soup_tld_domain_is_public_suffix (const char *domain);

Looks whether the domain passed as argument is a public domain @@ -157,11 +150,10 @@ suffix (.org, .com, .co.uk, etc) or not.

Prior to libsoup 2.46, this function required that domain be in UTF-8 if it was an IDN. From 2.46 on, the name can be in either -UTF-8 or ASCII format (and the return value will be in the same -format).

+UTF-8 or ASCII format.

-

Parameters

-

error

return location for a GError, or NULL to ignore +

return location for a GError, or NULL to ignore errors. See SoupTLDError for the available error codes

 
+

Parameters

+
@@ -175,11 +167,10 @@ format).

-

Returns

-

TRUE if it is a public domain, FALSE otherwise.

-

+

Returns

+

TRUE if it is a public domain, FALSE otherwise.

-

Since 2.40

+

Since: 2.40

@@ -188,16 +179,16 @@ format).

SOUP_TLD_ERROR

#define SOUP_TLD_ERROR soup_tld_error_quark()
 
-

The GError domain for soup-tld-related errors.

-

Since 2.40

+

The GError domain for soup-tld-related errors.

+

Since: 2.40


enum SoupTLDError

Error codes for SOUP_TLD_ERROR.

-

Members

-
+

Members

+
@@ -241,12 +232,11 @@ format).

-

Since 2.40

+

Since: 2.40

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/libsoup-2.4-Version-Information.html b/docs/reference/html/libsoup-2.4-Version-Information.html index bf917497..56d40df1 100644 --- a/docs/reference/html/libsoup-2.4-Version-Information.html +++ b/docs/reference/html/libsoup-2.4-Version-Information.html @@ -2,21 +2,20 @@ -libsoup Reference Manual: Version Information - +Version Information: libsoup Reference Manual + - + - + @@ -34,7 +33,7 @@

Functions

-
+
@@ -42,7 +41,7 @@ - + + +
-guint +guint soup_get_major_version () @@ -50,7 +49,7 @@
-guint +guint soup_get_minor_version () @@ -58,7 +57,7 @@
-guint +guint soup_get_micro_version () @@ -66,7 +65,7 @@
-gboolean +gboolean soup_check_version () @@ -74,21 +73,32 @@
#defineSOUP_MAJOR_VERSION +SOUP_CHECK_VERSION() +
+
+
+

Types and Values

+
++++ + - + - + - + @@ -146,15 +156,22 @@ + + + + + + + + + + + +
#defineSOUP_MINOR_VERSIONSOUP_MAJOR_VERSION
#defineSOUP_MICRO_VERSIONSOUP_MINOR_VERSION
#define -SOUP_CHECK_VERSION() -SOUP_MICRO_VERSION
#define#define SOUP_VERSION_2_46
#defineSOUP_VERSION_2_48
#defineSOUP_VERSION_2_50
#defineSOUP_VERSION_2_52
-

Object Hierarchy

-
-
-
-

Includes

#include <libsoup/soup.h>
 
@@ -166,7 +183,7 @@

Functions

soup_get_major_version ()

-
guint
+
guint
 soup_get_major_version (void);

Returns the major version number of the libsoup library. (e.g. in libsoup version 2.42.0 this is 2.)

@@ -175,16 +192,15 @@ your code is running against. Contrast with the -

Returns

+

Returns

the major version number of the libsoup library

-

-

Since 2.42

+

Since: 2.42


soup_get_minor_version ()

-
guint
+
guint
 soup_get_minor_version (void);

Returns the minor version number of the libsoup library. (e.g. in libsoup version 2.42.0 this is 42.)

@@ -193,16 +209,15 @@ your code is running against. Contrast with the -

Returns

+

Returns

the minor version number of the libsoup library

-

-

Since 2.42

+

Since: 2.42


soup_get_micro_version ()

-
guint
+
guint
 soup_get_micro_version (void);

Returns the micro version number of the libsoup library. (e.g. in libsoup version 2.42.0 this is 0.)

@@ -211,26 +226,25 @@ your code is running against. Contrast with the -

Returns

+

Returns

the micro version number of the libsoup library

-

-

Since 2.42

+

Since: 2.42


soup_check_version ()

-
gboolean
-soup_check_version (guint major,
-                    guint minor,
-                    guint micro);
+
gboolean
+soup_check_version (guint major,
+                    guint minor,
+                    guint micro);

Like SOUP_CHECK_VERSION, but the check for soup_check_version is at runtime instead of compile time. This is useful for compiling against older versions of libsoup, but using features from newer versions.

-

Parameters

-
+

Parameters

+
@@ -256,42 +270,11 @@ versions.

-

Returns

-

TRUE if the version of the libsoup currently loaded +

Returns

+

TRUE if the version of the libsoup currently loaded is the same as or newer than the passed-in version.

-

-
-

Since 2.42

-
-
-
-

SOUP_MAJOR_VERSION

-
#define SOUP_MAJOR_VERSION (2)
-
-

Like soup_get_major_version(), but from the headers used at -application compile time, rather than from the library linked -against at application run time.

-

Since 2.42

-
-
-

SOUP_MINOR_VERSION

-
#define SOUP_MINOR_VERSION (45)
-
-

Like soup_get_minor_version(), but from the headers used at -application compile time, rather than from the library linked -against at application run time.

-

Since 2.42

-
-
-
-

SOUP_MICRO_VERSION

-
#define SOUP_MICRO_VERSION (92)
-
-

Like soup_get_micro_version(), but from the headers used at -application compile time, rather than from the library linked -against at application run time.

-

Since 2.42

+

Since: 2.42


@@ -299,8 +282,8 @@ against at application run time.

#define             SOUP_CHECK_VERSION(major, minor, micro)

Macro to test the version of libsoup being compiled against.

-

Parameters

-
+

Parameters

+
@@ -326,12 +309,43 @@ against at application run time.

-

Returns

-

TRUE if the version of the libsoup header files +

Returns

+

TRUE if the version of the libsoup header files is the same as or newer than the passed-in version.

-

-

Since 2.42

+

Since: 2.42

+
+ +
+

Types and Values

+
+

SOUP_MAJOR_VERSION

+
#define SOUP_MAJOR_VERSION (2)
+
+

Like soup_get_major_version(), but from the headers used at +application compile time, rather than from the library linked +against at application run time.

+

Since: 2.42

+
+
+
+

SOUP_MINOR_VERSION

+
#define SOUP_MINOR_VERSION (61)
+
+

Like soup_get_minor_version(), but from the headers used at +application compile time, rather than from the library linked +against at application run time.

+

Since: 2.42

+
+
+
+

SOUP_MICRO_VERSION

+
#define SOUP_MICRO_VERSION (90)
+
+

Like soup_get_micro_version(), but from the headers used at +application compile time, rather than from the library linked +against at application run time.

+

Since: 2.42


@@ -347,7 +361,7 @@ is required to be able to compile against.

functions, then using functions that were deprecated in version SOUP_VERSION_MIN_REQUIRED or earlier will cause warnings (but using functions deprecated in later releases will not).

-

Since 2.42

+

Since: 2.42


@@ -365,135 +379,161 @@ functions, then using functions added after version

Unless you are using SOUP_CHECK_VERSION() or the like to compile different code depending on the libsoup version, then this should be set to the same value as SOUP_VERSION_MIN_REQUIRED.

-

Since 2.42

+

Since: 2.42


SOUP_VERSION_2_24

-
#define SOUP_VERSION_2_24 (SOUP_ENCODE_VERSION (2, 24))
+
#define SOUP_VERSION_2_24 (G_ENCODE_VERSION (2, 24))
 

A macro that evaluates to the 2.24 version of libsoup, in a format that can be used by SOUP_VERSION_MIN_REQUIRED and SOUP_VERSION_MAX_ALLOWED.

-

Since 2.42

+

Since: 2.42


SOUP_VERSION_2_26

-
#define SOUP_VERSION_2_26 (SOUP_ENCODE_VERSION (2, 26))
+
#define SOUP_VERSION_2_26 (G_ENCODE_VERSION (2, 26))
 

A macro that evaluates to the 2.26 version of libsoup, in a format that can be used by SOUP_VERSION_MIN_REQUIRED and SOUP_VERSION_MAX_ALLOWED.

-

Since 2.42

+

Since: 2.42


SOUP_VERSION_2_28

-
#define SOUP_VERSION_2_28 (SOUP_ENCODE_VERSION (2, 28))
+
#define SOUP_VERSION_2_28 (G_ENCODE_VERSION (2, 28))
 

A macro that evaluates to the 2.28 version of libsoup, in a format that can be used by SOUP_VERSION_MIN_REQUIRED and SOUP_VERSION_MAX_ALLOWED.

-

Since 2.42

+

Since: 2.42


SOUP_VERSION_2_30

-
#define SOUP_VERSION_2_30 (SOUP_ENCODE_VERSION (2, 30))
+
#define SOUP_VERSION_2_30 (G_ENCODE_VERSION (2, 30))
 

A macro that evaluates to the 2.30 version of libsoup, in a format that can be used by SOUP_VERSION_MIN_REQUIRED and SOUP_VERSION_MAX_ALLOWED.

-

Since 2.42

+

Since: 2.42


SOUP_VERSION_2_32

-
#define SOUP_VERSION_2_32 (SOUP_ENCODE_VERSION (2, 32))
+
#define SOUP_VERSION_2_32 (G_ENCODE_VERSION (2, 32))
 

A macro that evaluates to the 2.32 version of libsoup, in a format that can be used by SOUP_VERSION_MIN_REQUIRED and SOUP_VERSION_MAX_ALLOWED.

-

Since 2.42

+

Since: 2.42


SOUP_VERSION_2_34

-
#define SOUP_VERSION_2_34 (SOUP_ENCODE_VERSION (2, 34))
+
#define SOUP_VERSION_2_34 (G_ENCODE_VERSION (2, 34))
 

A macro that evaluates to the 2.34 version of libsoup, in a format that can be used by SOUP_VERSION_MIN_REQUIRED and SOUP_VERSION_MAX_ALLOWED.

-

Since 2.42

+

Since: 2.42


SOUP_VERSION_2_36

-
#define SOUP_VERSION_2_36 (SOUP_ENCODE_VERSION (2, 36))
+
#define SOUP_VERSION_2_36 (G_ENCODE_VERSION (2, 36))
 

A macro that evaluates to the 2.36 version of libsoup, in a format that can be used by SOUP_VERSION_MIN_REQUIRED and SOUP_VERSION_MAX_ALLOWED.

-

Since 2.42

+

Since: 2.42


SOUP_VERSION_2_38

-
#define SOUP_VERSION_2_38 (SOUP_ENCODE_VERSION (2, 38))
+
#define SOUP_VERSION_2_38 (G_ENCODE_VERSION (2, 38))
 

A macro that evaluates to the 2.38 version of libsoup, in a format that can be used by SOUP_VERSION_MIN_REQUIRED and SOUP_VERSION_MAX_ALLOWED.

-

Since 2.42

+

Since: 2.42


SOUP_VERSION_2_40

-
#define SOUP_VERSION_2_40 (SOUP_ENCODE_VERSION (2, 40))
+
#define SOUP_VERSION_2_40 (G_ENCODE_VERSION (2, 40))
 

A macro that evaluates to the 2.40 version of libsoup, in a format that can be used by SOUP_VERSION_MIN_REQUIRED and SOUP_VERSION_MAX_ALLOWED.

-

Since 2.42

+

Since: 2.42


SOUP_VERSION_2_42

-
#define SOUP_VERSION_2_42 (SOUP_ENCODE_VERSION (2, 42))
+
#define SOUP_VERSION_2_42 (G_ENCODE_VERSION (2, 42))
 

A macro that evaluates to the 2.42 version of libsoup, in a format that can be used by SOUP_VERSION_MIN_REQUIRED and SOUP_VERSION_MAX_ALLOWED.

-

Since 2.42

+

Since: 2.42


SOUP_VERSION_2_44

-
#define SOUP_VERSION_2_44 (SOUP_ENCODE_VERSION (2, 44))
+
#define SOUP_VERSION_2_44 (G_ENCODE_VERSION (2, 44))
 

A macro that evaluates to the 2.44 version of libsoup, in a format that can be used by SOUP_VERSION_MIN_REQUIRED and SOUP_VERSION_MAX_ALLOWED.

-

Since 2.44

+

Since: 2.44


SOUP_VERSION_2_46

-
#define SOUP_VERSION_2_46 (SOUP_ENCODE_VERSION (2, 46))
+
#define SOUP_VERSION_2_46 (G_ENCODE_VERSION (2, 46))
 

A macro that evaluates to the 2.46 version of libsoup, in a format that can be used by SOUP_VERSION_MIN_REQUIRED and SOUP_VERSION_MAX_ALLOWED.

-

Since 2.46

+

Since: 2.46

+
+
+

SOUP_VERSION_2_48

+
#define SOUP_VERSION_2_48 (G_ENCODE_VERSION (2, 48))
+
+

A macro that evaluates to the 2.48 version of libsoup, in a format +that can be used by SOUP_VERSION_MIN_REQUIRED and +SOUP_VERSION_MAX_ALLOWED.

+

Since: 2.48

+
+
+
+

SOUP_VERSION_2_50

+
#define SOUP_VERSION_2_50 (G_ENCODE_VERSION (2, 50))
+
+

A macro that evaluates to the 2.50 version of libsoup, in a format +that can be used by SOUP_VERSION_MIN_REQUIRED and +SOUP_VERSION_MAX_ALLOWED.

+

Since: 2.50

+
+
+
+

SOUP_VERSION_2_52

+
#define SOUP_VERSION_2_52 (G_ENCODE_VERSION (2, 52))
+
+

A macro that evaluates to the 2.52 version of libsoup, in a format +that can be used by SOUP_VERSION_MIN_REQUIRED and +SOUP_VERSION_MAX_ALLOWED.

+

Since: 2.52

-
-

Types and Values

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/libsoup-2.4-WebSockets.html b/docs/reference/html/libsoup-2.4-WebSockets.html new file mode 100644 index 00000000..3577cc5f --- /dev/null +++ b/docs/reference/html/libsoup-2.4-WebSockets.html @@ -0,0 +1,1544 @@ + + + + +WebSockets: libsoup Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

WebSockets

+

WebSockets — The WebSocket Protocol

+
+
+

Functions

+ +
+
+

Properties

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SoupWebsocketConnectionTypeconnection-typeRead / Write / Construct Only
+GIOStream *io-streamRead / Write / Construct Only
guintkeepalive-intervalRead / Write / Construct
guint64max-incoming-payload-sizeRead / Write / Construct
+gchar *originRead / Write / Construct Only
+gchar *protocolRead / Write / Construct Only
SoupWebsocketStatestateRead
+SoupURI *uriRead / Write / Construct Only
+
+
+

Signals

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
voidclosedRun First
voidclosingRun Last
voiderrorRun First
voidmessageRun First
voidpongRun First
+
+
+

Types and Values

+ +
+
+

Object Hierarchy

+
    GObject
+    ╰── SoupWebsocketConnection
+
+
+
+

Includes

+
#include <libsoup/soup.h>
+
+
+
+

Description

+

SoupWebsocketConnection provides support for the WebSocket protocol.

+

To connect to a WebSocket server, create a SoupSession and call +soup_session_websocket_connect_async(). To accept WebSocket +connections, create a SoupServer and add a handler to it with +soup_server_add_websocket_handler().

+

(Lower-level support is available via +soup_websocket_client_prepare_handshake() and +soup_websocket_client_verify_handshake(), for handling the client +side of the WebSocket handshake, and +soup_websocket_server_process_handshake() for handling the server +side.)

+

SoupWebsocketConnection handles the details of WebSocket +communication. You can use soup_websocket_connection_send_text() +and soup_websocket_connection_send_binary() to send data, and the +“message” signal to receive data. +(SoupWebsocketConnection currently only supports asynchronous +I/O.)

+
+
+

Functions

+
+

soup_websocket_client_prepare_handshake ()

+
void
+soup_websocket_client_prepare_handshake
+                               (SoupMessage *msg,
+                                const char *origin,
+                                char **protocols);
+

Adds the necessary headers to msg + to request a WebSocket +handshake. The message body and non-WebSocket-related headers are +not modified.

+

This is a low-level function; if you use +soup_session_websocket_connect_async() to create a WebSocket +connection, it will call this for you.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

msg

a SoupMessage

 

origin

the "Origin" header to set.

[allow-none]

protocols

list of +protocols to offer.

[allow-none][array zero-terminated=1]
+
+

Since: 2.50

+
+
+
+

soup_websocket_client_verify_handshake ()

+
gboolean
+soup_websocket_client_verify_handshake
+                               (SoupMessage *msg,
+                                GError **error);
+

Looks at the response status code and headers in msg + and +determines if they contain a valid WebSocket handshake response +(given the handshake request in msg +'s request headers).

+

This is a low-level function; if you use +soup_session_websocket_connect_async() to create a WebSocket +connection, it will call this for you.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

msg

SoupMessage containing both client and server sides of a +WebSocket handshake

 

error

return location for a GError

 
+
+
+

Returns

+

TRUE if msg +contains a completed valid WebSocket +handshake, FALSE and an error if not.

+
+

Since: 2.50

+
+
+
+

soup_websocket_server_check_handshake ()

+
gboolean
+soup_websocket_server_check_handshake (SoupMessage *msg,
+                                       const char *origin,
+                                       char **protocols,
+                                       GError **error);
+

Examines the method and request headers in msg + and determines +whether msg + contains a valid handshake request.

+

If origin + is non-NULL, then only requests containing a matching +"Origin" header will be accepted. If protocols + is non-NULL, then +only requests containing a compatible "Sec-WebSocket-Protocols" +header will be accepted.

+

Normally soup_websocket_server_process_handshake() will take care +of this for you, and if you use soup_server_add_websocket_handler() +to handle accepting WebSocket connections, it will call that for +you. However, this function may be useful if you need to perform +more complicated validation; eg, accepting multiple different Origins, +or handling different protocols depending on the path.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

msg

SoupMessage containing the client side of a WebSocket handshake

 

origin

expected Origin header.

[allow-none]

protocols

allowed WebSocket +protocols.

[allow-none][array zero-terminated=1]

error

return location for a GError

 
+
+
+

Returns

+

TRUE if msg +contained a valid WebSocket handshake, +FALSE and an error if not.

+
+

Since: 2.50

+
+
+
+

soup_websocket_server_process_handshake ()

+
gboolean
+soup_websocket_server_process_handshake
+                               (SoupMessage *msg,
+                                const char *expected_origin,
+                                char **protocols);
+

Examines the method and request headers in msg + and (assuming msg + +contains a valid handshake request), fills in the handshake +response.

+

If expected_origin + is non-NULL, then only requests containing a matching +"Origin" header will be accepted. If protocols + is non-NULL, then +only requests containing a compatible "Sec-WebSocket-Protocols" +header will be accepted.

+

This is a low-level function; if you use +soup_server_add_websocket_handler() to handle accepting WebSocket +connections, it will call this for you.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

msg

SoupMessage containing the client side of a WebSocket handshake

 

expected_origin

expected Origin header.

[allow-none]

protocols

allowed WebSocket +protocols.

[allow-none][array zero-terminated=1]
+
+
+

Returns

+

TRUE if msg +contained a valid WebSocket handshake +request and was updated to contain a handshake response. FALSE if not.

+
+

Since: 2.50

+
+
+
+

soup_websocket_connection_new ()

+
SoupWebsocketConnection *
+soup_websocket_connection_new (GIOStream *stream,
+                               SoupURI *uri,
+                               SoupWebsocketConnectionType type,
+                               const char *origin,
+                               const char *protocol);
+

Creates a SoupWebsocketConnection on stream +. This should be +called after completing the handshake to begin using the WebSocket +protocol.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

stream

a GIOStream connected to the WebSocket server

 

uri

the URI of the connection

 

type

the type of connection (client/side)

 

origin

the Origin of the client.

[allow-none]

protocol

the subprotocol in use.

[allow-none]
+
+
+

Returns

+

a new SoupWebsocketConnection

+
+

Since: 2.50

+
+
+
+

soup_websocket_connection_get_io_stream ()

+
GIOStream *
+soup_websocket_connection_get_io_stream
+                               (SoupWebsocketConnection *self);
+

Get the I/O stream the WebSocket is communicating over.

+
+

Parameters

+
+++++ + + + + + +

self

the WebSocket

 
+
+
+

Returns

+

the WebSocket's I/O stream.

+

[transfer none]

+
+

Since: 2.50

+
+
+
+

soup_websocket_connection_get_connection_type ()

+
SoupWebsocketConnectionType
+soup_websocket_connection_get_connection_type
+                               (SoupWebsocketConnection *self);
+

Get the connection type (client/server) of the connection.

+
+

Parameters

+
+++++ + + + + + +

self

the WebSocket

 
+
+
+

Returns

+

the connection type

+
+

Since: 2.50

+
+
+
+

soup_websocket_connection_get_uri ()

+
SoupURI *
+soup_websocket_connection_get_uri (SoupWebsocketConnection *self);
+

Get the URI of the WebSocket.

+

For servers this represents the address of the WebSocket, and +for clients it is the address connected to.

+
+

Parameters

+
+++++ + + + + + +

self

the WebSocket

 
+
+
+

Returns

+

the URI.

+

[transfer none]

+
+

Since: 2.50

+
+
+
+

soup_websocket_connection_get_origin ()

+
const char *
+soup_websocket_connection_get_origin (SoupWebsocketConnection *self);
+

Get the origin of the WebSocket.

+
+

Parameters

+
+++++ + + + + + +

self

the WebSocket

 
+
+
+

Returns

+

the origin, or NULL.

+

[nullable]

+
+

Since: 2.50

+
+
+
+

soup_websocket_connection_get_protocol ()

+
const char *
+soup_websocket_connection_get_protocol
+                               (SoupWebsocketConnection *self);
+

Get the protocol chosen via negotiation with the peer.

+
+

Parameters

+
+++++ + + + + + +

self

the WebSocket

 
+
+
+

Returns

+

the chosen protocol, or NULL.

+

[nullable]

+
+

Since: 2.50

+
+
+
+

soup_websocket_connection_get_state ()

+
SoupWebsocketState
+soup_websocket_connection_get_state (SoupWebsocketConnection *self);
+

Get the current state of the WebSocket.

+
+

Parameters

+
+++++ + + + + + +

self

the WebSocket

 
+
+
+

Returns

+

the state

+
+

Since: 2.50

+
+
+
+

soup_websocket_connection_send_text ()

+
void
+soup_websocket_connection_send_text (SoupWebsocketConnection *self,
+                                     const char *text);
+

Send a text (UTF-8) message to the peer.

+

The message is queued to be sent and will be sent when the main loop +is run.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

self

the WebSocket

 

text

the message contents

 
+
+

Since: 2.50

+
+
+
+

soup_websocket_connection_send_binary ()

+
void
+soup_websocket_connection_send_binary (SoupWebsocketConnection *self,
+                                       gconstpointer data,
+                                       gsize length);
+

Send a binary message to the peer.

+

The message is queued to be sent and will be sent when the main loop +is run.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

self

the WebSocket

 

data

the message contents.

[array length=length][element-type guint8]

length

the length of data +

 
+
+

Since: 2.50

+
+
+
+

soup_websocket_connection_close ()

+
void
+soup_websocket_connection_close (SoupWebsocketConnection *self,
+                                 gushort code,
+                                 const char *data);
+

Close the connection in an orderly fashion.

+

Note that until the “closed” signal fires, the connection +is not yet completely closed. The close message is not even sent until the +main loop runs.

+

The code + and data + are sent to the peer along with the close request. +Note that the data + must be UTF-8 valid.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

self

the WebSocket

 

code

close code

 

data

close data.

[allow-none]
+
+

Since: 2.50

+
+
+
+

soup_websocket_connection_get_close_code ()

+
gushort
+soup_websocket_connection_get_close_code
+                               (SoupWebsocketConnection *self);
+

Get the close code received from the WebSocket peer.

+

This only becomes valid once the WebSocket is in the +SOUP_WEBSOCKET_STATE_CLOSED state. The value will often be in the +SoupWebsocketCloseCode enumeration, but may also be an application +defined close code.

+
+

Parameters

+
+++++ + + + + + +

self

the WebSocket

 
+
+
+

Returns

+

the close code or zero.

+
+

Since: 2.50

+
+
+
+

soup_websocket_connection_get_close_data ()

+
const char *
+soup_websocket_connection_get_close_data
+                               (SoupWebsocketConnection *self);
+

Get the close data received from the WebSocket peer.

+

This only becomes valid once the WebSocket is in the +SOUP_WEBSOCKET_STATE_CLOSED state. The data may be freed once +the main loop is run, so copy it if you need to keep it around.

+
+

Parameters

+
+++++ + + + + + +

self

the WebSocket

 
+
+
+

Returns

+

the close data or NULL

+
+

Since: 2.50

+
+
+
+

Types and Values

+
+

SoupWebsocketConnection

+
typedef struct _SoupWebsocketConnection SoupWebsocketConnection;
+

A class representing a WebSocket connection.

+

Since: 2.50

+
+
+
+

enum SoupWebsocketConnectionType

+

The type of a SoupWebsocketConnection.

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + +

SOUP_WEBSOCKET_CONNECTION_UNKNOWN

+

unknown/invalid connection

+
 

SOUP_WEBSOCKET_CONNECTION_CLIENT

+

a client-side connection

+
 

SOUP_WEBSOCKET_CONNECTION_SERVER

+

a server-side connection

+
 
+
+

Since: 2.50

+
+
+
+

enum SoupWebsocketState

+

The state of the WebSocket connection.

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + +

SOUP_WEBSOCKET_STATE_OPEN

+

the connection is ready to send messages

+
 

SOUP_WEBSOCKET_STATE_CLOSING

+

the connection is in the process of + closing down; messages may be received, but not sent

+
 

SOUP_WEBSOCKET_STATE_CLOSED

+

the connection is completely closed down

+
 
+
+

Since: 2.50

+
+
+
+

enum SoupWebsocketDataType

+

The type of data contained in a “message” +signal.

+
+

Members

+
+++++ + + + + + + + + + + + + +

SOUP_WEBSOCKET_DATA_TEXT

+

UTF-8 text

+
 

SOUP_WEBSOCKET_DATA_BINARY

+

binary data

+
 
+
+

Since: 2.50

+
+
+
+

enum SoupWebsocketCloseCode

+

Pre-defined close codes that can be passed to +soup_websocket_connection_close() or received from +soup_websocket_connection_get_close_code(). (However, other codes +are also allowed.)

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

SOUP_WEBSOCKET_CLOSE_NORMAL

+

a normal, non-error close

+
 

SOUP_WEBSOCKET_CLOSE_GOING_AWAY

+

the client/server is going away

+
 

SOUP_WEBSOCKET_CLOSE_PROTOCOL_ERROR

+

a protocol error occurred

+
 

SOUP_WEBSOCKET_CLOSE_UNSUPPORTED_DATA

+

the endpoint received data + of a type that it does not support.

+
 

SOUP_WEBSOCKET_CLOSE_NO_STATUS

+

reserved value indicating that + no close code was present; must not be sent.

+
 

SOUP_WEBSOCKET_CLOSE_ABNORMAL

+

reserved value indicating that + the connection was closed abnormally; must not be sent.

+
 

SOUP_WEBSOCKET_CLOSE_BAD_DATA

+

the endpoint received data that + was invalid (eg, non-UTF-8 data in a text message).

+
 

SOUP_WEBSOCKET_CLOSE_POLICY_VIOLATION

+

generic error code + indicating some sort of policy violation.

+
 

SOUP_WEBSOCKET_CLOSE_TOO_BIG

+

the endpoint received a message + that is too big to process.

+
 

SOUP_WEBSOCKET_CLOSE_NO_EXTENSION

+

the client is closing the + connection because the server failed to negotiate a required + extension.

+
 

SOUP_WEBSOCKET_CLOSE_SERVER_ERROR

+

the server is closing the + connection because it was unable to fulfill the request.

+
 

SOUP_WEBSOCKET_CLOSE_TLS_HANDSHAKE

+

reserved value indicating that + the TLS handshake failed; must not be sent.

+
 
+
+

Since: 2.50

+
+
+
+

enum SoupWebsocketError

+

WebSocket-related errors.

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

SOUP_WEBSOCKET_ERROR_FAILED

+

a generic error

+
 

SOUP_WEBSOCKET_ERROR_NOT_WEBSOCKET

+

attempted to handshake with a + server that does not appear to understand WebSockets.

+
 

SOUP_WEBSOCKET_ERROR_BAD_HANDSHAKE

+

the WebSocket handshake failed + because some detail was invalid (eg, incorrect accept key).

+
 

SOUP_WEBSOCKET_ERROR_BAD_ORIGIN

+

the WebSocket handshake failed + because the "Origin" header was not an allowed value.

+
 
+
+

Since: 2.50

+
+
+
+

SOUP_WEBSOCKET_ERROR

+
#define SOUP_WEBSOCKET_ERROR (soup_websocket_error_get_quark ())
+
+

A GError domain for WebSocket-related errors. Used with +SoupWebsocketError.

+

Since: 2.50

+
+
+
+

Property Details

+
+

The “connection-type” property

+
  “connection-type”          SoupWebsocketConnectionType
+

The type of connection (client/server).

+

Flags: Read / Write / Construct Only

+

Default value: SOUP_WEBSOCKET_CONNECTION_UNKNOWN

+

Since: 2.50

+
+
+
+

The “io-stream” property

+
  “io-stream”                GIOStream *
+

The underlying IO stream the WebSocket is communicating +over.

+

The input and output streams must be pollable streams.

+

Flags: Read / Write / Construct Only

+

Since: 2.50

+
+
+
+

The “keepalive-interval” property

+
  “keepalive-interval”       guint
+

Interval in seconds on when to send a ping message which will +serve as a keepalive message. If set to 0 the keepalive message is +disabled.

+

Flags: Read / Write / Construct

+

Default value: 0

+

Since: 2.58

+
+
+
+

The “max-incoming-payload-size” property

+
  “max-incoming-payload-size” guint64
+

The maximum payload size for incoming packets the protocol expects +or 0 to not limit it.

+

Flags: Read / Write / Construct

+

Default value: 131072

+

Since: 2.56

+
+
+
+

The “origin” property

+
  “origin”                   gchar *
+

The client's Origin.

+

Flags: Read / Write / Construct Only

+

Default value: NULL

+

Since: 2.50

+
+
+
+

The “protocol” property

+
  “protocol”                 gchar *
+

The chosen protocol, or NULL if a protocol was not agreed +upon.

+

Flags: Read / Write / Construct Only

+

Default value: NULL

+

Since: 2.50

+
+
+
+

The “state” property

+
  “state”                    SoupWebsocketState
+

The current state of the WebSocket.

+

Flags: Read

+

Default value: SOUP_WEBSOCKET_STATE_OPEN

+

Since: 2.50

+
+
+
+

The “uri” property

+
  “uri”                      SoupURI *
+

The URI of the WebSocket.

+

For servers this represents the address of the WebSocket, +and for clients it is the address connected to.

+

Flags: Read / Write / Construct Only

+

Since: 2.50

+
+
+
+

Signal Details

+
+

The “closed” signal

+
void
+user_function (SoupWebsocketConnection *self,
+               gpointer                 user_data)
+

Emitted when the connection has completely closed, either +due to an orderly close from the peer, one initiated via +soup_websocket_connection_close() or a fatal error +condition that caused a close.

+

This signal will be emitted once.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

self

the WebSocket

 

user_data

user data set when the signal handler was connected.

 
+
+

Flags: Run First

+

Since: 2.50

+
+
+
+

The “closing” signal

+
void
+user_function (SoupWebsocketConnection *self,
+               gpointer                 user_data)
+

This signal will be emitted during an orderly close.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

self

the WebSocket

 

user_data

user data set when the signal handler was connected.

 
+
+

Flags: Run Last

+

Since: 2.50

+
+
+
+

The “error” signal

+
void
+user_function (SoupWebsocketConnection *self,
+               GError                  *error,
+               gpointer                 user_data)
+

Emitted when an error occurred on the WebSocket. This may +be fired multiple times. Fatal errors will be followed by +the “closed” signal being emitted.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

self

the WebSocket

 

error

the error that occured

 

user_data

user data set when the signal handler was connected.

 
+
+

Flags: Run First

+

Since: 2.50

+
+
+
+

The “message” signal

+
void
+user_function (SoupWebsocketConnection *self,
+               gint                     type,
+               GBytes                  *message,
+               gpointer                 user_data)
+

Emitted when we receive a message from the peer.

+

As a convenience, the message + data will always be +NUL-terminated, but the NUL byte will not be included in +the length count.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

self

the WebSocket

 

type

the type of message contents

 

message

the message data

 

user_data

user data set when the signal handler was connected.

 
+
+

Flags: Run First

+

Since: 2.50

+
+
+
+

The “pong” signal

+
void
+user_function (SoupWebsocketConnection *self,
+               GBytes                  *message,
+               gpointer                 user_data)
+

Emitted when we receive a Pong frame (solicited or +unsolicited) from the peer.

+

As a convenience, the message + data will always be +NUL-terminated, but the NUL byte will not be included in +the length count.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

self

the WebSocket

 

message

the application data (if any)

 

user_data

user data set when the signal handler was connected.

 
+
+

Flags: Run First

+

Since: 2.60

+
+
+
+

See Also

+

soup_session_websocket_connect_async(), + soup_server_add_websocket_handler()

+
+
+ + + \ No newline at end of file diff --git a/docs/reference/html/libsoup-2.4-XMLRPC-Support.html b/docs/reference/html/libsoup-2.4-XMLRPC-Support.html index b4265303..52164434 100644 --- a/docs/reference/html/libsoup-2.4-XMLRPC-Support.html +++ b/docs/reference/html/libsoup-2.4-XMLRPC-Support.html @@ -2,26 +2,25 @@ -libsoup Reference Manual: XMLRPC Support - +XMLRPC Support: libsoup Reference Manual + - - + + - + - +
@@ -34,7 +33,7 @@

Functions

-
+
@@ -45,7 +44,7 @@ char * @@ -53,39 +52,55 @@ SoupMessage * + + + + + + + + @@ -93,7 +108,7 @@ char * @@ -106,10 +121,10 @@ @@ -117,7 +132,7 @@ void @@ -125,7 +140,7 @@

Types and Values

-
-soup_xmlrpc_build_method_call () +soup_xmlrpc_build_request ()
-soup_xmlrpc_request_new () +soup_xmlrpc_message_new ()
-gboolean +GVariant * -soup_xmlrpc_parse_method_response () +soup_xmlrpc_parse_response ()
-gboolean +GVariant * -soup_xmlrpc_extract_method_response () +soup_xmlrpc_variant_new_datetime ()
-gboolean +SoupDate * -soup_xmlrpc_parse_method_call () +soup_xmlrpc_variant_get_datetime ()
-gboolean +void + +soup_xmlrpc_params_free () +
+GVariant * + +soup_xmlrpc_params_parse () +
+char * -soup_xmlrpc_extract_method_call () +soup_xmlrpc_parse_request ()
-soup_xmlrpc_build_method_response () +soup_xmlrpc_build_response ()
-void +gboolean -soup_xmlrpc_set_response () +soup_xmlrpc_message_set_response ()
-soup_xmlrpc_set_fault () +soup_xmlrpc_message_set_fault ()
+
@@ -133,21 +148,28 @@ + + + + + + + + + + + +
#defineSOUP_XMLRPC_ERROR
enumSoupXMLRPCError
#define SOUP_XMLRPC_FAULT
enum SoupXMLRPCFault
 SoupXMLRPCParams
-

Object Hierarchy

-
-
-
-

Includes

#include <libsoup/soup.h>
 
@@ -158,34 +180,39 @@

Functions

-

soup_xmlrpc_build_method_call ()

+

soup_xmlrpc_build_request ()

char *
-soup_xmlrpc_build_method_call (const char *method_name,
-                               GValue *params,
-                               int n_params);
+soup_xmlrpc_build_request (const char *method_name, + GVariant *params, + GError **error);

This creates an XML-RPC methodCall and returns it as a string. -This is the low-level method that soup_xmlrpc_request_new() is +This is the low-level method that soup_xmlrpc_message_new() is built on.

params - is an array of GValue representing the parameters to -method -. (It is *not* a GValueArray, although if you have a -GValueArray, you can just pass its valuesf and -n_values fields.)

-

The correspondence between glib types and XML-RPC types is:

-

int: int (G_TYPE_INT) - boolean: gboolean (G_TYPE_BOOLEAN) - string: char* (G_TYPE_STRING) - double: double (G_TYPE_DOUBLE) - datetime.iso8601: SoupDate (SOUP_TYPE_DATE) - base64: GByteArray (SOUP_TYPE_BYTE_ARRAY) - struct: GHashTable (G_TYPE_HASH_TABLE) - array: GValueArray (G_TYPE_VALUE_ARRAY)

-

For structs, use a GHashTable that maps strings to GValue; -soup_value_hash_new() and related methods can help with this.

+ is a GVariant tuple representing the method parameters.

+

Serialization details:

+
    +
  • "a{s*}" and "{s*}" are serialized as <struct>

  • +
  • "ay" is serialized as <base64>

  • +
  • Other arrays and tuples are serialized as <array>

  • +
  • booleans are serialized as <boolean>

  • +
  • byte, int16, uint16 and int32 are serialized as <int>

  • +
  • uint32 and int64 are serialized as the nonstandard <i8> type

  • +
  • doubles are serialized as <double>

  • +
  • Strings are serialized as <string>

  • +
  • Variants (i.e. "v" type) are unwrapped and their child is serialized.

  • +
  • GVariants created by soup_xmlrpc_variant_new_datetime() are serialized as +<dateTime.iso8601>

  • +
  • Other types are not supported and will return NULL and set error +. +This notably includes: object-paths, signatures, uint64, handles, maybes +and dictionaries with non-string keys.

  • +
+

If params + is floating, it is consumed.

-

Parameters

-
+

Parameters

+
@@ -199,40 +226,39 @@ built on.

- - + + - - + +

params

arguments to method -.

[array length=n_params]

a GVariant tuple

 

n_params

length of params -

error

a GError, or NULL

 
-

Returns

-

the text of the methodCall, or NULL on error

-

+

Returns

+

the text of the methodCall, or NULL on error.

+

Since: 2.52


-

soup_xmlrpc_request_new ()

+

soup_xmlrpc_message_new ()

SoupMessage *
-soup_xmlrpc_request_new (const char *uri,
+soup_xmlrpc_message_new (const char *uri,
                          const char *method_name,
-                         ...);
+ GVariant *params, + GError **error);

Creates an XML-RPC methodCall and returns a SoupMessage, ready to send, for that method call.

-

The parameters are passed as type/value pairs; ie, first a GType, -and then a value of the appropriate type, finally terminated by -G_TYPE_INVALID.

+

See soup_xmlrpc_build_request() for serialization details.

+

If params + is floating, it is consumed.

-

Parameters

-
+

Parameters

+
@@ -251,46 +277,49 @@ and then a value of the appropriate type, finally terminated by - - + + + + + + +
 

...

parameters for method -

params

a GVariant tuple

 

error

a GError, or NULL

 
-

Returns

-

a SoupMessage encoding the -indicated XML-RPC request.

+

Returns

+

a SoupMessage encoding the +indicated XML-RPC request, or NULL on error.

[transfer full]

+

Since: 2.52


-

soup_xmlrpc_parse_method_response ()

-
gboolean
-soup_xmlrpc_parse_method_response (const char *method_response,
-                                   int length,
-                                   GValue *value,
-                                   GError **error);
+

soup_xmlrpc_parse_response ()

+
GVariant *
+soup_xmlrpc_parse_response (const char *method_response,
+                            int length,
+                            const char *signature,
+                            GError **error);

Parses method_response - and returns the return value in value -. If + and returns the return value. If method_response - is a fault, value - will be unchanged, and error - -will be set to an error of type SOUP_XMLRPC_FAULT, with the error -code containing the fault code, and the error message containing -the fault string. (If method_response - cannot be parsed at all, -soup_xmlrpc_parse_method_response() will return FALSE, but error + is a fault, NULL is returned, and error -will be unset.)

+will be set to an error in the SOUP_XMLRPC_FAULT domain, with the error +code containing the fault code, and the error message containing +the fault string. If method_response + cannot be parsed, NULL is returned, +and error + will be set to an error in the SOUP_XMLRPC_ERROR domain.

+

See soup_xmlrpc_params_parse() for deserialization details.

-

Parameters

-
+

Parameters

+
@@ -309,109 +338,166 @@ will be unset.)

- - - + + + - +
 

value

on return, the return value from method_call -.

[out]

signature

A valid GVariant type string, or NULL.

[allow-none]

error

error return value

a GError, or NULL

 
-

Returns

-

TRUE if a return value was parsed, FALSE if the -response could not be parsed, or contained a fault.

-

+

Returns

+

a new (non-floating) GVariant, or NULL.

+

[transfer full]

+

Since: 2.52


-

soup_xmlrpc_extract_method_response ()

-
gboolean
-soup_xmlrpc_extract_method_response (const char *method_response,
-                                     int length,
-                                     GError **error,
-                                     GType type,
-                                     ...);
-

Parses method_response - and extracts the return value into -a variable of the correct type.

-

If method_response - is a fault, the return value will be unset, -and error - will be set to an error of type SOUP_XMLRPC_FAULT, with -the error code containing the fault code, and the error message -containing the fault string. (If method_response - cannot be parsed -at all, soup_xmlrpc_extract_method_response() will return FALSE, -but error - will be unset.)

+

soup_xmlrpc_variant_new_datetime ()

+
GVariant *
+soup_xmlrpc_variant_new_datetime (SoupDate *date);
+

Construct a special GVariant used to serialize a <dateTime.iso8601> +node. See soup_xmlrpc_build_request().

+

The actual type of the returned GVariant is unspecified and "v" or "*" +should be used in variant format strings. For example:

+
+ + + + + + + +
1
args = g_variant_new ("(v)", soup_xmlrpc_variant_new_datetime (date));
+
+
-

Parameters

-
+

Parameters

+
- - - - + + + - + +

method_response

the XML-RPC methodResponse string

date

a SoupDate

 
+
+
+

Returns

+

a floating GVariant.

+
+

Since: 2.52

+
+
+
+

soup_xmlrpc_variant_get_datetime ()

+
SoupDate *
+soup_xmlrpc_variant_get_datetime (GVariant *variant,
+                                  GError **error);
+

Get the SoupDate from special GVariant created by +soup_xmlrpc_variant_new_datetime() or by parsing a <dateTime.iso8601> +node. See soup_xmlrpc_params_parse().

+

If variant + does not contain a datetime it will return an error but it is not +considered a programmer error because it generally means parameters received +are not in the expected type.

+
+

Parameters

+
+++++ + - - + + - - - - - - - - - - - +

length

the length of method_response -, or -1 if it is NUL-terminated

variant

a GVariant

 

error

error return value

 

type

the expected type of the return value

 

...

location for return value

a GError, or NULL

 
-

Returns

-

TRUE if a return value was parsed, FALSE if the -response was of the wrong type, or contained a fault.

-

+

Returns

+

a new SoupDate, or NULL on error.

+

Since: 2.52


-

soup_xmlrpc_parse_method_call ()

-
gboolean
-soup_xmlrpc_parse_method_call (const char *method_call,
-                               int length,
-                               char **method_name,
-                               GValueArray **params);
-

Parses method_call - to get the name and parameters, and returns the -parameter values in a GValueArray; see also -soup_xmlrpc_extract_method_call(), which is more convenient if you -know in advance what the types of the parameters will be.

+

soup_xmlrpc_params_free ()

+
void
+soup_xmlrpc_params_free (SoupXMLRPCParams *self);
+

Free a SoupXMLRPCParams returned by soup_xmlrpc_parse_request().

-

Parameters

-
+

Parameters

+
+++++ + + + + + +

self

a SoupXMLRPCParams

 
+
+

Since: 2.52

+
+
+
+

soup_xmlrpc_params_parse ()

+
GVariant *
+soup_xmlrpc_params_parse (SoupXMLRPCParams *self,
+                          const char *signature,
+                          GError **error);
+

Parse method parameters returned by soup_xmlrpc_parse_request().

+

Deserialization details:

+
    +
  • If signature + is provided, <int> and <i4> can be deserialized +to byte, int16, uint16, int32, uint32, int64 or uint64. Otherwise +it will be deserialized to int32. If the value is out of range +for the target type it will return an error.

  • +
  • <struct> will be deserialized to "a{sv}". signature + could define +another value type (e.g. "a{ss}").

  • +
  • <array> will be deserialized to "av". signature + could define +another element type (e.g. "as") or could be a tuple (e.g. "(ss)").

  • +
  • <base64> will be deserialized to "ay".

  • +
  • <string> will be deserialized to "s".

  • +
  • <dateTime.iso8601> will be deserialized to an unspecified variant +type. If signature + is provided it must have the generic "v" type, which +means there is no guarantee that it's actually a datetime that has been +received. soup_xmlrpc_variant_get_datetime() must be used to parse and +type check this special variant.

  • +
  • signature + must not have maybes, otherwise an error is returned.

  • +
  • Dictionaries must have string keys, otherwise an error is returned.

  • +
+
+

Parameters

+
@@ -419,58 +505,44 @@ know in advance what the types of the parameters will be.

- - + + - - - + + + - - - - - - - - + + +

method_call

the XML-RPC methodCall string

self

A SoupXMLRPCParams

 

length

the length of method_call -, or -1 if it is NUL-terminated

 

signature

A valid GVariant type string, or NULL.

[allow-none]

method_name

on return, the methodName from method_call -.

[out]

params

on return, the parameters from method_call -.

[out]

error

a GError, or NULL

 
-

Returns

-

success or failure.

-

+

Returns

+

a new (non-floating) GVariant, or NULL.

+

[transfer full]

+

Since: 2.52


-

soup_xmlrpc_extract_method_call ()

-
gboolean
-soup_xmlrpc_extract_method_call (const char *method_call,
-                                 int length,
-                                 char **method_name,
-                                 ...);
+

soup_xmlrpc_parse_request ()

+
char *
+soup_xmlrpc_parse_request (const char *method_call,
+                           int length,
+                           SoupXMLRPCParams **params,
+                           GError **error);

Parses method_call - to get the name and parameters, and puts -the parameters into variables of the appropriate types.

-

The parameters are handled similarly to -soup_xmlrpc_build_method_call -, with pairs of types and values, -terminated by G_TYPE_INVALID, except that values are pointers to -variables of the indicated type, rather than values of the type.

-

See also soup_xmlrpc_parse_method_call(), which can be used if -you don't know the types of the parameters.

+ and return the method name. Method parameters can be +parsed later using soup_xmlrpc_params_parse().

-

Parameters

-
+

Parameters

+
@@ -489,55 +561,67 @@ you don't know the types of the parameters.

- - + + - - + +
 

method_name

on return, the methodName from method_call -.

params

on success, a new SoupXMLRPCParams.

[out]

...

return types and locations for parameters

error

a GError, or NULL

 
-

Returns

-

success or failure.

-

+

Returns

+

method's name, or NULL on error.

+

[transfer full]

+

Since: 2.52


-

soup_xmlrpc_build_method_response ()

+

soup_xmlrpc_build_response ()

char *
-soup_xmlrpc_build_method_response (GValue *value);
+soup_xmlrpc_build_response (GVariant *value, + GError **error);

This creates a (successful) XML-RPC methodResponse and returns it -as a string. To create a fault response, use -soup_xmlrpc_build_fault().

-

The glib type to XML-RPC type mapping is as with -soup_xmlrpc_build_method_call(), qv.

+as a string. To create a fault response, use soup_xmlrpc_build_fault(). This +is the low-level method that soup_xmlrpc_message_set_response() is built on.

+

See soup_xmlrpc_build_request() for serialization details, but note +that since a method can only have a single return value, value + +should not be a tuple here (unless the return value is an array).

+

If value + is floating, it is consumed.

-

Parameters

-
+

Parameters

+
- + + - + + + + + + +

value

the return value

 

error

a GError, or NULL

 
-

Returns

-

the text of the methodResponse, or NULL on error

-

+

Returns

+

the text of the methodResponse, or NULL on error.

+

Since: 2.52


@@ -548,10 +632,10 @@ soup_xmlrpc_build_fault (int...);

This creates an XML-RPC fault response and returns it as a string. (To create a successful response, use -soup_xmlrpc_build_method_response().)

+soup_xmlrpc_build_method_response().)

-

Parameters

-
+

Parameters

+
@@ -578,27 +662,28 @@ soup_xmlrpc_build_fault (int
-

Returns

+

Returns

the text of the fault

-


-

soup_xmlrpc_set_response ()

-
void
-soup_xmlrpc_set_response (SoupMessage *msg,
-                          GType type,
-                          ...);
+

soup_xmlrpc_message_set_response ()

+
gboolean
+soup_xmlrpc_message_set_response (SoupMessage *msg,
+                                  GVariant *value,
+                                  GError **error);

Sets the status code and response body of msg to indicate a -successful XML-RPC call, with a return value given by type - and the -following varargs argument, of the type indicated by type -.

+successful XML-RPC call, with a return value given by value +. To set a +fault response, use soup_xmlrpc_message_set_fault().

+

See soup_xmlrpc_build_request() for serialization details.

+

If value + is floating, it is consumed.

-

Parameters

-
+

Parameters

+
@@ -611,27 +696,32 @@ following varargs argument, of the type indicated by   - - + + - - + +

type

the type of the response value

value

a GVariant

 

...

the response value

error

a GError, or NULL

 
+
+

Returns

+

TRUE on success, FALSE otherwise.

+
+

Since: 2.52


-

soup_xmlrpc_set_fault ()

+

soup_xmlrpc_message_set_fault ()

void
-soup_xmlrpc_set_fault (SoupMessage *msg,
-                       int fault_code,
-                       const char *fault_format,
-                       ...);
+soup_xmlrpc_message_set_fault (SoupMessage *msg, + int fault_code, + const char *fault_format, + ...);

Sets the status code and response body of msg to indicate an unsuccessful XML-RPC call, with the error described by fault_code @@ -639,8 +729,8 @@ unsuccessful XML-RPC call, with the error described by fault_format .

-

Parameters

-
+

Parameters

+
@@ -671,15 +761,48 @@ and fault_format
+

Since: 2.52

Types and Values

+

SOUP_XMLRPC_ERROR

+
#define SOUP_XMLRPC_ERROR soup_xmlrpc_error_quark()
+
+
+
+
+

enum SoupXMLRPCError

+
+

Members

+
+++++ + + + + + + + + + + + + +

SOUP_XMLRPC_ERROR_ARGUMENTS

  

SOUP_XMLRPC_ERROR_RETVAL

  
+
+
+
+

SOUP_XMLRPC_FAULT

#define SOUP_XMLRPC_FAULT soup_xmlrpc_fault_quark()
 
-

A GError domain representing an XML-RPC fault code. Used with +

A GError domain representing an XML-RPC fault code. Used with SoupXMLRPCFault (although servers may also return fault codes not in that enumeration).

@@ -690,8 +813,8 @@ in that enumeration).

These are an extension, not part of the XML-RPC spec; you can't assume servers will use them.

-

Members

-
+

Members

+
@@ -781,10 +904,18 @@ assume servers will use them.

+
+
+

SoupXMLRPCParams

+
typedef struct _SoupXMLRPCParams SoupXMLRPCParams;
+

Opaque structure containing XML-RPC methodCall parameter values. +Can be parsed using soup_xmlrpc_params_parse() and freed with +soup_xmlrpc_params_free().

+

Since: 2.52

+
+
Generated by GTK-Doc V1.28.1
\ No newline at end of file diff --git a/docs/reference/html/libsoup-2.4-soup-method.html b/docs/reference/html/libsoup-2.4-soup-method.html index c9ac31a8..17bd5952 100644 --- a/docs/reference/html/libsoup-2.4-soup-method.html +++ b/docs/reference/html/libsoup-2.4-soup-method.html @@ -2,21 +2,20 @@ -libsoup Reference Manual: soup-method - +soup-method: libsoup Reference Manual + - + - + @@ -34,7 +33,7 @@

Types and Values

-
+
@@ -104,11 +103,6 @@
-

Object Hierarchy

-
-
-
-

Includes

#include <libsoup/soup.h>
 
@@ -132,10 +126,10 @@ most useful in SoupServer handlers. Eg:

2 3 4
if (msg->method != SOUP_METHOD_GET && msg->method != SOUP_METHOD_HEAD) {
-    soup_message_set_status (msg, SOUP_METHOD_NOT_IMPLEMENTED);
-    return;
-}
if (msg->method != SOUP_METHOD_GET && msg->method != SOUP_METHOD_HEAD) {
+	soup_message_set_status (msg, SOUP_METHOD_NOT_IMPLEMENTED);
+	return;
+}
@@ -144,6 +138,7 @@ most useful in SoupServer handlers. Eg:

Functions

+

Types and Values

@@ -254,7 +249,6 @@ most useful in SoupServer handlers. Eg:

+
Generated by GTK-Doc V1.28.1
\ No newline at end of file diff --git a/docs/reference/html/libsoup-2.4-soup-status.html b/docs/reference/html/libsoup-2.4-soup-status.html index ecd50a04..562c0975 100644 --- a/docs/reference/html/libsoup-2.4-soup-status.html +++ b/docs/reference/html/libsoup-2.4-soup-status.html @@ -2,21 +2,20 @@ -libsoup Reference Manual: soup-status - +soup-status: libsoup Reference Manual + - + - + @@ -34,7 +33,7 @@

Functions

-
+
@@ -85,7 +84,7 @@ - +
-guint +guint soup_status_proxify () @@ -96,7 +95,7 @@

Types and Values

-
+
@@ -114,11 +113,6 @@
-

Object Hierarchy

-
-
-
-

Includes

#include <libsoup/soup.h>
 
@@ -135,8 +129,8 @@

Tests if status is a libsoup transport error.

-

Parameters

-
+

Parameters

+
@@ -150,9 +144,8 @@
-

Returns

-

TRUE or FALSE

-

+

Returns

+

TRUE or FALSE


@@ -163,8 +156,8 @@

Tests if status is an Informational (1xx) response.

-

Parameters

-
+

Parameters

+
@@ -178,9 +171,8 @@
-

Returns

-

TRUE or FALSE

-

+

Returns

+

TRUE or FALSE


@@ -191,8 +183,8 @@

Tests if status is a Successful (2xx) response.

-

Parameters

-
+

Parameters

+
@@ -206,9 +198,8 @@
-

Returns

-

TRUE or FALSE

-

+

Returns

+

TRUE or FALSE


@@ -219,8 +210,8 @@

Tests if status is a Redirection (3xx) response.

-

Parameters

-
+

Parameters

+
@@ -234,9 +225,8 @@
-

Returns

-

TRUE or FALSE

-

+

Returns

+

TRUE or FALSE


@@ -247,8 +237,8 @@

Tests if status is a Client Error (4xx) response.

-

Parameters

-
+

Parameters

+
@@ -262,9 +252,8 @@
-

Returns

-

TRUE or FALSE

-

+

Returns

+

TRUE or FALSE


@@ -275,8 +264,8 @@

Tests if status is a Server Error (5xx) response.

-

Parameters

-
+

Parameters

+
@@ -290,16 +279,15 @@
-

Returns

-

TRUE or FALSE

-

+

Returns

+

TRUE or FALSE


soup_status_get_phrase ()

const char *
-soup_status_get_phrase (guint status_code);
+soup_status_get_phrase (guint status_code);

Looks up the stock HTTP description of status_code . This is used by soup_message_set_status() to get the correct text to go with a @@ -314,8 +302,8 @@ anyway, and so they should never be presented to the user directly. Instead, you should create you own error messages based on the status code, and on what you were trying to do.

-

Parameters

-
+

Parameters

+
@@ -329,24 +317,23 @@ status code, and on what you were trying to do.

-

Returns

+

Returns

the (terse, English) description of status_code

-


soup_status_proxify ()

-
guint
-soup_status_proxify (guint status_code);
+
guint
+soup_status_proxify (guint status_code);

Turns SOUP_STATUS_CANT_RESOLVE into SOUP_STATUS_CANT_RESOLVE_PROXY and SOUP_STATUS_CANT_CONNECT into SOUP_STATUS_CANT_CONNECT_PROXY. Other status codes are passed through unchanged.

-

Parameters

-
+

Parameters

+
@@ -360,12 +347,11 @@ through unchanged.

-

Returns

+

Returns

the "proxified" equivalent of status_code .

-

-

Since 2.26

+

Since: 2.26

@@ -381,8 +367,8 @@ status codes as well.

SoupKnownStatusCode, but the individual values have always had the names they have now.

-

Members

-
+

Members

+
@@ -854,13 +840,12 @@ Supported (HTTP)

SOUP_HTTP_ERROR

#define SOUP_HTTP_ERROR soup_http_error_quark()
 
-

A GError domain representing an HTTP status. Use a SoupStatus for +

A GError domain representing an HTTP status. Use a SoupStatus for the code value.

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/libsoup-2.4.devhelp2 b/docs/reference/html/libsoup-2.4.devhelp2 index 24b28dd6..8301b7d1 100644 --- a/docs/reference/html/libsoup-2.4.devhelp2 +++ b/docs/reference/html/libsoup-2.4.devhelp2 @@ -1,13 +1,12 @@ - - + @@ -28,6 +27,7 @@ + @@ -50,7 +50,7 @@ - + @@ -60,47 +60,26 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + @@ -180,10 +159,6 @@ - - - - @@ -201,6 +176,10 @@ + + + + @@ -222,7 +201,6 @@ - @@ -273,6 +251,7 @@ + @@ -287,7 +266,9 @@ - + + + @@ -427,37 +408,41 @@ - - - - - - + + + + + + + + - + + + - - + + + + + + + - - - - - - + - + @@ -473,6 +458,19 @@ + + + + + + + + + + + + + @@ -487,8 +485,9 @@ + + - @@ -503,6 +502,10 @@ + + + + @@ -514,6 +517,7 @@ + @@ -546,6 +550,7 @@ + @@ -555,11 +560,7 @@ - - - - @@ -615,14 +616,16 @@ + + + - @@ -637,11 +640,15 @@ + + + - + + @@ -676,8 +683,6 @@ - - @@ -685,6 +690,8 @@ + + @@ -699,36 +706,59 @@ - - - - - - - + + + + + + + + + - - + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -792,12 +822,15 @@ - + + + + - + @@ -811,5 +844,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/reference/html/libsoup-build-howto.html b/docs/reference/html/libsoup-build-howto.html index bfeab1c8..c98f6809 100644 --- a/docs/reference/html/libsoup-build-howto.html +++ b/docs/reference/html/libsoup-build-howto.html @@ -2,17 +2,17 @@ -libsoup Reference Manual: Compiling with libsoup - +Compiling with libsoup: libsoup Reference Manual + - + -
+ @@ -43,9 +43,9 @@ package name is "libsoup-2.4". So in your - + @@ -74,8 +74,8 @@ Eg:
1
 2
LIBSOUP_CFLAGS="$LIBSOUP_CFLAGS -DSOUP_VERSION_MIN_REQUIRED=SOUP_VERSION_2_36"
-LIBSOUP_CFLAGS="$LIBSOUP_CFLAGS -DSOUP_VERSION_MAX_ALLOWED=SOUP_VERSION_2_40"
LIBSOUP_CFLAGS="$LIBSOUP_CFLAGS -DSOUP_VERSION_MIN_REQUIRED=SOUP_VERSION_2_36"
+LIBSOUP_CFLAGS="$LIBSOUP_CFLAGS -DSOUP_VERSION_MAX_ALLOWED=SOUP_VERSION_2_40"
@@ -117,7 +117,7 @@ Code using libsoup should do:
1
#include <libsoup/soup.h>
#include <libsoup/soup.h>
@@ -130,7 +130,6 @@ recommended.
+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/libsoup-client-howto.html b/docs/reference/html/libsoup-client-howto.html index 7e87d641..df2524f9 100644 --- a/docs/reference/html/libsoup-client-howto.html +++ b/docs/reference/html/libsoup-client-howto.html @@ -2,17 +2,17 @@ -libsoup Reference Manual: libsoup Client Basics - +libsoup Client Basics: libsoup Reference Manual + - + - + @@ -223,17 +223,17 @@ application might do something like the following: 9 10 11 - + logger =soup_logger_new(debug_level, -1); + soup_session_add_feature(session,SOUP_SESSION_FEATURE(logger)); + g_object_unref(logger); +} @@ -254,9 +254,9 @@ case, you only need to create the message and it's ready to send:
1
 2
 3
SoupMessage *msg;
+        
SoupMessage *msg;
 
-msg = soup_message_new ("GET", "http://example.com/");
@@ -276,12 +276,12 @@ request headers and body of the message: 4 5 6
SoupMessage *msg;
+        
SoupMessage *msg;
 
-msg = soup_message_new ("POST", "http://example.com/form.cgi");
-soup_message_set_request (msg, "application/x-www-form-urlencoded",
-                          SOUP_MEMORY_COPY, formdata, strlen (formdata));
-soup_message_headers_append (msg->request_headers, "Referer", referring_url);
@@ -314,10 +314,10 @@ To send a message and wait for the response, use
GInputStream *stream;
-GError *error = NULL;
+        
GInputStream *stream;
+GError *error = NULL;
 
-stream = soup_session_send (session, msg, cancellable, &error);
@@ -354,9 +354,9 @@ API:
1
 2
 3
guint status;
+        
guint status;
 
-status = soup_session_send_message (session, msg);
@@ -393,21 +393,21 @@ To send a message asynchronously, use
{
-    ...
-    soup_session_send_async (session, msg, cancellable, my_callback, my_callback_data);
-    ...
-}
+        
{
+	...
+	soup_session_send_async (session, msg, cancellable, my_callback, my_callback_data);
+	...
+}
 
-static void
-my_callback (GObject *object, GAsyncResult *result, gpointer user_data)
-{
-    GInputStream *stream;
-    GError *error = NULL;
+static void
+my_callback (GObject *object, GAsyncResult *result, gpointer user_data)
+{
+	GInputStream *stream;
+	GError *error = NULL;
 
-    stream = soup_session_send_finish (SOUP_SESSION (object), result, &error);
-    ...
-}
@@ -441,17 +441,17 @@ completely read: 9 10 11 -
{
-    ...
-    soup_session_queue_message (session, msg, my_callback, my_callback_data);
-    ...
-}
+        
{
+	...
+	soup_session_queue_message (session, msg, my_callback, my_callback_data);
+	...
+}
 
-static void
-my_callback (SoupSession *session, SoupMessage *msg, gpointer user_data)
-{
-    /* msg->response_body contains the response */
-}
+static void +my_callback (SoupSession *session, SoupMessage *msg, gpointer user_data) +{ + /* msg->response_body contains the response */ +}
@@ -476,7 +476,7 @@ to do next. The status_code and reason_phrase fields contain the numeric status and textual status response from the server. response_headers contains the response -headers, which you can investigate using soup_message_headers_get +headers, which you can investigate using soup_message_headers_get and soup_message_headers_foreach.

@@ -542,7 +542,7 @@ a session, call:

1
-
soup_session_add_feature_by_type (session, SOUP_TYPE_AUTH_NTLM);
+
soup_session_add_feature_by_type (session, SOUP_TYPE_AUTH_NTLM);
@@ -561,7 +561,7 @@ or SoupSession can be used from multiple threads. However, if you are using the async APIs, then each thread you use the session from must have its own -thread-default GMainContext. +thread-default GMainContext.

SoupMessage is @@ -598,7 +598,6 @@ More complicated examples are available in GNOME git.

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/libsoup-request-howto.html b/docs/reference/html/libsoup-request-howto.html index b0e44632..3403daf7 100644 --- a/docs/reference/html/libsoup-request-howto.html +++ b/docs/reference/html/libsoup-request-howto.html @@ -2,22 +2,22 @@ -libsoup Reference Manual: libsoup Client SoupRequest API - +libsoup Client SoupRequest API: libsoup Reference Manual + - - + + - + - +
@@ -160,13 +160,12 @@ field to point to a NULL-terminated array of scheme names, implement the various SoupRequest methods, and then register the type with your SoupSession by calling soup_session_add_feature_by_type -and passing the GType of +and passing the GType of your request class.

+
Generated by GTK-Doc V1.28.1 \ No newline at end of file diff --git a/docs/reference/html/libsoup-server-howto.html b/docs/reference/html/libsoup-server-howto.html index aaeba8b8..80d4649d 100644 --- a/docs/reference/html/libsoup-server-howto.html +++ b/docs/reference/html/libsoup-server-howto.html @@ -2,34 +2,34 @@ -libsoup Reference Manual: Soup Server Basics - +libsoup Server Basics: libsoup Reference Manual + - - - + + + - + - - + +
-

Soup Server Basics

-

Soup Server Basics — Server-side tutorial

+

libsoup Server Basics

+

libsoup Server Basics — Server-side tutorial

-

Creating a SoupSession

+

Creating a SoupServer

As with the client API, there is a single object that will encapsulate most of your interactions with libsoup. In this case, SoupServer. @@ -37,7 +37,7 @@ most of your interactions with libsoup. In this case, soup_server_new, and as with the SoupSession constructor, you can specify -various additional options: +a few additional options:

@@ -46,55 +46,39 @@ various additional options: - + - - - - - - - - - + - + - + @@ -102,7 +86,64 @@ various additional options:
-

Adding Handlers

+

Adding Listening Sockets

+

+ To tell the server where to listen, call soup_server_listen + (to listen on a specific GSocketAddress), soup_server_listen_all + (to listen on a given port on all network interfaces), or soup_server_listen_local + (to listen to a given port on the loopback interface only). You can + call any of these functions multiple times, to set up multiple + listening sockets. +

+

+ To set up an HTTPS server, you must first either set the SOUP_SERVER_TLS_CERTIFICATE + property, or else call soup_server_set_ssl_cert_file. + After that you can pass the SOUP_SERVER_LISTEN_HTTPS + option to soup_server_listen, + etc. +

+

+ By default, servers listen for both IPv4 and IPv6 connections; if + you don't want this, use the SOUP_SERVER_LISTEN_IPV4_ONLY + or SOUP_SERVER_LISTEN_IPV6_ONLY + options. +

+

+ The server runs asynchronously, in the thread-default + GMainContext of the + thread in which the "listen" calls were made. +

+
+
+
+

The Old SoupServer Listening API

+

+soup_server_listen, +etc, are available only in libsoup 2.46 and +later. In earlier versions, there was a simpler API, in which a server +could only listen on a single port, determined at construct time +either by passing the SOUP_SERVER_INTERFACE +property (to specify a SoupAddress to listen on), +or the SOUP_SERVER_PORT +property (to specify a port to listen on, on all interfaces). The SOUP_SERVER_SSL_CERT_FILE +and SOUP_SERVER_SSL_KEY_FILE +properties could be used to create an HTTP server. +

+

+When using this API, if SoupServer is unable to bind +the listening socket, or unable to read the provided certificate or +key files, then it will return NULL from its +constructor (with no further indication of what exactly went wrong). +

+

+Additionally, when using this API, it is necessary to call soup_server_run +or soup_server_run_async +to start the server after creating it. +

+
+
+
+

Adding Handlers

By default, SoupServer returns "404 Not Found" in response to all requests (except ones that @@ -116,8 +157,8 @@ to set a callback to handle certain URI paths.

- +

SOUP_SERVER_PORT

SOUP_SERVER_TLS_CERTIFICATE

- The TCP port to listen on. If 0 (or - left unspecified), some unused port will be selected for - you. (You can find out what port by calling soup_server_get_port. + A GTlsCertificate + (containing a private key) that will be used when handling + HTTPS requests on the server.

SOUP_SERVER_INTERFACE

- A SoupAddress, - specifying the IP address of the network interface to run - the server on. If NULL (or left - unspecified), the server will listen on all interfaces. -

SOUP_SERVER_SSL_CERT_FILE

- Points to a file containing an SSL certificate to use. If - this is set, then the server will speak HTTPS; otherwise - it will speak HTTP. -

SOUP_SERVER_SSL_KEY_FILE

SOUP_SERVER_RAW_PATHS

- Points to a file containing the private key for the - SOUP_SERVER_SSL_CERT_FILE. (It may - point to the same file.) + Set this to TRUE if you don't want + libsoup to decode %-encoding + in the Request-URI. (Eg, because you need to treat + "/foo/bar" and + "/foo%2Fbar" as different paths.

SOUP_SERVER_ASYNC_CONTEXT

SOUP_SERVER_SERVER_HEADER

- A GMainContext which - the server will use for asynchronous operations. This can - be set if you want to use a SoupServer in a thread - other than the main thread. + Allows you to set a Server header string that will be sent + on all responses.

SOUP_SERVER_RAW_PATHS

SOUP_SERVER_HTTP_ALIASES + and SOUP_SERVER_HTTPS_ALIASES

- Set this to TRUE if you don't want - libsoup to decode %-encoding - in the Request-URI. (Eg, because you need to treat - "/foo/bar" and - "/foo%2Fbar" as different paths. + Allow you to tell the server to recognize additional URI + schemes as aliases for "http" or + https. You can set this if you are + serving URIs with schemes like "dav" or + "webcal".

1
 2
soup_server_add_handler (server, "/foo", server_callback,
-                         data, destroy_notify);
soup_server_add_handler (server, "/foo", server_callback,
+                         data, destroy_notify);
@@ -141,7 +182,7 @@ match any other handler.

-

Responding to Requests

+

Responding to Requests

A handler callback looks something like this:

@@ -159,16 +200,16 @@ A handler callback looks something like this: 8 9 10 -
static void
-server_callback (SoupServer        *server,
-                 SoupMessage       *msg, 
-                 const char        *path,
-                 GHashTable        *query,
-                 SoupClientContext *client,
-                 gpointer           user_data)
-{
-    ...
-}
+
static void
+server_callback (SoupServer        *server,
+                 SoupMessage       *msg, 
+                 const char        *path,
+                 GHashTable        *query,
+                 SoupClientContext *client,
+                 gpointer           user_data)
+{
+	...
+}
@@ -204,7 +245,7 @@ If the response requires a body, you must decide whether to use chunked encoding.

-

Responding with Content-Length +

Responding with Content-Length Encoding

This is the simpler way to set a response body, if you have all of the @@ -245,37 +286,37 @@ data available at once. 29 30 31 -

static void
-server_callback (SoupServer        *server,
-                 SoupMessage       *msg, 
-                 const char        *path,
-                 GHashTable        *query,
-                 SoupClientContext *client,
-                 gpointer           user_data)
-{
-    MyServerData *server_data = user_data;
-    const char *mime_type;
-    GByteArray *body;
+        
static void
+server_callback (SoupServer        *server,
+                 SoupMessage       *msg, 
+                 const char        *path,
+                 GHashTable        *query,
+                 SoupClientContext *client,
+                 gpointer           user_data)
+{
+	MyServerData *server_data = user_data;
+	const char *mime_type;
+	GByteArray *body;
 
-    if (msg->method != SOUP_METHOD_GET) {
-        soup_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
+	if (msg->method != SOUP_METHOD_GET) {
+		soup_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED);
+		return;
+	}
 
-    /* This is somewhat silly. Presumably your server will do
-     * something more interesting.
-     */
-    body = g_hash_table_lookup (server_data->bodies, path);
-    mime_type = g_hash_table_lookup (server_data->mime_types, path);
-    if (!body || !mime_type) {
-        soup_message_set_status (msg, SOUP_STATUS_NOT_FOUND);
-        return;
-    }
+	/* This is somewhat silly. Presumably your server will do
+	 * something more interesting.
+	 */
+	body = g_hash_table_lookup (server_data->bodies, path);
+	mime_type = g_hash_table_lookup (server_data->mime_types, path);
+	if (!body || !mime_type) {
+		soup_message_set_status (msg, SOUP_STATUS_NOT_FOUND);
+		return;
+	}
 
-    soup_message_set_status (msg, SOUP_STATUS_OK);
-    soup_message_set_response (msg, mime_type, SOUP_MEMORY_COPY,
-                               body->data, body->len);
-}
+ soup_message_set_status (msg, SOUP_STATUS_OK); + soup_message_set_response (msg, mime_type, SOUP_MEMORY_COPY, + body->data, body->len); +}
@@ -283,7 +324,7 @@ data available at once.
-

Responding with chunked Encoding

+

Responding with chunked Encoding

If you want to supply the response body in chunks as it becomes available, use chunked encoding instead. In this @@ -317,7 +358,7 @@ using chunked encoding.


-

Handling Authentication

+

Handling Authentication

To have SoupServer handle HTTP authentication for you, create a SoupAuthDomainBasic @@ -339,17 +380,17 @@ and pass it to

SoupAuthDomain *domain;
+        
SoupAuthDomain *domain;
 
-domain = soup_auth_domain_basic_new (
-    SOUP_AUTH_DOMAIN_REALM, "My Realm",
-    SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK, auth_callback,
-    SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA, auth_data,
-    SOUP_AUTH_DOMAIN_ADD_PATH, "/foo",
-    SOUP_AUTH_DOMAIN_ADD_PATH, "/bar/private",
-    NULL);
-soup_server_add_auth_domain (server, domain);
-g_object_unref (domain);
+domain = soup_auth_domain_basic_new ( + SOUP_AUTH_DOMAIN_REALM, "My Realm", + SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK, auth_callback, + SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA, auth_data, + SOUP_AUTH_DOMAIN_ADD_PATH, "/foo", + SOUP_AUTH_DOMAIN_ADD_PATH, "/bar/private", + NULL); +soup_server_add_auth_domain (server, domain); +g_object_unref (domain);
@@ -381,23 +422,23 @@ passed to the server_callback: 15 16 17 -
static gboolean
-auth_callback (SoupAuthDomain *domain, SoupMessage *msg,
-               const char *username, const char *password,
-               gpointer user_data)
-{
-    MyServerData *server_data = user_data;
-    MyUserData *user;
+        
static gboolean
+auth_callback (SoupAuthDomain *domain, SoupMessage *msg,
+               const char *username, const char *password,
+               gpointer user_data)
+{
+	MyServerData *server_data = user_data;
+	MyUserData *user;
 
-    user = my_server_data_lookup_user (server_data, username);
-    if (!user)
-        return FALSE;
+	user = my_server_data_lookup_user (server_data, username);
+	if (!user)
+		return FALSE;
 
-    /* FIXME: Don't do this. Keeping a cleartext password database
-     * is bad.
-     */
-    return strcmp (password, user->password) == 0;
-}
+ /* FIXME: Don't do this. Keeping a cleartext password database + * is bad. + */ + return strcmp (password, user->password) == 0; +}
@@ -438,7 +479,6 @@ requests), use a
+
Generated by GTK-Doc V1.28.1
\ No newline at end of file diff --git a/docs/reference/html/libsoup-session-porting.html b/docs/reference/html/libsoup-session-porting.html index 8d536a76..a177034a 100644 --- a/docs/reference/html/libsoup-session-porting.html +++ b/docs/reference/html/libsoup-session-porting.html @@ -2,22 +2,22 @@ -libsoup Reference Manual: Porting to the new SoupSession - +Porting to the new SoupSession: libsoup Reference Manual + - - - + + + - + - - + +
@@ -153,16 +153,16 @@ for each host to "preload" the NTLM authentication: 8 9 10 -
SoupAuthManager *auth_manager;
-SoupAuth *auth;
-SoupURI *uri;
+        
SoupAuthManager *auth_manager;
+SoupAuth *auth;
+SoupURI *uri;
 
-auth_manager = SOUP_AUTH_MANAGER (soup_session_get_feature (session, SOUP_TYPE_AUTH_MANAGER));
-auth = g_object_new (SOUP_TYPE_AUTH_NTLM, NULL);
-uri = soup_uri_new ("http://ntlm-using-host.example.com/");
-soup_auth_manager_use_auth (auth_manager, uri, auth);
-g_object_unref (auth);
-soup_uri_free (auth);
+auth_manager = SOUP_AUTH_MANAGER (soup_session_get_feature (session, SOUP_TYPE_AUTH_MANAGER)); +auth = g_object_new (SOUP_TYPE_AUTH_NTLM, NULL); +uri = soup_uri_new ("http://ntlm-using-host.example.com/"); +soup_auth_manager_use_auth (auth_manager, uri, auth); +g_object_unref (auth); +soup_uri_free (auth);
@@ -197,7 +197,7 @@ like gio with respect to asynchronous I/O. In particular, the "async-context" and "use-thread-context" properties are now effectively unused, and the session always queues -asynchronous requests in the GMainContext that was is +asynchronous requests in the GMainContext that was is the thread default when the asynchronous operation is started. Session bookkeeping tasks (like closing idle connections) happen in the context that was thread default when the session was created. @@ -212,7 +212,6 @@ when you need return to the main loop.
+
Generated by GTK-Doc V1.28.1
\ No newline at end of file diff --git a/docs/reference/html/style.css b/docs/reference/html/style.css index 705a5c9a..4be4ede1 100644 --- a/docs/reference/html/style.css +++ b/docs/reference/html/style.css @@ -30,125 +30,8 @@ body vertical-align: top; } -@media screen { - sup a.footnote - { - position: relative; - top: 0em ! important; - } - /* this is needed so that the local anchors are displayed below the naviagtion */ - div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] - { - display: inline-block; - position: relative; - top:-5em; - } - /* this seems to be a bug in the xsl style sheets when generating indexes */ - div.index div.index - { - top: 0em; - } - /* make space for the fixed navigation bar and add space at the bottom so that - * link targets appear somewhat close to top - */ - body - { - padding-top: 5em; - padding-bottom: 500px; - max-width: 60em; - } - p - { - max-width: 60em; - } - /* style and size the navigation bar */ - table.navigation#top - { - position: fixed; - background: #e2e2e2; - border-bottom: solid 1px #babdb6; - margin-top: 0; - margin-bottom: 0; - top: 0; - left: 0; - height: 3em; - z-index: 10; - } - .navigation a, .navigation a:visited - { - /* tango:sky blue 3 */ - color: #204a87; - } - .navigation a:hover - { - /* tango:sky blue 2 */ - color: #3465a4; - } - td.shortcuts - { - /* tango:sky blue 2 */ - color: #3465a4; - font-size: 80%; - white-space: nowrap; - } - td.shortcuts .dim - { - color: #babdb6; - } -} -@media screen and (min-width: 60em) { - /* screen larger than 60em */ - body { margin: auto; } -} -@media screen and (max-width: 60em) { - /* screen less than 60em */ - #nav_hierarchy { display: none; } - #nav_interfaces { display: none; } - #nav_prerequisites { display: none; } - #nav_derived_interfaces { display: none; } - #nav_implementations { display: none; } - #nav_child_properties { display: none; } - #nav_style_properties { display: none; } - #nav_index { display: none; } - #nav_glossary { display: none; } - .gallery_image { display: none; } - .property_flags { display: none; } - .signal_flags { display: none; } - .parameter_annotations { display: none; } - .enum_member_annotations { display: none; } - .struct_member_annotations { display: none; } - .union_member_annotations { display: none; } - /* now that a column is hidden, optimize space */ - col.parameters_name { width: auto; } - col.parameters_description { width: auto; } - col.struct_members_name { width: auto; } - col.struct_members_description { width: auto; } - col.enum_members_name { width: auto; } - col.enum_members_description { width: auto; } - col.union_members_name { width: auto; } - col.union_members_description { width: auto; } -} -@media print { - table.navigation { - visibility: collapse; - display: none; - } - div.titlepage table.navigation { - visibility: visible; - display: table; - background: #e2e2e2; - border: solid 1px #babdb6; - margin-top: 0; - margin-bottom: 0; - top: 0; - left: 0; - height: 3em; - } -} - -.navigation .title -{ - font-size: 120%; +span.nowrap { + white-space: nowrap; } div.gallery-float @@ -181,7 +64,7 @@ a:hover div.informaltable table { border-collapse: separate; - border-spacing: 20px 3px; + border-spacing: 1em 0.3em; border: none; } @@ -239,6 +122,11 @@ div.informaltable table td, div.informaltable table th color: #729fcf; } +td p +{ + margin: 0.25em; +} + div.table table { border-collapse: collapse; @@ -264,6 +152,8 @@ div.table table th h4 { color: #555753; + margin-top: 1em; + margin-bottom: 1em; } hr @@ -282,17 +172,16 @@ dl.toc dt padding-bottom: 0.25em; } -dl.toc > dd > dl > dt +dl.toc > dt { padding-top: 0.25em; padding-bottom: 0.25em; + font-weight: bold; } -dl.toc > dt +dl.toc > dl { - padding-top: 1em; padding-bottom: 0.5em; - font-weight: bold; } .parameter @@ -404,21 +293,28 @@ h2 .extralinks, h3 .extralinks font-weight: normal; } +acronym,abbr +{ + border-bottom: 1px dotted gray; +} + /* code listings */ -.listing_code .programlisting .cbracket { color: #a40000; } /* tango: scarlet red 3 */ -.listing_code .programlisting .comment { color: #a1a39d; } /* tango: aluminium 4 */ -.listing_code .programlisting .function { color: #000000; font-weight: bold; } -.listing_code .programlisting .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */ -.listing_code .programlisting .keyword { color: #4e9a06; } /* tango: chameleon 3 */ +.listing_code .programlisting .normal, +.listing_code .programlisting .normal a, +.listing_code .programlisting .number, +.listing_code .programlisting .cbracket, +.listing_code .programlisting .symbol { color: #555753; } +.listing_code .programlisting .comment, .listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ -.listing_code .programlisting .normal { color: #000000; } -.listing_code .programlisting .number { color: #75507b; } /* tango: plum 2 */ +.listing_code .programlisting .function, +.listing_code .programlisting .function a, .listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ -.listing_code .programlisting .string { color: #c17d11; } /* tango: chocolate 2 */ -.listing_code .programlisting .type { color: #000000; } -.listing_code .programlisting .type a { color: #11326b; } /* tango: sky blue 4 */ -.listing_code .programlisting .symbol { color: #ce5c00; } /* tango: orange 3 */ +.listing_code .programlisting .string { color: #ad7fa8; } /* tango: plum */ +.listing_code .programlisting .keyword, +.listing_code .programlisting .usertype, +.listing_code .programlisting .type, +.listing_code .programlisting .type a { color: #4e9a06; } /* tango: chameleon 3 */ .listing_frame { /* tango:sky blue 1 */ @@ -432,11 +328,6 @@ h2 .extralinks, h3 .extralinks margin-bottom: 0px; padding: 0.5em; } -.listing_lines { - /* this just adds visual clutter and - takes precious room from small screens */ - display: none; -} .listing_lines { /* tango:sky blue 0.5 */ background: #a6c5e3; @@ -459,3 +350,134 @@ h2 .extralinks, h3 .extralinks margin: 0px; } +@media screen { + /* these have a as a first child, but since there are no parent selectors + * we can't use that. */ + a.footnote + { + position: relative; + top: 0em ! important; + } + /* this is needed so that the local anchors are displayed below the naviagtion */ + div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] + { + display: inline-block; + position: relative; + top:-5em; + } + /* this seems to be a bug in the xsl style sheets when generating indexes */ + div.index div.index + { + top: 0em; + } + /* make space for the fixed navigation bar and add space at the bottom so that + * link targets appear somewhat close to top + */ + body + { + padding-top: 2.5em; + padding-bottom: 500px; + max-width: 60em; + } + p + { + max-width: 60em; + } + /* style and size the navigation bar */ + table.navigation#top + { + position: fixed; + background: #e2e2e2; + border-bottom: solid 1px #babdb6; + border-spacing: 5px; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + z-index: 10; + } + table.navigation#top td + { + padding-left: 6px; + padding-right: 6px; + } + .navigation a, .navigation a:visited + { + /* tango:sky blue 3 */ + color: #204a87; + } + .navigation a:hover + { + /* tango:sky blue 2 */ + color: #3465a4; + } + td.shortcuts + { + /* tango:sky blue 2 */ + color: #3465a4; + font-size: 80%; + white-space: nowrap; + } + td.shortcuts .dim + { + color: #babdb6; + } + .navigation .title + { + font-size: 80%; + max-width: none; + margin: 0px; + font-weight: normal; + } +} +@media screen and (min-width: 60em) { + /* screen larger than 60em */ + body { margin: auto; } +} +@media screen and (max-width: 60em) { + /* screen less than 60em */ + #nav_hierarchy { display: none; } + #nav_interfaces { display: none; } + #nav_prerequisites { display: none; } + #nav_derived_interfaces { display: none; } + #nav_implementations { display: none; } + #nav_child_properties { display: none; } + #nav_style_properties { display: none; } + #nav_index { display: none; } + #nav_glossary { display: none; } + .gallery_image { display: none; } + .property_flags { display: none; } + .signal_flags { display: none; } + .parameter_annotations { display: none; } + .enum_member_annotations { display: none; } + .struct_member_annotations { display: none; } + .union_member_annotations { display: none; } + /* now that a column is hidden, optimize space */ + col.parameters_name { width: auto; } + col.parameters_description { width: auto; } + col.struct_members_name { width: auto; } + col.struct_members_description { width: auto; } + col.enum_members_name { width: auto; } + col.enum_members_description { width: auto; } + col.union_members_name { width: auto; } + col.union_members_description { width: auto; } + .listing_lines { display: none; } +} +@media print { + table.navigation { + visibility: collapse; + display: none; + } + div.titlepage table.navigation { + visibility: visible; + display: table; + background: #e2e2e2; + border: solid 1px #babdb6; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + height: 3em; + } +} + diff --git a/docs/reference/libsoup-2.4-docs.sgml b/docs/reference/libsoup-2.4-docs.sgml index c0c8a05c..7bd4858e 100644 --- a/docs/reference/libsoup-2.4-docs.sgml +++ b/docs/reference/libsoup-2.4-docs.sgml @@ -11,8 +11,8 @@ - + @@ -35,6 +35,7 @@ + @@ -61,7 +62,7 @@ Web Services APIs - + diff --git a/docs/reference/libsoup-2.4-sections.txt b/docs/reference/libsoup-2.4-sections.txt index 03d35d4b..a9b21384 100644 --- a/docs/reference/libsoup-2.4-sections.txt +++ b/docs/reference/libsoup-2.4-sections.txt @@ -80,6 +80,7 @@ soup_message_got_chunk soup_message_got_body soup_message_finished soup_message_restarted +soup_message_starting
@@ -118,6 +119,10 @@ soup_message_headers_clean_connection_headers soup_message_headers_get_one soup_message_headers_get_list soup_message_headers_get +soup_message_headers_get_headers_type + +soup_message_headers_header_contains +soup_message_headers_header_equals SoupMessageHeadersForeachFunc soup_message_headers_foreach @@ -216,25 +221,36 @@ SoupKnownStatusCode SoupServer SoupServer soup_server_new -soup_server_is_https -soup_server_get_port -soup_server_get_listener -soup_server_run -soup_server_run_async -soup_server_quit +soup_server_set_ssl_cert_file + +SoupServerListenOptions +soup_server_listen +soup_server_listen_all +soup_server_listen_local +soup_server_listen_socket +soup_server_listen_fd +soup_server_get_listeners +soup_server_get_uris soup_server_disconnect -soup_server_get_async_context +soup_server_is_https +soup_server_accept_iostream SoupServerCallback soup_server_add_handler +soup_server_add_early_handler soup_server_remove_handler +SoupServerWebsocketCallback +soup_server_add_websocket_handler + SoupClientContext -soup_client_context_get_socket -soup_client_context_get_address +soup_client_context_get_local_address +soup_client_context_get_remote_address soup_client_context_get_host soup_client_context_get_auth_domain soup_client_context_get_auth_user +soup_client_context_get_gsocket +soup_client_context_steal_connection soup_server_add_auth_domain soup_server_remove_auth_domain @@ -242,12 +258,7 @@ soup_server_remove_auth_domain soup_server_pause_message soup_server_unpause_message -SOUP_SERVER_PORT -SOUP_SERVER_INTERFACE -SOUP_SERVER_SSL_CERT_FILE -SOUP_SERVER_SSL_KEY_FILE SOUP_SERVER_TLS_CERTIFICATE -SOUP_SERVER_ASYNC_CONTEXT SOUP_SERVER_RAW_PATHS SOUP_SERVER_SERVER_HEADER SOUP_SERVER_HTTP_ALIASES @@ -265,6 +276,26 @@ SOUP_TYPE_CLIENT_CONTEXT soup_client_context_get_type
+
+soup-server-deprecated +SoupServer deprecated API +soup_server_get_port +soup_server_get_listener +soup_server_run +soup_server_run_async +soup_server_quit +soup_server_get_async_context + +soup_client_context_get_socket +soup_client_context_get_address + +SOUP_SERVER_PORT +SOUP_SERVER_INTERFACE +SOUP_SERVER_SSL_CERT_FILE +SOUP_SERVER_SSL_KEY_FILE +SOUP_SERVER_ASYNC_CONTEXT +
+
soup-auth-domain SoupAuthDomain @@ -418,6 +449,9 @@ soup_session_send soup_session_send_async soup_session_send_finish +soup_session_websocket_connect_async +soup_session_websocket_connect_finish + soup_session_prefetch_dns soup_session_prepare_for_uri soup_session_abort @@ -439,6 +473,12 @@ soup_session_get_feature soup_session_get_feature_for_message soup_session_has_feature +soup_session_steal_connection + +SoupSessionConnectProgressCallback +soup_session_connect_async +soup_session_connect_finish + SOUP_SESSION_PROXY_URI SOUP_SESSION_PROXY_RESOLVER SOUP_SESSION_MAX_CONNS @@ -447,6 +487,7 @@ SOUP_SESSION_TLS_DATABASE SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE SOUP_SESSION_SSL_CA_FILE SOUP_SESSION_SSL_STRICT +SOUP_SESSION_TLS_INTERACTION SOUP_SESSION_ASYNC_CONTEXT SOUP_SESSION_USE_THREAD_CONTEXT SOUP_SESSION_TIMEOUT @@ -543,6 +584,8 @@ soup_auth_update SOUP_TYPE_AUTH_BASIC SOUP_TYPE_AUTH_DIGEST SOUP_TYPE_AUTH_NTLM +SOUP_TYPE_AUTH_NEGOTIATE +soup_auth_negotiate_supported soup_auth_is_for_proxy soup_auth_get_scheme_name @@ -551,6 +594,7 @@ soup_auth_get_realm soup_auth_get_info soup_auth_authenticate +soup_auth_can_authenticate soup_auth_is_authenticated soup_auth_is_ready @@ -575,6 +619,7 @@ SoupAuthClass soup_auth_basic_get_type soup_auth_digest_get_type soup_auth_ntlm_get_type +soup_auth_negotiate_get_type soup_auth_get_saved_password soup_auth_get_saved_users @@ -588,6 +633,7 @@ soup_auth_save_password SoupAuthManager SOUP_TYPE_AUTH_MANAGER soup_auth_manager_use_auth +soup_auth_manager_clear_cached_credentials SoupAuthManagerPrivate SoupAuthManagerClass @@ -676,6 +722,8 @@ SOUP_URI_SCHEME_DATA SOUP_URI_SCHEME_FILE SOUP_URI_SCHEME_FTP SOUP_URI_SCHEME_RESOURCE +SOUP_URI_SCHEME_WS +SOUP_URI_SCHEME_WSS soup_uri_uses_default_port SOUP_URI_IS_VALID SOUP_URI_VALID_FOR_HTTP @@ -791,55 +839,30 @@ soup_form_encode_urlencoded_list soup-xmlrpc XMLRPC Support -soup_xmlrpc_build_method_call -soup_xmlrpc_request_new -soup_xmlrpc_parse_method_response -soup_xmlrpc_extract_method_response - -soup_xmlrpc_parse_method_call -soup_xmlrpc_extract_method_call -soup_xmlrpc_build_method_response -soup_xmlrpc_build_fault -soup_xmlrpc_set_response -soup_xmlrpc_set_fault - +SOUP_XMLRPC_ERROR +SoupXMLRPCError SOUP_XMLRPC_FAULT SoupXMLRPCFault + +soup_xmlrpc_build_request +soup_xmlrpc_message_new +soup_xmlrpc_parse_response +soup_xmlrpc_variant_new_datetime +soup_xmlrpc_variant_get_datetime + +SoupXMLRPCParams +soup_xmlrpc_params_free +soup_xmlrpc_params_parse +soup_xmlrpc_parse_request +soup_xmlrpc_build_response +soup_xmlrpc_build_fault +soup_xmlrpc_message_set_response +soup_xmlrpc_message_set_fault soup_xmlrpc_error_quark -SOUP_XMLRPC_ERROR -SoupXMLRPCError soup_xmlrpc_fault_quark
-
-soup-value-utils -GValue Support -soup_value_hash_new -soup_value_hash_new_with_vals -soup_value_hash_insert_value -soup_value_hash_insert -soup_value_hash_insert_vals -soup_value_hash_lookup -soup_value_hash_lookup_vals - -soup_value_array_from_args -soup_value_array_to_args -soup_value_array_new -soup_value_array_new_with_vals -soup_value_array_insert -soup_value_array_append -soup_value_array_append_vals -soup_value_array_get_nth - -SOUP_VALUE_SETV -SOUP_VALUE_GETV - -SOUP_TYPE_BYTE_ARRAY - -soup_byte_array_get_type -
-
soup-logger SoupLogger @@ -1219,6 +1242,9 @@ SOUP_VERSION_2_40 SOUP_VERSION_2_42 SOUP_VERSION_2_44 SOUP_VERSION_2_46 +SOUP_VERSION_2_48 +SOUP_VERSION_2_50 +SOUP_VERSION_2_52 SOUP_AVAILABLE_IN_2_24 SOUP_AVAILABLE_IN_2_26 @@ -1232,6 +1258,9 @@ SOUP_AVAILABLE_IN_2_40 SOUP_AVAILABLE_IN_2_42 SOUP_AVAILABLE_IN_2_44 SOUP_AVAILABLE_IN_2_46 +SOUP_AVAILABLE_IN_2_48 +SOUP_AVAILABLE_IN_2_50 +SOUP_AVAILABLE_IN_2_52 SOUP_DEPRECATED_IN_2_24 SOUP_DEPRECATED_IN_2_24_FOR SOUP_DEPRECATED_IN_2_26 @@ -1256,7 +1285,61 @@ SOUP_DEPRECATED_IN_2_44 SOUP_DEPRECATED_IN_2_44_FOR SOUP_DEPRECATED_IN_2_46 SOUP_DEPRECATED_IN_2_46_FOR +SOUP_DEPRECATED_IN_2_48 +SOUP_DEPRECATED_IN_2_48_FOR +SOUP_DEPRECATED_IN_2_50 +SOUP_DEPRECATED_IN_2_50_FOR +SOUP_DEPRECATED_IN_2_52 +SOUP_DEPRECATED_IN_2_52_FOR SOUP_ENCODE_VERSION SOUP_VERSION_CUR_STABLE SOUP_VERSION_PREV_STABLE
+ +
+soup-websocket +WebSockets + +soup_websocket_client_prepare_handshake +soup_websocket_client_verify_handshake + +soup_websocket_server_check_handshake +soup_websocket_server_process_handshake + +SoupWebsocketConnection +SoupWebsocketConnectionType +soup_websocket_connection_new +soup_websocket_connection_get_io_stream +soup_websocket_connection_get_connection_type +soup_websocket_connection_get_uri +soup_websocket_connection_get_origin +soup_websocket_connection_get_protocol +SoupWebsocketState +soup_websocket_connection_get_state +SoupWebsocketDataType +soup_websocket_connection_send_text +soup_websocket_connection_send_binary +SoupWebsocketCloseCode +soup_websocket_connection_close +soup_websocket_connection_get_close_code +soup_websocket_connection_get_close_data + +SoupWebsocketError +SOUP_WEBSOCKET_ERROR + +SoupWebsocketConnectionClass +SoupWebsocketConnectionPrivate +SOUP_IS_WEBSOCKET_CONNECTION +SOUP_IS_WEBSOCKET_CONNECTION_CLASS +SOUP_TYPE_WEBSOCKET_CONNECTION +SOUP_WEBSOCKET_CONNECTION +SOUP_WEBSOCKET_CONNECTION_CLASS +SOUP_WEBSOCKET_CONNECTION_GET_CLASS +soup_websocket_close_code_get_type +soup_websocket_connection_get_type +soup_websocket_connection_type_get_type +soup_websocket_data_type_get_type +soup_websocket_error_get_quark +soup_websocket_error_get_type +soup_websocket_state_get_type +
diff --git a/docs/reference/libsoup-2.4.types b/docs/reference/libsoup-2.4.types index 3e9a59eb..33758178 100644 --- a/docs/reference/libsoup-2.4.types +++ b/docs/reference/libsoup-2.4.types @@ -6,9 +6,9 @@ soup_auth_domain_digest_get_type soup_auth_domain_get_type soup_auth_get_type soup_auth_manager_get_type +soup_auth_negotiate_get_type soup_auth_ntlm_get_type soup_buffer_get_type -soup_byte_array_get_type soup_cache_get_type soup_client_context_get_type soup_content_decoder_get_type @@ -36,3 +36,4 @@ soup_session_get_type soup_session_sync_get_type soup_socket_get_type soup_uri_get_type +soup_websocket_connection_get_type diff --git a/docs/reference/server-howto.xml b/docs/reference/server-howto.xml index 05fb0c05..336a2af4 100644 --- a/docs/reference/server-howto.xml +++ b/docs/reference/server-howto.xml @@ -3,17 +3,17 @@ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> -Soup Server Basics +libsoup Server Basics 3 LIBSOUP Library -Soup Server BasicsServer-side tutorial +libsoup Server BasicsServer-side tutorial -Creating a SoupSession +Creating a SoupServer As with the client API, there is a single object that will encapsulate @@ -25,67 +25,135 @@ linkend="SoupServer">SoupServer. You create the server with soup_server_new, and as with the SoupSession constructor, you can specify -various additional options: +a few additional options: - SOUP_SERVER_PORT + SOUP_SERVER_TLS_CERTIFICATE - The TCP port to listen on. If 0 (or - left unspecified), some unused port will be selected for - you. (You can find out what port by calling soup_server_get_port. + A GTlsCertificate + (containing a private key) that will be used when handling + HTTPS requests on the server. - SOUP_SERVER_INTERFACE - - A SoupAddress, - specifying the IP address of the network interface to run - the server on. If NULL (or left - unspecified), the server will listen on all interfaces. - - - - SOUP_SERVER_SSL_CERT_FILE - - Points to a file containing an SSL certificate to use. If - this is set, then the server will speak HTTPS; otherwise - it will speak HTTP. - - - - SOUP_SERVER_SSL_KEY_FILE + SOUP_SERVER_RAW_PATHS - Points to a file containing the private key for the - SOUP_SERVER_SSL_CERT_FILE. (It may - point to the same file.) + Set this to TRUE if you don't want + libsoup to decode %-encoding + in the Request-URI. (Eg, because you need to treat + "/foo/bar" and + "/foo%2Fbar" as different paths. - SOUP_SERVER_ASYNC_CONTEXT + SOUP_SERVER_SERVER_HEADER - A GMainContext which - the server will use for asynchronous operations. This can - be set if you want to use a SoupServer in a thread - other than the main thread. + Allows you to set a Server header string that will be sent + on all responses. - SOUP_SERVER_RAW_PATHS + SOUP_SERVER_HTTP_ALIASES + and SOUP_SERVER_HTTPS_ALIASES - Set this to TRUE if you don't want - libsoup to decode %-encoding - in the Request-URI. (Eg, because you need to treat - "/foo/bar" and - "/foo%2Fbar" as different paths. + Allow you to tell the server to recognize additional URI + schemes as aliases for "http" or + https. You can set this if you are + serving URIs with schemes like "dav" or + "webcal". + +Adding Listening Sockets + + + To tell the server where to listen, call soup_server_listen + (to listen on a specific GSocketAddress), soup_server_listen_all + (to listen on a given port on all network interfaces), or soup_server_listen_local + (to listen to a given port on the loopback interface only). You can + call any of these functions multiple times, to set up multiple + listening sockets. + + + + To set up an HTTPS server, you must first either set the SOUP_SERVER_TLS_CERTIFICATE + property, or else call soup_server_set_ssl_cert_file. + After that you can pass the SOUP_SERVER_LISTEN_HTTPS + option to soup_server_listen, + etc. + + + + By default, servers listen for both IPv4 and IPv6 connections; if + you don't want this, use the SOUP_SERVER_LISTEN_IPV4_ONLY + or SOUP_SERVER_LISTEN_IPV6_ONLY + options. + + + + The server runs asynchronously, in the thread-default + GMainContext of the + thread in which the "listen" calls were made. + + + + +The Old SoupServer Listening API + + +soup_server_listen, +etc, are available only in libsoup 2.46 and +later. In earlier versions, there was a simpler API, in which a server +could only listen on a single port, determined at construct time +either by passing the SOUP_SERVER_INTERFACE +property (to specify a SoupAddress to listen on), +or the SOUP_SERVER_PORT +property (to specify a port to listen on, on all interfaces). The SOUP_SERVER_SSL_CERT_FILE +and SOUP_SERVER_SSL_KEY_FILE +properties could be used to create an HTTP server. + + + +When using this API, if SoupServer is unable to bind +the listening socket, or unable to read the provided certificate or +key files, then it will return NULL from its +constructor (with no further indication of what exactly went wrong). + + + +Additionally, when using this API, it is necessary to call soup_server_run +or soup_server_run_async +to start the server after creating it. + + + + Adding Handlers diff --git a/docs/reference/tmpl/libsoup-2.4-unused.sgml b/docs/reference/tmpl/libsoup-2.4-unused.sgml deleted file mode 100644 index d9049556..00000000 --- a/docs/reference/tmpl/libsoup-2.4-unused.sgml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -SoupServer deprecated API - - diff --git a/docs/reference/tmpl/soup-address.sgml b/docs/reference/tmpl/soup-address.sgml deleted file mode 100644 index 207a3bbb..00000000 --- a/docs/reference/tmpl/soup-address.sgml +++ /dev/null @@ -1,271 +0,0 @@ - -SoupAddress - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@SOUP_ADDRESS_FAMILY_INVALID: -@SOUP_ADDRESS_FAMILY_IPV4: -@SOUP_ADDRESS_FAMILY_IPV6: - - - - - - - - - - - - - -@name: -@port: -@Returns: - - - - - - - -@sa: -@len: -@Returns: - - - - - - - -@family: -@port: -@Returns: - - - - - - - -@addr: -@status: -@user_data: - - - - - - - -@addr: -@async_context: -@cancellable: -@callback: -@user_data: - - - - - - - -@addr: -@cancellable: -@Returns: - - - - - - - -@addr: -@Returns: - - - - - - - -@addr: -@Returns: - - - - - - - -@addr: -@len: -@Returns: - - - - - - - -@addr: -@Returns: - - - - - - - -@addr: -@Returns: - - - - - - - -@addr: -@Returns: - - - - - - - -@addr1: -@addr2: -@Returns: - - - - - - - -@addr: -@Returns: - - - - - - - -@addr1: -@addr2: -@Returns: - - - - - - - -@addr: -@Returns: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-auth-domain-basic.sgml b/docs/reference/tmpl/soup-auth-domain-basic.sgml deleted file mode 100644 index 0b9a30cb..00000000 --- a/docs/reference/tmpl/soup-auth-domain-basic.sgml +++ /dev/null @@ -1,86 +0,0 @@ - -SoupAuthDomainBasic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@optname1: -@...: -@Returns: - - - - - - - -@domain: -@msg: -@username: -@password: -@user_data: -@Returns: - - - - - - - -@domain: -@callback: -@user_data: -@dnotify: - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-auth-domain-digest.sgml b/docs/reference/tmpl/soup-auth-domain-digest.sgml deleted file mode 100644 index 942cf3c9..00000000 --- a/docs/reference/tmpl/soup-auth-domain-digest.sgml +++ /dev/null @@ -1,96 +0,0 @@ - -SoupAuthDomainDigest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@optname1: -@...: -@Returns: - - - - - - - -@domain: -@msg: -@username: -@user_data: -@Returns: - - - - - - - -@domain: -@callback: -@user_data: -@dnotify: - - - - - - - -@username: -@realm: -@password: -@Returns: - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-auth-domain.sgml b/docs/reference/tmpl/soup-auth-domain.sgml deleted file mode 100644 index ba058c0d..00000000 --- a/docs/reference/tmpl/soup-auth-domain.sgml +++ /dev/null @@ -1,237 +0,0 @@ - -SoupAuthDomain - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@domain: -@path: - - - - - - - -@domain: -@path: - - - - - - - -@domain: -@msg: -@user_data: -@Returns: - - - - - - - -@domain: -@filter: -@filter_data: -@dnotify: - - - - - - - -@domain: -@Returns: - - - - - - - -@domain: -@msg: -@username: -@user_data: -@Returns: - - - - - - - -@domain: -@auth_callback: -@auth_data: -@dnotify: - - - - - - - -@domain: -@msg: -@username: -@password: -@Returns: - - - - - - - -@domain: -@msg: -@Returns: - - - - - - - -@domain: -@msg: -@Returns: - - - - - - - -@domain: -@msg: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-auth-manager.sgml b/docs/reference/tmpl/soup-auth-manager.sgml deleted file mode 100644 index 7834d920..00000000 --- a/docs/reference/tmpl/soup-auth-manager.sgml +++ /dev/null @@ -1,55 +0,0 @@ - -SoupAuthManager - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@soupauthmanager: the object which received the signal. -@arg1: -@arg2: -@arg3: - - - - - - - - - - - - - -@manager: -@uri: -@auth: - - diff --git a/docs/reference/tmpl/soup-auth.sgml b/docs/reference/tmpl/soup-auth.sgml deleted file mode 100644 index fb3d4914..00000000 --- a/docs/reference/tmpl/soup-auth.sgml +++ /dev/null @@ -1,234 +0,0 @@ - -SoupAuth - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@type: -@msg: -@auth_header: -@Returns: - - - - - - - -@auth: -@msg: -@auth_header: -@Returns: - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@auth: -@Returns: - - - - - - - -@auth: -@Returns: - - - - - - - -@auth: -@Returns: - - - - - - - -@auth: -@Returns: - - - - - - - -@auth: -@Returns: - - - - - - - -@auth: -@username: -@password: - - - - - - - -@auth: -@Returns: - - - - - - - -@auth: -@msg: -@Returns: - - - - - - - -@auth: -@msg: -@Returns: - - - - - - - -@auth: -@source_uri: -@Returns: - - - - - - - -@auth: -@space: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-cache.sgml b/docs/reference/tmpl/soup-cache.sgml deleted file mode 100644 index 30d60d5f..00000000 --- a/docs/reference/tmpl/soup-cache.sgml +++ /dev/null @@ -1,106 +0,0 @@ - -SoupCache - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@SOUP_CACHE_SINGLE_USER: -@SOUP_CACHE_SHARED: - - - - - - -@cache_dir: -@cache_type: -@Returns: - - - - - - - -@cache: - - - - - - - -@cache: - - - - - - - -@cache: - - - - - - - -@cache: - - - - - - - -@cache: -@Returns: - - - - - - - -@cache: -@max_size: - - diff --git a/docs/reference/tmpl/soup-content-decoder.sgml b/docs/reference/tmpl/soup-content-decoder.sgml deleted file mode 100644 index 23b9b453..00000000 --- a/docs/reference/tmpl/soup-content-decoder.sgml +++ /dev/null @@ -1,28 +0,0 @@ - -SoupContentDecoder - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-content-sniffer.sgml b/docs/reference/tmpl/soup-content-sniffer.sgml deleted file mode 100644 index d6cd00e1..00000000 --- a/docs/reference/tmpl/soup-content-sniffer.sgml +++ /dev/null @@ -1,58 +0,0 @@ - -SoupContentSniffer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@sniffer: -@msg: -@buffer: -@params: -@Returns: - - - - - - - -@sniffer: -@Returns: - - diff --git a/docs/reference/tmpl/soup-cookie-jar-db.sgml b/docs/reference/tmpl/soup-cookie-jar-db.sgml deleted file mode 100644 index 8d863125..00000000 --- a/docs/reference/tmpl/soup-cookie-jar-db.sgml +++ /dev/null @@ -1,50 +0,0 @@ - -SoupCookieJarDB - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@filename: -@read_only: -@Returns: - - - - - - - - - diff --git a/docs/reference/tmpl/soup-cookie-jar-text.sgml b/docs/reference/tmpl/soup-cookie-jar-text.sgml deleted file mode 100644 index 7fa93d15..00000000 --- a/docs/reference/tmpl/soup-cookie-jar-text.sgml +++ /dev/null @@ -1,50 +0,0 @@ - -SoupCookieJarText - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@filename: -@read_only: -@Returns: - - - - - - - - - diff --git a/docs/reference/tmpl/soup-cookie-jar.sgml b/docs/reference/tmpl/soup-cookie-jar.sgml deleted file mode 100644 index 3f45a214..00000000 --- a/docs/reference/tmpl/soup-cookie-jar.sgml +++ /dev/null @@ -1,186 +0,0 @@ - -SoupCookieJar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@soupcookiejar: the object which received the signal. -@arg1: -@arg2: - - - - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@jar: -@uri: -@for_http: -@Returns: - - - - - - - -@jar: -@uri: -@for_http: -@Returns: - - - - - - - -@jar: -@uri: -@cookie: - - - - - - - -@jar: -@uri: -@first_party: -@cookie: - - - - - - - -@jar: -@cookie: - - - - - - - -@jar: -@first_party: -@cookie: - - - - - - - -@jar: -@cookie: - - - - - - - -@jar: -@Returns: - - - - - - - -@SOUP_COOKIE_JAR_ACCEPT_ALWAYS: -@SOUP_COOKIE_JAR_ACCEPT_NEVER: -@SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY: - - - - - - -@jar: -@Returns: - - - - - - - -@jar: -@policy: - - - - - - - -@jar: -@Returns: - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-cookie.sgml b/docs/reference/tmpl/soup-cookie.sgml deleted file mode 100644 index 5e850bc2..00000000 --- a/docs/reference/tmpl/soup-cookie.sgml +++ /dev/null @@ -1,322 +0,0 @@ - -SoupCookie - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@name: -@value: -@domain: -@path: -@max_age: -@Returns: - - - - - - - -@header: -@origin: -@Returns: - - - - - - - -@cookie: -@Returns: - - - - - - - -@cookie: - - - - - - - -@cookie: -@name: - - - - - - - -@cookie: -@Returns: - - - - - - - -@cookie: -@value: - - - - - - - -@cookie: -@Returns: - - - - - - - -@cookie: -@domain: - - - - - - - -@cookie: -@Returns: - - - - - - - -@cookie: -@path: - - - - - - - -@cookie: -@Returns: - - - - - - - -@cookie: -@max_age: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@cookie: -@expires: - - - - - - - -@cookie: -@Returns: - - - - - - - -@cookie: -@secure: - - - - - - - -@cookie: -@Returns: - - - - - - - -@cookie: -@http_only: - - - - - - - -@cookie: -@Returns: - - - - - - - -@cookie: -@uri: -@Returns: - - - - - - - -@cookie: -@host: -@Returns: - - - - - - - -@cookie: -@Returns: - - - - - - - -@cookie: -@Returns: - - - - - - - -@msg: -@Returns: - - - - - - - -@msg: -@Returns: - - - - - - - -@cookies: -@msg: - - - - - - - -@cookies: -@msg: - - - - - - - -@cookies: -@Returns: - - - - - - - -@cookies: - - diff --git a/docs/reference/tmpl/soup-form.sgml b/docs/reference/tmpl/soup-form.sgml deleted file mode 100644 index b80fa4b6..00000000 --- a/docs/reference/tmpl/soup-form.sgml +++ /dev/null @@ -1,140 +0,0 @@ - -HTML Form Support - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@encoded_form: -@Returns: - - - - - - - -@msg: -@file_control_name: -@filename: -@content_type: -@file: -@Returns: - - - - - - - -@first_field: -@...: -@Returns: - - - - - - - -@form_data_set: -@Returns: - - - - - - - -@form_data_set: -@Returns: - - - - - - - -@first_field: -@args: -@Returns: - - - - - - - -@method: -@uri: -@first_field: -@...: -@Returns: - - - - - - - -@method: -@uri: -@form_data_set: -@Returns: - - - - - - - -@method: -@uri: -@form_data_set: -@Returns: - - - - - - - -@uri: -@multipart: -@Returns: - - diff --git a/docs/reference/tmpl/soup-logger.sgml b/docs/reference/tmpl/soup-logger.sgml deleted file mode 100644 index 5056e1f5..00000000 --- a/docs/reference/tmpl/soup-logger.sgml +++ /dev/null @@ -1,122 +0,0 @@ - -SoupLogger - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@SOUP_LOGGER_LOG_NONE: -@SOUP_LOGGER_LOG_MINIMAL: -@SOUP_LOGGER_LOG_HEADERS: -@SOUP_LOGGER_LOG_BODY: - - - - - - -@level: -@max_body_size: -@Returns: - - - - - - - -@logger: -@session: - - - - - - - -@logger: -@session: - - - - - - - -@logger: -@msg: -@user_data: -@Returns: - - - - - - - -@logger: -@request_filter: -@filter_data: -@destroy: - - - - - - - -@logger: -@response_filter: -@filter_data: -@destroy: - - - - - - - -@logger: -@level: -@direction: -@data: -@user_data: - - - - - - - -@logger: -@printer: -@printer_data: -@destroy: - - diff --git a/docs/reference/tmpl/soup-message-body.sgml b/docs/reference/tmpl/soup-message-body.sgml deleted file mode 100644 index 7fc31a57..00000000 --- a/docs/reference/tmpl/soup-message-body.sgml +++ /dev/null @@ -1,251 +0,0 @@ - -SoupMessageBody - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@SOUP_MEMORY_STATIC: -@SOUP_MEMORY_TAKE: -@SOUP_MEMORY_COPY: -@SOUP_MEMORY_TEMPORARY: - - - - - - -@use: -@data: -@length: -@Returns: - - - - - - - -@parent: -@offset: -@length: -@Returns: - - - - - - - -@data: -@length: -@owner: -@owner_dnotify: -@Returns: - - - - - - - -@data: -@length: -@Returns: - - - - - - - -@buffer: -@Returns: - - - - - - - -@buffer: -@data: -@length: - - - - - - - -@buffer: -@Returns: - - - - - - - -@buffer: - - - - - - - -@buffer: -@Returns: - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@body: - - - - - - - -@body: -@accumulate: - - - - - - - -@body: -@Returns: - - - - - - - -@body: -@use: -@data: -@length: - - - - - - - -@body: -@buffer: - - - - - - - -@body: -@data: -@length: - - - - - - - -@body: - - - - - - - -@body: - - - - - - - -@body: -@Returns: - - - - - - - -@body: -@offset: -@Returns: - - - - - - - -@body: -@chunk: - - - - - - - -@body: -@chunk: - - diff --git a/docs/reference/tmpl/soup-message-headers.sgml b/docs/reference/tmpl/soup-message-headers.sgml deleted file mode 100644 index b29eb9e7..00000000 --- a/docs/reference/tmpl/soup-message-headers.sgml +++ /dev/null @@ -1,362 +0,0 @@ - -SoupMessageHeaders - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@SOUP_MESSAGE_HEADERS_REQUEST: -@SOUP_MESSAGE_HEADERS_RESPONSE: -@SOUP_MESSAGE_HEADERS_MULTIPART: - - - - - - -@type: -@Returns: - - - - - - - -@hdrs: - - - - - - - -@hdrs: -@name: -@value: - - - - - - - -@hdrs: -@name: -@value: - - - - - - - -@hdrs: -@name: - - - - - - - -@hdrs: - - - - - - - -@hdrs: - - - - - - - -@hdrs: -@name: -@Returns: - - - - - - - -@hdrs: -@name: -@Returns: - - - - - - - -@hdrs: -@name: -@Returns: - - - - - - - -@name: -@value: -@user_data: - - - - - - - -@hdrs: -@func: -@user_data: - - - - - - - - - - - - - -@iter: -@hdrs: - - - - - - - -@iter: -@name: -@value: -@Returns: - - - - - - - -@SOUP_ENCODING_UNRECOGNIZED: -@SOUP_ENCODING_NONE: -@SOUP_ENCODING_CONTENT_LENGTH: -@SOUP_ENCODING_EOF: -@SOUP_ENCODING_CHUNKED: -@SOUP_ENCODING_BYTERANGES: - - - - - - -@hdrs: -@Returns: - - - - - - - -@hdrs: -@encoding: - - - - - - - -@hdrs: -@Returns: - - - - - - - -@hdrs: -@content_length: - - - - - - - -@SOUP_EXPECTATION_UNRECOGNIZED: -@SOUP_EXPECTATION_CONTINUE: - - - - - - -@hdrs: -@Returns: - - - - - - - -@hdrs: -@expectations: - - - - - - - -@hdrs: -@params: -@Returns: - - - - - - - -@hdrs: -@content_type: -@params: - - - - - - - -@hdrs: -@disposition: -@params: -@Returns: - - - - - - - -@hdrs: -@disposition: -@params: - - - - - - - -@start: -@end: - - - - - - -@hdrs: -@total_length: -@ranges: -@length: -@Returns: - - - - - - - -@hdrs: -@ranges: -@length: - - - - - - - -@hdrs: -@start: -@end: - - - - - - - -@hdrs: -@ranges: - - - - - - - -@hdrs: -@start: -@end: -@total_length: -@Returns: - - - - - - - -@hdrs: -@start: -@end: -@total_length: - - diff --git a/docs/reference/tmpl/soup-message.sgml b/docs/reference/tmpl/soup-message.sgml deleted file mode 100644 index bcf953b6..00000000 --- a/docs/reference/tmpl/soup-message.sgml +++ /dev/null @@ -1,626 +0,0 @@ - -SoupMessage - - - - - - - - - - - - - - - - - - - - - - - - - -@method: -@status_code: -@reason_phrase: -@request_body: -@request_headers: -@response_body: -@response_headers: - - - - - - -@soupmessage: the object which received the signal. -@arg1: -@arg2: - - - - - - -@soupmessage: the object which received the signal. - - - - - - -@soupmessage: the object which received the signal. - - - - - - -@soupmessage: the object which received the signal. -@arg1: - - - - - - -@soupmessage: the object which received the signal. - - - - - - -@soupmessage: the object which received the signal. - - - - - - -@soupmessage: the object which received the signal. -@arg1: -@arg2: - - - - - - -@soupmessage: the object which received the signal. - - - - - - -@soupmessage: the object which received the signal. - - - - - - -@soupmessage: the object which received the signal. -@arg1: - - - - - - -@soupmessage: the object which received the signal. - - - - - - -@soupmessage: the object which received the signal. - - - - - - -@soupmessage: the object which received the signal. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@method: -@uri_string: -@Returns: - - - - - - - -@method: -@uri: -@Returns: - - - - - - - -@msg: -@content_type: -@req_use: -@req_body: -@req_length: - - - - - - - -@msg: -@content_type: -@resp_use: -@resp_body: -@resp_length: - - - - - - - -@SOUP_HTTP_1_0: -@SOUP_HTTP_1_1: - - - - - - -@msg: -@version: - - - - - - - -@msg: -@Returns: - - - - - - - -@msg: -@Returns: - - - - - - - -@msg: -@uri: - - - - - - - -@msg: -@Returns: - - - - - - - -@msg: -@status_code: - - - - - - - -@msg: -@status_code: -@reason_phrase: - - - - - - - -@msg: -@status_code: -@redirect_uri: - - - - - - - -@msg: -@Returns: - - - - - - - -@msg: -@certificate: -@errors: -@Returns: - - - - - - - -@msg: -@first_party: - - - - - - - -@msg: -@Returns: - - - - - - - -@msg: -@signal: -@header: -@callback: -@user_data: -@Returns: - - - - - - - -@msg: -@signal: -@status_code: -@callback: -@user_data: -@Returns: - - - - - - - -@SOUP_MESSAGE_NO_REDIRECT: -@SOUP_MESSAGE_CAN_REBUILD: -@SOUP_MESSAGE_OVERWRITE_CHUNKS: -@SOUP_MESSAGE_CONTENT_DECODED: -@SOUP_MESSAGE_CERTIFICATE_TRUSTED: -@SOUP_MESSAGE_NEW_CONNECTION: -@SOUP_MESSAGE_IDEMPOTENT: - - - - - - -@msg: -@flags: - - - - - - - -@msg: -@Returns: - - - - - - - -@msg: -@max_len: -@user_data: -@Returns: - - - - - - - -@msg: -@allocator: -@user_data: -@destroy_notify: - - - - - - - -@msg: -@feature_type: - - - - - - - -@msg: -@Returns: - - - - - - - -@SOUP_MESSAGE_PRIORITY_VERY_LOW: -@SOUP_MESSAGE_PRIORITY_LOW: -@SOUP_MESSAGE_PRIORITY_NORMAL: -@SOUP_MESSAGE_PRIORITY_HIGH: -@SOUP_MESSAGE_PRIORITY_VERY_HIGH: - - - - - - -@msg: -@Returns: - - - - - - - -@msg: -@priority: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-method.sgml b/docs/reference/tmpl/soup-method.sgml deleted file mode 100644 index d2996e19..00000000 --- a/docs/reference/tmpl/soup-method.sgml +++ /dev/null @@ -1,127 +0,0 @@ - -soup-method - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-misc.sgml b/docs/reference/tmpl/soup-misc.sgml deleted file mode 100644 index 92d2f0a1..00000000 --- a/docs/reference/tmpl/soup-misc.sgml +++ /dev/null @@ -1,399 +0,0 @@ - -Soup Miscellaneous Utilities - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@SOUP_DATE_HTTP: -@SOUP_DATE_COOKIE: -@SOUP_DATE_RFC2822: -@SOUP_DATE_ISO8601_COMPACT: -@SOUP_DATE_ISO8601_FULL: -@SOUP_DATE_ISO8601: -@SOUP_DATE_ISO8601_XMLRPC: - - - - - - -@year: -@month: -@day: -@hour: -@minute: -@second: -@Returns: - - - - - - - -@date_string: -@Returns: - - - - - - - -@when: -@Returns: - - - - - - - -@offset_seconds: -@Returns: - - - - - - - -@date: -@format: -@Returns: - - - - - - - -@date: -@Returns: - - - - - - - -@date: -@time: - - - - - - - -@date: -@Returns: - - - - - - - -@date: -@Returns: - - - - - - - -@date: -@Returns: - - - - - - - -@date: -@Returns: - - - - - - - -@date: -@Returns: - - - - - - - -@date: -@Returns: - - - - - - - -@date: -@Returns: - - - - - - - -@date: -@Returns: - - - - - - - -@date: -@Returns: - - - - - - - -@date: - - - - - - - -@str: -@len: -@req_headers: -@req_method: -@req_path: -@ver: -@Returns: - - - - - - - -@str: -@len: -@headers: -@ver: -@status_code: -@reason_phrase: -@Returns: - - - - - - - -@status_line: -@ver: -@status_code: -@reason_phrase: -@Returns: - - - - - - - -@str: -@len: -@dest: -@Returns: - - - - - - - -@header: -@Returns: - - - - - - - -@header: -@unacceptable: -@Returns: - - - - - - - -@list: - - - - - - - -@header: -@token: -@Returns: - - - - - - - -@header: -@Returns: - - - - - - - -@header: -@Returns: - - - - - - - -@param_list: - - - - - - - -@string: -@name: -@value: - - - - - - - -@string: -@name: -@value: - - - - - - - -@v1: -@v2: -@Returns: - - - - - - - -@key: -@Returns: - - - - - - - -@async_context: -@function: -@data: -@Returns: - - - - - - - -@async_context: -@function: -@data: -@Returns: - - - - - - - -@async_context: -@chan: -@condition: -@function: -@data: -@Returns: - - - - - - - -@async_context: -@interval: -@function: -@data: -@Returns: - - diff --git a/docs/reference/tmpl/soup-multipart-input-stream.sgml b/docs/reference/tmpl/soup-multipart-input-stream.sgml deleted file mode 100644 index 12e3315d..00000000 --- a/docs/reference/tmpl/soup-multipart-input-stream.sgml +++ /dev/null @@ -1,86 +0,0 @@ - -SoupMultipartInputStream - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@msg: -@base_stream: -@Returns: - - - - - - - -@multipart: -@Returns: - - - - - - - -@multipart: -@cancellable: -@error: -@Returns: - - - - - - - -@multipart: -@io_priority: -@cancellable: -@callback: -@data: - - - - - - - -@multipart: -@result: -@error: -@Returns: - - diff --git a/docs/reference/tmpl/soup-multipart.sgml b/docs/reference/tmpl/soup-multipart.sgml deleted file mode 100644 index 5b0145d1..00000000 --- a/docs/reference/tmpl/soup-multipart.sgml +++ /dev/null @@ -1,118 +0,0 @@ - -SoupMultipart - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@mime_type: -@Returns: - - - - - - - -@headers: -@body: -@Returns: - - - - - - - -@multipart: - - - - - - - -@multipart: -@Returns: - - - - - - - -@multipart: -@part: -@headers: -@body: -@Returns: - - - - - - - -@multipart: -@headers: -@body: - - - - - - - -@multipart: -@control_name: -@data: - - - - - - - -@multipart: -@control_name: -@filename: -@content_type: -@body: - - - - - - - -@multipart: -@dest_headers: -@dest_body: - - diff --git a/docs/reference/tmpl/soup-proxy-resolver-default.sgml b/docs/reference/tmpl/soup-proxy-resolver-default.sgml deleted file mode 100644 index a36aaa2f..00000000 --- a/docs/reference/tmpl/soup-proxy-resolver-default.sgml +++ /dev/null @@ -1,33 +0,0 @@ - -SoupProxyResolverDefault - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-request-data.sgml b/docs/reference/tmpl/soup-request-data.sgml deleted file mode 100644 index 31ab1e0c..00000000 --- a/docs/reference/tmpl/soup-request-data.sgml +++ /dev/null @@ -1,28 +0,0 @@ - -SoupRequestData - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-request-file.sgml b/docs/reference/tmpl/soup-request-file.sgml deleted file mode 100644 index 229a99cf..00000000 --- a/docs/reference/tmpl/soup-request-file.sgml +++ /dev/null @@ -1,37 +0,0 @@ - -SoupRequestFile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@file: -@Returns: - - diff --git a/docs/reference/tmpl/soup-request-http.sgml b/docs/reference/tmpl/soup-request-http.sgml deleted file mode 100644 index 0a0d1cf3..00000000 --- a/docs/reference/tmpl/soup-request-http.sgml +++ /dev/null @@ -1,37 +0,0 @@ - -SoupRequestHTTP - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@http: -@Returns: - - diff --git a/docs/reference/tmpl/soup-request.sgml b/docs/reference/tmpl/soup-request.sgml deleted file mode 100644 index 3003847a..00000000 --- a/docs/reference/tmpl/soup-request.sgml +++ /dev/null @@ -1,121 +0,0 @@ - -SoupRequest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@request: -@cancellable: -@error: -@Returns: - - - - - - - -@request: -@cancellable: -@callback: -@user_data: - - - - - - - -@request: -@result: -@error: -@Returns: - - - - - - - -@request: -@Returns: - - - - - - - -@request: -@Returns: - - - - - - - -@request: -@Returns: - - - - - - - -@request: -@Returns: - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-server-deprecated.sgml b/docs/reference/tmpl/soup-server-deprecated.sgml deleted file mode 100644 index e18a391a..00000000 --- a/docs/reference/tmpl/soup-server-deprecated.sgml +++ /dev/null @@ -1,126 +0,0 @@ - -SoupServer deprecated API - - - - - - - - - - - - - - - - - - - - - - - - - -@server: -@Returns: - - - - - - - -@server: -@Returns: - - - - - - - -@server: - - - - - - - -@server: - - - - - - - -@server: - - - - - - - -@server: -@Returns: - - - - - - - -@client: -@Returns: - - - - - - - -@client: -@Returns: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-server.sgml b/docs/reference/tmpl/soup-server.sgml deleted file mode 100644 index 81bff025..00000000 --- a/docs/reference/tmpl/soup-server.sgml +++ /dev/null @@ -1,383 +0,0 @@ - -SoupServer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@soupserver: the object which received the signal. -@arg1: -@arg2: - - - - - - -@soupserver: the object which received the signal. -@arg1: -@arg2: - - - - - - -@soupserver: the object which received the signal. -@arg1: -@arg2: - - - - - - -@soupserver: the object which received the signal. -@arg1: -@arg2: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@optname1: -@...: -@Returns: - - - - - - - -@server: -@Returns: - - - - - - - -@server: -@Returns: - - - - - - - -@server: -@Returns: - - - - - - - -@server: - - - - - - - -@server: - - - - - - - -@server: - - - - - - - -@server: - - - - - - - -@server: -@Returns: - - - - - - - -@server: -@msg: -@path: -@query: -@client: -@user_data: - - - - - - - -@server: -@path: -@callback: -@user_data: -@destroy: - - - - - - - -@server: -@path: - - - - - - - - - - - - - -@client: -@Returns: - - - - - - - -@client: -@Returns: - - - - - - - -@client: -@Returns: - - - - - - - -@client: -@Returns: - - - - - - - -@client: -@Returns: - - - - - - - -@server: -@auth_domain: - - - - - - - -@server: -@auth_domain: - - - - - - - -@server: -@msg: - - - - - - - -@server: -@msg: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-session-async.sgml b/docs/reference/tmpl/soup-session-async.sgml deleted file mode 100644 index 84ce2d8b..00000000 --- a/docs/reference/tmpl/soup-session-async.sgml +++ /dev/null @@ -1,47 +0,0 @@ - -SoupSessionAsync - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@optname1: -@...: -@Returns: - - diff --git a/docs/reference/tmpl/soup-session-feature.sgml b/docs/reference/tmpl/soup-session-feature.sgml deleted file mode 100644 index 7ba9a25a..00000000 --- a/docs/reference/tmpl/soup-session-feature.sgml +++ /dev/null @@ -1,43 +0,0 @@ - -SoupSessionFeature - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@parent: -@attach: -@detach: -@request_queued: -@request_started: -@request_unqueued: -@add_feature: -@remove_feature: -@has_feature: - diff --git a/docs/reference/tmpl/soup-session-sync.sgml b/docs/reference/tmpl/soup-session-sync.sgml deleted file mode 100644 index 3f520a5a..00000000 --- a/docs/reference/tmpl/soup-session-sync.sgml +++ /dev/null @@ -1,47 +0,0 @@ - -SoupSessionSync - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@optname1: -@...: -@Returns: - - diff --git a/docs/reference/tmpl/soup-session.sgml b/docs/reference/tmpl/soup-session.sgml deleted file mode 100644 index 8de079a8..00000000 --- a/docs/reference/tmpl/soup-session.sgml +++ /dev/null @@ -1,656 +0,0 @@ - -SoupSession - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@soupsession: the object which received the signal. -@arg1: -@arg2: -@arg3: - - - - - - -@soupsession: the object which received the signal. -@arg1: - - - - - - -@soupsession: the object which received the signal. -@arg1: - - - - - - -@soupsession: the object which received the signal. -@arg1: -@arg2: - - - - - - -@soupsession: the object which received the signal. -@arg1: - - - - - - -@soupsession: the object which received the signal. -@arg1: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@optname1: -@...: -@Returns: - - - - - - - -@session: -@uri_string: -@error: -@Returns: - - - - - - - -@session: -@uri: -@error: -@Returns: - - - - - - - -@session: -@method: -@uri_string: -@error: -@Returns: - - - - - - - -@session: -@method: -@uri: -@error: -@Returns: - - - - - - - -@SOUP_REQUEST_ERROR_BAD_URI: -@SOUP_REQUEST_ERROR_UNSUPPORTED_URI_SCHEME: -@SOUP_REQUEST_ERROR_PARSING: -@SOUP_REQUEST_ERROR_ENCODING: - - - - - - - - - - - - - -@session: -@msg: -@user_data: - - - - - - - -@session: -@msg: -@callback: -@user_data: - - - - - - - -@session: -@msg: - - - - - - - -@session: -@msg: -@Returns: - - - - - - - -@session: -@msg: -@status_code: - - - - - - - -@session: -@msg: -@cancellable: -@error: -@Returns: - - - - - - - -@session: -@msg: -@cancellable: -@callback: -@user_data: - - - - - - - -@session: -@result: -@error: -@Returns: - - - - - - - -@session: -@hostname: -@cancellable: -@callback: -@user_data: - - - - - - - -@session: -@uri: - - - - - - - -@session: - - - - - - - -@session: -@msg: -@Returns: - - - - - - - -@session: -@msg: -@Returns: - - - - - - - -@session: -@msg: - - - - - - - -@session: -@msg: - - - - - - - -@session: -@Returns: - - - - - - - -@session: -@feature: - - - - - - - -@session: -@feature_type: - - - - - - - -@session: -@feature: - - - - - - - -@session: -@feature_type: - - - - - - - -@session: -@feature_type: -@Returns: - - - - - - - -@session: -@feature_type: -@Returns: - - - - - - - -@session: -@feature_type: -@msg: -@Returns: - - - - - - - -@session: -@feature_type: -@Returns: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-socket.sgml b/docs/reference/tmpl/soup-socket.sgml deleted file mode 100644 index fe26d3fa..00000000 --- a/docs/reference/tmpl/soup-socket.sgml +++ /dev/null @@ -1,411 +0,0 @@ - -SoupSocket - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@soupsocket: the object which received the signal. - - - - - - -@soupsocket: the object which received the signal. -@arg1: -@arg2: - - - - - - -@soupsocket: the object which received the signal. -@arg1: - - - - - - -@soupsocket: the object which received the signal. - - - - - - -@soupsocket: the object which received the signal. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@optname1: -@...: -@Returns: - - - - - - - -@sock: -@status: -@user_data: - - - - - - - -@sock: -@cancellable: -@callback: -@user_data: - - - - - - - -@sock: -@cancellable: -@Returns: - - - - - - - -@sock: -@Returns: - - - - - - - -@sock: -@cancellable: -@Returns: - - - - - - - -@sock: -@ssl_host: -@cancellable: -@Returns: - - - - - - - -@sock: -@Returns: - - - - - - - -@sock: - - - - - - - -@sock: -@Returns: - - - - - - - -@sock: -@Returns: - - - - - - - -@sock: -@Returns: - - - - - - - -@sock: -@Returns: - - - - - - - -@SOUP_SOCKET_OK: -@SOUP_SOCKET_WOULD_BLOCK: -@SOUP_SOCKET_EOF: -@SOUP_SOCKET_ERROR: - - - - - - -@sock: -@buffer: -@len: -@nread: -@cancellable: -@error: -@Returns: - - - - - - - -@sock: -@buffer: -@len: -@boundary: -@boundary_len: -@nread: -@got_boundary: -@cancellable: -@error: -@Returns: - - - - - - - -@sock: -@buffer: -@len: -@nwrote: -@cancellable: -@error: -@Returns: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-status.sgml b/docs/reference/tmpl/soup-status.sgml deleted file mode 100644 index 38fe6ba6..00000000 --- a/docs/reference/tmpl/soup-status.sgml +++ /dev/null @@ -1,164 +0,0 @@ - -soup-status - - - - - - - - - - - - - - - - - - - - - - - - - -@status: - - - - - - - -@status: - - - - - - - -@status: - - - - - - - -@status: - - - - - - - -@status: - - - - - - - -@status: - - - - - - - -@SOUP_STATUS_NONE: -@SOUP_STATUS_CANCELLED: -@SOUP_STATUS_CANT_RESOLVE: -@SOUP_STATUS_CANT_RESOLVE_PROXY: -@SOUP_STATUS_CANT_CONNECT: -@SOUP_STATUS_CANT_CONNECT_PROXY: -@SOUP_STATUS_SSL_FAILED: -@SOUP_STATUS_IO_ERROR: -@SOUP_STATUS_MALFORMED: -@SOUP_STATUS_TRY_AGAIN: -@SOUP_STATUS_TOO_MANY_REDIRECTS: -@SOUP_STATUS_TLS_FAILED: -@SOUP_STATUS_CONTINUE: -@SOUP_STATUS_SWITCHING_PROTOCOLS: -@SOUP_STATUS_PROCESSING: -@SOUP_STATUS_OK: -@SOUP_STATUS_CREATED: -@SOUP_STATUS_ACCEPTED: -@SOUP_STATUS_NON_AUTHORITATIVE: -@SOUP_STATUS_NO_CONTENT: -@SOUP_STATUS_RESET_CONTENT: -@SOUP_STATUS_PARTIAL_CONTENT: -@SOUP_STATUS_MULTI_STATUS: -@SOUP_STATUS_MULTIPLE_CHOICES: -@SOUP_STATUS_MOVED_PERMANENTLY: -@SOUP_STATUS_FOUND: -@SOUP_STATUS_MOVED_TEMPORARILY: -@SOUP_STATUS_SEE_OTHER: -@SOUP_STATUS_NOT_MODIFIED: -@SOUP_STATUS_USE_PROXY: -@SOUP_STATUS_NOT_APPEARING_IN_THIS_PROTOCOL: -@SOUP_STATUS_TEMPORARY_REDIRECT: -@SOUP_STATUS_BAD_REQUEST: -@SOUP_STATUS_UNAUTHORIZED: -@SOUP_STATUS_PAYMENT_REQUIRED: -@SOUP_STATUS_FORBIDDEN: -@SOUP_STATUS_NOT_FOUND: -@SOUP_STATUS_METHOD_NOT_ALLOWED: -@SOUP_STATUS_NOT_ACCEPTABLE: -@SOUP_STATUS_PROXY_AUTHENTICATION_REQUIRED: -@SOUP_STATUS_PROXY_UNAUTHORIZED: -@SOUP_STATUS_REQUEST_TIMEOUT: -@SOUP_STATUS_CONFLICT: -@SOUP_STATUS_GONE: -@SOUP_STATUS_LENGTH_REQUIRED: -@SOUP_STATUS_PRECONDITION_FAILED: -@SOUP_STATUS_REQUEST_ENTITY_TOO_LARGE: -@SOUP_STATUS_REQUEST_URI_TOO_LONG: -@SOUP_STATUS_UNSUPPORTED_MEDIA_TYPE: -@SOUP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE: -@SOUP_STATUS_INVALID_RANGE: -@SOUP_STATUS_EXPECTATION_FAILED: -@SOUP_STATUS_UNPROCESSABLE_ENTITY: -@SOUP_STATUS_LOCKED: -@SOUP_STATUS_FAILED_DEPENDENCY: -@SOUP_STATUS_INTERNAL_SERVER_ERROR: -@SOUP_STATUS_NOT_IMPLEMENTED: -@SOUP_STATUS_BAD_GATEWAY: -@SOUP_STATUS_SERVICE_UNAVAILABLE: -@SOUP_STATUS_GATEWAY_TIMEOUT: -@SOUP_STATUS_HTTP_VERSION_NOT_SUPPORTED: -@SOUP_STATUS_INSUFFICIENT_STORAGE: -@SOUP_STATUS_NOT_EXTENDED: - - - - - - -@status_code: -@Returns: - - - - - - - -@status_code: -@Returns: - - - - - - - - - diff --git a/docs/reference/tmpl/soup-tld.sgml b/docs/reference/tmpl/soup-tld.sgml deleted file mode 100644 index cebe2e7d..00000000 --- a/docs/reference/tmpl/soup-tld.sgml +++ /dev/null @@ -1,58 +0,0 @@ - -Top Level Domain utils - - - - - - - - - - - - - - - - - - - - - - - - - -@hostname: -@error: -@Returns: - - - - - - - -@domain: -@Returns: - - - - - - - - - - - - - - -@SOUP_TLD_ERROR_INVALID_HOSTNAME: -@SOUP_TLD_ERROR_IS_IP_ADDRESS: -@SOUP_TLD_ERROR_NOT_ENOUGH_DOMAINS: -@SOUP_TLD_ERROR_NO_BASE_DOMAIN: - diff --git a/docs/reference/tmpl/soup-uri.sgml b/docs/reference/tmpl/soup-uri.sgml deleted file mode 100644 index 64d5c92e..00000000 --- a/docs/reference/tmpl/soup-uri.sgml +++ /dev/null @@ -1,371 +0,0 @@ - -SoupURI - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@base: -@uri_string: -@Returns: - - - - - - - -@uri_string: -@Returns: - - - - - - - -@uri: -@just_path_and_query: -@Returns: - - - - - - - -@uri: -@Returns: - - - - - - - -@uri: -@Returns: - - - - - - - -@uri1: -@uri2: -@Returns: - - - - - - - -@v1: -@v2: -@Returns: - - - - - - - -@key: -@Returns: - - - - - - - -@uri: - - - - - - - -@part: -@escape_extra: -@Returns: - - - - - - - -@part: -@Returns: - - - - - - - -@part: -@unescape_extra: -@Returns: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@uri: -@Returns: - - - - - - - -@uri: - - - - - - - -@uri: - - - - - - - -@uri: -@scheme: - - - - - - - -@uri: -@Returns: - - - - - - - -@uri: -@user: - - - - - - - -@uri: -@Returns: - - - - - - - -@uri: -@password: - - - - - - - -@uri: -@Returns: - - - - - - - -@uri: -@host: - - - - - - - -@uri: -@Returns: - - - - - - - -@uri: -@port: - - - - - - - -@uri: -@Returns: - - - - - - - -@uri: -@path: - - - - - - - -@uri: -@Returns: - - - - - - - -@uri: -@query: - - - - - - - -@uri: -@form: - - - - - - - -@uri: -@first_field: -@...: - - - - - - - -@uri: -@Returns: - - - - - - - -@uri: -@fragment: - - - - - - - -@uri: -@Returns: - - diff --git a/docs/reference/tmpl/soup-value-utils.sgml b/docs/reference/tmpl/soup-value-utils.sgml deleted file mode 100644 index aa70d0e2..00000000 --- a/docs/reference/tmpl/soup-value-utils.sgml +++ /dev/null @@ -1,203 +0,0 @@ - -GValue Support - - - - - - - - - - - - - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@first_key: -@...: -@Returns: - - - - - - - -@hash: -@key: -@value: - - - - - - - -@hash: -@key: -@type: -@...: - - - - - - - -@hash: -@first_key: -@...: - - - - - - - -@hash: -@key: -@type: -@...: -@Returns: - - - - - - - -@hash: -@first_key: -@...: -@Returns: - - - - - - - -@args: -@Returns: - - - - - - - -@array: -@args: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@first_type: -@...: -@Returns: - - - - - - - -@array: -@index_: -@type: -@...: - - - - - - - -@array: -@type: -@...: - - - - - - - -@array: -@first_type: -@...: - - - - - - - -@array: -@index_: -@type: -@...: -@Returns: - - - - - - - -@val: -@type: -@args: - - - - - - - -@val: -@type: -@args: - - - - - - - - - diff --git a/docs/reference/tmpl/soup-version.sgml b/docs/reference/tmpl/soup-version.sgml deleted file mode 100644 index d7e2847b..00000000 --- a/docs/reference/tmpl/soup-version.sgml +++ /dev/null @@ -1,189 +0,0 @@ - -Version Information - - - - - - - - - - - - - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@major: -@minor: -@micro: -@Returns: - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@major: -@minor: -@micro: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/tmpl/soup-xmlrpc.sgml b/docs/reference/tmpl/soup-xmlrpc.sgml deleted file mode 100644 index 4a5e7e9f..00000000 --- a/docs/reference/tmpl/soup-xmlrpc.sgml +++ /dev/null @@ -1,157 +0,0 @@ - -XMLRPC Support - - - - - - - - - - - - - - - - - - - - - - - - - -@method_name: -@params: -@n_params: -@Returns: - - - - - - - -@uri: -@method_name: -@...: -@Returns: - - - - - - - -@method_response: -@length: -@value: -@error: -@Returns: - - - - - - - -@method_response: -@length: -@error: -@type: -@...: -@Returns: - - - - - - - -@method_call: -@length: -@method_name: -@params: -@Returns: - - - - - - - -@method_call: -@length: -@method_name: -@...: -@Returns: - - - - - - - -@value: -@Returns: - - - - - - - -@fault_code: -@fault_format: -@...: -@Returns: - - - - - - - -@msg: -@type: -@...: - - - - - - - -@msg: -@fault_code: -@fault_format: -@...: - - - - - - - - - - - - - - -@SOUP_XMLRPC_FAULT_PARSE_ERROR_NOT_WELL_FORMED: -@SOUP_XMLRPC_FAULT_PARSE_ERROR_UNSUPPORTED_ENCODING: -@SOUP_XMLRPC_FAULT_PARSE_ERROR_INVALID_CHARACTER_FOR_ENCODING: -@SOUP_XMLRPC_FAULT_SERVER_ERROR_INVALID_XML_RPC: -@SOUP_XMLRPC_FAULT_SERVER_ERROR_REQUESTED_METHOD_NOT_FOUND: -@SOUP_XMLRPC_FAULT_SERVER_ERROR_INVALID_METHOD_PARAMETERS: -@SOUP_XMLRPC_FAULT_SERVER_ERROR_INTERNAL_XML_RPC_ERROR: -@SOUP_XMLRPC_FAULT_APPLICATION_ERROR: -@SOUP_XMLRPC_FAULT_SYSTEM_ERROR: -@SOUP_XMLRPC_FAULT_TRANSPORT_ERROR: - diff --git a/examples/Makefile.in b/examples/Makefile.in index 892d2561..04cb0dab 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,17 +91,17 @@ host_triplet = @host@ noinst_PROGRAMS = get$(EXEEXT) simple-httpd$(EXEEXT) \ simple-proxy$(EXEEXT) subdir = examples -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/glibtests.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/intltool.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/glibtests.m4 $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/vapigen.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -170,6 +180,8 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/build-aux/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ @@ -177,7 +189,6 @@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APACHE_HTTPD = @APACHE_HTTPD@ APACHE_MODULE_DIR = @APACHE_MODULE_DIR@ -APACHE_PHP_MODULE = @APACHE_PHP_MODULE@ APACHE_PHP_MODULE_DIR = @APACHE_PHP_MODULE_DIR@ APACHE_SSL_MODULE_DIR = @APACHE_SSL_MODULE_DIR@ AR = @AR@ @@ -189,6 +200,11 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL = @CURL@ @@ -204,6 +220,8 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ @@ -222,6 +240,7 @@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HAVE_GNOME = @HAVE_GNOME@ HTML_DIR = @HTML_DIR@ +IF_HAVE_MOD_UNIXD = @IF_HAVE_MOD_UNIXD@ IF_HAVE_PHP = @IF_HAVE_PHP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -244,6 +263,10 @@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +KRB5_CFLAGS = @KRB5_CFLAGS@ +KRB5_CONFIG = @KRB5_CONFIG@ +KRB5_LIBS = @KRB5_LIBS@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -255,6 +278,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -286,6 +310,7 @@ SOUP_AGE = @SOUP_AGE@ SOUP_API_VERSION = @SOUP_API_VERSION@ SOUP_CURRENT = @SOUP_CURRENT@ SOUP_DEBUG_FLAGS = @SOUP_DEBUG_FLAGS@ +SOUP_HIDDEN_VISIBILITY_CFLAGS = @SOUP_HIDDEN_VISIBILITY_CFLAGS@ SOUP_MAJOR_VERSION = @SOUP_MAJOR_VERSION@ SOUP_MICRO_VERSION = @SOUP_MICRO_VERSION@ SOUP_MINOR_VERSION = @SOUP_MINOR_VERSION@ @@ -294,6 +319,11 @@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ +VALAC = @VALAC@ +VAPIDIR = @VAPIDIR@ +VAPIGEN = @VAPIGEN@ +VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ +VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XML_CFLAGS = @XML_CFLAGS@ @@ -347,6 +377,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -377,7 +408,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign examples/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -432,14 +462,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -657,6 +687,8 @@ uninstall-am: mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/examples/get.c b/examples/get.c index a8888d49..f3380b59 100644 --- a/examples/get.c +++ b/examples/get.c @@ -4,6 +4,10 @@ * Copyright (C) 2013 Igalia, S.L. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include @@ -86,15 +90,76 @@ get_url (const char *url) fclose (output_file); } } + g_object_unref (msg); +} + +/* Inline class for providing a pre-configured client certificate */ +typedef struct _GetTlsCertInteraction GetTlsCertInteraction; +typedef struct _GetTlsCertInteractionClass GetTlsCertInteractionClass; + +static GType _get_tls_cert_interaction_get_type (void) G_GNUC_CONST; +static GetTlsCertInteraction * _get_tls_cert_interaction_new (GTlsCertificate *cert); + +struct _GetTlsCertInteraction +{ + GTlsInteraction parent_instance; + GTlsCertificate *cert; +}; + +struct _GetTlsCertInteractionClass +{ + GTlsInteractionClass parent_class; +}; + +G_DEFINE_TYPE (GetTlsCertInteraction, _get_tls_cert_interaction, G_TYPE_TLS_INTERACTION); + +static GTlsInteractionResult +request_certificate (GTlsInteraction *interaction, + GTlsConnection *connection, + GTlsCertificateRequestFlags flags, + GCancellable *cancellable, + GError **error) +{ + GetTlsCertInteraction *self = (GetTlsCertInteraction*)interaction; + g_tls_connection_set_certificate (connection, self->cert); + return G_TLS_INTERACTION_HANDLED; +} + +static void +_get_tls_cert_interaction_init (GetTlsCertInteraction *interaction) +{ +} + +static void +_get_tls_cert_interaction_class_init (GetTlsCertInteractionClass *klass) +{ + GTlsInteractionClass *interaction_class = G_TLS_INTERACTION_CLASS (klass); + interaction_class->request_certificate = request_certificate; +} + +GetTlsCertInteraction * +_get_tls_cert_interaction_new (GTlsCertificate *cert) +{ + GetTlsCertInteraction *self = g_object_new (_get_tls_cert_interaction_get_type (), NULL); + self->cert = g_object_ref (cert); + return self; } static const char *ca_file, *proxy; +static char *client_cert_file, *client_key_file; static gboolean synchronous, ntlm; +static gboolean negotiate; static GOptionEntry entries[] = { { "ca-file", 'c', 0, G_OPTION_ARG_STRING, &ca_file, "Use FILE as the TLS CA file", "FILE" }, + { "cert", 0, 0, + G_OPTION_ARG_STRING, &client_cert_file, + "Use FILE as the TLS client certificate file", "FILE" }, + { "key", 0, 0, + G_OPTION_ARG_STRING, &client_key_file, + "Use FILE as the TLS client key file", "FILE" }, { "debug", 'd', 0, G_OPTION_ARG_NONE, &debug, "Show HTTP headers", NULL }, @@ -119,6 +184,13 @@ static GOptionEntry entries[] = { { NULL } }; +static GOptionEntry negotiate_entries[] = { + { "negotiate", 'N', 0, + G_OPTION_ARG_NONE, &negotiate, + "Use Negotiate authentication", NULL }, + { NULL } +}; + int main (int argc, char **argv) { @@ -130,6 +202,8 @@ main (int argc, char **argv) opts = g_option_context_new (NULL); g_option_context_add_main_entries (opts, entries, NULL); + if (soup_auth_negotiate_supported()) + g_option_context_add_main_entries (opts, negotiate_entries, NULL); if (!g_option_context_parse (opts, &argc, &argv, &error)) { g_printerr ("Could not parse arguments: %s\n", error->message); @@ -154,7 +228,6 @@ main (int argc, char **argv) soup_uri_free (parsed); session = g_object_new (SOUP_TYPE_SESSION, - SOUP_SESSION_SSL_CA_FILE, ca_file, SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_CONTENT_DECODER, SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_COOKIE_JAR, SOUP_SESSION_USER_AGENT, "get ", @@ -162,6 +235,24 @@ main (int argc, char **argv) NULL); if (ntlm) soup_session_add_feature_by_type (session, SOUP_TYPE_AUTH_NTLM); + if (ca_file) + g_object_set (session, "ssl-ca-file", ca_file, NULL); + + if (client_cert_file) { + GTlsCertificate *client_cert; + GetTlsCertInteraction *interaction; + if (!client_key_file) { + g_printerr ("--key is required with --cert\n"); + exit (1); + } + client_cert = g_tls_certificate_new_from_files (client_cert_file, client_key_file, &error); + if (!client_cert) { + g_printerr ("%s\n", error->message); + exit (1); + } + interaction = _get_tls_cert_interaction_new (client_cert); + g_object_set (session, SOUP_SESSION_TLS_INTERACTION, interaction, NULL); + } if (debug) { logger = soup_logger_new (SOUP_LOGGER_LOG_BODY, -1); @@ -183,6 +274,13 @@ main (int argc, char **argv) soup_uri_free (proxy_uri); } +#ifdef LIBSOUP_HAVE_GSSAPI + if (negotiate) { + soup_session_add_feature_by_type (session, + SOUP_TYPE_AUTH_NEGOTIATE); + } +#endif /* LIBSOUP_HAVE_GSSAPI */ + if (!synchronous) loop = g_main_loop_new (NULL, TRUE); @@ -191,5 +289,7 @@ main (int argc, char **argv) if (!synchronous) g_main_loop_unref (loop); + g_object_unref (session); + return 0; } diff --git a/examples/simple-httpd.c b/examples/simple-httpd.c index 71ff874c..0458203b 100644 --- a/examples/simple-httpd.c +++ b/examples/simple-httpd.c @@ -3,7 +3,6 @@ * Copyright (C) 2001-2003, Ximian, Inc. */ -#include #include #include #include @@ -11,6 +10,7 @@ #include #include +#include static int compare_strings (gconstpointer a, gconstpointer b) @@ -27,22 +27,22 @@ get_directory_listing (const char *path) GPtrArray *entries; GString *listing; char *escaped; - DIR *dir; - struct dirent *dent; + GDir *dir; + const gchar *d_name; int i; entries = g_ptr_array_new (); - dir = opendir (path); + dir = g_dir_open (path, 0, NULL); if (dir) { - while ((dent = readdir (dir))) { - if (!strcmp (dent->d_name, ".") || - (!strcmp (dent->d_name, "..") && + while ((d_name = g_dir_read_name (dir))) { + if (!strcmp (d_name, ".") || + (!strcmp (d_name, "..") && !strcmp (path, "./"))) continue; - escaped = g_markup_escape_text (dent->d_name, -1); + escaped = g_markup_escape_text (d_name, -1); g_ptr_array_add (entries, escaped); } - closedir (dir); + g_dir_close (dir); } g_ptr_array_sort (entries, (GCompareFunc)compare_strings); @@ -68,9 +68,9 @@ static void do_get (SoupServer *server, SoupMessage *msg, const char *path) { char *slash; - struct stat st; + GStatBuf st; - if (stat (path, &st) == -1) { + if (g_stat (path, &st) == -1) { if (errno == EPERM) soup_message_set_status (msg, SOUP_STATUS_FORBIDDEN); else if (errno == ENOENT) @@ -80,7 +80,7 @@ do_get (SoupServer *server, SoupMessage *msg, const char *path) return; } - if (S_ISDIR (st.st_mode)) { + if (g_file_test (path, G_FILE_TEST_IS_DIR)) { GString *listing; char *index_path; @@ -96,7 +96,7 @@ do_get (SoupServer *server, SoupMessage *msg, const char *path) } index_path = g_strdup_printf ("%s/index.html", path); - if (stat (index_path, &st) != -1) { + if (g_stat (path, &st) != -1) { do_get (server, msg, index_path); g_free (index_path); return; @@ -107,6 +107,7 @@ do_get (SoupServer *server, SoupMessage *msg, const char *path) soup_message_set_response (msg, "text/html", SOUP_MEMORY_TAKE, listing->str, listing->len); + soup_message_set_status (msg, SOUP_STATUS_OK); g_string_free (listing, FALSE); return; } @@ -145,18 +146,18 @@ do_get (SoupServer *server, SoupMessage *msg, const char *path) static void do_put (SoupServer *server, SoupMessage *msg, const char *path) { - struct stat st; + GStatBuf st; FILE *f; gboolean created = TRUE; - if (stat (path, &st) != -1) { + if (g_stat (path, &st) != -1) { const char *match = soup_message_headers_get_one (msg->request_headers, "If-None-Match"); if (match && !strcmp (match, "*")) { soup_message_set_status (msg, SOUP_STATUS_CONFLICT); return; } - if (!S_ISREG (st.st_mode)) { + if (!g_file_test (path, G_FILE_TEST_IS_REGULAR)) { soup_message_set_status (msg, SOUP_STATUS_FORBIDDEN); return; } @@ -213,22 +214,19 @@ quit (int sig) exit (0); } -static int port, ssl_port; -static const char *ssl_cert_file, *ssl_key_file; +static int port; +static const char *tls_cert_file, *tls_key_file; static GOptionEntry entries[] = { { "cert-file", 'c', 0, - G_OPTION_ARG_STRING, &ssl_cert_file, + G_OPTION_ARG_STRING, &tls_cert_file, "Use FILE as the TLS certificate file", "FILE" }, { "key-file", 'k', 0, - G_OPTION_ARG_STRING, &ssl_key_file, + G_OPTION_ARG_STRING, &tls_key_file, "Use FILE as the TLS private key file", "FILE" }, { "port", 'p', 0, G_OPTION_ARG_INT, &port, "Port to listen on", NULL }, - { "ssl-port", 's', 0, - G_OPTION_ARG_INT, &port, - "Port to listen on for TLS traffic", NULL }, { NULL } }; @@ -237,7 +235,10 @@ main (int argc, char **argv) { GOptionContext *opts; GMainLoop *loop; - SoupServer *server, *ssl_server; + SoupServer *server; + GSList *uris, *u; + char *str; + GTlsCertificate *cert; GError *error = NULL; opts = g_option_context_new (NULL); @@ -258,36 +259,35 @@ main (int argc, char **argv) signal (SIGINT, quit); - server = soup_server_new (SOUP_SERVER_PORT, port, - SOUP_SERVER_SERVER_HEADER, "simple-httpd ", - NULL); - if (!server) { - g_printerr ("Unable to bind to server port %d\n", port); - exit (1); + if (tls_cert_file && tls_key_file) { + cert = g_tls_certificate_new_from_files (tls_cert_file, tls_key_file, &error); + if (error) { + g_printerr ("Unable to create server: %s\n", error->message); + exit (1); + } + server = soup_server_new (SOUP_SERVER_SERVER_HEADER, "simple-httpd ", + SOUP_SERVER_TLS_CERTIFICATE, cert, + NULL); + g_object_unref (cert); + + soup_server_listen_all (server, port, SOUP_SERVER_LISTEN_HTTPS, &error); + } else { + server = soup_server_new (SOUP_SERVER_SERVER_HEADER, "simple-httpd ", + NULL); + soup_server_listen_all (server, port, 0, &error); } + soup_server_add_handler (server, NULL, server_callback, NULL, NULL); - g_print ("\nStarting Server on port %d\n", - soup_server_get_port (server)); - soup_server_run_async (server); - - if (ssl_cert_file && ssl_key_file) { - ssl_server = soup_server_new ( - SOUP_SERVER_PORT, ssl_port, - SOUP_SERVER_SSL_CERT_FILE, ssl_cert_file, - SOUP_SERVER_SSL_KEY_FILE, ssl_key_file, - NULL); - - if (!ssl_server) { - g_printerr ("Unable to bind to SSL server port %d\n", ssl_port); - exit (1); - } - soup_server_add_handler (ssl_server, NULL, - server_callback, NULL, NULL); - g_print ("Starting SSL Server on port %d\n", - soup_server_get_port (ssl_server)); - soup_server_run_async (ssl_server); + + uris = soup_server_get_uris (server); + for (u = uris; u; u = u->next) { + str = soup_uri_to_string (u->data, FALSE); + g_print ("Listening on %s\n", str); + g_free (str); + soup_uri_free (u->data); } + g_slist_free (uris); g_print ("\nWaiting for requests...\n"); diff --git a/examples/simple-proxy.c b/examples/simple-proxy.c index db8c9f96..e585490a 100644 --- a/examples/simple-proxy.c +++ b/examples/simple-proxy.c @@ -15,6 +15,217 @@ static SoupSession *session; static SoupServer *server; +typedef struct { + GIOStream *iostream; + GInputStream *istream; + GOutputStream *ostream; + + gssize nread, nwrote; + guchar *buffer; +} TunnelEnd; + +typedef struct { + SoupServer *self; + SoupMessage *msg; + SoupClientContext *context; + GCancellable *cancellable; + + TunnelEnd client, server; +} Tunnel; + +#define BUFSIZE 8192 + +static void tunnel_read_cb (GObject *object, + GAsyncResult *result, + gpointer user_data); + +static void +tunnel_close (Tunnel *tunnel) +{ + if (tunnel->cancellable) { + g_cancellable_cancel (tunnel->cancellable); + g_object_unref (tunnel->cancellable); + } + + if (tunnel->client.iostream) { + g_io_stream_close (tunnel->client.iostream, NULL, NULL); + g_object_unref (tunnel->client.iostream); + } + if (tunnel->server.iostream) { + g_io_stream_close (tunnel->server.iostream, NULL, NULL); + g_object_unref (tunnel->server.iostream); + } + + g_free (tunnel->client.buffer); + g_free (tunnel->server.buffer); + + g_object_unref (tunnel->self); + g_object_unref (tunnel->msg); + + g_free (tunnel); +} + +static void +tunnel_wrote_cb (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + Tunnel *tunnel = user_data; + TunnelEnd *write_end, *read_end; + GError *error = NULL; + gssize nwrote; + + nwrote = g_output_stream_write_finish (G_OUTPUT_STREAM (object), result, &error); + if (nwrote <= 0) { + if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { + g_error_free (error); + return; + } else if (error) { + g_print ("Tunnel write failed: %s\n", error->message); + g_error_free (error); + } + tunnel_close (tunnel); + return; + } + + if (object == (GObject *)tunnel->client.ostream) { + write_end = &tunnel->client; + read_end = &tunnel->server; + } else { + write_end = &tunnel->server; + read_end = &tunnel->client; + } + + write_end->nwrote += nwrote; + if (write_end->nwrote < read_end->nread) { + g_output_stream_write_async (write_end->ostream, + read_end->buffer + write_end->nwrote, + read_end->nread - write_end->nwrote, + G_PRIORITY_DEFAULT, tunnel->cancellable, + tunnel_wrote_cb, tunnel); + } else { + g_input_stream_read_async (read_end->istream, + read_end->buffer, BUFSIZE, + G_PRIORITY_DEFAULT, tunnel->cancellable, + tunnel_read_cb, tunnel); + } +} + +static void +tunnel_read_cb (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + Tunnel *tunnel = user_data; + TunnelEnd *read_end, *write_end; + GError *error = NULL; + gssize nread; + + nread = g_input_stream_read_finish (G_INPUT_STREAM (object), result, &error); + if (nread <= 0) { + if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { + g_error_free (error); + return; + } else if (error) { + g_print ("Tunnel read failed: %s\n", error->message); + g_error_free (error); + } + tunnel_close (tunnel); + return; + } + + if (object == (GObject *)tunnel->client.istream) { + read_end = &tunnel->client; + write_end = &tunnel->server; + } else { + read_end = &tunnel->server; + write_end = &tunnel->client; + } + + read_end->nread = nread; + write_end->nwrote = 0; + g_output_stream_write_async (write_end->ostream, + read_end->buffer, read_end->nread, + G_PRIORITY_DEFAULT, tunnel->cancellable, + tunnel_wrote_cb, tunnel); +} + +static void +start_tunnel (SoupMessage *msg, gpointer user_data) +{ + Tunnel *tunnel = user_data; + + tunnel->client.iostream = soup_client_context_steal_connection (tunnel->context); + tunnel->client.istream = g_io_stream_get_input_stream (tunnel->client.iostream); + tunnel->client.ostream = g_io_stream_get_output_stream (tunnel->client.iostream); + + tunnel->client.buffer = g_malloc (BUFSIZE); + tunnel->server.buffer = g_malloc (BUFSIZE); + + tunnel->cancellable = g_cancellable_new (); + + g_input_stream_read_async (tunnel->client.istream, + tunnel->client.buffer, BUFSIZE, + G_PRIORITY_DEFAULT, tunnel->cancellable, + tunnel_read_cb, tunnel); + g_input_stream_read_async (tunnel->server.istream, + tunnel->server.buffer, BUFSIZE, + G_PRIORITY_DEFAULT, tunnel->cancellable, + tunnel_read_cb, tunnel); +} + + +static void +tunnel_connected_cb (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + Tunnel *tunnel = user_data; + GError *error = NULL; + + tunnel->server.iostream = (GIOStream *) + g_socket_client_connect_to_host_finish (G_SOCKET_CLIENT (object), result, &error); + if (!tunnel->server.iostream) { + soup_message_set_status (tunnel->msg, SOUP_STATUS_BAD_GATEWAY); + soup_message_set_response (tunnel->msg, "text/plain", + SOUP_MEMORY_COPY, + error->message, strlen (error->message)); + g_error_free (error); + soup_server_unpause_message (tunnel->self, tunnel->msg); + tunnel_close (tunnel); + return; + } + + tunnel->server.istream = g_io_stream_get_input_stream (tunnel->server.iostream); + tunnel->server.ostream = g_io_stream_get_output_stream (tunnel->server.iostream); + + soup_message_set_status (tunnel->msg, SOUP_STATUS_OK); + soup_server_unpause_message (tunnel->self, tunnel->msg); + g_signal_connect (tunnel->msg, "finished", + G_CALLBACK (start_tunnel), tunnel); +} + +static void +try_tunnel (SoupServer *server, SoupMessage *msg, SoupClientContext *context) +{ + Tunnel *tunnel; + SoupURI *dest_uri; + GSocketClient *sclient; + + soup_server_pause_message (server, msg); + + tunnel = g_new0 (Tunnel, 1); + tunnel->self = g_object_ref (server); + tunnel->msg = g_object_ref (msg); + tunnel->context = context; + + dest_uri = soup_message_get_uri (msg); + sclient = g_socket_client_new (); + g_socket_client_connect_to_host_async (sclient, dest_uri->host, dest_uri->port, + NULL, tunnel_connected_cb, tunnel); + g_object_unref (sclient); +} + static void copy_header (const char *name, const char *value, gpointer dest_headers) { @@ -78,7 +289,7 @@ server_callback (SoupServer *server, SoupMessage *msg, soup_message_get_http_version (msg)); if (msg->method == SOUP_METHOD_CONNECT) { - soup_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED); + try_tunnel (server, msg, context); return; } @@ -141,6 +352,8 @@ main (int argc, char **argv) { GOptionContext *opts; GMainLoop *loop; + GSList *uris, *u; + char *str; GError *error = NULL; opts = g_option_context_new (NULL); @@ -162,12 +375,7 @@ main (int argc, char **argv) signal (SIGINT, quit); - server = soup_server_new (SOUP_SERVER_PORT, port, - NULL); - if (!server) { - g_printerr ("Unable to bind to server port %d\n", port); - exit (1); - } + server = g_object_new (SOUP_TYPE_SERVER, NULL); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); if (require_auth) { @@ -182,11 +390,22 @@ main (int argc, char **argv) g_object_unref (auth_domain); } - g_print ("\nStarting proxy on port %d\n", - soup_server_get_port (server)); - soup_server_run_async (server); + soup_server_listen_all (server, port, 0, &error); + if (error) { + g_printerr ("Unable to create server: %s\n", error->message); + exit (1); + } + + uris = soup_server_get_uris (server); + for (u = uris; u; u = u->next) { + str = soup_uri_to_string (u->data, FALSE); + g_print ("Listening on %s\n", str); + g_free (str); + soup_uri_free (u->data); + } + g_slist_free (uris); - session = soup_session_async_new (); + session = soup_session_new (); g_print ("\nWaiting for requests...\n"); diff --git a/gtk-doc.make b/gtk-doc.make index dd319930..f87eaab9 100644 --- a/gtk-doc.make +++ b/gtk-doc.make @@ -1,4 +1,22 @@ # -*- mode: makefile -*- +# +# gtk-doc.make - make rules for gtk-doc +# Copyright (C) 2003 James Henstridge +# 2004-2007 Damon Chaplin +# 2007-2017 Stefan Sauer +# +# 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 3 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, see . #################################### # Everything below here is generic # @@ -25,6 +43,7 @@ TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ + $(expand_content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt @@ -33,9 +52,9 @@ EXTRA_DIST = \ $(HTML_IMAGES) \ $(SETUP_FILES) -DOC_STAMPS=setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ +DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ - tmpl.stamp sgml.stamp html.stamp pdf.stamp + sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ @@ -80,94 +99,70 @@ $(REPORT_FILES): sgml-build.stamp #### setup #### -GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_$(V)) -GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_@AM_V@) +GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_@AM_DEFAULT_V@) GTK_DOC_V_SETUP_0=@echo " DOC Preparing build"; setup-build.stamp: -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ - if test "x$$files" != "x" ; then \ - for file in $$files ; do \ - destdir=`dirname $(abs_builddir)/$$file` ;\ - test -d "$$destdir" || mkdir -p "$$destdir"; \ - test -f $(abs_srcdir)/$$file && \ - cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ - done; \ - fi; \ - test -d $(abs_srcdir)/tmpl && \ - { cp -pR $(abs_srcdir)/tmpl $(abs_builddir)/; \ - chmod -R u+w $(abs_builddir)/tmpl; } \ + files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ + if test "x$$files" != "x" ; then \ + for file in $$files ; do \ + destdir=`dirname $(abs_builddir)/$$file`; \ + test -d "$$destdir" || mkdir -p "$$destdir"; \ + test -f $(abs_srcdir)/$$file && \ + cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ + done; \ + fi; \ fi $(AM_V_at)touch setup-build.stamp #### scan #### -GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V)) -GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_@AM_V@) +GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_@AM_DEFAULT_V@) GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files"; -GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V)) -GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_@AM_V@) +GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_@AM_DEFAULT_V@) GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ + _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ - scanobj_options=""; \ - gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$(?)" = "0"; then \ - if test "x$(V)" = "x1"; then \ - scanobj_options="--verbose"; \ - fi; \ + scanobj_options=""; \ + gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$$?" = "0"; then \ + if test "x$(V)" = "x1"; then \ + scanobj_options="--verbose"; \ fi; \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ - gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ + fi; \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ + gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ - for i in $(SCANOBJ_FILES) ; do \ - test -f $$i || touch $$i ; \ - done \ + for i in $(SCANOBJ_FILES) ; do \ + test -f $$i || touch $$i ; \ + done \ fi $(AM_V_at)touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true -#### templates #### - -GTK_DOC_V_TMPL=$(GTK_DOC_V_TMPL_$(V)) -GTK_DOC_V_TMPL_=$(GTK_DOC_V_TMPL_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_TMPL_0=@echo " DOC Rebuilding template files"; - -tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt - $(GTK_DOC_V_TMPL)gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) - $(AM_V_at)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - if test -w $(abs_srcdir) ; then \ - cp -pR $(abs_builddir)/tmpl $(abs_srcdir)/; \ - fi \ - fi - $(AM_V_at)touch tmpl-build.stamp - -tmpl.stamp: tmpl-build.stamp - @true - -$(srcdir)/tmpl/*.sgml: - @true - #### xml #### -GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V)) -GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XML=$(GTK_DOC_V_XML_@AM_V@) +GTK_DOC_V_XML_=$(GTK_DOC_V_XML_@AM_DEFAULT_V@) GTK_DOC_V_XML_0=@echo " DOC Building XML"; -sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) - -$(GTK_DOC_V_XML)chmod -R u+w $(srcdir) && _source_dir='' ; \ +sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent + $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ + _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) $(AM_V_at)touch sgml-build.stamp @@ -175,53 +170,63 @@ sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $( sgml.stamp: sgml-build.stamp @true +$(DOC_MAIN_SGML_FILE): sgml-build.stamp + @true + +xml/gtkdocentities.ent: Makefile + $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ + echo ""; \ + echo ""; \ + echo ""; \ + echo ""; \ + echo ""; \ + echo ""; \ + echo ""; \ + ) > $@ + #### html #### -GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_$(V)) -GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_@AM_V@) +GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_@AM_DEFAULT_V@) GTK_DOC_V_HTML_0=@echo " DOC Building HTML"; -GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V)) -GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_@AM_V@) +GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_@AM_DEFAULT_V@) GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references"; -html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) +html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$(?)" = "0"; then \ + if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ - if test "$(?)" = "0"; then \ + if test "$$?" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ - if test -f $(abs_srcdir)/$$file ; then \ - cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ - fi; \ - if test -f $(abs_builddir)/$$file ; then \ - cp $(abs_builddir)/$$file $(abs_builddir)/html; \ - fi; \ + test -f $(abs_srcdir)/$$file && cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ + test -f $(abs_builddir)/$$file && cp $(abs_builddir)/$$file $(abs_builddir)/html; \ done; $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) $(AM_V_at)touch html-build.stamp #### pdf #### -GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V)) -GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_@AM_V@) +GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_@AM_DEFAULT_V@) GTK_DOC_V_PDF_0=@echo " DOC Building PDF"; -pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) +pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$(?)" = "0"; then \ + if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ @@ -246,13 +251,15 @@ clean-local: @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ rm -f $(DOC_MODULE).types; \ fi + @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ + rm -f $(DOC_MODULE)-sections.txt; \ + fi distclean-local: @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ - rm -rf tmpl; \ + rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ fi maintainer-clean-local: @@ -302,9 +309,7 @@ dist-check-gtkdoc: endif dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local - @mkdir $(distdir)/tmpl @mkdir $(distdir)/html - @-cp ./tmpl/*.sgml $(distdir)/tmpl @cp ./html/* $(distdir)/html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ diff --git a/install-sh b/install-sh new file mode 100755 index 00000000..59990a10 --- /dev/null +++ b/install-sh @@ -0,0 +1,508 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2014-09-12.12; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# 'make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +tab=' ' +nl=' +' +IFS=" $tab$nl" + +# Set DOITPROG to "echo" to test this script. + +doit=${DOITPROG-} +doit_exec=${doit:-exec} + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +is_target_a_directory=possibly + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) is_target_a_directory=never;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + dstdir=`dirname "$dst"` + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + # $RANDOM is not portable (e.g. dash); use it when possible to + # lower collision chance + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + + # As "mkdir -p" follows symlinks and we work in /tmp possibly; so + # create the $tmpdir first (and fail if unsuccessful) to make sure + # that nobody tries to guess the $tmpdir name. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + oIFS=$IFS + IFS=/ + set -f + set fnord $dstdir + shift + set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + set +f && + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/libsoup/Makefile.am b/libsoup/Makefile.am index 60920bdc..4232be66 100644 --- a/libsoup/Makefile.am +++ b/libsoup/Makefile.am @@ -1,6 +1,8 @@ ## Process this file with automake to produce Makefile.in EXTRA_DIST = +CLEANFILES = + include $(GLIB_MAKEFILE) @@ -8,15 +10,21 @@ if OS_WIN32 LIBWS2_32 = -lws2_32 endif +SOUP_COMMON_CPPFLAGS = \ + -DG_LOG_DOMAIN=\"libsoup\" \ + -DLIBSOUP_COMPILATION + AM_CPPFLAGS = \ - -DG_LOG_DOMAIN=\"libsoup\" \ + $(SOUP_COMMON_CPPFLAGS) \ -DLOCALEDIR=\"$(localedir)\" \ -I$(top_srcdir) \ -I$(top_builddir) \ $(SOUP_DEBUG_FLAGS) \ $(GLIB_CFLAGS) \ $(XML_CFLAGS) \ - $(SQLITE_CFLAGS) + $(SQLITE_CFLAGS) \ + $(CODE_COVERAGE_CFLAGS) \ + $(KRB5_CFLAGS) libsoupincludedir = $(includedir)/libsoup-2.4/libsoup @@ -28,6 +36,7 @@ soup_headers = \ soup-auth-domain-basic.h \ soup-auth-domain-digest.h \ soup-auth-manager.h \ + soup-autocleanups.h \ soup-cache.h \ soup-content-decoder.h \ soup-content-sniffer.h \ @@ -67,7 +76,10 @@ soup_headers = \ soup-types.h \ soup-uri.h \ soup-value-utils.h \ - soup-xmlrpc.h + soup-websocket.h \ + soup-websocket-connection.h \ + soup-xmlrpc.h \ + soup-xmlrpc-old.h libsoupinclude_HEADERS = \ $(soup_headers) \ @@ -78,20 +90,23 @@ nodist_libsoupinclude_HEADERS = \ lib_LTLIBRARIES = libsoup-2.4.la +libsoup_2_4_la_CFLAGS = $(AM_CFLAGS) $(SOUP_HIDDEN_VISIBILITY_CFLAGS) + libsoup_2_4_la_LDFLAGS = \ -version-info $(SOUP_CURRENT):$(SOUP_REVISION):$(SOUP_AGE) \ -no-undefined \ - -export-symbols $(srcdir)/libsoup-2.4.sym - -EXTRA_DIST += libsoup-2.4.sym + -export-dynamic \ + $(CODE_COVERAGE_LDFLAGS) libsoup_2_4_la_LIBADD = \ $(GLIB_LIBS) \ $(LIBWS2_32) \ $(XML_LIBS) \ - $(SQLITE_LIBS) + $(SQLITE_LIBS) \ + $(KRB5_LIBS) libsoup_2_4_la_SOURCES = \ + gconstructor.h \ soup-address.c \ soup-auth.c \ soup-auth-basic.h \ @@ -100,6 +115,8 @@ libsoup_2_4_la_SOURCES = \ soup-auth-digest.c \ soup-auth-ntlm.h \ soup-auth-ntlm.c \ + soup-auth-negotiate.h \ + soup-auth-negotiate.c \ soup-auth-domain.c \ soup-auth-domain-basic.c \ soup-auth-domain-digest.c \ @@ -109,6 +126,8 @@ libsoup_2_4_la_SOURCES = \ soup-body-output-stream.h \ soup-body-output-stream.c \ soup-cache.c \ + soup-cache-client-input-stream.h\ + soup-cache-client-input-stream.c\ soup-cache-input-stream.h \ soup-cache-input-stream.c \ soup-cache-private.h \ @@ -139,6 +158,7 @@ libsoup_2_4_la_SOURCES = \ soup-filter-input-stream.h \ soup-form.c \ soup-headers.c \ + soup-init.c \ soup-io-stream.h \ soup-io-stream.c \ soup-logger.c \ @@ -176,13 +196,18 @@ libsoup_2_4_la_SOURCES = \ soup-session-private.h \ soup-session-sync.c \ soup-socket.c \ + soup-socket-private.h \ + soup-socket-properties.c \ soup-status.c \ soup-tld.c \ soup-tld-private.h \ soup-uri.c \ soup-value-utils.c \ soup-version.c \ - soup-xmlrpc.c + soup-websocket.c \ + soup-websocket-connection.c \ + soup-xmlrpc.c \ + soup-xmlrpc-old.c # TLD rules EXTRA_DIST += tld-parser.py @@ -203,12 +228,12 @@ libsoupgnomeinclude_HEADERS = \ lib_LTLIBRARIES += libsoup-gnome-2.4.la +libsoup_gnome_2_4_la_CFLAGS = $(AM_CFLAGS) $(SOUP_HIDDEN_VISIBILITY_CFLAGS) + libsoup_gnome_2_4_la_LDFLAGS = \ -version-info $(SOUP_CURRENT):$(SOUP_REVISION):$(SOUP_AGE) \ -no-undefined \ - -export-symbols $(srcdir)/libsoup-gnome-2.4.sym - -EXTRA_DIST += libsoup-gnome-2.4.sym + -export-dynamic libsoup_gnome_2_4_la_LIBADD = \ libsoup-2.4.la \ @@ -231,6 +256,7 @@ BUILT_SOURCES = \ soup_enum_types_sources = $(libsoupinclude_HEADERS) $(libsoupgnomeinclude_HEADERS) soup_enum_types_MKENUMS_C_FLAGS = --fhead "\#define LIBSOUP_USE_UNSTABLE_REQUEST_API" +soup_enum_types_MKENUMS_H_FLAGS = --fhead "\#include \n\#define GLIB_MKENUMS_EXTERN _SOUP_EXTERN\n" # # Introspection support @@ -242,15 +268,17 @@ INTROSPECTION_COMPILER_ARGS = --includedir=. if HAVE_INTROSPECTION +SOUP_UNSTABLE_REQUEST_CFLAG = -DLIBSOUP_USE_UNSTABLE_REQUEST_API + # Core library gi_soup_files = \ $(filter-out soup.h soup-enum-types.% soup-proxy-resolver.h,\ $(soup_headers) $(filter-out %.h, $(libsoup_2_4_la_SOURCES))) -gi_built_soup_files = soup-enum-types.h +gi_built_soup_files = soup-enum-types.h soup-version.h Soup-2.4.gir: libsoup-2.4.la Soup_2_4_gir_INCLUDES = Gio-2.0 -Soup_2_4_gir_CFLAGS = $(AM_CPPFLAGS) -DLIBSOUP_USE_UNSTABLE_REQUEST_API +Soup_2_4_gir_CFLAGS = $(AM_CPPFLAGS) $(SOUP_UNSTABLE_REQUEST_CFLAG) Soup_2_4_gir_LIBS = libsoup-2.4.la Soup_2_4_gir_EXPORT_PACKAGES = libsoup-2.4 Soup_2_4_gir_SCANNERFLAGS = --c-include "libsoup/soup.h" @@ -263,16 +291,30 @@ Soup_2_4_gir_FILES = \ INTROSPECTION_GIRS += Soup-2.4.gir +if ENABLE_VAPIGEN +libsoup-2.4.vapi: Soup-2.4.gir Soup-2.4.metadata Soup-2.4-custom.vala + $(VAPIGEN) --metadatadir=$(top_srcdir)/libsoup --pkg gio-2.0 --library=libsoup-2.4 $^ + +vapidir=$(VAPIDIR) +vapi_DATA=libsoup-2.4.vapi libsoup-2.4.deps +CLEANFILES += libsoup-2.4.vapi +endif + +EXTRA_DIST += Soup-2.4.metadata Soup-2.4-custom.vala libsoup-2.4.deps + if BUILD_LIBSOUP_GNOME +SOUPGNOME_GIR_SCANNER_BASE_FLAGS = \ + --identifier-prefix=Soup \ + --symbol-prefix=soup + # GNOME extensions gi_soup_gnome_files = $(filter-out soup-gnome.h,\ $(libsoupgnomeinclude_HEADERS) \ $(filter-out %.h, $(libsoup_gnome_2_4_la_SOURCES))) SoupGNOME-2.4.gir: libsoup-gnome-2.4.la Soup-2.4.gir SoupGNOME_2_4_gir_SCANNERFLAGS = \ - --identifier-prefix=Soup \ - --symbol-prefix=soup \ + $(SOUPGNOME_GIR_SCANNER_BASE_FLAGS) \ --c-include "libsoup/soup-gnome.h" \ --include-uninstalled=$(builddir)/Soup-2.4.gir SoupGNOME_2_4_gir_CFLAGS = $(AM_CPPFLAGS) @@ -290,6 +332,75 @@ gir_DATA = $(INTROSPECTION_GIRS) typelibdir = $(libdir)/girepository-1.0 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) -CLEANFILES = $(gir_DATA) $(typelib_DATA) $(BUILT_SOURCES) +CLEANFILES+= $(gir_DATA) $(typelib_DATA) $(BUILT_SOURCES) endif + +# ------ MSVC Project File Generation ------ +MSVCPROJS = soup soup-gnome + +soup_FILES = $(libsoup_2_4_la_SOURCES) +soup_EXCLUDES = dummy + +soup_HEADERS_DIR = $(libsoupincludedir) +soup_HEADERS_INST = $(libsoupinclude_HEADERS) $(nodist_libsoupinclude_HEADERS) +soup_HEADERS_EXCLUDES = dummy + +soup_gnome_FILES = $(libsoup_gnome_2_4_la_SOURCES) +soup_gnome_EXCLUDES = dummy + +soup_gnome_HEADERS_DIR = $(libsoupgnomeincludedir) +soup_gnome_HEADERS_INST = $(libsoupgnomeinclude_HEADERS) +soup_gnome_HEADERS_EXCLUDES = dummy + +include $(top_srcdir)/win32/Makefile.msvcproj + +if HAVE_INTROSPECTION +# Introspection Items for MSVC +MSVC_INTROSPECT_GIRS = Soup-2.4.gir +if BUILD_LIBSOUP_GNOME +MSVC_INTROSPECT_GIRS += SoupGNOME-2.4.gir +endif + +BASE_MSVC_GIR_CFLAGS = \ + $(SOUP_COMMON_CPPFLAGS) \ + -I.. + +INTROSPECTION_INTERMEDIATE_ITEMS = \ + $(top_builddir)/win32/Soup-2.4.gir.msvc.introspect \ + $(top_builddir)/win32/Soup_2_4_gir_list \ + $(top_builddir)/win32/SoupGNOME-2.4.gir.msvc.introspect \ + $(top_builddir)/win32/SoupGNOME_2_4_gir_list + +# libsoup +Soup_2_4_gir_MSVC_FILES = $(gi_soup_files) $(gi_built_soup_files) +Soup_2_4_gir_MSVC_EXPORT_PACKAGES = $(Soup_2_4_gir_EXPORT_PACKAGES) +Soup_2_4_gir_MSVC_INCLUDE_GIRS = $(Soup_2_4_gir_INCLUDES) +Soup_2_4_gir_MSVC_LIBS = soup-2.4 +Soup_2_4_gir_MSVC_CFLAGS = $(BASE_MSVC_GIR_CFLAGS) $(SOUP_UNSTABLE_REQUEST_CFLAG) +Soup_2_4_gir_MSVC_SCANNERFLAGS = --c-include \"libsoup/soup.h\" + +if BUILD_LIBSOUP_GNOME +# libsoup-gnome +SoupGNOME_2_4_gir_MSVC_FILES = $(gi_soup_gnome_files) +SoupGNOME_2_4_gir_MSVC_GIR_DEPS = Soup-2.4.gir +SoupGNOME_2_4_gir_MSVC_EXPORT_PACKAGES = $(SoupGNOME_2_4_gir_EXPORT_PACKAGES) +SoupGNOME_2_4_gir_MSVC_LIBS = soup-gnome-2.4 soup-2.4 +SoupGNOME_2_4_gir_MSVC_CFLAGS = $(BASE_MSVC_GIR_CFLAGS) +SoupGNOME_2_4_gir_MSVC_SCANNERFLAGS = i \ + $(SOUPGNOME_GIR_SCANNER_BASE_FLAGS) \ + --c-include \"libsoup/soup-gnome.h\" \ + --include-uninstalled=./Soup-2.4.gir +endif + +include $(top_srcdir)/win32/Makefile.msvc-introspection +else +INTROSPECTION_INTERMEDIATE_ITEMS = +endif + +dist-hook: \ + $(top_builddir)/win32/vs9/soup.vcproj \ + $(top_builddir)/win32/vs9/soup.headers \ + $(top_builddir)/win32/vs9/soup-gnome.vcproj \ + $(top_builddir)/win32/vs9/soup-gnome.headers \ + $(INTROSPECTION_INTERMEDIATE_ITEMS) diff --git a/libsoup/Makefile.in b/libsoup/Makefile.in index dfd40718..e8e0f23f 100644 --- a/libsoup/Makefile.in +++ b/libsoup/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,10 +14,89 @@ @SET_MAKE@ +# Author: Fan, Chun-wei +# Common Autotools file used to generate Visual Studio 2008+ +# Projects from their templates + +# This autotools file, from GLib, can be used in other projects +# that have Visual Studio build support. + +# * Input variables: +# +# MSVCPROJS - List of Projects that should be generated +# +# * Simple tutorial +# +# Add this to Makefile.am where your library/program is built: +# include +# MSVCPROJS = YourProject (can be multiple projects in a single srcdir) +# YourProject_FILES = $(libyourlib_1_0_SOURCES) +# YourProject_EXCLUDES = ... # list of sources to exclude, separated by '|', wildcards allowed; use random unsed value if none +# (the following 3 lines if headers need to be installed) +# YourProject_HEADERS_DIR = $(libyourlibincludedir) +# YourProject_HEADERS_INST = $(libyourlib_1_0_HEADERS) +# YourProject_HEADERS_EXCLUDES = ... # +# +# dist-hook: \ # (or add to it if it is already there, note the vs9 items will also call the vs10 items in the process) +# $(top_builddir)/win32/vs9/YourProject.vcproj \ +# $(top_builddir)/win32/vs9/YourProject.headers # if headers need to be installed +# +# --or, if Visual Studio 2013 or later is required-- +# dist-hook: \ # (or add to it if it is already there, this does -not- call other vs items in the process) +# $(top_builddir)/win32/vs12/YourProject.vcxproj \ +# $(top_builddir)/win32/vs12/YourProject.vs12.headers # if headers need to be installed + +# Private functions + +# Author: Fan, Chun-wei +# Common autotools file for constructing the g-ir-scanner and +# g-ir-compiler command lines for Visual Studio builds. + +# This is copied from $(srcroot)/win32 from the gobject-introspection +# project, which may be included in projects that support both +# Visual Studio builds and introspection. + +# * Input variables: +# +# MSVC_INTROSPECT_GIRS - List of .gir's that should be built +# in the NMake Makefiles +# +# * Simple tutorial +# +# Add this to Makefile.am where your library/program is built: +# (Either YourLib_1_0_gir_MSVC_LIBS or YourLib_1_0_gir_MSVC_PROGRAM +# is required unless --headers-only is specified in +# YourLib_1_0_gir__MSVC_SCANNERFLAGS) +# +# include +# MSVC_INTROSPECT_GIRS = YourLib-1.0.gir +# YourLib_1_0_gir_NAMESPACE = YourLib # This is optional +# YourLib_1_0_gir_VERSION = 1.0 # This is optional +# YourLib_1_0_gir_MSVC_LIBS = yourlib-1.0 +# YourLib_1_0_gir_MSVC_FILES = $(libyourlib_1_0_SOURCES) +# YourLib_1_0_gir_MSVC_PROGRAM = YourProgram +# YourLib_1_0_gir_MSVC_PACKAGES = (Dependent .pc files) +# YourLib_1_0_gir_MSVC_INCLUDE_GIRS = (Dependent external .gir's) +# YourLib_1_0_gir_MSVC_EXPORT_PACKAGES = (Packages exported by this .gir) +# YourLib_1_0_gir_MSVC_C_INCLUDES = (List of public C headers which need to be included by +# consumers at compile time to make use of the API) + +# Private functions + VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,23 +160,26 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @BUILD_LIBSOUP_GNOME_TRUE@am__append_1 = libsoup-gnome-2.4.la -@BUILD_LIBSOUP_GNOME_TRUE@am__append_2 = libsoup-gnome-2.4.sym -@HAVE_INTROSPECTION_TRUE@am__append_3 = Soup-2.4.gir -@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@am__append_4 = SoupGNOME-2.4.gir +@HAVE_INTROSPECTION_TRUE@am__append_2 = Soup-2.4.gir +@ENABLE_VAPIGEN_TRUE@@HAVE_INTROSPECTION_TRUE@am__append_3 = libsoup-2.4.vapi +@HAVE_INTROSPECTION_TRUE@am__append_4 = Soup-2.4.metadata Soup-2.4-custom.vala libsoup-2.4.deps +@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@am__append_5 = SoupGNOME-2.4.gir +@HAVE_INTROSPECTION_TRUE@am__append_6 = $(gir_DATA) $(typelib_DATA) $(BUILT_SOURCES) +@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@am__append_7 = SoupGNOME-2.4.gir subdir = libsoup -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(srcdir)/soup-version.h.in $(top_srcdir)/build-aux/depcomp \ - $(am__libsoupgnomeinclude_HEADERS_DIST) \ - $(libsoupinclude_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/glibtests.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/intltool.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/glibtests.m4 $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/vapigen.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am \ + $(am__libsoupgnomeinclude_HEADERS_DIST) \ + $(libsoupinclude_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = soup-version.h @@ -130,7 +212,7 @@ am__uninstall_files_from_dir = { \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \ - "$(DESTDIR)$(typelibdir)" \ + "$(DESTDIR)$(typelibdir)" "$(DESTDIR)$(vapidir)" \ "$(DESTDIR)$(libsoupgnomeincludedir)" \ "$(DESTDIR)$(libsoupincludedir)" \ "$(DESTDIR)$(libsoupincludedir)" @@ -138,34 +220,73 @@ LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libsoup_2_4_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -am_libsoup_2_4_la_OBJECTS = soup-address.lo soup-auth.lo \ - soup-auth-basic.lo soup-auth-digest.lo soup-auth-ntlm.lo \ - soup-auth-domain.lo soup-auth-domain-basic.lo \ - soup-auth-domain-digest.lo soup-auth-manager.lo \ - soup-body-input-stream.lo soup-body-output-stream.lo \ - soup-cache.lo soup-cache-input-stream.lo \ - soup-client-input-stream.lo soup-connection.lo \ - soup-connection-auth.lo soup-content-decoder.lo \ - soup-content-processor.lo soup-content-sniffer.lo \ - soup-content-sniffer-stream.lo soup-converter-wrapper.lo \ - soup-cookie.lo soup-cookie-jar.lo soup-cookie-jar-db.lo \ - soup-cookie-jar-text.lo soup-date.lo \ - soup-directory-input-stream.lo soup-enum-types.lo \ - soup-filter-input-stream.lo soup-form.lo soup-headers.lo \ - soup-io-stream.lo soup-logger.lo soup-message.lo \ - soup-message-body.lo soup-message-client-io.lo \ - soup-message-headers.lo soup-message-io.lo \ - soup-message-queue.lo soup-message-server-io.lo soup-method.lo \ - soup-misc.lo soup-multipart.lo soup-multipart-input-stream.lo \ - soup-password-manager.lo soup-path-map.lo \ - soup-proxy-resolver.lo soup-proxy-resolver-default.lo \ - soup-proxy-resolver-wrapper.lo soup-proxy-uri-resolver.lo \ - soup-request.lo soup-request-data.lo soup-request-file.lo \ - soup-request-http.lo soup-requester.lo soup-server.lo \ - soup-session.lo soup-session-async.lo soup-session-feature.lo \ - soup-session-sync.lo soup-socket.lo soup-status.lo soup-tld.lo \ - soup-uri.lo soup-value-utils.lo soup-version.lo soup-xmlrpc.lo + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +am_libsoup_2_4_la_OBJECTS = libsoup_2_4_la-soup-address.lo \ + libsoup_2_4_la-soup-auth.lo libsoup_2_4_la-soup-auth-basic.lo \ + libsoup_2_4_la-soup-auth-digest.lo \ + libsoup_2_4_la-soup-auth-ntlm.lo \ + libsoup_2_4_la-soup-auth-negotiate.lo \ + libsoup_2_4_la-soup-auth-domain.lo \ + libsoup_2_4_la-soup-auth-domain-basic.lo \ + libsoup_2_4_la-soup-auth-domain-digest.lo \ + libsoup_2_4_la-soup-auth-manager.lo \ + libsoup_2_4_la-soup-body-input-stream.lo \ + libsoup_2_4_la-soup-body-output-stream.lo \ + libsoup_2_4_la-soup-cache.lo \ + libsoup_2_4_la-soup-cache-client-input-stream.lo \ + libsoup_2_4_la-soup-cache-input-stream.lo \ + libsoup_2_4_la-soup-client-input-stream.lo \ + libsoup_2_4_la-soup-connection.lo \ + libsoup_2_4_la-soup-connection-auth.lo \ + libsoup_2_4_la-soup-content-decoder.lo \ + libsoup_2_4_la-soup-content-processor.lo \ + libsoup_2_4_la-soup-content-sniffer.lo \ + libsoup_2_4_la-soup-content-sniffer-stream.lo \ + libsoup_2_4_la-soup-converter-wrapper.lo \ + libsoup_2_4_la-soup-cookie.lo \ + libsoup_2_4_la-soup-cookie-jar.lo \ + libsoup_2_4_la-soup-cookie-jar-db.lo \ + libsoup_2_4_la-soup-cookie-jar-text.lo \ + libsoup_2_4_la-soup-date.lo \ + libsoup_2_4_la-soup-directory-input-stream.lo \ + libsoup_2_4_la-soup-enum-types.lo \ + libsoup_2_4_la-soup-filter-input-stream.lo \ + libsoup_2_4_la-soup-form.lo libsoup_2_4_la-soup-headers.lo \ + libsoup_2_4_la-soup-init.lo libsoup_2_4_la-soup-io-stream.lo \ + libsoup_2_4_la-soup-logger.lo libsoup_2_4_la-soup-message.lo \ + libsoup_2_4_la-soup-message-body.lo \ + libsoup_2_4_la-soup-message-client-io.lo \ + libsoup_2_4_la-soup-message-headers.lo \ + libsoup_2_4_la-soup-message-io.lo \ + libsoup_2_4_la-soup-message-queue.lo \ + libsoup_2_4_la-soup-message-server-io.lo \ + libsoup_2_4_la-soup-method.lo libsoup_2_4_la-soup-misc.lo \ + libsoup_2_4_la-soup-multipart.lo \ + libsoup_2_4_la-soup-multipart-input-stream.lo \ + libsoup_2_4_la-soup-password-manager.lo \ + libsoup_2_4_la-soup-path-map.lo \ + libsoup_2_4_la-soup-proxy-resolver.lo \ + libsoup_2_4_la-soup-proxy-resolver-default.lo \ + libsoup_2_4_la-soup-proxy-resolver-wrapper.lo \ + libsoup_2_4_la-soup-proxy-uri-resolver.lo \ + libsoup_2_4_la-soup-request.lo \ + libsoup_2_4_la-soup-request-data.lo \ + libsoup_2_4_la-soup-request-file.lo \ + libsoup_2_4_la-soup-request-http.lo \ + libsoup_2_4_la-soup-requester.lo libsoup_2_4_la-soup-server.lo \ + libsoup_2_4_la-soup-session.lo \ + libsoup_2_4_la-soup-session-async.lo \ + libsoup_2_4_la-soup-session-feature.lo \ + libsoup_2_4_la-soup-session-sync.lo \ + libsoup_2_4_la-soup-socket.lo \ + libsoup_2_4_la-soup-socket-properties.lo \ + libsoup_2_4_la-soup-status.lo libsoup_2_4_la-soup-tld.lo \ + libsoup_2_4_la-soup-uri.lo libsoup_2_4_la-soup-value-utils.lo \ + libsoup_2_4_la-soup-version.lo \ + libsoup_2_4_la-soup-websocket.lo \ + libsoup_2_4_la-soup-websocket-connection.lo \ + libsoup_2_4_la-soup-xmlrpc.lo \ + libsoup_2_4_la-soup-xmlrpc-old.lo libsoup_2_4_la_OBJECTS = $(am_libsoup_2_4_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -173,24 +294,23 @@ am__v_lt_0 = --silent am__v_lt_1 = libsoup_2_4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(libsoup_2_4_la_LDFLAGS) $(LDFLAGS) -o \ - $@ + $(libsoup_2_4_la_CFLAGS) $(CFLAGS) $(libsoup_2_4_la_LDFLAGS) \ + $(LDFLAGS) -o $@ @BUILD_LIBSOUP_GNOME_TRUE@libsoup_gnome_2_4_la_DEPENDENCIES = \ @BUILD_LIBSOUP_GNOME_TRUE@ libsoup-2.4.la $(am__DEPENDENCIES_1) am__libsoup_gnome_2_4_la_SOURCES_DIST = soup-cookie-jar-sqlite.c \ soup-gnome-features.c soup-proxy-resolver-gnome.h \ soup-proxy-resolver-gnome.c soup-password-manager-gnome.h \ soup-password-manager-gnome.c -@BUILD_LIBSOUP_GNOME_TRUE@am_libsoup_gnome_2_4_la_OBJECTS = \ -@BUILD_LIBSOUP_GNOME_TRUE@ soup-cookie-jar-sqlite.lo \ -@BUILD_LIBSOUP_GNOME_TRUE@ soup-gnome-features.lo \ -@BUILD_LIBSOUP_GNOME_TRUE@ soup-proxy-resolver-gnome.lo \ -@BUILD_LIBSOUP_GNOME_TRUE@ soup-password-manager-gnome.lo +@BUILD_LIBSOUP_GNOME_TRUE@am_libsoup_gnome_2_4_la_OBJECTS = libsoup_gnome_2_4_la-soup-cookie-jar-sqlite.lo \ +@BUILD_LIBSOUP_GNOME_TRUE@ libsoup_gnome_2_4_la-soup-gnome-features.lo \ +@BUILD_LIBSOUP_GNOME_TRUE@ libsoup_gnome_2_4_la-soup-proxy-resolver-gnome.lo \ +@BUILD_LIBSOUP_GNOME_TRUE@ libsoup_gnome_2_4_la-soup-password-manager-gnome.lo libsoup_gnome_2_4_la_OBJECTS = $(am_libsoup_gnome_2_4_la_OBJECTS) libsoup_gnome_2_4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(libsoup_gnome_2_4_la_LDFLAGS) \ - $(LDFLAGS) -o $@ + $(libsoup_gnome_2_4_la_CFLAGS) $(CFLAGS) \ + $(libsoup_gnome_2_4_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_LIBSOUP_GNOME_TRUE@am_libsoup_gnome_2_4_la_rpath = -rpath \ @BUILD_LIBSOUP_GNOME_TRUE@ $(libdir) AM_V_P = $(am__v_P_@AM_V@) @@ -235,7 +355,7 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -DATA = $(gir_DATA) $(typelib_DATA) +DATA = $(gir_DATA) $(typelib_DATA) $(vapi_DATA) am__libsoupgnomeinclude_HEADERS_DIST = soup-cookie-jar-sqlite.h \ soup-gnome.h soup-gnome-features.h HEADERS = $(libsoupgnomeinclude_HEADERS) $(libsoupinclude_HEADERS) \ @@ -259,6 +379,10 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/soup-version.h.in \ + $(top_srcdir)/build-aux/depcomp \ + $(top_srcdir)/win32/Makefile.msvc-introspection \ + $(top_srcdir)/win32/Makefile.msvcproj DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ @@ -266,7 +390,6 @@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APACHE_HTTPD = @APACHE_HTTPD@ APACHE_MODULE_DIR = @APACHE_MODULE_DIR@ -APACHE_PHP_MODULE = @APACHE_PHP_MODULE@ APACHE_PHP_MODULE_DIR = @APACHE_PHP_MODULE_DIR@ APACHE_SSL_MODULE_DIR = @APACHE_SSL_MODULE_DIR@ AR = @AR@ @@ -278,6 +401,11 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL = @CURL@ @@ -293,6 +421,8 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ @@ -311,6 +441,7 @@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HAVE_GNOME = @HAVE_GNOME@ HTML_DIR = @HTML_DIR@ +IF_HAVE_MOD_UNIXD = @IF_HAVE_MOD_UNIXD@ IF_HAVE_PHP = @IF_HAVE_PHP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -333,6 +464,10 @@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +KRB5_CFLAGS = @KRB5_CFLAGS@ +KRB5_CONFIG = @KRB5_CONFIG@ +KRB5_LIBS = @KRB5_LIBS@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -341,6 +476,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -372,6 +508,7 @@ SOUP_AGE = @SOUP_AGE@ SOUP_API_VERSION = @SOUP_API_VERSION@ SOUP_CURRENT = @SOUP_CURRENT@ SOUP_DEBUG_FLAGS = @SOUP_DEBUG_FLAGS@ +SOUP_HIDDEN_VISIBILITY_CFLAGS = @SOUP_HIDDEN_VISIBILITY_CFLAGS@ SOUP_MAJOR_VERSION = @SOUP_MAJOR_VERSION@ SOUP_MICRO_VERSION = @SOUP_MICRO_VERSION@ SOUP_MINOR_VERSION = @SOUP_MINOR_VERSION@ @@ -380,6 +517,11 @@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ +VALAC = @VALAC@ +VAPIDIR = @VAPIDIR@ +VAPIGEN = @VAPIGEN@ +VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ +VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XML_CFLAGS = @XML_CFLAGS@ @@ -433,6 +575,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -443,17 +586,24 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # TLD rules -EXTRA_DIST = libsoup-2.4.sym tld-parser.py $(am__append_2) +EXTRA_DIST = tld-parser.py $(am__append_4) +CLEANFILES = $(am__append_3) $(am__append_6) @OS_WIN32_TRUE@LIBWS2_32 = -lws2_32 +SOUP_COMMON_CPPFLAGS = \ + -DG_LOG_DOMAIN=\"libsoup\" \ + -DLIBSOUP_COMPILATION + AM_CPPFLAGS = \ - -DG_LOG_DOMAIN=\"libsoup\" \ + $(SOUP_COMMON_CPPFLAGS) \ -DLOCALEDIR=\"$(localedir)\" \ -I$(top_srcdir) \ -I$(top_builddir) \ $(SOUP_DEBUG_FLAGS) \ $(GLIB_CFLAGS) \ $(XML_CFLAGS) \ - $(SQLITE_CFLAGS) + $(SQLITE_CFLAGS) \ + $(CODE_COVERAGE_CFLAGS) \ + $(KRB5_CFLAGS) libsoupincludedir = $(includedir)/libsoup-2.4/libsoup soup_headers = \ @@ -464,6 +614,7 @@ soup_headers = \ soup-auth-domain-basic.h \ soup-auth-domain-digest.h \ soup-auth-manager.h \ + soup-autocleanups.h \ soup-cache.h \ soup-content-decoder.h \ soup-content-sniffer.h \ @@ -503,7 +654,10 @@ soup_headers = \ soup-types.h \ soup-uri.h \ soup-value-utils.h \ - soup-xmlrpc.h + soup-websocket.h \ + soup-websocket-connection.h \ + soup-xmlrpc.h \ + soup-xmlrpc-old.h libsoupinclude_HEADERS = \ $(soup_headers) \ @@ -513,18 +667,22 @@ nodist_libsoupinclude_HEADERS = \ soup-version.h lib_LTLIBRARIES = libsoup-2.4.la $(am__append_1) +libsoup_2_4_la_CFLAGS = $(AM_CFLAGS) $(SOUP_HIDDEN_VISIBILITY_CFLAGS) libsoup_2_4_la_LDFLAGS = \ -version-info $(SOUP_CURRENT):$(SOUP_REVISION):$(SOUP_AGE) \ -no-undefined \ - -export-symbols $(srcdir)/libsoup-2.4.sym + -export-dynamic \ + $(CODE_COVERAGE_LDFLAGS) libsoup_2_4_la_LIBADD = \ $(GLIB_LIBS) \ $(LIBWS2_32) \ $(XML_LIBS) \ - $(SQLITE_LIBS) + $(SQLITE_LIBS) \ + $(KRB5_LIBS) libsoup_2_4_la_SOURCES = \ + gconstructor.h \ soup-address.c \ soup-auth.c \ soup-auth-basic.h \ @@ -533,6 +691,8 @@ libsoup_2_4_la_SOURCES = \ soup-auth-digest.c \ soup-auth-ntlm.h \ soup-auth-ntlm.c \ + soup-auth-negotiate.h \ + soup-auth-negotiate.c \ soup-auth-domain.c \ soup-auth-domain-basic.c \ soup-auth-domain-digest.c \ @@ -542,6 +702,8 @@ libsoup_2_4_la_SOURCES = \ soup-body-output-stream.h \ soup-body-output-stream.c \ soup-cache.c \ + soup-cache-client-input-stream.h\ + soup-cache-client-input-stream.c\ soup-cache-input-stream.h \ soup-cache-input-stream.c \ soup-cache-private.h \ @@ -572,6 +734,7 @@ libsoup_2_4_la_SOURCES = \ soup-filter-input-stream.h \ soup-form.c \ soup-headers.c \ + soup-init.c \ soup-io-stream.h \ soup-io-stream.c \ soup-logger.c \ @@ -609,13 +772,18 @@ libsoup_2_4_la_SOURCES = \ soup-session-private.h \ soup-session-sync.c \ soup-socket.c \ + soup-socket-private.h \ + soup-socket-properties.c \ soup-status.c \ soup-tld.c \ soup-tld-private.h \ soup-uri.c \ soup-value-utils.c \ soup-version.c \ - soup-xmlrpc.c + soup-websocket.c \ + soup-websocket-connection.c \ + soup-xmlrpc.c \ + soup-xmlrpc-old.c TLD_DATA_FILE = $(top_srcdir)/data/effective_tld_names.dat @BUILD_LIBSOUP_GNOME_TRUE@libsoupgnomeincludedir = $(includedir)/libsoup-gnome-2.4/libsoup @@ -624,10 +792,11 @@ TLD_DATA_FILE = $(top_srcdir)/data/effective_tld_names.dat @BUILD_LIBSOUP_GNOME_TRUE@ soup-gnome.h \ @BUILD_LIBSOUP_GNOME_TRUE@ soup-gnome-features.h +@BUILD_LIBSOUP_GNOME_TRUE@libsoup_gnome_2_4_la_CFLAGS = $(AM_CFLAGS) $(SOUP_HIDDEN_VISIBILITY_CFLAGS) @BUILD_LIBSOUP_GNOME_TRUE@libsoup_gnome_2_4_la_LDFLAGS = \ @BUILD_LIBSOUP_GNOME_TRUE@ -version-info $(SOUP_CURRENT):$(SOUP_REVISION):$(SOUP_AGE) \ @BUILD_LIBSOUP_GNOME_TRUE@ -no-undefined \ -@BUILD_LIBSOUP_GNOME_TRUE@ -export-symbols $(srcdir)/libsoup-gnome-2.4.sym +@BUILD_LIBSOUP_GNOME_TRUE@ -export-dynamic @BUILD_LIBSOUP_GNOME_TRUE@libsoup_gnome_2_4_la_LIBADD = \ @BUILD_LIBSOUP_GNOME_TRUE@ libsoup-2.4.la \ @@ -648,18 +817,20 @@ BUILT_SOURCES = \ soup_enum_types_sources = $(libsoupinclude_HEADERS) $(libsoupgnomeinclude_HEADERS) soup_enum_types_MKENUMS_C_FLAGS = --fhead "\#define LIBSOUP_USE_UNSTABLE_REQUEST_API" -INTROSPECTION_GIRS = $(am__append_3) $(am__append_4) +soup_enum_types_MKENUMS_H_FLAGS = --fhead "\#include \n\#define GLIB_MKENUMS_EXTERN _SOUP_EXTERN\n" +INTROSPECTION_GIRS = $(am__append_2) $(am__append_5) INTROSPECTION_SCANNER_ARGS = --add-include-path=. INTROSPECTION_COMPILER_ARGS = --includedir=. +@HAVE_INTROSPECTION_TRUE@SOUP_UNSTABLE_REQUEST_CFLAG = -DLIBSOUP_USE_UNSTABLE_REQUEST_API # Core library @HAVE_INTROSPECTION_TRUE@gi_soup_files = \ @HAVE_INTROSPECTION_TRUE@ $(filter-out soup.h soup-enum-types.% soup-proxy-resolver.h,\ @HAVE_INTROSPECTION_TRUE@ $(soup_headers) $(filter-out %.h, $(libsoup_2_4_la_SOURCES))) -@HAVE_INTROSPECTION_TRUE@gi_built_soup_files = soup-enum-types.h +@HAVE_INTROSPECTION_TRUE@gi_built_soup_files = soup-enum-types.h soup-version.h @HAVE_INTROSPECTION_TRUE@Soup_2_4_gir_INCLUDES = Gio-2.0 -@HAVE_INTROSPECTION_TRUE@Soup_2_4_gir_CFLAGS = $(AM_CPPFLAGS) -DLIBSOUP_USE_UNSTABLE_REQUEST_API +@HAVE_INTROSPECTION_TRUE@Soup_2_4_gir_CFLAGS = $(AM_CPPFLAGS) $(SOUP_UNSTABLE_REQUEST_CFLAG) @HAVE_INTROSPECTION_TRUE@Soup_2_4_gir_LIBS = libsoup-2.4.la @HAVE_INTROSPECTION_TRUE@Soup_2_4_gir_EXPORT_PACKAGES = libsoup-2.4 @HAVE_INTROSPECTION_TRUE@Soup_2_4_gir_SCANNERFLAGS = --c-include "libsoup/soup.h" @@ -670,6 +841,12 @@ INTROSPECTION_COMPILER_ARGS = --includedir=. @HAVE_INTROSPECTION_TRUE@ $(addprefix $(srcdir)/,$(f)), \ @HAVE_INTROSPECTION_TRUE@ $(f))) +@ENABLE_VAPIGEN_TRUE@@HAVE_INTROSPECTION_TRUE@vapidir = $(VAPIDIR) +@ENABLE_VAPIGEN_TRUE@@HAVE_INTROSPECTION_TRUE@vapi_DATA = libsoup-2.4.vapi libsoup-2.4.deps +@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@SOUPGNOME_GIR_SCANNER_BASE_FLAGS = \ +@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@ --identifier-prefix=Soup \ +@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@ --symbol-prefix=soup + # GNOME extensions @BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@gi_soup_gnome_files = $(filter-out soup-gnome.h,\ @@ -677,8 +854,7 @@ INTROSPECTION_COMPILER_ARGS = --includedir=. @BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@ $(filter-out %.h, $(libsoup_gnome_2_4_la_SOURCES))) @BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@SoupGNOME_2_4_gir_SCANNERFLAGS = \ -@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@ --identifier-prefix=Soup \ -@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@ --symbol-prefix=soup \ +@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@ $(SOUPGNOME_GIR_SCANNER_BASE_FLAGS) \ @BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@ --c-include "libsoup/soup-gnome.h" \ @BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@ --include-uninstalled=$(builddir)/Soup-2.4.gir @@ -690,13 +866,102 @@ INTROSPECTION_COMPILER_ARGS = --includedir=. @HAVE_INTROSPECTION_TRUE@gir_DATA = $(INTROSPECTION_GIRS) @HAVE_INTROSPECTION_TRUE@typelibdir = $(libdir)/girepository-1.0 @HAVE_INTROSPECTION_TRUE@typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) -@HAVE_INTROSPECTION_TRUE@CLEANFILES = $(gir_DATA) $(typelib_DATA) $(BUILT_SOURCES) + +# ------ MSVC Project File Generation ------ +MSVCPROJS = soup soup-gnome +soup_FILES = $(libsoup_2_4_la_SOURCES) +soup_EXCLUDES = dummy +soup_HEADERS_DIR = $(libsoupincludedir) +soup_HEADERS_INST = $(libsoupinclude_HEADERS) $(nodist_libsoupinclude_HEADERS) +soup_HEADERS_EXCLUDES = dummy +soup_gnome_FILES = $(libsoup_gnome_2_4_la_SOURCES) +soup_gnome_EXCLUDES = dummy +soup_gnome_HEADERS_DIR = $(libsoupgnomeincludedir) +soup_gnome_HEADERS_INST = $(libsoupgnomeinclude_HEADERS) +soup_gnome_HEADERS_EXCLUDES = dummy +_proj_name = $(subst /,_,$(subst -,_,$(subst .,_,$(1)))) +_proj_path_raw := $(subst $(abs_top_srcdir),,$(abs_srcdir)) +_proj_path = $(subst /,\\,$(_proj_path_raw)) +_proj_subdir_int = $(subst \\\\,\\,\\$(_proj_path)\\) +_proj_subdir = $(subst \\.\\,\\,$(_proj_subdir_int)) +_proj_files_raw = $(subst /,\\,$($(_proj_name)_FILES)) +_proj_files = $(subst $(srcdir)\\,,$(subst $(builddir)\\,,$(subst $(top_builddir)\\$(_proj_path)\\,\\,$(_proj_files_raw)))) +_proj_filters = $($(_proj_name)_EXCLUDES) +_proj_headers_raw = $(subst /,\\,$($(_proj_name)_HEADERS_INST)) +_proj_headers = $(subst $(srcdir)\\,,$(subst $(builddir)\\,,$(subst $(top_builddir)\\$(_proj_path)\\,\\,$(_proj_headers_raw)))) +_proj_headers_excludes = $($(_proj_name)_HEADERS_EXCLUDES) +_headers_dest_posix = $(subst $(includedir),,$($(_proj_name)_HEADERS_DIR)) +_headers_destdir = $(subst /,\\,$(_headers_dest_posix)) + +# Introspection Items for MSVC +@HAVE_INTROSPECTION_TRUE@MSVC_INTROSPECT_GIRS = Soup-2.4.gir \ +@HAVE_INTROSPECTION_TRUE@ $(am__append_7) +@HAVE_INTROSPECTION_TRUE@BASE_MSVC_GIR_CFLAGS = \ +@HAVE_INTROSPECTION_TRUE@ $(SOUP_COMMON_CPPFLAGS) \ +@HAVE_INTROSPECTION_TRUE@ -I.. + +@HAVE_INTROSPECTION_FALSE@INTROSPECTION_INTERMEDIATE_ITEMS = +@HAVE_INTROSPECTION_TRUE@INTROSPECTION_INTERMEDIATE_ITEMS = \ +@HAVE_INTROSPECTION_TRUE@ $(top_builddir)/win32/Soup-2.4.gir.msvc.introspect \ +@HAVE_INTROSPECTION_TRUE@ $(top_builddir)/win32/Soup_2_4_gir_list \ +@HAVE_INTROSPECTION_TRUE@ $(top_builddir)/win32/SoupGNOME-2.4.gir.msvc.introspect \ +@HAVE_INTROSPECTION_TRUE@ $(top_builddir)/win32/SoupGNOME_2_4_gir_list + + +# libsoup +@HAVE_INTROSPECTION_TRUE@Soup_2_4_gir_MSVC_FILES = $(gi_soup_files) $(gi_built_soup_files) +@HAVE_INTROSPECTION_TRUE@Soup_2_4_gir_MSVC_EXPORT_PACKAGES = $(Soup_2_4_gir_EXPORT_PACKAGES) +@HAVE_INTROSPECTION_TRUE@Soup_2_4_gir_MSVC_INCLUDE_GIRS = $(Soup_2_4_gir_INCLUDES) +@HAVE_INTROSPECTION_TRUE@Soup_2_4_gir_MSVC_LIBS = soup-2.4 +@HAVE_INTROSPECTION_TRUE@Soup_2_4_gir_MSVC_CFLAGS = $(BASE_MSVC_GIR_CFLAGS) $(SOUP_UNSTABLE_REQUEST_CFLAG) +@HAVE_INTROSPECTION_TRUE@Soup_2_4_gir_MSVC_SCANNERFLAGS = --c-include \"libsoup/soup.h\" + +# libsoup-gnome +@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@SoupGNOME_2_4_gir_MSVC_FILES = $(gi_soup_gnome_files) +@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@SoupGNOME_2_4_gir_MSVC_GIR_DEPS = Soup-2.4.gir +@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@SoupGNOME_2_4_gir_MSVC_EXPORT_PACKAGES = $(SoupGNOME_2_4_gir_EXPORT_PACKAGES) +@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@SoupGNOME_2_4_gir_MSVC_LIBS = soup-gnome-2.4 soup-2.4 +@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@SoupGNOME_2_4_gir_MSVC_CFLAGS = $(BASE_MSVC_GIR_CFLAGS) +@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@SoupGNOME_2_4_gir_MSVC_SCANNERFLAGS = i \ +@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@ $(SOUPGNOME_GIR_SCANNER_BASE_FLAGS) \ +@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@ --c-include \"libsoup/soup-gnome.h\" \ +@BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@ --include-uninstalled=./Soup-2.4.gir + +@HAVE_INTROSPECTION_TRUE@_gir_name = $(subst /,_,$(subst -,_,$(subst .,_,$(1)))) + +# Namespace and Version is either fetched from the gir filename +# or the _NAMESPACE/_VERSION variable combo +@HAVE_INTROSPECTION_TRUE@_gir_namespace_msvc = $(or $($(_gir_name)_NAMESPACE),$(firstword $(subst -, ,$(notdir $(1))))) +@HAVE_INTROSPECTION_TRUE@_gir_version_msvc = $(or $($(_gir_name)_VERSION),$(lastword $(subst -, ,$(1:.gir=)))) +@HAVE_INTROSPECTION_TRUE@_typelib_basename_msvc = $(_gir_namespace_msvc)'-'$(_gir_version_msvc) + +# _PROGRAM is an optional variable which needs its own --program argument +@HAVE_INTROSPECTION_TRUE@_gir_program_msvc = $(if $($(_gir_name)_MSVC_PROGRAM),--program=$($(_gir_name)_MSVC_PROGRAM)) + +# Deduce the sub-folder from $(srcroot) where the sources reside in +@HAVE_INTROSPECTION_TRUE@_gir_source_path_raw_msvc := $(subst $(abs_top_srcdir),,$(abs_srcdir)) +@HAVE_INTROSPECTION_TRUE@_gir_source_path_msvc = $(subst /,\\,$(_gir_source_path_raw_msvc)) +@HAVE_INTROSPECTION_TRUE@_gir_source_subdir_int_msvc = $(subst \\\\,\\,\\$(_gir_source_path_msvc)\\) +@HAVE_INTROSPECTION_TRUE@_gir_source_subdir_msvc = $(subst \\.\\,\\,$(_gir_source_subdir_int_msvc)) +@HAVE_INTROSPECTION_TRUE@_gir_files_raw_msvc = $(subst /,\\,$($(_gir_name)_MSVC_FILES)) +@HAVE_INTROSPECTION_TRUE@_gir_files_msvc = $(subst $(srcdir)\\,,$(subst $(builddir)\\,,$(subst $(top_builddir)\\$(_gir_source_path_msvc)\\,\\,$(_gir_files_raw_msvc)))) + +# Create a list of items for: +# - Libraries +# - Packages +# - GIRs to include +# - packages to export +@HAVE_INTROSPECTION_TRUE@_gir_libraries_msvc = $(foreach lib,$($(_gir_name)_MSVC_LIBS),--library=$(lib)) +@HAVE_INTROSPECTION_TRUE@_gir_packages_msvc = $(foreach pkg,$($(_gir_name)_MSVC_PACKAGES),--pkg=$(pkg)) +@HAVE_INTROSPECTION_TRUE@_gir_includes_msvc = $(foreach include,$($(_gir_name)_MSVC_INCLUDE_GIRS),--include=$(include)) +@HAVE_INTROSPECTION_TRUE@_gir_export_packages_msvc = $(foreach pkg,$($(_gir_name)_MSVC_EXPORT_PACKAGES),--pkg-export=$(pkg)) +@HAVE_INTROSPECTION_TRUE@_gir_c_includes_msvc = $(foreach include,$($(_gir_name)_MSVC_C_INCLUDES),--c-include=$(include)) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/win32/Makefile.msvcproj $(top_srcdir)/win32/Makefile.msvc-introspection $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -708,7 +973,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libsoup/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libsoup/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -717,6 +981,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/win32/Makefile.msvcproj $(top_srcdir)/win32/Makefile.msvc-introspection $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -776,91 +1041,98 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-address.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-auth-basic.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-auth-digest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-auth-domain-basic.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-auth-domain-digest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-auth-domain.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-auth-manager.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-auth-ntlm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-auth.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-body-input-stream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-body-output-stream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-cache-input-stream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-cache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-client-input-stream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-connection-auth.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-connection.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-content-decoder.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-content-processor.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-content-sniffer-stream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-content-sniffer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-converter-wrapper.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-cookie-jar-db.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-cookie-jar-sqlite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-cookie-jar-text.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-cookie-jar.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-cookie.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-date.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-directory-input-stream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-enum-types.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-filter-input-stream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-form.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-gnome-features.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-headers.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-io-stream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-logger.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-message-body.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-message-client-io.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-message-headers.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-message-io.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-message-queue.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-message-server-io.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-message.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-method.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-misc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-multipart-input-stream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-multipart.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-password-manager-gnome.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-password-manager.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-path-map.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-proxy-resolver-default.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-proxy-resolver-gnome.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-proxy-resolver-wrapper.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-proxy-resolver.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-proxy-uri-resolver.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-request-data.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-request-file.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-request-http.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-request.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-requester.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-server.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-session-async.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-session-feature.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-session-sync.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-session.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-socket.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-status.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-tld.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-uri.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-value-utils.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-version.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soup-xmlrpc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-address.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-auth-basic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-auth-digest.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-auth-domain-basic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-auth-domain-digest.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-auth-domain.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-auth-manager.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-auth-negotiate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-auth-ntlm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-auth.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-body-input-stream.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-body-output-stream.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-cache-client-input-stream.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-cache-input-stream.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-cache.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-client-input-stream.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-connection-auth.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-connection.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-content-decoder.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-content-processor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-content-sniffer-stream.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-content-sniffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-converter-wrapper.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-cookie-jar-db.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-cookie-jar-text.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-cookie-jar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-cookie.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-date.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-directory-input-stream.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-enum-types.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-filter-input-stream.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-form.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-headers.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-init.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-io-stream.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-logger.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-message-body.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-message-client-io.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-message-headers.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-message-io.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-message-queue.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-message-server-io.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-message.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-method.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-misc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-multipart-input-stream.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-multipart.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-password-manager.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-path-map.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-proxy-resolver-default.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-proxy-resolver-wrapper.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-proxy-resolver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-proxy-uri-resolver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-request-data.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-request-file.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-request-http.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-request.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-requester.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-server.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-session-async.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-session-feature.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-session-sync.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-session.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-socket-properties.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-socket.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-status.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-tld.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-uri.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-value-utils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-version.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-websocket-connection.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-websocket.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-xmlrpc-old.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_2_4_la-soup-xmlrpc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_gnome_2_4_la-soup-cookie-jar-sqlite.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_gnome_2_4_la-soup-gnome-features.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_gnome_2_4_la-soup-password-manager-gnome.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsoup_gnome_2_4_la-soup-proxy-resolver-gnome.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -869,6 +1141,552 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< +libsoup_2_4_la-soup-address.lo: soup-address.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-address.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-address.Tpo -c -o libsoup_2_4_la-soup-address.lo `test -f 'soup-address.c' || echo '$(srcdir)/'`soup-address.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-address.Tpo $(DEPDIR)/libsoup_2_4_la-soup-address.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-address.c' object='libsoup_2_4_la-soup-address.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-address.lo `test -f 'soup-address.c' || echo '$(srcdir)/'`soup-address.c + +libsoup_2_4_la-soup-auth.lo: soup-auth.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-auth.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-auth.Tpo -c -o libsoup_2_4_la-soup-auth.lo `test -f 'soup-auth.c' || echo '$(srcdir)/'`soup-auth.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-auth.Tpo $(DEPDIR)/libsoup_2_4_la-soup-auth.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-auth.c' object='libsoup_2_4_la-soup-auth.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-auth.lo `test -f 'soup-auth.c' || echo '$(srcdir)/'`soup-auth.c + +libsoup_2_4_la-soup-auth-basic.lo: soup-auth-basic.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-auth-basic.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-auth-basic.Tpo -c -o libsoup_2_4_la-soup-auth-basic.lo `test -f 'soup-auth-basic.c' || echo '$(srcdir)/'`soup-auth-basic.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-auth-basic.Tpo $(DEPDIR)/libsoup_2_4_la-soup-auth-basic.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-auth-basic.c' object='libsoup_2_4_la-soup-auth-basic.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-auth-basic.lo `test -f 'soup-auth-basic.c' || echo '$(srcdir)/'`soup-auth-basic.c + +libsoup_2_4_la-soup-auth-digest.lo: soup-auth-digest.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-auth-digest.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-auth-digest.Tpo -c -o libsoup_2_4_la-soup-auth-digest.lo `test -f 'soup-auth-digest.c' || echo '$(srcdir)/'`soup-auth-digest.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-auth-digest.Tpo $(DEPDIR)/libsoup_2_4_la-soup-auth-digest.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-auth-digest.c' object='libsoup_2_4_la-soup-auth-digest.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-auth-digest.lo `test -f 'soup-auth-digest.c' || echo '$(srcdir)/'`soup-auth-digest.c + +libsoup_2_4_la-soup-auth-ntlm.lo: soup-auth-ntlm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-auth-ntlm.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-auth-ntlm.Tpo -c -o libsoup_2_4_la-soup-auth-ntlm.lo `test -f 'soup-auth-ntlm.c' || echo '$(srcdir)/'`soup-auth-ntlm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-auth-ntlm.Tpo $(DEPDIR)/libsoup_2_4_la-soup-auth-ntlm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-auth-ntlm.c' object='libsoup_2_4_la-soup-auth-ntlm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-auth-ntlm.lo `test -f 'soup-auth-ntlm.c' || echo '$(srcdir)/'`soup-auth-ntlm.c + +libsoup_2_4_la-soup-auth-negotiate.lo: soup-auth-negotiate.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-auth-negotiate.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-auth-negotiate.Tpo -c -o libsoup_2_4_la-soup-auth-negotiate.lo `test -f 'soup-auth-negotiate.c' || echo '$(srcdir)/'`soup-auth-negotiate.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-auth-negotiate.Tpo $(DEPDIR)/libsoup_2_4_la-soup-auth-negotiate.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-auth-negotiate.c' object='libsoup_2_4_la-soup-auth-negotiate.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-auth-negotiate.lo `test -f 'soup-auth-negotiate.c' || echo '$(srcdir)/'`soup-auth-negotiate.c + +libsoup_2_4_la-soup-auth-domain.lo: soup-auth-domain.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-auth-domain.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-auth-domain.Tpo -c -o libsoup_2_4_la-soup-auth-domain.lo `test -f 'soup-auth-domain.c' || echo '$(srcdir)/'`soup-auth-domain.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-auth-domain.Tpo $(DEPDIR)/libsoup_2_4_la-soup-auth-domain.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-auth-domain.c' object='libsoup_2_4_la-soup-auth-domain.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-auth-domain.lo `test -f 'soup-auth-domain.c' || echo '$(srcdir)/'`soup-auth-domain.c + +libsoup_2_4_la-soup-auth-domain-basic.lo: soup-auth-domain-basic.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-auth-domain-basic.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-auth-domain-basic.Tpo -c -o libsoup_2_4_la-soup-auth-domain-basic.lo `test -f 'soup-auth-domain-basic.c' || echo '$(srcdir)/'`soup-auth-domain-basic.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-auth-domain-basic.Tpo $(DEPDIR)/libsoup_2_4_la-soup-auth-domain-basic.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-auth-domain-basic.c' object='libsoup_2_4_la-soup-auth-domain-basic.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-auth-domain-basic.lo `test -f 'soup-auth-domain-basic.c' || echo '$(srcdir)/'`soup-auth-domain-basic.c + +libsoup_2_4_la-soup-auth-domain-digest.lo: soup-auth-domain-digest.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-auth-domain-digest.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-auth-domain-digest.Tpo -c -o libsoup_2_4_la-soup-auth-domain-digest.lo `test -f 'soup-auth-domain-digest.c' || echo '$(srcdir)/'`soup-auth-domain-digest.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-auth-domain-digest.Tpo $(DEPDIR)/libsoup_2_4_la-soup-auth-domain-digest.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-auth-domain-digest.c' object='libsoup_2_4_la-soup-auth-domain-digest.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-auth-domain-digest.lo `test -f 'soup-auth-domain-digest.c' || echo '$(srcdir)/'`soup-auth-domain-digest.c + +libsoup_2_4_la-soup-auth-manager.lo: soup-auth-manager.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-auth-manager.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-auth-manager.Tpo -c -o libsoup_2_4_la-soup-auth-manager.lo `test -f 'soup-auth-manager.c' || echo '$(srcdir)/'`soup-auth-manager.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-auth-manager.Tpo $(DEPDIR)/libsoup_2_4_la-soup-auth-manager.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-auth-manager.c' object='libsoup_2_4_la-soup-auth-manager.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-auth-manager.lo `test -f 'soup-auth-manager.c' || echo '$(srcdir)/'`soup-auth-manager.c + +libsoup_2_4_la-soup-body-input-stream.lo: soup-body-input-stream.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-body-input-stream.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-body-input-stream.Tpo -c -o libsoup_2_4_la-soup-body-input-stream.lo `test -f 'soup-body-input-stream.c' || echo '$(srcdir)/'`soup-body-input-stream.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-body-input-stream.Tpo $(DEPDIR)/libsoup_2_4_la-soup-body-input-stream.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-body-input-stream.c' object='libsoup_2_4_la-soup-body-input-stream.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-body-input-stream.lo `test -f 'soup-body-input-stream.c' || echo '$(srcdir)/'`soup-body-input-stream.c + +libsoup_2_4_la-soup-body-output-stream.lo: soup-body-output-stream.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-body-output-stream.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-body-output-stream.Tpo -c -o libsoup_2_4_la-soup-body-output-stream.lo `test -f 'soup-body-output-stream.c' || echo '$(srcdir)/'`soup-body-output-stream.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-body-output-stream.Tpo $(DEPDIR)/libsoup_2_4_la-soup-body-output-stream.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-body-output-stream.c' object='libsoup_2_4_la-soup-body-output-stream.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-body-output-stream.lo `test -f 'soup-body-output-stream.c' || echo '$(srcdir)/'`soup-body-output-stream.c + +libsoup_2_4_la-soup-cache.lo: soup-cache.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-cache.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-cache.Tpo -c -o libsoup_2_4_la-soup-cache.lo `test -f 'soup-cache.c' || echo '$(srcdir)/'`soup-cache.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-cache.Tpo $(DEPDIR)/libsoup_2_4_la-soup-cache.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-cache.c' object='libsoup_2_4_la-soup-cache.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-cache.lo `test -f 'soup-cache.c' || echo '$(srcdir)/'`soup-cache.c + +libsoup_2_4_la-soup-cache-client-input-stream.lo: soup-cache-client-input-stream.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-cache-client-input-stream.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-cache-client-input-stream.Tpo -c -o libsoup_2_4_la-soup-cache-client-input-stream.lo `test -f 'soup-cache-client-input-stream.c' || echo '$(srcdir)/'`soup-cache-client-input-stream.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-cache-client-input-stream.Tpo $(DEPDIR)/libsoup_2_4_la-soup-cache-client-input-stream.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-cache-client-input-stream.c' object='libsoup_2_4_la-soup-cache-client-input-stream.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-cache-client-input-stream.lo `test -f 'soup-cache-client-input-stream.c' || echo '$(srcdir)/'`soup-cache-client-input-stream.c + +libsoup_2_4_la-soup-cache-input-stream.lo: soup-cache-input-stream.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-cache-input-stream.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-cache-input-stream.Tpo -c -o libsoup_2_4_la-soup-cache-input-stream.lo `test -f 'soup-cache-input-stream.c' || echo '$(srcdir)/'`soup-cache-input-stream.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-cache-input-stream.Tpo $(DEPDIR)/libsoup_2_4_la-soup-cache-input-stream.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-cache-input-stream.c' object='libsoup_2_4_la-soup-cache-input-stream.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-cache-input-stream.lo `test -f 'soup-cache-input-stream.c' || echo '$(srcdir)/'`soup-cache-input-stream.c + +libsoup_2_4_la-soup-client-input-stream.lo: soup-client-input-stream.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-client-input-stream.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-client-input-stream.Tpo -c -o libsoup_2_4_la-soup-client-input-stream.lo `test -f 'soup-client-input-stream.c' || echo '$(srcdir)/'`soup-client-input-stream.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-client-input-stream.Tpo $(DEPDIR)/libsoup_2_4_la-soup-client-input-stream.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-client-input-stream.c' object='libsoup_2_4_la-soup-client-input-stream.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-client-input-stream.lo `test -f 'soup-client-input-stream.c' || echo '$(srcdir)/'`soup-client-input-stream.c + +libsoup_2_4_la-soup-connection.lo: soup-connection.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-connection.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-connection.Tpo -c -o libsoup_2_4_la-soup-connection.lo `test -f 'soup-connection.c' || echo '$(srcdir)/'`soup-connection.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-connection.Tpo $(DEPDIR)/libsoup_2_4_la-soup-connection.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-connection.c' object='libsoup_2_4_la-soup-connection.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-connection.lo `test -f 'soup-connection.c' || echo '$(srcdir)/'`soup-connection.c + +libsoup_2_4_la-soup-connection-auth.lo: soup-connection-auth.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-connection-auth.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-connection-auth.Tpo -c -o libsoup_2_4_la-soup-connection-auth.lo `test -f 'soup-connection-auth.c' || echo '$(srcdir)/'`soup-connection-auth.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-connection-auth.Tpo $(DEPDIR)/libsoup_2_4_la-soup-connection-auth.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-connection-auth.c' object='libsoup_2_4_la-soup-connection-auth.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-connection-auth.lo `test -f 'soup-connection-auth.c' || echo '$(srcdir)/'`soup-connection-auth.c + +libsoup_2_4_la-soup-content-decoder.lo: soup-content-decoder.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-content-decoder.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-content-decoder.Tpo -c -o libsoup_2_4_la-soup-content-decoder.lo `test -f 'soup-content-decoder.c' || echo '$(srcdir)/'`soup-content-decoder.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-content-decoder.Tpo $(DEPDIR)/libsoup_2_4_la-soup-content-decoder.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-content-decoder.c' object='libsoup_2_4_la-soup-content-decoder.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-content-decoder.lo `test -f 'soup-content-decoder.c' || echo '$(srcdir)/'`soup-content-decoder.c + +libsoup_2_4_la-soup-content-processor.lo: soup-content-processor.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-content-processor.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-content-processor.Tpo -c -o libsoup_2_4_la-soup-content-processor.lo `test -f 'soup-content-processor.c' || echo '$(srcdir)/'`soup-content-processor.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-content-processor.Tpo $(DEPDIR)/libsoup_2_4_la-soup-content-processor.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-content-processor.c' object='libsoup_2_4_la-soup-content-processor.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-content-processor.lo `test -f 'soup-content-processor.c' || echo '$(srcdir)/'`soup-content-processor.c + +libsoup_2_4_la-soup-content-sniffer.lo: soup-content-sniffer.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-content-sniffer.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-content-sniffer.Tpo -c -o libsoup_2_4_la-soup-content-sniffer.lo `test -f 'soup-content-sniffer.c' || echo '$(srcdir)/'`soup-content-sniffer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-content-sniffer.Tpo $(DEPDIR)/libsoup_2_4_la-soup-content-sniffer.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-content-sniffer.c' object='libsoup_2_4_la-soup-content-sniffer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-content-sniffer.lo `test -f 'soup-content-sniffer.c' || echo '$(srcdir)/'`soup-content-sniffer.c + +libsoup_2_4_la-soup-content-sniffer-stream.lo: soup-content-sniffer-stream.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-content-sniffer-stream.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-content-sniffer-stream.Tpo -c -o libsoup_2_4_la-soup-content-sniffer-stream.lo `test -f 'soup-content-sniffer-stream.c' || echo '$(srcdir)/'`soup-content-sniffer-stream.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-content-sniffer-stream.Tpo $(DEPDIR)/libsoup_2_4_la-soup-content-sniffer-stream.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-content-sniffer-stream.c' object='libsoup_2_4_la-soup-content-sniffer-stream.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-content-sniffer-stream.lo `test -f 'soup-content-sniffer-stream.c' || echo '$(srcdir)/'`soup-content-sniffer-stream.c + +libsoup_2_4_la-soup-converter-wrapper.lo: soup-converter-wrapper.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-converter-wrapper.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-converter-wrapper.Tpo -c -o libsoup_2_4_la-soup-converter-wrapper.lo `test -f 'soup-converter-wrapper.c' || echo '$(srcdir)/'`soup-converter-wrapper.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-converter-wrapper.Tpo $(DEPDIR)/libsoup_2_4_la-soup-converter-wrapper.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-converter-wrapper.c' object='libsoup_2_4_la-soup-converter-wrapper.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-converter-wrapper.lo `test -f 'soup-converter-wrapper.c' || echo '$(srcdir)/'`soup-converter-wrapper.c + +libsoup_2_4_la-soup-cookie.lo: soup-cookie.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-cookie.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-cookie.Tpo -c -o libsoup_2_4_la-soup-cookie.lo `test -f 'soup-cookie.c' || echo '$(srcdir)/'`soup-cookie.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-cookie.Tpo $(DEPDIR)/libsoup_2_4_la-soup-cookie.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-cookie.c' object='libsoup_2_4_la-soup-cookie.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-cookie.lo `test -f 'soup-cookie.c' || echo '$(srcdir)/'`soup-cookie.c + +libsoup_2_4_la-soup-cookie-jar.lo: soup-cookie-jar.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-cookie-jar.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-cookie-jar.Tpo -c -o libsoup_2_4_la-soup-cookie-jar.lo `test -f 'soup-cookie-jar.c' || echo '$(srcdir)/'`soup-cookie-jar.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-cookie-jar.Tpo $(DEPDIR)/libsoup_2_4_la-soup-cookie-jar.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-cookie-jar.c' object='libsoup_2_4_la-soup-cookie-jar.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-cookie-jar.lo `test -f 'soup-cookie-jar.c' || echo '$(srcdir)/'`soup-cookie-jar.c + +libsoup_2_4_la-soup-cookie-jar-db.lo: soup-cookie-jar-db.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-cookie-jar-db.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-cookie-jar-db.Tpo -c -o libsoup_2_4_la-soup-cookie-jar-db.lo `test -f 'soup-cookie-jar-db.c' || echo '$(srcdir)/'`soup-cookie-jar-db.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-cookie-jar-db.Tpo $(DEPDIR)/libsoup_2_4_la-soup-cookie-jar-db.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-cookie-jar-db.c' object='libsoup_2_4_la-soup-cookie-jar-db.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-cookie-jar-db.lo `test -f 'soup-cookie-jar-db.c' || echo '$(srcdir)/'`soup-cookie-jar-db.c + +libsoup_2_4_la-soup-cookie-jar-text.lo: soup-cookie-jar-text.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-cookie-jar-text.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-cookie-jar-text.Tpo -c -o libsoup_2_4_la-soup-cookie-jar-text.lo `test -f 'soup-cookie-jar-text.c' || echo '$(srcdir)/'`soup-cookie-jar-text.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-cookie-jar-text.Tpo $(DEPDIR)/libsoup_2_4_la-soup-cookie-jar-text.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-cookie-jar-text.c' object='libsoup_2_4_la-soup-cookie-jar-text.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-cookie-jar-text.lo `test -f 'soup-cookie-jar-text.c' || echo '$(srcdir)/'`soup-cookie-jar-text.c + +libsoup_2_4_la-soup-date.lo: soup-date.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-date.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-date.Tpo -c -o libsoup_2_4_la-soup-date.lo `test -f 'soup-date.c' || echo '$(srcdir)/'`soup-date.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-date.Tpo $(DEPDIR)/libsoup_2_4_la-soup-date.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-date.c' object='libsoup_2_4_la-soup-date.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-date.lo `test -f 'soup-date.c' || echo '$(srcdir)/'`soup-date.c + +libsoup_2_4_la-soup-directory-input-stream.lo: soup-directory-input-stream.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-directory-input-stream.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-directory-input-stream.Tpo -c -o libsoup_2_4_la-soup-directory-input-stream.lo `test -f 'soup-directory-input-stream.c' || echo '$(srcdir)/'`soup-directory-input-stream.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-directory-input-stream.Tpo $(DEPDIR)/libsoup_2_4_la-soup-directory-input-stream.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-directory-input-stream.c' object='libsoup_2_4_la-soup-directory-input-stream.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-directory-input-stream.lo `test -f 'soup-directory-input-stream.c' || echo '$(srcdir)/'`soup-directory-input-stream.c + +libsoup_2_4_la-soup-enum-types.lo: soup-enum-types.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-enum-types.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-enum-types.Tpo -c -o libsoup_2_4_la-soup-enum-types.lo `test -f 'soup-enum-types.c' || echo '$(srcdir)/'`soup-enum-types.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-enum-types.Tpo $(DEPDIR)/libsoup_2_4_la-soup-enum-types.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-enum-types.c' object='libsoup_2_4_la-soup-enum-types.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-enum-types.lo `test -f 'soup-enum-types.c' || echo '$(srcdir)/'`soup-enum-types.c + +libsoup_2_4_la-soup-filter-input-stream.lo: soup-filter-input-stream.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-filter-input-stream.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-filter-input-stream.Tpo -c -o libsoup_2_4_la-soup-filter-input-stream.lo `test -f 'soup-filter-input-stream.c' || echo '$(srcdir)/'`soup-filter-input-stream.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-filter-input-stream.Tpo $(DEPDIR)/libsoup_2_4_la-soup-filter-input-stream.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-filter-input-stream.c' object='libsoup_2_4_la-soup-filter-input-stream.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-filter-input-stream.lo `test -f 'soup-filter-input-stream.c' || echo '$(srcdir)/'`soup-filter-input-stream.c + +libsoup_2_4_la-soup-form.lo: soup-form.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-form.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-form.Tpo -c -o libsoup_2_4_la-soup-form.lo `test -f 'soup-form.c' || echo '$(srcdir)/'`soup-form.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-form.Tpo $(DEPDIR)/libsoup_2_4_la-soup-form.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-form.c' object='libsoup_2_4_la-soup-form.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-form.lo `test -f 'soup-form.c' || echo '$(srcdir)/'`soup-form.c + +libsoup_2_4_la-soup-headers.lo: soup-headers.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-headers.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-headers.Tpo -c -o libsoup_2_4_la-soup-headers.lo `test -f 'soup-headers.c' || echo '$(srcdir)/'`soup-headers.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-headers.Tpo $(DEPDIR)/libsoup_2_4_la-soup-headers.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-headers.c' object='libsoup_2_4_la-soup-headers.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-headers.lo `test -f 'soup-headers.c' || echo '$(srcdir)/'`soup-headers.c + +libsoup_2_4_la-soup-init.lo: soup-init.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-init.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-init.Tpo -c -o libsoup_2_4_la-soup-init.lo `test -f 'soup-init.c' || echo '$(srcdir)/'`soup-init.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-init.Tpo $(DEPDIR)/libsoup_2_4_la-soup-init.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-init.c' object='libsoup_2_4_la-soup-init.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-init.lo `test -f 'soup-init.c' || echo '$(srcdir)/'`soup-init.c + +libsoup_2_4_la-soup-io-stream.lo: soup-io-stream.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-io-stream.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-io-stream.Tpo -c -o libsoup_2_4_la-soup-io-stream.lo `test -f 'soup-io-stream.c' || echo '$(srcdir)/'`soup-io-stream.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-io-stream.Tpo $(DEPDIR)/libsoup_2_4_la-soup-io-stream.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-io-stream.c' object='libsoup_2_4_la-soup-io-stream.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-io-stream.lo `test -f 'soup-io-stream.c' || echo '$(srcdir)/'`soup-io-stream.c + +libsoup_2_4_la-soup-logger.lo: soup-logger.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-logger.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-logger.Tpo -c -o libsoup_2_4_la-soup-logger.lo `test -f 'soup-logger.c' || echo '$(srcdir)/'`soup-logger.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-logger.Tpo $(DEPDIR)/libsoup_2_4_la-soup-logger.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-logger.c' object='libsoup_2_4_la-soup-logger.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-logger.lo `test -f 'soup-logger.c' || echo '$(srcdir)/'`soup-logger.c + +libsoup_2_4_la-soup-message.lo: soup-message.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-message.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-message.Tpo -c -o libsoup_2_4_la-soup-message.lo `test -f 'soup-message.c' || echo '$(srcdir)/'`soup-message.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-message.Tpo $(DEPDIR)/libsoup_2_4_la-soup-message.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-message.c' object='libsoup_2_4_la-soup-message.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-message.lo `test -f 'soup-message.c' || echo '$(srcdir)/'`soup-message.c + +libsoup_2_4_la-soup-message-body.lo: soup-message-body.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-message-body.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-message-body.Tpo -c -o libsoup_2_4_la-soup-message-body.lo `test -f 'soup-message-body.c' || echo '$(srcdir)/'`soup-message-body.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-message-body.Tpo $(DEPDIR)/libsoup_2_4_la-soup-message-body.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-message-body.c' object='libsoup_2_4_la-soup-message-body.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-message-body.lo `test -f 'soup-message-body.c' || echo '$(srcdir)/'`soup-message-body.c + +libsoup_2_4_la-soup-message-client-io.lo: soup-message-client-io.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-message-client-io.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-message-client-io.Tpo -c -o libsoup_2_4_la-soup-message-client-io.lo `test -f 'soup-message-client-io.c' || echo '$(srcdir)/'`soup-message-client-io.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-message-client-io.Tpo $(DEPDIR)/libsoup_2_4_la-soup-message-client-io.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-message-client-io.c' object='libsoup_2_4_la-soup-message-client-io.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-message-client-io.lo `test -f 'soup-message-client-io.c' || echo '$(srcdir)/'`soup-message-client-io.c + +libsoup_2_4_la-soup-message-headers.lo: soup-message-headers.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-message-headers.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-message-headers.Tpo -c -o libsoup_2_4_la-soup-message-headers.lo `test -f 'soup-message-headers.c' || echo '$(srcdir)/'`soup-message-headers.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-message-headers.Tpo $(DEPDIR)/libsoup_2_4_la-soup-message-headers.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-message-headers.c' object='libsoup_2_4_la-soup-message-headers.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-message-headers.lo `test -f 'soup-message-headers.c' || echo '$(srcdir)/'`soup-message-headers.c + +libsoup_2_4_la-soup-message-io.lo: soup-message-io.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-message-io.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-message-io.Tpo -c -o libsoup_2_4_la-soup-message-io.lo `test -f 'soup-message-io.c' || echo '$(srcdir)/'`soup-message-io.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-message-io.Tpo $(DEPDIR)/libsoup_2_4_la-soup-message-io.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-message-io.c' object='libsoup_2_4_la-soup-message-io.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-message-io.lo `test -f 'soup-message-io.c' || echo '$(srcdir)/'`soup-message-io.c + +libsoup_2_4_la-soup-message-queue.lo: soup-message-queue.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-message-queue.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-message-queue.Tpo -c -o libsoup_2_4_la-soup-message-queue.lo `test -f 'soup-message-queue.c' || echo '$(srcdir)/'`soup-message-queue.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-message-queue.Tpo $(DEPDIR)/libsoup_2_4_la-soup-message-queue.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-message-queue.c' object='libsoup_2_4_la-soup-message-queue.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-message-queue.lo `test -f 'soup-message-queue.c' || echo '$(srcdir)/'`soup-message-queue.c + +libsoup_2_4_la-soup-message-server-io.lo: soup-message-server-io.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-message-server-io.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-message-server-io.Tpo -c -o libsoup_2_4_la-soup-message-server-io.lo `test -f 'soup-message-server-io.c' || echo '$(srcdir)/'`soup-message-server-io.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-message-server-io.Tpo $(DEPDIR)/libsoup_2_4_la-soup-message-server-io.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-message-server-io.c' object='libsoup_2_4_la-soup-message-server-io.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-message-server-io.lo `test -f 'soup-message-server-io.c' || echo '$(srcdir)/'`soup-message-server-io.c + +libsoup_2_4_la-soup-method.lo: soup-method.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-method.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-method.Tpo -c -o libsoup_2_4_la-soup-method.lo `test -f 'soup-method.c' || echo '$(srcdir)/'`soup-method.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-method.Tpo $(DEPDIR)/libsoup_2_4_la-soup-method.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-method.c' object='libsoup_2_4_la-soup-method.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-method.lo `test -f 'soup-method.c' || echo '$(srcdir)/'`soup-method.c + +libsoup_2_4_la-soup-misc.lo: soup-misc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-misc.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-misc.Tpo -c -o libsoup_2_4_la-soup-misc.lo `test -f 'soup-misc.c' || echo '$(srcdir)/'`soup-misc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-misc.Tpo $(DEPDIR)/libsoup_2_4_la-soup-misc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-misc.c' object='libsoup_2_4_la-soup-misc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-misc.lo `test -f 'soup-misc.c' || echo '$(srcdir)/'`soup-misc.c + +libsoup_2_4_la-soup-multipart.lo: soup-multipart.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-multipart.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-multipart.Tpo -c -o libsoup_2_4_la-soup-multipart.lo `test -f 'soup-multipart.c' || echo '$(srcdir)/'`soup-multipart.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-multipart.Tpo $(DEPDIR)/libsoup_2_4_la-soup-multipart.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-multipart.c' object='libsoup_2_4_la-soup-multipart.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-multipart.lo `test -f 'soup-multipart.c' || echo '$(srcdir)/'`soup-multipart.c + +libsoup_2_4_la-soup-multipart-input-stream.lo: soup-multipart-input-stream.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-multipart-input-stream.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-multipart-input-stream.Tpo -c -o libsoup_2_4_la-soup-multipart-input-stream.lo `test -f 'soup-multipart-input-stream.c' || echo '$(srcdir)/'`soup-multipart-input-stream.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-multipart-input-stream.Tpo $(DEPDIR)/libsoup_2_4_la-soup-multipart-input-stream.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-multipart-input-stream.c' object='libsoup_2_4_la-soup-multipart-input-stream.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-multipart-input-stream.lo `test -f 'soup-multipart-input-stream.c' || echo '$(srcdir)/'`soup-multipart-input-stream.c + +libsoup_2_4_la-soup-password-manager.lo: soup-password-manager.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-password-manager.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-password-manager.Tpo -c -o libsoup_2_4_la-soup-password-manager.lo `test -f 'soup-password-manager.c' || echo '$(srcdir)/'`soup-password-manager.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-password-manager.Tpo $(DEPDIR)/libsoup_2_4_la-soup-password-manager.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-password-manager.c' object='libsoup_2_4_la-soup-password-manager.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-password-manager.lo `test -f 'soup-password-manager.c' || echo '$(srcdir)/'`soup-password-manager.c + +libsoup_2_4_la-soup-path-map.lo: soup-path-map.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-path-map.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-path-map.Tpo -c -o libsoup_2_4_la-soup-path-map.lo `test -f 'soup-path-map.c' || echo '$(srcdir)/'`soup-path-map.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-path-map.Tpo $(DEPDIR)/libsoup_2_4_la-soup-path-map.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-path-map.c' object='libsoup_2_4_la-soup-path-map.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-path-map.lo `test -f 'soup-path-map.c' || echo '$(srcdir)/'`soup-path-map.c + +libsoup_2_4_la-soup-proxy-resolver.lo: soup-proxy-resolver.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-proxy-resolver.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-proxy-resolver.Tpo -c -o libsoup_2_4_la-soup-proxy-resolver.lo `test -f 'soup-proxy-resolver.c' || echo '$(srcdir)/'`soup-proxy-resolver.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-proxy-resolver.Tpo $(DEPDIR)/libsoup_2_4_la-soup-proxy-resolver.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-proxy-resolver.c' object='libsoup_2_4_la-soup-proxy-resolver.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-proxy-resolver.lo `test -f 'soup-proxy-resolver.c' || echo '$(srcdir)/'`soup-proxy-resolver.c + +libsoup_2_4_la-soup-proxy-resolver-default.lo: soup-proxy-resolver-default.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-proxy-resolver-default.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-proxy-resolver-default.Tpo -c -o libsoup_2_4_la-soup-proxy-resolver-default.lo `test -f 'soup-proxy-resolver-default.c' || echo '$(srcdir)/'`soup-proxy-resolver-default.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-proxy-resolver-default.Tpo $(DEPDIR)/libsoup_2_4_la-soup-proxy-resolver-default.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-proxy-resolver-default.c' object='libsoup_2_4_la-soup-proxy-resolver-default.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-proxy-resolver-default.lo `test -f 'soup-proxy-resolver-default.c' || echo '$(srcdir)/'`soup-proxy-resolver-default.c + +libsoup_2_4_la-soup-proxy-resolver-wrapper.lo: soup-proxy-resolver-wrapper.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-proxy-resolver-wrapper.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-proxy-resolver-wrapper.Tpo -c -o libsoup_2_4_la-soup-proxy-resolver-wrapper.lo `test -f 'soup-proxy-resolver-wrapper.c' || echo '$(srcdir)/'`soup-proxy-resolver-wrapper.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-proxy-resolver-wrapper.Tpo $(DEPDIR)/libsoup_2_4_la-soup-proxy-resolver-wrapper.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-proxy-resolver-wrapper.c' object='libsoup_2_4_la-soup-proxy-resolver-wrapper.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-proxy-resolver-wrapper.lo `test -f 'soup-proxy-resolver-wrapper.c' || echo '$(srcdir)/'`soup-proxy-resolver-wrapper.c + +libsoup_2_4_la-soup-proxy-uri-resolver.lo: soup-proxy-uri-resolver.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-proxy-uri-resolver.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-proxy-uri-resolver.Tpo -c -o libsoup_2_4_la-soup-proxy-uri-resolver.lo `test -f 'soup-proxy-uri-resolver.c' || echo '$(srcdir)/'`soup-proxy-uri-resolver.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-proxy-uri-resolver.Tpo $(DEPDIR)/libsoup_2_4_la-soup-proxy-uri-resolver.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-proxy-uri-resolver.c' object='libsoup_2_4_la-soup-proxy-uri-resolver.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-proxy-uri-resolver.lo `test -f 'soup-proxy-uri-resolver.c' || echo '$(srcdir)/'`soup-proxy-uri-resolver.c + +libsoup_2_4_la-soup-request.lo: soup-request.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-request.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-request.Tpo -c -o libsoup_2_4_la-soup-request.lo `test -f 'soup-request.c' || echo '$(srcdir)/'`soup-request.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-request.Tpo $(DEPDIR)/libsoup_2_4_la-soup-request.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-request.c' object='libsoup_2_4_la-soup-request.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-request.lo `test -f 'soup-request.c' || echo '$(srcdir)/'`soup-request.c + +libsoup_2_4_la-soup-request-data.lo: soup-request-data.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-request-data.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-request-data.Tpo -c -o libsoup_2_4_la-soup-request-data.lo `test -f 'soup-request-data.c' || echo '$(srcdir)/'`soup-request-data.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-request-data.Tpo $(DEPDIR)/libsoup_2_4_la-soup-request-data.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-request-data.c' object='libsoup_2_4_la-soup-request-data.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-request-data.lo `test -f 'soup-request-data.c' || echo '$(srcdir)/'`soup-request-data.c + +libsoup_2_4_la-soup-request-file.lo: soup-request-file.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-request-file.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-request-file.Tpo -c -o libsoup_2_4_la-soup-request-file.lo `test -f 'soup-request-file.c' || echo '$(srcdir)/'`soup-request-file.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-request-file.Tpo $(DEPDIR)/libsoup_2_4_la-soup-request-file.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-request-file.c' object='libsoup_2_4_la-soup-request-file.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-request-file.lo `test -f 'soup-request-file.c' || echo '$(srcdir)/'`soup-request-file.c + +libsoup_2_4_la-soup-request-http.lo: soup-request-http.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-request-http.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-request-http.Tpo -c -o libsoup_2_4_la-soup-request-http.lo `test -f 'soup-request-http.c' || echo '$(srcdir)/'`soup-request-http.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-request-http.Tpo $(DEPDIR)/libsoup_2_4_la-soup-request-http.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-request-http.c' object='libsoup_2_4_la-soup-request-http.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-request-http.lo `test -f 'soup-request-http.c' || echo '$(srcdir)/'`soup-request-http.c + +libsoup_2_4_la-soup-requester.lo: soup-requester.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-requester.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-requester.Tpo -c -o libsoup_2_4_la-soup-requester.lo `test -f 'soup-requester.c' || echo '$(srcdir)/'`soup-requester.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-requester.Tpo $(DEPDIR)/libsoup_2_4_la-soup-requester.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-requester.c' object='libsoup_2_4_la-soup-requester.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-requester.lo `test -f 'soup-requester.c' || echo '$(srcdir)/'`soup-requester.c + +libsoup_2_4_la-soup-server.lo: soup-server.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-server.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-server.Tpo -c -o libsoup_2_4_la-soup-server.lo `test -f 'soup-server.c' || echo '$(srcdir)/'`soup-server.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-server.Tpo $(DEPDIR)/libsoup_2_4_la-soup-server.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-server.c' object='libsoup_2_4_la-soup-server.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-server.lo `test -f 'soup-server.c' || echo '$(srcdir)/'`soup-server.c + +libsoup_2_4_la-soup-session.lo: soup-session.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-session.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-session.Tpo -c -o libsoup_2_4_la-soup-session.lo `test -f 'soup-session.c' || echo '$(srcdir)/'`soup-session.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-session.Tpo $(DEPDIR)/libsoup_2_4_la-soup-session.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-session.c' object='libsoup_2_4_la-soup-session.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-session.lo `test -f 'soup-session.c' || echo '$(srcdir)/'`soup-session.c + +libsoup_2_4_la-soup-session-async.lo: soup-session-async.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-session-async.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-session-async.Tpo -c -o libsoup_2_4_la-soup-session-async.lo `test -f 'soup-session-async.c' || echo '$(srcdir)/'`soup-session-async.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-session-async.Tpo $(DEPDIR)/libsoup_2_4_la-soup-session-async.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-session-async.c' object='libsoup_2_4_la-soup-session-async.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-session-async.lo `test -f 'soup-session-async.c' || echo '$(srcdir)/'`soup-session-async.c + +libsoup_2_4_la-soup-session-feature.lo: soup-session-feature.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-session-feature.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-session-feature.Tpo -c -o libsoup_2_4_la-soup-session-feature.lo `test -f 'soup-session-feature.c' || echo '$(srcdir)/'`soup-session-feature.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-session-feature.Tpo $(DEPDIR)/libsoup_2_4_la-soup-session-feature.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-session-feature.c' object='libsoup_2_4_la-soup-session-feature.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-session-feature.lo `test -f 'soup-session-feature.c' || echo '$(srcdir)/'`soup-session-feature.c + +libsoup_2_4_la-soup-session-sync.lo: soup-session-sync.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-session-sync.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-session-sync.Tpo -c -o libsoup_2_4_la-soup-session-sync.lo `test -f 'soup-session-sync.c' || echo '$(srcdir)/'`soup-session-sync.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-session-sync.Tpo $(DEPDIR)/libsoup_2_4_la-soup-session-sync.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-session-sync.c' object='libsoup_2_4_la-soup-session-sync.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-session-sync.lo `test -f 'soup-session-sync.c' || echo '$(srcdir)/'`soup-session-sync.c + +libsoup_2_4_la-soup-socket.lo: soup-socket.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-socket.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-socket.Tpo -c -o libsoup_2_4_la-soup-socket.lo `test -f 'soup-socket.c' || echo '$(srcdir)/'`soup-socket.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-socket.Tpo $(DEPDIR)/libsoup_2_4_la-soup-socket.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-socket.c' object='libsoup_2_4_la-soup-socket.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-socket.lo `test -f 'soup-socket.c' || echo '$(srcdir)/'`soup-socket.c + +libsoup_2_4_la-soup-socket-properties.lo: soup-socket-properties.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-socket-properties.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-socket-properties.Tpo -c -o libsoup_2_4_la-soup-socket-properties.lo `test -f 'soup-socket-properties.c' || echo '$(srcdir)/'`soup-socket-properties.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-socket-properties.Tpo $(DEPDIR)/libsoup_2_4_la-soup-socket-properties.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-socket-properties.c' object='libsoup_2_4_la-soup-socket-properties.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-socket-properties.lo `test -f 'soup-socket-properties.c' || echo '$(srcdir)/'`soup-socket-properties.c + +libsoup_2_4_la-soup-status.lo: soup-status.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-status.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-status.Tpo -c -o libsoup_2_4_la-soup-status.lo `test -f 'soup-status.c' || echo '$(srcdir)/'`soup-status.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-status.Tpo $(DEPDIR)/libsoup_2_4_la-soup-status.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-status.c' object='libsoup_2_4_la-soup-status.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-status.lo `test -f 'soup-status.c' || echo '$(srcdir)/'`soup-status.c + +libsoup_2_4_la-soup-tld.lo: soup-tld.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-tld.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-tld.Tpo -c -o libsoup_2_4_la-soup-tld.lo `test -f 'soup-tld.c' || echo '$(srcdir)/'`soup-tld.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-tld.Tpo $(DEPDIR)/libsoup_2_4_la-soup-tld.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-tld.c' object='libsoup_2_4_la-soup-tld.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-tld.lo `test -f 'soup-tld.c' || echo '$(srcdir)/'`soup-tld.c + +libsoup_2_4_la-soup-uri.lo: soup-uri.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-uri.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-uri.Tpo -c -o libsoup_2_4_la-soup-uri.lo `test -f 'soup-uri.c' || echo '$(srcdir)/'`soup-uri.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-uri.Tpo $(DEPDIR)/libsoup_2_4_la-soup-uri.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-uri.c' object='libsoup_2_4_la-soup-uri.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-uri.lo `test -f 'soup-uri.c' || echo '$(srcdir)/'`soup-uri.c + +libsoup_2_4_la-soup-value-utils.lo: soup-value-utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-value-utils.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-value-utils.Tpo -c -o libsoup_2_4_la-soup-value-utils.lo `test -f 'soup-value-utils.c' || echo '$(srcdir)/'`soup-value-utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-value-utils.Tpo $(DEPDIR)/libsoup_2_4_la-soup-value-utils.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-value-utils.c' object='libsoup_2_4_la-soup-value-utils.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-value-utils.lo `test -f 'soup-value-utils.c' || echo '$(srcdir)/'`soup-value-utils.c + +libsoup_2_4_la-soup-version.lo: soup-version.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-version.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-version.Tpo -c -o libsoup_2_4_la-soup-version.lo `test -f 'soup-version.c' || echo '$(srcdir)/'`soup-version.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-version.Tpo $(DEPDIR)/libsoup_2_4_la-soup-version.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-version.c' object='libsoup_2_4_la-soup-version.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-version.lo `test -f 'soup-version.c' || echo '$(srcdir)/'`soup-version.c + +libsoup_2_4_la-soup-websocket.lo: soup-websocket.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-websocket.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-websocket.Tpo -c -o libsoup_2_4_la-soup-websocket.lo `test -f 'soup-websocket.c' || echo '$(srcdir)/'`soup-websocket.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-websocket.Tpo $(DEPDIR)/libsoup_2_4_la-soup-websocket.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-websocket.c' object='libsoup_2_4_la-soup-websocket.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-websocket.lo `test -f 'soup-websocket.c' || echo '$(srcdir)/'`soup-websocket.c + +libsoup_2_4_la-soup-websocket-connection.lo: soup-websocket-connection.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-websocket-connection.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-websocket-connection.Tpo -c -o libsoup_2_4_la-soup-websocket-connection.lo `test -f 'soup-websocket-connection.c' || echo '$(srcdir)/'`soup-websocket-connection.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-websocket-connection.Tpo $(DEPDIR)/libsoup_2_4_la-soup-websocket-connection.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-websocket-connection.c' object='libsoup_2_4_la-soup-websocket-connection.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-websocket-connection.lo `test -f 'soup-websocket-connection.c' || echo '$(srcdir)/'`soup-websocket-connection.c + +libsoup_2_4_la-soup-xmlrpc.lo: soup-xmlrpc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-xmlrpc.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-xmlrpc.Tpo -c -o libsoup_2_4_la-soup-xmlrpc.lo `test -f 'soup-xmlrpc.c' || echo '$(srcdir)/'`soup-xmlrpc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-xmlrpc.Tpo $(DEPDIR)/libsoup_2_4_la-soup-xmlrpc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-xmlrpc.c' object='libsoup_2_4_la-soup-xmlrpc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-xmlrpc.lo `test -f 'soup-xmlrpc.c' || echo '$(srcdir)/'`soup-xmlrpc.c + +libsoup_2_4_la-soup-xmlrpc-old.lo: soup-xmlrpc-old.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_2_4_la-soup-xmlrpc-old.lo -MD -MP -MF $(DEPDIR)/libsoup_2_4_la-soup-xmlrpc-old.Tpo -c -o libsoup_2_4_la-soup-xmlrpc-old.lo `test -f 'soup-xmlrpc-old.c' || echo '$(srcdir)/'`soup-xmlrpc-old.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_2_4_la-soup-xmlrpc-old.Tpo $(DEPDIR)/libsoup_2_4_la-soup-xmlrpc-old.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-xmlrpc-old.c' object='libsoup_2_4_la-soup-xmlrpc-old.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_2_4_la-soup-xmlrpc-old.lo `test -f 'soup-xmlrpc-old.c' || echo '$(srcdir)/'`soup-xmlrpc-old.c + +libsoup_gnome_2_4_la-soup-cookie-jar-sqlite.lo: soup-cookie-jar-sqlite.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_gnome_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_gnome_2_4_la-soup-cookie-jar-sqlite.lo -MD -MP -MF $(DEPDIR)/libsoup_gnome_2_4_la-soup-cookie-jar-sqlite.Tpo -c -o libsoup_gnome_2_4_la-soup-cookie-jar-sqlite.lo `test -f 'soup-cookie-jar-sqlite.c' || echo '$(srcdir)/'`soup-cookie-jar-sqlite.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_gnome_2_4_la-soup-cookie-jar-sqlite.Tpo $(DEPDIR)/libsoup_gnome_2_4_la-soup-cookie-jar-sqlite.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-cookie-jar-sqlite.c' object='libsoup_gnome_2_4_la-soup-cookie-jar-sqlite.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_gnome_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_gnome_2_4_la-soup-cookie-jar-sqlite.lo `test -f 'soup-cookie-jar-sqlite.c' || echo '$(srcdir)/'`soup-cookie-jar-sqlite.c + +libsoup_gnome_2_4_la-soup-gnome-features.lo: soup-gnome-features.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_gnome_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_gnome_2_4_la-soup-gnome-features.lo -MD -MP -MF $(DEPDIR)/libsoup_gnome_2_4_la-soup-gnome-features.Tpo -c -o libsoup_gnome_2_4_la-soup-gnome-features.lo `test -f 'soup-gnome-features.c' || echo '$(srcdir)/'`soup-gnome-features.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_gnome_2_4_la-soup-gnome-features.Tpo $(DEPDIR)/libsoup_gnome_2_4_la-soup-gnome-features.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-gnome-features.c' object='libsoup_gnome_2_4_la-soup-gnome-features.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_gnome_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_gnome_2_4_la-soup-gnome-features.lo `test -f 'soup-gnome-features.c' || echo '$(srcdir)/'`soup-gnome-features.c + +libsoup_gnome_2_4_la-soup-proxy-resolver-gnome.lo: soup-proxy-resolver-gnome.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_gnome_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_gnome_2_4_la-soup-proxy-resolver-gnome.lo -MD -MP -MF $(DEPDIR)/libsoup_gnome_2_4_la-soup-proxy-resolver-gnome.Tpo -c -o libsoup_gnome_2_4_la-soup-proxy-resolver-gnome.lo `test -f 'soup-proxy-resolver-gnome.c' || echo '$(srcdir)/'`soup-proxy-resolver-gnome.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_gnome_2_4_la-soup-proxy-resolver-gnome.Tpo $(DEPDIR)/libsoup_gnome_2_4_la-soup-proxy-resolver-gnome.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-proxy-resolver-gnome.c' object='libsoup_gnome_2_4_la-soup-proxy-resolver-gnome.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_gnome_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_gnome_2_4_la-soup-proxy-resolver-gnome.lo `test -f 'soup-proxy-resolver-gnome.c' || echo '$(srcdir)/'`soup-proxy-resolver-gnome.c + +libsoup_gnome_2_4_la-soup-password-manager-gnome.lo: soup-password-manager-gnome.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_gnome_2_4_la_CFLAGS) $(CFLAGS) -MT libsoup_gnome_2_4_la-soup-password-manager-gnome.lo -MD -MP -MF $(DEPDIR)/libsoup_gnome_2_4_la-soup-password-manager-gnome.Tpo -c -o libsoup_gnome_2_4_la-soup-password-manager-gnome.lo `test -f 'soup-password-manager-gnome.c' || echo '$(srcdir)/'`soup-password-manager-gnome.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsoup_gnome_2_4_la-soup-password-manager-gnome.Tpo $(DEPDIR)/libsoup_gnome_2_4_la-soup-password-manager-gnome.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='soup-password-manager-gnome.c' object='libsoup_gnome_2_4_la-soup-password-manager-gnome.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsoup_gnome_2_4_la_CFLAGS) $(CFLAGS) -c -o libsoup_gnome_2_4_la-soup-password-manager-gnome.lo `test -f 'soup-password-manager-gnome.c' || echo '$(srcdir)/'`soup-password-manager-gnome.c + mostlyclean-libtool: -rm -f *.lo @@ -916,6 +1734,27 @@ uninstall-typelibDATA: @list='$(typelib_DATA)'; test -n "$(typelibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(typelibdir)'; $(am__uninstall_files_from_dir) +install-vapiDATA: $(vapi_DATA) + @$(NORMAL_INSTALL) + @list='$(vapi_DATA)'; test -n "$(vapidir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(vapidir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(vapidir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(vapidir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(vapidir)" || exit $$?; \ + done + +uninstall-vapiDATA: + @$(NORMAL_UNINSTALL) + @list='$(vapi_DATA)'; test -n "$(vapidir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(vapidir)'; $(am__uninstall_files_from_dir) install-libsoupgnomeincludeHEADERS: $(libsoupgnomeinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(libsoupgnomeinclude_HEADERS)'; test -n "$(libsoupgnomeincludedir)" || list=; \ @@ -1062,12 +1901,15 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(typelibdir)" "$(DESTDIR)$(libsoupgnomeincludedir)" "$(DESTDIR)$(libsoupincludedir)" "$(DESTDIR)$(libsoupincludedir)"; do \ + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(typelibdir)" "$(DESTDIR)$(vapidir)" "$(DESTDIR)$(libsoupgnomeincludedir)" "$(DESTDIR)$(libsoupincludedir)" "$(DESTDIR)$(libsoupincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -1128,7 +1970,8 @@ info-am: install-data-am: install-girDATA install-libsoupgnomeincludeHEADERS \ install-libsoupincludeHEADERS \ - install-nodist_libsoupincludeHEADERS install-typelibDATA + install-nodist_libsoupincludeHEADERS install-typelibDATA \ + install-vapiDATA install-dvi: install-dvi-am @@ -1177,30 +2020,34 @@ ps-am: uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \ uninstall-libsoupgnomeincludeHEADERS \ uninstall-libsoupincludeHEADERS \ - uninstall-nodist_libsoupincludeHEADERS uninstall-typelibDATA + uninstall-nodist_libsoupincludeHEADERS uninstall-typelibDATA \ + uninstall-vapiDATA .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ - ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-girDATA install-html install-html-am \ - install-info install-info-am install-libLTLIBRARIES \ - install-libsoupgnomeincludeHEADERS \ + ctags-am dist-hook distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-girDATA install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-libsoupgnomeincludeHEADERS \ install-libsoupincludeHEADERS install-man \ install-nodist_libsoupincludeHEADERS install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ - install-typelibDATA installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ - uninstall-girDATA uninstall-libLTLIBRARIES \ - uninstall-libsoupgnomeincludeHEADERS \ + install-typelibDATA install-vapiDATA installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-girDATA \ + uninstall-libLTLIBRARIES uninstall-libsoupgnomeincludeHEADERS \ uninstall-libsoupincludeHEADERS \ - uninstall-nodist_libsoupincludeHEADERS uninstall-typelibDATA + uninstall-nodist_libsoupincludeHEADERS uninstall-typelibDATA \ + uninstall-vapiDATA + +.PRECIOUS: Makefile include $(GLIB_MAKEFILE) @@ -1214,8 +2061,178 @@ tld_data.inc: tld-parser.py $(TLD_DATA_FILE) include $(INTROSPECTION_MAKEFILE) @HAVE_INTROSPECTION_TRUE@Soup-2.4.gir: libsoup-2.4.la + +@ENABLE_VAPIGEN_TRUE@@HAVE_INTROSPECTION_TRUE@libsoup-2.4.vapi: Soup-2.4.gir Soup-2.4.metadata Soup-2.4-custom.vala +@ENABLE_VAPIGEN_TRUE@@HAVE_INTROSPECTION_TRUE@ $(VAPIGEN) --metadatadir=$(top_srcdir)/libsoup --pkg gio-2.0 --library=libsoup-2.4 $^ @BUILD_LIBSOUP_GNOME_TRUE@@HAVE_INTROSPECTION_TRUE@SoupGNOME-2.4.gir: libsoup-gnome-2.4.la Soup-2.4.gir +# +# Creates Visual Studio 2008/2010 projects from items passed in from autotools files +# $(1) - Base Name of the MSVC project files (outputs) +# + +define msvcproj-builder + +$(top_builddir)/win32/vs10/$(1).vcxproj: $(top_builddir)/win32/vs9/$(1).vcproj +$(top_builddir)/win32/vs10/$(1).vcxproj.filters: $(top_builddir)/win32/vs9/$(1).vcproj +$(1).sourcefiles: $(top_builddir)/win32/vs9/$(1).vcproj +$(1).vs10.sourcefiles: $(top_builddir)/win32/vs9/$(1).vcproj +$(1).vs10.sourcefiles.filters: $(top_builddir)/win32/vs9/$(1).vcproj + +$(top_builddir)/win32/vs9/$(1).vcproj: Makefile + -$(RM) $(top_builddir)/win32/vs9/$(1).vcproj + -$(RM) $(top_builddir)/win32/vs10/$(1).vcxproj + -$(RM) $(top_builddir)/win32/vs10/$(1).vcxproj.filters + -$(RM) $(top_builddir)/win32/vs11/$(1).vcxproj + -$(RM) $(top_builddir)/win32/vs11/$(1).vcxproj.filters + -$(RM) $(top_builddir)/win32/vs12/$(1).vcxproj + -$(RM) $(top_builddir)/win32/vs12/$(1).vcxproj.filters + -$(RM) $(top_builddir)/win32/vs14/$(1).vcxproj + -$(RM) $(top_builddir)/win32/vs14/$(1).vcxproj.filters + + for F in $(_proj_files); do \ + case $$$$F in \ + $(_proj_filters)) \ + ;; \ + *.c|*.cpp|*.cc|*.cxx) \ + echo ' ' >>$(1).sourcefiles && \ + echo ' ' >>$(1).vs10.sourcefiles && \ + echo ' Source Files' >>$(1).vs10.sourcefiles.filters \ + ;; \ + esac; \ + done + + $(CPP) -P - <$(top_srcdir)/win32/vs9/$(1).vcprojin >$(top_builddir)/win32/vs9/$(1).vcproj + $(CPP) -P - <$(top_srcdir)/win32/vs10/$(1).vcxprojin >$(top_builddir)/win32/vs10/$(1).vcxproj + $(CPP) -P - <$(top_srcdir)/win32/vs10/$(1).vcxproj.filtersin >$(top_builddir)/win32/vs10/$(1).vcxproj.filters + $(RM) $(1).sourcefiles + $(RM) $(1).vs10.sourcefiles + $(RM) $(1).vs10.sourcefiles.filters + +$(top_builddir)/win32/vs10/$(1).vs10.headers: $(top_builddir)/win32/vs9/$(1).headers + +$(top_builddir)/win32/vs9/$(1).headers: Makefile + -$(RM) $(top_builddir)/win32/vs9/$(1).headers + -$(RM) $(top_builddir)/win32/vs10/$(1).vs10.headers + + for F in $(_proj_headers); do \ + case $$$$F in \ + $(_proj_headers_excludes)) \ + ;; \ + *.h|*.hpp|*.hh|*.hxx) \ + echo 'copy ..\..'$(_proj_subdir)$$$$F' $$$$(CopyDir)\include'$(_headers_destdir)'\'$$$$F' ' >>$(top_builddir)/win32/vs9/$(1).headers && \ + echo 'copy ..\..'$(_proj_subdir)$$$$F' $$$$(CopyDir)\include'$(_headers_destdir)'\'$$$$F >>$(top_builddir)/win32/vs10/$(1).vs10.headers \ + ;; \ + esac; \ + done + +$(top_builddir)/win32/vs12/$(1).vcxproj.filters: $(top_builddir)/win32/vs12/$(1).vcxproj + +$(top_builddir)/win32/vs12/$(1).vcxproj: Makefile + -$(RM) $(top_builddir)/win32/vs14/$(1).vcxproj + -$(RM) $(top_builddir)/win32/vs14/$(1).vcxproj.filters + + for F in $(_proj_files); do \ + case $$$$F in \ + $(_proj_filters)) \ + ;; \ + *.c|*.cpp|*.cc|*.cxx) \ + echo ' ' >>$(1).vs12.sourcefiles && \ + echo ' Source Files' >>$(1).vs12.sourcefiles.filters \ + ;; \ + esac; \ + done + + $(CPP) -P - <$(top_srcdir)/win32/vs12/$(1).vcxprojin >$(top_builddir)/win32/vs12/$(1).vcxproj + $(CPP) -P - <$(top_srcdir)/win32/vs12/$(1).vcxproj.filtersin >$(top_builddir)/win32/vs12/$(1).vcxproj.filters + $(RM) $(1).vs12.sourcefiles + $(RM) $(1).vs12.sourcefiles.filters + +$(top_builddir)/win32/vs12/$(1).vs12.headers: Makefile + -$(RM) $(top_builddir)/win32/vs12/$(1).vs12.headers + + for F in $(_proj_headers); do \ + case $$$$F in \ + $(_proj_headers_excludes)) \ + ;; \ + *.h|*.hpp|*.hh|*.hxx) \ + echo 'copy ..\..'$(_proj_subdir)$$$$F' $$$$(CopyDir)\include'$(_headers_destdir)'\'$$$$F >>$(top_builddir)/win32/vs12/$(1).vs12.headers \ + ;; \ + esac; \ + done + +endef + +$(foreach proj,$(MSVCPROJS),$(eval $(call msvcproj-builder,$(proj)))) + +# +# Create NMake Makefile Sections for Building Introspection files +# from autotools files +# $(1) - File Name of the .gir that is to be generated +# + +@HAVE_INTROSPECTION_TRUE@define gir-nmake-builder + +# Basic sanity check, to make sure required variables are set +@HAVE_INTROSPECTION_TRUE@$(if $($(_gir_name)_MSVC_FILES),,$(error Need to define $(_gir_name)_MSVC_FILES)) +@HAVE_INTROSPECTION_TRUE@$(if $(or $(findstring --header-only,$($(_gir_name)_MSVC_SCANNERFLAGS)), +@HAVE_INTROSPECTION_TRUE@ $($(_gir_name)_MSVC_LIBS), +@HAVE_INTROSPECTION_TRUE@ $($(_gir_name)_MSVC_PROGRAM)),, +@HAVE_INTROSPECTION_TRUE@ $(error Need to define $(_gir_name)_MSVC_LIBS or $(_gir_name)_MSVC_PROGRAM)) + +@HAVE_INTROSPECTION_TRUE@$(top_builddir)/win32/$(_gir_name)_list: +@HAVE_INTROSPECTION_TRUE@ for F in $(_gir_files_msvc); do \ +@HAVE_INTROSPECTION_TRUE@ case $$$$F in \ +@HAVE_INTROSPECTION_TRUE@ *.c|*.cpp|*.cc|*.cxx|*.h|*.hpp|*.hh|*.hxx) \ +@HAVE_INTROSPECTION_TRUE@ echo '..'$(_gir_source_subdir_msvc)$$$$F >>$(top_builddir)/win32/$(_gir_name)_list \ +@HAVE_INTROSPECTION_TRUE@ ;; \ +@HAVE_INTROSPECTION_TRUE@ esac; \ +@HAVE_INTROSPECTION_TRUE@ done + +@HAVE_INTROSPECTION_TRUE@$(top_builddir)/win32/$(1).msvc.introspect: +@HAVE_INTROSPECTION_TRUE@ -$(RM) $(top_builddir)/win32/$(1).msvc.introspect + +# Assemble the Command to Run g-ir-scanner +@HAVE_INTROSPECTION_TRUE@ echo $(1)': '$(_gir_name)'_list '$($(_gir_name)_MSVC_GIR_DEPS)>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' @-echo Generating $$$$@...'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' $$$$(PYTHON) $$$$(G_IR_SCANNER) \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' --verbose -no-libtool \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' --namespace='$(_gir_namespace_msvc)' \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' --nsversion='$(_gir_version_msvc)' \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' '$(_gir_packages_msvc)' \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' '$(_gir_libraries_msvc)' \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' '$(_gir_program_msvc)' \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' --add-include-path=$$$$(G_IR_INCLUDEDIR) \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' '$(_gir_includes_msvc)' \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' '$(_gir_export_packages_msvc)' \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' '$(_gir_c_includes_msvc)' \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' --cflags-begin \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' '$($(_gir_name)_MSVC_CFLAGS)' \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' --cflags-end \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' '$($(_gir_name)_MSVC_SCANNERFLAGS)' \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' --filelist='$(_gir_name)'_list \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' -o $$$$@'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo '' >>$(top_builddir)/win32/$(1).msvc.introspect + +# Finally Assemble the Command to Compile the generated .gir +@HAVE_INTROSPECTION_TRUE@ echo '$(_typelib_basename_msvc).typelib: '$(_typelib_basename_msvc)'.gir'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' @-echo Compiling $$$$@...'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' $$$$(G_IR_COMPILER) \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' --includedir=. --debug --verbose \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' '$(1)' \'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo ' -o $$$$@'>>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@ echo '' >>$(top_builddir)/win32/$(1).msvc.introspect +@HAVE_INTROSPECTION_TRUE@endef + +@HAVE_INTROSPECTION_TRUE@$(foreach gir,$(MSVC_INTROSPECT_GIRS),$(eval $(call gir-nmake-builder,$(gir)))) + +dist-hook: \ + $(top_builddir)/win32/vs9/soup.vcproj \ + $(top_builddir)/win32/vs9/soup.headers \ + $(top_builddir)/win32/vs9/soup-gnome.vcproj \ + $(top_builddir)/win32/vs9/soup-gnome.headers \ + $(INTROSPECTION_INTERMEDIATE_ITEMS) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/libsoup/Soup-2.4-custom.vala b/libsoup/Soup-2.4-custom.vala new file mode 100644 index 00000000..95c2ad93 --- /dev/null +++ b/libsoup/Soup-2.4-custom.vala @@ -0,0 +1,168 @@ +namespace Soup { + [CCode (type_id = "soup_auth_domain_basic_get_type ()", cheader_filename = "libsoup/soup.h")] + public class AuthDomainBasic : Soup.AuthDomain { + public static void set_auth_callback (Soup.AuthDomain domain, owned Soup.AuthDomainBasicAuthCallback callback); + } + + [CCode (type_id = "soup_auth_domain_digest_get_type ()", cheader_filename = "libsoup/soup.h")] + public class AuthDomainDigest : Soup.AuthDomain { + public static void set_auth_callback (Soup.AuthDomain domain, owned Soup.AuthDomainDigestAuthCallback callback); + } + + [Compact] + [CCode (copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "soup_buffer_get_type ()", cheader_filename = "libsoup/soup.h")] + public class Buffer { + [CCode (has_construct_function = false)] + public Buffer.subbuffer (Soup.Buffer parent, size_t offset, size_t length); + } + + [Version (replacement = "Soup.ProxyURIResolver")] + [CCode (cheader_filename = "libsoup/soup.h", type_cname = "SoupProxyResolverInterface", type_id = "soup_proxy_resolver_get_type ()")] + public interface ProxyResolver : Soup.SessionFeature, GLib.Object { + public abstract void get_proxy_async (Soup.Message msg, GLib.MainContext async_context, GLib.Cancellable? cancellable, Soup.ProxyResolverCallback callback); + public abstract uint get_proxy_sync (Soup.Message msg, GLib.Cancellable? cancellable, out unowned Soup.Address addr); + } + + public errordomain SSLError { + HANDSHAKE_NEEDS_READ, + HANDSHAKE_NEEDS_WRITE, + CERTIFICATE, + HANDSHAKE_FAILED; + public static GLib.Quark quark (); + } + + [Compact] + [CCode (copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "soup_uri_get_type ()", cheader_filename = "libsoup/soup.h")] + public class URI { + [CCode (has_construct_function = false)] + public URI.with_base (Soup.URI @base, string uri_string); + } + + [Version (deprecated_since = "vala-0.12", replacement = "XMLRPC.build_fault")] + [PrintfFormat] + public static unowned string xmlrpc_build_fault (int fault_code, string fault_format, ...); + [Version (deprecated_since = "vala-0.12", replacement = "XMLRPC.build_method_call")] + public static unowned string xmlrpc_build_method_call (string method_name, GLib.Value[] @params); + [Version (deprecated_since = "vala-0.12", replacement = "XMLRPC.build_method_response")] + public static unowned string xmlrpc_build_method_response (GLib.Value value); + [Version (deprecated_since = "vala-0.12", replacement = "XMLRPC.error_quark")] + public static GLib.Quark xmlrpc_error_quark (); + [Version (deprecated_since = "vala-0.12", replacement = "XMLRPC.extract_method_call")] + [CCode (sentinel = "G_TYPE_INVALID")] + public static bool xmlrpc_extract_method_call (string method_call, int length, out unowned string method_name, ...); + [Version (deprecated_since = "vala-0.12", replacement = "XMLRPC.extract_method_response")] + [CCode (sentinel = "G_TYPE_INVALID")] + public static bool xmlrpc_extract_method_response (string method_response, int length, ...) throws GLib.Error; + [Version (deprecated_since = "vala-0.12", replacement = "XMLRPC.fault_quark")] + public static GLib.Quark xmlrpc_fault_quark (); + [Version (deprecated_since = "vala-0.12", replacement = "XMLRPC.parse_method_call")] + public static bool xmlrpc_parse_method_call (string method_call, int length, out unowned string method_name, out unowned GLib.ValueArray @params); + [Version (deprecated_since = "vala-0.12", replacement = "XMLRPC.parse_method_response")] + public static bool xmlrpc_parse_method_response (string method_response, int length, GLib.Value value) throws GLib.Error; + [Version (deprecated_since = "vala-0.12", replacement = "XMLRPC.request_new")] + [CCode (sentinel = "G_TYPE_INVALID")] + public static unowned Soup.Message xmlrpc_request_new (string uri, string method_name, ...); + [Version (deprecated_since = "vala-0.12", replacement = "XMLRPC.set_fault")] + [PrintfFormat] + public static void xmlrpc_set_fault (Soup.Message msg, int fault_code, string fault_format, ...); + [Version (deprecated_since = "vala-0.12", replacement = "XMLRPC.set_response")] + [CCode (sentinel = "G_TYPE_INVALID")] + public static void xmlrpc_set_response (Soup.Message msg, ...); + + [Version (deprecated_since = "vala-0.12", replacement = "Form.decode")] + public static GLib.HashTable form_decode (string encoded_form); + [Version (deprecated_since = "vala-0.12", replacement = "Form.decode_multipart")] + public static GLib.HashTable form_decode_multipart (Soup.Message msg, string file_control_name, out string filename, out string content_type, out Soup.Buffer file); + [Version (deprecated_since = "vala-0.12", replacement = "Form.encode")] + public static string form_encode (...); + [Version (deprecated_since = "vala-0.12", replacement = "Form.encode_datalist")] + public static string form_encode_datalist (void* form_data_set); + [Version (deprecated_since = "vala-0.12", replacement = "Form.encode_hash")] + public static string form_encode_hash (GLib.HashTable form_data_set); + [Version (deprecated_since = "vala-0.12")] + public static string form_encode_valist (string first_field, void* args); + [Version (deprecated_since = "vala-0.12", replacement = "Form.request_new")] + public static Soup.Message form_request_new (string method, string uri, ...); + [Version (deprecated_since = "vala-0.12", replacement = "Form.request_new_from_datalist")] + public static Soup.Message form_request_new_from_datalist (string method, string uri, void* form_data_set); + [Version (deprecated_since = "vala-0.12", replacement = "Form.request_new_from_hash")] + public static Soup.Message form_request_new_from_hash (string method, string uri, GLib.HashTable form_data_set); + [Version (deprecated_since = "vala-0.12", replacement = "Form.request_new_from_multipart")] + public static Soup.Message form_request_new_from_multipart (string uri, Soup.Multipart multipart); + [Version (deprecated_since = "vala-0.14", replacement = "SSLError.quark")] + public static GLib.Quark ssl_error_quark (); + + [Version (deprecated_since = "vala-0.22", replacement = "Status.get_phrase")] + public static unowned string status_get_phrase (uint status_code); + [Version (deprecated_since = "vala-0.22", replacement = "Status.proxify")] + public static uint status_proxify (uint status_code); + [Version (deprecated_since = "vala-0.22", replacement = "Status")] + [CCode (cheader_filename = "libsoup/soup.h", cprefix = "SOUP_STATUS_", type_id = "soup_known_status_code_get_type ()")] + public enum KnownStatusCode { + NONE, + CANCELLED, + CANT_RESOLVE, + CANT_RESOLVE_PROXY, + CANT_CONNECT, + CANT_CONNECT_PROXY, + SSL_FAILED, + IO_ERROR, + MALFORMED, + TRY_AGAIN, + TOO_MANY_REDIRECTS, + TLS_FAILED, + CONTINUE, + SWITCHING_PROTOCOLS, + PROCESSING, + OK, + CREATED, + ACCEPTED, + NON_AUTHORITATIVE, + NO_CONTENT, + RESET_CONTENT, + PARTIAL_CONTENT, + MULTI_STATUS, + MULTIPLE_CHOICES, + MOVED_PERMANENTLY, + FOUND, + MOVED_TEMPORARILY, + SEE_OTHER, + NOT_MODIFIED, + USE_PROXY, + NOT_APPEARING_IN_THIS_PROTOCOL, + TEMPORARY_REDIRECT, + BAD_REQUEST, + UNAUTHORIZED, + PAYMENT_REQUIRED, + FORBIDDEN, + NOT_FOUND, + METHOD_NOT_ALLOWED, + NOT_ACCEPTABLE, + PROXY_AUTHENTICATION_REQUIRED, + PROXY_UNAUTHORIZED, + REQUEST_TIMEOUT, + CONFLICT, + GONE, + LENGTH_REQUIRED, + PRECONDITION_FAILED, + REQUEST_ENTITY_TOO_LARGE, + REQUEST_URI_TOO_LONG, + UNSUPPORTED_MEDIA_TYPE, + REQUESTED_RANGE_NOT_SATISFIABLE, + INVALID_RANGE, + EXPECTATION_FAILED, + UNPROCESSABLE_ENTITY, + LOCKED, + FAILED_DEPENDENCY, + INTERNAL_SERVER_ERROR, + NOT_IMPLEMENTED, + BAD_GATEWAY, + SERVICE_UNAVAILABLE, + GATEWAY_TIMEOUT, + HTTP_VERSION_NOT_SUPPORTED, + INSUFFICIENT_STORAGE, + NOT_EXTENDED + } + + public delegate void ProxyResolverCallback (Soup.ProxyResolver p1, Soup.Message p2, uint p3, Soup.Address p4); +} diff --git a/libsoup/Soup-2.4.metadata b/libsoup/Soup-2.4.metadata new file mode 100644 index 00000000..43b6d04d --- /dev/null +++ b/libsoup/Soup-2.4.metadata @@ -0,0 +1,99 @@ +// Vala-specific +AuthDomain + .add_path#property skip + .remove_path#property skip +form_* parent="Soup.Form" name="form_(.+)" +form_encode_datalist.form_data_set type_arguments="string" +form_request_new_from_datalist.form_data_set type_arguments="string" +xmlrpc_* parent="Soup.XMLRPC" name="xmlrpc_(.+)" +XMLRPCFault errordomain parent="Soup.XMLRPC" name="Fault" +XMLRPCError parent="Soup.XMLRPC" name="Error" +xmlrpc_set_response.type skip +HTTPVersion.http_* name="http_(.+)" + +// Backwards compatibility +KnownStatusCode skip +Requester deprecated_since="2.42" replacement="Session" +Requester + .request* skip=false unowned=false + +// Report upstream +Soup cheader_filename="libsoup/soup.h" +add_* skip=false type="unowned GLib.TimeoutSource" +AuthDomain + .accepts#method skip + .challenge#virtual_method vfunc_name="challenge" + .basic_set_auth_callback skip + .digest_set_auth_callback skip +AuthDomainBasic.new skip=false +AuthDomainDigest.new skip=false +Buffer.new.data type="uint8[]" array_length_idx=2 +Buffer.new_with_owner.data type="uint8[]" array_length_idx=1 +Buffer.new_subbuffer skip +Buffer.new_with_owner.owner_dnotify nullable +CookieJar.all_cookies type_arguments="Cookie" +ContentSniffer.sniff.params type_arguments="string,string" nullable out unowned=false +form_* skip=false +header_parse_list type_arguments="string" +header_parse_quality_list type_arguments="string" + .unacceptable out type_arguments="string" +Message + .add_header_handler skip=false + .add_status_code_handler skip=false + .request_*#property skip + .response_*#property skip + .set_request.req_body type="uint8[]" array_length_idx=3 +MessageHeaders + .get_ranges.ranges out type="Soup.Range[]" array_length_idx=2 +Server + .new skip=false + .async_context type="GLib.MainContext" +Session + .async_context type="GLib.MainContext" + .get_features type_arguments="weak Soup.SessionFeature" + .send_async.cancellable#parameter default=null +Session*.new_with_options skip=false +Socket + .async_context type="GLib.MainContext" + .new skip=false + .read.buffer type="uint8[]" array_length_idx=1 + .read_until.buffer type="uint8[]" array_length_idx=1 + .read_until.nread out + .write.buffer type="uint8[]" array_length_idx=1 +URI + .new_with_base skip + .set_query_from_fields skip=false +uri_encode.escape_extra nullable +// uri_host_*.* type="Soup.URI" +ProxyURIResolverCallback.user_data skip +xmlrpc_* skip=false +// xmlrpc_build_method_call.params array array_length_idx=2 +xmlrpc_extract_method_response throws="Soup.XMLRPC.Fault" + .error skip + .type skip +value_* skip=false +ProxyURIResolver + .get_proxy_uri_async skip=false + .get_proxy_uri_async.callback owned scope="async" + .get_proxy_uri_async.async_context nullable + .get_proxy_uri_sync.proxy_uri out unowned=false + +// Not enough GIR information +Buffer.data type="uint8[]" array_length_field="length" +MessageBody.data type="uint8[]" array_length_field="length" +xmlrpc_parse_method_response throws="Soup.XMLRPC.Fault" +Date + .new_from_time_t.when type="time_t" + .to_time_t type="time_t" +xmlrpc_extract_method_call sentinel="G_TYPE_INVALID" +xmlrpc_extract_method_response sentinel="G_TYPE_INVALID" +xmlrpc_request_new sentinel="G_TYPE_INVALID" +xmlrpc_set_fault printf_format +xmlrpc_set_response sentinel="G_TYPE_INVALID" +xmlrpc_build_fault printf_format + +// Simplify memory management +Buffer + .new deprecated_since="2.32" replacement="Buffer.take" +MessageBody + .append deprecated_since="2.32" replacement="MessageBody.append_take" diff --git a/libsoup/gconstructor.h b/libsoup/gconstructor.h new file mode 100644 index 00000000..dccb0314 --- /dev/null +++ b/libsoup/gconstructor.h @@ -0,0 +1,120 @@ +/* + If G_HAS_CONSTRUCTORS is true then the compiler support *both* constructors and + destructors, in a sane way, including e.g. on library unload. If not you're on + your own. + + Some compilers need #pragma to handle this, which does not work with macros, + so the way you need to use this is (for constructors): + + #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA + #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(my_constructor) + #endif + G_DEFINE_CONSTRUCTOR(my_constructor) + static void my_constructor(void) { + ... + } + +*/ + +#ifndef __GTK_DOC_IGNORE__ + +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) + +#define G_HAS_CONSTRUCTORS 1 + +#define G_DEFINE_CONSTRUCTOR(_func) static void __attribute__((constructor)) _func (void); +#define G_DEFINE_DESTRUCTOR(_func) static void __attribute__((destructor)) _func (void); + +#elif defined (_MSC_VER) && (_MSC_VER >= 1500) +/* Visual studio 2008 and later has _Pragma */ + +#define G_HAS_CONSTRUCTORS 1 + +/* We do some weird things to avoid the constructors being optimized + * away on VS2015 if WholeProgramOptimization is enabled. First we + * make a reference to the array from the wrapper to make sure its + * references. Then we use a pragma to make sure the wrapper function + * symbol is always included at the link stage. Also, the symbols + * need to be extern (but not dllexport), even though they are not + * really used from another object file. + */ + +/* We need to account for differences between the mangling of symbols + * for Win32 (x86) and x64 programs, as symbols on Win32 are prefixed + * with an underscore but symbols on x64 are not. + */ +#ifdef _WIN64 +#define G_MSVC_SYMBOL_PREFIX "" +#else +#define G_MSVC_SYMBOL_PREFIX "_" +#endif + +#define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX) +#define G_DEFINE_DESTRUCTOR(_func) G_MSVC_DTOR (_func, G_MSVC_SYMBOL_PREFIX) + +#define G_MSVC_CTOR(_func,_sym_prefix) \ + static void _func(void); \ + extern int (* _array ## _func)(void); \ + int _func ## _wrapper(void) { _func(); g_slist_find (NULL, _array ## _func); return 0; } \ + __pragma(comment(linker,"/include:" _sym_prefix # _func "_wrapper")) \ + __pragma(section(".CRT$XCU",read)) \ + __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _wrapper; + +#define G_MSVC_DTOR(_func,_sym_prefix) \ + static void _func(void); \ + extern int (* _array ## _func)(void); \ + int _func ## _constructor(void) { atexit (_func); g_slist_find (NULL, _array ## _func); return 0; } \ + __pragma(comment(linker,"/include:" _sym_prefix # _func "_constructor")) \ + __pragma(section(".CRT$XCU",read)) \ + __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _constructor; + +#elif defined (_MSC_VER) + +#define G_HAS_CONSTRUCTORS 1 + +/* Pre Visual studio 2008 must use #pragma section */ +#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1 +#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1 + +#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \ + section(".CRT$XCU",read) +#define G_DEFINE_CONSTRUCTOR(_func) \ + static void _func(void); \ + static int _func ## _wrapper(void) { _func(); return 0; } \ + __declspec(allocate(".CRT$XCU")) static int (*p)(void) = _func ## _wrapper; + +#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \ + section(".CRT$XCU",read) +#define G_DEFINE_DESTRUCTOR(_func) \ + static void _func(void); \ + static int _func ## _constructor(void) { atexit (_func); return 0; } \ + __declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = _func ## _constructor; + +#elif defined(__SUNPRO_C) + +/* This is not tested, but i believe it should work, based on: + * http://opensource.apple.com/source/OpenSSL098/OpenSSL098-35/src/fips/fips_premain.c + */ + +#define G_HAS_CONSTRUCTORS 1 + +#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1 +#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1 + +#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \ + init(_func) +#define G_DEFINE_CONSTRUCTOR(_func) \ + static void _func(void); + +#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \ + fini(_func) +#define G_DEFINE_DESTRUCTOR(_func) \ + static void _func(void); + +#else + +/* constructors not supported for this compiler */ + +#endif + +#endif /* __GTK_DOC_IGNORE__ */ diff --git a/libsoup/libsoup-2.4.deps b/libsoup/libsoup-2.4.deps new file mode 100644 index 00000000..cd10dfde --- /dev/null +++ b/libsoup/libsoup-2.4.deps @@ -0,0 +1 @@ +gio-2.0 diff --git a/libsoup/libsoup-2.4.sym b/libsoup/libsoup-2.4.sym deleted file mode 100644 index be4cd7f4..00000000 --- a/libsoup/libsoup-2.4.sym +++ /dev/null @@ -1,508 +0,0 @@ -soup_add_completion -soup_add_idle -soup_add_io_watch -soup_address_equal_by_ip -soup_address_equal_by_name -soup_address_family_get_type -soup_address_get_gsockaddr -soup_address_get_name -soup_address_get_physical -soup_address_get_port -soup_address_get_sockaddr -soup_address_get_type -soup_address_hash_by_ip -soup_address_hash_by_name -soup_address_is_resolved -soup_address_new -soup_address_new_any -soup_address_new_from_sockaddr -soup_address_resolve_async -soup_address_resolve_sync -soup_add_timeout -soup_auth_authenticate -soup_auth_basic_get_type -soup_auth_digest_get_type -soup_auth_domain_accepts -soup_auth_domain_add_path -soup_auth_domain_basic_get_type -soup_auth_domain_basic_new -soup_auth_domain_basic_set_auth_callback -soup_auth_domain_challenge -soup_auth_domain_check_password -soup_auth_domain_covers -soup_auth_domain_digest_encode_password -soup_auth_domain_digest_get_type -soup_auth_domain_digest_new -soup_auth_domain_digest_set_auth_callback -soup_auth_domain_get_realm -soup_auth_domain_get_type -soup_auth_domain_remove_path -soup_auth_domain_set_filter -soup_auth_domain_set_generic_auth_callback -soup_auth_domain_try_generic_auth_callback -soup_auth_free_protection_space -soup_auth_get_authorization -soup_auth_get_host -soup_auth_get_info -soup_auth_get_protection_space -soup_auth_get_realm -soup_auth_get_saved_password -soup_auth_get_saved_users -soup_auth_get_scheme_name -soup_auth_get_type -soup_auth_has_saved_password -soup_auth_is_authenticated -soup_auth_is_for_proxy -soup_auth_is_ready -soup_auth_manager_get_type -soup_auth_manager_use_auth -soup_auth_new -soup_auth_ntlm_get_type -soup_auth_save_password -soup_auth_update -soup_buffer_copy -soup_buffer_free -soup_buffer_get_as_bytes -soup_buffer_get_data -soup_buffer_get_owner -soup_buffer_get_type -soup_buffer_new -soup_buffer_new_subbuffer -soup_buffer_new_take -soup_buffer_new_with_owner -soup_byte_array_get_type -soup_cacheability_get_type -soup_cache_clear -soup_cache_dump -soup_cache_flush -soup_cache_get_max_size -soup_cache_get_type -soup_cache_load -soup_cache_new -soup_cache_response_get_type -soup_cache_set_max_size -soup_cache_type_get_type -soup_char_attributes -soup_check_version -soup_client_context_get_address -soup_client_context_get_auth_domain -soup_client_context_get_auth_user -soup_client_context_get_host -soup_client_context_get_socket -soup_client_context_get_type -soup_connection_state_get_type -soup_content_decoder_get_type -soup_content_sniffer_get_buffer_size -soup_content_sniffer_get_type -soup_content_sniffer_new -soup_content_sniffer_sniff -soup_cookie_applies_to_uri -soup_cookie_copy -soup_cookie_domain_matches -soup_cookie_equal -soup_cookie_free -soup_cookie_get_domain -soup_cookie_get_expires -soup_cookie_get_http_only -soup_cookie_get_name -soup_cookie_get_path -soup_cookie_get_secure -soup_cookie_get_type -soup_cookie_get_value -soup_cookie_jar_accept_policy_get_type -soup_cookie_jar_add_cookie -soup_cookie_jar_add_cookie_with_first_party -soup_cookie_jar_all_cookies -soup_cookie_jar_db_get_type -soup_cookie_jar_db_new -soup_cookie_jar_delete_cookie -soup_cookie_jar_get_accept_policy -soup_cookie_jar_get_cookie_list -soup_cookie_jar_get_cookies -soup_cookie_jar_get_type -soup_cookie_jar_is_persistent -soup_cookie_jar_new -soup_cookie_jar_save -soup_cookie_jar_set_accept_policy -soup_cookie_jar_set_cookie -soup_cookie_jar_set_cookie_with_first_party -soup_cookie_jar_text_get_type -soup_cookie_jar_text_new -soup_cookie_new -soup_cookie_parse -soup_cookie_set_domain -soup_cookie_set_expires -soup_cookie_set_http_only -soup_cookie_set_max_age -soup_cookie_set_name -soup_cookie_set_path -soup_cookie_set_secure -soup_cookie_set_value -soup_cookies_free -soup_cookies_from_request -soup_cookies_from_response -soup_cookies_to_cookie_header -soup_cookies_to_request -soup_cookies_to_response -soup_cookie_to_cookie_header -soup_cookie_to_set_cookie_header -soup_date_copy -soup_date_format_get_type -soup_date_free -soup_date_get_day -soup_date_get_hour -soup_date_get_minute -soup_date_get_month -soup_date_get_offset -soup_date_get_second -soup_date_get_type -soup_date_get_utc -soup_date_get_year -soup_date_is_past -soup_date_new -soup_date_new_from_now -soup_date_new_from_string -soup_date_new_from_time_t -soup_date_to_string -soup_date_to_time_t -soup_date_to_timeval -soup_encoding_get_type -soup_expectation_get_type -soup_form_decode -soup_form_decode_multipart -soup_form_encode -soup_form_encode_datalist -soup_form_encode_hash -soup_form_encode_valist -soup_form_request_new -soup_form_request_new_from_datalist -soup_form_request_new_from_hash -soup_form_request_new_from_multipart -soup_get_major_version -soup_get_micro_version -soup_get_minor_version -soup_header_contains -soup_header_free_list -soup_header_free_param_list -soup_header_g_string_append_param -soup_header_g_string_append_param_quoted -soup_header_parse_list -soup_header_parse_param_list -soup_header_parse_quality_list -soup_header_parse_semi_param_list -soup_headers_parse -soup_headers_parse_request -soup_headers_parse_response -soup_headers_parse_status_line -soup_http_error_quark -soup_http_version_get_type -soup_known_status_code_get_type -soup_logger_attach -soup_logger_detach -soup_logger_get_type -soup_logger_log_level_get_type -soup_logger_new -soup_logger_set_printer -soup_logger_set_request_filter -soup_logger_set_response_filter -soup_memory_use_get_type -soup_message_add_header_handler -soup_message_add_status_code_handler -soup_message_body_append -soup_message_body_append_buffer -soup_message_body_append_take -soup_message_body_complete -soup_message_body_flatten -soup_message_body_free -soup_message_body_get_accumulate -soup_message_body_get_chunk -soup_message_body_get_type -soup_message_body_got_chunk -soup_message_body_new -soup_message_body_set_accumulate -soup_message_body_truncate -soup_message_body_wrote_chunk -soup_message_content_sniffed -soup_message_disable_feature -soup_message_finished -soup_message_flags_get_type -soup_message_get_address -soup_message_get_first_party -soup_message_get_flags -soup_message_get_https_status -soup_message_get_http_version -soup_message_get_priority -soup_message_get_soup_request -soup_message_get_type -soup_message_get_uri -soup_message_got_body -soup_message_got_chunk -soup_message_got_headers -soup_message_got_informational -soup_message_headers_append -soup_message_headers_clean_connection_headers -soup_message_headers_clear -soup_message_headers_foreach -soup_message_headers_free -soup_message_headers_free_ranges -soup_message_headers_get -soup_message_headers_get_content_disposition -soup_message_headers_get_content_length -soup_message_headers_get_content_range -soup_message_headers_get_content_type -soup_message_headers_get_encoding -soup_message_headers_get_expectations -soup_message_headers_get_list -soup_message_headers_get_one -soup_message_headers_get_ranges -soup_message_headers_get_type -soup_message_headers_iter_init -soup_message_headers_iter_next -soup_message_headers_new -soup_message_headers_remove -soup_message_headers_replace -soup_message_headers_set_content_disposition -soup_message_headers_set_content_length -soup_message_headers_set_content_range -soup_message_headers_set_content_type -soup_message_headers_set_encoding -soup_message_headers_set_expectations -soup_message_headers_set_range -soup_message_headers_set_ranges -soup_message_headers_type_get_type -soup_message_io_cleanup -soup_message_is_keepalive -soup_message_new -soup_message_new_from_uri -soup_message_priority_get_type -soup_message_restarted -soup_message_set_chunk_allocator -soup_message_set_first_party -soup_message_set_flags -soup_message_set_http_version -soup_message_set_priority -soup_message_set_redirect -soup_message_set_request -soup_message_set_response -soup_message_set_status -soup_message_set_status_full -soup_message_set_uri -soup_message_wrote_body -soup_message_wrote_body_data -soup_message_wrote_chunk -soup_message_wrote_headers -soup_message_wrote_informational -soup_multipart_append_form_file -soup_multipart_append_form_string -soup_multipart_append_part -soup_multipart_free -soup_multipart_get_length -soup_multipart_get_part -soup_multipart_get_type -soup_multipart_input_stream_get_headers -soup_multipart_input_stream_get_type -soup_multipart_input_stream_new -soup_multipart_input_stream_next_part -soup_multipart_input_stream_next_part_async -soup_multipart_input_stream_next_part_finish -soup_multipart_new -soup_multipart_new_from_message -soup_multipart_to_message -soup_password_manager_get_passwords_async -soup_password_manager_get_passwords_sync -soup_password_manager_get_type -soup_proxy_resolver_default_get_type -soup_proxy_resolver_get_proxy_async -soup_proxy_resolver_get_proxy_sync -soup_proxy_resolver_get_type -soup_proxy_uri_resolver_get_proxy_uri_async -soup_proxy_uri_resolver_get_proxy_uri_sync -soup_proxy_uri_resolver_get_type -soup_request_data_get_type -soup_requester_error_get_type -soup_requester_error_quark -soup_requester_get_type -soup_requester_new -soup_requester_request -soup_requester_request_uri -soup_request_error_get_type -soup_request_error_quark -soup_request_file_get_file -soup_request_file_get_type -soup_request_get_content_length -soup_request_get_content_type -soup_request_get_session -soup_request_get_type -soup_request_get_uri -soup_request_http_get_message -soup_request_http_get_type -soup_request_send -soup_request_send_async -soup_request_send_finish -soup_server_add_auth_domain -soup_server_add_handler -soup_server_disconnect -soup_server_get_async_context -soup_server_get_listener -soup_server_get_port -soup_server_get_type -soup_server_is_https -soup_server_new -soup_server_pause_message -soup_server_quit -soup_server_remove_auth_domain -soup_server_remove_handler -soup_server_run -soup_server_run_async -soup_server_unpause_message -soup_session_abort -soup_session_add_feature -soup_session_add_feature_by_type -soup_session_async_get_type -soup_session_async_new -soup_session_async_new_with_options -soup_session_cancel_message -soup_session_feature_add_feature -soup_session_feature_attach -soup_session_feature_detach -soup_session_feature_get_type -soup_session_feature_has_feature -soup_session_feature_remove_feature -soup_session_get_async_context -soup_session_get_feature -soup_session_get_feature_for_message -soup_session_get_features -soup_session_get_type -soup_session_has_feature -soup_session_new -soup_session_new_with_options -soup_session_pause_message -soup_session_prefetch_dns -soup_session_prepare_for_uri -soup_session_queue_message -soup_session_redirect_message -soup_session_remove_feature -soup_session_remove_feature_by_type -soup_session_request -soup_session_request_http -soup_session_request_http_uri -soup_session_request_uri -soup_session_requeue_message -soup_session_send -soup_session_send_async -soup_session_send_finish -soup_session_send_message -soup_session_sync_get_type -soup_session_sync_new -soup_session_sync_new_with_options -soup_session_unpause_message -soup_session_would_redirect -soup_socket_connect_async -soup_socket_connect_sync -soup_socket_disconnect -soup_socket_get_fd -soup_socket_get_local_address -soup_socket_get_remote_address -soup_socket_get_type -soup_socket_io_status_get_type -soup_socket_is_connected -soup_socket_is_ssl -soup_socket_listen -soup_socket_new -soup_socket_read -soup_socket_read_until -soup_socket_start_proxy_ssl -soup_socket_start_ssl -soup_socket_write -soup_ssl_supported -soup_status_get_phrase -soup_status_get_type -soup_status_proxify -soup_str_case_equal -soup_str_case_hash -soup_tld_domain_is_public_suffix -soup_tld_error_get_type -soup_tld_error_quark -soup_tld_get_base_domain -soup_uri_copy -soup_uri_copy_host -soup_uri_decode -soup_uri_encode -soup_uri_equal -soup_uri_free -soup_uri_get_fragment -soup_uri_get_host -soup_uri_get_password -soup_uri_get_path -soup_uri_get_port -soup_uri_get_query -soup_uri_get_scheme -soup_uri_get_type -soup_uri_get_user -soup_uri_host_equal -soup_uri_host_hash -soup_uri_new -soup_uri_new_with_base -soup_uri_normalize -soup_uri_set_fragment -soup_uri_set_host -soup_uri_set_password -soup_uri_set_path -soup_uri_set_port -soup_uri_set_query -soup_uri_set_query_from_fields -soup_uri_set_query_from_form -soup_uri_set_scheme -soup_uri_set_user -soup_uri_to_string -soup_uri_uses_default_port -soup_value_array_append -soup_value_array_append_vals -soup_value_array_from_args -soup_value_array_get_nth -soup_value_array_insert -soup_value_array_new -soup_value_array_new_with_vals -soup_value_array_to_args -soup_value_hash_insert -soup_value_hash_insert_vals -soup_value_hash_insert_value -soup_value_hash_lookup -soup_value_hash_lookup_vals -soup_value_hash_new -soup_value_hash_new_with_vals -soup_xmlrpc_build_fault -soup_xmlrpc_build_method_call -soup_xmlrpc_build_method_response -soup_xmlrpc_error_get_type -soup_xmlrpc_error_quark -soup_xmlrpc_extract_method_call -soup_xmlrpc_extract_method_response -soup_xmlrpc_fault_get_type -soup_xmlrpc_fault_quark -soup_xmlrpc_parse_method_call -soup_xmlrpc_parse_method_response -soup_xmlrpc_request_new -soup_xmlrpc_set_fault -soup_xmlrpc_set_response -_SOUP_METHOD_CONNECT -_SOUP_METHOD_COPY -_SOUP_METHOD_DELETE -_SOUP_METHOD_GET -_SOUP_METHOD_HEAD -_SOUP_METHOD_LOCK -_SOUP_METHOD_MKCOL -_SOUP_METHOD_MOVE -_SOUP_METHOD_OPTIONS -_SOUP_METHOD_POST -_SOUP_METHOD_PROPFIND -_SOUP_METHOD_PROPPATCH -_SOUP_METHOD_PUT -_SOUP_METHOD_TRACE -_SOUP_METHOD_UNLOCK -_SOUP_URI_SCHEME_DATA -_SOUP_URI_SCHEME_FILE -_SOUP_URI_SCHEME_FTP -_SOUP_URI_SCHEME_HTTP -_SOUP_URI_SCHEME_HTTPS -_SOUP_URI_SCHEME_RESOURCE diff --git a/libsoup/libsoup-gnome-2.4.sym b/libsoup/libsoup-gnome-2.4.sym deleted file mode 100644 index 67f62dec..00000000 --- a/libsoup/libsoup-gnome-2.4.sym +++ /dev/null @@ -1,5 +0,0 @@ -soup_cookie_jar_sqlite_get_type -soup_cookie_jar_sqlite_new -soup_gnome_features_2_26_get_type -soup_password_manager_gnome_get_type -soup_proxy_resolver_gnome_get_type diff --git a/libsoup/soup-address.c b/libsoup/soup-address.c index b2d1647a..0351db50 100644 --- a/libsoup/soup-address.c +++ b/libsoup/soup-address.c @@ -53,7 +53,6 @@ typedef struct { GMutex lock; } SoupAddressPrivate; -#define SOUP_ADDRESS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_ADDRESS, SoupAddressPrivate)) /* sockaddr generic macros */ #define SOUP_SIN(priv) ((struct sockaddr_in *)priv->sockaddr) @@ -98,13 +97,14 @@ typedef struct { static void soup_address_connectable_iface_init (GSocketConnectableIface *connectable_iface); G_DEFINE_TYPE_WITH_CODE (SoupAddress, soup_address, G_TYPE_OBJECT, + G_ADD_PRIVATE (SoupAddress) G_IMPLEMENT_INTERFACE (G_TYPE_SOCKET_CONNECTABLE, soup_address_connectable_iface_init)) static void soup_address_init (SoupAddress *addr) { - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (addr); + SoupAddressPrivate *priv = soup_address_get_instance_private (addr); g_mutex_init (&priv->lock); } @@ -113,7 +113,7 @@ static void soup_address_finalize (GObject *object) { SoupAddress *addr = SOUP_ADDRESS (object); - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (addr); + SoupAddressPrivate *priv = soup_address_get_instance_private (addr); g_free (priv->sockaddr); g_free (priv->name); @@ -136,7 +136,7 @@ soup_address_constructor (GType type, type, n_construct_properties, construct_properties); if (!addr) return NULL; - priv = SOUP_ADDRESS_GET_PRIVATE (addr); + priv = soup_address_get_instance_private (SOUP_ADDRESS (addr)); if (!priv->name && !priv->sockaddr) { g_object_unref (addr); @@ -150,7 +150,7 @@ static void soup_address_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (object); + SoupAddressPrivate *priv = soup_address_get_instance_private (SOUP_ADDRESS (object)); SoupAddressFamily family; struct sockaddr *sa; int len, port; @@ -214,7 +214,7 @@ static void soup_address_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (object); + SoupAddressPrivate *priv = soup_address_get_instance_private (SOUP_ADDRESS (object)); switch (prop_id) { case PROP_NAME: @@ -249,8 +249,6 @@ soup_address_class_init (SoupAddressClass *address_class) { GObjectClass *object_class = G_OBJECT_CLASS (address_class); - g_type_class_add_private (address_class, sizeof (SoupAddressPrivate)); - /* virtual method override */ object_class->constructor = soup_address_constructor; object_class->finalize = soup_address_finalize; @@ -370,7 +368,7 @@ soup_address_new (const char *name, guint port) * Returns a #SoupAddress equivalent to @sa (or %NULL if @sa's * address family isn't supported) * - * Return value: (allow-none): the new #SoupAddress + * Return value: (nullable): the new #SoupAddress **/ SoupAddress * soup_address_new_from_sockaddr (struct sockaddr *sa, int len) @@ -384,6 +382,17 @@ soup_address_new_from_sockaddr (struct sockaddr *sa, int len) NULL); } +SoupAddress * +soup_address_new_from_gsockaddr (GSocketAddress *addr) +{ + struct sockaddr_storage sa; + + g_socket_address_to_native (addr, &sa, sizeof (sa), NULL); + return g_object_new (SOUP_TYPE_ADDRESS, + SOUP_ADDRESS_SOCKADDR, &sa, + NULL); +} + /** * SoupAddressFamily: * @SOUP_ADDRESS_FAMILY_INVALID: an invalid %SoupAddress @@ -409,7 +418,7 @@ soup_address_new_from_sockaddr (struct sockaddr *sa, int len) * for @family (or %NULL if @family isn't supported), suitable for * using as a listening #SoupSocket. * - * Return value: (allow-none): the new #SoupAddress + * Return value: (nullable): the new #SoupAddress **/ SoupAddress * soup_address_new_any (SoupAddressFamily family, guint port) @@ -434,14 +443,17 @@ soup_address_new_any (SoupAddressFamily family, guint port) * soup_address_is_resolved() to safely test whether or not an address * is resolved before fetching its name or address. * - * Return value: (allow-none): the hostname, or %NULL if it is not known. + * Return value: (nullable): the hostname, or %NULL if it is not known. **/ const char * soup_address_get_name (SoupAddress *addr) { + SoupAddressPrivate *priv; + g_return_val_if_fail (SOUP_IS_ADDRESS (addr), NULL); + priv = soup_address_get_instance_private (addr); - return SOUP_ADDRESS_GET_PRIVATE (addr)->name; + return priv->name; } /** @@ -457,7 +469,7 @@ soup_address_get_name (SoupAddress *addr) * soup_address_is_resolved() to safely test whether or not an address * is resolved before fetching its name or address. * - * Return value: (allow-none) (transfer none): the sockaddr, or %NULL + * Return value: (nullable) (transfer none): the sockaddr, or %NULL **/ struct sockaddr * soup_address_get_sockaddr (SoupAddress *addr, int *len) @@ -465,7 +477,7 @@ soup_address_get_sockaddr (SoupAddress *addr, int *len) SoupAddressPrivate *priv; g_return_val_if_fail (SOUP_IS_ADDRESS (addr), NULL); - priv = SOUP_ADDRESS_GET_PRIVATE (addr); + priv = soup_address_get_instance_private (addr); if (priv->sockaddr && len) *len = SOUP_ADDRESS_FAMILY_SOCKADDR_SIZE (SOUP_ADDRESS_GET_FAMILY (priv)); @@ -486,7 +498,7 @@ soup_address_get_sockaddr (SoupAddress *addr, int *len) GSocketAddress * soup_address_get_gsockaddr (SoupAddress *addr) { - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (addr); + SoupAddressPrivate *priv = soup_address_get_instance_private (addr); return g_socket_address_new_from_native (priv->sockaddr, SOUP_ADDRESS_FAMILY_SOCKADDR_SIZE (SOUP_ADDRESS_GET_FAMILY (priv))); @@ -495,7 +507,7 @@ soup_address_get_gsockaddr (SoupAddress *addr) static GInetAddress * soup_address_make_inet_address (SoupAddress *addr) { - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (addr); + SoupAddressPrivate *priv = soup_address_get_instance_private (addr); GSocketAddress *gsa; GInetAddress *gia; @@ -519,7 +531,7 @@ soup_address_make_inet_address (SoupAddress *addr) * soup_address_is_resolved() to safely test whether or not an address * is resolved before fetching its name or address. * - * Return value: (allow-none): the physical address, or %NULL + * Return value: (nullable): the physical address, or %NULL **/ const char * soup_address_get_physical (SoupAddress *addr) @@ -527,7 +539,7 @@ soup_address_get_physical (SoupAddress *addr) SoupAddressPrivate *priv; g_return_val_if_fail (SOUP_IS_ADDRESS (addr), NULL); - priv = SOUP_ADDRESS_GET_PRIVATE (addr); + priv = soup_address_get_instance_private (addr); if (!priv->sockaddr) return NULL; @@ -554,9 +566,12 @@ soup_address_get_physical (SoupAddress *addr) guint soup_address_get_port (SoupAddress *addr) { + SoupAddressPrivate *priv; + g_return_val_if_fail (SOUP_IS_ADDRESS (addr), 0); + priv = soup_address_get_instance_private (addr); - return SOUP_ADDRESS_GET_PRIVATE (addr)->port; + return priv->port; } @@ -566,7 +581,7 @@ soup_address_get_port (SoupAddress *addr) static void maybe_resolve_ip (SoupAddress *addr) { - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (addr); + SoupAddressPrivate *priv = soup_address_get_instance_private (addr); const char *pct, *ip; char *tmp = NULL; GSocketConnectable *gaddr; @@ -616,7 +631,7 @@ maybe_resolve_ip (SoupAddress *addr) static guint update_addrs (SoupAddress *addr, GList *addrs, GError *error) { - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (addr); + SoupAddressPrivate *priv = soup_address_get_instance_private (addr); GInetAddress *gia; GSocketAddress *gsa; int i; @@ -655,7 +670,7 @@ update_addrs (SoupAddress *addr, GList *addrs, GError *error) static guint update_name (SoupAddress *addr, const char *name, GError *error) { - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (addr); + SoupAddressPrivate *priv = soup_address_get_instance_private (addr); if (error) { if (error->domain == G_IO_ERROR && @@ -714,7 +729,7 @@ lookup_resolved (GObject *source, GAsyncResult *result, gpointer user_data) GResolver *resolver = G_RESOLVER (source); SoupAddressResolveAsyncData *res_data = user_data; SoupAddress *addr = res_data->addr; - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (addr); + SoupAddressPrivate *priv = soup_address_get_instance_private (addr); GError *error = NULL; guint status; @@ -798,7 +813,7 @@ soup_address_resolve_async (SoupAddress *addr, GMainContext *async_context, GResolver *resolver; g_return_if_fail (SOUP_IS_ADDRESS (addr)); - priv = SOUP_ADDRESS_GET_PRIVATE (addr); + priv = soup_address_get_instance_private (addr); g_return_if_fail (priv->name || priv->sockaddr); /* We don't need to do locking here because the async case is @@ -847,7 +862,7 @@ soup_address_resolve_async (SoupAddress *addr, GMainContext *async_context, static guint resolve_sync_internal (SoupAddress *addr, GCancellable *cancellable, GError **error) { - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (addr); + SoupAddressPrivate *priv = soup_address_get_instance_private (addr); GResolver *resolver; guint status; GError *my_err = NULL; @@ -926,7 +941,7 @@ soup_address_resolve_sync (SoupAddress *addr, GCancellable *cancellable) SoupAddressPrivate *priv; g_return_val_if_fail (SOUP_IS_ADDRESS (addr), SOUP_STATUS_MALFORMED); - priv = SOUP_ADDRESS_GET_PRIVATE (addr); + priv = soup_address_get_instance_private (addr); g_return_val_if_fail (priv->name || priv->sockaddr, SOUP_STATUS_MALFORMED); return resolve_sync_internal (addr, cancellable, NULL); @@ -949,7 +964,7 @@ soup_address_is_resolved (SoupAddress *addr) gboolean resolved; g_return_val_if_fail (SOUP_IS_ADDRESS (addr), FALSE); - priv = SOUP_ADDRESS_GET_PRIVATE (addr); + priv = soup_address_get_instance_private (addr); g_mutex_lock (&priv->lock); resolved = priv->sockaddr && priv->name; @@ -972,7 +987,7 @@ soup_address_is_resolved (SoupAddress *addr) guint soup_address_hash_by_name (gconstpointer addr) { - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (addr); + SoupAddressPrivate *priv = soup_address_get_instance_private (SOUP_ADDRESS (addr)); g_return_val_if_fail (priv->name != NULL, 0); return g_str_hash (priv->name); @@ -1013,8 +1028,8 @@ soup_address_hash_by_name (gconstpointer addr) gboolean soup_address_equal_by_name (gconstpointer addr1, gconstpointer addr2) { - SoupAddressPrivate *priv1 = SOUP_ADDRESS_GET_PRIVATE (addr1); - SoupAddressPrivate *priv2 = SOUP_ADDRESS_GET_PRIVATE (addr2); + SoupAddressPrivate *priv1 = soup_address_get_instance_private (SOUP_ADDRESS (addr1)); + SoupAddressPrivate *priv2 = soup_address_get_instance_private (SOUP_ADDRESS (addr2)); g_return_val_if_fail (priv1->name != NULL, FALSE); g_return_val_if_fail (priv2->name != NULL, FALSE); @@ -1035,7 +1050,7 @@ soup_address_equal_by_name (gconstpointer addr1, gconstpointer addr2) guint soup_address_hash_by_ip (gconstpointer addr) { - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (addr); + SoupAddressPrivate *priv = soup_address_get_instance_private (SOUP_ADDRESS (addr)); guint hash; g_return_val_if_fail (priv->sockaddr != NULL, 0); @@ -1073,8 +1088,8 @@ soup_address_hash_by_ip (gconstpointer addr) gboolean soup_address_equal_by_ip (gconstpointer addr1, gconstpointer addr2) { - SoupAddressPrivate *priv1 = SOUP_ADDRESS_GET_PRIVATE (addr1); - SoupAddressPrivate *priv2 = SOUP_ADDRESS_GET_PRIVATE (addr2); + SoupAddressPrivate *priv1 = soup_address_get_instance_private (SOUP_ADDRESS (addr1)); + SoupAddressPrivate *priv2 = soup_address_get_instance_private (SOUP_ADDRESS (addr2)); int size; g_return_val_if_fail (priv1->sockaddr != NULL, FALSE); @@ -1120,7 +1135,7 @@ soup_address_address_enumerator_finalize (GObject *object) static GSocketAddress * next_address (SoupAddressAddressEnumerator *addr_enum) { - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (addr_enum->addr); + SoupAddressPrivate *priv = soup_address_get_instance_private (addr_enum->addr); struct sockaddr_storage *ss; int next_addr; @@ -1148,7 +1163,7 @@ soup_address_address_enumerator_next (GSocketAddressEnumerator *enumerator, { SoupAddressAddressEnumerator *addr_enum = SOUP_ADDRESS_ADDRESS_ENUMERATOR (enumerator); - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (addr_enum->addr); + SoupAddressPrivate *priv = soup_address_get_instance_private (addr_enum->addr); if (!priv->sockaddr) { if (resolve_sync_internal (addr_enum->addr, cancellable, error) != SOUP_STATUS_OK) @@ -1184,7 +1199,7 @@ soup_address_address_enumerator_next_async (GSocketAddressEnumerator *enumerato { SoupAddressAddressEnumerator *addr_enum = SOUP_ADDRESS_ADDRESS_ENUMERATOR (enumerator); - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (addr_enum->addr); + SoupAddressPrivate *priv = soup_address_get_instance_private (addr_enum->addr); GTask *task; task = g_task_new (enumerator, cancellable, callback, user_data); @@ -1231,9 +1246,9 @@ soup_address_connectable_enumerate (GSocketConnectable *connectable) SoupAddressPrivate *priv; addr_enum = g_object_new (SOUP_TYPE_ADDRESS_ADDRESS_ENUMERATOR, NULL); - addr_enum->addr = g_object_ref (connectable); + addr_enum->addr = g_object_ref (SOUP_ADDRESS (connectable)); - priv = SOUP_ADDRESS_GET_PRIVATE (addr_enum->addr); + priv = soup_address_get_instance_private (addr_enum->addr); addr_enum->orig_offset = priv->offset; return (GSocketAddressEnumerator *)addr_enum; @@ -1243,7 +1258,7 @@ static GSocketAddressEnumerator * soup_address_connectable_proxy_enumerate (GSocketConnectable *connectable) { SoupAddress *addr = SOUP_ADDRESS (connectable); - SoupAddressPrivate *priv = SOUP_ADDRESS_GET_PRIVATE (addr); + SoupAddressPrivate *priv = soup_address_get_instance_private (addr); GSocketAddressEnumerator *proxy_enum; SoupURI *uri; char *uri_string; @@ -1256,7 +1271,7 @@ soup_address_connectable_proxy_enumerate (GSocketConnectable *connectable) soup_uri_set_host (uri, priv->name ? priv->name : soup_address_get_physical (addr)); soup_uri_set_port (uri, priv->port); soup_uri_set_path (uri, ""); - uri_string = soup_uri_to_string_internal (uri, FALSE, TRUE); + uri_string = soup_uri_to_string_internal (uri, FALSE, FALSE, TRUE); proxy_enum = g_object_new (G_TYPE_PROXY_ADDRESS_ENUMERATOR, "connectable", connectable, diff --git a/libsoup/soup-address.h b/libsoup/soup-address.h index 797a5506..af178de5 100644 --- a/libsoup/soup-address.h +++ b/libsoup/soup-address.h @@ -56,30 +56,41 @@ typedef void (*SoupAddressCallback) (SoupAddress *addr, guint status, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 GType soup_address_get_type (void); +SOUP_AVAILABLE_IN_2_4 SoupAddress *soup_address_new (const char *name, guint port); +SOUP_AVAILABLE_IN_2_4 SoupAddress *soup_address_new_from_sockaddr (struct sockaddr *sa, int len); +SOUP_AVAILABLE_IN_2_4 SoupAddress *soup_address_new_any (SoupAddressFamily family, guint port); +SOUP_AVAILABLE_IN_2_4 void soup_address_resolve_async (SoupAddress *addr, GMainContext *async_context, GCancellable *cancellable, SoupAddressCallback callback, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 guint soup_address_resolve_sync (SoupAddress *addr, GCancellable *cancellable); +SOUP_AVAILABLE_IN_2_4 const char *soup_address_get_name (SoupAddress *addr); +SOUP_AVAILABLE_IN_2_4 const char *soup_address_get_physical (SoupAddress *addr); +SOUP_AVAILABLE_IN_2_4 guint soup_address_get_port (SoupAddress *addr); +SOUP_AVAILABLE_IN_2_4 struct sockaddr *soup_address_get_sockaddr (SoupAddress *addr, int *len); SOUP_AVAILABLE_IN_2_32 GSocketAddress *soup_address_get_gsockaddr (SoupAddress *addr); +SOUP_AVAILABLE_IN_2_4 gboolean soup_address_is_resolved (SoupAddress *addr); SOUP_AVAILABLE_IN_2_26 diff --git a/libsoup/soup-auth-basic.c b/libsoup/soup-auth-basic.c index f298e36c..5f1e7186 100644 --- a/libsoup/soup-auth-basic.c +++ b/libsoup/soup-auth-basic.c @@ -17,7 +17,6 @@ typedef struct { char *token; } SoupAuthBasicPrivate; -#define SOUP_AUTH_BASIC_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_AUTH_BASIC, SoupAuthBasicPrivate)) /** * SOUP_TYPE_AUTH_BASIC: @@ -30,7 +29,7 @@ typedef struct { * Since: 2.34 */ -G_DEFINE_TYPE (SoupAuthBasic, soup_auth_basic, SOUP_TYPE_AUTH) +G_DEFINE_TYPE_WITH_PRIVATE (SoupAuthBasic, soup_auth_basic, SOUP_TYPE_AUTH) static void soup_auth_basic_init (SoupAuthBasic *basic) @@ -40,7 +39,7 @@ soup_auth_basic_init (SoupAuthBasic *basic) static void soup_auth_basic_finalize (GObject *object) { - SoupAuthBasicPrivate *priv = SOUP_AUTH_BASIC_GET_PRIVATE (object); + SoupAuthBasicPrivate *priv = soup_auth_basic_get_instance_private (SOUP_AUTH_BASIC (object)); g_free (priv->token); @@ -51,7 +50,7 @@ static gboolean soup_auth_basic_update (SoupAuth *auth, SoupMessage *msg, GHashTable *auth_params) { - SoupAuthBasicPrivate *priv = SOUP_AUTH_BASIC_GET_PRIVATE (auth); + SoupAuthBasicPrivate *priv = soup_auth_basic_get_instance_private (SOUP_AUTH_BASIC (auth)); /* If we're updating a pre-existing auth, the * username/password must be bad now, so forget it. @@ -75,7 +74,9 @@ soup_auth_basic_get_protection_space (SoupAuth *auth, SoupURI *source_uri) /* Strip filename component */ p = strrchr (space, '/'); - if (p && p != space && p[1]) + if (p == space && p[1]) + p[1] = '\0'; + else if (p && p[1]) *p = '\0'; return g_slist_prepend (NULL, space); @@ -85,7 +86,7 @@ static void soup_auth_basic_authenticate (SoupAuth *auth, const char *username, const char *password) { - SoupAuthBasicPrivate *priv = SOUP_AUTH_BASIC_GET_PRIVATE (auth); + SoupAuthBasicPrivate *priv = soup_auth_basic_get_instance_private (SOUP_AUTH_BASIC (auth)); char *user_pass, *user_pass_latin1; int len; @@ -112,13 +113,15 @@ soup_auth_basic_authenticate (SoupAuth *auth, const char *username, static gboolean soup_auth_basic_is_authenticated (SoupAuth *auth) { - return SOUP_AUTH_BASIC_GET_PRIVATE (auth)->token != NULL; + SoupAuthBasicPrivate *priv = soup_auth_basic_get_instance_private (SOUP_AUTH_BASIC (auth)); + + return priv->token != NULL; } static char * soup_auth_basic_get_authorization (SoupAuth *auth, SoupMessage *msg) { - SoupAuthBasicPrivate *priv = SOUP_AUTH_BASIC_GET_PRIVATE (auth); + SoupAuthBasicPrivate *priv = soup_auth_basic_get_instance_private (SOUP_AUTH_BASIC (auth)); return g_strdup_printf ("Basic %s", priv->token); } @@ -129,8 +132,6 @@ soup_auth_basic_class_init (SoupAuthBasicClass *auth_basic_class) SoupAuthClass *auth_class = SOUP_AUTH_CLASS (auth_basic_class); GObjectClass *object_class = G_OBJECT_CLASS (auth_basic_class); - g_type_class_add_private (auth_basic_class, sizeof (SoupAuthBasicPrivate)); - auth_class->scheme_name = "Basic"; auth_class->strength = 1; diff --git a/libsoup/soup-auth-digest.c b/libsoup/soup-auth-digest.c index 1fbb639d..eda2a93c 100644 --- a/libsoup/soup-auth-digest.c +++ b/libsoup/soup-auth-digest.c @@ -36,7 +36,6 @@ typedef struct { int nc; SoupAuthDigestQop qop; } SoupAuthDigestPrivate; -#define SOUP_AUTH_DIGEST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_AUTH_DIGEST, SoupAuthDigestPrivate)) static void recompute_hex_a1 (SoupAuthDigestPrivate *priv); @@ -51,7 +50,7 @@ static void recompute_hex_a1 (SoupAuthDigestPrivate *priv); * Since: 2.34 */ -G_DEFINE_TYPE (SoupAuthDigest, soup_auth_digest, SOUP_TYPE_AUTH) +G_DEFINE_TYPE_WITH_PRIVATE (SoupAuthDigest, soup_auth_digest, SOUP_TYPE_AUTH) static void soup_auth_digest_init (SoupAuthDigest *digest) @@ -61,7 +60,7 @@ soup_auth_digest_init (SoupAuthDigest *digest) static void soup_auth_digest_finalize (GObject *object) { - SoupAuthDigestPrivate *priv = SOUP_AUTH_DIGEST_GET_PRIVATE (object); + SoupAuthDigestPrivate *priv = soup_auth_digest_get_instance_private (SOUP_AUTH_DIGEST (object)); g_free (priv->user); g_free (priv->nonce); @@ -137,7 +136,8 @@ static gboolean soup_auth_digest_update (SoupAuth *auth, SoupMessage *msg, GHashTable *auth_params) { - SoupAuthDigestPrivate *priv = SOUP_AUTH_DIGEST_GET_PRIVATE (auth); + SoupAuthDigest *auth_digest = SOUP_AUTH_DIGEST (auth); + SoupAuthDigestPrivate *priv = soup_auth_digest_get_instance_private (auth_digest); const char *stale, *qop; guint qop_options; gboolean ok = TRUE; @@ -184,7 +184,8 @@ soup_auth_digest_update (SoupAuth *auth, SoupMessage *msg, static GSList * soup_auth_digest_get_protection_space (SoupAuth *auth, SoupURI *source_uri) { - SoupAuthDigestPrivate *priv = SOUP_AUTH_DIGEST_GET_PRIVATE (auth); + SoupAuthDigest *auth_digest = SOUP_AUTH_DIGEST (auth); + SoupAuthDigestPrivate *priv = soup_auth_digest_get_instance_private (auth_digest); GSList *space = NULL; SoupURI *uri; char **dvec, *d, *dir, *slash; @@ -290,7 +291,8 @@ static void soup_auth_digest_authenticate (SoupAuth *auth, const char *username, const char *password) { - SoupAuthDigestPrivate *priv = SOUP_AUTH_DIGEST_GET_PRIVATE (auth); + SoupAuthDigest *auth_digest = SOUP_AUTH_DIGEST (auth); + SoupAuthDigestPrivate *priv = soup_auth_digest_get_instance_private (auth_digest); char *bgen; g_clear_pointer (&priv->cnonce, g_free); @@ -318,7 +320,9 @@ soup_auth_digest_authenticate (SoupAuth *auth, const char *username, static gboolean soup_auth_digest_is_authenticated (SoupAuth *auth) { - return SOUP_AUTH_DIGEST_GET_PRIVATE (auth)->cnonce != NULL; + SoupAuthDigestPrivate *priv = soup_auth_digest_get_instance_private (SOUP_AUTH_DIGEST (auth)); + + return priv->cnonce != NULL; } void @@ -373,7 +377,8 @@ static void authentication_info_cb (SoupMessage *msg, gpointer data) { SoupAuth *auth = data; - SoupAuthDigestPrivate *priv = SOUP_AUTH_DIGEST_GET_PRIVATE (auth); + SoupAuthDigest *auth_digest = SOUP_AUTH_DIGEST (auth); + SoupAuthDigestPrivate *priv = soup_auth_digest_get_instance_private (auth_digest); const char *header; GHashTable *auth_params; char *nextnonce; @@ -403,7 +408,8 @@ authentication_info_cb (SoupMessage *msg, gpointer data) static char * soup_auth_digest_get_authorization (SoupAuth *auth, SoupMessage *msg) { - SoupAuthDigestPrivate *priv = SOUP_AUTH_DIGEST_GET_PRIVATE (auth); + SoupAuthDigest *auth_digest = SOUP_AUTH_DIGEST (auth); + SoupAuthDigestPrivate *priv = soup_auth_digest_get_instance_private (auth_digest); char response[33], *token; char *url, *algorithm; GString *out; @@ -471,8 +477,6 @@ soup_auth_digest_class_init (SoupAuthDigestClass *auth_digest_class) SoupAuthClass *auth_class = SOUP_AUTH_CLASS (auth_digest_class); GObjectClass *object_class = G_OBJECT_CLASS (auth_digest_class); - g_type_class_add_private (auth_digest_class, sizeof (SoupAuthDigestPrivate)); - auth_class->scheme_name = "Digest"; auth_class->strength = 5; diff --git a/libsoup/soup-auth-domain-basic.c b/libsoup/soup-auth-domain-basic.c index b843ad72..aef2f68a 100644 --- a/libsoup/soup-auth-domain-basic.c +++ b/libsoup/soup-auth-domain-basic.c @@ -37,9 +37,7 @@ typedef struct { GDestroyNotify auth_dnotify; } SoupAuthDomainBasicPrivate; -#define SOUP_AUTH_DOMAIN_BASIC_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_AUTH_DOMAIN_BASIC, SoupAuthDomainBasicPrivate)) - -G_DEFINE_TYPE (SoupAuthDomainBasic, soup_auth_domain_basic, SOUP_TYPE_AUTH_DOMAIN) +G_DEFINE_TYPE_WITH_PRIVATE (SoupAuthDomainBasic, soup_auth_domain_basic, SOUP_TYPE_AUTH_DOMAIN) static void soup_auth_domain_basic_init (SoupAuthDomainBasic *basic) @@ -50,7 +48,7 @@ static void soup_auth_domain_basic_finalize (GObject *object) { SoupAuthDomainBasicPrivate *priv = - SOUP_AUTH_DOMAIN_BASIC_GET_PRIVATE (object); + soup_auth_domain_basic_get_instance_private (SOUP_AUTH_DOMAIN_BASIC (object)); if (priv->auth_dnotify) priv->auth_dnotify (priv->auth_data); @@ -63,7 +61,7 @@ soup_auth_domain_basic_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { SoupAuthDomainBasicPrivate *priv = - SOUP_AUTH_DOMAIN_BASIC_GET_PRIVATE (object); + soup_auth_domain_basic_get_instance_private (SOUP_AUTH_DOMAIN_BASIC (object)); switch (prop_id) { case PROP_AUTH_CALLBACK: @@ -87,7 +85,7 @@ soup_auth_domain_basic_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { SoupAuthDomainBasicPrivate *priv = - SOUP_AUTH_DOMAIN_BASIC_GET_PRIVATE (object); + soup_auth_domain_basic_get_instance_private (SOUP_AUTH_DOMAIN_BASIC (object)); switch (prop_id) { case PROP_AUTH_CALLBACK: @@ -181,7 +179,7 @@ soup_auth_domain_basic_set_auth_callback (SoupAuthDomain *domain, GDestroyNotify dnotify) { SoupAuthDomainBasicPrivate *priv = - SOUP_AUTH_DOMAIN_BASIC_GET_PRIVATE (domain); + soup_auth_domain_basic_get_instance_private (SOUP_AUTH_DOMAIN_BASIC (domain)); if (priv->auth_dnotify) priv->auth_dnotify (priv->auth_data); @@ -234,7 +232,7 @@ soup_auth_domain_basic_accepts (SoupAuthDomain *domain, SoupMessage *msg, const char *header) { SoupAuthDomainBasicPrivate *priv = - SOUP_AUTH_DOMAIN_BASIC_GET_PRIVATE (domain); + soup_auth_domain_basic_get_instance_private (SOUP_AUTH_DOMAIN_BASIC (domain)); char *username, *password; gboolean ok = FALSE; @@ -299,8 +297,6 @@ soup_auth_domain_basic_class_init (SoupAuthDomainBasicClass *basic_class) SOUP_AUTH_DOMAIN_CLASS (basic_class); GObjectClass *object_class = G_OBJECT_CLASS (basic_class); - g_type_class_add_private (basic_class, sizeof (SoupAuthDomainBasicPrivate)); - auth_domain_class->accepts = soup_auth_domain_basic_accepts; auth_domain_class->challenge = soup_auth_domain_basic_challenge; auth_domain_class->check_password = soup_auth_domain_basic_check_password; diff --git a/libsoup/soup-auth-domain-basic.h b/libsoup/soup-auth-domain-basic.h index af80d17e..f1caeb2a 100644 --- a/libsoup/soup-auth-domain-basic.h +++ b/libsoup/soup-auth-domain-basic.h @@ -35,8 +35,10 @@ typedef struct { #define SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK "auth-callback" #define SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA "auth-data" +SOUP_AVAILABLE_IN_2_4 GType soup_auth_domain_basic_get_type (void); +SOUP_AVAILABLE_IN_2_4 SoupAuthDomain *soup_auth_domain_basic_new (const char *optname1, ...) G_GNUC_NULL_TERMINATED; @@ -46,6 +48,7 @@ typedef gboolean (*SoupAuthDomainBasicAuthCallback) (SoupAuthDomain *domain, const char *password, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 void soup_auth_domain_basic_set_auth_callback (SoupAuthDomain *domain, SoupAuthDomainBasicAuthCallback callback, gpointer user_data, diff --git a/libsoup/soup-auth-domain-digest.c b/libsoup/soup-auth-domain-digest.c index ebf3ddb6..8bdb5613 100644 --- a/libsoup/soup-auth-domain-digest.c +++ b/libsoup/soup-auth-domain-digest.c @@ -40,9 +40,7 @@ typedef struct { } SoupAuthDomainDigestPrivate; -#define SOUP_AUTH_DOMAIN_DIGEST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_AUTH_DOMAIN_DIGEST, SoupAuthDomainDigestPrivate)) - -G_DEFINE_TYPE (SoupAuthDomainDigest, soup_auth_domain_digest, SOUP_TYPE_AUTH_DOMAIN) +G_DEFINE_TYPE_WITH_PRIVATE (SoupAuthDomainDigest, soup_auth_domain_digest, SOUP_TYPE_AUTH_DOMAIN) static void soup_auth_domain_digest_init (SoupAuthDomainDigest *digest) @@ -53,7 +51,7 @@ static void soup_auth_domain_digest_finalize (GObject *object) { SoupAuthDomainDigestPrivate *priv = - SOUP_AUTH_DOMAIN_DIGEST_GET_PRIVATE (object); + soup_auth_domain_digest_get_instance_private (SOUP_AUTH_DOMAIN_DIGEST (object)); if (priv->auth_dnotify) priv->auth_dnotify (priv->auth_data); @@ -66,7 +64,7 @@ soup_auth_domain_digest_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { SoupAuthDomainDigestPrivate *priv = - SOUP_AUTH_DOMAIN_DIGEST_GET_PRIVATE (object); + soup_auth_domain_digest_get_instance_private (SOUP_AUTH_DOMAIN_DIGEST (object)); switch (prop_id) { case PROP_AUTH_CALLBACK: @@ -90,7 +88,7 @@ soup_auth_domain_digest_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { SoupAuthDomainDigestPrivate *priv = - SOUP_AUTH_DOMAIN_DIGEST_GET_PRIVATE (object); + soup_auth_domain_digest_get_instance_private (SOUP_AUTH_DOMAIN_DIGEST (object)); switch (prop_id) { case PROP_AUTH_CALLBACK: @@ -145,8 +143,9 @@ soup_auth_domain_digest_new (const char *optname1, ...) * and return the corresponding encoded password (see * soup_auth_domain_digest_encode_password()). * - * Return value: the encoded password, or %NULL if @username is not a - * valid user. @domain will free the password when it is done with it. + * Return value: (nullable): the encoded password, or %NULL if + * @username is not a valid user. @domain will free the password when + * it is done with it. **/ /** @@ -174,7 +173,7 @@ soup_auth_domain_digest_set_auth_callback (SoupAuthDomain *domain, GDestroyNotify dnotify) { SoupAuthDomainDigestPrivate *priv = - SOUP_AUTH_DOMAIN_DIGEST_GET_PRIVATE (domain); + soup_auth_domain_digest_get_instance_private (SOUP_AUTH_DOMAIN_DIGEST (domain)); if (priv->auth_dnotify) priv->auth_dnotify (priv->auth_data); @@ -215,15 +214,20 @@ check_hex_urp (SoupAuthDomain *domain, SoupMessage *msg, return FALSE; } soup_uri_free (dig_uri); - } else { + } else { char *req_path; + char *dig_path; req_path = soup_uri_to_string (req_uri, TRUE); - if (strcmp (uri, req_path) != 0) { + dig_path = soup_uri_decode (uri); + + if (strcmp (dig_path, req_path) != 0) { g_free (req_path); + g_free (dig_path); return FALSE; } g_free (req_path); + g_free (dig_path); } /* Check qop; we only support "auth" for now */ @@ -268,7 +272,7 @@ soup_auth_domain_digest_accepts (SoupAuthDomain *domain, SoupMessage *msg, const char *header) { SoupAuthDomainDigestPrivate *priv = - SOUP_AUTH_DOMAIN_DIGEST_GET_PRIVATE (domain); + soup_auth_domain_digest_get_instance_private (SOUP_AUTH_DOMAIN_DIGEST (domain)); GHashTable *params; const char *username; gboolean accept = FALSE; @@ -399,8 +403,6 @@ soup_auth_domain_digest_class_init (SoupAuthDomainDigestClass *digest_class) SOUP_AUTH_DOMAIN_CLASS (digest_class); GObjectClass *object_class = G_OBJECT_CLASS (digest_class); - g_type_class_add_private (digest_class, sizeof (SoupAuthDomainDigestPrivate)); - auth_domain_class->accepts = soup_auth_domain_digest_accepts; auth_domain_class->challenge = soup_auth_domain_digest_challenge; auth_domain_class->check_password = soup_auth_domain_digest_check_password; diff --git a/libsoup/soup-auth-domain-digest.h b/libsoup/soup-auth-domain-digest.h index 98e1a3aa..8940a18f 100644 --- a/libsoup/soup-auth-domain-digest.h +++ b/libsoup/soup-auth-domain-digest.h @@ -35,8 +35,10 @@ typedef struct { #define SOUP_AUTH_DOMAIN_DIGEST_AUTH_CALLBACK "auth-callback" #define SOUP_AUTH_DOMAIN_DIGEST_AUTH_DATA "auth-data" +SOUP_AVAILABLE_IN_2_4 GType soup_auth_domain_digest_get_type (void); +SOUP_AVAILABLE_IN_2_4 SoupAuthDomain *soup_auth_domain_digest_new (const char *optname1, ...) G_GNUC_NULL_TERMINATED; @@ -45,11 +47,13 @@ typedef char * (*SoupAuthDomainDigestAuthCallback) (SoupAuthDomain *domain, const char *username, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 void soup_auth_domain_digest_set_auth_callback (SoupAuthDomain *domain, SoupAuthDomainDigestAuthCallback callback, gpointer user_data, GDestroyNotify dnotify); +SOUP_AVAILABLE_IN_2_4 char *soup_auth_domain_digest_encode_password (const char *username, const char *realm, const char *password); diff --git a/libsoup/soup-auth-domain.c b/libsoup/soup-auth-domain.c index 2ac37e3a..06c9e643 100644 --- a/libsoup/soup-auth-domain.c +++ b/libsoup/soup-auth-domain.c @@ -69,14 +69,12 @@ typedef struct { } SoupAuthDomainPrivate; -#define SOUP_AUTH_DOMAIN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_AUTH_DOMAIN, SoupAuthDomainPrivate)) - -G_DEFINE_ABSTRACT_TYPE (SoupAuthDomain, soup_auth_domain, G_TYPE_OBJECT) +G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (SoupAuthDomain, soup_auth_domain, G_TYPE_OBJECT) static void soup_auth_domain_init (SoupAuthDomain *domain) { - SoupAuthDomainPrivate *priv = SOUP_AUTH_DOMAIN_GET_PRIVATE (domain); + SoupAuthDomainPrivate *priv = soup_auth_domain_get_instance_private (domain); priv->paths = soup_path_map_new (NULL); } @@ -84,7 +82,7 @@ soup_auth_domain_init (SoupAuthDomain *domain) static void soup_auth_domain_finalize (GObject *object) { - SoupAuthDomainPrivate *priv = SOUP_AUTH_DOMAIN_GET_PRIVATE (object); + SoupAuthDomainPrivate *priv = soup_auth_domain_get_instance_private (SOUP_AUTH_DOMAIN (object)); g_free (priv->realm); soup_path_map_free (priv->paths); @@ -102,7 +100,7 @@ soup_auth_domain_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { SoupAuthDomain *auth_domain = SOUP_AUTH_DOMAIN (object); - SoupAuthDomainPrivate *priv = SOUP_AUTH_DOMAIN_GET_PRIVATE (object); + SoupAuthDomainPrivate *priv = soup_auth_domain_get_instance_private (auth_domain); switch (prop_id) { case PROP_REALM: @@ -150,7 +148,7 @@ static void soup_auth_domain_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - SoupAuthDomainPrivate *priv = SOUP_AUTH_DOMAIN_GET_PRIVATE (object); + SoupAuthDomainPrivate *priv = soup_auth_domain_get_instance_private (SOUP_AUTH_DOMAIN (object)); switch (prop_id) { case PROP_REALM: @@ -182,8 +180,6 @@ soup_auth_domain_class_init (SoupAuthDomainClass *auth_domain_class) { GObjectClass *object_class = G_OBJECT_CLASS (auth_domain_class); - g_type_class_add_private (auth_domain_class, sizeof (SoupAuthDomainPrivate)); - object_class->finalize = soup_auth_domain_finalize; object_class->set_property = soup_auth_domain_set_property; object_class->get_property = soup_auth_domain_get_property; @@ -306,7 +302,7 @@ soup_auth_domain_class_init (SoupAuthDomainClass *auth_domain_class) void soup_auth_domain_add_path (SoupAuthDomain *domain, const char *path) { - SoupAuthDomainPrivate *priv = SOUP_AUTH_DOMAIN_GET_PRIVATE (domain); + SoupAuthDomainPrivate *priv = soup_auth_domain_get_instance_private (domain); /* "" should not match "*" */ if (!*path) @@ -338,7 +334,7 @@ soup_auth_domain_add_path (SoupAuthDomain *domain, const char *path) void soup_auth_domain_remove_path (SoupAuthDomain *domain, const char *path) { - SoupAuthDomainPrivate *priv = SOUP_AUTH_DOMAIN_GET_PRIVATE (domain); + SoupAuthDomainPrivate *priv = soup_auth_domain_get_instance_private (domain); /* "" should not match "*" */ if (!*path) @@ -398,7 +394,7 @@ soup_auth_domain_set_filter (SoupAuthDomain *domain, gpointer filter_data, GDestroyNotify dnotify) { - SoupAuthDomainPrivate *priv = SOUP_AUTH_DOMAIN_GET_PRIVATE (domain); + SoupAuthDomainPrivate *priv = soup_auth_domain_get_instance_private (domain); if (priv->filter_dnotify) priv->filter_dnotify (priv->filter_data); @@ -422,7 +418,7 @@ soup_auth_domain_set_filter (SoupAuthDomain *domain, const char * soup_auth_domain_get_realm (SoupAuthDomain *domain) { - SoupAuthDomainPrivate *priv = SOUP_AUTH_DOMAIN_GET_PRIVATE (domain); + SoupAuthDomainPrivate *priv = soup_auth_domain_get_instance_private (domain); return priv->realm; } @@ -476,7 +472,7 @@ soup_auth_domain_set_generic_auth_callback (SoupAuthDomain *domain, gpointer auth_data, GDestroyNotify dnotify) { - SoupAuthDomainPrivate *priv = SOUP_AUTH_DOMAIN_GET_PRIVATE (domain); + SoupAuthDomainPrivate *priv = soup_auth_domain_get_instance_private (domain); if (priv->auth_dnotify) priv->auth_dnotify (priv->auth_data); @@ -494,7 +490,7 @@ soup_auth_domain_try_generic_auth_callback (SoupAuthDomain *domain, SoupMessage *msg, const char *username) { - SoupAuthDomainPrivate *priv = SOUP_AUTH_DOMAIN_GET_PRIVATE (domain); + SoupAuthDomainPrivate *priv = soup_auth_domain_get_instance_private (domain); if (priv->auth_callback) return priv->auth_callback (domain, msg, username, priv->auth_data); @@ -544,7 +540,7 @@ soup_auth_domain_check_password (SoupAuthDomain *domain, gboolean soup_auth_domain_covers (SoupAuthDomain *domain, SoupMessage *msg) { - SoupAuthDomainPrivate *priv = SOUP_AUTH_DOMAIN_GET_PRIVATE (domain); + SoupAuthDomainPrivate *priv = soup_auth_domain_get_instance_private (domain); const char *path; if (!priv->proxy) { @@ -572,13 +568,13 @@ soup_auth_domain_covers (SoupAuthDomain *domain, SoupMessage *msg) * This is used by #SoupServer internally and is probably of no use to * anyone else. * - * Return value: the username that @msg has authenticated as, if in - * fact it has authenticated. %NULL otherwise. + * Return value: (nullable): the username that @msg has authenticated + * as, if in fact it has authenticated. %NULL otherwise. **/ char * soup_auth_domain_accepts (SoupAuthDomain *domain, SoupMessage *msg) { - SoupAuthDomainPrivate *priv = SOUP_AUTH_DOMAIN_GET_PRIVATE (domain); + SoupAuthDomainPrivate *priv = soup_auth_domain_get_instance_private (domain); const char *header; header = soup_message_headers_get_one (msg->request_headers, @@ -605,7 +601,7 @@ soup_auth_domain_accepts (SoupAuthDomain *domain, SoupMessage *msg) void soup_auth_domain_challenge (SoupAuthDomain *domain, SoupMessage *msg) { - SoupAuthDomainPrivate *priv = SOUP_AUTH_DOMAIN_GET_PRIVATE (domain); + SoupAuthDomainPrivate *priv = soup_auth_domain_get_instance_private (domain); char *challenge; challenge = SOUP_AUTH_DOMAIN_GET_CLASS (domain)->challenge (domain, msg); diff --git a/libsoup/soup-auth-domain.h b/libsoup/soup-auth-domain.h index e3fd3bc1..2bec0961 100644 --- a/libsoup/soup-auth-domain.h +++ b/libsoup/soup-auth-domain.h @@ -59,37 +59,48 @@ typedef gboolean (*SoupAuthDomainGenericAuthCallback) (SoupAuthDomain *domain, const char *username, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 GType soup_auth_domain_get_type (void); +SOUP_AVAILABLE_IN_2_4 void soup_auth_domain_add_path (SoupAuthDomain *domain, const char *path); +SOUP_AVAILABLE_IN_2_4 void soup_auth_domain_remove_path (SoupAuthDomain *domain, const char *path); +SOUP_AVAILABLE_IN_2_4 void soup_auth_domain_set_filter (SoupAuthDomain *domain, SoupAuthDomainFilter filter, gpointer filter_data, GDestroyNotify dnotify); +SOUP_AVAILABLE_IN_2_4 const char *soup_auth_domain_get_realm (SoupAuthDomain *domain); +SOUP_AVAILABLE_IN_2_4 void soup_auth_domain_set_generic_auth_callback (SoupAuthDomain *domain, SoupAuthDomainGenericAuthCallback auth_callback, gpointer auth_data, GDestroyNotify dnotify); +SOUP_AVAILABLE_IN_2_4 gboolean soup_auth_domain_check_password (SoupAuthDomain *domain, SoupMessage *msg, const char *username, const char *password); +SOUP_AVAILABLE_IN_2_4 gboolean soup_auth_domain_covers (SoupAuthDomain *domain, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 char *soup_auth_domain_accepts (SoupAuthDomain *domain, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_auth_domain_challenge (SoupAuthDomain *domain, SoupMessage *msg); /* protected */ +SOUP_AVAILABLE_IN_2_4 gboolean soup_auth_domain_try_generic_auth_callback (SoupAuthDomain *domain, SoupMessage *msg, const char *username); diff --git a/libsoup/soup-auth-manager.c b/libsoup/soup-auth-manager.c index f40a9282..62fe9c40 100644 --- a/libsoup/soup-auth-manager.c +++ b/libsoup/soup-auth-manager.c @@ -60,9 +60,6 @@ enum { static guint signals[LAST_SIGNAL] = { 0 }; -G_DEFINE_TYPE_WITH_CODE (SoupAuthManager, soup_auth_manager, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (SOUP_TYPE_SESSION_FEATURE, - soup_auth_manager_session_feature_init)) struct SoupAuthManagerPrivate { SoupSession *session; @@ -80,6 +77,11 @@ typedef struct { GHashTable *auths; /* scheme:realm -> SoupAuth */ } SoupAuthHost; +G_DEFINE_TYPE_WITH_CODE (SoupAuthManager, soup_auth_manager, G_TYPE_OBJECT, + G_ADD_PRIVATE (SoupAuthManager) + G_IMPLEMENT_INTERFACE (SOUP_TYPE_SESSION_FEATURE, + soup_auth_manager_session_feature_init)) + static void soup_auth_host_free (SoupAuthHost *host); static SoupAuth *record_auth_for_uri (SoupAuthManagerPrivate *priv, SoupURI *uri, SoupAuth *auth, @@ -90,7 +92,7 @@ soup_auth_manager_init (SoupAuthManager *manager) { SoupAuthManagerPrivate *priv; - priv = manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (manager, SOUP_TYPE_AUTH_MANAGER, SoupAuthManagerPrivate); + priv = manager->priv = soup_auth_manager_get_instance_private (manager); priv->auth_types = g_ptr_array_new_with_free_func ((GDestroyNotify)g_type_class_unref); priv->auth_hosts = g_hash_table_new_full (soup_uri_host_hash, @@ -121,8 +123,6 @@ soup_auth_manager_class_init (SoupAuthManagerClass *auth_manager_class) { GObjectClass *object_class = G_OBJECT_CLASS (auth_manager_class); - g_type_class_add_private (auth_manager_class, sizeof (SoupAuthManagerPrivate)); - object_class->finalize = soup_auth_manager_finalize; /** @@ -190,7 +190,7 @@ soup_auth_manager_remove_feature (SoupSessionFeature *feature, GType type) { SoupAuthManagerPrivate *priv = SOUP_AUTH_MANAGER (feature)->priv; SoupAuthClass *auth_class; - int i; + guint i; if (!g_type_is_a (type, SOUP_TYPE_AUTH)) return FALSE; @@ -215,7 +215,7 @@ soup_auth_manager_has_feature (SoupSessionFeature *feature, GType type) { SoupAuthManagerPrivate *priv = SOUP_AUTH_MANAGER (feature)->priv; SoupAuthClass *auth_class; - int i; + guint i; if (!g_type_is_a (type, SOUP_TYPE_AUTH)) return FALSE; @@ -354,7 +354,7 @@ create_auth (SoupAuthManagerPrivate *priv, SoupMessage *msg) const char *header; SoupAuthClass *auth_class; char *challenge = NULL; - SoupAuth *auth; + SoupAuth *auth = NULL; int i; header = auth_header_for_message (msg); @@ -364,14 +364,14 @@ create_auth (SoupAuthManagerPrivate *priv, SoupMessage *msg) for (i = priv->auth_types->len - 1; i >= 0; i--) { auth_class = priv->auth_types->pdata[i]; challenge = soup_auth_manager_extract_challenge (header, auth_class->scheme_name); - if (challenge) + if (!challenge) + continue; + auth = soup_auth_new (G_TYPE_FROM_CLASS (auth_class), msg, challenge); + g_free (challenge); + if (auth) break; } - if (!challenge) - return NULL; - auth = soup_auth_new (G_TYPE_FROM_CLASS (auth_class), msg, challenge); - g_free (challenge); return auth; } @@ -440,11 +440,40 @@ make_auto_ntlm_auth (SoupAuthManagerPrivate *priv, SoupAuthHost *host) return TRUE; } +static void +update_authorization_header (SoupMessage *msg, SoupAuth *auth, gboolean is_proxy) +{ + const char *authorization_header = is_proxy ? "Proxy-Authorization" : "Authorization"; + char *token; + + if (soup_message_get_auth (msg)) + soup_message_headers_remove (msg->request_headers, authorization_header); + + if (!auth) + return; + + token = soup_auth_get_authorization (auth, msg); + if (!token) + return; + + soup_message_headers_replace (msg->request_headers, authorization_header, token); + g_free (token); +} + static SoupAuth * lookup_auth (SoupAuthManagerPrivate *priv, SoupMessage *msg) { SoupAuthHost *host; const char *path, *realm; + SoupAuth *auth; + + /* If the message already has a ready auth, use that instead */ + auth = soup_message_get_auth (msg); + if (auth && soup_auth_is_ready (auth, msg)) + return auth; + + if (soup_message_get_flags (msg) & SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE) + return NULL; host = get_auth_host_for_uri (priv, soup_message_get_uri (msg)); if (!host->auth_realms && !make_auto_ntlm_auth (priv, host)) @@ -456,8 +485,24 @@ lookup_auth (SoupAuthManagerPrivate *priv, SoupMessage *msg) realm = soup_path_map_lookup (host->auth_realms, path); if (realm) return g_hash_table_lookup (host->auths, realm); - else + + return NULL; +} + +static SoupAuth * +lookup_proxy_auth (SoupAuthManagerPrivate *priv, SoupMessage *msg) +{ + SoupAuth *auth; + + /* If the message already has a ready auth, use that instead */ + auth = soup_message_get_proxy_auth (msg); + if (auth && soup_auth_is_ready (auth, msg)) + return auth; + + if (soup_message_get_flags (msg) & SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE) return NULL; + + return priv->proxy_auth; } static void @@ -468,18 +513,21 @@ authenticate_auth (SoupAuthManager *manager, SoupAuth *auth, SoupAuthManagerPrivate *priv = manager->priv; SoupURI *uri; + if (!soup_auth_can_authenticate (auth)) + return; + if (proxy) { SoupMessageQueue *queue; SoupMessageQueueItem *item; queue = soup_session_get_queue (priv->session); item = soup_message_queue_lookup (queue, msg); - if (item) { - uri = soup_connection_get_proxy_uri (item->conn); - soup_message_queue_item_unref (item); - } else - uri = NULL; + if (!item) + return; + /* When loaded from the disk cache, the connection is NULL. */ + uri = item->conn ? soup_connection_get_proxy_uri (item->conn) : NULL; + soup_message_queue_item_unref (item); if (!uri) return; } else @@ -552,7 +600,7 @@ static void auth_got_headers (SoupMessage *msg, gpointer manager) { SoupAuthManagerPrivate *priv = SOUP_AUTH_MANAGER (manager)->priv; - SoupAuth *auth, *prior_auth, *new_auth; + SoupAuth *auth, *prior_auth; gboolean prior_auth_failed = FALSE; g_mutex_lock (&priv->lock); @@ -571,13 +619,20 @@ auth_got_headers (SoupMessage *msg, gpointer manager) } } - new_auth = record_auth_for_uri (priv, soup_message_get_uri (msg), - auth, prior_auth_failed); - g_object_unref (auth); + if (!(soup_message_get_flags (msg) & SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE)) { + SoupAuth *new_auth; + + new_auth = record_auth_for_uri (priv, soup_message_get_uri (msg), + auth, prior_auth_failed); + g_object_unref (auth); + auth = g_object_ref (new_auth); + } /* If we need to authenticate, try to do it. */ - authenticate_auth (manager, new_auth, msg, + authenticate_auth (manager, auth, msg, prior_auth_failed, FALSE, TRUE); + soup_message_set_auth (msg, auth); + g_object_unref (auth); g_mutex_unlock (&priv->lock); } @@ -597,6 +652,12 @@ auth_got_body (SoupMessage *msg, gpointer manager) soup_message_set_flags (msg, flags & ~SOUP_MESSAGE_NEW_CONNECTION); } + /* When not using cached credentials, update the Authorization header + * right before requeuing the message. + */ + if (soup_message_get_flags (msg) & SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE) + update_authorization_header (msg, auth, FALSE); + soup_session_requeue_message (priv->session, msg); } g_mutex_unlock (&priv->lock); @@ -606,7 +667,7 @@ static void proxy_auth_got_headers (SoupMessage *msg, gpointer manager) { SoupAuthManagerPrivate *priv = SOUP_AUTH_MANAGER (manager)->priv; - SoupAuth *prior_auth; + SoupAuth *auth = NULL, *prior_auth; gboolean prior_auth_failed = FALSE; g_mutex_lock (&priv->lock); @@ -618,17 +679,24 @@ proxy_auth_got_headers (SoupMessage *msg, gpointer manager) prior_auth_failed = TRUE; } - if (!priv->proxy_auth) { - priv->proxy_auth = create_auth (priv, msg); - if (!priv->proxy_auth) { + if (!(soup_message_get_flags (msg) & SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE)) + auth = priv->proxy_auth ? g_object_ref (priv->proxy_auth) : NULL; + + if (!auth) { + auth = create_auth (priv, msg); + if (!auth) { g_mutex_unlock (&priv->lock); return; } + if (!(soup_message_get_flags (msg) & SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE)) + priv->proxy_auth = g_object_ref (auth); } /* If we need to authenticate, try to do it. */ - authenticate_auth (manager, priv->proxy_auth, msg, + authenticate_auth (manager, auth, msg, prior_auth_failed, TRUE, TRUE); + soup_message_set_proxy_auth (msg, auth); + g_object_unref (auth); g_mutex_unlock (&priv->lock); } @@ -639,43 +707,29 @@ proxy_auth_got_body (SoupMessage *msg, gpointer manager) SoupAuth *auth; g_mutex_lock (&priv->lock); - auth = priv->proxy_auth; - if (auth && soup_auth_is_ready (auth, msg)) + auth = lookup_proxy_auth (priv, msg); + if (auth && soup_auth_is_ready (auth, msg)) { + /* When not using cached credentials, update the Authorization header + * right before requeuing the message. + */ + if (soup_message_get_flags (msg) & SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE) + update_authorization_header (msg, auth, TRUE); soup_session_requeue_message (priv->session, msg); - g_mutex_unlock (&priv->lock); -} - -static void -soup_auth_manager_request_queued (SoupSessionFeature *manager, - SoupSession *session, - SoupMessage *msg) -{ - soup_message_add_status_code_handler ( - msg, "got_headers", SOUP_STATUS_UNAUTHORIZED, - G_CALLBACK (auth_got_headers), manager); - soup_message_add_status_code_handler ( - msg, "got_body", SOUP_STATUS_UNAUTHORIZED, - G_CALLBACK (auth_got_body), manager); + } - soup_message_add_status_code_handler ( - msg, "got_headers", SOUP_STATUS_PROXY_UNAUTHORIZED, - G_CALLBACK (proxy_auth_got_headers), manager); - soup_message_add_status_code_handler ( - msg, "got_body", SOUP_STATUS_PROXY_UNAUTHORIZED, - G_CALLBACK (proxy_auth_got_body), manager); + g_mutex_unlock (&priv->lock); } static void -soup_auth_manager_request_started (SoupSessionFeature *feature, - SoupSession *session, - SoupMessage *msg, - SoupSocket *socket) +auth_msg_starting (SoupMessage *msg, gpointer manager) { - SoupAuthManager *manager = SOUP_AUTH_MANAGER (feature); - SoupAuthManagerPrivate *priv = manager->priv; + SoupAuthManagerPrivate *priv = SOUP_AUTH_MANAGER (manager)->priv; SoupAuth *auth; + if (soup_message_get_flags (msg) & SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE) + return; + g_mutex_lock (&priv->lock); if (msg->method != SOUP_METHOD_CONNECT) { @@ -686,19 +740,44 @@ soup_auth_manager_request_started (SoupSessionFeature *feature, auth = NULL; } soup_message_set_auth (msg, auth); + update_authorization_header (msg, auth, FALSE); } - auth = priv->proxy_auth; + auth = lookup_proxy_auth (priv, msg); if (auth) { authenticate_auth (manager, auth, msg, FALSE, TRUE, FALSE); if (!soup_auth_is_ready (auth, msg)) auth = NULL; } soup_message_set_proxy_auth (msg, auth); + update_authorization_header (msg, auth, TRUE); g_mutex_unlock (&priv->lock); } +static void +soup_auth_manager_request_queued (SoupSessionFeature *manager, + SoupSession *session, + SoupMessage *msg) +{ + g_signal_connect (msg, "starting", + G_CALLBACK (auth_msg_starting), manager); + + soup_message_add_status_code_handler ( + msg, "got_headers", SOUP_STATUS_UNAUTHORIZED, + G_CALLBACK (auth_got_headers), manager); + soup_message_add_status_code_handler ( + msg, "got_body", SOUP_STATUS_UNAUTHORIZED, + G_CALLBACK (auth_got_body), manager); + + soup_message_add_status_code_handler ( + msg, "got_headers", SOUP_STATUS_PROXY_UNAUTHORIZED, + G_CALLBACK (proxy_auth_got_headers), manager); + soup_message_add_status_code_handler ( + msg, "got_body", SOUP_STATUS_PROXY_UNAUTHORIZED, + G_CALLBACK (proxy_auth_got_body), manager); +} + static void soup_auth_manager_request_unqueued (SoupSessionFeature *manager, SoupSession *session, @@ -738,6 +817,27 @@ soup_auth_manager_use_auth (SoupAuthManager *manager, g_mutex_unlock (&priv->lock); } +/** + * soup_auth_manager_clear_cached_credentials: + * @manager: a #SoupAuthManager + * + * Clear all credentials cached by @manager + * + * Since: 2.58 + */ +void +soup_auth_manager_clear_cached_credentials (SoupAuthManager *manager) +{ + SoupAuthManagerPrivate *priv; + + g_return_if_fail (SOUP_IS_AUTH_MANAGER (manager)); + + priv = manager->priv; + g_mutex_lock (&priv->lock); + g_hash_table_remove_all (priv->auth_hosts); + g_mutex_unlock (&priv->lock); +} + static void soup_auth_manager_session_feature_init (SoupSessionFeatureInterface *feature_interface, gpointer interface_data) @@ -747,7 +847,6 @@ soup_auth_manager_session_feature_init (SoupSessionFeatureInterface *feature_int feature_interface->attach = soup_auth_manager_attach; feature_interface->request_queued = soup_auth_manager_request_queued; - feature_interface->request_started = soup_auth_manager_request_started; feature_interface->request_unqueued = soup_auth_manager_request_unqueued; feature_interface->add_feature = soup_auth_manager_add_feature; feature_interface->remove_feature = soup_auth_manager_remove_feature; diff --git a/libsoup/soup-auth-manager.h b/libsoup/soup-auth-manager.h index c1fcc6e6..c935d994 100644 --- a/libsoup/soup-auth-manager.h +++ b/libsoup/soup-auth-manager.h @@ -33,12 +33,17 @@ typedef struct { SoupAuth *auth, gboolean retrying); } SoupAuthManagerClass; +SOUP_AVAILABLE_IN_2_4 GType soup_auth_manager_get_type (void); +SOUP_AVAILABLE_IN_2_4 void soup_auth_manager_use_auth (SoupAuthManager *manager, SoupURI *uri, SoupAuth *auth); +SOUP_AVAILABLE_IN_2_58 +void soup_auth_manager_clear_cached_credentials (SoupAuthManager *manager); + G_END_DECLS #endif /* SOUP_AUTH_MANAGER_H */ diff --git a/libsoup/soup-auth-negotiate.c b/libsoup/soup-auth-negotiate.c new file mode 100644 index 00000000..1fdf142d --- /dev/null +++ b/libsoup/soup-auth-negotiate.c @@ -0,0 +1,622 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * soup-auth-negotiate.c: HTTP Negotiate Authentication helper + * + * Copyright (C) 2009,2013 Guido Guenther + * Copyright (C) 2016 Red Hat, Inc. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + +#ifdef LIBSOUP_HAVE_GSSAPI +#include +#endif /* LIBSOUP_HAVE_GSSAPI */ + +#include "soup-auth-negotiate.h" +#include "soup-headers.h" +#include "soup-message.h" +#include "soup-message-private.h" +#include "soup-misc-private.h" +#include "soup-uri.h" + +/** + * soup_auth_negotiate_supported: + * + * Indicates whether libsoup was built with GSSAPI support. If this is + * %FALSE, %SOUP_TYPE_AUTH_NEGOTIATE will still be defined and can + * still be added to a #SoupSession, but libsoup will never attempt to + * actually use this auth type. + * + * Since: 2.54 + */ +gboolean +soup_auth_negotiate_supported (void) +{ +#ifdef LIBSOUP_HAVE_GSSAPI + return TRUE; +#else + return FALSE; +#endif +} + +#define AUTH_GSS_ERROR -1 +#define AUTH_GSS_COMPLETE 1 +#define AUTH_GSS_CONTINUE 0 + +typedef enum { + SOUP_NEGOTIATE_NEW, + SOUP_NEGOTIATE_RECEIVED_CHALLENGE, /* received initial negotiate header */ + SOUP_NEGOTIATE_SENT_RESPONSE, /* sent response to server */ + SOUP_NEGOTIATE_FAILED +} SoupNegotiateState; + +typedef struct { + gboolean initialized; + gchar *response_header; + +#ifdef LIBSOUP_HAVE_GSSAPI + gss_ctx_id_t context; + gss_name_t server_name; +#endif + + SoupNegotiateState state; +} SoupNegotiateConnectionState; + +typedef struct { + gboolean is_authenticated; +} SoupAuthNegotiatePrivate; + +/** + * SOUP_TYPE_AUTH_NEGOTIATE: + * + * A #GType corresponding to HTTP-based GSS-Negotiate authentication. + * #SoupSessions do not support this type by default; if you want to + * enable support for it, call soup_session_add_feature_by_type(), + * passing %SOUP_TYPE_AUTH_NEGOTIATE. + * + * This auth type will only work if libsoup was compiled with GSSAPI + * support; you can check soup_auth_negotiate_supported() to see if it + * was. + * + * Since: 2.54 + */ +G_DEFINE_TYPE_WITH_PRIVATE (SoupAuthNegotiate, soup_auth_negotiate, SOUP_TYPE_CONNECTION_AUTH) + +#ifdef LIBSOUP_HAVE_GSSAPI +static gboolean check_auth_trusted_uri (SoupConnectionAuth *auth, + SoupMessage *msg); +static gboolean soup_gss_build_response (SoupNegotiateConnectionState *conn, + SoupAuth *auth, GError **err); +static void soup_gss_client_cleanup (SoupNegotiateConnectionState *conn); +static gboolean soup_gss_client_init (SoupNegotiateConnectionState *conn, + const char *host, GError **err); +static int soup_gss_client_step (SoupNegotiateConnectionState *conn, + const char *host, GError **err); + +static GSList *trusted_uris; +static GSList *blacklisted_uris; + +static void parse_uris_from_env_variable (const gchar *env_variable, GSList **list); + +static void check_server_response (SoupMessage *msg, gpointer auth); + +static const char spnego_OID[] = "\x2b\x06\x01\x05\x05\x02"; +static const gss_OID_desc gss_mech_spnego = { sizeof (spnego_OID) - 1, (void *) &spnego_OID }; + +static gpointer +soup_auth_negotiate_create_connection_state (SoupConnectionAuth *auth) +{ + SoupNegotiateConnectionState *conn; + + conn = g_slice_new0 (SoupNegotiateConnectionState); + conn->state = SOUP_NEGOTIATE_NEW; + + return conn; +} + +static void +free_connection_state_data (SoupNegotiateConnectionState *conn) +{ + soup_gss_client_cleanup (conn); + g_free (conn->response_header); +} + +static void +soup_auth_negotiate_free_connection_state (SoupConnectionAuth *auth, + gpointer state) +{ + SoupNegotiateConnectionState *conn = state; + + free_connection_state_data (conn); + + g_slice_free (SoupNegotiateConnectionState, conn); +} + +static GSList * +soup_auth_negotiate_get_protection_space (SoupAuth *auth, SoupURI *source_uri) +{ + char *space, *p; + + space = g_strdup (source_uri->path); + + /* Strip filename component */ + p = strrchr (space, '/'); + if (p && p == space && p[1]) + p[1] = '\0'; + else if (p && p[1]) + *p = '\0'; + + return g_slist_prepend (NULL, space); +} + +static void +soup_auth_negotiate_authenticate (SoupAuth *auth, const char *username, + const char *password) +{ + SoupAuthNegotiate *negotiate = SOUP_AUTH_NEGOTIATE (auth); + SoupAuthNegotiatePrivate *priv = soup_auth_negotiate_get_instance_private (negotiate); + + /* It is not possible to authenticate with username and password. */ + priv->is_authenticated = FALSE; +} + +static gboolean +soup_auth_negotiate_is_authenticated (SoupAuth *auth) +{ + SoupAuthNegotiate *negotiate = SOUP_AUTH_NEGOTIATE (auth); + SoupAuthNegotiatePrivate *priv = soup_auth_negotiate_get_instance_private (negotiate); + + /* We are authenticated just in case we received the GSS_S_COMPLETE. */ + return priv->is_authenticated; +} + +static gboolean +soup_auth_negotiate_can_authenticate (SoupAuth *auth) +{ + return FALSE; +} + +static char * +soup_auth_negotiate_get_connection_authorization (SoupConnectionAuth *auth, + SoupMessage *msg, + gpointer state) +{ + SoupNegotiateConnectionState *conn = state; + char *header = NULL; + + if (conn->state == SOUP_NEGOTIATE_NEW) { + GError *err = NULL; + + if (!check_auth_trusted_uri (auth, msg)) { + conn->state = SOUP_NEGOTIATE_FAILED; + return NULL; + } + + if (!soup_gss_build_response (conn, SOUP_AUTH (auth), &err)) { + /* FIXME: report further upward via + * soup_message_get_error_message */ + if (conn->initialized) + g_warning ("gssapi step failed: %s", err->message); + else + g_warning ("gssapi init failed: %s", err->message); + conn->state = SOUP_NEGOTIATE_FAILED; + g_clear_error (&err); + + return NULL; + } + } + + if (conn->response_header) { + header = conn->response_header; + conn->response_header = NULL; + conn->state = SOUP_NEGOTIATE_SENT_RESPONSE; + } + + return header; +} + +static gboolean +soup_auth_negotiate_is_connection_ready (SoupConnectionAuth *auth, + SoupMessage *msg, + gpointer state) +{ + SoupNegotiateConnectionState *conn = state; + + return conn->state != SOUP_NEGOTIATE_FAILED; +} +#endif /* LIBSOUP_HAVE_GSSAPI */ + +static gboolean +soup_auth_negotiate_update_connection (SoupConnectionAuth *auth, SoupMessage *msg, + const char *header, gpointer state) +{ +#ifdef LIBSOUP_HAVE_GSSAPI + gboolean success = TRUE; + SoupNegotiateConnectionState *conn = state; + GError *err = NULL; + + if (!check_auth_trusted_uri (auth, msg)) { + conn->state = SOUP_NEGOTIATE_FAILED; + goto out; + } + + /* Found negotiate header with no token, start negotiate */ + if (strcmp (header, "Negotiate") == 0) { + /* If we were already negotiating and we get a 401 + * with no token, start again. */ + if (conn->state == SOUP_NEGOTIATE_SENT_RESPONSE) { + free_connection_state_data (conn); + conn->initialized = FALSE; + } + + conn->state = SOUP_NEGOTIATE_RECEIVED_CHALLENGE; + if (soup_gss_build_response (conn, SOUP_AUTH (auth), &err)) { + /* Connect the signal only once per message */ + if (!g_object_get_data (G_OBJECT (msg), "negotiate-got-headers-connected")) { + /* Wait for the 2xx response to verify server response */ + g_signal_connect_data (msg, + "got_headers", + G_CALLBACK (check_server_response), + g_object_ref (auth), + (GClosureNotify) g_object_unref, + 0); + /* Mark that the signal was connected */ + g_object_set_data (G_OBJECT (msg), + "negotiate-got-headers-connected", + GINT_TO_POINTER (1)); + } + goto out; + } else { + /* FIXME: report further upward via + * soup_message_get_error_message */ + if (conn->initialized) + g_warning ("gssapi step failed: %s", err->message); + else + g_warning ("gssapi init failed: %s", err->message); + success = FALSE; + } + } else if (!strncmp (header, "Negotiate ", 10)) { + if (soup_gss_client_step (conn, header + 10, &err) == AUTH_GSS_CONTINUE) { + conn->state = SOUP_NEGOTIATE_RECEIVED_CHALLENGE; + goto out; + } + } + + conn->state = SOUP_NEGOTIATE_FAILED; + out: + g_clear_error (&err); + return success; +#else + return FALSE; +#endif /* LIBSOUP_HAVE_GSSAPI */ +} + +static void +soup_auth_negotiate_init (SoupAuthNegotiate *negotiate) +{ + g_object_set (G_OBJECT (negotiate), SOUP_AUTH_REALM, "", NULL); +} + +static void +soup_auth_negotiate_class_init (SoupAuthNegotiateClass *auth_negotiate_class) +{ + SoupAuthClass *auth_class = SOUP_AUTH_CLASS (auth_negotiate_class); + SoupConnectionAuthClass *conn_auth_class = + SOUP_CONNECTION_AUTH_CLASS (auth_negotiate_class); + + auth_class->scheme_name = "Negotiate"; + auth_class->strength = 0; + + conn_auth_class->update_connection = soup_auth_negotiate_update_connection; +#ifdef LIBSOUP_HAVE_GSSAPI + auth_class->strength = 7; + + conn_auth_class->create_connection_state = soup_auth_negotiate_create_connection_state; + conn_auth_class->free_connection_state = soup_auth_negotiate_free_connection_state; + conn_auth_class->get_connection_authorization = soup_auth_negotiate_get_connection_authorization; + conn_auth_class->is_connection_ready = soup_auth_negotiate_is_connection_ready; + + auth_class->get_protection_space = soup_auth_negotiate_get_protection_space; + auth_class->authenticate = soup_auth_negotiate_authenticate; + auth_class->is_authenticated = soup_auth_negotiate_is_authenticated; + auth_class->can_authenticate = soup_auth_negotiate_can_authenticate; + + parse_uris_from_env_variable ("SOUP_GSSAPI_TRUSTED_URIS", &trusted_uris); + parse_uris_from_env_variable ("SOUP_GSSAPI_BLACKLISTED_URIS", &blacklisted_uris); +#endif /* LIBSOUP_HAVE_GSSAPI */ +} + +#ifdef LIBSOUP_HAVE_GSSAPI +static void +check_server_response (SoupMessage *msg, gpointer auth) +{ + gint ret; + const char *auth_headers; + GError *err = NULL; + SoupAuthNegotiate *negotiate = auth; + SoupAuthNegotiatePrivate *priv = soup_auth_negotiate_get_instance_private (negotiate); + SoupNegotiateConnectionState *conn; + + conn = soup_connection_auth_get_connection_state_for_message (SOUP_CONNECTION_AUTH (auth), msg); + if (!conn) + return; + + if (auth != soup_message_get_auth (msg)) + return; + + if (msg->status_code == SOUP_STATUS_UNAUTHORIZED) + return; + + /* FIXME: need to check for proxy-auth too */ + auth_headers = soup_message_headers_get_one (msg->response_headers, + "WWW-Authenticate"); + if (!auth_headers || g_ascii_strncasecmp (auth_headers, "Negotiate ", 10) != 0) { + g_warning ("Failed to parse auth header"); + conn->state = SOUP_NEGOTIATE_FAILED; + goto out; + } + + ret = soup_gss_client_step (conn, auth_headers + 10, &err); + + switch (ret) { + case AUTH_GSS_COMPLETE: + priv->is_authenticated = TRUE; + break; + case AUTH_GSS_CONTINUE: + conn->state = SOUP_NEGOTIATE_RECEIVED_CHALLENGE; + break; + case AUTH_GSS_ERROR: + if (err) + g_warning ("%s", err->message); + /* Unfortunately, so many programs (curl, Firefox, ..) ignore + * the return token that is included in the response, so it is + * possible that there are servers that send back broken stuff. + * Try to behave in the right way (pass the token to + * gss_init_sec_context()), show a warning, but don't fail + * if the server returned 200. */ + if (msg->status_code == SOUP_STATUS_OK) + priv->is_authenticated = TRUE; + else + conn->state = SOUP_NEGOTIATE_FAILED; + break; + default: + conn->state = SOUP_NEGOTIATE_FAILED; + } + out: + g_clear_error (&err); +} + +/* Check if scheme://host:port from message matches the given URI. */ +static gint +match_base_uri (SoupURI *list_uri, SoupURI *msg_uri) +{ + if (msg_uri->scheme != list_uri->scheme) + return 1; + + if (list_uri->port && (msg_uri->port != list_uri->port)) + return 1; + + if (list_uri->host) + return !soup_host_matches_host (msg_uri->host, list_uri->host); + + return 0; +} + +/* Parses a comma separated list of URIS from the environment. */ +static void +parse_uris_from_env_variable (const gchar *env_variable, GSList **list) +{ + gchar **uris = NULL; + const gchar *env; + gint i; + guint length; + + /* Initialize the list */ + *list = NULL; + + if (!(env = g_getenv (env_variable))) + return; + + if (!(uris = g_strsplit (env, ",", -1))) + return; + + length = g_strv_length (uris); + for (i = 0; i < length; i++) { + SoupURI *uri; + + /* If the supplied URI is valid, append it to the list */ + if ((uri = soup_uri_new (uris[i]))) + *list = g_slist_prepend (*list, uri); + } + + g_strfreev (uris); +} + +static gboolean +check_auth_trusted_uri (SoupConnectionAuth *auth, SoupMessage *msg) +{ + SoupURI *msg_uri; + GSList *matched = NULL; + + g_return_val_if_fail (auth != NULL, FALSE); + g_return_val_if_fail (msg != NULL, FALSE); + + msg_uri = soup_message_get_uri (msg); + + /* First check if the URI is not on blacklist */ + if (blacklisted_uris && + g_slist_find_custom (blacklisted_uris, msg_uri, (GCompareFunc) match_base_uri)) + return FALSE; + + /* If no trusted URIs are set, we allow all HTTPS URIs */ + if (!trusted_uris) + return soup_uri_is_https (msg_uri, NULL); + + matched = g_slist_find_custom (trusted_uris, + msg_uri, + (GCompareFunc) match_base_uri); + + return matched ? TRUE : FALSE; +} + +static gboolean +soup_gss_build_response (SoupNegotiateConnectionState *conn, SoupAuth *auth, GError **err) +{ + if (!conn->initialized) + if (!soup_gss_client_init (conn, soup_auth_get_host (auth), err)) + return FALSE; + + if (soup_gss_client_step (conn, "", err) != AUTH_GSS_CONTINUE) + return FALSE; + + return TRUE; +} + +static void +soup_gss_error (OM_uint32 err_maj, OM_uint32 err_min, GError **err) +{ + OM_uint32 maj_stat, min_stat, msg_ctx = 0; + gss_buffer_desc status; + gchar *buf_maj = NULL, *buf_min = NULL; + + do { + maj_stat = gss_display_status (&min_stat, + err_maj, + GSS_C_GSS_CODE, + (gss_OID) &gss_mech_spnego, + &msg_ctx, + &status); + if (GSS_ERROR (maj_stat)) + break; + + buf_maj = g_strdup ((gchar *) status.value); + gss_release_buffer (&min_stat, &status); + + maj_stat = gss_display_status (&min_stat, + err_min, + GSS_C_MECH_CODE, + GSS_C_NULL_OID, + &msg_ctx, + &status); + if (!GSS_ERROR (maj_stat)) { + buf_min = g_strdup ((gchar *) status.value); + gss_release_buffer (&min_stat, &status); + } + + if (err && *err == NULL) { + g_set_error (err, + SOUP_HTTP_ERROR, + SOUP_STATUS_UNAUTHORIZED, + "%s: %s", + buf_maj, + buf_min ? buf_min : ""); + } + g_free (buf_maj); + g_free (buf_min); + buf_min = buf_maj = NULL; + } while (!GSS_ERROR (maj_stat) && msg_ctx != 0); +} + +static gboolean +soup_gss_client_init (SoupNegotiateConnectionState *conn, const gchar *host, GError **err) +{ + OM_uint32 maj_stat, min_stat; + gchar *service = NULL; + gss_buffer_desc token = GSS_C_EMPTY_BUFFER; + gboolean ret = FALSE; + gchar *h; + + conn->server_name = GSS_C_NO_NAME; + conn->context = GSS_C_NO_CONTEXT; + + h = g_ascii_strdown (host, -1); + service = g_strconcat ("HTTP@", h, NULL); + token.length = strlen (service); + token.value = (gchar *) service; + + maj_stat = gss_import_name (&min_stat, + &token, + (gss_OID) GSS_C_NT_HOSTBASED_SERVICE, + &conn->server_name); + + if (GSS_ERROR (maj_stat)) { + soup_gss_error (maj_stat, min_stat, err); + ret = FALSE; + goto out; + } + + conn->initialized = TRUE; + ret = TRUE; +out: + g_free (h); + g_free (service); + return ret; +} + +static gint +soup_gss_client_step (SoupNegotiateConnectionState *conn, const gchar *challenge, GError **err) +{ + OM_uint32 maj_stat, min_stat; + gss_buffer_desc in = GSS_C_EMPTY_BUFFER; + gss_buffer_desc out = GSS_C_EMPTY_BUFFER; + gint ret = AUTH_GSS_CONTINUE; + + g_clear_pointer (&conn->response_header, g_free); + + if (challenge && *challenge) { + size_t len; + in.value = g_base64_decode (challenge, &len); + in.length = len; + } + + maj_stat = gss_init_sec_context (&min_stat, + GSS_C_NO_CREDENTIAL, + &conn->context, + conn->server_name, + (gss_OID) &gss_mech_spnego, + GSS_C_MUTUAL_FLAG, + GSS_C_INDEFINITE, + GSS_C_NO_CHANNEL_BINDINGS, + &in, + NULL, + &out, + NULL, + NULL); + + if ((maj_stat != GSS_S_COMPLETE) && (maj_stat != GSS_S_CONTINUE_NEEDED)) { + soup_gss_error (maj_stat, min_stat, err); + ret = AUTH_GSS_ERROR; + goto out; + } + + ret = (maj_stat == GSS_S_COMPLETE) ? AUTH_GSS_COMPLETE : AUTH_GSS_CONTINUE; + if (out.length) { + gchar *response = g_base64_encode ((const guchar *) out.value, out.length); + conn->response_header = g_strconcat ("Negotiate ", response, NULL); + g_free (response); + maj_stat = gss_release_buffer (&min_stat, &out); + } + +out: + if (out.value) + gss_release_buffer (&min_stat, &out); + if (in.value) + g_free (in.value); + return ret; +} + +static void +soup_gss_client_cleanup (SoupNegotiateConnectionState *conn) +{ + OM_uint32 maj_stat, min_stat; + + gss_release_name (&min_stat, &conn->server_name); + maj_stat = gss_delete_sec_context (&min_stat, &conn->context, GSS_C_NO_BUFFER); + if (maj_stat != GSS_S_COMPLETE) + maj_stat = gss_delete_sec_context (&min_stat, &conn->context, GSS_C_NO_BUFFER); +} +#endif /* LIBSOUP_HAVE_GSSAPI */ diff --git a/libsoup/soup-auth-negotiate.h b/libsoup/soup-auth-negotiate.h new file mode 100644 index 00000000..e9766449 --- /dev/null +++ b/libsoup/soup-auth-negotiate.h @@ -0,0 +1,28 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Copyright (C) 2010 Guido Guenther + * Copyright (C) 2016 Red Hat, Inc. + */ + +#ifndef SOUP_AUTH_NEGOTIATE_H +#define SOUP_AUTH_NEGOTIATE_H 1 + +#include "soup-connection-auth.h" + +#define SOUP_AUTH_NEGOTIATE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SOUP_TYPE_AUTH_NEGOTIATE, SoupAuthNegotiate)) +#define SOUP_AUTH_NEGOTIATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_AUTH_NEGOTIATE, SoupAuthNegotiateClass)) +#define SOUP_IS_AUTH_NEGOTIATE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SOUP_TYPE_AUTH_NEGOTIATE)) +#define SOUP_IS_AUTH_NEGOTIATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SOUP_TYPE_AUTH_NEGOTIATE)) +#define SOUP_AUTH_NEGOTIATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_AUTH_NEGOTIATE, SoupAuthNegotiateClass)) + +typedef struct { + SoupConnectionAuth parent; + +} SoupAuthNegotiate; + +typedef struct { + SoupConnectionAuthClass parent_class; + +} SoupAuthNegotiateClass; + +#endif /* SOUP_AUTH_NEGOTIATE_H */ diff --git a/libsoup/soup-auth-ntlm.c b/libsoup/soup-auth-ntlm.c index 05541973..19a551ee 100644 --- a/libsoup/soup-auth-ntlm.c +++ b/libsoup/soup-auth-ntlm.c @@ -25,13 +25,15 @@ static void soup_ntlm_nt_hash (const char *password, static char *soup_ntlm_request (void); static gboolean soup_ntlm_parse_challenge (const char *challenge, char **nonce, - char **default_domain); + char **default_domain, + gboolean *ntlmv2_session); static char *soup_ntlm_response (const char *nonce, const char *user, guchar nt_hash[21], guchar lm_hash[21], const char *host, - const char *domain); + const char *domain, + gboolean ntlmv2_session); typedef enum { SOUP_NTLM_NEW, @@ -46,6 +48,7 @@ typedef struct { SoupNTLMState state; char *nonce; char *response_header; + gboolean ntlmv2_session; } SoupNTLMConnectionState; typedef enum { @@ -73,7 +76,6 @@ typedef struct { int fd_out; #endif } SoupAuthNTLMPrivate; -#define SOUP_AUTH_NTLM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_AUTH_NTLM, SoupAuthNTLMPrivate)) #ifdef USE_NTLM_AUTH static gboolean ntlm_auth_available, ntlm_auth_debug; @@ -91,13 +93,13 @@ static void sso_ntlm_close (SoupAuthNTLMPrivate *priv); * Since: 2.34 */ -G_DEFINE_TYPE (SoupAuthNTLM, soup_auth_ntlm, SOUP_TYPE_CONNECTION_AUTH) +G_DEFINE_TYPE_WITH_PRIVATE (SoupAuthNTLM, soup_auth_ntlm, SOUP_TYPE_CONNECTION_AUTH) static void soup_auth_ntlm_init (SoupAuthNTLM *ntlm) { #ifdef USE_NTLM_AUTH - SoupAuthNTLMPrivate *priv = SOUP_AUTH_NTLM_GET_PRIVATE (ntlm); + SoupAuthNTLMPrivate *priv = soup_auth_ntlm_get_instance_private (ntlm); const char *username = NULL, *slash; priv->sso_available = TRUE; @@ -122,7 +124,7 @@ soup_auth_ntlm_init (SoupAuthNTLM *ntlm) static void soup_auth_ntlm_finalize (GObject *object) { - SoupAuthNTLMPrivate *priv = SOUP_AUTH_NTLM_GET_PRIVATE (object); + SoupAuthNTLMPrivate *priv = soup_auth_ntlm_get_instance_private (SOUP_AUTH_NTLM (object)); g_free (priv->username); g_free (priv->domain); @@ -285,7 +287,8 @@ static gboolean soup_auth_ntlm_update_connection (SoupConnectionAuth *auth, SoupMessage *msg, const char *auth_header, gpointer state) { - SoupAuthNTLMPrivate *priv = SOUP_AUTH_NTLM_GET_PRIVATE (auth); + SoupAuthNTLM *auth_ntlm = SOUP_AUTH_NTLM (auth); + SoupAuthNTLMPrivate *priv = soup_auth_ntlm_get_instance_private (auth_ntlm); SoupNTLMConnectionState *conn = state; gboolean success = TRUE; @@ -300,12 +303,15 @@ soup_auth_ntlm_update_connection (SoupConnectionAuth *auth, SoupMessage *msg, if (conn->state > SOUP_NTLM_SENT_REQUEST) { if (priv->password_state == SOUP_NTLM_PASSWORD_ACCEPTED) { /* We know our password is correct, so a 401 - * means "permission denied". Since the conn - * state is now FAILED, the auth is no longer - * is_ready() for this message, so this will - * cause a "retrying" authenticate signal. + * means "permission denied". The code can't deal + * with re-authenticating correctly, so make sure + * we don't try. */ conn->state = SOUP_NTLM_FAILED; + if (soup_message_is_keepalive (msg)) { + soup_message_headers_append (msg->response_headers, + "Connection", "close"); + } return TRUE; } @@ -326,8 +332,14 @@ soup_auth_ntlm_update_connection (SoupConnectionAuth *auth, SoupMessage *msg, if (conn->state == SOUP_NTLM_NEW && !auth_header[4]) return TRUE; + if (!auth_header[4] || !auth_header[5]) { + conn->state = SOUP_NTLM_FAILED; + return FALSE; + } + if (!soup_ntlm_parse_challenge (auth_header + 5, &conn->nonce, - priv->domain ? NULL : &priv->domain)) { + priv->domain ? NULL : &priv->domain, + &conn->ntlmv2_session)) { conn->state = SOUP_NTLM_FAILED; return FALSE; } @@ -352,6 +364,7 @@ soup_auth_ntlm_update_connection (SoupConnectionAuth *auth, SoupMessage *msg, conn->state = SOUP_NTLM_SSO_FAILED; success = FALSE; } else if (!g_ascii_strcasecmp (response, "PW")) { + conn->state = SOUP_NTLM_SSO_FAILED; priv->sso_available = FALSE; g_free (response); } else { @@ -392,7 +405,8 @@ static void soup_auth_ntlm_authenticate (SoupAuth *auth, const char *username, const char *password) { - SoupAuthNTLMPrivate *priv = SOUP_AUTH_NTLM_GET_PRIVATE (auth); + SoupAuthNTLM *auth_ntlm = SOUP_AUTH_NTLM (auth); + SoupAuthNTLMPrivate *priv = soup_auth_ntlm_get_instance_private (auth_ntlm); const char *slash; g_return_if_fail (username != NULL); @@ -421,7 +435,8 @@ soup_auth_ntlm_authenticate (SoupAuth *auth, const char *username, static gboolean soup_auth_ntlm_is_authenticated (SoupAuth *auth) { - SoupAuthNTLMPrivate *priv = SOUP_AUTH_NTLM_GET_PRIVATE (auth); + SoupAuthNTLM *auth_ntlm = SOUP_AUTH_NTLM (auth); + SoupAuthNTLMPrivate *priv = soup_auth_ntlm_get_instance_private (auth_ntlm); return (priv->password_state != SOUP_NTLM_PASSWORD_NONE && priv->password_state != SOUP_NTLM_PASSWORD_REJECTED); @@ -432,7 +447,8 @@ soup_auth_ntlm_is_connection_ready (SoupConnectionAuth *auth, SoupMessage *msg, gpointer state) { - SoupAuthNTLMPrivate *priv = SOUP_AUTH_NTLM_GET_PRIVATE (auth); + SoupAuthNTLM *auth_ntlm = SOUP_AUTH_NTLM (auth); + SoupAuthNTLMPrivate *priv = soup_auth_ntlm_get_instance_private (auth_ntlm); SoupNTLMConnectionState *conn = state; if (priv->password_state == SOUP_NTLM_PASSWORD_REJECTED) @@ -448,6 +464,7 @@ static void got_final_auth_result (SoupMessage *msg, gpointer data) { SoupAuth *auth = data; + SoupAuthNTLMPrivate *priv = soup_auth_ntlm_get_instance_private (SOUP_AUTH_NTLM (auth)); g_signal_handlers_disconnect_by_func (msg, G_CALLBACK (got_final_auth_result), auth); @@ -455,7 +472,7 @@ got_final_auth_result (SoupMessage *msg, gpointer data) return; if (msg->status_code != SOUP_STATUS_UNAUTHORIZED) - SOUP_AUTH_NTLM_GET_PRIVATE (auth)->password_state = SOUP_NTLM_PASSWORD_ACCEPTED; + priv->password_state = SOUP_NTLM_PASSWORD_ACCEPTED; } static char * @@ -463,7 +480,8 @@ soup_auth_ntlm_get_connection_authorization (SoupConnectionAuth *auth, SoupMessage *msg, gpointer state) { - SoupAuthNTLMPrivate *priv = SOUP_AUTH_NTLM_GET_PRIVATE (auth); + SoupAuthNTLM *auth_ntlm = SOUP_AUTH_NTLM (auth); + SoupAuthNTLMPrivate *priv = soup_auth_ntlm_get_instance_private (auth_ntlm); SoupNTLMConnectionState *conn = state; char *header = NULL; @@ -482,7 +500,7 @@ soup_auth_ntlm_get_connection_authorization (SoupConnectionAuth *auth, priv->sso_available = FALSE; } } else { - g_warning ("NTLM single-sign-on using %s failed", NTLM_AUTH); + g_debug ("NTLM single-sign-on using %s failed", NTLM_AUTH); } } /* If NTLM single-sign-on fails, go back to original @@ -502,7 +520,8 @@ soup_auth_ntlm_get_connection_authorization (SoupConnectionAuth *auth, priv->nt_hash, priv->lm_hash, NULL, - priv->domain); + priv->domain, + conn->ntlmv2_session); } g_clear_pointer (&conn->nonce, g_free); conn->state = SOUP_NTLM_SENT_RESPONSE; @@ -517,7 +536,7 @@ soup_auth_ntlm_get_connection_authorization (SoupConnectionAuth *auth, #ifdef USE_NTLM_AUTH case SOUP_NTLM_SSO_FAILED: /* Restart request without SSO */ - g_warning ("NTLM single-sign-on by using %s failed", NTLM_AUTH); + g_debug ("NTLM single-sign-on by using %s failed", NTLM_AUTH); priv->sso_available = FALSE; header = soup_ntlm_request (); conn->state = SOUP_NTLM_SENT_REQUEST; @@ -537,8 +556,6 @@ soup_auth_ntlm_class_init (SoupAuthNTLMClass *auth_ntlm_class) SoupConnectionAuthClass *connauth_class = SOUP_CONNECTION_AUTH_CLASS (auth_ntlm_class); GObjectClass *object_class = G_OBJECT_CLASS (auth_ntlm_class); - g_type_class_add_private (auth_ntlm_class, sizeof (SoupAuthNTLMPrivate)); - auth_class->scheme_name = "NTLM"; auth_class->strength = 3; @@ -631,8 +648,12 @@ typedef struct { #define NTLM_CHALLENGE_NONCE_LENGTH 8 #define NTLM_CHALLENGE_DOMAIN_STRING_OFFSET 12 +#define NTLM_CHALLENGE_FLAGS_OFFSET 20 +#define NTLM_FLAGS_NEGOTIATE_NTLMV2 0x00080000 + #define NTLM_RESPONSE_HEADER "NTLMSSP\x00\x03\x00\x00\x00" #define NTLM_RESPONSE_FLAGS 0x8201 +#define NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY 0x00080000 typedef struct { guchar header[12]; @@ -658,17 +679,19 @@ ntlm_set_string (NTLMString *string, int *offset, int len) static char * soup_ntlm_request (void) { - return g_strdup ("NTLM TlRMTVNTUAABAAAABYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAA"); + return g_strdup ("NTLM TlRMTVNTUAABAAAABYIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAA"); } static gboolean soup_ntlm_parse_challenge (const char *challenge, char **nonce, - char **default_domain) + char **default_domain, + gboolean *ntlmv2_session) { gsize clen; NTLMString domain; guchar *chall; + guint32 flags; chall = g_base64_decode (challenge, &clen); if (clen < NTLM_CHALLENGE_DOMAIN_STRING_OFFSET || @@ -677,6 +700,10 @@ soup_ntlm_parse_challenge (const char *challenge, return FALSE; } + memcpy (&flags, chall + NTLM_CHALLENGE_FLAGS_OFFSET, sizeof(flags)); + flags = GUINT_FROM_LE (flags); + *ntlmv2_session = (flags & NTLM_FLAGS_NEGOTIATE_NTLMV2) ? TRUE : FALSE; + if (default_domain) { memcpy (&domain, chall + NTLM_CHALLENGE_DOMAIN_STRING_OFFSET, sizeof (domain)); domain.length = GUINT16_FROM_LE (domain.length); @@ -701,13 +728,48 @@ soup_ntlm_parse_challenge (const char *challenge, return TRUE; } +static void +calc_ntlm2_session_response (const char *nonce, + guchar nt_hash[21], + guchar lm_hash[21], + guchar *lm_resp, + gsize lm_resp_sz, + guchar *nt_resp) +{ + guint32 client_nonce[2]; + guchar ntlmv2_hash[16]; + GChecksum *ntlmv2_cksum; + gsize ntlmv2_hash_sz = sizeof (ntlmv2_hash); + + /* FIXME: if GLib ever gets a more secure random number + * generator, use it here + */ + client_nonce[0] = g_random_int(); + client_nonce[1] = g_random_int(); + + ntlmv2_cksum = g_checksum_new (G_CHECKSUM_MD5); + g_checksum_update (ntlmv2_cksum, (const guchar *) nonce, 8); + g_checksum_update (ntlmv2_cksum, (const guchar *) client_nonce, sizeof (client_nonce)); + g_checksum_get_digest (ntlmv2_cksum, ntlmv2_hash, &ntlmv2_hash_sz); + g_checksum_free (ntlmv2_cksum); + + /* Send the padded client nonce as a fake lm_resp */ + memset (lm_resp, 0, lm_resp_sz); + memcpy (lm_resp, client_nonce, sizeof (client_nonce)); + + /* Compute nt_hash as usual but with a new nonce */ + calc_response (nt_hash, ntlmv2_hash, nt_resp); +} + + static char * soup_ntlm_response (const char *nonce, const char *user, guchar nt_hash[21], guchar lm_hash[21], const char *host, - const char *domain) + const char *domain, + gboolean ntlmv2_session) { int offset; gsize hlen, dlen, ulen; @@ -717,12 +779,20 @@ soup_ntlm_response (const char *nonce, char *out, *p; int state, save; - calc_response (nt_hash, (guchar *)nonce, nt_resp); - calc_response (lm_hash, (guchar *)nonce, lm_resp); + if (ntlmv2_session) { + calc_ntlm2_session_response (nonce, nt_hash, lm_hash, + lm_resp, sizeof(lm_resp), nt_resp); + } else { + /* Compute a regular response */ + calc_response (nt_hash, (guchar *) nonce, nt_resp); + calc_response (lm_hash, (guchar *) nonce, lm_resp); + } memset (&resp, 0, sizeof (resp)); memcpy (resp.header, NTLM_RESPONSE_HEADER, sizeof (resp.header)); resp.flags = GUINT32_TO_LE (NTLM_RESPONSE_FLAGS); + if (ntlmv2_session) + resp.flags |= GUINT32_TO_LE (NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY); offset = sizeof (resp); @@ -835,7 +905,8 @@ md4sum (const unsigned char *in, int nbytes, unsigned char digest[16]) guint32 A, B, C, D, AA, BB, CC, DD, X[16]; int pbytes, nbits = nbytes * 8, i, j; - pbytes = (120 - (nbytes % 64)) % 64; + /* There is *always* padding of at least one bit. */ + pbytes = ((119 - (nbytes % 64)) % 64) + 1; M = alloca (nbytes + pbytes + 8); memcpy (M, in, nbytes); memset (M + nbytes, 0, pbytes + 8); diff --git a/libsoup/soup-auth.c b/libsoup/soup-auth.c index 7c34dcfa..00aa405e 100644 --- a/libsoup/soup-auth.c +++ b/libsoup/soup-auth.c @@ -38,9 +38,8 @@ typedef struct { gboolean proxy; char *host; } SoupAuthPrivate; -#define SOUP_AUTH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_AUTH, SoupAuthPrivate)) -G_DEFINE_ABSTRACT_TYPE (SoupAuth, soup_auth, G_TYPE_OBJECT) +G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (SoupAuth, soup_auth, G_TYPE_OBJECT) enum { PROP_0, @@ -63,7 +62,7 @@ static void soup_auth_finalize (GObject *object) { SoupAuth *auth = SOUP_AUTH (object); - SoupAuthPrivate *priv = SOUP_AUTH_GET_PRIVATE (auth); + SoupAuthPrivate *priv = soup_auth_get_instance_private (auth); g_free (auth->realm); g_free (priv->host); @@ -76,13 +75,15 @@ soup_auth_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { SoupAuth *auth = SOUP_AUTH (object); - SoupAuthPrivate *priv = SOUP_AUTH_GET_PRIVATE (object); + SoupAuthPrivate *priv = soup_auth_get_instance_private (auth); switch (prop_id) { case PROP_REALM: + g_free (auth->realm); auth->realm = g_value_dup_string (value); break; case PROP_HOST: + g_free (priv->host); priv->host = g_value_dup_string (value); break; case PROP_IS_FOR_PROXY: @@ -99,7 +100,7 @@ soup_auth_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { SoupAuth *auth = SOUP_AUTH (object); - SoupAuthPrivate *priv = SOUP_AUTH_GET_PRIVATE (object); + SoupAuthPrivate *priv = soup_auth_get_instance_private (auth); switch (prop_id) { case PROP_SCHEME_NAME: @@ -127,13 +128,18 @@ soup_auth_get_property (GObject *object, guint prop_id, } } +static gboolean +auth_can_authenticate (SoupAuth *auth) +{ + return TRUE; +} static void soup_auth_class_init (SoupAuthClass *auth_class) { GObjectClass *object_class = G_OBJECT_CLASS (auth_class); - g_type_class_add_private (auth_class, sizeof (SoupAuthPrivate)); + auth_class->can_authenticate = auth_can_authenticate; object_class->finalize = soup_auth_finalize; object_class->set_property = soup_auth_set_property; @@ -219,8 +225,8 @@ soup_auth_class_init (SoupAuthClass *auth_class) * This is called by #SoupSession; you will normally not create auths * yourself. * - * Return value: the new #SoupAuth, or %NULL if it could not be - * created + * Return value: (nullable): the new #SoupAuth, or %NULL if it could + * not be created **/ SoupAuth * soup_auth_new (GType type, SoupMessage *msg, const char *auth_header) @@ -343,9 +349,11 @@ soup_auth_authenticate (SoupAuth *auth, const char *username, const char *passwo gboolean soup_auth_is_for_proxy (SoupAuth *auth) { + SoupAuthPrivate *priv = soup_auth_get_instance_private (auth); + g_return_val_if_fail (SOUP_IS_AUTH (auth), FALSE); - return SOUP_AUTH_GET_PRIVATE (auth)->proxy; + return priv->proxy; } /** @@ -375,12 +383,13 @@ soup_auth_get_scheme_name (SoupAuth *auth) const char * soup_auth_get_host (SoupAuth *auth) { + SoupAuthPrivate *priv = soup_auth_get_instance_private (auth); + g_return_val_if_fail (SOUP_IS_AUTH (auth), NULL); - return SOUP_AUTH_GET_PRIVATE (auth)->host; + return priv->host; } - /** * soup_auth_get_realm: * @auth: a #SoupAuth @@ -488,6 +497,25 @@ soup_auth_is_ready (SoupAuth *auth, return SOUP_AUTH_GET_CLASS (auth)->is_authenticated (auth); } +/** + * soup_auth_can_authenticate: + * @auth: a #SoupAuth + * + * Tests if @auth is able to authenticate by providing credentials to the + * soup_auth_authenticate(). + * + * Return value: %TRUE if @auth is able to accept credentials. + * + * Since: 2.54 + **/ +gboolean +soup_auth_can_authenticate (SoupAuth *auth) +{ + g_return_val_if_fail (SOUP_IS_AUTH (auth), FALSE); + + return SOUP_AUTH_GET_CLASS (auth)->can_authenticate (auth); +} + /** * soup_auth_get_protection_space: * @auth: a #SoupAuth diff --git a/libsoup/soup-auth.h b/libsoup/soup-auth.h index 824857e2..0defcc65 100644 --- a/libsoup/soup-auth.h +++ b/libsoup/soup-auth.h @@ -48,8 +48,9 @@ typedef struct { gboolean (*is_ready) (SoupAuth *auth, SoupMessage *msg); + gboolean (*can_authenticate) (SoupAuth *auth); + /* Padding for future expansion */ - void (*_libsoup_reserved2) (void); void (*_libsoup_reserved3) (void); void (*_libsoup_reserved4) (void); } SoupAuthClass; @@ -60,45 +61,66 @@ typedef struct { #define SOUP_AUTH_IS_FOR_PROXY "is-for-proxy" #define SOUP_AUTH_IS_AUTHENTICATED "is-authenticated" +SOUP_AVAILABLE_IN_2_4 GType soup_auth_get_type (void); +SOUP_AVAILABLE_IN_2_4 SoupAuth *soup_auth_new (GType type, SoupMessage *msg, const char *auth_header); +SOUP_AVAILABLE_IN_2_4 gboolean soup_auth_update (SoupAuth *auth, SoupMessage *msg, const char *auth_header); +SOUP_AVAILABLE_IN_2_4 gboolean soup_auth_is_for_proxy (SoupAuth *auth); +SOUP_AVAILABLE_IN_2_4 const char *soup_auth_get_scheme_name (SoupAuth *auth); +SOUP_AVAILABLE_IN_2_4 const char *soup_auth_get_host (SoupAuth *auth); +SOUP_AVAILABLE_IN_2_4 const char *soup_auth_get_realm (SoupAuth *auth); +SOUP_AVAILABLE_IN_2_4 char *soup_auth_get_info (SoupAuth *auth); +SOUP_AVAILABLE_IN_2_4 void soup_auth_authenticate (SoupAuth *auth, const char *username, const char *password); +SOUP_AVAILABLE_IN_2_4 gboolean soup_auth_is_authenticated (SoupAuth *auth); SOUP_AVAILABLE_IN_2_42 gboolean soup_auth_is_ready (SoupAuth *auth, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_54 +gboolean soup_auth_can_authenticate (SoupAuth *auth); +SOUP_AVAILABLE_IN_2_4 char *soup_auth_get_authorization (SoupAuth *auth, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 GSList *soup_auth_get_protection_space (SoupAuth *auth, SoupURI *source_uri); +SOUP_AVAILABLE_IN_2_4 void soup_auth_free_protection_space (SoupAuth *auth, GSList *space); /* The actual auth types, which can be added/removed as features */ #define SOUP_TYPE_AUTH_BASIC (soup_auth_basic_get_type ()) +SOUP_AVAILABLE_IN_2_4 GType soup_auth_basic_get_type (void); #define SOUP_TYPE_AUTH_DIGEST (soup_auth_digest_get_type ()) +SOUP_AVAILABLE_IN_2_4 GType soup_auth_digest_get_type (void); #define SOUP_TYPE_AUTH_NTLM (soup_auth_ntlm_get_type ()) +SOUP_AVAILABLE_IN_2_4 GType soup_auth_ntlm_get_type (void); +#define SOUP_TYPE_AUTH_NEGOTIATE (soup_auth_negotiate_get_type ()) +SOUP_AVAILABLE_IN_2_54 +GType soup_auth_negotiate_get_type (void); /* Deprecated SoupPasswordManager-related APIs: all are now no-ops */ SOUP_AVAILABLE_IN_2_28 @@ -119,6 +141,9 @@ void soup_auth_has_saved_password (SoupAuth *auth, const char *username, const char *password); +SOUP_AVAILABLE_IN_2_54 +gboolean soup_auth_negotiate_supported (void); + G_END_DECLS #endif /* SOUP_AUTH_H */ diff --git a/libsoup/soup-autocleanups.h b/libsoup/soup-autocleanups.h new file mode 100644 index 00000000..910abe7d --- /dev/null +++ b/libsoup/soup-autocleanups.h @@ -0,0 +1,68 @@ +/* + * Copyright 2015 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#if !defined (__SOUP_H_INSIDE__) && !defined (LIBSOUP_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef SOUP_AUTOCLEANUPS_H +#define SOUP_AUTOCLEANUPS_H + +#if SOUP_VERSION_MAX_ALLOWED >= SOUP_VERSION_2_52 +#ifndef __GI_SCANNER__ +#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupAddress, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupAuth, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupAuthDomain, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupAuthDomainBasic, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupAuthDomainDigest, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupAuthManager, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupBuffer, soup_buffer_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupCache, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupContentDecoder, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupContentSniffer, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupCookie, soup_cookie_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupCookieJar, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupCookieJarDB, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupCookieJarText, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupDate, soup_date_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupLogger, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupMessage, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupMessageBody, soup_message_body_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupMessageHeaders, soup_message_headers_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupMultipart, soup_multipart_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupMultipartInputStream, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupRequest, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupRequestData, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupRequestFile, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupRequestHTTP, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupServer, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupSession, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupSessionAsync, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupSessionFeature, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupSessionSync, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupSocket, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupURI, soup_uri_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupWebsocketConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupXMLRPCParams, soup_xmlrpc_params_free) + +#endif +#endif +#endif + +#endif /* SOUP_AUTOCLEANUPS_H */ diff --git a/libsoup/soup-body-input-stream.c b/libsoup/soup-body-input-stream.c index 62747446..32ad074d 100644 --- a/libsoup/soup-body-input-stream.c +++ b/libsoup/soup-body-input-stream.c @@ -54,6 +54,7 @@ static void soup_body_input_stream_pollable_init (GPollableInputStreamInterface static void soup_body_input_stream_seekable_init (GSeekableIface *seekable_interface); G_DEFINE_TYPE_WITH_CODE (SoupBodyInputStream, soup_body_input_stream, G_TYPE_FILTER_INPUT_STREAM, + G_ADD_PRIVATE (SoupBodyInputStream) G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_INPUT_STREAM, soup_body_input_stream_pollable_init) G_IMPLEMENT_INTERFACE (G_TYPE_SEEKABLE, @@ -62,9 +63,7 @@ G_DEFINE_TYPE_WITH_CODE (SoupBodyInputStream, soup_body_input_stream, G_TYPE_FIL static void soup_body_input_stream_init (SoupBodyInputStream *bistream) { - bistream->priv = G_TYPE_INSTANCE_GET_PRIVATE (bistream, - SOUP_TYPE_BODY_INPUT_STREAM, - SoupBodyInputStreamPrivate); + bistream->priv = soup_body_input_stream_get_instance_private (bistream); bistream->priv->encoding = SOUP_ENCODING_NONE; } @@ -368,8 +367,6 @@ soup_body_input_stream_class_init (SoupBodyInputStreamClass *stream_class) GObjectClass *object_class = G_OBJECT_CLASS (stream_class); GInputStreamClass *input_stream_class = G_INPUT_STREAM_CLASS (stream_class); - g_type_class_add_private (stream_class, sizeof (SoupBodyInputStreamPrivate)); - object_class->constructed = soup_body_input_stream_constructed; object_class->set_property = soup_body_input_stream_set_property; object_class->get_property = soup_body_input_stream_get_property; diff --git a/libsoup/soup-body-output-stream.c b/libsoup/soup-body-output-stream.c index 03353ef5..314d7ee9 100644 --- a/libsoup/soup-body-output-stream.c +++ b/libsoup/soup-body-output-stream.c @@ -43,6 +43,7 @@ enum { static void soup_body_output_stream_pollable_init (GPollableOutputStreamInterface *pollable_interface, gpointer interface_data); G_DEFINE_TYPE_WITH_CODE (SoupBodyOutputStream, soup_body_output_stream, G_TYPE_FILTER_OUTPUT_STREAM, + G_ADD_PRIVATE (SoupBodyOutputStream) G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_OUTPUT_STREAM, soup_body_output_stream_pollable_init)) @@ -50,9 +51,7 @@ G_DEFINE_TYPE_WITH_CODE (SoupBodyOutputStream, soup_body_output_stream, G_TYPE_F static void soup_body_output_stream_init (SoupBodyOutputStream *stream) { - stream->priv = G_TYPE_INSTANCE_GET_PRIVATE (stream, - SOUP_TYPE_BODY_OUTPUT_STREAM, - SoupBodyOutputStreamPrivate); + stream->priv = soup_body_output_stream_get_instance_private (stream); } static void @@ -297,8 +296,6 @@ soup_body_output_stream_class_init (SoupBodyOutputStreamClass *stream_class) GObjectClass *object_class = G_OBJECT_CLASS (stream_class); GOutputStreamClass *output_stream_class = G_OUTPUT_STREAM_CLASS (stream_class); - g_type_class_add_private (stream_class, sizeof (SoupBodyOutputStreamPrivate)); - object_class->constructed = soup_body_output_stream_constructed; object_class->set_property = soup_body_output_stream_set_property; object_class->get_property = soup_body_output_stream_get_property; diff --git a/libsoup/soup-cache-client-input-stream.c b/libsoup/soup-cache-client-input-stream.c new file mode 100644 index 00000000..11bb2602 --- /dev/null +++ b/libsoup/soup-cache-client-input-stream.c @@ -0,0 +1,98 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * soup-cache-client-input-stream.c + * + * Copyright 2015 Igalia S.L. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include "soup-cache-client-input-stream.h" +#include "soup.h" +#include "soup-message-private.h" + +enum { + SIGNAL_EOF, + SIGNAL_CLOSED, + LAST_SIGNAL +}; + +static guint signals[LAST_SIGNAL] = { 0 }; + +G_DEFINE_TYPE (SoupCacheClientInputStream, soup_cache_client_input_stream, G_TYPE_FILTER_INPUT_STREAM) + +static void +soup_cache_client_input_stream_init (SoupCacheClientInputStream *stream) +{ +} + +static gssize +soup_cache_client_input_stream_read_fn (GInputStream *stream, + void *buffer, + gsize count, + GCancellable *cancellable, + GError **error) +{ + gssize nread; + + nread = G_INPUT_STREAM_CLASS (soup_cache_client_input_stream_parent_class)-> + read_fn (stream, buffer, count, cancellable, error); + + if (nread == 0) + g_signal_emit (stream, signals[SIGNAL_EOF], 0); + + return nread; +} + + +static gboolean +soup_cache_client_input_stream_close_fn (GInputStream *stream, + GCancellable *cancellable, + GError **error) +{ + gboolean success; + + success = G_INPUT_STREAM_CLASS (soup_cache_client_input_stream_parent_class)-> + close_fn (stream, cancellable, error); + + g_signal_emit (stream, signals[SIGNAL_CLOSED], 0); + + return success; +} + +static void +soup_cache_client_input_stream_class_init (SoupCacheClientInputStreamClass *stream_class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (stream_class); + GInputStreamClass *input_stream_class = G_INPUT_STREAM_CLASS (stream_class); + + input_stream_class->read_fn = soup_cache_client_input_stream_read_fn; + input_stream_class->close_fn = soup_cache_client_input_stream_close_fn; + + signals[SIGNAL_EOF] = + g_signal_new ("eof", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + NULL, + G_TYPE_NONE, 0); + signals[SIGNAL_CLOSED] = + g_signal_new ("closed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + NULL, + G_TYPE_NONE, 0); +} + +GInputStream * +soup_cache_client_input_stream_new (GInputStream *base_stream) +{ + return g_object_new (SOUP_TYPE_CACHE_CLIENT_INPUT_STREAM, + "base-stream", base_stream, + NULL); +} diff --git a/libsoup/soup-cache-client-input-stream.h b/libsoup/soup-cache-client-input-stream.h new file mode 100644 index 00000000..17f83599 --- /dev/null +++ b/libsoup/soup-cache-client-input-stream.h @@ -0,0 +1,36 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Copyright 2015 Igalia S.L. + */ + +#ifndef SOUP_CACHE_CLIENT_INPUT_STREAM_H +#define SOUP_CACHE_CLIENT_INPUT_STREAM_H 1 + +#include "soup-types.h" + +G_BEGIN_DECLS + +#define SOUP_TYPE_CACHE_CLIENT_INPUT_STREAM (soup_cache_client_input_stream_get_type ()) +#define SOUP_CACHE_CLIENT_INPUT_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_CACHE_CLIENT_INPUT_STREAM, SoupCacheClientInputStream)) +#define SOUP_CACHE_CLIENT_INPUT_STREAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_CACHE_CLIENT_INPUT_STREAM, SoupCacheClientInputStreamClass)) +#define SOUP_IS_CACHE_CLIENT_INPUT_STREAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_CACHE_CLIENT_INPUT_STREAM)) +#define SOUP_IS_CACHE_CLIENT_INPUT_STREAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_CACHE_CLIENT_INPUT_STREAM)) +#define SOUP_CACHE_CLIENT_INPUT_STREAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_CACHE_CLIENT_INPUT_STREAM, SoupCacheClientInputStreamClass)) + +typedef struct _SoupCacheClientInputStreamPrivate SoupCacheClientInputStreamPrivate; + +typedef struct { + GFilterInputStream parent; +} SoupCacheClientInputStream; + +typedef struct { + GFilterInputStreamClass parent_class; +} SoupCacheClientInputStreamClass; + +GType soup_cache_client_input_stream_get_type (void); + +GInputStream *soup_cache_client_input_stream_new (GInputStream *base_stream); + +G_END_DECLS + +#endif /* SOUP_CACHE_CLIENT_INPUT_STREAM_H */ diff --git a/libsoup/soup-cache-input-stream.c b/libsoup/soup-cache-input-stream.c index 679531d0..e93b43fd 100644 --- a/libsoup/soup-cache-input-stream.c +++ b/libsoup/soup-cache-input-stream.c @@ -11,12 +11,6 @@ #include "soup-cache-input-stream.h" #include "soup-message-body.h" -static void soup_cache_input_stream_pollable_init (GPollableInputStreamInterface *pollable_interface, gpointer interface_data); - -G_DEFINE_TYPE_WITH_CODE (SoupCacheInputStream, soup_cache_input_stream, SOUP_TYPE_FILTER_INPUT_STREAM, - G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_INPUT_STREAM, - soup_cache_input_stream_pollable_init)) - /* properties */ enum { PROP_0, @@ -45,6 +39,14 @@ struct _SoupCacheInputStreamPrivate GQueue *buffer_queue; }; +static void soup_cache_input_stream_pollable_init (GPollableInputStreamInterface *pollable_interface, gpointer interface_data); + +G_DEFINE_TYPE_WITH_CODE (SoupCacheInputStream, soup_cache_input_stream, SOUP_TYPE_FILTER_INPUT_STREAM, + G_ADD_PRIVATE (SoupCacheInputStream) + G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_INPUT_STREAM, + soup_cache_input_stream_pollable_init)) + + static void soup_cache_input_stream_write_next_buffer (SoupCacheInputStream *istream); static inline void @@ -56,6 +58,7 @@ notify_and_clear (SoupCacheInputStream *istream, GError *error) g_clear_object (&priv->cancellable); g_clear_object (&priv->output_stream); + g_clear_error (&error); } static inline void @@ -97,9 +100,7 @@ file_replaced_cb (GObject *source, static void soup_cache_input_stream_init (SoupCacheInputStream *self) { - SoupCacheInputStreamPrivate *priv = - G_TYPE_INSTANCE_GET_PRIVATE (self, SOUP_TYPE_CACHE_INPUT_STREAM, - SoupCacheInputStreamPrivate); + SoupCacheInputStreamPrivate *priv = soup_cache_input_stream_get_instance_private (self); priv->buffer_queue = g_queue_new (); self->priv = priv; @@ -285,10 +286,10 @@ soup_cache_input_stream_close_fn (GInputStream *stream, if (g_output_stream_has_pending (priv->output_stream)) g_cancellable_cancel (priv->cancellable); else { - GError *error = NULL; - g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_PARTIAL_INPUT, + GError *notify_error = NULL; + g_set_error_literal (¬ify_error, G_IO_ERROR, G_IO_ERROR_PARTIAL_INPUT, _("Failed to completely cache the resource")); - notify_and_clear (istream, error); + notify_and_clear (istream, notify_error); } } else if (priv->cancellable) /* The file_replace_async() hasn't finished yet */ @@ -304,8 +305,6 @@ soup_cache_input_stream_class_init (SoupCacheInputStreamClass *klass) GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GInputStreamClass *istream_class = G_INPUT_STREAM_CLASS (klass); - g_type_class_add_private (klass, sizeof (SoupCacheInputStreamPrivate)); - gobject_class->get_property = soup_cache_input_stream_get_property; gobject_class->set_property = soup_cache_input_stream_set_property; gobject_class->finalize = soup_cache_input_stream_finalize; diff --git a/libsoup/soup-cache.c b/libsoup/soup-cache.c index c17e537c..682625e6 100644 --- a/libsoup/soup-cache.c +++ b/libsoup/soup-cache.c @@ -30,9 +30,11 @@ #endif #include +#include #include "soup-cache.h" #include "soup-body-input-stream.h" +#include "soup-cache-client-input-stream.h" #include "soup-cache-input-stream.h" #include "soup-cache-private.h" #include "soup-content-processor.h" @@ -125,9 +127,8 @@ enum { PROP_CACHE_TYPE }; -#define SOUP_CACHE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_CACHE, SoupCachePrivate)) - G_DEFINE_TYPE_WITH_CODE (SoupCache, soup_cache, G_TYPE_OBJECT, + G_ADD_PRIVATE (SoupCache) G_IMPLEMENT_INTERFACE (SOUP_TYPE_SESSION_FEATURE, soup_cache_session_feature_init) G_IMPLEMENT_INTERFACE (SOUP_TYPE_CONTENT_PROCESSOR, @@ -172,7 +173,7 @@ get_cacheability (SoupCache *cache, SoupMessage *msg) cache_control = soup_message_headers_get_list (msg->response_headers, "Cache-Control"); if (cache_control && *cache_control) { GHashTable *hash; - SoupCachePrivate *priv = SOUP_CACHE_GET_PRIVATE (cache); + SoupCachePrivate *priv = soup_cache_get_instance_private (cache); hash = soup_header_parse_param_list (cache_control); @@ -346,7 +347,7 @@ soup_cache_entry_set_freshness (SoupCacheEntry *entry, SoupMessage *msg, SoupCac const char *max_age, *s_maxage; gint64 freshness_lifetime = 0; GHashTable *hash; - SoupCachePrivate *priv = SOUP_CACHE_GET_PRIVATE (cache); + SoupCachePrivate *priv = soup_cache_get_instance_private (cache); hash = soup_header_parse_param_list (cache_control); @@ -670,8 +671,7 @@ GInputStream * soup_cache_send_response (SoupCache *cache, SoupMessage *msg) { SoupCacheEntry *entry; - char *current_age; - GInputStream *file_stream, *body_stream, *cache_stream; + GInputStream *file_stream, *body_stream, *cache_stream, *client_stream; GFile *file; g_return_val_if_fail (SOUP_IS_CACHE (cache), NULL); @@ -698,19 +698,15 @@ soup_cache_send_response (SoupCache *cache, SoupMessage *msg) in course is over by now */ entry->being_validated = FALSE; + /* Message starting */ + soup_message_starting (msg); + /* Status */ soup_message_set_status (msg, entry->status_code); /* Headers */ copy_end_to_end_headers (entry->headers, msg->response_headers); - /* Add 'Age' header with the current age */ - current_age = g_strdup_printf ("%d", soup_cache_entry_get_current_age (entry)); - soup_message_headers_replace (msg->response_headers, - "Age", - current_age); - g_free (current_age); - /* Create the cache stream. */ soup_message_disable_feature (msg, SOUP_TYPE_CACHE); cache_stream = soup_message_setup_body_istream (body_stream, msg, @@ -718,7 +714,10 @@ soup_cache_send_response (SoupCache *cache, SoupMessage *msg) SOUP_STAGE_ENTITY_BODY); g_object_unref (body_stream); - return cache_stream; + client_stream = soup_cache_client_input_stream_new (cache_stream); + g_object_unref (cache_stream); + + return client_stream; } static void @@ -729,11 +728,17 @@ msg_got_headers_cb (SoupMessage *msg, gpointer user_data) } static void -request_started (SoupSessionFeature *feature, SoupSession *session, - SoupMessage *msg, SoupSocket *socket) +msg_starting_cb (SoupMessage *msg, gpointer user_data) { g_object_set_data (G_OBJECT (msg), "request-time", GINT_TO_POINTER (time (NULL))); - g_signal_connect (msg, "got-headers", G_CALLBACK (msg_got_headers_cb), NULL); + g_signal_connect (msg, "got-headers", G_CALLBACK (msg_got_headers_cb), user_data); + g_signal_handlers_disconnect_by_func (msg, msg_starting_cb, user_data); +} + +static void +request_queued (SoupSessionFeature *feature, SoupSession *session, SoupMessage *msg) +{ + g_signal_connect (msg, "starting", G_CALLBACK (msg_starting_cb), feature); } static void @@ -753,7 +758,7 @@ soup_cache_session_feature_init (SoupSessionFeatureInterface *feature_interface, g_type_default_interface_peek (SOUP_TYPE_SESSION_FEATURE); feature_interface->attach = attach; - feature_interface->request_started = request_started; + feature_interface->request_queued = request_queued; } typedef struct { @@ -850,7 +855,7 @@ soup_cache_content_processor_wrap_input (SoupContentProcessor *processor, soup_cache_entry_remove (cache, entry, TRUE); request_time = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (msg), "request-time")); - response_time = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (msg), "request-time")); + response_time = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (msg), "response-time")); entry = soup_cache_entry_new (cache, msg, request_time, response_time); entry->hits = 1; entry->dirty = TRUE; @@ -893,7 +898,7 @@ soup_cache_init (SoupCache *cache) { SoupCachePrivate *priv; - priv = cache->priv = SOUP_CACHE_GET_PRIVATE (cache); + priv = cache->priv = soup_cache_get_instance_private (cache); priv->cache = g_hash_table_new (g_direct_hash, g_direct_equal); /* LRU */ @@ -923,7 +928,7 @@ soup_cache_finalize (GObject *object) priv = SOUP_CACHE (object)->priv; - // Cannot use g_hash_table_foreach as callbacks must not modify the hash table + /* Cannot use g_hash_table_foreach as callbacks must not modify the hash table */ entries = g_hash_table_get_values (priv->cache); g_list_foreach (entries, remove_cache_item, object); g_list_free (entries); @@ -944,8 +949,17 @@ soup_cache_set_property (GObject *object, guint prop_id, switch (prop_id) { case PROP_CACHE_DIR: + g_assert (!priv->cache_dir); + priv->cache_dir = g_value_dup_string (value); - /* Create directory if it does not exist (FIXME: should we?) */ + + if (!priv->cache_dir) + /* Set a default cache dir, different for each user */ + priv->cache_dir = g_build_filename (g_get_user_cache_dir (), + "httpcache", + NULL); + + /* Create directory if it does not exist */ if (!g_file_test (priv->cache_dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) g_mkdir_with_parents (priv->cache_dir, 0700); break; @@ -978,33 +992,12 @@ soup_cache_get_property (GObject *object, guint prop_id, } } -static void -soup_cache_constructed (GObject *object) -{ - SoupCachePrivate *priv; - - priv = SOUP_CACHE (object)->priv; - - if (!priv->cache_dir) { - /* Set a default cache dir, different for each user */ - priv->cache_dir = g_build_filename (g_get_user_cache_dir (), - "httpcache", - NULL); - if (!g_file_test (priv->cache_dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) - g_mkdir_with_parents (priv->cache_dir, 0700); - } - - if (G_OBJECT_CLASS (soup_cache_parent_class)->constructed) - G_OBJECT_CLASS (soup_cache_parent_class)->constructed (object); -} - static void soup_cache_class_init (SoupCacheClass *cache_class) { GObjectClass *gobject_class = (GObjectClass *)cache_class; gobject_class->finalize = soup_cache_finalize; - gobject_class->constructed = soup_cache_constructed; gobject_class->set_property = soup_cache_set_property; gobject_class->get_property = soup_cache_get_property; @@ -1024,8 +1017,6 @@ soup_cache_class_init (SoupCacheClass *cache_class) SOUP_TYPE_CACHE_TYPE, SOUP_CACHE_SINGLE_USER, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - - g_type_class_add_private (cache_class, sizeof (SoupCachePrivate)); } /** @@ -1041,7 +1032,10 @@ soup_cache_class_init (SoupCacheClass *cache_class) /** * soup_cache_new: - * @cache_dir: the directory to store the cached data, or %NULL to use the default one + * @cache_dir: (allow-none): the directory to store the cached data, or %NULL + * to use the default one. Note that since the cache isn't safe to access for + * multiple processes at once, and the default directory isn't namespaced by + * process, clients are strongly discouraged from passing %NULL. * @cache_type: the #SoupCacheType of the cache * * Creates a new #SoupCache. @@ -1076,7 +1070,7 @@ SoupCacheResponse soup_cache_has_response (SoupCache *cache, SoupMessage *msg) { SoupCacheEntry *entry; - const char *cache_control, *pragma; + const char *cache_control; gpointer value; int max_age, max_stale, min_fresh; GList *lru_item, *item; @@ -1137,8 +1131,7 @@ soup_cache_has_response (SoupCache *cache, SoupMessage *msg) /* For HTTP 1.0 compatibility. RFC2616 section 14.9.4 */ - pragma = soup_message_headers_get_list (msg->request_headers, "Pragma"); - if (pragma && soup_header_contains (pragma, "no-cache")) + if (soup_message_headers_header_contains (msg->request_headers, "Pragma", "no-cache")) return SOUP_CACHE_RESPONSE_STALE; cache_control = soup_message_headers_get_list (msg->request_headers, "Cache-Control"); @@ -1155,7 +1148,7 @@ soup_cache_has_response (SoupCache *cache, SoupMessage *msg) return SOUP_CACHE_RESPONSE_STALE; } - if (g_hash_table_lookup_extended (hash, "max-age", NULL, &value)) { + if (g_hash_table_lookup_extended (hash, "max-age", NULL, &value) && value) { max_age = (int)MIN (g_ascii_strtoll (value, NULL, 10), G_MAXINT32); /* Forcing cache revalidaton */ @@ -1193,12 +1186,17 @@ soup_cache_has_response (SoupCache *cache, SoupMessage *msg) /* 6. The stored response is either: fresh, allowed to be * served stale or succesfully validated */ - /* TODO consider also proxy-revalidate & s-maxage */ - if (entry->must_revalidate) - return SOUP_CACHE_RESPONSE_NEEDS_VALIDATION; - if (!soup_cache_entry_is_fresh_enough (entry, min_fresh)) { /* Not fresh, can it be served stale? */ + + /* When the must-revalidate directive is present in a + * response received by a cache, that cache MUST NOT + * use the entry after it becomes stale + */ + /* TODO consider also proxy-revalidate & s-maxage */ + if (entry->must_revalidate) + return SOUP_CACHE_RESPONSE_NEEDS_VALIDATION; + if (max_stale != -1) { /* G_MAXINT32 means we accept any staleness */ if (max_stale == G_MAXINT32) @@ -1282,6 +1280,25 @@ soup_cache_flush (SoupCache *cache) g_warning ("Cache flush finished despite %d pending requests", cache->priv->n_pending); } +typedef void (* SoupCacheForeachFileFunc) (SoupCache *cache, const char *name, gpointer user_data); + +static void +soup_cache_foreach_file (SoupCache *cache, SoupCacheForeachFileFunc func, gpointer user_data) +{ + GDir *dir; + const char *name; + SoupCachePrivate *priv = cache->priv; + + dir = g_dir_open (priv->cache_dir, 0, NULL); + while ((name = g_dir_read_name (dir))) { + if (g_str_has_prefix (name, "soup.")) + continue; + + func (cache, name, user_data); + } + g_dir_close (dir); +} + static void clear_cache_item (gpointer data, gpointer user_data) @@ -1289,29 +1306,20 @@ clear_cache_item (gpointer data, soup_cache_entry_remove ((SoupCache *) user_data, (SoupCacheEntry *) data, TRUE); } +static void +delete_cache_file (SoupCache *cache, const char *name, gpointer user_data) +{ + gchar *path; + + path = g_build_filename (cache->priv->cache_dir, name, NULL); + g_unlink (path); + g_free (path); +} + static void clear_cache_files (SoupCache *cache) { - GFileInfo *file_info; - GFileEnumerator *file_enumerator; - GFile *cache_dir_file = g_file_new_for_path (cache->priv->cache_dir); - - file_enumerator = g_file_enumerate_children (cache_dir_file, G_FILE_ATTRIBUTE_STANDARD_NAME, - G_FILE_QUERY_INFO_NONE, NULL, NULL); - if (file_enumerator) { - while ((file_info = g_file_enumerator_next_file (file_enumerator, NULL, NULL)) != NULL) { - const char *filename = g_file_info_get_name (file_info); - - if (strcmp (filename, SOUP_CACHE_FILE) != 0) { - GFile *cache_file = g_file_get_child (cache_dir_file, filename); - g_file_delete (cache_file, NULL, NULL); - g_object_unref (cache_file); - } - g_object_unref (file_info); - } - g_object_unref (file_enumerator); - } - g_object_unref (cache_dir_file); + soup_cache_foreach_file (cache, delete_cache_file, NULL); } /** @@ -1330,7 +1338,7 @@ soup_cache_clear (SoupCache *cache) g_return_if_fail (SOUP_IS_CACHE (cache)); g_return_if_fail (cache->priv->cache); - // Cannot use g_hash_table_foreach as callbacks must not modify the hash table + /* Cannot use g_hash_table_foreach as callbacks must not modify the hash table */ entries = g_hash_table_get_values (cache->priv->cache); g_list_foreach (entries, clear_cache_item, cache); g_list_free (entries); @@ -1367,6 +1375,7 @@ soup_cache_generate_conditional_request (SoupCache *cache, SoupMessage *original /* Copy the data we need from the original message */ uri = soup_message_get_uri (original); msg = soup_message_new_from_uri (original->method, uri); + soup_message_set_flags (msg, soup_message_get_flags (original)); soup_message_disable_feature (msg, SOUP_TYPE_CACHE); soup_message_headers_foreach (original->request_headers, @@ -1473,7 +1482,7 @@ pack_entry (gpointer data, void soup_cache_dump (SoupCache *cache) { - SoupCachePrivate *priv = SOUP_CACHE_GET_PRIVATE (cache); + SoupCachePrivate *priv = soup_cache_get_instance_private (cache); char *filename; GVariantBuilder entries_builder; GVariant *cache_variant; @@ -1498,6 +1507,32 @@ soup_cache_dump (SoupCache *cache) g_variant_unref (cache_variant); } +static inline guint32 +get_key_from_cache_filename (const char *name) +{ + guint64 key; + + key = g_ascii_strtoull (name, NULL, 10); + return key ? (guint32)key : 0; +} + +static void +insert_cache_file (SoupCache *cache, const char *name, GHashTable *leaked_entries) +{ + gchar *path; + + path = g_build_filename (cache->priv->cache_dir, name, NULL); + if (g_file_test (path, G_FILE_TEST_IS_REGULAR)) { + guint32 key = get_key_from_cache_filename (name); + + if (key) { + g_hash_table_insert (leaked_entries, GUINT_TO_POINTER (key), path); + return; + } + } + g_free (path); +} + /** * soup_cache_load: * @cache: a #SoupCache @@ -1519,6 +1554,9 @@ soup_cache_load (SoupCache *cache) SoupCacheEntry *entry; SoupCachePrivate *priv = cache->priv; guint16 version, status_code; + GHashTable *leaked_entries = NULL; + GHashTableIter iter; + gpointer value; filename = g_build_filename (priv->cache_dir, SOUP_CACHE_FILE, NULL); if (!g_file_get_contents (filename, &contents, &length, NULL)) { @@ -1539,6 +1577,9 @@ soup_cache_load (SoupCache *cache) return; } + leaked_entries = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_free); + soup_cache_foreach_file (cache, (SoupCacheForeachFileFunc)insert_cache_file, leaked_entries); + while (g_variant_iter_loop (entries_iter, SOUP_CACHE_PHEADERS_FORMAT, &url, &must_revalidate, &freshness_lifetime, &corrected_initial_age, &response_time, &hits, &length, &status_code, @@ -1574,8 +1615,16 @@ soup_cache_load (SoupCache *cache) if (!soup_cache_entry_insert (cache, entry, FALSE)) soup_cache_entry_free (entry); + else + g_hash_table_remove (leaked_entries, GUINT_TO_POINTER (entry->key)); } + /* Remove the leaked files */ + g_hash_table_iter_init (&iter, leaked_entries); + while (g_hash_table_iter_next (&iter, NULL, &value)) + g_unlink ((char *)value); + g_hash_table_destroy (leaked_entries); + cache->priv->lru_start = g_list_reverse (cache->priv->lru_start); /* frees */ diff --git a/libsoup/soup-client-input-stream.c b/libsoup/soup-client-input-stream.c index 0264cb79..c305dd84 100644 --- a/libsoup/soup-client-input-stream.c +++ b/libsoup/soup-client-input-stream.c @@ -18,7 +18,7 @@ struct _SoupClientInputStreamPrivate { }; enum { - EOF, + SIGNAL_EOF, LAST_SIGNAL }; @@ -34,15 +34,14 @@ static GPollableInputStreamInterface *soup_client_input_stream_parent_pollable_i static void soup_client_input_stream_pollable_init (GPollableInputStreamInterface *pollable_interface, gpointer interface_data); G_DEFINE_TYPE_WITH_CODE (SoupClientInputStream, soup_client_input_stream, SOUP_TYPE_FILTER_INPUT_STREAM, + G_ADD_PRIVATE (SoupClientInputStream) G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_INPUT_STREAM, soup_client_input_stream_pollable_init)) static void soup_client_input_stream_init (SoupClientInputStream *stream) { - stream->priv = G_TYPE_INSTANCE_GET_PRIVATE (stream, - SOUP_TYPE_CLIENT_INPUT_STREAM, - SoupClientInputStreamPrivate); + stream->priv = soup_client_input_stream_get_instance_private (stream); } static void @@ -100,7 +99,7 @@ soup_client_input_stream_read_fn (GInputStream *stream, read_fn (stream, buffer, count, cancellable, error); if (nread == 0) - g_signal_emit (stream, signals[EOF], 0); + g_signal_emit (stream, signals[SIGNAL_EOF], 0); return nread; } @@ -117,7 +116,7 @@ soup_client_input_stream_read_nonblocking (GPollableInputStream *stream, read_nonblocking (stream, buffer, count, error); if (nread == 0) - g_signal_emit (stream, signals[EOF], 0); + g_signal_emit (stream, signals[SIGNAL_EOF], 0); return nread; } @@ -215,8 +214,6 @@ soup_client_input_stream_class_init (SoupClientInputStreamClass *stream_class) GObjectClass *object_class = G_OBJECT_CLASS (stream_class); GInputStreamClass *input_stream_class = G_INPUT_STREAM_CLASS (stream_class); - g_type_class_add_private (stream_class, sizeof (SoupClientInputStreamPrivate)); - object_class->finalize = soup_client_input_stream_finalize; object_class->set_property = soup_client_input_stream_set_property; object_class->get_property = soup_client_input_stream_get_property; @@ -226,7 +223,7 @@ soup_client_input_stream_class_init (SoupClientInputStreamClass *stream_class) input_stream_class->close_async = soup_client_input_stream_close_async; input_stream_class->close_finish = soup_client_input_stream_close_finish; - signals[EOF] = + signals[SIGNAL_EOF] = g_signal_new ("eof", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, diff --git a/libsoup/soup-connection-auth.c b/libsoup/soup-connection-auth.c index fc327335..f55cfe6b 100644 --- a/libsoup/soup-connection-auth.c +++ b/libsoup/soup-connection-auth.c @@ -18,16 +18,16 @@ #include "soup-connection.h" #include "soup-message-private.h" -G_DEFINE_ABSTRACT_TYPE (SoupConnectionAuth, soup_connection_auth, SOUP_TYPE_AUTH) - struct SoupConnectionAuthPrivate { GHashTable *conns; }; +G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (SoupConnectionAuth, soup_connection_auth, SOUP_TYPE_AUTH) + static void soup_connection_auth_init (SoupConnectionAuth *auth) { - auth->priv = G_TYPE_INSTANCE_GET_PRIVATE (auth, SOUP_TYPE_CONNECTION_AUTH, SoupConnectionAuthPrivate); + auth->priv = soup_connection_auth_get_instance_private (auth); auth->priv->conns = g_hash_table_new (NULL, NULL); } @@ -71,12 +71,31 @@ soup_connection_auth_finalize (GObject *object) G_OBJECT_CLASS (soup_connection_auth_parent_class)->finalize (object); } -static gpointer -get_connection_state_for_message (SoupConnectionAuth *auth, SoupMessage *msg) + +/** + * soup_connection_auth_get_connection_state_for_message: + * @auth: a #SoupConnectionAuth + * @msg: a #SoupMessage + * + * Returns an associated connection state object for the given @auth and @msg. + * + * This function is only useful from within implementations of SoupConnectionAuth + * subclasses. + * + * Return value: (transfer none): the connection state + * + * Since: 2.58 + **/ +gpointer +soup_connection_auth_get_connection_state_for_message (SoupConnectionAuth *auth, + SoupMessage *msg) { SoupConnection *conn; gpointer state; + g_return_val_if_fail (SOUP_IS_CONNECTION_AUTH (auth), NULL); + g_return_val_if_fail (SOUP_IS_MESSAGE (msg), NULL); + conn = soup_message_get_connection (msg); state = g_hash_table_lookup (auth->priv->conns, conn); if (state) @@ -98,7 +117,7 @@ soup_connection_auth_update (SoupAuth *auth, GHashTable *auth_params) { SoupConnectionAuth *cauth = SOUP_CONNECTION_AUTH (auth); - gpointer conn = get_connection_state_for_message (cauth, msg); + gpointer conn = soup_connection_auth_get_connection_state_for_message (cauth, msg); GHashTableIter iter; GString *auth_header; gpointer key, value; @@ -140,7 +159,7 @@ soup_connection_auth_get_authorization (SoupAuth *auth, SoupMessage *msg) { SoupConnectionAuth *cauth = SOUP_CONNECTION_AUTH (auth); - gpointer conn = get_connection_state_for_message (cauth, msg); + gpointer conn = soup_connection_auth_get_connection_state_for_message (cauth, msg); return SOUP_CONNECTION_AUTH_GET_CLASS (auth)-> get_connection_authorization (cauth, msg, conn); @@ -151,7 +170,7 @@ soup_connection_auth_is_ready (SoupAuth *auth, SoupMessage *msg) { SoupConnectionAuth *cauth = SOUP_CONNECTION_AUTH (auth); - gpointer conn = get_connection_state_for_message (cauth, msg); + gpointer conn = soup_connection_auth_get_connection_state_for_message (cauth, msg); return SOUP_CONNECTION_AUTH_GET_CLASS (auth)-> is_connection_ready (SOUP_CONNECTION_AUTH (auth), msg, conn); @@ -163,8 +182,6 @@ soup_connection_auth_class_init (SoupConnectionAuthClass *connauth_class) SoupAuthClass *auth_class = SOUP_AUTH_CLASS (connauth_class); GObjectClass *object_class = G_OBJECT_CLASS (connauth_class); - g_type_class_add_private (connauth_class, sizeof (SoupConnectionAuthPrivate)); - auth_class->update = soup_connection_auth_update; auth_class->get_authorization = soup_connection_auth_get_authorization; auth_class->is_ready = soup_connection_auth_is_ready; diff --git a/libsoup/soup-connection-auth.h b/libsoup/soup-connection-auth.h index 251ca359..c5fbe7bd 100644 --- a/libsoup/soup-connection-auth.h +++ b/libsoup/soup-connection-auth.h @@ -44,9 +44,12 @@ typedef struct { gpointer conn); } SoupConnectionAuthClass; -SOUP_AVAILABLE_IN_2_42 GType soup_connection_auth_get_type (void); +SOUP_AVAILABLE_IN_2_58 +gpointer soup_connection_auth_get_connection_state_for_message + (SoupConnectionAuth *auth, + SoupMessage *message); G_END_DECLS #endif /* SOUP_CONNECTION_AUTH_H */ diff --git a/libsoup/soup-connection.c b/libsoup/soup-connection.c index fce589fa..5fb4d78c 100644 --- a/libsoup/soup-connection.c +++ b/libsoup/soup-connection.c @@ -12,30 +12,24 @@ #include "soup-connection.h" #include "soup.h" #include "soup-message-queue.h" +#include "soup-socket-private.h" #include "soup-misc-private.h" typedef struct { SoupSocket *socket; + SoupSocketProperties *socket_props; - SoupAddress *local_addr; SoupURI *remote_uri, *proxy_uri; - GProxyResolver *proxy_resolver; - GTlsDatabase *tlsdb; - gboolean ssl, ssl_strict, ssl_fallback; - - GMainContext *async_context; - gboolean use_thread_context; + gboolean ssl; SoupMessage *current_msg; SoupConnectionState state; time_t unused_timeout; - guint io_timeout, idle_timeout; GSource *idle_timeout_src; gboolean reusable; } SoupConnectionPrivate; -#define SOUP_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_CONNECTION, SoupConnectionPrivate)) -G_DEFINE_TYPE (SoupConnection, soup_connection, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (SoupConnection, soup_connection, G_TYPE_OBJECT) enum { EVENT, @@ -48,18 +42,10 @@ static guint signals[LAST_SIGNAL] = { 0 }; enum { PROP_0, - PROP_LOCAL_ADDRESS, PROP_REMOTE_URI, - PROP_PROXY_RESOLVER, - PROP_SSL, - PROP_SSL_CREDS, - PROP_SSL_STRICT, - PROP_SSL_FALLBACK, - PROP_ASYNC_CONTEXT, - PROP_USE_THREAD_CONTEXT, - PROP_TIMEOUT, - PROP_IDLE_TIMEOUT, + PROP_SOCKET_PROPERTIES, PROP_STATE, + PROP_SSL, LAST_PROP }; @@ -79,14 +65,17 @@ soup_connection_init (SoupConnection *conn) static void soup_connection_finalize (GObject *object) { - SoupConnectionPrivate *priv = SOUP_CONNECTION_GET_PRIVATE (object); + SoupConnectionPrivate *priv = soup_connection_get_instance_private (SOUP_CONNECTION (object)); g_clear_pointer (&priv->remote_uri, soup_uri_free); g_clear_pointer (&priv->proxy_uri, soup_uri_free); - g_clear_object (&priv->tlsdb); - g_clear_object (&priv->proxy_resolver); - g_clear_object (&priv->local_addr); - g_clear_pointer (&priv->async_context, g_main_context_unref); + g_clear_pointer (&priv->socket_props, soup_socket_properties_unref); + g_clear_object (&priv->current_msg); + + if (priv->socket) { + g_signal_handlers_disconnect_by_data (priv->socket, object); + g_object_unref (priv->socket); + } G_OBJECT_CLASS (soup_connection_parent_class)->finalize (object); } @@ -95,15 +84,10 @@ static void soup_connection_dispose (GObject *object) { SoupConnection *conn = SOUP_CONNECTION (object); - SoupConnectionPrivate *priv = SOUP_CONNECTION_GET_PRIVATE (conn); + SoupConnectionPrivate *priv = soup_connection_get_instance_private (conn); stop_idle_timer (priv); - if (priv->socket) { - g_warning ("Disposing connection while connected"); - soup_connection_disconnect (conn); - } - G_OBJECT_CLASS (soup_connection_parent_class)->dispose (object); } @@ -111,49 +95,21 @@ static void soup_connection_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - SoupConnectionPrivate *priv = SOUP_CONNECTION_GET_PRIVATE (object); + SoupConnectionPrivate *priv = soup_connection_get_instance_private (SOUP_CONNECTION (object)); switch (prop_id) { - case PROP_LOCAL_ADDRESS: - priv->local_addr = g_value_dup_object (value); - break; case PROP_REMOTE_URI: priv->remote_uri = g_value_dup_boxed (value); break; - case PROP_PROXY_RESOLVER: - priv->proxy_resolver = g_value_dup_object (value); - break; - case PROP_SSL: - priv->ssl = g_value_get_boolean (value); - break; - case PROP_SSL_CREDS: - if (priv->tlsdb) - g_object_unref (priv->tlsdb); - priv->tlsdb = g_value_dup_object (value); - break; - case PROP_SSL_STRICT: - priv->ssl_strict = g_value_get_boolean (value); - break; - case PROP_SSL_FALLBACK: - priv->ssl_fallback = g_value_get_boolean (value); - break; - case PROP_ASYNC_CONTEXT: - priv->async_context = g_value_get_pointer (value); - if (priv->async_context) - g_main_context_ref (priv->async_context); - break; - case PROP_USE_THREAD_CONTEXT: - priv->use_thread_context = g_value_get_boolean (value); - break; - case PROP_TIMEOUT: - priv->io_timeout = g_value_get_uint (value); - break; - case PROP_IDLE_TIMEOUT: - priv->idle_timeout = g_value_get_uint (value); + case PROP_SOCKET_PROPERTIES: + priv->socket_props = g_value_dup_boxed (value); break; case PROP_STATE: soup_connection_set_state (SOUP_CONNECTION (object), g_value_get_uint (value)); break; + case PROP_SSL: + priv->ssl = g_value_get_boolean (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -164,42 +120,21 @@ static void soup_connection_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - SoupConnectionPrivate *priv = SOUP_CONNECTION_GET_PRIVATE (object); + SoupConnectionPrivate *priv = soup_connection_get_instance_private (SOUP_CONNECTION (object)); switch (prop_id) { - case PROP_LOCAL_ADDRESS: - g_value_set_object (value, priv->local_addr); - break; case PROP_REMOTE_URI: g_value_set_boxed (value, priv->remote_uri); break; - case PROP_SSL: - g_value_set_boolean (value, priv->ssl); - break; - case PROP_SSL_CREDS: - g_value_set_object (value, priv->tlsdb); - break; - case PROP_SSL_STRICT: - g_value_set_boolean (value, priv->ssl_strict); - break; - case PROP_SSL_FALLBACK: - g_value_set_boolean (value, priv->ssl_fallback); - break; - case PROP_ASYNC_CONTEXT: - g_value_set_pointer (value, priv->async_context ? g_main_context_ref (priv->async_context) : NULL); - break; - case PROP_USE_THREAD_CONTEXT: - g_value_set_boolean (value, priv->use_thread_context); - break; - case PROP_TIMEOUT: - g_value_set_uint (value, priv->io_timeout); - break; - case PROP_IDLE_TIMEOUT: - g_value_set_uint (value, priv->idle_timeout); + case PROP_SOCKET_PROPERTIES: + g_value_set_boxed (value, priv->socket_props); break; case PROP_STATE: g_value_set_enum (value, priv->state); break; + case PROP_SSL: + g_value_set_boolean (value, priv->ssl); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -211,8 +146,6 @@ soup_connection_class_init (SoupConnectionClass *connection_class) { GObjectClass *object_class = G_OBJECT_CLASS (connection_class); - g_type_class_add_private (connection_class, sizeof (SoupConnectionPrivate)); - /* virtual method override */ object_class->dispose = soup_connection_dispose; object_class->finalize = soup_connection_finalize; @@ -240,13 +173,6 @@ soup_connection_class_init (SoupConnectionClass *connection_class) G_TYPE_NONE, 0); /* properties */ - g_object_class_install_property ( - object_class, PROP_LOCAL_ADDRESS, - g_param_spec_object (SOUP_CONNECTION_LOCAL_ADDRESS, - "Local address", - "Address of local end of socket", - SOUP_TYPE_ADDRESS, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property ( object_class, PROP_REMOTE_URI, g_param_spec_boxed (SOUP_CONNECTION_REMOTE_URI, @@ -255,67 +181,12 @@ soup_connection_class_init (SoupConnectionClass *connection_class) SOUP_TYPE_URI, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property ( - object_class, PROP_PROXY_RESOLVER, - g_param_spec_object (SOUP_CONNECTION_PROXY_RESOLVER, - "Proxy resolver", - "GProxyResolver to use", - G_TYPE_PROXY_RESOLVER, - G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); - g_object_class_install_property ( - object_class, PROP_SSL, - g_param_spec_boolean (SOUP_CONNECTION_SSL, - "SSL", - "Whether this is an SSL connection", - FALSE, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - g_object_class_install_property ( - object_class, PROP_SSL_CREDS, - g_param_spec_object (SOUP_CONNECTION_SSL_CREDENTIALS, - "SSL credentials", - "SSL credentials for this connection", - G_TYPE_TLS_DATABASE, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - g_object_class_install_property ( - object_class, PROP_SSL_STRICT, - g_param_spec_boolean (SOUP_CONNECTION_SSL_STRICT, - "Strictly validate SSL certificates", - "Whether certificate errors should be considered a connection error", - TRUE, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - g_object_class_install_property ( - object_class, PROP_SSL_FALLBACK, - g_param_spec_boolean (SOUP_CONNECTION_SSL_FALLBACK, - "SSLv3 fallback", - "Use SSLv3 instead of TLS", - FALSE, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - g_object_class_install_property ( - object_class, PROP_ASYNC_CONTEXT, - g_param_spec_pointer (SOUP_CONNECTION_ASYNC_CONTEXT, - "Async GMainContext", - "GMainContext to dispatch this connection's async I/O in", - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - g_object_class_install_property ( - object_class, PROP_USE_THREAD_CONTEXT, - g_param_spec_boolean (SOUP_CONNECTION_USE_THREAD_CONTEXT, - "Use thread context", - "Use g_main_context_get_thread_default", - FALSE, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - g_object_class_install_property ( - object_class, PROP_TIMEOUT, - g_param_spec_uint (SOUP_CONNECTION_TIMEOUT, - "Timeout value", - "Value in seconds to timeout a blocking I/O", - 0, G_MAXUINT, 0, - G_PARAM_READWRITE)); - g_object_class_install_property ( - object_class, PROP_IDLE_TIMEOUT, - g_param_spec_uint (SOUP_CONNECTION_IDLE_TIMEOUT, - "Idle Timeout", - "Connection lifetime when idle", - 0, G_MAXUINT, 0, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + object_class, PROP_SOCKET_PROPERTIES, + g_param_spec_boxed (SOUP_CONNECTION_SOCKET_PROPERTIES, + "Socket properties", + "Socket properties", + SOUP_TYPE_SOCKET_PROPERTIES, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property ( object_class, PROP_STATE, g_param_spec_enum (SOUP_CONNECTION_STATE, @@ -323,6 +194,12 @@ soup_connection_class_init (SoupConnectionClass *connection_class) "Current state of connection", SOUP_TYPE_CONNECTION_STATE, SOUP_CONNECTION_NEW, G_PARAM_READWRITE)); + g_object_class_install_property ( + object_class, PROP_SSL, + g_param_spec_boolean (SOUP_CONNECTION_SSL, + "Connection uses TLS", + "Whether the connection should use TLS", + FALSE, G_PARAM_READWRITE)); } static void @@ -330,7 +207,7 @@ soup_connection_event (SoupConnection *conn, GSocketClientEvent event, GIOStream *connection) { - SoupConnectionPrivate *priv = SOUP_CONNECTION_GET_PRIVATE (conn); + SoupConnectionPrivate *priv = soup_connection_get_instance_private (conn); if (!connection && priv->socket) connection = soup_socket_get_connection (priv->socket); @@ -349,12 +226,12 @@ idle_timeout (gpointer conn) static void start_idle_timer (SoupConnection *conn) { - SoupConnectionPrivate *priv = SOUP_CONNECTION_GET_PRIVATE (conn); + SoupConnectionPrivate *priv = soup_connection_get_instance_private (conn); - if (priv->idle_timeout > 0 && !priv->idle_timeout_src) { + if (priv->socket_props->idle_timeout > 0 && !priv->idle_timeout_src) { priv->idle_timeout_src = - soup_add_timeout (priv->async_context, - priv->idle_timeout * 1000, + soup_add_timeout (priv->socket_props->async_context, + priv->socket_props->idle_timeout * 1000, idle_timeout, conn); } } @@ -372,7 +249,7 @@ static void current_msg_got_body (SoupMessage *msg, gpointer user_data) { SoupConnection *conn = user_data; - SoupConnectionPrivate *priv = SOUP_CONNECTION_GET_PRIVATE (conn); + SoupConnectionPrivate *priv = soup_connection_get_instance_private (conn); priv->unused_timeout = 0; @@ -391,7 +268,7 @@ current_msg_got_body (SoupMessage *msg, gpointer user_data) static void clear_current_msg (SoupConnection *conn) { - SoupConnectionPrivate *priv = SOUP_CONNECTION_GET_PRIVATE (conn); + SoupConnectionPrivate *priv = soup_connection_get_instance_private (conn); SoupMessage *msg; msg = priv->current_msg; @@ -404,7 +281,7 @@ clear_current_msg (SoupConnection *conn) static void set_current_msg (SoupConnection *conn, SoupMessage *msg) { - SoupConnectionPrivate *priv = SOUP_CONNECTION_GET_PRIVATE (conn); + SoupConnectionPrivate *priv = soup_connection_get_instance_private (conn); g_return_if_fail (priv->state == SOUP_CONNECTION_IN_USE); @@ -446,19 +323,9 @@ static void socket_connect_finished (GTask *task, SoupSocket *sock, GError *error) { SoupConnection *conn = g_task_get_source_object (task); - SoupConnectionPrivate *priv = SOUP_CONNECTION_GET_PRIVATE (conn); - - if (priv->async_context && !priv->use_thread_context) - g_main_context_pop_thread_default (priv->async_context); - - g_signal_handlers_disconnect_by_func (sock, G_CALLBACK (re_emit_socket_event), conn); + SoupConnectionPrivate *priv = soup_connection_get_instance_private (conn); if (!error) { - if (priv->ssl && !priv->proxy_uri) { - soup_connection_event (conn, - G_SOCKET_CLIENT_TLS_HANDSHAKED, - NULL); - } if (!priv->ssl || !priv->proxy_uri) { soup_connection_event (conn, G_SOCKET_CLIENT_COMPLETE, @@ -492,7 +359,7 @@ socket_connect_complete (GObject *object, GAsyncResult *result, gpointer user_da SoupSocket *sock = SOUP_SOCKET (object); GTask *task = user_data; SoupConnection *conn = g_task_get_source_object (task); - SoupConnectionPrivate *priv = SOUP_CONNECTION_GET_PRIVATE (conn); + SoupConnectionPrivate *priv = soup_connection_get_instance_private (conn); GError *error = NULL; if (!soup_socket_connect_finish_internal (sock, result, &error)) { @@ -503,10 +370,6 @@ socket_connect_complete (GObject *object, GAsyncResult *result, gpointer user_da priv->proxy_uri = soup_socket_get_http_proxy_uri (sock); if (priv->ssl && !priv->proxy_uri) { - soup_connection_event (conn, - G_SOCKET_CLIENT_TLS_HANDSHAKING, - NULL); - soup_socket_handshake_async (sock, priv->remote_uri->host, g_task_get_cancellable (task), socket_handshake_complete, task); @@ -527,7 +390,7 @@ soup_connection_connect_async (SoupConnection *conn, GTask *task; g_return_if_fail (SOUP_IS_CONNECTION (conn)); - priv = SOUP_CONNECTION_GET_PRIVATE (conn); + priv = soup_connection_get_instance_private (conn); g_return_if_fail (priv->socket == NULL); soup_connection_set_state (conn, SOUP_CONNECTION_CONNECTING); @@ -542,27 +405,19 @@ soup_connection_connect_async (SoupConnection *conn, priv->socket = soup_socket_new (SOUP_SOCKET_REMOTE_ADDRESS, remote_addr, - SOUP_SOCKET_SSL_CREDENTIALS, priv->tlsdb, - SOUP_SOCKET_SSL_STRICT, priv->ssl_strict, - SOUP_SOCKET_SSL_FALLBACK, priv->ssl_fallback, - SOUP_SOCKET_ASYNC_CONTEXT, priv->async_context, - SOUP_SOCKET_USE_THREAD_CONTEXT, priv->use_thread_context, - SOUP_SOCKET_PROXY_RESOLVER, priv->proxy_resolver, - SOUP_SOCKET_TIMEOUT, priv->io_timeout, - SOUP_SOCKET_CLEAN_DISPOSE, TRUE, - SOUP_SOCKET_LOCAL_ADDRESS, priv->local_addr, + SOUP_SOCKET_SOCKET_PROPERTIES, priv->socket_props, NULL); g_object_unref (remote_addr); g_signal_connect (priv->socket, "event", G_CALLBACK (re_emit_socket_event), conn); - if (priv->async_context && !priv->use_thread_context) - g_main_context_push_thread_default (priv->async_context); + soup_socket_properties_push_async_context (priv->socket_props); task = g_task_new (conn, cancellable, callback, user_data); soup_socket_connect_async_internal (priv->socket, cancellable, socket_connect_complete, task); + soup_socket_properties_pop_async_context (priv->socket_props); } gboolean @@ -579,12 +434,10 @@ soup_connection_connect_sync (SoupConnection *conn, GError **error) { SoupConnectionPrivate *priv; - guint event_id = 0; SoupAddress *remote_addr; - gboolean success = TRUE; g_return_val_if_fail (SOUP_IS_CONNECTION (conn), FALSE); - priv = SOUP_CONNECTION_GET_PRIVATE (conn); + priv = soup_connection_get_instance_private (conn); g_return_val_if_fail (priv->socket == NULL, FALSE); soup_connection_set_state (conn, SOUP_CONNECTION_CONNECTING); @@ -599,39 +452,23 @@ soup_connection_connect_sync (SoupConnection *conn, priv->socket = soup_socket_new (SOUP_SOCKET_REMOTE_ADDRESS, remote_addr, - SOUP_SOCKET_PROXY_RESOLVER, priv->proxy_resolver, - SOUP_SOCKET_SSL_CREDENTIALS, priv->tlsdb, - SOUP_SOCKET_SSL_STRICT, priv->ssl_strict, - SOUP_SOCKET_SSL_FALLBACK, priv->ssl_fallback, + SOUP_SOCKET_SOCKET_PROPERTIES, priv->socket_props, SOUP_SOCKET_FLAG_NONBLOCKING, FALSE, - SOUP_SOCKET_TIMEOUT, priv->io_timeout, - SOUP_SOCKET_CLEAN_DISPOSE, TRUE, - SOUP_SOCKET_LOCAL_ADDRESS, priv->local_addr, NULL); g_object_unref (remote_addr); - event_id = g_signal_connect (priv->socket, "event", - G_CALLBACK (re_emit_socket_event), conn); - if (!soup_socket_connect_sync_internal (priv->socket, cancellable, error)) { - success = FALSE; - goto done; - } + g_signal_connect (priv->socket, "event", + G_CALLBACK (re_emit_socket_event), conn); + if (!soup_socket_connect_sync_internal (priv->socket, cancellable, error)) + return FALSE; priv->proxy_uri = soup_socket_get_http_proxy_uri (priv->socket); if (priv->ssl && !priv->proxy_uri) { - soup_connection_event (conn, - G_SOCKET_CLIENT_TLS_HANDSHAKING, - NULL); if (!soup_socket_handshake_sync (priv->socket, priv->remote_uri->host, - cancellable, error)) { - success = FALSE; - goto done; - } - soup_connection_event (conn, - G_SOCKET_CLIENT_TLS_HANDSHAKED, - NULL); + cancellable, error)) + return FALSE; } if (!priv->ssl || !priv->proxy_uri) { @@ -643,11 +480,7 @@ soup_connection_connect_sync (SoupConnection *conn, priv->unused_timeout = time (NULL) + SOUP_CONNECTION_UNUSED_TIMEOUT; start_idle_timer (conn); - done: - if (priv->socket && event_id) - g_signal_handler_disconnect (priv->socket, event_id); - - return success; + return TRUE; } gboolean @@ -656,7 +489,7 @@ soup_connection_is_tunnelled (SoupConnection *conn) SoupConnectionPrivate *priv; g_return_val_if_fail (SOUP_IS_CONNECTION (conn), FALSE); - priv = SOUP_CONNECTION_GET_PRIVATE (conn); + priv = soup_connection_get_instance_private (conn); return priv->ssl && priv->proxy_uri != NULL; } @@ -669,12 +502,10 @@ soup_connection_start_ssl_sync (SoupConnection *conn, SoupConnectionPrivate *priv; g_return_val_if_fail (SOUP_IS_CONNECTION (conn), FALSE); - priv = SOUP_CONNECTION_GET_PRIVATE (conn); + priv = soup_connection_get_instance_private (conn); - soup_connection_event (conn, G_SOCKET_CLIENT_TLS_HANDSHAKING, NULL); if (soup_socket_handshake_sync (priv->socket, priv->remote_uri->host, cancellable, error)) { - soup_connection_event (conn, G_SOCKET_CLIENT_TLS_HANDSHAKED, NULL); soup_connection_event (conn, G_SOCKET_CLIENT_COMPLETE, NULL); return TRUE; } else @@ -686,14 +517,10 @@ start_ssl_completed (GObject *object, GAsyncResult *result, gpointer user_data) { GTask *task = user_data; SoupConnection *conn = g_task_get_source_object (task); - SoupConnectionPrivate *priv = SOUP_CONNECTION_GET_PRIVATE (conn); + SoupConnectionPrivate *priv = soup_connection_get_instance_private (conn); GError *error = NULL; - if (priv->async_context && !priv->use_thread_context) - g_main_context_pop_thread_default (priv->async_context); - if (soup_socket_handshake_finish (priv->socket, result, &error)) { - soup_connection_event (conn, G_SOCKET_CLIENT_TLS_HANDSHAKED, NULL); soup_connection_event (conn, G_SOCKET_CLIENT_COMPLETE, NULL); g_task_return_boolean (task, TRUE); } else @@ -711,16 +538,15 @@ soup_connection_start_ssl_async (SoupConnection *conn, GTask *task; g_return_if_fail (SOUP_IS_CONNECTION (conn)); - priv = SOUP_CONNECTION_GET_PRIVATE (conn); + priv = soup_connection_get_instance_private (conn); - soup_connection_event (conn, G_SOCKET_CLIENT_TLS_HANDSHAKING, NULL); - - if (priv->async_context && !priv->use_thread_context) - g_main_context_push_thread_default (priv->async_context); + soup_socket_properties_push_async_context (priv->socket_props); task = g_task_new (conn, cancellable, callback, user_data); soup_socket_handshake_async (priv->socket, priv->remote_uri->host, cancellable, start_ssl_completed, task); + + soup_socket_properties_pop_async_context (priv->socket_props); } gboolean @@ -745,7 +571,7 @@ soup_connection_disconnect (SoupConnection *conn) SoupConnectionState old_state; g_return_if_fail (SOUP_IS_CONNECTION (conn)); - priv = SOUP_CONNECTION_GET_PRIVATE (conn); + priv = soup_connection_get_instance_private (conn); old_state = priv->state; if (old_state != SOUP_CONNECTION_DISCONNECTED) @@ -754,6 +580,8 @@ soup_connection_disconnect (SoupConnection *conn) if (priv->socket) { SoupSocket *socket = priv->socket; + g_signal_handlers_disconnect_by_func (socket, G_CALLBACK (re_emit_socket_event), conn); + priv->socket = NULL; soup_socket_disconnect (socket); g_object_unref (socket); @@ -766,33 +594,41 @@ soup_connection_disconnect (SoupConnection *conn) SoupSocket * soup_connection_get_socket (SoupConnection *conn) { + SoupConnectionPrivate *priv = soup_connection_get_instance_private (conn); + g_return_val_if_fail (SOUP_IS_CONNECTION (conn), NULL); - return SOUP_CONNECTION_GET_PRIVATE (conn)->socket; + return priv->socket; } SoupURI * soup_connection_get_remote_uri (SoupConnection *conn) { + SoupConnectionPrivate *priv = soup_connection_get_instance_private (conn); + g_return_val_if_fail (SOUP_IS_CONNECTION (conn), NULL); - return SOUP_CONNECTION_GET_PRIVATE (conn)->remote_uri; + return priv->remote_uri; } SoupURI * soup_connection_get_proxy_uri (SoupConnection *conn) { + SoupConnectionPrivate *priv = soup_connection_get_instance_private (conn); + g_return_val_if_fail (SOUP_IS_CONNECTION (conn), NULL); - return SOUP_CONNECTION_GET_PRIVATE (conn)->proxy_uri; + return priv->proxy_uri; } gboolean soup_connection_is_via_proxy (SoupConnection *conn) { + SoupConnectionPrivate *priv = soup_connection_get_instance_private (conn); + g_return_val_if_fail (SOUP_IS_CONNECTION (conn), FALSE); - return SOUP_CONNECTION_GET_PRIVATE (conn)->proxy_uri != NULL; + return priv->proxy_uri != NULL; } SoupConnectionState @@ -802,10 +638,11 @@ soup_connection_get_state (SoupConnection *conn) g_return_val_if_fail (SOUP_IS_CONNECTION (conn), SOUP_CONNECTION_DISCONNECTED); - priv = SOUP_CONNECTION_GET_PRIVATE (conn); + priv = soup_connection_get_instance_private (conn); if (priv->state == SOUP_CONNECTION_IDLE && - g_socket_condition_check (soup_socket_get_gsocket (priv->socket), G_IO_IN)) + (!soup_socket_is_connected (priv->socket) || + soup_socket_is_readable (priv->socket))) soup_connection_set_state (conn, SOUP_CONNECTION_REMOTE_DISCONNECTED); if (priv->state == SOUP_CONNECTION_IDLE && @@ -826,7 +663,7 @@ soup_connection_set_state (SoupConnection *conn, SoupConnectionState state) g_object_freeze_notify (G_OBJECT (conn)); - priv = SOUP_CONNECTION_GET_PRIVATE (conn); + priv = soup_connection_get_instance_private (conn); if (priv->current_msg) { g_warn_if_fail (state == SOUP_CONNECTION_IDLE || @@ -852,15 +689,11 @@ soup_connection_set_state (SoupConnection *conn, SoupConnectionState state) gboolean soup_connection_get_ever_used (SoupConnection *conn) { - g_return_val_if_fail (SOUP_IS_CONNECTION (conn), FALSE); + SoupConnectionPrivate *priv = soup_connection_get_instance_private (conn); - return SOUP_CONNECTION_GET_PRIVATE (conn)->unused_timeout == 0; -} + g_return_val_if_fail (SOUP_IS_CONNECTION (conn), FALSE); -gboolean -soup_connection_get_ssl_fallback (SoupConnection *conn) -{ - return SOUP_CONNECTION_GET_PRIVATE (conn)->ssl_fallback; + return priv->unused_timeout == 0; } void @@ -873,7 +706,7 @@ soup_connection_send_request (SoupConnection *conn, g_return_if_fail (SOUP_IS_CONNECTION (conn)); g_return_if_fail (item != NULL); - priv = SOUP_CONNECTION_GET_PRIVATE (conn); + priv = soup_connection_get_instance_private (conn); g_return_if_fail (priv->state != SOUP_CONNECTION_NEW && priv->state != SOUP_CONNECTION_DISCONNECTED); diff --git a/libsoup/soup-connection.h b/libsoup/soup-connection.h index b70a8a36..fe817de4 100644 --- a/libsoup/soup-connection.h +++ b/libsoup/soup-connection.h @@ -35,19 +35,10 @@ typedef struct { GType soup_connection_get_type (void); -#define SOUP_CONNECTION_LOCAL_ADDRESS "local-address" -#define SOUP_CONNECTION_REMOTE_URI "remote-uri" -#define SOUP_CONNECTION_PROXY_RESOLVER "proxy-resolver" -#define SOUP_CONNECTION_SSL "ssl" -#define SOUP_CONNECTION_SSL_CREDENTIALS "ssl-creds" -#define SOUP_CONNECTION_SSL_STRICT "ssl-strict" -#define SOUP_CONNECTION_SSL_FALLBACK "ssl-fallback" -#define SOUP_CONNECTION_ASYNC_CONTEXT "async-context" -#define SOUP_CONNECTION_USE_THREAD_CONTEXT "use-thread-context" -#define SOUP_CONNECTION_TIMEOUT "timeout" -#define SOUP_CONNECTION_IDLE_TIMEOUT "idle-timeout" -#define SOUP_CONNECTION_STATE "state" -#define SOUP_CONNECTION_MESSAGE "message" +#define SOUP_CONNECTION_REMOTE_URI "remote-uri" +#define SOUP_CONNECTION_SOCKET_PROPERTIES "socket-properties" +#define SOUP_CONNECTION_STATE "state" +#define SOUP_CONNECTION_SSL "ssl" void soup_connection_connect_async (SoupConnection *conn, GCancellable *cancellable, @@ -89,8 +80,6 @@ void soup_connection_send_request (SoupConnection *conn, SoupMessageCompletionFn completion_cb, gpointer user_data); -gboolean soup_connection_get_ssl_fallback (SoupConnection *conn); - G_END_DECLS #endif /* SOUP_CONNECTION_H */ diff --git a/libsoup/soup-content-decoder.c b/libsoup/soup-content-decoder.c index bce78c01..080904aa 100644 --- a/libsoup/soup-content-decoder.c +++ b/libsoup/soup-content-decoder.c @@ -63,6 +63,7 @@ static void soup_content_decoder_content_processor_init (SoupContentProcessorInt G_DEFINE_TYPE_WITH_CODE (SoupContentDecoder, soup_content_decoder, G_TYPE_OBJECT, + G_ADD_PRIVATE (SoupContentDecoder) G_IMPLEMENT_INTERFACE (SOUP_TYPE_SESSION_FEATURE, soup_content_decoder_session_feature_init) G_IMPLEMENT_INTERFACE (SOUP_TYPE_CONTENT_PROCESSOR, @@ -185,9 +186,7 @@ zlib_decoder_creator (void) static void soup_content_decoder_init (SoupContentDecoder *decoder) { - decoder->priv = G_TYPE_INSTANCE_GET_PRIVATE (decoder, - SOUP_TYPE_CONTENT_DECODER, - SoupContentDecoderPrivate); + decoder->priv = soup_content_decoder_get_instance_private (decoder); decoder->priv->decoders = g_hash_table_new (g_str_hash, g_str_equal); /* Hardcoded for now */ @@ -214,8 +213,6 @@ soup_content_decoder_class_init (SoupContentDecoderClass *decoder_class) { GObjectClass *object_class = G_OBJECT_CLASS (decoder_class); - g_type_class_add_private (decoder_class, sizeof (SoupContentDecoderPrivate)); - object_class->finalize = soup_content_decoder_finalize; } diff --git a/libsoup/soup-content-processor.c b/libsoup/soup-content-processor.c index 8b959ebe..ca1bd169 100644 --- a/libsoup/soup-content-processor.c +++ b/libsoup/soup-content-processor.c @@ -11,8 +11,6 @@ #include "soup-content-processor.h" #include "soup.h" -static void soup_content_processor_default_init (SoupContentProcessorInterface *interface); - G_DEFINE_INTERFACE (SoupContentProcessor, soup_content_processor, G_TYPE_OBJECT) static GInputStream * diff --git a/libsoup/soup-content-sniffer-stream.c b/libsoup/soup-content-sniffer-stream.c index d358a19e..b8a8c97e 100644 --- a/libsoup/soup-content-sniffer-stream.c +++ b/libsoup/soup-content-sniffer-stream.c @@ -14,12 +14,6 @@ #include "soup-content-sniffer-stream.h" #include "soup.h" -static void soup_content_sniffer_stream_pollable_init (GPollableInputStreamInterface *pollable_interface, gpointer interface_data); - -G_DEFINE_TYPE_WITH_CODE (SoupContentSnifferStream, soup_content_sniffer_stream, G_TYPE_FILTER_INPUT_STREAM, - G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_INPUT_STREAM, - soup_content_sniffer_stream_pollable_init)) - enum { PROP_0, @@ -40,6 +34,13 @@ struct _SoupContentSnifferStreamPrivate { GHashTable *sniffed_params; }; +static void soup_content_sniffer_stream_pollable_init (GPollableInputStreamInterface *pollable_interface, gpointer interface_data); + +G_DEFINE_TYPE_WITH_CODE (SoupContentSnifferStream, soup_content_sniffer_stream, G_TYPE_FILTER_INPUT_STREAM, + G_ADD_PRIVATE (SoupContentSnifferStream) + G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_INPUT_STREAM, + soup_content_sniffer_stream_pollable_init)) + static void soup_content_sniffer_stream_finalize (GObject *object) { @@ -288,9 +289,7 @@ soup_content_sniffer_stream_create_source (GPollableInputStream *stream, static void soup_content_sniffer_stream_init (SoupContentSnifferStream *sniffer) { - sniffer->priv = G_TYPE_INSTANCE_GET_PRIVATE (sniffer, - SOUP_TYPE_CONTENT_SNIFFER_STREAM, - SoupContentSnifferStreamPrivate); + sniffer->priv = soup_content_sniffer_stream_get_instance_private (sniffer); sniffer->priv->sniffing = TRUE; } @@ -301,8 +300,6 @@ soup_content_sniffer_stream_class_init (SoupContentSnifferStreamClass *sniffer_c GInputStreamClass *input_stream_class = G_INPUT_STREAM_CLASS (sniffer_class); - g_type_class_add_private (sniffer_class, sizeof (SoupContentSnifferStreamPrivate)); - object_class->finalize = soup_content_sniffer_stream_finalize; object_class->set_property = soup_content_sniffer_stream_set_property; object_class->get_property = soup_content_sniffer_stream_get_property; diff --git a/libsoup/soup-content-sniffer.c b/libsoup/soup-content-sniffer.c index 5659af9a..7573fde5 100644 --- a/libsoup/soup-content-sniffer.c +++ b/libsoup/soup-content-sniffer.c @@ -91,12 +91,12 @@ sniff_media (SoupContentSniffer *sniffer, int table_length) { const guchar *resource = (const guchar *)buffer->data; - int resource_length = MIN (512, buffer->length); + guint resource_length = MIN (512, buffer->length); int i; for (i = 0; i < table_length; i++) { SoupContentSnifferMediaPattern *type_row = &(table[i]); - int j; + guint j; if (resource_length < type_row->pattern_length) continue; @@ -226,9 +226,9 @@ static gboolean sniff_mp4 (SoupContentSniffer *sniffer, SoupBuffer *buffer) { const char *resource = (const char *)buffer->data; - int resource_length = MIN (512, buffer->length); + guint resource_length = MIN (512, buffer->length); guint32 box_size = *((guint32*)resource); - int i; + guint i; #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ box_size = ((box_size >> 24) | @@ -420,7 +420,7 @@ static SoupContentSnifferPattern types_table[] = { (const guchar *)"\x00\xFF\xFF\xFF\xFF\xFF", (const guchar *)" data; - int resource_length = MIN (512, buffer->length); - int i; + guint resource_length = MIN (512, buffer->length); + guint i; for (i = 0; i < G_N_ELEMENTS (types_table); i++) { SoupContentSnifferPattern *type_row = &(types_table[i]); @@ -500,8 +500,8 @@ sniff_unknown (SoupContentSniffer *sniffer, SoupBuffer *buffer, continue; if (type_row->has_ws) { - int index_stream = 0; - int index_pattern = 0; + guint index_stream = 0; + guint index_pattern = 0; gboolean skip_row = FALSE; while ((index_stream < resource_length) && @@ -538,7 +538,7 @@ sniff_unknown (SoupContentSniffer *sniffer, SoupBuffer *buffer, return g_strdup (type_row->sniffed_type); } } else { - int j; + guint j; if (resource_length < type_row->pattern_length) continue; @@ -854,7 +854,7 @@ soup_content_sniffer_request_queued (SoupSessionFeature *feature, { SoupMessagePrivate *priv = SOUP_MESSAGE_GET_PRIVATE (msg); - priv->sniffer = g_object_ref (feature); + priv->sniffer = g_object_ref (SOUP_CONTENT_SNIFFER (feature)); g_signal_connect (msg, "got-headers", G_CALLBACK (soup_content_sniffer_got_headers_cb), feature); @@ -898,7 +898,7 @@ soup_content_sniffer_session_feature_init (SoupSessionFeatureInterface *feature_ * Since: 2.28 **/ SoupContentSniffer * -soup_content_sniffer_new () +soup_content_sniffer_new (void) { return g_object_new (SOUP_TYPE_CONTENT_SNIFFER, NULL); } diff --git a/libsoup/soup-converter-wrapper.c b/libsoup/soup-converter-wrapper.c index 6fa19d91..133a3ebe 100644 --- a/libsoup/soup-converter-wrapper.c +++ b/libsoup/soup-converter-wrapper.c @@ -34,12 +34,6 @@ enum { PROP_MESSAGE }; -static void soup_converter_wrapper_iface_init (GConverterIface *iface); - -G_DEFINE_TYPE_WITH_CODE (SoupConverterWrapper, soup_converter_wrapper, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (G_TYPE_CONVERTER, - soup_converter_wrapper_iface_init)) - struct _SoupConverterWrapperPrivate { GConverter *base_converter; @@ -49,12 +43,17 @@ struct _SoupConverterWrapperPrivate gboolean discarding; }; +static void soup_converter_wrapper_iface_init (GConverterIface *iface); + +G_DEFINE_TYPE_WITH_CODE (SoupConverterWrapper, soup_converter_wrapper, G_TYPE_OBJECT, + G_ADD_PRIVATE (SoupConverterWrapper) + G_IMPLEMENT_INTERFACE (G_TYPE_CONVERTER, + soup_converter_wrapper_iface_init)) + static void soup_converter_wrapper_init (SoupConverterWrapper *converter) { - converter->priv = G_TYPE_INSTANCE_GET_PRIVATE (converter, - SOUP_TYPE_CONVERTER_WRAPPER, - SoupConverterWrapperPrivate); + converter->priv = soup_converter_wrapper_get_instance_private (converter); } static void @@ -129,8 +128,6 @@ soup_converter_wrapper_class_init (SoupConverterWrapperClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - g_type_class_add_private (klass, sizeof (SoupConverterWrapperPrivate)); - gobject_class->finalize = soup_converter_wrapper_finalize; gobject_class->get_property = soup_converter_wrapper_get_property; gobject_class->set_property = soup_converter_wrapper_set_property; @@ -247,8 +244,8 @@ soup_converter_wrapper_real_convert (GConverter *converter, &my_error); if (result != G_CONVERTER_ERROR) { if (!priv->started) { - SoupMessageFlags flags = soup_message_get_flags (priv->msg); - soup_message_set_flags (priv->msg, flags | SOUP_MESSAGE_CONTENT_DECODED); + SoupMessageFlags message_flags = soup_message_get_flags (priv->msg); + soup_message_set_flags (priv->msg, message_flags | SOUP_MESSAGE_CONTENT_DECODED); priv->started = TRUE; } diff --git a/libsoup/soup-cookie-jar-db.c b/libsoup/soup-cookie-jar-db.c index 8f21baab..0274038d 100644 --- a/libsoup/soup-cookie-jar-db.c +++ b/libsoup/soup-cookie-jar-db.c @@ -43,9 +43,7 @@ typedef struct { sqlite3 *db; } SoupCookieJarDBPrivate; -#define SOUP_COOKIE_JAR_DB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_COOKIE_JAR_DB, SoupCookieJarDBPrivate)) - -G_DEFINE_TYPE (SoupCookieJarDB, soup_cookie_jar_db, SOUP_TYPE_COOKIE_JAR) +G_DEFINE_TYPE_WITH_PRIVATE (SoupCookieJarDB, soup_cookie_jar_db, SOUP_TYPE_COOKIE_JAR) static void load (SoupCookieJar *jar); @@ -58,7 +56,7 @@ static void soup_cookie_jar_db_finalize (GObject *object) { SoupCookieJarDBPrivate *priv = - SOUP_COOKIE_JAR_DB_GET_PRIVATE (object); + soup_cookie_jar_db_get_instance_private (SOUP_COOKIE_JAR_DB (object)); g_free (priv->filename); g_clear_pointer (&priv->db, sqlite3_close); @@ -71,7 +69,7 @@ soup_cookie_jar_db_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { SoupCookieJarDBPrivate *priv = - SOUP_COOKIE_JAR_DB_GET_PRIVATE (object); + soup_cookie_jar_db_get_instance_private (SOUP_COOKIE_JAR_DB (object)); switch (prop_id) { case PROP_FILENAME: @@ -89,7 +87,7 @@ soup_cookie_jar_db_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { SoupCookieJarDBPrivate *priv = - SOUP_COOKIE_JAR_DB_GET_PRIVATE (object); + soup_cookie_jar_db_get_instance_private (SOUP_COOKIE_JAR_DB (object)); switch (prop_id) { case PROP_FILENAME: @@ -227,7 +225,7 @@ static gboolean open_db (SoupCookieJar *jar) { SoupCookieJarDBPrivate *priv = - SOUP_COOKIE_JAR_DB_GET_PRIVATE (jar); + soup_cookie_jar_db_get_instance_private (SOUP_COOKIE_JAR_DB (jar)); char *error = NULL; @@ -250,7 +248,7 @@ static void load (SoupCookieJar *jar) { SoupCookieJarDBPrivate *priv = - SOUP_COOKIE_JAR_DB_GET_PRIVATE (jar); + soup_cookie_jar_db_get_instance_private (SOUP_COOKIE_JAR_DB (jar)); if (priv->db == NULL) { if (open_db (jar)) @@ -266,7 +264,7 @@ soup_cookie_jar_db_changed (SoupCookieJar *jar, SoupCookie *new_cookie) { SoupCookieJarDBPrivate *priv = - SOUP_COOKIE_JAR_DB_GET_PRIVATE (jar); + soup_cookie_jar_db_get_instance_private (SOUP_COOKIE_JAR_DB (jar)); char *query; if (priv->db == NULL) { @@ -312,8 +310,6 @@ soup_cookie_jar_db_class_init (SoupCookieJarDBClass *db_class) SOUP_COOKIE_JAR_CLASS (db_class); GObjectClass *object_class = G_OBJECT_CLASS (db_class); - g_type_class_add_private (db_class, sizeof (SoupCookieJarDBPrivate)); - cookie_jar_class->is_persistent = soup_cookie_jar_db_is_persistent; cookie_jar_class->changed = soup_cookie_jar_db_changed; diff --git a/libsoup/soup-cookie-jar-text.c b/libsoup/soup-cookie-jar-text.c index 433c5710..46e12e54 100644 --- a/libsoup/soup-cookie-jar-text.c +++ b/libsoup/soup-cookie-jar-text.c @@ -36,9 +36,8 @@ typedef struct { char *filename; } SoupCookieJarTextPrivate; -#define SOUP_COOKIE_JAR_TEXT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_COOKIE_JAR_TEXT, SoupCookieJarTextPrivate)) -G_DEFINE_TYPE (SoupCookieJarText, soup_cookie_jar_text, SOUP_TYPE_COOKIE_JAR) +G_DEFINE_TYPE_WITH_PRIVATE (SoupCookieJarText, soup_cookie_jar_text, SOUP_TYPE_COOKIE_JAR) static void load (SoupCookieJar *jar); @@ -51,7 +50,7 @@ static void soup_cookie_jar_text_finalize (GObject *object) { SoupCookieJarTextPrivate *priv = - SOUP_COOKIE_JAR_TEXT_GET_PRIVATE (object); + soup_cookie_jar_text_get_instance_private (SOUP_COOKIE_JAR_TEXT (object)); g_free (priv->filename); @@ -63,7 +62,7 @@ soup_cookie_jar_text_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { SoupCookieJarTextPrivate *priv = - SOUP_COOKIE_JAR_TEXT_GET_PRIVATE (object); + soup_cookie_jar_text_get_instance_private (SOUP_COOKIE_JAR_TEXT (object)); switch (prop_id) { case PROP_FILENAME: @@ -81,7 +80,7 @@ soup_cookie_jar_text_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { SoupCookieJarTextPrivate *priv = - SOUP_COOKIE_JAR_TEXT_GET_PRIVATE (object); + soup_cookie_jar_text_get_instance_private (SOUP_COOKIE_JAR_TEXT (object)); switch (prop_id) { case PROP_FILENAME: @@ -192,7 +191,7 @@ static void load (SoupCookieJar *jar) { SoupCookieJarTextPrivate *priv = - SOUP_COOKIE_JAR_TEXT_GET_PRIVATE (jar); + soup_cookie_jar_text_get_instance_private (SOUP_COOKIE_JAR_TEXT (jar)); char *contents = NULL, *line, *p; gsize length = 0; time_t now = time (NULL); @@ -281,7 +280,7 @@ soup_cookie_jar_text_changed (SoupCookieJar *jar, { FILE *out; SoupCookieJarTextPrivate *priv = - SOUP_COOKIE_JAR_TEXT_GET_PRIVATE (jar); + soup_cookie_jar_text_get_instance_private (SOUP_COOKIE_JAR_TEXT (jar)); /* We can sort of ignore the semantics of the 'changed' * signal here and simply delete the old cookie if present @@ -338,8 +337,6 @@ soup_cookie_jar_text_class_init (SoupCookieJarTextClass *text_class) SOUP_COOKIE_JAR_CLASS (text_class); GObjectClass *object_class = G_OBJECT_CLASS (text_class); - g_type_class_add_private (text_class, sizeof (SoupCookieJarTextPrivate)); - cookie_jar_class->is_persistent = soup_cookie_jar_text_is_persistent; cookie_jar_class->changed = soup_cookie_jar_text_changed; diff --git a/libsoup/soup-cookie-jar.c b/libsoup/soup-cookie-jar.c index 83229705..2369c8a7 100644 --- a/libsoup/soup-cookie-jar.c +++ b/libsoup/soup-cookie-jar.c @@ -12,6 +12,7 @@ #include #include "soup-cookie-jar.h" +#include "soup-misc-private.h" #include "soup.h" /** @@ -28,12 +29,6 @@ * of long-term cookie persistence. **/ -static void soup_cookie_jar_session_feature_init (SoupSessionFeatureInterface *feature_interface, gpointer interface_data); - -G_DEFINE_TYPE_WITH_CODE (SoupCookieJar, soup_cookie_jar, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (SOUP_TYPE_SESSION_FEATURE, - soup_cookie_jar_session_feature_init)) - enum { CHANGED, LAST_SIGNAL @@ -56,12 +51,18 @@ typedef struct { guint serial; SoupCookieJarAcceptPolicy accept_policy; } SoupCookieJarPrivate; -#define SOUP_COOKIE_JAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_COOKIE_JAR, SoupCookieJarPrivate)) + +static void soup_cookie_jar_session_feature_init (SoupSessionFeatureInterface *feature_interface, gpointer interface_data); + +G_DEFINE_TYPE_WITH_CODE (SoupCookieJar, soup_cookie_jar, G_TYPE_OBJECT, + G_ADD_PRIVATE (SoupCookieJar) + G_IMPLEMENT_INTERFACE (SOUP_TYPE_SESSION_FEATURE, + soup_cookie_jar_session_feature_init)) static void soup_cookie_jar_init (SoupCookieJar *jar) { - SoupCookieJarPrivate *priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar); + SoupCookieJarPrivate *priv = soup_cookie_jar_get_instance_private (jar); priv->domains = g_hash_table_new_full (soup_str_case_hash, soup_str_case_equal, @@ -73,7 +74,8 @@ soup_cookie_jar_init (SoupCookieJar *jar) static void soup_cookie_jar_constructed (GObject *object) { - SoupCookieJarPrivate *priv = SOUP_COOKIE_JAR_GET_PRIVATE (object); + SoupCookieJarPrivate *priv = + soup_cookie_jar_get_instance_private (SOUP_COOKIE_JAR (object)); priv->constructed = TRUE; } @@ -81,7 +83,8 @@ soup_cookie_jar_constructed (GObject *object) static void soup_cookie_jar_finalize (GObject *object) { - SoupCookieJarPrivate *priv = SOUP_COOKIE_JAR_GET_PRIVATE (object); + SoupCookieJarPrivate *priv = + soup_cookie_jar_get_instance_private (SOUP_COOKIE_JAR (object)); GHashTableIter iter; gpointer key, value; @@ -99,7 +102,7 @@ soup_cookie_jar_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { SoupCookieJarPrivate *priv = - SOUP_COOKIE_JAR_GET_PRIVATE (object); + soup_cookie_jar_get_instance_private (SOUP_COOKIE_JAR (object)); switch (prop_id) { case PROP_READ_ONLY: @@ -119,7 +122,7 @@ soup_cookie_jar_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { SoupCookieJarPrivate *priv = - SOUP_COOKIE_JAR_GET_PRIVATE (object); + soup_cookie_jar_get_instance_private (SOUP_COOKIE_JAR (object)); switch (prop_id) { case PROP_READ_ONLY: @@ -145,8 +148,6 @@ soup_cookie_jar_class_init (SoupCookieJarClass *jar_class) { GObjectClass *object_class = G_OBJECT_CLASS (jar_class); - g_type_class_add_private (jar_class, sizeof (SoupCookieJarPrivate)); - object_class->constructed = soup_cookie_jar_constructed; object_class->finalize = soup_cookie_jar_finalize; object_class->set_property = soup_cookie_jar_set_property; @@ -255,7 +256,7 @@ static void soup_cookie_jar_changed (SoupCookieJar *jar, SoupCookie *old, SoupCookie *new) { - SoupCookieJarPrivate *priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar); + SoupCookieJarPrivate *priv = soup_cookie_jar_get_instance_private (jar); if (old && old != new) g_hash_table_remove (priv->serials, old); @@ -275,7 +276,7 @@ compare_cookies (gconstpointer a, gconstpointer b, gpointer jar) { SoupCookie *ca = (SoupCookie *)a; SoupCookie *cb = (SoupCookie *)b; - SoupCookieJarPrivate *priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar); + SoupCookieJarPrivate *priv = soup_cookie_jar_get_instance_private (jar); int alen, blen; guint aserial, bserial; @@ -304,7 +305,7 @@ get_cookies (SoupCookieJar *jar, SoupURI *uri, gboolean for_http, gboolean copy_ char *domain, *cur, *next_domain; GSList *new_head, *cookies_to_remove = NULL, *p; - priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar); + priv = soup_cookie_jar_get_instance_private (jar); if (!uri->host) return NULL; @@ -371,8 +372,8 @@ get_cookies (SoupCookieJar *jar, SoupURI *uri, gboolean for_http, gboolean copy_ * almost certainly be setting @for_http to %FALSE if you are calling * this. * - * Return value: the cookies, in string form, or %NULL if there are no - * cookies for @uri. + * Return value: (nullable): the cookies, in string form, or %NULL if + * there are no cookies for @uri. * * Since: 2.24 **/ @@ -462,7 +463,7 @@ soup_cookie_jar_add_cookie (SoupCookieJar *jar, SoupCookie *cookie) return; } - priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar); + priv = soup_cookie_jar_get_instance_private (jar); old_cookies = g_hash_table_lookup (priv->domains, cookie->domain); for (oc = old_cookies; oc; oc = oc->next) { old_cookie = oc->data; @@ -509,6 +510,38 @@ soup_cookie_jar_add_cookie (SoupCookieJar *jar, SoupCookie *cookie) soup_cookie_jar_changed (jar, NULL, cookie); } +static const char * +normalize_cookie_domain (const char *domain) +{ + /* Trim any leading dot if present to transform the cookie + * domain into a valid hostname. + */ + if (domain != NULL && domain[0] == '.') + return domain + 1; + return domain; +} + +static gboolean +incoming_cookie_is_third_party (SoupCookie *cookie, SoupURI *first_party) +{ + const char *normalized_cookie_domain; + const char *cookie_base_domain; + const char *first_party_base_domain; + + if (first_party == NULL || first_party->host == NULL) + return TRUE; + + normalized_cookie_domain = normalize_cookie_domain (cookie->domain); + cookie_base_domain = soup_tld_get_base_domain (normalized_cookie_domain, NULL); + if (cookie_base_domain == NULL) + cookie_base_domain = cookie->domain; + + first_party_base_domain = soup_tld_get_base_domain (first_party->host, NULL); + if (first_party_base_domain == NULL) + first_party_base_domain = first_party->host; + return !soup_host_matches_host (cookie_base_domain, first_party_base_domain); +} + /** * soup_cookie_jar_add_cookie_with_first_party: * @jar: a #SoupCookieJar @@ -535,14 +568,14 @@ soup_cookie_jar_add_cookie_with_first_party (SoupCookieJar *jar, SoupURI *first_ g_return_if_fail (first_party != NULL); g_return_if_fail (cookie != NULL); - priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar); + priv = soup_cookie_jar_get_instance_private (jar); if (priv->accept_policy == SOUP_COOKIE_JAR_ACCEPT_NEVER) { soup_cookie_free (cookie); return; } if (priv->accept_policy == SOUP_COOKIE_JAR_ACCEPT_ALWAYS || - soup_cookie_domain_matches (cookie, first_party->host)) { + !incoming_cookie_is_third_party (cookie, first_party)) { /* will steal or free soup_cookie */ soup_cookie_jar_add_cookie (jar, cookie); } else { @@ -581,7 +614,7 @@ soup_cookie_jar_set_cookie (SoupCookieJar *jar, SoupURI *uri, if (!uri->host) return; - priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar); + priv = soup_cookie_jar_get_instance_private (jar); if (priv->accept_policy == SOUP_COOKIE_JAR_ACCEPT_NEVER) return; @@ -633,7 +666,7 @@ static void process_set_cookie_header (SoupMessage *msg, gpointer user_data) { SoupCookieJar *jar = user_data; - SoupCookieJarPrivate *priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar); + SoupCookieJarPrivate *priv = soup_cookie_jar_get_instance_private (jar); GSList *new_cookies, *nc; if (priv->accept_policy == SOUP_COOKIE_JAR_ACCEPT_NEVER) @@ -644,8 +677,7 @@ process_set_cookie_header (SoupMessage *msg, gpointer user_data) SoupURI *first_party = soup_message_get_first_party (msg); if ((priv->accept_policy == SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY && - first_party != NULL && first_party->host && - soup_cookie_domain_matches (nc->data, first_party->host)) || + !incoming_cookie_is_third_party (nc->data, first_party)) || priv->accept_policy == SOUP_COOKIE_JAR_ACCEPT_ALWAYS) soup_cookie_jar_add_cookie (jar, nc->data); else @@ -655,21 +687,7 @@ process_set_cookie_header (SoupMessage *msg, gpointer user_data) } static void -soup_cookie_jar_request_queued (SoupSessionFeature *feature, - SoupSession *session, - SoupMessage *msg) -{ - soup_message_add_header_handler (msg, "got-headers", - "Set-Cookie", - G_CALLBACK (process_set_cookie_header), - feature); -} - -static void -soup_cookie_jar_request_started (SoupSessionFeature *feature, - SoupSession *session, - SoupMessage *msg, - SoupSocket *socket) +msg_starting_cb (SoupMessage *msg, gpointer feature) { SoupCookieJar *jar = SOUP_COOKIE_JAR (feature); char *cookies; @@ -683,6 +701,21 @@ soup_cookie_jar_request_started (SoupSessionFeature *feature, soup_message_headers_remove (msg->request_headers, "Cookie"); } +static void +soup_cookie_jar_request_queued (SoupSessionFeature *feature, + SoupSession *session, + SoupMessage *msg) +{ + g_signal_connect (msg, "starting", + G_CALLBACK (msg_starting_cb), + feature); + + soup_message_add_header_handler (msg, "got-headers", + "Set-Cookie", + G_CALLBACK (process_set_cookie_header), + feature); +} + static void soup_cookie_jar_request_unqueued (SoupSessionFeature *feature, SoupSession *session, @@ -696,7 +729,6 @@ soup_cookie_jar_session_feature_init (SoupSessionFeatureInterface *feature_inter gpointer interface_data) { feature_interface->request_queued = soup_cookie_jar_request_queued; - feature_interface->request_started = soup_cookie_jar_request_started; feature_interface->request_unqueued = soup_cookie_jar_request_unqueued; } @@ -723,7 +755,7 @@ soup_cookie_jar_all_cookies (SoupCookieJar *jar) g_return_val_if_fail (SOUP_IS_COOKIE_JAR (jar), NULL); - priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar); + priv = soup_cookie_jar_get_instance_private (jar); g_hash_table_iter_init (&iter, priv->domains); @@ -751,16 +783,13 @@ soup_cookie_jar_delete_cookie (SoupCookieJar *jar, { SoupCookieJarPrivate *priv; GSList *cookies, *p; - char *domain; g_return_if_fail (SOUP_IS_COOKIE_JAR (jar)); g_return_if_fail (cookie != NULL); - priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar); - - domain = g_strdup (cookie->domain); + priv = soup_cookie_jar_get_instance_private (jar); - cookies = g_hash_table_lookup (priv->domains, domain); + cookies = g_hash_table_lookup (priv->domains, cookie->domain); if (cookies == NULL) return; @@ -769,7 +798,7 @@ soup_cookie_jar_delete_cookie (SoupCookieJar *jar, if (soup_cookie_equal (cookie, c)) { cookies = g_slist_delete_link (cookies, p); g_hash_table_insert (priv->domains, - domain, + g_strdup (cookie->domain), cookies); soup_cookie_jar_changed (jar, c, NULL); soup_cookie_free (c); @@ -817,7 +846,7 @@ soup_cookie_jar_get_accept_policy (SoupCookieJar *jar) g_return_val_if_fail (SOUP_IS_COOKIE_JAR (jar), SOUP_COOKIE_JAR_ACCEPT_ALWAYS); - priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar); + priv = soup_cookie_jar_get_instance_private (jar); return priv->accept_policy; } @@ -838,7 +867,7 @@ soup_cookie_jar_set_accept_policy (SoupCookieJar *jar, g_return_if_fail (SOUP_IS_COOKIE_JAR (jar)); - priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar); + priv = soup_cookie_jar_get_instance_private (jar); if (priv->accept_policy != policy) { priv->accept_policy = policy; diff --git a/libsoup/soup-cookie.c b/libsoup/soup-cookie.c old mode 100755 new mode 100644 index de5efa13..1d0dde3c --- a/libsoup/soup-cookie.c +++ b/libsoup/soup-cookie.c @@ -13,6 +13,7 @@ #include #include "soup-cookie.h" +#include "soup-misc-private.h" #include "soup.h" /** @@ -107,28 +108,10 @@ soup_cookie_copy (SoupCookie *cookie) gboolean soup_cookie_domain_matches (SoupCookie *cookie, const char *host) { - char *match; - int dlen; - const char *domain; - g_return_val_if_fail (cookie != NULL, FALSE); g_return_val_if_fail (host != NULL, FALSE); - domain = cookie->domain; - - if (!g_ascii_strcasecmp (domain, host)) - return TRUE; - if (*domain != '.') - return FALSE; - if (!g_ascii_strcasecmp (domain + 1, host)) - return TRUE; - dlen = strlen (domain); - while ((match = strstr (host, domain))) { - if (!match[dlen]) - return TRUE; - host = match + 1; - } - return FALSE; + return soup_host_matches_host (cookie->domain, host); } static inline const char * @@ -403,9 +386,9 @@ soup_cookie_new (const char *name, const char *value, * appropriate string for the domain if you want to actually make use * of the cookie. * - * Return value: a new #SoupCookie, or %NULL if it could not be - * parsed, or contained an illegal "domain" attribute for a cookie - * originating from @origin. + * Return value: (nullable): a new #SoupCookie, or %NULL if it could + * not be parsed, or contained an illegal "domain" attribute for a + * cookie originating from @origin. * * Since: 2.24 **/ @@ -615,10 +598,11 @@ soup_cookie_set_max_age (SoupCookie *cookie, int max_age) * soup_cookie_get_expires: * @cookie: a #SoupCookie * - * Gets @cookie's expiration time + * Gets @cookie's expiration time. * - * Return value: (transfer none): @cookie's expiration time, which is - * owned by @cookie and should not be modified or freed. + * Return value: (nullable) (transfer none): @cookie's expiration + * time, which is owned by @cookie and should not be modified or + * freed. * * Since: 2.32 **/ @@ -1029,7 +1013,7 @@ soup_cookie_applies_to_uri (SoupCookie *cookie, SoupURI *uri) { int plen; - if (cookie->secure && uri->scheme != SOUP_URI_SCHEME_HTTPS) + if (cookie->secure && !soup_uri_is_https (uri, NULL)) return FALSE; if (cookie->expires && soup_date_is_past (cookie->expires)) diff --git a/libsoup/soup-date.c b/libsoup/soup-date.c index d3dcf6f4..dabae9d4 100644 --- a/libsoup/soup-date.c +++ b/libsoup/soup-date.c @@ -466,8 +466,8 @@ parse_textual_date (SoupDate *date, const char *date_string) * and reasonable approximations thereof. (Eg, it is lenient about * whitespace, leading "0"s, etc.) * - * Return value: a new #SoupDate, or %NULL if @date_string could not - * be parsed. + * Return value: (nullable): a new #SoupDate, or %NULL if @date_string + * could not be parsed. **/ SoupDate * soup_date_new_from_string (const char *date_string) diff --git a/libsoup/soup-enum-types.c b/libsoup/soup-enum-types.c index 0544cf6a..011d457d 100644 --- a/libsoup/soup-enum-types.c +++ b/libsoup/soup-enum-types.c @@ -1,9 +1,14 @@ - +/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ /* Generated by glib-mkenums. Do not edit */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include "soup-enum-types.h" + #define LIBSOUP_USE_UNSTABLE_REQUEST_API #include "soup.h" #include "soup-address.h" @@ -12,6 +17,7 @@ #include "soup-auth-domain-basic.h" #include "soup-auth-domain-digest.h" #include "soup-auth-manager.h" +#include "soup-autocleanups.h" #include "soup-cache.h" #include "soup-content-decoder.h" #include "soup-content-sniffer.h" @@ -51,11 +57,13 @@ #include "soup-types.h" #include "soup-uri.h" #include "soup-value-utils.h" +#include "soup-websocket.h" +#include "soup-websocket-connection.h" #include "soup-xmlrpc.h" +#include "soup-xmlrpc-old.h" #include "soup-cookie-jar-sqlite.h" #include "soup-gnome.h" #include "soup-gnome-features.h" - GType soup_address_family_get_type (void) { @@ -202,148 +210,150 @@ soup_logger_log_level_get_type (void) return g_define_type_id__volatile; } GType -soup_http_version_get_type (void) +soup_memory_use_get_type (void) { static volatile gsize g_define_type_id__volatile = 0; if (g_once_init_enter (&g_define_type_id__volatile)) { static const GEnumValue values[] = { - { SOUP_HTTP_1_0, "SOUP_HTTP_1_0", "http-1-0" }, - { SOUP_HTTP_1_1, "SOUP_HTTP_1_1", "http-1-1" }, + { SOUP_MEMORY_STATIC, "SOUP_MEMORY_STATIC", "static" }, + { SOUP_MEMORY_TAKE, "SOUP_MEMORY_TAKE", "take" }, + { SOUP_MEMORY_COPY, "SOUP_MEMORY_COPY", "copy" }, + { SOUP_MEMORY_TEMPORARY, "SOUP_MEMORY_TEMPORARY", "temporary" }, { 0, NULL, NULL } }; GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("SoupHTTPVersion"), values); + g_enum_register_static (g_intern_static_string ("SoupMemoryUse"), values); g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); } return g_define_type_id__volatile; } GType -soup_message_flags_get_type (void) +soup_message_headers_type_get_type (void) { static volatile gsize g_define_type_id__volatile = 0; if (g_once_init_enter (&g_define_type_id__volatile)) { - static const GFlagsValue values[] = { - { SOUP_MESSAGE_NO_REDIRECT, "SOUP_MESSAGE_NO_REDIRECT", "no-redirect" }, - { SOUP_MESSAGE_CAN_REBUILD, "SOUP_MESSAGE_CAN_REBUILD", "can-rebuild" }, - { SOUP_MESSAGE_OVERWRITE_CHUNKS, "SOUP_MESSAGE_OVERWRITE_CHUNKS", "overwrite-chunks" }, - { SOUP_MESSAGE_CONTENT_DECODED, "SOUP_MESSAGE_CONTENT_DECODED", "content-decoded" }, - { SOUP_MESSAGE_CERTIFICATE_TRUSTED, "SOUP_MESSAGE_CERTIFICATE_TRUSTED", "certificate-trusted" }, - { SOUP_MESSAGE_NEW_CONNECTION, "SOUP_MESSAGE_NEW_CONNECTION", "new-connection" }, - { SOUP_MESSAGE_IDEMPOTENT, "SOUP_MESSAGE_IDEMPOTENT", "idempotent" }, + static const GEnumValue values[] = { + { SOUP_MESSAGE_HEADERS_REQUEST, "SOUP_MESSAGE_HEADERS_REQUEST", "request" }, + { SOUP_MESSAGE_HEADERS_RESPONSE, "SOUP_MESSAGE_HEADERS_RESPONSE", "response" }, + { SOUP_MESSAGE_HEADERS_MULTIPART, "SOUP_MESSAGE_HEADERS_MULTIPART", "multipart" }, { 0, NULL, NULL } }; GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("SoupMessageFlags"), values); + g_enum_register_static (g_intern_static_string ("SoupMessageHeadersType"), values); g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); } return g_define_type_id__volatile; } GType -soup_message_priority_get_type (void) +soup_encoding_get_type (void) { static volatile gsize g_define_type_id__volatile = 0; if (g_once_init_enter (&g_define_type_id__volatile)) { static const GEnumValue values[] = { - { SOUP_MESSAGE_PRIORITY_VERY_LOW, "SOUP_MESSAGE_PRIORITY_VERY_LOW", "very-low" }, - { SOUP_MESSAGE_PRIORITY_LOW, "SOUP_MESSAGE_PRIORITY_LOW", "low" }, - { SOUP_MESSAGE_PRIORITY_NORMAL, "SOUP_MESSAGE_PRIORITY_NORMAL", "normal" }, - { SOUP_MESSAGE_PRIORITY_HIGH, "SOUP_MESSAGE_PRIORITY_HIGH", "high" }, - { SOUP_MESSAGE_PRIORITY_VERY_HIGH, "SOUP_MESSAGE_PRIORITY_VERY_HIGH", "very-high" }, + { SOUP_ENCODING_UNRECOGNIZED, "SOUP_ENCODING_UNRECOGNIZED", "unrecognized" }, + { SOUP_ENCODING_NONE, "SOUP_ENCODING_NONE", "none" }, + { SOUP_ENCODING_CONTENT_LENGTH, "SOUP_ENCODING_CONTENT_LENGTH", "content-length" }, + { SOUP_ENCODING_EOF, "SOUP_ENCODING_EOF", "eof" }, + { SOUP_ENCODING_CHUNKED, "SOUP_ENCODING_CHUNKED", "chunked" }, + { SOUP_ENCODING_BYTERANGES, "SOUP_ENCODING_BYTERANGES", "byteranges" }, { 0, NULL, NULL } }; GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("SoupMessagePriority"), values); + g_enum_register_static (g_intern_static_string ("SoupEncoding"), values); g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); } return g_define_type_id__volatile; } GType -soup_memory_use_get_type (void) +soup_expectation_get_type (void) { static volatile gsize g_define_type_id__volatile = 0; if (g_once_init_enter (&g_define_type_id__volatile)) { - static const GEnumValue values[] = { - { SOUP_MEMORY_STATIC, "SOUP_MEMORY_STATIC", "static" }, - { SOUP_MEMORY_TAKE, "SOUP_MEMORY_TAKE", "take" }, - { SOUP_MEMORY_COPY, "SOUP_MEMORY_COPY", "copy" }, - { SOUP_MEMORY_TEMPORARY, "SOUP_MEMORY_TEMPORARY", "temporary" }, + static const GFlagsValue values[] = { + { SOUP_EXPECTATION_UNRECOGNIZED, "SOUP_EXPECTATION_UNRECOGNIZED", "unrecognized" }, + { SOUP_EXPECTATION_CONTINUE, "SOUP_EXPECTATION_CONTINUE", "continue" }, { 0, NULL, NULL } }; GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("SoupMemoryUse"), values); + g_flags_register_static (g_intern_static_string ("SoupExpectation"), values); g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); } return g_define_type_id__volatile; } GType -soup_message_headers_type_get_type (void) +soup_http_version_get_type (void) { static volatile gsize g_define_type_id__volatile = 0; if (g_once_init_enter (&g_define_type_id__volatile)) { static const GEnumValue values[] = { - { SOUP_MESSAGE_HEADERS_REQUEST, "SOUP_MESSAGE_HEADERS_REQUEST", "request" }, - { SOUP_MESSAGE_HEADERS_RESPONSE, "SOUP_MESSAGE_HEADERS_RESPONSE", "response" }, - { SOUP_MESSAGE_HEADERS_MULTIPART, "SOUP_MESSAGE_HEADERS_MULTIPART", "multipart" }, + { SOUP_HTTP_1_0, "SOUP_HTTP_1_0", "http-1-0" }, + { SOUP_HTTP_1_1, "SOUP_HTTP_1_1", "http-1-1" }, { 0, NULL, NULL } }; GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("SoupMessageHeadersType"), values); + g_enum_register_static (g_intern_static_string ("SoupHTTPVersion"), values); g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); } return g_define_type_id__volatile; } GType -soup_encoding_get_type (void) +soup_message_flags_get_type (void) { static volatile gsize g_define_type_id__volatile = 0; if (g_once_init_enter (&g_define_type_id__volatile)) { - static const GEnumValue values[] = { - { SOUP_ENCODING_UNRECOGNIZED, "SOUP_ENCODING_UNRECOGNIZED", "unrecognized" }, - { SOUP_ENCODING_NONE, "SOUP_ENCODING_NONE", "none" }, - { SOUP_ENCODING_CONTENT_LENGTH, "SOUP_ENCODING_CONTENT_LENGTH", "content-length" }, - { SOUP_ENCODING_EOF, "SOUP_ENCODING_EOF", "eof" }, - { SOUP_ENCODING_CHUNKED, "SOUP_ENCODING_CHUNKED", "chunked" }, - { SOUP_ENCODING_BYTERANGES, "SOUP_ENCODING_BYTERANGES", "byteranges" }, + static const GFlagsValue values[] = { + { SOUP_MESSAGE_NO_REDIRECT, "SOUP_MESSAGE_NO_REDIRECT", "no-redirect" }, + { SOUP_MESSAGE_CAN_REBUILD, "SOUP_MESSAGE_CAN_REBUILD", "can-rebuild" }, + { SOUP_MESSAGE_OVERWRITE_CHUNKS, "SOUP_MESSAGE_OVERWRITE_CHUNKS", "overwrite-chunks" }, + { SOUP_MESSAGE_CONTENT_DECODED, "SOUP_MESSAGE_CONTENT_DECODED", "content-decoded" }, + { SOUP_MESSAGE_CERTIFICATE_TRUSTED, "SOUP_MESSAGE_CERTIFICATE_TRUSTED", "certificate-trusted" }, + { SOUP_MESSAGE_NEW_CONNECTION, "SOUP_MESSAGE_NEW_CONNECTION", "new-connection" }, + { SOUP_MESSAGE_IDEMPOTENT, "SOUP_MESSAGE_IDEMPOTENT", "idempotent" }, + { SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS, "SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS", "ignore-connection-limits" }, + { SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE, "SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE", "do-not-use-auth-cache" }, { 0, NULL, NULL } }; GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("SoupEncoding"), values); + g_flags_register_static (g_intern_static_string ("SoupMessageFlags"), values); g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); } return g_define_type_id__volatile; } GType -soup_expectation_get_type (void) +soup_message_priority_get_type (void) { static volatile gsize g_define_type_id__volatile = 0; if (g_once_init_enter (&g_define_type_id__volatile)) { - static const GFlagsValue values[] = { - { SOUP_EXPECTATION_UNRECOGNIZED, "SOUP_EXPECTATION_UNRECOGNIZED", "unrecognized" }, - { SOUP_EXPECTATION_CONTINUE, "SOUP_EXPECTATION_CONTINUE", "continue" }, + static const GEnumValue values[] = { + { SOUP_MESSAGE_PRIORITY_VERY_LOW, "SOUP_MESSAGE_PRIORITY_VERY_LOW", "very-low" }, + { SOUP_MESSAGE_PRIORITY_LOW, "SOUP_MESSAGE_PRIORITY_LOW", "low" }, + { SOUP_MESSAGE_PRIORITY_NORMAL, "SOUP_MESSAGE_PRIORITY_NORMAL", "normal" }, + { SOUP_MESSAGE_PRIORITY_HIGH, "SOUP_MESSAGE_PRIORITY_HIGH", "high" }, + { SOUP_MESSAGE_PRIORITY_VERY_HIGH, "SOUP_MESSAGE_PRIORITY_VERY_HIGH", "very-high" }, { 0, NULL, NULL } }; GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("SoupExpectation"), values); + g_enum_register_static (g_intern_static_string ("SoupMessagePriority"), values); g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); } @@ -392,6 +402,26 @@ soup_requester_error_get_type (void) return g_define_type_id__volatile; } GType +soup_server_listen_options_get_type (void) +{ + static volatile gsize g_define_type_id__volatile = 0; + + if (g_once_init_enter (&g_define_type_id__volatile)) + { + static const GFlagsValue values[] = { + { SOUP_SERVER_LISTEN_HTTPS, "SOUP_SERVER_LISTEN_HTTPS", "https" }, + { SOUP_SERVER_LISTEN_IPV4_ONLY, "SOUP_SERVER_LISTEN_IPV4_ONLY", "ipv4-only" }, + { SOUP_SERVER_LISTEN_IPV6_ONLY, "SOUP_SERVER_LISTEN_IPV6_ONLY", "ipv6-only" }, + { 0, NULL, NULL } + }; + GType g_define_type_id = + g_flags_register_static (g_intern_static_string ("SoupServerListenOptions"), values); + g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + } + + return g_define_type_id__volatile; +} +GType soup_request_error_get_type (void) { static volatile gsize g_define_type_id__volatile = 0; @@ -615,6 +645,115 @@ soup_tld_error_get_type (void) return g_define_type_id__volatile; } GType +soup_websocket_error_get_type (void) +{ + static volatile gsize g_define_type_id__volatile = 0; + + if (g_once_init_enter (&g_define_type_id__volatile)) + { + static const GEnumValue values[] = { + { SOUP_WEBSOCKET_ERROR_FAILED, "SOUP_WEBSOCKET_ERROR_FAILED", "failed" }, + { SOUP_WEBSOCKET_ERROR_NOT_WEBSOCKET, "SOUP_WEBSOCKET_ERROR_NOT_WEBSOCKET", "not-websocket" }, + { SOUP_WEBSOCKET_ERROR_BAD_HANDSHAKE, "SOUP_WEBSOCKET_ERROR_BAD_HANDSHAKE", "bad-handshake" }, + { SOUP_WEBSOCKET_ERROR_BAD_ORIGIN, "SOUP_WEBSOCKET_ERROR_BAD_ORIGIN", "bad-origin" }, + { 0, NULL, NULL } + }; + GType g_define_type_id = + g_enum_register_static (g_intern_static_string ("SoupWebsocketError"), values); + g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + } + + return g_define_type_id__volatile; +} +GType +soup_websocket_connection_type_get_type (void) +{ + static volatile gsize g_define_type_id__volatile = 0; + + if (g_once_init_enter (&g_define_type_id__volatile)) + { + static const GEnumValue values[] = { + { SOUP_WEBSOCKET_CONNECTION_UNKNOWN, "SOUP_WEBSOCKET_CONNECTION_UNKNOWN", "unknown" }, + { SOUP_WEBSOCKET_CONNECTION_CLIENT, "SOUP_WEBSOCKET_CONNECTION_CLIENT", "client" }, + { SOUP_WEBSOCKET_CONNECTION_SERVER, "SOUP_WEBSOCKET_CONNECTION_SERVER", "server" }, + { 0, NULL, NULL } + }; + GType g_define_type_id = + g_enum_register_static (g_intern_static_string ("SoupWebsocketConnectionType"), values); + g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + } + + return g_define_type_id__volatile; +} +GType +soup_websocket_data_type_get_type (void) +{ + static volatile gsize g_define_type_id__volatile = 0; + + if (g_once_init_enter (&g_define_type_id__volatile)) + { + static const GEnumValue values[] = { + { SOUP_WEBSOCKET_DATA_TEXT, "SOUP_WEBSOCKET_DATA_TEXT", "text" }, + { SOUP_WEBSOCKET_DATA_BINARY, "SOUP_WEBSOCKET_DATA_BINARY", "binary" }, + { 0, NULL, NULL } + }; + GType g_define_type_id = + g_enum_register_static (g_intern_static_string ("SoupWebsocketDataType"), values); + g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + } + + return g_define_type_id__volatile; +} +GType +soup_websocket_close_code_get_type (void) +{ + static volatile gsize g_define_type_id__volatile = 0; + + if (g_once_init_enter (&g_define_type_id__volatile)) + { + static const GEnumValue values[] = { + { SOUP_WEBSOCKET_CLOSE_NORMAL, "SOUP_WEBSOCKET_CLOSE_NORMAL", "normal" }, + { SOUP_WEBSOCKET_CLOSE_GOING_AWAY, "SOUP_WEBSOCKET_CLOSE_GOING_AWAY", "going-away" }, + { SOUP_WEBSOCKET_CLOSE_PROTOCOL_ERROR, "SOUP_WEBSOCKET_CLOSE_PROTOCOL_ERROR", "protocol-error" }, + { SOUP_WEBSOCKET_CLOSE_UNSUPPORTED_DATA, "SOUP_WEBSOCKET_CLOSE_UNSUPPORTED_DATA", "unsupported-data" }, + { SOUP_WEBSOCKET_CLOSE_NO_STATUS, "SOUP_WEBSOCKET_CLOSE_NO_STATUS", "no-status" }, + { SOUP_WEBSOCKET_CLOSE_ABNORMAL, "SOUP_WEBSOCKET_CLOSE_ABNORMAL", "abnormal" }, + { SOUP_WEBSOCKET_CLOSE_BAD_DATA, "SOUP_WEBSOCKET_CLOSE_BAD_DATA", "bad-data" }, + { SOUP_WEBSOCKET_CLOSE_POLICY_VIOLATION, "SOUP_WEBSOCKET_CLOSE_POLICY_VIOLATION", "policy-violation" }, + { SOUP_WEBSOCKET_CLOSE_TOO_BIG, "SOUP_WEBSOCKET_CLOSE_TOO_BIG", "too-big" }, + { SOUP_WEBSOCKET_CLOSE_NO_EXTENSION, "SOUP_WEBSOCKET_CLOSE_NO_EXTENSION", "no-extension" }, + { SOUP_WEBSOCKET_CLOSE_SERVER_ERROR, "SOUP_WEBSOCKET_CLOSE_SERVER_ERROR", "server-error" }, + { SOUP_WEBSOCKET_CLOSE_TLS_HANDSHAKE, "SOUP_WEBSOCKET_CLOSE_TLS_HANDSHAKE", "tls-handshake" }, + { 0, NULL, NULL } + }; + GType g_define_type_id = + g_enum_register_static (g_intern_static_string ("SoupWebsocketCloseCode"), values); + g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + } + + return g_define_type_id__volatile; +} +GType +soup_websocket_state_get_type (void) +{ + static volatile gsize g_define_type_id__volatile = 0; + + if (g_once_init_enter (&g_define_type_id__volatile)) + { + static const GEnumValue values[] = { + { SOUP_WEBSOCKET_STATE_OPEN, "SOUP_WEBSOCKET_STATE_OPEN", "open" }, + { SOUP_WEBSOCKET_STATE_CLOSING, "SOUP_WEBSOCKET_STATE_CLOSING", "closing" }, + { SOUP_WEBSOCKET_STATE_CLOSED, "SOUP_WEBSOCKET_STATE_CLOSED", "closed" }, + { 0, NULL, NULL } + }; + GType g_define_type_id = + g_enum_register_static (g_intern_static_string ("SoupWebsocketState"), values); + g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + } + + return g_define_type_id__volatile; +} +GType soup_xmlrpc_error_get_type (void) { static volatile gsize g_define_type_id__volatile = 0; @@ -661,5 +800,5 @@ soup_xmlrpc_fault_get_type (void) return g_define_type_id__volatile; } - +/* Generated data ends here */ diff --git a/libsoup/soup-enum-types.h b/libsoup/soup-enum-types.h index cc7b3da3..ccef30b6 100644 --- a/libsoup/soup-enum-types.h +++ b/libsoup/soup-enum-types.h @@ -1,63 +1,80 @@ - +/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ /* Generated by glib-mkenums. Do not edit */ #ifndef __SOUP_ENUM_TYPES_H__ #define __SOUP_ENUM_TYPES_H__ +#include +#define GLIB_MKENUMS_EXTERN _SOUP_EXTERN #include G_BEGIN_DECLS -GType soup_address_family_get_type (void) G_GNUC_CONST; +#ifndef GLIB_MKENUMS_EXTERN +#define GLIB_MKENUMS_EXTERN +#endif +GLIB_MKENUMS_EXTERN GType soup_address_family_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_ADDRESS_FAMILY (soup_address_family_get_type ()) -GType soup_cacheability_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_cacheability_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_CACHEABILITY (soup_cacheability_get_type ()) -GType soup_cache_response_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_cache_response_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_CACHE_RESPONSE (soup_cache_response_get_type ()) -GType soup_cache_type_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_cache_type_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_CACHE_TYPE (soup_cache_type_get_type ()) -GType soup_cookie_jar_accept_policy_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_cookie_jar_accept_policy_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_COOKIE_JAR_ACCEPT_POLICY (soup_cookie_jar_accept_policy_get_type ()) -GType soup_date_format_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_date_format_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_DATE_FORMAT (soup_date_format_get_type ()) -GType soup_logger_log_level_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_logger_log_level_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_LOGGER_LOG_LEVEL (soup_logger_log_level_get_type ()) -GType soup_http_version_get_type (void) G_GNUC_CONST; -#define SOUP_TYPE_HTTP_VERSION (soup_http_version_get_type ()) -GType soup_message_flags_get_type (void) G_GNUC_CONST; -#define SOUP_TYPE_MESSAGE_FLAGS (soup_message_flags_get_type ()) -GType soup_message_priority_get_type (void) G_GNUC_CONST; -#define SOUP_TYPE_MESSAGE_PRIORITY (soup_message_priority_get_type ()) -GType soup_memory_use_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_memory_use_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_MEMORY_USE (soup_memory_use_get_type ()) -GType soup_message_headers_type_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_message_headers_type_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_MESSAGE_HEADERS_TYPE (soup_message_headers_type_get_type ()) -GType soup_encoding_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_encoding_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_ENCODING (soup_encoding_get_type ()) -GType soup_expectation_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_expectation_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_EXPECTATION (soup_expectation_get_type ()) -GType soup_connection_state_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_http_version_get_type (void) G_GNUC_CONST; +#define SOUP_TYPE_HTTP_VERSION (soup_http_version_get_type ()) +GLIB_MKENUMS_EXTERN GType soup_message_flags_get_type (void) G_GNUC_CONST; +#define SOUP_TYPE_MESSAGE_FLAGS (soup_message_flags_get_type ()) +GLIB_MKENUMS_EXTERN GType soup_message_priority_get_type (void) G_GNUC_CONST; +#define SOUP_TYPE_MESSAGE_PRIORITY (soup_message_priority_get_type ()) +GLIB_MKENUMS_EXTERN GType soup_connection_state_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_CONNECTION_STATE (soup_connection_state_get_type ()) -GType soup_requester_error_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_requester_error_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_REQUESTER_ERROR (soup_requester_error_get_type ()) -GType soup_request_error_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_server_listen_options_get_type (void) G_GNUC_CONST; +#define SOUP_TYPE_SERVER_LISTEN_OPTIONS (soup_server_listen_options_get_type ()) +GLIB_MKENUMS_EXTERN GType soup_request_error_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_REQUEST_ERROR (soup_request_error_get_type ()) -GType soup_socket_io_status_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_socket_io_status_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_SOCKET_IO_STATUS (soup_socket_io_status_get_type ()) -GType soup_status_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_status_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_STATUS (soup_status_get_type ()) -GType soup_known_status_code_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_known_status_code_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_KNOWN_STATUS_CODE (soup_known_status_code_get_type ()) -GType soup_tld_error_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_tld_error_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_TLD_ERROR (soup_tld_error_get_type ()) -GType soup_xmlrpc_error_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_websocket_error_get_type (void) G_GNUC_CONST; +#define SOUP_TYPE_WEBSOCKET_ERROR (soup_websocket_error_get_type ()) +GLIB_MKENUMS_EXTERN GType soup_websocket_connection_type_get_type (void) G_GNUC_CONST; +#define SOUP_TYPE_WEBSOCKET_CONNECTION_TYPE (soup_websocket_connection_type_get_type ()) +GLIB_MKENUMS_EXTERN GType soup_websocket_data_type_get_type (void) G_GNUC_CONST; +#define SOUP_TYPE_WEBSOCKET_DATA_TYPE (soup_websocket_data_type_get_type ()) +GLIB_MKENUMS_EXTERN GType soup_websocket_close_code_get_type (void) G_GNUC_CONST; +#define SOUP_TYPE_WEBSOCKET_CLOSE_CODE (soup_websocket_close_code_get_type ()) +GLIB_MKENUMS_EXTERN GType soup_websocket_state_get_type (void) G_GNUC_CONST; +#define SOUP_TYPE_WEBSOCKET_STATE (soup_websocket_state_get_type ()) +GLIB_MKENUMS_EXTERN GType soup_xmlrpc_error_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_XMLRPC_ERROR (soup_xmlrpc_error_get_type ()) -GType soup_xmlrpc_fault_get_type (void) G_GNUC_CONST; +GLIB_MKENUMS_EXTERN GType soup_xmlrpc_fault_get_type (void) G_GNUC_CONST; #define SOUP_TYPE_XMLRPC_FAULT (soup_xmlrpc_fault_get_type ()) G_END_DECLS #endif /* __SOUP_ENUM_TYPES_H__ */ - +/* Generated data ends here */ diff --git a/libsoup/soup-filter-input-stream.c b/libsoup/soup-filter-input-stream.c index 8067b882..2c30bf98 100644 --- a/libsoup/soup-filter-input-stream.c +++ b/libsoup/soup-filter-input-stream.c @@ -29,15 +29,14 @@ struct _SoupFilterInputStreamPrivate { static void soup_filter_input_stream_pollable_init (GPollableInputStreamInterface *pollable_interface, gpointer interface_data); G_DEFINE_TYPE_WITH_CODE (SoupFilterInputStream, soup_filter_input_stream, G_TYPE_FILTER_INPUT_STREAM, + G_ADD_PRIVATE (SoupFilterInputStream) G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_INPUT_STREAM, soup_filter_input_stream_pollable_init)) static void soup_filter_input_stream_init (SoupFilterInputStream *stream) { - stream->priv = G_TYPE_INSTANCE_GET_PRIVATE (stream, - SOUP_TYPE_FILTER_INPUT_STREAM, - SoupFilterInputStreamPrivate); + stream->priv = soup_filter_input_stream_get_instance_private (stream); } static void @@ -149,8 +148,6 @@ soup_filter_input_stream_class_init (SoupFilterInputStreamClass *stream_class) GObjectClass *object_class = G_OBJECT_CLASS (stream_class); GInputStreamClass *input_stream_class = G_INPUT_STREAM_CLASS (stream_class); - g_type_class_add_private (stream_class, sizeof (SoupFilterInputStreamPrivate)); - object_class->finalize = soup_filter_input_stream_finalize; input_stream_class->read_fn = soup_filter_input_stream_read_fn; @@ -201,7 +198,7 @@ soup_filter_input_stream_read_until (SoupFilterInputStream *fstream, GCancellable *cancellable, GError **error) { - gssize nread; + gssize nread, read_length; guint8 *p, *buf, *end; gboolean eof = FALSE; GError *my_error = NULL; @@ -254,10 +251,11 @@ soup_filter_input_stream_read_until (SoupFilterInputStream *fstream, } else buf = fstream->priv->buf->data; - /* Scan for the boundary */ - end = buf + fstream->priv->buf->len; - if (!eof) - end -= boundary_length; + /* Scan for the boundary within the range we can possibly return. */ + if (include_boundary) + end = buf + MIN (fstream->priv->buf->len, length) - boundary_length; + else + end = buf + MIN (fstream->priv->buf->len - boundary_length, length); for (p = buf; p <= end; p++) { if (*p == *(guint8*)boundary && !memcmp (p, boundary, boundary_length)) { @@ -271,10 +269,9 @@ soup_filter_input_stream_read_until (SoupFilterInputStream *fstream, if (!*got_boundary && fstream->priv->buf->len < length && !eof) goto fill_buffer; - /* Return everything up to 'p' (which is either just after the boundary if - * include_boundary is TRUE, just before the boundary if include_boundary is - * FALSE, @boundary_len - 1 bytes before the end of the buffer, or end-of- - * file). - */ - return read_from_buf (fstream, buffer, p - buf); + if (eof && !*got_boundary) + read_length = MIN (fstream->priv->buf->len, length); + else + read_length = p - buf; + return read_from_buf (fstream, buffer, read_length); } diff --git a/libsoup/soup-form.c b/libsoup/soup-form.c index 4dee5647..aa0974f2 100644 --- a/libsoup/soup-form.c +++ b/libsoup/soup-form.c @@ -77,7 +77,7 @@ form_decode (char *part) * Decodes @form, which is an urlencoded dataset as defined in the * HTML 4.01 spec. * - * Return value: (element-type utf8 utf8) (transfer full): a hash + * Return value: (element-type utf8 utf8) (transfer container): a hash * table containing the name/value pairs from @encoded_form, which you * can free with g_hash_table_destroy(). **/ @@ -139,8 +139,8 @@ soup_form_decode (const char *encoded_form) * need to decode it manually, using soup_multipart_new_from_message() * and soup_multipart_get_part(). * - * Return value: (element-type utf8 utf8) (transfer full): a hash - * table containing the name/value pairs (other than + * Return value: (nullable) (element-type utf8 utf8) (transfer container): + * a hash table containing the name/value pairs (other than * @file_control_name) from @msg, which you can free with * g_hash_table_destroy(). On error, it will return %NULL. * diff --git a/libsoup/soup-form.h b/libsoup/soup-form.h index 21b8db1e..a0df0344 100644 --- a/libsoup/soup-form.h +++ b/libsoup/soup-form.h @@ -14,6 +14,7 @@ G_BEGIN_DECLS #define SOUP_FORM_MIME_TYPE_URLENCODED "application/x-www-form-urlencoded" #define SOUP_FORM_MIME_TYPE_MULTIPART "multipart/form-data" +SOUP_AVAILABLE_IN_2_4 GHashTable *soup_form_decode (const char *encoded_form); SOUP_AVAILABLE_IN_2_26 GHashTable *soup_form_decode_multipart (SoupMessage *msg, @@ -22,10 +23,14 @@ GHashTable *soup_form_decode_multipart (SoupMessage *msg, char **content_type, SoupBuffer **file); +SOUP_AVAILABLE_IN_2_4 char *soup_form_encode (const char *first_field, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 char *soup_form_encode_hash (GHashTable *form_data_set); +SOUP_AVAILABLE_IN_2_4 char *soup_form_encode_datalist (GData **form_data_set); +SOUP_AVAILABLE_IN_2_4 char *soup_form_encode_valist (const char *first_field, va_list args); @@ -36,13 +41,16 @@ char *soup_form_encode_valist (const char *first_field, #define soup_form_encode_urlencoded_list soup_form_encode_datalist #endif +SOUP_AVAILABLE_IN_2_4 SoupMessage *soup_form_request_new (const char *method, const char *uri, const char *first_field, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 SoupMessage *soup_form_request_new_from_hash (const char *method, const char *uri, GHashTable *form_data_set); +SOUP_AVAILABLE_IN_2_4 SoupMessage *soup_form_request_new_from_datalist (const char *method, const char *uri, GData **form_data_set); diff --git a/libsoup/soup-headers.c b/libsoup/soup-headers.c index 9c4c8083..271d2a63 100644 --- a/libsoup/soup-headers.c +++ b/libsoup/soup-headers.c @@ -5,6 +5,10 @@ * Copyright (C) 2001-2003, Ximian, Inc. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include @@ -35,17 +39,12 @@ soup_headers_parse (const char *str, int len, SoupMessageHeaders *dest) const char *headers_start; char *headers_copy, *name, *name_end, *value, *value_end; char *eol, *sol, *p; + gsize copy_len; gboolean success = FALSE; g_return_val_if_fail (str != NULL, FALSE); g_return_val_if_fail (dest != NULL, FALSE); - /* RFC 2616 does allow NUL bytes in the headers, but httpbis - * is changing that, and we can't deal with them anyway. - */ - if (memchr (str, '\0', len)) - return FALSE; - /* As per RFC 2616 section 19.3, we treat '\n' as the * line terminator, and '\r', if it appears, merely as * ignorable trailing whitespace. @@ -55,14 +54,28 @@ soup_headers_parse (const char *str, int len, SoupMessageHeaders *dest) headers_start = memchr (str, '\n', len); if (!headers_start) return FALSE; + /* No '\0's in the Request-Line / Status-Line */ + if (memchr (str, '\0', headers_start - str)) + return FALSE; /* We work on a copy of the headers, which we can write '\0's * into, so that we don't have to individually g_strndup and * then g_free each header name and value. */ - headers_copy = g_strndup (headers_start, len - (headers_start - str)); + copy_len = len - (headers_start - str); + headers_copy = g_malloc (copy_len + 1); + memcpy (headers_copy, headers_start, copy_len); + headers_copy[copy_len] = '\0'; value_end = headers_copy; + /* There shouldn't be any '\0's in the headers already, but + * this is the web we're talking about. + */ + while ((p = memchr (headers_copy, '\0', copy_len))) { + memmove (p, p + 1, copy_len - (p - headers_copy)); + copy_len--; + } + while (*(value_end + 1)) { name = value_end + 1; name_end = strchr (name, ':'); @@ -310,7 +323,7 @@ soup_headers_parse_status_line (const char *status_line, if (code_end != code_start + 3) return FALSE; code = atoi (code_start); - if (code < 100 || code > 599) + if (code < 100 || code > 999) return FALSE; if (status_code) *status_code = code; @@ -617,11 +630,13 @@ gboolean soup_header_contains (const char *header, const char *token) { const char *end; - guint len = strlen (token); + guint len; g_return_val_if_fail (header != NULL, FALSE); g_return_val_if_fail (token != NULL, FALSE); + len = strlen (token); + header = skip_delims (header, ','); while (*header) { end = skip_item (header, ','); diff --git a/libsoup/soup-headers.h b/libsoup/soup-headers.h index 687ea41e..d1f34618 100644 --- a/libsoup/soup-headers.h +++ b/libsoup/soup-headers.h @@ -18,6 +18,7 @@ gboolean soup_headers_parse (const char *str, int len, SoupMessageHeaders *dest); +SOUP_AVAILABLE_IN_2_4 guint soup_headers_parse_request (const char *str, int len, SoupMessageHeaders *req_headers, @@ -25,11 +26,13 @@ guint soup_headers_parse_request (const char *str, char **req_path, SoupHTTPVersion *ver); +SOUP_AVAILABLE_IN_2_4 gboolean soup_headers_parse_status_line (const char *status_line, SoupHTTPVersion *ver, guint *status_code, char **reason_phrase); +SOUP_AVAILABLE_IN_2_4 gboolean soup_headers_parse_response (const char *str, int len, SoupMessageHeaders *headers, @@ -38,18 +41,23 @@ gboolean soup_headers_parse_response (const char *str, char **reason_phrase); /* Individual header parsing */ - +SOUP_AVAILABLE_IN_2_4 GSList *soup_header_parse_list (const char *header); +SOUP_AVAILABLE_IN_2_4 GSList *soup_header_parse_quality_list (const char *header, GSList **unacceptable); +SOUP_AVAILABLE_IN_2_4 void soup_header_free_list (GSList *list); +SOUP_AVAILABLE_IN_2_4 gboolean soup_header_contains (const char *header, const char *token); +SOUP_AVAILABLE_IN_2_4 GHashTable *soup_header_parse_param_list (const char *header); SOUP_AVAILABLE_IN_2_24 GHashTable *soup_header_parse_semi_param_list (const char *header); +SOUP_AVAILABLE_IN_2_4 void soup_header_free_param_list (GHashTable *param_list); SOUP_AVAILABLE_IN_2_26 diff --git a/libsoup/soup-init.c b/libsoup/soup-init.c new file mode 100644 index 00000000..c4950ced --- /dev/null +++ b/libsoup/soup-init.c @@ -0,0 +1,82 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * soup-session.c + * + * Copyright (C) 2000-2003, Ximian, Inc. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include "gconstructor.h" + +#ifdef G_OS_WIN32 +#define WIN32_LEAN_AND_MEAN +#include + +HMODULE soup_dll; +#endif + +static void +soup_init (void) +{ +#ifdef G_OS_WIN32 + char *basedir = g_win32_get_package_installation_directory_of_module (soup_dll); + char *localedir = g_build_filename (basedir, "share", "locale", NULL); + bindtextdomain (GETTEXT_PACKAGE, localedir); + g_free (localedir); + g_free (basedir); +#else + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); +#endif +#ifdef HAVE_BIND_TEXTDOMAIN_CODESET + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); +#endif +} + +#if defined (G_OS_WIN32) + +BOOL WINAPI DllMain (HINSTANCE hinstDLL, + DWORD fdwReason, + LPVOID lpvReserved); + +BOOL WINAPI +DllMain (HINSTANCE hinstDLL, + DWORD fdwReason, + LPVOID lpvReserved) +{ + switch (fdwReason) { + case DLL_PROCESS_ATTACH: + soup_dll = hinstDLL; + + soup_init (); + break; + + case DLL_THREAD_DETACH: + + default: + /* do nothing */ + ; + } + + return TRUE; +} + +#elif defined (G_HAS_CONSTRUCTORS) + +#ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA +#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(soup_init_ctor) +#endif +G_DEFINE_CONSTRUCTOR(soup_init_ctor) + +static void +soup_init_ctor (void) +{ + soup_init (); +} + +#else +# error Your platform/compiler is missing constructor support +#endif diff --git a/libsoup/soup-io-stream.c b/libsoup/soup-io-stream.c index ea5ddef1..9c77b267 100644 --- a/libsoup/soup-io-stream.c +++ b/libsoup/soup-io-stream.c @@ -29,14 +29,12 @@ enum { PROP_CLOSE_ON_DISPOSE }; -G_DEFINE_TYPE (SoupIOStream, soup_io_stream, G_TYPE_IO_STREAM) +G_DEFINE_TYPE_WITH_PRIVATE (SoupIOStream, soup_io_stream, G_TYPE_IO_STREAM) static void soup_io_stream_init (SoupIOStream *stream) { - stream->priv = G_TYPE_INSTANCE_GET_PRIVATE (stream, - SOUP_TYPE_IO_STREAM, - SoupIOStreamPrivate); + stream->priv = soup_io_stream_get_instance_private (stream); } static void @@ -137,6 +135,21 @@ soup_io_stream_close (GIOStream *stream, cancellable, error); } +static void +close_async_complete (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + GTask *task = user_data; + GError *error = NULL; + + if (g_io_stream_close_finish (G_IO_STREAM (object), result, &error)) + g_task_return_boolean (task, TRUE); + else + g_task_return_error (task, error); + g_object_unref (task); +} + static void soup_io_stream_close_async (GIOStream *stream, int io_priority, @@ -144,8 +157,12 @@ soup_io_stream_close_async (GIOStream *stream, GAsyncReadyCallback callback, gpointer user_data) { + GTask *task; + + task = g_task_new (stream, cancellable, callback, user_data); g_io_stream_close_async (SOUP_IO_STREAM (stream)->priv->base_iostream, - io_priority, cancellable, callback, user_data); + io_priority, cancellable, + close_async_complete, task); } static gboolean @@ -153,8 +170,7 @@ soup_io_stream_close_finish (GIOStream *stream, GAsyncResult *result, GError **error) { - return g_io_stream_close_finish (SOUP_IO_STREAM (stream)->priv->base_iostream, - result, error); + return g_task_propagate_boolean (G_TASK (result), error); } static void @@ -163,8 +179,6 @@ soup_io_stream_class_init (SoupIOStreamClass *stream_class) GObjectClass *object_class = G_OBJECT_CLASS (stream_class); GIOStreamClass *io_stream_class = G_IO_STREAM_CLASS (stream_class); - g_type_class_add_private (stream_class, sizeof (SoupIOStreamPrivate)); - object_class->set_property = soup_io_stream_set_property; object_class->get_property = soup_io_stream_get_property; object_class->dispose = soup_io_stream_dispose; diff --git a/libsoup/soup-logger.c b/libsoup/soup-logger.c index 34a55764..261ec8dd 100644 --- a/libsoup/soup-logger.c +++ b/libsoup/soup-logger.c @@ -15,6 +15,8 @@ #include #include "soup-logger.h" +#include "soup-connection.h" +#include "soup-message-private.h" #include "soup.h" /** @@ -42,9 +44,9 @@ * > Host: localhost * > Content-Type: text/plain * > Connection: close - * > + * > * > This is a test. - * + * * < HTTP/1.1 201 Created * < Soup-Debug-Timestamp: 1200171744 * < Soup-Debug: SoupMessage 1 (0x617000) @@ -67,7 +69,7 @@ * * Currently, the request half of the message is logged just before * the first byte of the request gets written to the network (from the - * #SoupSession::request_started signal), which means that if you have + * #SoupMessage::starting signal), which means that if you have * not made the complete request body available at that point, it will * not be logged. * @@ -86,12 +88,6 @@ * event of the #SoupMessage::finished signal. **/ -static void soup_logger_session_feature_init (SoupSessionFeatureInterface *feature_interface, gpointer interface_data); - -G_DEFINE_TYPE_WITH_CODE (SoupLogger, soup_logger, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (SOUP_TYPE_SESSION_FEATURE, - soup_logger_session_feature_init)) - typedef struct { /* We use a mutex so that if requests are being run in * multiple threads, we don't mix up the output. @@ -101,6 +97,7 @@ typedef struct { GQuark tag; GHashTable *ids; + SoupSession *session; SoupLoggerLogLevel level; int max_body_size; @@ -116,12 +113,28 @@ typedef struct { gpointer printer_data; GDestroyNotify printer_dnotify; } SoupLoggerPrivate; -#define SOUP_LOGGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_LOGGER, SoupLoggerPrivate)) + +enum { + PROP_0, + + PROP_LEVEL, + PROP_MAX_BODY_SIZE, + + LAST_PROP +}; + +static SoupSessionFeatureInterface *soup_logger_default_feature_interface; +static void soup_logger_session_feature_init (SoupSessionFeatureInterface *feature_interface, gpointer interface_data); + +G_DEFINE_TYPE_WITH_CODE (SoupLogger, soup_logger, G_TYPE_OBJECT, + G_ADD_PRIVATE (SoupLogger) + G_IMPLEMENT_INTERFACE (SOUP_TYPE_SESSION_FEATURE, + soup_logger_session_feature_init)) static void soup_logger_init (SoupLogger *logger) { - SoupLoggerPrivate *priv = SOUP_LOGGER_GET_PRIVATE (logger); + SoupLoggerPrivate *priv = soup_logger_get_instance_private (logger); g_mutex_init (&priv->lock); priv->tag = g_quark_from_static_string (g_strdup_printf ("SoupLogger-%p", logger)); @@ -131,7 +144,8 @@ soup_logger_init (SoupLogger *logger) static void soup_logger_finalize (GObject *object) { - SoupLoggerPrivate *priv = SOUP_LOGGER_GET_PRIVATE (object); + SoupLogger *logger = SOUP_LOGGER (object); + SoupLoggerPrivate *priv = soup_logger_get_instance_private (logger); g_hash_table_destroy (priv->ids); @@ -147,14 +161,104 @@ soup_logger_finalize (GObject *object) G_OBJECT_CLASS (soup_logger_parent_class)->finalize (object); } +static void +soup_logger_set_property (GObject *object, guint prop_id, + const GValue *value, GParamSpec *pspec) +{ + SoupLogger *logger = SOUP_LOGGER (object); + SoupLoggerPrivate *priv = soup_logger_get_instance_private (logger); + + switch (prop_id) { + case PROP_LEVEL: + priv->level = g_value_get_enum (value); + break; + case PROP_MAX_BODY_SIZE: + priv->max_body_size = g_value_get_int (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +soup_logger_get_property (GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec) +{ + SoupLogger *logger = SOUP_LOGGER (object); + SoupLoggerPrivate *priv = soup_logger_get_instance_private (logger); + + switch (prop_id) { + case PROP_LEVEL: + g_value_set_enum (value, priv->level); + break; + case PROP_MAX_BODY_SIZE: + g_value_set_int (value, priv->max_body_size); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + static void soup_logger_class_init (SoupLoggerClass *logger_class) { GObjectClass *object_class = G_OBJECT_CLASS (logger_class); - g_type_class_add_private (logger_class, sizeof (SoupLoggerPrivate)); - object_class->finalize = soup_logger_finalize; + object_class->set_property = soup_logger_set_property; + object_class->get_property = soup_logger_get_property; + + /* properties */ + /** + * SoupLogger:level: + * + * The level of logging output + * + * Since: 2.56 + */ + /** + * SOUP_LOGGER_LEVEL: + * + * Alias for the #SoupLogger:level property, qv. + * + * Since: 2.56 + **/ + g_object_class_install_property ( + object_class, PROP_LEVEL, + g_param_spec_enum (SOUP_LOGGER_LEVEL, + "Level", + "The level of logging output", + SOUP_TYPE_LOGGER_LOG_LEVEL, + SOUP_LOGGER_LOG_MINIMAL, + G_PARAM_READWRITE)); + + /** + * SoupLogger:max-body-size: + * + * If #SoupLogger:level is %SOUP_LOGGER_LOG_BODY, this gives + * the maximum number of bytes of the body that will be logged. + * (-1 means "no limit".) + * + * Since: 2.56 + */ + /** + * SOUP_LOGGER_MAX_BODY_SIZE: + * + * Alias for the #SoupLogger:max-body-size property, qv. + * + * Since: 2.56 + **/ + g_object_class_install_property ( + object_class, PROP_MAX_BODY_SIZE, + g_param_spec_int (SOUP_LOGGER_MAX_BODY_SIZE, + "Max Body Size", + "The maximum body size to output", + -1, + G_MAXINT, + -1, + G_PARAM_READWRITE)); } /** @@ -185,18 +289,12 @@ soup_logger_class_init (SoupLoggerClass *logger_class) * Returns: a new #SoupLogger **/ SoupLogger * -soup_logger_new (SoupLoggerLogLevel level, int max_body_size) +soup_logger_new (SoupLoggerLogLevel level, int max_body_size) { - SoupLogger *logger; - SoupLoggerPrivate *priv; - - logger = g_object_new (SOUP_TYPE_LOGGER, NULL); - - priv = SOUP_LOGGER_GET_PRIVATE (logger); - priv->level = level; - priv->max_body_size = max_body_size; - - return logger; + return g_object_new (SOUP_TYPE_LOGGER, + SOUP_LOGGER_LEVEL, level, + SOUP_LOGGER_MAX_BODY_SIZE, max_body_size, + NULL); } /** @@ -235,7 +333,7 @@ soup_logger_set_request_filter (SoupLogger *logger, gpointer filter_data, GDestroyNotify destroy) { - SoupLoggerPrivate *priv = SOUP_LOGGER_GET_PRIVATE (logger); + SoupLoggerPrivate *priv = soup_logger_get_instance_private (logger); priv->request_filter = request_filter; priv->request_filter_data = filter_data; @@ -261,7 +359,7 @@ soup_logger_set_response_filter (SoupLogger *logger, gpointer filter_data, GDestroyNotify destroy) { - SoupLoggerPrivate *priv = SOUP_LOGGER_GET_PRIVATE (logger); + SoupLoggerPrivate *priv = soup_logger_get_instance_private (logger); priv->response_filter = response_filter; priv->response_filter_data = filter_data; @@ -307,7 +405,7 @@ soup_logger_set_printer (SoupLogger *logger, gpointer printer_data, GDestroyNotify destroy) { - SoupLoggerPrivate *priv = SOUP_LOGGER_GET_PRIVATE (logger); + SoupLoggerPrivate *priv = soup_logger_get_instance_private (logger); priv->printer = printer; priv->printer_data = printer_data; @@ -317,7 +415,7 @@ soup_logger_set_printer (SoupLogger *logger, static guint soup_logger_get_id (SoupLogger *logger, gpointer object) { - SoupLoggerPrivate *priv = SOUP_LOGGER_GET_PRIVATE (logger); + SoupLoggerPrivate *priv = soup_logger_get_instance_private (logger); return GPOINTER_TO_UINT (g_object_get_qdata (object, priv->tag)); } @@ -325,7 +423,7 @@ soup_logger_get_id (SoupLogger *logger, gpointer object) static guint soup_logger_set_id (SoupLogger *logger, gpointer object) { - SoupLoggerPrivate *priv = SOUP_LOGGER_GET_PRIVATE (logger); + SoupLoggerPrivate *priv = soup_logger_get_instance_private (logger); gpointer klass = G_OBJECT_GET_CLASS (object); gpointer id; @@ -381,7 +479,7 @@ static void soup_logger_print (SoupLogger *logger, SoupLoggerLogLevel level, char direction, const char *format, ...) { - SoupLoggerPrivate *priv = SOUP_LOGGER_GET_PRIVATE (logger); + SoupLoggerPrivate *priv = soup_logger_get_instance_private (logger); va_list args; char *data, *line, *end; @@ -443,13 +541,13 @@ soup_logger_print_basic_auth (SoupLogger *logger, const char *value) static void print_request (SoupLogger *logger, SoupMessage *msg, - SoupSession *session, SoupSocket *socket, - gboolean restarted) + SoupSocket *socket, gboolean restarted) { - SoupLoggerPrivate *priv = SOUP_LOGGER_GET_PRIVATE (logger); + SoupLoggerPrivate *priv = soup_logger_get_instance_private (logger); SoupLoggerLogLevel log_level; SoupMessageHeadersIter iter; const char *name, *value; + char *socket_dbg; SoupURI *uri; if (priv->request_filter) { @@ -479,15 +577,22 @@ print_request (SoupLogger *logger, SoupMessage *msg, soup_logger_print (logger, SOUP_LOGGER_LOG_MINIMAL, '>', "Soup-Debug-Timestamp: %lu", (unsigned long)time (0)); + + socket_dbg = socket ? + g_strdup_printf ("%s %u (%p)", + g_type_name_from_instance ((GTypeInstance *)socket), + soup_logger_get_id (logger, socket), socket) + : NULL; + soup_logger_print (logger, SOUP_LOGGER_LOG_MINIMAL, '>', - "Soup-Debug: %s %u (%p), %s %u (%p), %s %u (%p)%s", - g_type_name_from_instance ((GTypeInstance *)session), - soup_logger_get_id (logger, session), session, + "Soup-Debug: %s %u (%p), %s %u (%p), %s%s", + g_type_name_from_instance ((GTypeInstance *)priv->session), + soup_logger_get_id (logger, priv->session), priv->session, g_type_name_from_instance ((GTypeInstance *)msg), soup_logger_get_id (logger, msg), msg, - g_type_name_from_instance ((GTypeInstance *)socket), - soup_logger_get_id (logger, socket), socket, + socket_dbg ? socket_dbg : "cached", restarted ? ", restarted" : ""); + g_free (socket_dbg); if (log_level == SOUP_LOGGER_LOG_MINIMAL) return; @@ -541,7 +646,7 @@ print_request (SoupLogger *logger, SoupMessage *msg, static void print_response (SoupLogger *logger, SoupMessage *msg) { - SoupLoggerPrivate *priv = SOUP_LOGGER_GET_PRIVATE (logger); + SoupLoggerPrivate *priv = soup_logger_get_instance_private (logger); SoupLoggerLogLevel log_level; SoupMessageHeadersIter iter; const char *name, *value; @@ -589,12 +694,12 @@ static void finished (SoupMessage *msg, gpointer user_data) { SoupLogger *logger = user_data; - SoupLoggerPrivate *priv = SOUP_LOGGER_GET_PRIVATE (logger); + SoupLoggerPrivate *priv = soup_logger_get_instance_private (logger); g_mutex_lock (&priv->lock); print_response (logger, msg); - soup_logger_print (logger, SOUP_LOGGER_LOG_MINIMAL, ' ', ""); + soup_logger_print (logger, SOUP_LOGGER_LOG_MINIMAL, ' ', "\n"); g_mutex_unlock (&priv->lock); } @@ -603,13 +708,13 @@ static void got_informational (SoupMessage *msg, gpointer user_data) { SoupLogger *logger = user_data; - SoupLoggerPrivate *priv = SOUP_LOGGER_GET_PRIVATE (logger); + SoupLoggerPrivate *priv = soup_logger_get_instance_private (logger); g_mutex_lock (&priv->lock); g_signal_handlers_disconnect_by_func (msg, finished, logger); print_response (logger, msg); - soup_logger_print (logger, SOUP_LOGGER_LOG_MINIMAL, ' ', ""); + soup_logger_print (logger, SOUP_LOGGER_LOG_MINIMAL, ' ', "\n"); if (msg->status_code == SOUP_STATUS_CONTINUE && msg->request_body->data) { SoupLoggerLogLevel log_level; @@ -628,7 +733,7 @@ got_informational (SoupMessage *msg, gpointer user_data) "%s", msg->request_body->data); } - soup_logger_print (logger, SOUP_LOGGER_LOG_MINIMAL, ' ', ""); + soup_logger_print (logger, SOUP_LOGGER_LOG_MINIMAL, ' ', "\n"); } g_mutex_unlock (&priv->lock); @@ -638,48 +743,26 @@ static void got_body (SoupMessage *msg, gpointer user_data) { SoupLogger *logger = user_data; - SoupLoggerPrivate *priv = SOUP_LOGGER_GET_PRIVATE (logger); + SoupLoggerPrivate *priv = soup_logger_get_instance_private (logger); g_mutex_lock (&priv->lock); g_signal_handlers_disconnect_by_func (msg, finished, logger); print_response (logger, msg); - soup_logger_print (logger, SOUP_LOGGER_LOG_MINIMAL, ' ', ""); + soup_logger_print (logger, SOUP_LOGGER_LOG_MINIMAL, ' ', "\n"); g_mutex_unlock (&priv->lock); } static void -soup_logger_request_queued (SoupSessionFeature *logger, - SoupSession *session, - SoupMessage *msg) -{ - g_return_if_fail (SOUP_IS_MESSAGE (msg)); - - g_signal_connect (msg, "got-informational", - G_CALLBACK (got_informational), - logger); - g_signal_connect (msg, "got-body", - G_CALLBACK (got_body), - logger); - g_signal_connect (msg, "finished", - G_CALLBACK (finished), - logger); -} - -static void -soup_logger_request_started (SoupSessionFeature *feature, - SoupSession *session, - SoupMessage *msg, - SoupSocket *socket) +starting (SoupMessage *msg, gpointer user_data) { - SoupLogger *logger = SOUP_LOGGER (feature); + SoupLogger *logger = SOUP_LOGGER (user_data); + SoupLoggerPrivate *priv = soup_logger_get_instance_private (logger); gboolean restarted; guint msg_id; - - g_return_if_fail (SOUP_IS_SESSION (session)); - g_return_if_fail (SOUP_IS_MESSAGE (msg)); - g_return_if_fail (SOUP_IS_SOCKET (socket)); + SoupConnection *conn; + SoupSocket *socket; msg_id = soup_logger_get_id (logger, msg); if (msg_id) @@ -689,14 +772,37 @@ soup_logger_request_started (SoupSessionFeature *feature, restarted = FALSE; } - if (!soup_logger_get_id (logger, session)) - soup_logger_set_id (logger, session); + if (!soup_logger_get_id (logger, priv->session)) + soup_logger_set_id (logger, priv->session); - if (!soup_logger_get_id (logger, socket)) + conn = soup_message_get_connection (msg); + socket = conn ? soup_connection_get_socket (conn) : NULL; + if (socket && !soup_logger_get_id (logger, socket)) soup_logger_set_id (logger, socket); - print_request (logger, msg, session, socket, restarted); - soup_logger_print (logger, SOUP_LOGGER_LOG_MINIMAL, ' ', ""); + print_request (logger, msg, socket, restarted); + soup_logger_print (logger, SOUP_LOGGER_LOG_MINIMAL, ' ', "\n"); +} + +static void +soup_logger_request_queued (SoupSessionFeature *logger, + SoupSession *session, + SoupMessage *msg) +{ + g_return_if_fail (SOUP_IS_MESSAGE (msg)); + + g_signal_connect (msg, "starting", + G_CALLBACK (starting), + logger); + g_signal_connect (msg, "got-informational", + G_CALLBACK (got_informational), + logger); + g_signal_connect (msg, "got-body", + G_CALLBACK (got_body), + logger); + g_signal_connect (msg, "finished", + G_CALLBACK (finished), + logger); } static void @@ -706,16 +812,31 @@ soup_logger_request_unqueued (SoupSessionFeature *logger, { g_return_if_fail (SOUP_IS_MESSAGE (msg)); + g_signal_handlers_disconnect_by_func (msg, starting, logger); g_signal_handlers_disconnect_by_func (msg, got_informational, logger); g_signal_handlers_disconnect_by_func (msg, got_body, logger); g_signal_handlers_disconnect_by_func (msg, finished, logger); } +static void +soup_logger_feature_attach (SoupSessionFeature *feature, + SoupSession *session) +{ + SoupLoggerPrivate *priv = soup_logger_get_instance_private (SOUP_LOGGER (feature)); + + priv->session = session; + + soup_logger_default_feature_interface->attach (feature, session); +} + static void soup_logger_session_feature_init (SoupSessionFeatureInterface *feature_interface, gpointer interface_data) { + soup_logger_default_feature_interface = + g_type_default_interface_peek (SOUP_TYPE_SESSION_FEATURE); + + feature_interface->attach = soup_logger_feature_attach; feature_interface->request_queued = soup_logger_request_queued; - feature_interface->request_started = soup_logger_request_started; feature_interface->request_unqueued = soup_logger_request_unqueued; } diff --git a/libsoup/soup-logger.h b/libsoup/soup-logger.h index d84c765e..df4a347f 100644 --- a/libsoup/soup-logger.h +++ b/libsoup/soup-logger.h @@ -49,29 +49,39 @@ typedef void (*SoupLoggerPrinter) (SoupLogger *logger, const char *data, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 GType soup_logger_get_type (void); +#define SOUP_LOGGER_LEVEL "level" +#define SOUP_LOGGER_MAX_BODY_SIZE "max-body-size" + +SOUP_AVAILABLE_IN_2_4 SoupLogger *soup_logger_new (SoupLoggerLogLevel level, int max_body_size); #ifndef SOUP_DISABLE_DEPRECATED +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_24_FOR(soup_session_add_feature) void soup_logger_attach (SoupLogger *logger, SoupSession *session); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_24_FOR(soup_session_remove_feature) void soup_logger_detach (SoupLogger *logger, SoupSession *session); #endif +SOUP_AVAILABLE_IN_2_4 void soup_logger_set_request_filter (SoupLogger *logger, SoupLoggerFilter request_filter, gpointer filter_data, GDestroyNotify destroy); +SOUP_AVAILABLE_IN_2_4 void soup_logger_set_response_filter (SoupLogger *logger, SoupLoggerFilter response_filter, gpointer filter_data, GDestroyNotify destroy); +SOUP_AVAILABLE_IN_2_4 void soup_logger_set_printer (SoupLogger *logger, SoupLoggerPrinter printer, gpointer printer_data, diff --git a/libsoup/soup-message-body.c b/libsoup/soup-message-body.c index dfc29fae..50428eb4 100644 --- a/libsoup/soup-message-body.c +++ b/libsoup/soup-message-body.c @@ -5,6 +5,10 @@ * Copyright (C) 2000-2003, Ximian, Inc. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include "soup-message-body.h" @@ -79,7 +83,7 @@ typedef struct { /** * soup_buffer_new: * @use: how @data is to be used by the buffer - * @data: data + * @data: (array length=length) (element-type guint8): data * @length: length of @data * * Creates a new #SoupBuffer containing @length bytes from @data. @@ -110,7 +114,7 @@ soup_buffer_new (SoupMemoryUse use, gconstpointer data, gsize length) } /** - * soup_buffer_new_take: + * soup_buffer_new_take: (rename-to soup_buffer_new) * @data: (array length=length) (transfer full): data * @length: length of @data * @@ -122,7 +126,6 @@ soup_buffer_new (SoupMemoryUse use, gconstpointer data, gsize length) * * Return value: the new #SoupBuffer. * - * Rename to: soup_buffer_new * Since: 2.32 **/ SoupBuffer * @@ -167,7 +170,7 @@ soup_buffer_new_subbuffer (SoupBuffer *parent, gsize offset, gsize length) /** * soup_buffer_new_with_owner: - * @data: data + * @data: (array length=length) (element-type guint8): data * @length: length of @data * @owner: pointer to an object that owns @data * @owner_dnotify: (allow-none): a function to free/unref @owner when @@ -488,7 +491,7 @@ soup_message_body_append (SoupMessageBody *body, SoupMemoryUse use, } /** - * soup_message_body_append_take: + * soup_message_body_append_take: (rename-to soup_message_body_append) * @body: a #SoupMessageBody * @data: (array length=length) (transfer full): data to append * @length: length of @data @@ -499,7 +502,6 @@ soup_message_body_append (SoupMessageBody *body, SoupMemoryUse use, * with %SOUP_MEMORY_TAKE as second argument; it exists mainly for * convenience and simplifying language bindings. * - * Rename to: soup_message_body_append * Since: 2.32 **/ void @@ -625,7 +627,7 @@ soup_message_body_flatten (SoupMessageBody *body) * @body may still potentially have more data, but that data is not * currently available). * - * Return value: a #SoupBuffer, or %NULL. + * Return value: (nullable): a #SoupBuffer, or %NULL. **/ SoupBuffer * soup_message_body_get_chunk (SoupMessageBody *body, goffset offset) diff --git a/libsoup/soup-message-body.h b/libsoup/soup-message-body.h index 885cfd00..fc6c200b 100644 --- a/libsoup/soup-message-body.h +++ b/libsoup/soup-message-body.h @@ -22,23 +22,28 @@ typedef struct { gsize length; } SoupBuffer; +SOUP_AVAILABLE_IN_2_4 GType soup_buffer_get_type (void); #define SOUP_TYPE_BUFFER (soup_buffer_get_type ()) +SOUP_AVAILABLE_IN_2_4 SoupBuffer *soup_buffer_new (SoupMemoryUse use, gconstpointer data, gsize length); SOUP_AVAILABLE_IN_2_32 SoupBuffer *soup_buffer_new_take (guchar *data, gsize length); +SOUP_AVAILABLE_IN_2_4 SoupBuffer *soup_buffer_new_subbuffer (SoupBuffer *parent, gsize offset, gsize length); +SOUP_AVAILABLE_IN_2_4 SoupBuffer *soup_buffer_new_with_owner (gconstpointer data, gsize length, gpointer owner, GDestroyNotify owner_dnotify); +SOUP_AVAILABLE_IN_2_4 gpointer soup_buffer_get_owner (SoupBuffer *buffer); SOUP_AVAILABLE_IN_2_32 void soup_buffer_get_data (SoupBuffer *buffer, @@ -47,7 +52,9 @@ void soup_buffer_get_data (SoupBuffer *buffer, SOUP_AVAILABLE_IN_2_40 GBytes *soup_buffer_get_as_bytes (SoupBuffer *buffer); +SOUP_AVAILABLE_IN_2_4 SoupBuffer *soup_buffer_copy (SoupBuffer *buffer); +SOUP_AVAILABLE_IN_2_4 void soup_buffer_free (SoupBuffer *buffer); typedef struct { @@ -55,9 +62,11 @@ typedef struct { goffset length; } SoupMessageBody; +SOUP_AVAILABLE_IN_2_4 GType soup_message_body_get_type (void); #define SOUP_TYPE_MESSAGE_BODY (soup_message_body_get_type ()) +SOUP_AVAILABLE_IN_2_4 SoupMessageBody *soup_message_body_new (void); SOUP_AVAILABLE_IN_2_24 @@ -66,6 +75,7 @@ void soup_message_body_set_accumulate(SoupMessageBody *body, SOUP_AVAILABLE_IN_2_24 gboolean soup_message_body_get_accumulate(SoupMessageBody *body); +SOUP_AVAILABLE_IN_2_4 void soup_message_body_append (SoupMessageBody *body, SoupMemoryUse use, gconstpointer data, @@ -74,13 +84,18 @@ SOUP_AVAILABLE_IN_2_32 void soup_message_body_append_take (SoupMessageBody *body, guchar *data, gsize length); +SOUP_AVAILABLE_IN_2_4 void soup_message_body_append_buffer (SoupMessageBody *body, SoupBuffer *buffer); +SOUP_AVAILABLE_IN_2_4 void soup_message_body_truncate (SoupMessageBody *body); +SOUP_AVAILABLE_IN_2_4 void soup_message_body_complete (SoupMessageBody *body); +SOUP_AVAILABLE_IN_2_4 SoupBuffer *soup_message_body_flatten (SoupMessageBody *body); +SOUP_AVAILABLE_IN_2_4 SoupBuffer *soup_message_body_get_chunk (SoupMessageBody *body, goffset offset); @@ -91,6 +106,7 @@ SOUP_AVAILABLE_IN_2_24 void soup_message_body_wrote_chunk (SoupMessageBody *body, SoupBuffer *chunk); +SOUP_AVAILABLE_IN_2_4 void soup_message_body_free (SoupMessageBody *body); G_END_DECLS diff --git a/libsoup/soup-message-client-io.c b/libsoup/soup-message-client-io.c index b145bbaf..f571ef73 100644 --- a/libsoup/soup-message-client-io.c +++ b/libsoup/soup-message-client-io.c @@ -17,7 +17,7 @@ #include "soup-connection.h" #include "soup-message-private.h" #include "soup-message-queue.h" -#include "soup-misc-private.h" +#include "soup-socket-private.h" static guint parse_response_headers (SoupMessage *msg, diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c index 9c704b49..a180c6ee 100644 --- a/libsoup/soup-message-headers.c +++ b/libsoup/soup-message-headers.c @@ -5,6 +5,10 @@ * Copyright (C) 2007, 2008 Red Hat, Inc. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include "soup-message-headers.h" @@ -109,6 +113,22 @@ soup_message_headers_free (SoupMessageHeaders *hdrs) G_DEFINE_BOXED_TYPE (SoupMessageHeaders, soup_message_headers, soup_message_headers_copy, soup_message_headers_free) +/** + * soup_message_headers_get_headers_type: + * @hdrs: a #SoupMessageHeaders + * + * Gets the type of headers. + * + * Return value: the header's type. + * + * Since: 2.50 + **/ +SoupMessageHeadersType +soup_message_headers_get_headers_type (SoupMessageHeaders *hdrs) +{ + return hdrs->type; +} + /** * soup_message_headers_clear: * @hdrs: a #SoupMessageHeaders @@ -119,7 +139,7 @@ void soup_message_headers_clear (SoupMessageHeaders *hdrs) { SoupHeader *hdr_array = (SoupHeader *)hdrs->array->data; - int i; + guint i; for (i = 0; i < hdrs->array->len; i++) g_free (hdr_array[i].value); @@ -299,7 +319,7 @@ soup_message_headers_remove (SoupMessageHeaders *hdrs, const char *name) * whichever one makes libsoup most compatible with other HTTP * implementations.) * - * Return value: the header's value or %NULL if not found. + * Return value: (nullable): the header's value or %NULL if not found. * * Since: 2.28 **/ @@ -319,6 +339,59 @@ soup_message_headers_get_one (SoupMessageHeaders *hdrs, const char *name) return (index == -1) ? NULL : hdr_array[index].value; } +/** + * soup_message_headers_header_contains: + * @hdrs: a #SoupMessageHeaders + * @name: header name + * @token: token to look for + * + * Checks whether the list-valued header @name is present in @hdrs, + * and contains a case-insensitive match for @token. + * + * (If @name is present in @hdrs, then this is equivalent to calling + * soup_header_contains() on its value.) + * + * Return value: %TRUE if the header is present and contains @token, + * %FALSE otherwise. + * + * Since: 2.50 + **/ +gboolean +soup_message_headers_header_contains (SoupMessageHeaders *hdrs, const char *name, const char *token) +{ + const char *value; + + value = soup_message_headers_get_list (hdrs, name); + if (!value) + return FALSE; + return soup_header_contains (value, token); +} + +/** + * soup_message_headers_header_equals: + * @hdrs: a #SoupMessageHeaders + * @name: header name + * @value: expected value + * + * Checks whether the header @name is present in @hdrs and is + * (case-insensitively) equal to @value. + * + * Return value: %TRUE if the header is present and its value is + * @value, %FALSE otherwise. + * + * Since: 2.50 + **/ +gboolean +soup_message_headers_header_equals (SoupMessageHeaders *hdrs, const char *name, const char *value) +{ + const char *internal_value; + + internal_value = soup_message_headers_get_list (hdrs, name); + if (!internal_value) + return FALSE; + return !g_ascii_strcasecmp (internal_value, value); +} + /** * soup_message_headers_get_list: * @hdrs: a #SoupMessageHeaders @@ -337,7 +410,7 @@ soup_message_headers_get_one (SoupMessageHeaders *hdrs, const char *name) * transformation is allowed, and so an upstream proxy could do the * same thing. * - * Return value: the header's value or %NULL if not found. + * Return value: (nullable): the header's value or %NULL if not found. * * Since: 2.28 **/ @@ -393,7 +466,7 @@ soup_message_headers_get_list (SoupMessageHeaders *hdrs, const char *name) * soup_message_headers_get_list() were introduced, so callers can * explicitly state which behavior they are expecting. * - * Return value: as with soup_message_headers_get_list(). + * Return value: (nullable): as with soup_message_headers_get_list(). * * Deprecated: Use soup_message_headers_get_one() or * soup_message_headers_get_list() instead. @@ -506,7 +579,7 @@ soup_message_headers_foreach (SoupMessageHeaders *hdrs, gpointer user_data) { SoupHeader *hdr_array = (SoupHeader *)hdrs->array->data; - int i; + guint i; for (i = 0; i < hdrs->array->len; i++) func (hdr_array[i].name, hdr_array[i].value, user_data); @@ -876,7 +949,6 @@ soup_message_headers_get_ranges_internal (SoupMessageHeaders *hdrs, GSList *range_list, *r; GArray *array; char *spec, *end; - int i; guint status = SOUP_STATUS_OK; if (!range || strncmp (range, "bytes", 5) != 0) @@ -935,6 +1007,8 @@ soup_message_headers_get_ranges_internal (SoupMessageHeaders *hdrs, } if (total_length) { + guint i; + g_array_sort (array, sort_ranges); for (i = 1; i < array->len; i++) { SoupRange *cur = &((SoupRange *)array->data)[i]; @@ -958,7 +1032,8 @@ soup_message_headers_get_ranges_internal (SoupMessageHeaders *hdrs, * soup_message_headers_get_ranges: * @hdrs: a #SoupMessageHeaders * @total_length: the total_length of the response body - * @ranges: (out): return location for an array of #SoupRange + * @ranges: (out) (array length=length): return location for an array + * of #SoupRange * @length: the length of the returned array * * Parses @hdrs's Range header and returns an array of the requested @@ -1094,10 +1169,10 @@ soup_message_headers_set_range (SoupMessageHeaders *hdrs, /** * soup_message_headers_get_content_range: * @hdrs: a #SoupMessageHeaders - * @start: return value for the start of the range - * @end: return value for the end of the range - * @total_length: return value for the total length of the resource, - * or %NULL if you don't care. + * @start: (out): return value for the start of the range + * @end: (out): return value for the end of the range + * @total_length: (out) (optional): return value for the total length of the + * resource, or %NULL if you don't care. * * Parses @hdrs's Content-Range header and returns it in @start, * @end, and @total_length. If the total length field in the header @@ -1273,9 +1348,10 @@ content_type_setter (SoupMessageHeaders *hdrs, const char *value) * its value in *@content_type and *@params. @params can be %NULL if you * are only interested in the content type itself. * - * Return value: a string with the value of the "Content-Type" header - * or NULL if @hdrs does not contain that header or it cannot be - * parsed (in which case *@params will be unchanged). + * Return value: (nullable): a string with the value of the + * "Content-Type" header or %NULL if @hdrs does not contain that + * header or it cannot be parsed (in which case *@params will be + * unchanged). * * Since: 2.26 **/ diff --git a/libsoup/soup-message-headers.h b/libsoup/soup-message-headers.h index 02e752bc..829e3522 100644 --- a/libsoup/soup-message-headers.h +++ b/libsoup/soup-message-headers.h @@ -11,6 +11,7 @@ G_BEGIN_DECLS typedef struct SoupMessageHeaders SoupMessageHeaders; +SOUP_AVAILABLE_IN_2_4 GType soup_message_headers_get_type (void); #define SOUP_TYPE_MESSAGE_HEADERS (soup_message_headers_get_type ()) @@ -20,25 +21,32 @@ typedef enum { SOUP_MESSAGE_HEADERS_MULTIPART } SoupMessageHeadersType; +SOUP_AVAILABLE_IN_2_4 SoupMessageHeaders *soup_message_headers_new (SoupMessageHeadersType type); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_free (SoupMessageHeaders *hdrs); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_append (SoupMessageHeaders *hdrs, const char *name, const char *value); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_replace (SoupMessageHeaders *hdrs, const char *name, const char *value); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_remove (SoupMessageHeaders *hdrs, const char *name); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_clear (SoupMessageHeaders *hdrs); SOUP_AVAILABLE_IN_2_36 void soup_message_headers_clean_connection_headers (SoupMessageHeaders *hdrs); #ifndef SOUP_DISABLE_DEPRECATED +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_28_FOR ("soup_message_headers_get_one or soup_message_headers_get_list") const char *soup_message_headers_get (SoupMessageHeaders *hdrs, const char *name); @@ -49,22 +57,36 @@ const char *soup_message_headers_get_one (SoupMessageHeaders *hdrs, SOUP_AVAILABLE_IN_2_28 const char *soup_message_headers_get_list (SoupMessageHeaders *hdrs, const char *name); +SOUP_AVAILABLE_IN_2_50 +gboolean soup_message_headers_header_contains (SoupMessageHeaders *hdrs, + const char *name, + const char *token); +SOUP_AVAILABLE_IN_2_50 +gboolean soup_message_headers_header_equals (SoupMessageHeaders *hdrs, + const char *name, + const char *value); typedef void (*SoupMessageHeadersForeachFunc)(const char *name, const char *value, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_foreach (SoupMessageHeaders *hdrs, SoupMessageHeadersForeachFunc func, gpointer user_data); +SOUP_AVAILABLE_IN_2_50 +SoupMessageHeadersType soup_message_headers_get_headers_type (SoupMessageHeaders *hdrs); + typedef struct { /*< private >*/ gpointer dummy[3]; } SoupMessageHeadersIter; +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_iter_init (SoupMessageHeadersIter *iter, SoupMessageHeaders *hdrs); +SOUP_AVAILABLE_IN_2_4 gboolean soup_message_headers_iter_next (SoupMessageHeadersIter *iter, const char **name, const char **value); @@ -80,11 +102,15 @@ typedef enum { SOUP_ENCODING_BYTERANGES } SoupEncoding; +SOUP_AVAILABLE_IN_2_4 SoupEncoding soup_message_headers_get_encoding (SoupMessageHeaders *hdrs); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_set_encoding (SoupMessageHeaders *hdrs, SoupEncoding encoding); +SOUP_AVAILABLE_IN_2_4 goffset soup_message_headers_get_content_length (SoupMessageHeaders *hdrs); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_set_content_length (SoupMessageHeaders *hdrs, goffset content_length); @@ -93,7 +119,9 @@ typedef enum { SOUP_EXPECTATION_CONTINUE = (1 << 1) } SoupExpectation; +SOUP_AVAILABLE_IN_2_4 SoupExpectation soup_message_headers_get_expectations (SoupMessageHeaders *hdrs); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_set_expectations (SoupMessageHeaders *hdrs, SoupExpectation expectations); diff --git a/libsoup/soup-message-io.c b/libsoup/soup-message-io.c index be5cb2d2..3a7d7356 100644 --- a/libsoup/soup-message-io.c +++ b/libsoup/soup-message-io.c @@ -36,6 +36,7 @@ typedef enum { SOUP_MESSAGE_IO_STATE_BODY_START, SOUP_MESSAGE_IO_STATE_BODY, SOUP_MESSAGE_IO_STATE_BODY_DATA, + SOUP_MESSAGE_IO_STATE_BODY_FLUSH, SOUP_MESSAGE_IO_STATE_BODY_DONE, SOUP_MESSAGE_IO_STATE_FINISHING, SOUP_MESSAGE_IO_STATE_DONE @@ -80,6 +81,9 @@ typedef struct { GSource *unpause_source; gboolean paused; + GCancellable *async_close_wait; + GError *async_close_error; + SoupMessageGetHeadersFn get_headers_cb; SoupMessageParseHeadersFn parse_headers_cb; gpointer header_data; @@ -87,8 +91,10 @@ typedef struct { gpointer completion_data; } SoupMessageIOData; +static void io_run (SoupMessage *msg, gboolean blocking); #define RESPONSE_BLOCK_SIZE 8192 +#define HEADER_SIZE_LIMIT (64 * 1024) void soup_message_io_cleanup (SoupMessage *msg) @@ -120,6 +126,12 @@ soup_message_io_cleanup (SoupMessage *msg) if (io->write_chunk) soup_buffer_free (io->write_chunk); + if (io->async_close_wait) { + g_cancellable_cancel (io->async_close_wait); + g_clear_object (&io->async_close_wait); + } + g_clear_error (&io->async_close_error); + g_slice_free (SoupMessageIOData, io); } @@ -143,11 +155,6 @@ soup_message_io_stop (SoupMessage *msg) g_source_unref (io->unpause_source); io->unpause_source = NULL; } - - if (io->mode == SOUP_MESSAGE_IO_SERVER) { - if (io->write_state < SOUP_MESSAGE_IO_STATE_FINISHING) - g_io_stream_close (io->iostream, NULL, NULL); - } } void @@ -157,6 +164,7 @@ soup_message_io_finished (SoupMessage *msg) SoupMessageIOData *io = priv->io_data; SoupMessageCompletionFn completion_cb; gpointer completion_data; + SoupMessageIOCompletion completion; if (!io) return; @@ -164,13 +172,44 @@ soup_message_io_finished (SoupMessage *msg) completion_cb = io->completion_cb; completion_data = io->completion_data; + if ((io->read_state >= SOUP_MESSAGE_IO_STATE_FINISHING && + io->write_state >= SOUP_MESSAGE_IO_STATE_FINISHING)) + completion = SOUP_MESSAGE_IO_COMPLETE; + else + completion = SOUP_MESSAGE_IO_INTERRUPTED; + g_object_ref (msg); soup_message_io_cleanup (msg); if (completion_cb) - completion_cb (msg, completion_data); + completion_cb (msg, completion, completion_data); g_object_unref (msg); } +GIOStream * +soup_message_io_steal (SoupMessage *msg) +{ + SoupMessagePrivate *priv = SOUP_MESSAGE_GET_PRIVATE (msg); + SoupMessageIOData *io = priv->io_data; + SoupMessageCompletionFn completion_cb; + gpointer completion_data; + GIOStream *iostream; + + if (!io || !io->iostream) + return NULL; + + iostream = g_object_ref (io->iostream); + completion_cb = io->completion_cb; + completion_data = io->completion_data; + + g_object_ref (msg); + soup_message_io_cleanup (msg); + if (completion_cb) + completion_cb (msg, SOUP_MESSAGE_IO_STOLEN, completion_data); + g_object_unref (msg); + + return iostream; +} + static gboolean read_headers (SoupMessage *msg, gboolean blocking, GCancellable *cancellable, GError **error) @@ -191,6 +230,8 @@ read_headers (SoupMessage *msg, gboolean blocking, cancellable, error); io->read_header_buf->len = old_len + MAX (nread, 0); if (nread == 0) { + if (io->read_header_buf->len > 0) + break; soup_message_set_status (msg, SOUP_STATUS_MALFORMED); g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_PARTIAL_INPUT, @@ -203,27 +244,28 @@ read_headers (SoupMessage *msg, gboolean blocking, if (nread == 1 && old_len >= 2 && !strncmp ((char *)io->read_header_buf->data + io->read_header_buf->len - 2, - "\n\n", 2)) + "\n\n", 2)) { + io->read_header_buf->len--; break; - else if (nread == 2 && old_len >= 3 && + } else if (nread == 2 && old_len >= 3 && !strncmp ((char *)io->read_header_buf->data + io->read_header_buf->len - 3, - "\n\r\n", 3)) + "\n\r\n", 3)) { + io->read_header_buf->len -= 2; break; + } + } + + if (io->read_header_buf->len > HEADER_SIZE_LIMIT) { + soup_message_set_status (msg, SOUP_STATUS_MALFORMED); + g_set_error_literal (error, G_IO_ERROR, + G_IO_ERROR_PARTIAL_INPUT, + _("Header too big")); + return FALSE; } } - /* We need to "rewind" io->read_header_buf back one line. - * That SHOULD be two characters (CR LF), but if the - * web server was stupid, it might only be one. - */ - if (io->read_header_buf->len < 3 || - io->read_header_buf->data[io->read_header_buf->len - 2] == '\n') - io->read_header_buf->len--; - else - io->read_header_buf->len -= 2; io->read_header_buf->data[io->read_header_buf->len] = '\0'; - return TRUE; } @@ -276,6 +318,33 @@ soup_message_setup_body_istream (GInputStream *body_stream, return istream; } +static void +closed_async (GObject *source, + GAsyncResult *result, + gpointer user_data) +{ + GOutputStream *body_ostream = G_OUTPUT_STREAM (source); + SoupMessage *msg = user_data; + SoupMessagePrivate *priv = SOUP_MESSAGE_GET_PRIVATE (msg); + SoupMessageIOData *io = priv->io_data; + GCancellable *async_close_wait; + + if (!io || !io->async_close_wait || io->body_ostream != body_ostream) { + g_object_unref (msg); + return; + } + + g_output_stream_close_finish (body_ostream, result, &io->async_close_error); + g_clear_object (&io->body_ostream); + + async_close_wait = io->async_close_wait; + io->async_close_wait = NULL; + g_cancellable_cancel (async_close_wait); + g_object_unref (async_close_wait); + + g_object_unref (msg); +} + /* * There are two request/response formats: the basic request/response, * possibly with one or more unsolicited informational responses (such @@ -317,8 +386,28 @@ io_write (SoupMessage *msg, gboolean blocking, SoupBuffer *chunk; gssize nwrote; + if (io->async_close_error) { + g_propagate_error (error, io->async_close_error); + io->async_close_error = NULL; + return FALSE; + } else if (io->async_close_wait) { + g_set_error_literal (error, G_IO_ERROR, + G_IO_ERROR_WOULD_BLOCK, + _("Operation would block")); + return FALSE; + } + switch (io->write_state) { case SOUP_MESSAGE_IO_STATE_HEADERS: + if (io->mode == SOUP_MESSAGE_IO_SERVER && + io->read_state == SOUP_MESSAGE_IO_STATE_BLOCKING && + msg->status_code == 0) { + /* Client requested "Expect: 100-continue", and + * server did not set an error. + */ + soup_message_set_status (msg, SOUP_STATUS_CONTINUE); + } + if (!io->write_buf->len) { io->get_headers_cb (msg, io->write_buf, &io->write_encoding, @@ -357,6 +446,13 @@ io_write (SoupMessage *msg, gboolean blocking, } soup_message_wrote_informational (msg); + + /* If this was "101 Switching Protocols", then + * the server probably stole the connection... + */ + if (io != priv->io_data) + return FALSE; + soup_message_cleanup_response (msg); break; } @@ -401,7 +497,7 @@ io_write (SoupMessage *msg, gboolean blocking, if (!io->write_length && io->write_encoding != SOUP_ENCODING_EOF && io->write_encoding != SOUP_ENCODING_CHUNKED) { - io->write_state = SOUP_MESSAGE_IO_STATE_BODY_DONE; + io->write_state = SOUP_MESSAGE_IO_STATE_BODY_FLUSH; break; } @@ -413,7 +509,7 @@ io_write (SoupMessage *msg, gboolean blocking, return FALSE; } if (!io->write_chunk->length) { - io->write_state = SOUP_MESSAGE_IO_STATE_BODY_DONE; + io->write_state = SOUP_MESSAGE_IO_STATE_BODY_FLUSH; break; } } @@ -443,7 +539,7 @@ io_write (SoupMessage *msg, gboolean blocking, case SOUP_MESSAGE_IO_STATE_BODY_DATA: io->written = 0; if (io->write_chunk->length == 0) { - io->write_state = SOUP_MESSAGE_IO_STATE_BODY_DONE; + io->write_state = SOUP_MESSAGE_IO_STATE_BODY_FLUSH; break; } @@ -459,13 +555,29 @@ io_write (SoupMessage *msg, gboolean blocking, break; - case SOUP_MESSAGE_IO_STATE_BODY_DONE: + case SOUP_MESSAGE_IO_STATE_BODY_FLUSH: if (io->body_ostream) { - if (!g_output_stream_close (io->body_ostream, cancellable, error)) - return FALSE; - g_clear_object (&io->body_ostream); + if (blocking || io->write_encoding != SOUP_ENCODING_CHUNKED) { + if (!g_output_stream_close (io->body_ostream, cancellable, error)) + return FALSE; + g_clear_object (&io->body_ostream); + } else { + io->async_close_wait = g_cancellable_new (); + if (io->async_context) + g_main_context_push_thread_default (io->async_context); + g_output_stream_close_async (io->body_ostream, + G_PRIORITY_DEFAULT, cancellable, + closed_async, g_object_ref (msg)); + if (io->async_context) + g_main_context_pop_thread_default (io->async_context); + } } + io->write_state = SOUP_MESSAGE_IO_STATE_BODY_DONE; + break; + + + case SOUP_MESSAGE_IO_STATE_BODY_DONE: io->write_state = SOUP_MESSAGE_IO_STATE_FINISHING; soup_message_wrote_body (msg); break; @@ -547,15 +659,22 @@ io_read (SoupMessage *msg, gboolean blocking, * bail out here rather than parsing encoding, etc */ soup_message_got_informational (msg); + + /* If this was "101 Switching Protocols", then + * the session may have stolen the connection... + */ + if (io != priv->io_data) + return FALSE; + soup_message_cleanup_response (msg); break; } else if (io->mode == SOUP_MESSAGE_IO_SERVER && soup_message_headers_get_expectations (msg->request_headers) & SOUP_EXPECTATION_CONTINUE) { - /* The client requested a Continue response. The - * got_headers handler may change this to something - * else though. + /* We must return a status code and response + * headers to the client; either an error to + * be set by a got-headers handler below, or + * else %SOUP_STATUS_CONTINUE otherwise. */ - soup_message_set_status (msg, SOUP_STATUS_CONTINUE); io->write_state = SOUP_MESSAGE_IO_STATE_HEADERS; io->read_state = SOUP_MESSAGE_IO_STATE_BLOCKING; } else { @@ -702,7 +821,7 @@ message_source_check (GSource *source) SoupMessagePrivate *priv = SOUP_MESSAGE_GET_PRIVATE (message_source->msg); SoupMessageIOData *io = priv->io_data; - if (!io || io->paused) + if (io && io->paused) return FALSE; else return TRUE; @@ -783,6 +902,8 @@ soup_message_io_get_source (SoupMessage *msg, GCancellable *cancellable, base_source = g_timeout_source_new (0); } else if (io->paused) { base_source = NULL; + } else if (io->async_close_wait) { + base_source = g_cancellable_source_new (io->async_close_wait); } else if (SOUP_MESSAGE_IO_STATE_POLLABLE (io->read_state)) { GPollableInputStream *istream; @@ -858,7 +979,7 @@ io_run_until (SoupMessage *msg, gboolean blocking, g_object_ref (msg); - while (progress && priv->io_data == io && !io->paused && + while (progress && priv->io_data == io && !io->paused && !io->async_close_wait && (io->read_state < read_state || io->write_state < write_state)) { if (SOUP_MESSAGE_IO_STATE_ACTIVE (io->read_state)) @@ -882,15 +1003,16 @@ io_run_until (SoupMessage *msg, gboolean blocking, g_propagate_error (error, my_error); g_object_unref (msg); return FALSE; - } else if (g_cancellable_set_error_if_cancelled (cancellable, error)) { - g_object_unref (msg); - return FALSE; } else if (priv->io_data != io) { g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_CANCELLED, _("Operation was cancelled")); g_object_unref (msg); return FALSE; + } else if (!io->async_close_wait && + g_cancellable_set_error_if_cancelled (cancellable, error)) { + g_object_unref (msg); + return FALSE; } done = (io->read_state >= read_state && @@ -908,8 +1030,6 @@ io_run_until (SoupMessage *msg, gboolean blocking, return done; } -static void io_run (SoupMessage *msg, gboolean blocking); - static gboolean io_run_ready (SoupMessage *msg, gpointer user_data) { @@ -1201,7 +1321,7 @@ soup_message_io_unpause (SoupMessage *msg) if (!io->unpause_source) { io->unpause_source = soup_add_completion_reffed (io->async_context, - io_unpause_internal, msg); + io_unpause_internal, msg, NULL); } } diff --git a/libsoup/soup-message-private.h b/libsoup/soup-message-private.h index 35cc9887..71adac7d 100644 --- a/libsoup/soup-message-private.h +++ b/libsoup/soup-message-private.h @@ -48,6 +48,11 @@ typedef struct { void soup_message_cleanup_response (SoupMessage *msg); +typedef enum { + SOUP_MESSAGE_IO_COMPLETE, + SOUP_MESSAGE_IO_INTERRUPTED, + SOUP_MESSAGE_IO_STOLEN +} SoupMessageIOCompletion; typedef void (*SoupMessageGetHeadersFn) (SoupMessage *msg, GString *headers, @@ -60,6 +65,7 @@ typedef guint (*SoupMessageParseHeadersFn)(SoupMessage *msg, gpointer user_data, GError **error); typedef void (*SoupMessageCompletionFn) (SoupMessage *msg, + SoupMessageIOCompletion completion, gpointer user_data); @@ -68,6 +74,7 @@ void soup_message_send_request (SoupMessageQueueItem *item, gpointer user_data); void soup_message_read_request (SoupMessage *msg, SoupSocket *sock, + gboolean use_thread_context, SoupMessageCompletionFn completion_cb, gpointer user_data); @@ -87,7 +94,6 @@ void soup_message_io_server (SoupMessage *msg, gpointer headers_data, SoupMessageCompletionFn completion_cb, gpointer user_data); -void soup_message_io_cleanup (SoupMessage *msg); /* Auth handling */ void soup_message_set_auth (SoupMessage *msg, @@ -98,11 +104,18 @@ void soup_message_set_proxy_auth (SoupMessage *msg, SoupAuth *soup_message_get_proxy_auth (SoupMessage *msg); /* I/O */ -void soup_message_io_stop (SoupMessage *msg); -void soup_message_io_finished (SoupMessage *msg); -void soup_message_io_pause (SoupMessage *msg); -void soup_message_io_unpause (SoupMessage *msg); -gboolean soup_message_io_in_progress (SoupMessage *msg); +void soup_message_io_stop (SoupMessage *msg); +void soup_message_io_finished (SoupMessage *msg); +/* This is supposed to be private, but there are programs that rely on it + * being exported. See bug #687758, #687468. + */ +SOUP_AVAILABLE_IN_2_4 +void soup_message_io_cleanup (SoupMessage *msg); +void soup_message_io_pause (SoupMessage *msg); +void soup_message_io_unpause (SoupMessage *msg); +gboolean soup_message_io_in_progress (SoupMessage *msg); +GIOStream *soup_message_io_steal (SoupMessage *msg); + gboolean soup_message_io_run_until_write (SoupMessage *msg, gboolean blocking, diff --git a/libsoup/soup-message-queue.c b/libsoup/soup-message-queue.c index 4bc37267..436f3eb5 100644 --- a/libsoup/soup-message-queue.c +++ b/libsoup/soup-message-queue.c @@ -139,7 +139,9 @@ soup_message_queue_append (SoupMessageQueue *queue, SoupMessage *msg, void soup_message_queue_item_ref (SoupMessageQueueItem *item) { + g_mutex_lock (&item->queue->mutex); item->ref_count++; + g_mutex_unlock (&item->queue->mutex); } /** @@ -202,7 +204,7 @@ soup_message_queue_item_unref (SoupMessageQueueItem *item) * the item with soup_message_queue_unref_item() when you are done * with it. * - * Return value: the queue item for @msg, or %NULL + * Return value: (nullable): the queue item for @msg, or %NULL **/ SoupMessageQueueItem * soup_message_queue_lookup (SoupMessageQueue *queue, SoupMessage *msg) diff --git a/libsoup/soup-message-queue.h b/libsoup/soup-message-queue.h index f86a1296..275ea38d 100644 --- a/libsoup/soup-message-queue.h +++ b/libsoup/soup-message-queue.h @@ -48,14 +48,17 @@ struct _SoupMessageQueueItem { guint new_api : 1; guint io_started : 1; guint async : 1; - guint resend_count : 28; + guint async_pending : 1; + guint conn_is_dedicated : 1; + guint connect_only : 1; + guint priority : 3; + guint resend_count : 5; SoupMessageQueueItemState state; /*< private >*/ - guint removed : 1; - guint priority : 3; - guint ref_count : 28; + guint removed : 1; + guint ref_count : 31; SoupMessageQueueItem *prev, *next; SoupMessageQueueItem *related; }; diff --git a/libsoup/soup-message-server-io.c b/libsoup/soup-message-server-io.c index 2647b811..35b544c2 100644 --- a/libsoup/soup-message-server-io.c +++ b/libsoup/soup-message-server-io.c @@ -9,6 +9,7 @@ #include "config.h" #endif +#include #include #include @@ -16,6 +17,29 @@ #include "soup.h" #include "soup-message-private.h" #include "soup-misc-private.h" +#include "soup-socket-private.h" + +static SoupURI * +parse_connect_authority (const char *req_path) +{ + SoupURI *uri; + char *fake_uri; + + fake_uri = g_strdup_printf ("http://%s", req_path); + uri = soup_uri_new (fake_uri); + g_free (fake_uri); + + if (uri->user || uri->password || + uri->query || uri->fragment || + !uri->host || + (uri->port == 0) || + (strcmp (uri->path, "/") != 0)) { + soup_uri_free (uri); + return NULL; + } + + return uri; +} static guint parse_request_headers (SoupMessage *msg, char *headers, guint headers_len, @@ -73,8 +97,11 @@ parse_request_headers (SoupMessage *msg, char *headers, guint headers_len, if (uri) soup_uri_set_path (uri, "*"); g_free (url); + } else if (msg->method == SOUP_METHOD_CONNECT) { + /* Authority */ + uri = parse_connect_authority (req_path); } else if (*req_path != '/') { - /* Must be an absolute URI */ + /* Absolute URI */ uri = soup_uri_new (req_path); } else if (req_host) { url = g_strdup_printf ("%s://%s%s", @@ -220,6 +247,9 @@ get_response_headers (SoupMessage *msg, GString *headers, SoupMessageHeadersIter iter; const char *name, *value; + if (msg->status_code == 0) + soup_message_set_status (msg, SOUP_STATUS_INTERNAL_SERVER_ERROR); + handle_partial_get (msg); g_string_append_printf (headers, "HTTP/1.%c %d %s\r\n", @@ -252,17 +282,22 @@ get_response_headers (SoupMessage *msg, GString *headers, void soup_message_read_request (SoupMessage *msg, SoupSocket *sock, + gboolean use_thread_context, SoupMessageCompletionFn completion_cb, gpointer user_data) { GMainContext *async_context; GIOStream *iostream; - g_object_get (sock, - SOUP_SOCKET_ASYNC_CONTEXT, &async_context, - NULL); - if (!async_context) - async_context = g_main_context_ref (g_main_context_default ()); + if (use_thread_context) + async_context = g_main_context_ref_thread_default (); + else { + g_object_get (sock, + SOUP_SOCKET_ASYNC_CONTEXT, &async_context, + NULL); + if (!async_context) + async_context = g_main_context_ref (g_main_context_default ()); + } iostream = soup_socket_get_iostream (sock); @@ -271,6 +306,5 @@ soup_message_read_request (SoupMessage *msg, parse_request_headers, sock, completion_cb, user_data); - if (async_context) - g_main_context_unref (async_context); + g_main_context_unref (async_context); } diff --git a/libsoup/soup-message.c b/libsoup/soup-message.c index 23fd8b08..e4d78476 100644 --- a/libsoup/soup-message.c +++ b/libsoup/soup-message.c @@ -5,6 +5,10 @@ * Copyright (C) 2000-2003, Ximian, Inc. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include "soup-message.h" @@ -109,6 +113,7 @@ enum { GOT_BODY, CONTENT_SNIFFED, + STARTING, RESTARTED, FINISHED, @@ -598,6 +603,23 @@ soup_message_class_init (SoupMessageClass *message_class) G_TYPE_STRING, G_TYPE_HASH_TABLE); + /** + * SoupMessage::starting: + * @msg: the message + * + * Emitted just before a message is sent. + * + * Since: 2.50 + */ + signals[STARTING] = + g_signal_new ("starting", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (SoupMessageClass, starting), + NULL, NULL, + NULL, + G_TYPE_NONE, 0); + /** * SoupMessage::restarted: * @msg: the message @@ -744,7 +766,7 @@ soup_message_class_init (SoupMessageClass *message_class) g_param_spec_uint (SOUP_MESSAGE_STATUS_CODE, "Status code", "The HTTP response status code", - 0, 599, 0, + 0, 999, 0, G_PARAM_READWRITE)); /** * SOUP_MESSAGE_REASON_PHRASE: @@ -949,8 +971,8 @@ soup_message_class_init (SoupMessageClass *message_class) * * Creates a new empty #SoupMessage, which will connect to @uri * - * Return value: the new #SoupMessage (or %NULL if @uri could not - * be parsed). + * Return value: (nullable): the new #SoupMessage (or %NULL if @uri + * could not be parsed). */ SoupMessage * soup_message_new (const char *method, const char *uri_string) @@ -1124,6 +1146,12 @@ soup_message_content_sniffed (SoupMessage *msg, const char *content_type, GHashT g_signal_emit (msg, signals[CONTENT_SNIFFED], 0, content_type, params); } +void +soup_message_starting (SoupMessage *msg) +{ + g_signal_emit (msg, signals[STARTING], 0); +} + void soup_message_restarted (SoupMessage *msg) { @@ -1276,29 +1304,18 @@ void soup_message_set_auth (SoupMessage *msg, SoupAuth *auth) { SoupMessagePrivate *priv; - char *token; g_return_if_fail (SOUP_IS_MESSAGE (msg)); g_return_if_fail (auth == NULL || SOUP_IS_AUTH (auth)); priv = SOUP_MESSAGE_GET_PRIVATE (msg); - if (priv->auth) { - g_object_unref (priv->auth); - soup_message_headers_remove (msg->request_headers, - "Authorization"); - } - priv->auth = auth; - if (!priv->auth) + if (priv->auth == auth) return; - g_object_ref (priv->auth); - token = soup_auth_get_authorization (auth, msg); - if (token) { - soup_message_headers_replace (msg->request_headers, - "Authorization", token); - g_free (token); - } + if (priv->auth) + g_object_unref (priv->auth); + priv->auth = auth ? g_object_ref (auth) : NULL; } SoupAuth * @@ -1313,27 +1330,18 @@ void soup_message_set_proxy_auth (SoupMessage *msg, SoupAuth *auth) { SoupMessagePrivate *priv; - char *token; g_return_if_fail (SOUP_IS_MESSAGE (msg)); g_return_if_fail (auth == NULL || SOUP_IS_AUTH (auth)); priv = SOUP_MESSAGE_GET_PRIVATE (msg); - if (priv->proxy_auth) { - g_object_unref (priv->proxy_auth); - soup_message_headers_remove (msg->request_headers, - "Proxy-Authorization"); - } - priv->proxy_auth = auth; - if (!priv->proxy_auth) + if (priv->proxy_auth == auth) return; - g_object_ref (priv->proxy_auth); - token = soup_auth_get_authorization (auth, msg); - soup_message_headers_replace (msg->request_headers, - "Proxy-Authorization", token); - g_free (token); + if (priv->proxy_auth) + g_object_unref (priv->proxy_auth); + priv->proxy_auth = auth ? g_object_ref (auth) : NULL; } SoupAuth * @@ -1421,6 +1429,19 @@ soup_message_cleanup_response (SoupMessage *msg) * regardless its #SoupMessage:method, and allows reuse of existing * idle connections, instead of always requiring a new one, unless * #SOUP_MESSAGE_NEW_CONNECTION is set. + * @SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS: Request that a new connection is + * created for the message if there aren't idle connections available + * and it's not possible to create new connections due to any of the + * connection limits has been reached. If a dedicated connection is + * eventually created for this message, it will be dropped when the + * message finishes. Since 2.50 + * @SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE: The #SoupAuthManager should not use + * the credentials cache for this message, neither to use cached credentials + * to automatically authenticate this message nor to cache the credentials + * after the message is successfully authenticated. This applies to both server + * and proxy authentication. Note that #SoupSession::authenticate signal will + * be emitted, if you want to disable authentication for a message use + * soup_message_disable_feature() passing #SOUP_TYPE_AUTH_MANAGER instead. Since 2.58 * * Various flags that can be set on a #SoupMessage to alter its * behavior. @@ -1528,13 +1549,6 @@ soup_message_get_http_version (SoupMessage *msg) gboolean soup_message_is_keepalive (SoupMessage *msg) { - const char *c_conn, *s_conn; - - c_conn = soup_message_headers_get_list (msg->request_headers, - "Connection"); - s_conn = soup_message_headers_get_list (msg->response_headers, - "Connection"); - if (msg->status_code == SOUP_STATUS_OK && msg->method == SOUP_METHOD_CONNECT) return TRUE; @@ -1550,13 +1564,15 @@ soup_message_is_keepalive (SoupMessage *msg) * doesn't request it. So ignore c_conn. */ - if (!s_conn || !soup_header_contains (s_conn, "Keep-Alive")) + if (!soup_message_headers_header_contains (msg->response_headers, + "Connection", "Keep-Alive")) return FALSE; } else { /* Normally persistent unless either side requested otherwise */ - if (c_conn && soup_header_contains (c_conn, "close")) - return FALSE; - if (s_conn && soup_header_contains (s_conn, "close")) + if (soup_message_headers_header_contains (msg->request_headers, + "Connection", "close") || + soup_message_headers_header_contains (msg->response_headers, + "Connection", "close")) return FALSE; return TRUE; @@ -1705,7 +1721,7 @@ soup_message_set_status_full (SoupMessage *msg, * up to the application to make sure that it gets unpaused when it * becomes possible to allocate a new buffer. * - * Return value: the new buffer (or %NULL) + * Return value: (nullable): the new buffer (or %NULL) * * Deprecated: Use #SoupRequest if you want to read into your * own buffers. @@ -1914,6 +1930,9 @@ soup_message_set_https_status (SoupMessage *msg, SoupConnection *conn) * showing what problems, if any, have been found with that * certificate. * + * This is only meaningful with messages processed by a #SoupSession and is + * not useful for messages received by a #SoupServer + * * Return value: %TRUE if @msg used/attempted https, %FALSE if not * * Since: 2.34 diff --git a/libsoup/soup-message.h b/libsoup/soup-message.h index b02d293b..cab2bad3 100644 --- a/libsoup/soup-message.h +++ b/libsoup/soup-message.h @@ -50,14 +50,15 @@ typedef struct { void (*got_body) (SoupMessage *msg); void (*restarted) (SoupMessage *msg); void (*finished) (SoupMessage *msg); + void (*starting) (SoupMessage *msg); /* Padding for future expansion */ void (*_libsoup_reserved1) (void); void (*_libsoup_reserved2) (void); void (*_libsoup_reserved3) (void); - void (*_libsoup_reserved4) (void); } SoupMessageClass; +SOUP_AVAILABLE_IN_2_4 GType soup_message_get_type (void); #define SOUP_MESSAGE_METHOD "method" @@ -78,16 +79,20 @@ GType soup_message_get_type (void); #define SOUP_MESSAGE_TLS_ERRORS "tls-errors" #define SOUP_MESSAGE_PRIORITY "priority" +SOUP_AVAILABLE_IN_2_4 SoupMessage *soup_message_new (const char *method, const char *uri_string); +SOUP_AVAILABLE_IN_2_4 SoupMessage *soup_message_new_from_uri (const char *method, SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_message_set_request (SoupMessage *msg, const char *content_type, SoupMemoryUse req_use, const char *req_body, gsize req_length); +SOUP_AVAILABLE_IN_2_4 void soup_message_set_response (SoupMessage *msg, const char *content_type, SoupMemoryUse resp_use, @@ -99,13 +104,18 @@ typedef enum { SOUP_HTTP_1_1 = 1 /*< nick=http-1-1 >*/ } SoupHTTPVersion; +SOUP_AVAILABLE_IN_2_4 void soup_message_set_http_version (SoupMessage *msg, SoupHTTPVersion version); +SOUP_AVAILABLE_IN_2_4 SoupHTTPVersion soup_message_get_http_version (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 gboolean soup_message_is_keepalive (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 SoupURI *soup_message_get_uri (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_set_uri (SoupMessage *msg, SoupURI *uri); SOUP_AVAILABLE_IN_2_26 @@ -118,20 +128,24 @@ void soup_message_set_first_party (SoupMessage *msg, SoupURI *first_party); typedef enum { - SOUP_MESSAGE_NO_REDIRECT = (1 << 1), - SOUP_MESSAGE_CAN_REBUILD = (1 << 2), + SOUP_MESSAGE_NO_REDIRECT = (1 << 1), + SOUP_MESSAGE_CAN_REBUILD = (1 << 2), #ifndef SOUP_DISABLE_DEPRECATED - SOUP_MESSAGE_OVERWRITE_CHUNKS = (1 << 3), + SOUP_MESSAGE_OVERWRITE_CHUNKS = (1 << 3), #endif - SOUP_MESSAGE_CONTENT_DECODED = (1 << 4), - SOUP_MESSAGE_CERTIFICATE_TRUSTED = (1 << 5), - SOUP_MESSAGE_NEW_CONNECTION = (1 << 6), - SOUP_MESSAGE_IDEMPOTENT = (1 << 7) + SOUP_MESSAGE_CONTENT_DECODED = (1 << 4), + SOUP_MESSAGE_CERTIFICATE_TRUSTED = (1 << 5), + SOUP_MESSAGE_NEW_CONNECTION = (1 << 6), + SOUP_MESSAGE_IDEMPOTENT = (1 << 7), + SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS = (1 << 8), + SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE = (1 << 9) } SoupMessageFlags; +SOUP_AVAILABLE_IN_2_4 void soup_message_set_flags (SoupMessage *msg, SoupMessageFlags flags); +SOUP_AVAILABLE_IN_2_4 SoupMessageFlags soup_message_get_flags (SoupMessage *msg); SOUP_AVAILABLE_IN_2_34 @@ -141,12 +155,14 @@ gboolean soup_message_get_https_status (SoupMessage *msg, /* Specialized signal handlers */ +SOUP_AVAILABLE_IN_2_4 guint soup_message_add_header_handler (SoupMessage *msg, const char *signal, const char *header, GCallback callback, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 guint soup_message_add_status_code_handler ( SoupMessage *msg, const char *signal, @@ -157,9 +173,11 @@ guint soup_message_add_status_code_handler ( /* * Status Setting */ +SOUP_AVAILABLE_IN_2_4 void soup_message_set_status (SoupMessage *msg, guint status_code); +SOUP_AVAILABLE_IN_2_4 void soup_message_set_status_full (SoupMessage *msg, guint status_code, const char *reason_phrase); @@ -175,6 +193,7 @@ typedef SoupBuffer * (*SoupChunkAllocator) (SoupMessage *msg, gsize max_len, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_42_FOR(SoupRequest) void soup_message_set_chunk_allocator (SoupMessage *msg, SoupChunkAllocator allocator, @@ -206,17 +225,33 @@ void soup_message_set_priority (SoupMessage *msg, SOUP_AVAILABLE_IN_2_44 SoupMessagePriority soup_message_get_priority (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_wrote_informational (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_wrote_headers (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_wrote_chunk (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_wrote_body_data (SoupMessage *msg, SoupBuffer *chunk); +SOUP_AVAILABLE_IN_2_4 void soup_message_wrote_body (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_got_informational (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_got_headers (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_got_chunk (SoupMessage *msg, SoupBuffer *chunk); +SOUP_AVAILABLE_IN_2_4 void soup_message_got_body (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_content_sniffed (SoupMessage *msg, const char *content_type, GHashTable *params); + +SOUP_AVAILABLE_IN_2_50 +void soup_message_starting (SoupMessage *msg); + +SOUP_AVAILABLE_IN_2_4 void soup_message_restarted (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_finished (SoupMessage *msg); G_END_DECLS diff --git a/libsoup/soup-method.h b/libsoup/soup-method.h index 2934cca9..cec59e3c 100644 --- a/libsoup/soup-method.h +++ b/libsoup/soup-method.h @@ -58,22 +58,22 @@ G_BEGIN_DECLS /* Do not use these variables directly; use the macros above, which * ensure that they get initialized properly. */ -extern gpointer _SOUP_METHOD_OPTIONS; -extern gpointer _SOUP_METHOD_GET; -extern gpointer _SOUP_METHOD_HEAD; -extern gpointer _SOUP_METHOD_POST; -extern gpointer _SOUP_METHOD_PUT; -extern gpointer _SOUP_METHOD_DELETE; -extern gpointer _SOUP_METHOD_TRACE; -extern gpointer _SOUP_METHOD_CONNECT; +SOUP_VAR gpointer _SOUP_METHOD_OPTIONS; +SOUP_VAR gpointer _SOUP_METHOD_GET; +SOUP_VAR gpointer _SOUP_METHOD_HEAD; +SOUP_VAR gpointer _SOUP_METHOD_POST; +SOUP_VAR gpointer _SOUP_METHOD_PUT; +SOUP_VAR gpointer _SOUP_METHOD_DELETE; +SOUP_VAR gpointer _SOUP_METHOD_TRACE; +SOUP_VAR gpointer _SOUP_METHOD_CONNECT; -extern gpointer _SOUP_METHOD_PROPFIND; -extern gpointer _SOUP_METHOD_PROPPATCH; -extern gpointer _SOUP_METHOD_MKCOL; -extern gpointer _SOUP_METHOD_COPY; -extern gpointer _SOUP_METHOD_MOVE; -extern gpointer _SOUP_METHOD_LOCK; -extern gpointer _SOUP_METHOD_UNLOCK; +SOUP_VAR gpointer _SOUP_METHOD_PROPFIND; +SOUP_VAR gpointer _SOUP_METHOD_PROPPATCH; +SOUP_VAR gpointer _SOUP_METHOD_MKCOL; +SOUP_VAR gpointer _SOUP_METHOD_COPY; +SOUP_VAR gpointer _SOUP_METHOD_MOVE; +SOUP_VAR gpointer _SOUP_METHOD_LOCK; +SOUP_VAR gpointer _SOUP_METHOD_UNLOCK; G_END_DECLS diff --git a/libsoup/soup-misc-private.h b/libsoup/soup-misc-private.h index 50a3b988..7fe31a16 100644 --- a/libsoup/soup-misc-private.h +++ b/libsoup/soup-misc-private.h @@ -7,47 +7,14 @@ #ifndef SOUP_MISC_PRIVATE_H #define SOUP_MISC_PRIVATE_H 1 -#include "soup-socket.h" #include "soup-message-headers.h" char *soup_uri_decoded_copy (const char *str, int length, int *decoded_length); char *soup_uri_to_string_internal (SoupURI *uri, gboolean just_path_and_query, - gboolean force_port); + gboolean include_password, gboolean force_port); gboolean soup_uri_is_http (SoupURI *uri, char **aliases); gboolean soup_uri_is_https (SoupURI *uri, char **aliases); -gboolean soup_socket_connect_sync_internal (SoupSocket *sock, - GCancellable *cancellable, - GError **error); -void soup_socket_connect_async_internal (SoupSocket *sock, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -gboolean soup_socket_connect_finish_internal (SoupSocket *sock, - GAsyncResult *result, - GError **error); - -gboolean soup_socket_handshake_sync (SoupSocket *sock, - const char *host, - GCancellable *cancellable, - GError **error); -void soup_socket_handshake_async (SoupSocket *sock, - const char *host, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -gboolean soup_socket_handshake_finish (SoupSocket *sock, - GAsyncResult *result, - GError **error); - -GSocket *soup_socket_get_gsocket (SoupSocket *sock); -GIOStream *soup_socket_get_connection (SoupSocket *sock); -GIOStream *soup_socket_get_iostream (SoupSocket *sock); - -#define SOUP_SOCKET_CLEAN_DISPOSE "clean-dispose" -#define SOUP_SOCKET_PROXY_RESOLVER "proxy-resolver" -SoupURI *soup_socket_get_http_proxy_uri (SoupSocket *sock); - /* At some point it might be possible to mark additional methods * safe or idempotent... */ @@ -63,9 +30,10 @@ SoupURI *soup_socket_get_http_proxy_uri (SoupSocket *sock); method == SOUP_METHOD_PUT || \ method == SOUP_METHOD_DELETE) -GSource *soup_add_completion_reffed (GMainContext *async_context, - GSourceFunc function, - gpointer data); +GSource *soup_add_completion_reffed (GMainContext *async_context, + GSourceFunc function, + gpointer data, + GDestroyNotify dnotify); guint soup_message_headers_get_ranges_internal (SoupMessageHeaders *hdrs, goffset total_length, @@ -73,4 +41,9 @@ guint soup_message_headers_get_ranges_internal (SoupMessageHeaders *hdrs, SoupRange **ranges, int *length); +SoupAddress *soup_address_new_from_gsockaddr (GSocketAddress *addr); + +gboolean soup_host_matches_host (const gchar *host, + const gchar *compare_with); + #endif /* SOUP_MISC_PRIVATE_H */ diff --git a/libsoup/soup-misc.c b/libsoup/soup-misc.c index 325b5872..c583d901 100644 --- a/libsoup/soup-misc.c +++ b/libsoup/soup-misc.c @@ -5,6 +5,10 @@ * Copyright (C) 2000-2003, Ximian, Inc. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include "soup-misc.h" @@ -114,14 +118,15 @@ soup_add_idle (GMainContext *async_context, } GSource * -soup_add_completion_reffed (GMainContext *async_context, - GSourceFunc function, - gpointer data) +soup_add_completion_reffed (GMainContext *async_context, + GSourceFunc function, + gpointer data, + GDestroyNotify dnotify) { GSource *source = g_idle_source_new (); g_source_set_priority (source, G_PRIORITY_DEFAULT); - g_source_set_callback (source, function, data, NULL); + g_source_set_callback (source, function, data, dnotify); g_source_attach (source, async_context); return source; } @@ -148,7 +153,7 @@ soup_add_completion (GMainContext *async_context, { GSource *source; - source = soup_add_completion_reffed (async_context, function, data); + source = soup_add_completion_reffed (async_context, function, data, NULL); g_source_unref (source); return source; } @@ -237,3 +242,38 @@ const char soup_char_attributes[] = { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }; + +/** + * soup_host_matches_host + * @host: a URI + * @compare_with: a URI + * + * Checks if the @host and @compare_with exactly match or prefixed with a dot. + * + * Return value: %TRUE if the hosts match, %FALSE otherwise + * + * Since: 2.54 + **/ +gboolean +soup_host_matches_host (const gchar *host, const gchar *compare_with) +{ + char *match; + int dlen; + + g_return_val_if_fail (host != NULL, FALSE); + g_return_val_if_fail (compare_with != NULL, FALSE); + + if (!g_ascii_strcasecmp (host, compare_with)) + return TRUE; + if (*host != '.') + return FALSE; + if (!g_ascii_strcasecmp (host + 1, compare_with)) + return TRUE; + dlen = strlen (host); + while ((match = strstr (compare_with, host))) { + if (!match[dlen]) + return TRUE; + compare_with = match + 1; + } + return FALSE; +} diff --git a/libsoup/soup-misc.h b/libsoup/soup-misc.h index 534b59d6..ecb09a86 100644 --- a/libsoup/soup-misc.h +++ b/libsoup/soup-misc.h @@ -11,11 +11,13 @@ G_BEGIN_DECLS /* Non-default-GMainContext operations */ +SOUP_AVAILABLE_IN_2_4 GSource *soup_add_io_watch (GMainContext *async_context, GIOChannel *chan, GIOCondition condition, GIOFunc function, gpointer data); +SOUP_AVAILABLE_IN_2_4 GSource *soup_add_idle (GMainContext *async_context, GSourceFunc function, gpointer data); @@ -23,6 +25,7 @@ SOUP_AVAILABLE_IN_2_24 GSource *soup_add_completion (GMainContext *async_context, GSourceFunc function, gpointer data); +SOUP_AVAILABLE_IN_2_4 GSource *soup_add_timeout (GMainContext *async_context, guint interval, GSourceFunc function, @@ -30,7 +33,9 @@ GSource *soup_add_timeout (GMainContext *async_context, /* Misc utils */ +SOUP_AVAILABLE_IN_2_4 guint soup_str_case_hash (gconstpointer key); +SOUP_AVAILABLE_IN_2_4 gboolean soup_str_case_equal (gconstpointer v1, gconstpointer v2); @@ -38,7 +43,8 @@ gboolean soup_str_case_equal (gconstpointer v1, /* character classes */ -extern const char soup_char_attributes[]; +SOUP_AVAILABLE_IN_2_4 +const char soup_char_attributes[]; #define SOUP_CHAR_URI_PERCENT_ENCODED 0x01 #define SOUP_CHAR_URI_GEN_DELIMS 0x02 #define SOUP_CHAR_URI_SUB_DELIMS 0x04 @@ -52,8 +58,8 @@ extern const char soup_char_attributes[]; #define soup_char_is_token(ch) (!(soup_char_attributes[(guchar)ch] & (SOUP_CHAR_HTTP_SEPARATOR | SOUP_CHAR_HTTP_CTL))) /* SSL stuff */ - -extern const gboolean soup_ssl_supported; +SOUP_AVAILABLE_IN_2_4 +const gboolean soup_ssl_supported; /* Part of a debugging API */ diff --git a/libsoup/soup-multipart-input-stream.c b/libsoup/soup-multipart-input-stream.c index dee4e59f..d44991cb 100644 --- a/libsoup/soup-multipart-input-stream.c +++ b/libsoup/soup-multipart-input-stream.c @@ -37,12 +37,6 @@ * Since: 2.40 **/ -static void soup_multipart_input_stream_pollable_init (GPollableInputStreamInterface *pollable_interface, gpointer interface_data); - -G_DEFINE_TYPE_WITH_CODE (SoupMultipartInputStream, soup_multipart_input_stream, G_TYPE_FILTER_INPUT_STREAM, - G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_INPUT_STREAM, - soup_multipart_input_stream_pollable_init)) - enum { PROP_0, @@ -65,6 +59,13 @@ struct _SoupMultipartInputStreamPrivate { goffset remaining_bytes; }; +static void soup_multipart_input_stream_pollable_init (GPollableInputStreamInterface *pollable_interface, gpointer interface_data); + +G_DEFINE_TYPE_WITH_CODE (SoupMultipartInputStream, soup_multipart_input_stream, G_TYPE_FILTER_INPUT_STREAM, + G_ADD_PRIVATE (SoupMultipartInputStream) + G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_INPUT_STREAM, + soup_multipart_input_stream_pollable_init)) + static void soup_multipart_input_stream_dispose (GObject *object) { @@ -201,9 +202,7 @@ static void soup_multipart_input_stream_init (SoupMultipartInputStream *multipart) { SoupMultipartInputStreamPrivate *priv; - priv = multipart->priv = G_TYPE_INSTANCE_GET_PRIVATE (multipart, - SOUP_TYPE_MULTIPART_INPUT_STREAM, - SoupMultipartInputStreamPrivate); + priv = multipart->priv = soup_multipart_input_stream_get_instance_private (multipart); priv->meta_buf = g_byte_array_sized_new (RESPONSE_BLOCK_SIZE); priv->done_with_part = FALSE; @@ -290,8 +289,6 @@ soup_multipart_input_stream_class_init (SoupMultipartInputStreamClass *multipart GInputStreamClass *input_stream_class = G_INPUT_STREAM_CLASS (multipart_class); - g_type_class_add_private (multipart_class, sizeof (SoupMultipartInputStreamPrivate)); - object_class->dispose = soup_multipart_input_stream_dispose; object_class->finalize = soup_multipart_input_stream_finalize; object_class->constructed = soup_multipart_input_stream_constructed; @@ -457,8 +454,8 @@ soup_multipart_input_stream_new (SoupMessage *msg, * the part; a new call to this function should be done at that point, * to obtain the next part. * - * Return value: (transfer full): a new #GInputStream, or %NULL if - * there are no more parts + * Return value: (nullable) (transfer full): a new #GInputStream, or + * %NULL if there are no more parts * * Since: 2.40 */ @@ -546,12 +543,13 @@ soup_multipart_input_stream_next_part_async (SoupMultipartInputStream *multipart * soup_multipart_input_stream_next_part_finish: * @multipart: a #SoupMultipartInputStream. * @result: a #GAsyncResult. - * @error: a #GError location to store any error, or NULL to ignore. + * @error: a #GError location to store any error, or %NULL to ignore. * * Finishes an asynchronous request for the next part. * - * Return value: (transfer full): a newly created #GInputStream for - * reading the next part or %NULL if there are no more parts. + * Return value: (nullable) (transfer full): a newly created + * #GInputStream for reading the next part or %NULL if there are no + * more parts. * * Since: 2.40 */ @@ -579,9 +577,9 @@ soup_multipart_input_stream_next_part_finish (SoupMultipartInputStream *multipar * Note that if a part had no headers at all an empty #SoupMessageHeaders * will be returned. * - * Return value: (transfer none): a #SoupMessageHeaders containing the headers - * for the part currently being processed or %NULL if the headers failed to - * parse. + * Return value: (nullable) (transfer none): a #SoupMessageHeaders + * containing the headers for the part currently being processed or + * %NULL if the headers failed to parse. * * Since: 2.40 */ diff --git a/libsoup/soup-multipart.c b/libsoup/soup-multipart.c index aa0b04bf..242c632f 100644 --- a/libsoup/soup-multipart.c +++ b/libsoup/soup-multipart.c @@ -5,6 +5,10 @@ * Copyright (C) 2008 Red Hat, Inc. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include "soup-multipart.h" @@ -130,8 +134,8 @@ find_boundary (const char *start, const char *end, * * Parses @headers and @body to form a new #SoupMultipart * - * Return value: a new #SoupMultipart (or %NULL if the message couldn't - * be parsed or wasn't multipart). + * Return value: (nullable): a new #SoupMultipart (or %NULL if the + * message couldn't be parsed or wasn't multipart). * * Since: 2.26 **/ @@ -412,7 +416,7 @@ soup_multipart_to_message (SoupMultipart *multipart, const char *name, *value; GString *str; GHashTable *params; - int i; + guint i; params = g_hash_table_new (g_str_hash, g_str_equal); g_hash_table_insert (params, "boundary", multipart->boundary); @@ -476,7 +480,7 @@ static SoupMultipart * soup_multipart_copy (SoupMultipart *multipart) { SoupMultipart *copy; - int i; + guint i; copy = soup_multipart_new_internal (g_strdup (multipart->mime_type), g_strdup (multipart->boundary)); diff --git a/libsoup/soup-multipart.h b/libsoup/soup-multipart.h index ef2e36c7..ddd1b360 100644 --- a/libsoup/soup-multipart.h +++ b/libsoup/soup-multipart.h @@ -14,6 +14,7 @@ G_BEGIN_DECLS typedef struct SoupMultipart SoupMultipart; +SOUP_AVAILABLE_IN_2_26 GType soup_multipart_get_type (void); #define SOUP_TYPE_MULTIPART (soup_multipart_get_type ()) diff --git a/libsoup/soup-path-map.c b/libsoup/soup-path-map.c index ca280df3..6be8eb67 100644 --- a/libsoup/soup-path-map.c +++ b/libsoup/soup-path-map.c @@ -5,6 +5,10 @@ * Copyright (C) 2007 Novell, Inc. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include "soup-path-map.h" @@ -58,7 +62,7 @@ void soup_path_map_free (SoupPathMap *map) { SoupPathMapping *mappings = (SoupPathMapping *)map->mappings->data; - int i; + guint i; for (i = 0; i < map->mappings->len; i++) { g_free (mappings[i].path); @@ -79,7 +83,8 @@ static gboolean mapping_lookup (SoupPathMap *map, const char *path, int *match, int *insert) { SoupPathMapping *mappings = (SoupPathMapping *)map->mappings->data; - int i, path_len; + guint i; + int path_len; gboolean exact = FALSE; *match = -1; @@ -170,8 +175,8 @@ soup_path_map_remove (SoupPathMap *map, const char *path) * specifically associated with @path, it will return the data for the * closest parent directory of @path that has data associated with it. * - * Return value: the data set with soup_path_map_add(), or %NULL if no - * data could be found for @path or any of its ancestors. + * Return value: (nullable): the data set with soup_path_map_add(), or + * %NULL if no data could be found for @path or any of its ancestors. **/ gpointer soup_path_map_lookup (SoupPathMap *map, const char *path) diff --git a/libsoup/soup-proxy-resolver-default.c b/libsoup/soup-proxy-resolver-default.c index 7fd09349..adfc54d2 100644 --- a/libsoup/soup-proxy-resolver-default.c +++ b/libsoup/soup-proxy-resolver-default.c @@ -34,12 +34,6 @@ * Deprecated: Use #SoupSession:proxy-resolver */ -static void soup_proxy_resolver_default_interface_init (SoupProxyURIResolverInterface *proxy_resolver_interface); - -G_DEFINE_TYPE_EXTENDED (SoupProxyResolverDefault, soup_proxy_resolver_default, G_TYPE_OBJECT, 0, - G_IMPLEMENT_INTERFACE (SOUP_TYPE_SESSION_FEATURE, NULL) - G_IMPLEMENT_INTERFACE (SOUP_TYPE_PROXY_URI_RESOLVER, soup_proxy_resolver_default_interface_init)) - enum { PROP_0, PROP_GPROXY_RESOLVER @@ -48,7 +42,13 @@ enum { typedef struct { GProxyResolver *gproxy_resolver; } SoupProxyResolverDefaultPrivate; -#define SOUP_PROXY_RESOLVER_DEFAULT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_PROXY_RESOLVER_DEFAULT, SoupProxyResolverDefaultPrivate)) + +static void soup_proxy_resolver_default_interface_init (SoupProxyURIResolverInterface *proxy_resolver_interface); + +G_DEFINE_TYPE_EXTENDED (SoupProxyResolverDefault, soup_proxy_resolver_default, G_TYPE_OBJECT, 0, + G_ADD_PRIVATE (SoupProxyResolverDefault) + G_IMPLEMENT_INTERFACE (SOUP_TYPE_SESSION_FEATURE, NULL) + G_IMPLEMENT_INTERFACE (SOUP_TYPE_PROXY_URI_RESOLVER, soup_proxy_resolver_default_interface_init)) static void soup_proxy_resolver_default_init (SoupProxyResolverDefault *resolver) @@ -59,7 +59,8 @@ static void soup_proxy_resolver_default_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - SoupProxyResolverDefaultPrivate *priv = SOUP_PROXY_RESOLVER_DEFAULT_GET_PRIVATE (object); + SoupProxyResolverDefault *resolver = SOUP_PROXY_RESOLVER_DEFAULT (object); + SoupProxyResolverDefaultPrivate *priv = soup_proxy_resolver_default_get_instance_private (resolver); switch (prop_id) { case PROP_GPROXY_RESOLVER: @@ -76,7 +77,8 @@ soup_proxy_resolver_default_set_property (GObject *object, guint prop_id, static void soup_proxy_resolver_default_constructed (GObject *object) { - SoupProxyResolverDefaultPrivate *priv = SOUP_PROXY_RESOLVER_DEFAULT_GET_PRIVATE (object); + SoupProxyResolverDefault *resolver = SOUP_PROXY_RESOLVER_DEFAULT (object); + SoupProxyResolverDefaultPrivate *priv = soup_proxy_resolver_default_get_instance_private (resolver); if (!priv->gproxy_resolver) { priv->gproxy_resolver = g_proxy_resolver_get_default (); @@ -89,7 +91,8 @@ soup_proxy_resolver_default_constructed (GObject *object) static void soup_proxy_resolver_default_finalize (GObject *object) { - SoupProxyResolverDefaultPrivate *priv = SOUP_PROXY_RESOLVER_DEFAULT_GET_PRIVATE (object); + SoupProxyResolverDefault *resolver = SOUP_PROXY_RESOLVER_DEFAULT (object); + SoupProxyResolverDefaultPrivate *priv = soup_proxy_resolver_default_get_instance_private (resolver); g_clear_object (&priv->gproxy_resolver); @@ -101,8 +104,6 @@ soup_proxy_resolver_default_class_init (SoupProxyResolverDefaultClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - g_type_class_add_private (klass, sizeof (SoupProxyResolverDefaultPrivate)); - object_class->set_property = soup_proxy_resolver_default_set_property; object_class->constructed = soup_proxy_resolver_default_constructed; object_class->finalize = soup_proxy_resolver_default_finalize; @@ -178,7 +179,8 @@ get_proxy_uri_async (SoupProxyURIResolver *resolver, SoupProxyURIResolverCallback callback, gpointer user_data) { - SoupProxyResolverDefaultPrivate *priv = SOUP_PROXY_RESOLVER_DEFAULT_GET_PRIVATE (resolver); + SoupProxyResolverDefault *resolver_default = SOUP_PROXY_RESOLVER_DEFAULT (resolver); + SoupProxyResolverDefaultPrivate *priv = soup_proxy_resolver_default_get_instance_private (resolver_default); SoupAsyncData *async_data; char *uri_string; @@ -211,7 +213,8 @@ get_proxy_uri_sync (SoupProxyURIResolver *resolver, GCancellable *cancellable, SoupURI **proxy_uri) { - SoupProxyResolverDefaultPrivate *priv = SOUP_PROXY_RESOLVER_DEFAULT_GET_PRIVATE (resolver); + SoupProxyResolverDefault *resolver_default = SOUP_PROXY_RESOLVER_DEFAULT (resolver); + SoupProxyResolverDefaultPrivate *priv = soup_proxy_resolver_default_get_instance_private (resolver_default); GError *error = NULL; char** proxy_uris = NULL; char *uri_string; diff --git a/libsoup/soup-proxy-resolver-default.h b/libsoup/soup-proxy-resolver-default.h index 6c9715cf..4bc6c744 100644 --- a/libsoup/soup-proxy-resolver-default.h +++ b/libsoup/soup-proxy-resolver-default.h @@ -6,7 +6,7 @@ #ifndef SOUP_PROXY_RESOLVER_DEFAULT_H #define SOUP_PROXY_RESOLVER_DEFAULT_H 1 -#include +#include #define SOUP_PROXY_RESOLVER_DEFAULT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SOUP_TYPE_PROXY_RESOLVER_DEFAULT, SoupProxyResolverDefault)) #define SOUP_PROXY_RESOLVER_DEFAULT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_PROXY_RESOLVER_DEFAULT, SoupProxyResolverDefaultClass)) @@ -24,6 +24,7 @@ typedef struct { } SoupProxyResolverDefaultClass; +SOUP_AVAILABLE_IN_2_4 GType soup_proxy_resolver_default_get_type (void); #define SOUP_TYPE_PROXY_RESOLVER_DEFAULT (soup_proxy_resolver_default_get_type ()) diff --git a/libsoup/soup-proxy-resolver.c b/libsoup/soup-proxy-resolver.c index a84c27ab..8886c684 100644 --- a/libsoup/soup-proxy-resolver.c +++ b/libsoup/soup-proxy-resolver.c @@ -12,8 +12,6 @@ #include "soup-proxy-resolver.h" #include "soup.h" -static void soup_proxy_resolver_default_init (SoupProxyResolverInterface *iface); - G_DEFINE_INTERFACE_WITH_CODE (SoupProxyResolver, soup_proxy_resolver, G_TYPE_OBJECT, g_type_interface_add_prerequisite (g_define_type_id, SOUP_TYPE_SESSION_FEATURE); ) diff --git a/libsoup/soup-proxy-resolver.h b/libsoup/soup-proxy-resolver.h index 72e48852..755d2196 100644 --- a/libsoup/soup-proxy-resolver.h +++ b/libsoup/soup-proxy-resolver.h @@ -39,9 +39,11 @@ typedef struct { } SoupProxyResolverInterface; +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_28 GType soup_proxy_resolver_get_type (void); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_28 void soup_proxy_resolver_get_proxy_async (SoupProxyResolver *proxy_resolver, SoupMessage *msg, @@ -49,6 +51,7 @@ void soup_proxy_resolver_get_proxy_async (SoupProxyResolver *proxy_resolver, GCancellable *cancellable, SoupProxyResolverCallback callback, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_28 guint soup_proxy_resolver_get_proxy_sync (SoupProxyResolver *proxy_resolver, SoupMessage *msg, diff --git a/libsoup/soup-proxy-uri-resolver.c b/libsoup/soup-proxy-uri-resolver.c index 7971fcb7..ddb8bd6b 100644 --- a/libsoup/soup-proxy-uri-resolver.c +++ b/libsoup/soup-proxy-uri-resolver.c @@ -15,7 +15,7 @@ #include "soup-proxy-uri-resolver.h" #include "soup.h" -/* +/** * SECTION:soup-proxy-uri-resolver * @short_description: Interface for locating HTTP proxies * @@ -40,7 +40,7 @@ soup_proxy_uri_resolver_default_init (SoupProxyURIResolverInterface *iface) { } -/* +/** * SoupProxyURIResolverCallback: * @resolver: the #SoupProxyURIResolver * @status: a #SoupStatus @@ -50,7 +50,7 @@ soup_proxy_uri_resolver_default_init (SoupProxyURIResolverInterface *iface) * Callback for soup_proxy_uri_resolver_get_proxy_uri_async() */ -/* +/** * soup_proxy_uri_resolver_get_proxy_uri_async: * @proxy_uri_resolver: the #SoupProxyURIResolver * @uri: the #SoupURI you want a proxy for @@ -81,7 +81,7 @@ soup_proxy_uri_resolver_get_proxy_uri_async (SoupProxyURIResolver *proxy_uri_re callback, user_data); } -/* +/** * soup_proxy_uri_resolver_get_proxy_uri_sync: * @proxy_uri_resolver: the #SoupProxyURIResolver * @uri: the #SoupURI you want a proxy for diff --git a/libsoup/soup-request-data.c b/libsoup/soup-request-data.c index 678e84da..3e075073 100644 --- a/libsoup/soup-request-data.c +++ b/libsoup/soup-request-data.c @@ -38,17 +38,18 @@ * #SoupRequestData implements #SoupRequest for "data" URIs. */ -G_DEFINE_TYPE (SoupRequestData, soup_request_data, SOUP_TYPE_REQUEST) struct _SoupRequestDataPrivate { gsize content_length; char *content_type; }; +G_DEFINE_TYPE_WITH_PRIVATE (SoupRequestData, soup_request_data, SOUP_TYPE_REQUEST) + static void soup_request_data_init (SoupRequestData *data) { - data->priv = G_TYPE_INSTANCE_GET_PRIVATE (data, SOUP_TYPE_REQUEST_DATA, SoupRequestDataPrivate); + data->priv = soup_request_data_get_instance_private (data); } static void @@ -89,7 +90,7 @@ soup_request_data_send (SoupRequest *request, comma = strchr (start, ','); if (comma && comma != start) { /* Deal with MIME type / params */ - if (comma > start + BASE64_INDICATOR_LEN && !g_ascii_strncasecmp (comma - BASE64_INDICATOR_LEN, BASE64_INDICATOR, BASE64_INDICATOR_LEN)) { + if (comma >= start + BASE64_INDICATOR_LEN && !g_ascii_strncasecmp (comma - BASE64_INDICATOR_LEN, BASE64_INDICATOR, BASE64_INDICATOR_LEN)) { end = comma - BASE64_INDICATOR_LEN; base64 = TRUE; } else @@ -151,8 +152,6 @@ soup_request_data_class_init (SoupRequestDataClass *request_data_class) SoupRequestClass *request_class = SOUP_REQUEST_CLASS (request_data_class); - g_type_class_add_private (request_data_class, sizeof (SoupRequestDataPrivate)); - request_class->schemes = data_schemes; object_class->finalize = soup_request_data_finalize; diff --git a/libsoup/soup-request-file.c b/libsoup/soup-request-file.c index 5a56b28b..61fc712d 100644 --- a/libsoup/soup-request-file.c +++ b/libsoup/soup-request-file.c @@ -40,8 +40,6 @@ * URIs. */ -G_DEFINE_TYPE (SoupRequestFile, soup_request_file, SOUP_TYPE_REQUEST) - struct _SoupRequestFilePrivate { GFile *gfile; @@ -49,10 +47,12 @@ struct _SoupRequestFilePrivate { goffset size; }; +G_DEFINE_TYPE_WITH_PRIVATE (SoupRequestFile, soup_request_file, SOUP_TYPE_REQUEST) + static void soup_request_file_init (SoupRequestFile *file) { - file->priv = G_TYPE_INSTANCE_GET_PRIVATE (file, SOUP_TYPE_REQUEST_FILE, SoupRequestFilePrivate); + file->priv = soup_request_file_get_instance_private (file); file->priv->size = -1; } @@ -265,8 +265,6 @@ soup_request_file_class_init (SoupRequestFileClass *request_file_class) SoupRequestClass *request_class = SOUP_REQUEST_CLASS (request_file_class); - g_type_class_add_private (request_file_class, sizeof (SoupRequestFilePrivate)); - request_class->schemes = file_schemes; object_class->finalize = soup_request_file_finalize; diff --git a/libsoup/soup-request-http.c b/libsoup/soup-request-http.c index 9ae2c2a7..285f59d7 100644 --- a/libsoup/soup-request-http.c +++ b/libsoup/soup-request-http.c @@ -44,13 +44,13 @@ * #SoupMessage. */ -G_DEFINE_TYPE (SoupRequestHTTP, soup_request_http, SOUP_TYPE_REQUEST) - struct _SoupRequestHTTPPrivate { SoupMessage *msg; char *content_type; }; +G_DEFINE_TYPE_WITH_PRIVATE (SoupRequestHTTP, soup_request_http, SOUP_TYPE_REQUEST) + static void content_sniffed (SoupMessage *msg, const char *content_type, GHashTable *params, @@ -59,7 +59,7 @@ static void content_sniffed (SoupMessage *msg, static void soup_request_http_init (SoupRequestHTTP *http) { - http->priv = G_TYPE_INSTANCE_GET_PRIVATE (http, SOUP_TYPE_REQUEST_HTTP, SoupRequestHTTPPrivate); + http->priv = soup_request_http_get_instance_private (http); } static gboolean @@ -203,8 +203,6 @@ soup_request_http_class_init (SoupRequestHTTPClass *request_http_class) SoupRequestClass *request_class = SOUP_REQUEST_CLASS (request_http_class); - g_type_class_add_private (request_http_class, sizeof (SoupRequestHTTPPrivate)); - request_class->schemes = http_schemes; object_class->finalize = soup_request_http_finalize; diff --git a/libsoup/soup-request.c b/libsoup/soup-request.c index 0dfe3eff..72fc844b 100644 --- a/libsoup/soup-request.c +++ b/libsoup/soup-request.c @@ -47,12 +47,6 @@ * Since: 2.42 */ -static void soup_request_initable_interface_init (GInitableIface *initable_interface); - -G_DEFINE_TYPE_WITH_CODE (SoupRequest, soup_request, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, - soup_request_initable_interface_init)) - enum { PROP_0, PROP_URI, @@ -64,10 +58,17 @@ struct _SoupRequestPrivate { SoupSession *session; }; +static void soup_request_initable_interface_init (GInitableIface *initable_interface); + +G_DEFINE_TYPE_WITH_CODE (SoupRequest, soup_request, G_TYPE_OBJECT, + G_ADD_PRIVATE (SoupRequest) + G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, + soup_request_initable_interface_init)) + static void soup_request_init (SoupRequest *request) { - request->priv = G_TYPE_INSTANCE_GET_PRIVATE (request, SOUP_TYPE_REQUEST, SoupRequestPrivate); + request->priv = soup_request_get_instance_private (request); } static void @@ -147,7 +148,7 @@ soup_request_initable_init (GInitable *initable, if (!ok && error && !*error) { char *uri_string = soup_uri_to_string (request->priv->uri, FALSE); g_set_error (error, SOUP_REQUEST_ERROR, SOUP_REQUEST_ERROR_BAD_URI, - _("Invalid '%s' URI: %s"), + _("Invalid “%s” URI: %s"), request->priv->uri->scheme, uri_string); g_free (uri_string); @@ -271,8 +272,6 @@ soup_request_class_init (SoupRequestClass *request_class) { GObjectClass *object_class = G_OBJECT_CLASS (request_class); - g_type_class_add_private (request_class, sizeof (SoupRequestPrivate)); - request_class->check_uri = soup_request_default_check_uri; request_class->send_async = soup_request_default_send_async; request_class->send_finish = soup_request_default_send_finish; @@ -393,8 +392,8 @@ soup_request_get_content_length (SoupRequest *request) * As in the HTTP Content-Type header, this may include parameters * after the MIME type. * - * Return value: the type of the data represented by @request, - * or %NULL if not known. + * Return value: (nullable): the type of the data represented by + * @request, or %NULL if not known. * * Since: 2.42 */ diff --git a/libsoup/soup-requester.c b/libsoup/soup-requester.c index c67bfe31..61f66785 100644 --- a/libsoup/soup-requester.c +++ b/libsoup/soup-requester.c @@ -37,21 +37,19 @@ struct _SoupRequesterPrivate { }; G_DEFINE_TYPE_WITH_CODE (SoupRequester, soup_requester, G_TYPE_OBJECT, + G_ADD_PRIVATE (SoupRequester) G_IMPLEMENT_INTERFACE (SOUP_TYPE_SESSION_FEATURE, soup_requester_session_feature_init)) static void soup_requester_init (SoupRequester *requester) { - requester->priv = G_TYPE_INSTANCE_GET_PRIVATE (requester, - SOUP_TYPE_REQUESTER, - SoupRequesterPrivate); + requester->priv = soup_requester_get_instance_private (requester); } static void soup_requester_class_init (SoupRequesterClass *requester_class) { - g_type_class_add_private (requester_class, sizeof (SoupRequesterPrivate)); } static void diff --git a/libsoup/soup-server.c b/libsoup/soup-server.c index 07d801d1..47ebac36 100644 --- a/libsoup/soup-server.c +++ b/libsoup/soup-server.c @@ -11,11 +11,16 @@ #include +#include + #include "soup-server.h" #include "soup.h" #include "soup-message-private.h" #include "soup-misc-private.h" #include "soup-path-map.h" +#include "soup-socket-private.h" +#include "soup-websocket.h" +#include "soup-websocket-connection.h" /** * SECTION:soup-server @@ -23,39 +28,95 @@ * @see_also: #SoupAuthDomain * * #SoupServer implements a simple HTTP server. + * + * (The following documentation describes the current #SoupServer API, + * available in libsoup 2.48 and later. See + * the section "The Old SoupServer + * Listening API" in the server how-to documentation for + * details on the older #SoupServer API.) * * To begin, create a server using soup_server_new(). Add at least one - * handler by calling soup_server_add_handler(); the handler will be - * called to process any requests underneath the path passed to - * soup_server_add_handler(). (If you want all requests to go to the - * same handler, just pass "/" (or %NULL) for the path.) Any request - * that does not match any handler will automatically be returned to - * the client with a 404 (Not Found) status. + * handler by calling soup_server_add_handler() or + * soup_server_add_early_handler(); the handler will be called to + * process any requests underneath the path you pass. (If you want all + * requests to go to the same handler, just pass "/" (or %NULL) for + * the path.) + * + * When a new connection is accepted (or a new request is started on + * an existing persistent connection), the #SoupServer will emit + * #SoupServer::request-started and then begin processing the request + * as described below, but note that once the message is assigned a + * #SoupMessage:status-code, then callbacks after that point will be + * skipped. Note also that it is not defined when the callbacks happen + * relative to various #SoupMessage signals. + * + * Once the headers have been read, #SoupServer will check if there is + * a #SoupAuthDomain (qv) covering the Request-URI; if so, and if the + * message does not contain suitable authorization, then the + * #SoupAuthDomain will set a status of %SOUP_STATUS_UNAUTHORIZED on + * the message. + * + * After checking for authorization, #SoupServer will look for "early" + * handlers (added with soup_server_add_early_handler()) matching the + * Request-URI. If one is found, it will be run; in particular, this + * can be used to connect to signals to do a streaming read of the + * request body. + * + * (At this point, if the request headers contain "Expect: + * 100-continue", and a status code has been set, then + * #SoupServer will skip the remaining steps and return the response. + * If the request headers contain "Expect: + * 100-continue" and no status code has been set, + * #SoupServer will return a %SOUP_STATUS_CONTINUE status before + * continuing.) + * + * The server will then read in the response body (if present). At + * this point, if there are no handlers at all defined for the + * Request-URI, then the server will return %SOUP_STATUS_NOT_FOUND to + * the client. + * + * Otherwise (assuming no previous step assigned a status to the + * message) any "normal" handlers (added with + * soup_server_add_handler()) for the message's Request-URI will be + * run. + * + * Then, if the path has a WebSocket handler registered (and has + * not yet been assigned a status), #SoupServer will attempt to + * validate the WebSocket handshake, filling in the response and + * setting a status of %SOUP_STATUS_SWITCHING_PROTOCOLS or + * %SOUP_STATUS_BAD_REQUEST accordingly. + * + * If the message still has no status code at this point (and has not + * been paused with soup_server_pause_message()), then it will be + * given a status of %SOUP_STATUS_INTERNAL_SERVER_ERROR (because at + * least one handler ran, but returned without assigning a status). + * + * Finally, the server will emit #SoupServer::request-finished (or + * #SoupServer::request-aborted if an I/O error occurred before + * handling was completed). * * If you want to handle the special "*" URI (eg, "OPTIONS *"), you * must explicitly register a handler for "*"; the default handler * will not be used for that case. * - * To add authentication to some or all paths, create an appropriate - * #SoupAuthDomain (qv), and add it to the server via - * soup_server_add_auth_domain(). (As with handlers, you must - * explicitly add "*" to an auth domain if you want it to be covered.) - * - * Additional processing options are available via #SoupServer's - * signals; Connect to #SoupServer::request-started to be notified - * every time a new request is being processed. (This gives you a - * chance to connect to the #SoupMessage "got-" signals in case you - * want to do processing before the body has been fully read.) - * - * Once the server is set up, start it processing connections by - * calling soup_server_run_async() or soup_server_run(). #SoupServer - * runs via the glib main loop; if you need to have a server that runs - * in another thread (or merely isn't bound to the default main loop), - * create a #GMainContext for it to use, and set that via the - * #SOUP_SERVER_ASYNC_CONTEXT property. - **/ - -G_DEFINE_TYPE (SoupServer, soup_server, G_TYPE_OBJECT) + * If you want to process https connections in addition to (or instead + * of) http connections, you can either set the + * %SOUP_SERVER_TLS_CERTIFICATE property when creating the server, or + * else call soup_server_set_ssl_certificate() after creating it. + * + * Once the server is set up, make one or more calls to + * soup_server_listen(), soup_server_listen_local(), or + * soup_server_listen_all() to tell it where to listen for + * connections. (All ports on a #SoupServer use the same handlers; if + * you need to handle some ports differently, such as returning + * different data for http and https, you'll need to create multiple + * #SoupServers, or else check the passed-in URI in the handler + * function.). + * + * #SoupServer will begin processing connections as soon as you return + * to (or start) the main loop for the current thread-default + * #GMainContext. + */ enum { REQUEST_STARTED, @@ -70,46 +131,61 @@ static guint signals[LAST_SIGNAL] = { 0 }; struct SoupClientContext { SoupServer *server; SoupSocket *sock; + GSocket *gsock; SoupMessage *msg; SoupAuthDomain *auth_domain; char *auth_user; + GSocketAddress *remote_addr; + const char *remote_ip; + GSocketAddress *local_addr; + int ref_count; }; typedef struct { - char *path; + char *path; + + SoupServerCallback early_callback; + GDestroyNotify early_destroy; + gpointer early_user_data; - SoupServerCallback callback; - GDestroyNotify destroy; - gpointer user_data; + SoupServerCallback callback; + GDestroyNotify destroy; + gpointer user_data; + + char *websocket_origin; + char **websocket_protocols; + SoupServerWebsocketCallback websocket_callback; + GDestroyNotify websocket_destroy; + gpointer websocket_user_data; } SoupServerHandler; typedef struct { - SoupAddress *iface; - guint port; + GSList *listeners; + GSList *clients; char *ssl_cert_file, *ssl_key_file; - GTlsCertificate *ssl_cert; + GTlsCertificate *tls_cert; char *server_header; + GMainContext *async_context; GMainLoop *loop; - SoupSocket *listen_sock; - GSList *clients; - gboolean raw_paths; SoupPathMap *handlers; - SoupServerHandler *default_handler; - - GSList *auth_domains; - GMainContext *async_context; + GSList *auth_domains; char **http_aliases, **https_aliases; + + SoupAddress *legacy_iface; + int legacy_port; + + gboolean disposed; + } SoupServerPrivate; -#define SOUP_SERVER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_SERVER, SoupServerPrivate)) #define SOUP_SERVER_SERVER_HEADER_BASE "libsoup/" PACKAGE_VERSION @@ -120,6 +196,8 @@ enum { PROP_INTERFACE, PROP_SSL_CERT_FILE, PROP_SSL_KEY_FILE, + PROP_TLS_CERT_FILE, + PROP_TLS_KEY_FILE, PROP_TLS_CERTIFICATE, PROP_ASYNC_CONTEXT, PROP_RAW_PATHS, @@ -130,69 +208,66 @@ enum { LAST_PROP }; +G_DEFINE_TYPE_WITH_PRIVATE (SoupServer, soup_server, G_TYPE_OBJECT) + static SoupClientContext *soup_client_context_ref (SoupClientContext *client); static void soup_client_context_unref (SoupClientContext *client); static void -free_handler (SoupServerHandler *hand) +free_handler (SoupServerHandler *handler) { - g_free (hand->path); - g_slice_free (SoupServerHandler, hand); + g_free (handler->path); + g_free (handler->websocket_origin); + g_strfreev (handler->websocket_protocols); + if (handler->early_destroy) + handler->early_destroy (handler->early_user_data); + if (handler->destroy) + handler->destroy (handler->user_data); + if (handler->websocket_destroy) + handler->websocket_destroy (handler->websocket_user_data); + g_slice_free (SoupServerHandler, handler); } static void soup_server_init (SoupServer *server) { - SoupServerPrivate *priv = SOUP_SERVER_GET_PRIVATE (server); + SoupServerPrivate *priv = soup_server_get_instance_private (server); priv->handlers = soup_path_map_new ((GDestroyNotify)free_handler); priv->http_aliases = g_new (char *, 2); priv->http_aliases[0] = (char *)g_intern_string ("*"); priv->http_aliases[1] = NULL; + + priv->legacy_port = -1; +} + +static void +soup_server_dispose (GObject *object) +{ + SoupServer *server = SOUP_SERVER (object); + SoupServerPrivate *priv = soup_server_get_instance_private (server); + + priv->disposed = TRUE; + soup_server_disconnect (server); + + G_OBJECT_CLASS (soup_server_parent_class)->dispose (object); } static void soup_server_finalize (GObject *object) { SoupServer *server = SOUP_SERVER (object); - SoupServerPrivate *priv = SOUP_SERVER_GET_PRIVATE (server); + SoupServerPrivate *priv = soup_server_get_instance_private (server); - g_clear_object (&priv->iface); + g_clear_object (&priv->legacy_iface); g_free (priv->ssl_cert_file); g_free (priv->ssl_key_file); - g_clear_object (&priv->ssl_cert); + g_clear_object (&priv->tls_cert); g_free (priv->server_header); - g_clear_object (&priv->listen_sock); - - while (priv->clients) { - SoupClientContext *client = priv->clients->data; - SoupSocket *sock = g_object_ref (client->sock); - - priv->clients = g_slist_remove (priv->clients, client); - - /* keep a ref on the client context so it doesn't get destroyed - * when we finish the message; the SoupSocket::disconnect - * handler will refer to client->server later when the socket is - * disconnected. - */ - soup_client_context_ref (client); - - if (client->msg) { - soup_message_set_status (client->msg, SOUP_STATUS_IO_ERROR); - soup_message_io_finished (client->msg); - } - - soup_socket_disconnect (sock); - g_object_unref (sock); - - soup_client_context_unref (client); - } - - g_clear_pointer (&priv->default_handler, free_handler); soup_path_map_free (priv->handlers); g_slist_free_full (priv->auth_domains, g_object_unref); @@ -206,6 +281,42 @@ soup_server_finalize (GObject *object) G_OBJECT_CLASS (soup_server_parent_class)->finalize (object); } +static gboolean +soup_server_ensure_listening (SoupServer *server) +{ + SoupServerPrivate *priv = soup_server_get_instance_private (server); + SoupSocket *listener; + + if (priv->listeners) + return TRUE; + + if (!priv->legacy_iface) { + priv->legacy_iface = + soup_address_new_any (SOUP_ADDRESS_FAMILY_IPV4, + priv->legacy_port); + } + + listener = soup_socket_new (SOUP_SOCKET_LOCAL_ADDRESS, priv->legacy_iface, + SOUP_SOCKET_SSL_CREDENTIALS, priv->tls_cert, + SOUP_SOCKET_ASYNC_CONTEXT, priv->async_context, + NULL); + if (!soup_socket_listen (listener)) { + g_object_unref (listener); + return FALSE; + } + + /* Re-resolve the interface address, in particular in case + * the passed-in address had SOUP_ADDRESS_ANY_PORT. + */ + g_object_unref (priv->legacy_iface); + priv->legacy_iface = soup_socket_get_local_address (listener); + g_object_ref (priv->legacy_iface); + priv->legacy_port = soup_address_get_port (priv->legacy_iface); + + priv->listeners = g_slist_prepend (priv->listeners, listener); + return TRUE; +} + static GObject * soup_server_constructor (GType type, guint n_construct_properties, @@ -213,27 +324,25 @@ soup_server_constructor (GType type, { GObject *server; SoupServerPrivate *priv; + gboolean legacy_port_set; - server = G_OBJECT_CLASS (soup_server_parent_class)->constructor ( - type, n_construct_properties, construct_properties); - if (!server) - return NULL; - priv = SOUP_SERVER_GET_PRIVATE (server); - - if (!priv->iface) { - priv->iface = - soup_address_new_any (SOUP_ADDRESS_FAMILY_IPV4, - priv->port); - } + server = G_OBJECT_CLASS (soup_server_parent_class)-> + constructor (type, n_construct_properties, construct_properties); + priv = soup_server_get_instance_private (SOUP_SERVER (server)); + /* For backward compatibility, we have to process the + * :ssl-cert-file, :ssl-key-file, :interface, and :port + * properties now, and return NULL if they are + * invalid/unsatisfiable. + */ if (priv->ssl_cert_file && priv->ssl_key_file) { GError *error = NULL; - if (priv->ssl_cert) - g_object_unref (priv->ssl_cert); - priv->ssl_cert = g_tls_certificate_new_from_files (priv->ssl_cert_file, priv->ssl_key_file, &error); - if (!priv->ssl_cert) { - g_warning ("Could not read SSL certificate from '%s': %s", + if (priv->tls_cert) + g_object_unref (priv->tls_cert); + priv->tls_cert = g_tls_certificate_new_from_files (priv->ssl_cert_file, priv->ssl_key_file, &error); + if (!priv->tls_cert) { + g_warning ("Could not read TLS certificate from '%s': %s", priv->ssl_cert_file, error->message); g_error_free (error); g_object_unref (server); @@ -241,23 +350,33 @@ soup_server_constructor (GType type, } } - priv->listen_sock = - soup_socket_new (SOUP_SOCKET_LOCAL_ADDRESS, priv->iface, - SOUP_SOCKET_SSL_CREDENTIALS, priv->ssl_cert, - SOUP_SOCKET_ASYNC_CONTEXT, priv->async_context, - NULL); - if (!soup_socket_listen (priv->listen_sock)) { - g_object_unref (server); - return NULL; + if (priv->legacy_port != -1) + legacy_port_set = TRUE; + else { + legacy_port_set = FALSE; + priv->legacy_port = 0; } - /* Re-resolve the interface address, in particular in case - * the passed-in address had SOUP_ADDRESS_ANY_PORT. - */ - g_object_unref (priv->iface); - priv->iface = soup_socket_get_local_address (priv->listen_sock); - g_object_ref (priv->iface); - priv->port = soup_address_get_port (priv->iface); + if (legacy_port_set || priv->legacy_iface) { + if (!soup_server_ensure_listening (SOUP_SERVER (server))) { + g_object_unref (server); + return NULL; + } + } else { + /* If neither port nor iface was specified, then + * either: (a) the caller is planning to use the new + * listen APIs, so we don't have to do anything now, + * or (b) the caller is using the legacy APIs but + * wants the default values for interface and port + * (address 0.0.0.0, port 0), in which case a later + * call to soup_server_ensure_listening() will set it + * up just-in-time; we don't have to worry about it + * failing in that case, because it can't (unless you + * have no IPv4 addresses configured [even localhost], + * or there are already listeners on all 65,535 ports. + * We assume neither of these will happen.) + */ + } return server; } @@ -289,32 +408,34 @@ static void soup_server_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - SoupServerPrivate *priv = SOUP_SERVER_GET_PRIVATE (object); + SoupServer *server = SOUP_SERVER (object); + SoupServerPrivate *priv = soup_server_get_instance_private (server); const char *header; switch (prop_id) { case PROP_PORT: - priv->port = g_value_get_uint (value); + if (g_value_get_uint (value) != 0) + priv->legacy_port = g_value_get_uint (value); break; case PROP_INTERFACE: - if (priv->iface) - g_object_unref (priv->iface); - priv->iface = g_value_get_object (value); - if (priv->iface) - g_object_ref (priv->iface); + if (priv->legacy_iface) + g_object_unref (priv->legacy_iface); + priv->legacy_iface = g_value_get_object (value); + if (priv->legacy_iface) + g_object_ref (priv->legacy_iface); break; case PROP_SSL_CERT_FILE: - priv->ssl_cert_file = - g_strdup (g_value_get_string (value)); + g_free (priv->ssl_cert_file); + priv->ssl_cert_file = g_value_dup_string (value); break; case PROP_SSL_KEY_FILE: - priv->ssl_key_file = - g_strdup (g_value_get_string (value)); + g_free (priv->ssl_key_file); + priv->ssl_key_file = g_value_dup_string (value); break; case PROP_TLS_CERTIFICATE: - if (priv->ssl_cert) - g_object_unref (priv->ssl_cert); - priv->ssl_cert = g_value_dup_object (value); + if (priv->tls_cert) + g_object_unref (priv->tls_cert); + priv->tls_cert = g_value_dup_object (value); break; case PROP_ASYNC_CONTEXT: priv->async_context = g_value_get_pointer (value); @@ -355,14 +476,17 @@ static void soup_server_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - SoupServerPrivate *priv = SOUP_SERVER_GET_PRIVATE (object); + SoupServer *server = SOUP_SERVER (object); + SoupServerPrivate *priv = soup_server_get_instance_private (server); switch (prop_id) { case PROP_PORT: - g_value_set_uint (value, priv->port); + soup_server_ensure_listening (server); + g_value_set_uint (value, priv->legacy_port > 0 ? priv->legacy_port : 0); break; case PROP_INTERFACE: - g_value_set_object (value, priv->iface); + soup_server_ensure_listening (server); + g_value_set_object (value, priv->legacy_iface); break; case PROP_SSL_CERT_FILE: g_value_set_string (value, priv->ssl_cert_file); @@ -371,7 +495,7 @@ soup_server_get_property (GObject *object, guint prop_id, g_value_set_string (value, priv->ssl_key_file); break; case PROP_TLS_CERTIFICATE: - g_value_set_object (value, priv->ssl_cert); + g_value_set_object (value, priv->tls_cert); break; case PROP_ASYNC_CONTEXT: g_value_set_pointer (value, priv->async_context ? g_main_context_ref (priv->async_context) : NULL); @@ -399,10 +523,9 @@ soup_server_class_init (SoupServerClass *server_class) { GObjectClass *object_class = G_OBJECT_CLASS (server_class); - g_type_class_add_private (server_class, sizeof (SoupServerPrivate)); - /* virtual method override */ object_class->constructor = soup_server_constructor; + object_class->dispose = soup_server_dispose; object_class->finalize = soup_server_finalize; object_class->set_property = soup_server_set_property; object_class->get_property = soup_server_get_property; @@ -448,9 +571,9 @@ soup_server_class_init (SoupServerClass *server_class) * @message will have all of its request-side information * filled in, and if the message was authenticated, @client * will have information about that. This signal is emitted - * before any handlers are called for the message, and if it - * sets the message's #status_code, then normal handler - * processing will be skipped. + * before any (non-early) handlers are called for the message, + * and if it sets the message's #status_code, then normal + * handler processing will be skipped. **/ signals[REQUEST_READ] = g_signal_new ("request-read", @@ -513,93 +636,144 @@ soup_server_class_init (SoupServerClass *server_class) SOUP_TYPE_CLIENT_CONTEXT); /* properties */ + /** + * SoupServer:port: + * + * The port the server is listening on, if you are using the + * old #SoupServer API. (This will not be set if you use + * soup_server_listen(), etc.) + * + * Deprecated: #SoupServers can listen on multiple interfaces + * at once now. Use soup_server_listen(), etc, to listen on a + * port, and soup_server_get_uris() to see what ports are + * being listened on. + */ /** * SOUP_SERVER_PORT: * - * Alias for the #SoupServer:port property. (The port the - * server listens on.) + * Alias for the deprecated #SoupServer:port property, qv. + * + * Deprecated: #SoupServers can listen on multiple interfaces + * at once now. Use soup_server_listen(), etc, to listen on a + * port, and soup_server_get_uris() to see what ports are + * being listened on. **/ g_object_class_install_property ( object_class, PROP_PORT, g_param_spec_uint (SOUP_SERVER_PORT, "Port", - "Port to listen on", + "Port to listen on (Deprecated)", 0, 65536, 0, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_DEPRECATED)); + /** + * SoupServer:interface: + * + * The address of the network interface the server is + * listening on, if you are using the old #SoupServer API. + * (This will not be set if you use soup_server_listen(), + * etc.) + * + * Deprecated: #SoupServers can listen on multiple interfaces + * at once now. Use soup_server_listen(), etc, to listen on an + * interface, and soup_server_get_uris() to see what addresses + * are being listened on. + */ /** * SOUP_SERVER_INTERFACE: * - * Alias for the #SoupServer:interface property. (The address - * of the network interface the server listens on.) + * Alias for the #SoupServer:interface property, qv. + * + * Deprecated: #SoupServers can listen on multiple interfaces + * at once now. Use soup_server_listen(), etc, to listen on an + * interface, and soup_server_get_uris() to see what addresses + * are being listened on. **/ g_object_class_install_property ( object_class, PROP_INTERFACE, g_param_spec_object (SOUP_SERVER_INTERFACE, "Interface", - "Address of interface to listen on", + "Address of interface to listen on (Deprecated)", SOUP_TYPE_ADDRESS, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_DEPRECATED)); /** * SOUP_SERVER_SSL_CERT_FILE: * * Alias for the #SoupServer:ssl-cert-file property, qv. + * + * Deprecated: use #SoupServer:tls-certificate or + * soup_server_set_ssl_certificate(). */ /** * SoupServer:ssl-cert-file: * - * Path to a file containing a PEM-encoded certificate. If - * this and #SoupServer:ssl-key-file are both set, then the - * server will speak https rather than plain http. + * Path to a file containing a PEM-encoded certificate. + * + * If you set this property and #SoupServer:ssl-key-file at + * construct time, then soup_server_new() will try to read the + * files; if it cannot, it will return %NULL, with no explicit + * indication of what went wrong (and logging a warning with + * newer versions of glib, since returning %NULL from a + * constructor is illegal). * - * Alternatively, you can use #SoupServer:tls-certificate - * to provide an arbitrary #GTlsCertificate. + * Deprecated: use #SoupServer:tls-certificate or + * soup_server_set_ssl_certificate(). */ g_object_class_install_property ( object_class, PROP_SSL_CERT_FILE, g_param_spec_string (SOUP_SERVER_SSL_CERT_FILE, - "SSL certificate file", - "File containing server SSL certificate", + "TLS (aka SSL) certificate file", + "File containing server TLS (aka SSL) certificate", NULL, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY)); /** * SOUP_SERVER_SSL_KEY_FILE: * * Alias for the #SoupServer:ssl-key-file property, qv. + * + * Deprecated: use #SoupServer:tls-certificate or + * soup_server_set_ssl_certificate(). */ /** * SoupServer:ssl-key-file: * - * Path to a file containing a PEM-encoded private key. If - * this and #SoupServer:ssl-key-file are both set, then the - * server will speak https rather than plain http. Note that - * you are allowed to set them to the same value, if you have - * a single file containing both the certificate and the key. + * Path to a file containing a PEM-encoded private key. See + * #SoupServer:ssl-cert-file for more information about how this + * is used. * - * Alternatively, you can use #SoupServer:tls-certificate - * to provide an arbitrary #GTlsCertificate. + * Deprecated: use #SoupServer:tls-certificate or + * soup_server_set_ssl_certificate(). */ g_object_class_install_property ( object_class, PROP_SSL_KEY_FILE, g_param_spec_string (SOUP_SERVER_SSL_KEY_FILE, - "SSL key file", - "File containing server SSL key", + "TLS (aka SSL) key file", + "File containing server TLS (aka SSL) key", NULL, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY)); /** * SOUP_SERVER_TLS_CERTIFICATE: * * Alias for the #SoupServer:tls-certificate property, qv. + * + * Since: 2.38 */ /** * SoupServer:tls-certificate: * * A #GTlsCertificate that has a #GTlsCertificate:private-key - * set. If this is set, then the server will speak https - * rather than plain http. + * set. If this is set, then the server will be able to speak + * https in addition to (or instead of) plain http. * - * Alternatively, you can use #SoupServer:ssl-cert-file and - * #SoupServer:ssl-key-file properties, to have #SoupServer - * read in a a certificate from a file. + * Alternatively, you can call soup_server_set_ssl_cert_file() + * to have #SoupServer read in a a certificate from a file. + * + * Since: 2.38 */ g_object_class_install_property ( object_class, PROP_TLS_CERTIFICATE, @@ -608,18 +782,34 @@ soup_server_class_init (SoupServerClass *server_class) "GTlsCertificate to use for https", G_TYPE_TLS_CERTIFICATE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + /** + * SoupServer:async-context: + * + * The server's #GMainContext, if you are using the old API. + * Servers created using soup_server_listen() will listen on + * the #GMainContext that was the thread-default context at + * the time soup_server_listen() was called. + * + * Deprecated: The new API uses the thread-default #GMainContext + * rather than having an explicitly-specified one. + */ /** * SOUP_SERVER_ASYNC_CONTEXT: * - * Alias for the #SoupServer:async-context property. (The - * server's #GMainContext.) + * Alias for the deprecated #SoupServer:async-context + * property, qv. + * + * Deprecated: The new API uses the thread-default #GMainContext + * rather than having an explicitly-specified one. **/ g_object_class_install_property ( object_class, PROP_ASYNC_CONTEXT, g_param_spec_pointer (SOUP_SERVER_ASYNC_CONTEXT, "Async GMainContext", "The GMainContext to dispatch async I/O in", - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_DEPRECATED)); /** * SOUP_SERVER_RAW_PATHS: * @@ -698,7 +888,7 @@ soup_server_class_init (SoupServerClass *server_class) * Since: 2.44 */ /** - * SOUP_SERVERI_HTTP_ALIASES: + * SOUP_SERVER_HTTP_ALIASES: * * Alias for the #SoupServer:http-aliases property, qv. * @@ -744,9 +934,12 @@ soup_server_class_init (SoupServerClass *server_class) * @optname1: name of first property to set * @...: value of @optname1, followed by additional property/value pairs * - * Creates a new #SoupServer. + * Creates a new #SoupServer. This is exactly equivalent to calling + * g_object_new() and specifying %SOUP_TYPE_SERVER as the type. * - * Return value: a new #SoupServer + * Return value: (nullable): a new #SoupServer. If you are using + * certain legacy properties, this may also return %NULL if an error + * occurs. **/ SoupServer * soup_server_new (const char *optname1, ...) @@ -766,32 +959,93 @@ soup_server_new (const char *optname1, ...) * soup_server_get_port: * @server: a #SoupServer * - * Gets the TCP port that @server is listening on. This is most useful - * when you did not request a specific port (or explicitly requested - * %SOUP_ADDRESS_ANY_PORT). + * Gets the TCP port that @server is listening on, if you are using + * the old API. * * Return value: the port @server is listening on. + * + * Deprecated: If you are using soup_server_listen(), etc, then use + * soup_server_get_uris() to get a list of all listening addresses. **/ guint soup_server_get_port (SoupServer *server) { + SoupServerPrivate *priv; + g_return_val_if_fail (SOUP_IS_SERVER (server), 0); + priv = soup_server_get_instance_private (server); + + soup_server_ensure_listening (server); + g_return_val_if_fail (priv->legacy_iface != NULL, 0); + + return priv->legacy_port; +} + +/** + * soup_server_set_ssl_cert_file: + * @server: a #SoupServer + * @ssl_cert_file: path to a file containing a PEM-encoded SSL/TLS + * certificate. + * @ssl_key_file: path to a file containing a PEM-encoded private key. + * @error: return location for a #GError + * + * Sets @server up to do https, using the SSL/TLS certificate + * specified by @ssl_cert_file and @ssl_key_file (which may point to + * the same file). + * + * Alternatively, you can set the #SoupServer:tls-certificate property + * at construction time, if you already have a #GTlsCertificate. + * + * Return value: success or failure. + * + * Since: 2.48 + */ +gboolean +soup_server_set_ssl_cert_file (SoupServer *server, + const char *ssl_cert_file, + const char *ssl_key_file, + GError **error) +{ + SoupServerPrivate *priv; + + g_return_val_if_fail (SOUP_IS_SERVER (server), FALSE); + priv = soup_server_get_instance_private (server); + + if (priv->tls_cert) + g_object_unref (priv->tls_cert); + + g_free (priv->ssl_cert_file); + priv->ssl_cert_file = g_strdup (ssl_cert_file); - return SOUP_SERVER_GET_PRIVATE (server)->port; + g_free (priv->ssl_key_file); + priv->ssl_key_file = g_strdup (ssl_key_file); + + priv->tls_cert = g_tls_certificate_new_from_files (priv->ssl_cert_file, + priv->ssl_key_file, + error); + return priv->tls_cert != NULL; } /** * soup_server_is_https: * @server: a #SoupServer * - * Checks whether @server is running plain http or https. + * Checks whether @server is capable of https. * - * In order for a server to run https, you must set the - * %SOUP_SERVER_SSL_CERT_FILE and %SOUP_SERVER_SSL_KEY_FILE properties - * or %SOUP_SERVER_TLS_CERTIFICATE property to provide it with an SSL + * In order for a server to run https, you must call + * soup_server_set_ssl_cert_file(), or set the + * #SoupServer:tls-certificate property, to provide it with a * certificate to use. * - * Return value: %TRUE if @server is serving https. + * If you are using the deprecated single-listener APIs, then a return + * value of %TRUE indicates that the #SoupServer serves https + * exclusively. If you are using soup_server_listen(), etc, then a + * %TRUE return value merely indicates that the server is + * able to do https, regardless of whether it + * actually currently is or not. Use soup_server_get_uris() to see if + * it currently has any https listeners. + * + * Return value: %TRUE if @server is configured to serve https. **/ gboolean soup_server_is_https (SoupServer *server) @@ -799,20 +1053,25 @@ soup_server_is_https (SoupServer *server) SoupServerPrivate *priv; g_return_val_if_fail (SOUP_IS_SERVER (server), 0); - priv = SOUP_SERVER_GET_PRIVATE (server); + priv = soup_server_get_instance_private (server); - return priv->ssl_cert != NULL; + return priv->tls_cert != NULL; } /** * soup_server_get_listener: * @server: a #SoupServer * - * Gets @server's listening socket. You should treat this as - * read-only; writing to it or modifiying it may cause @server to - * malfunction. + * Gets @server's listening socket, if you are using the old API. + * + * You should treat this socket as read-only; writing to it or + * modifiying it may cause @server to malfunction. * * Return value: (transfer none): the listening socket. + * + * Deprecated: If you are using soup_server_listen(), etc, then use + * soup_server_get_listeners() to get a list of all listening sockets, + * but note that that function returns #GSockets, not #SoupSockets. **/ SoupSocket * soup_server_get_listener (SoupServer *server) @@ -820,12 +1079,51 @@ soup_server_get_listener (SoupServer *server) SoupServerPrivate *priv; g_return_val_if_fail (SOUP_IS_SERVER (server), NULL); - priv = SOUP_SERVER_GET_PRIVATE (server); + priv = soup_server_get_instance_private (server); + + soup_server_ensure_listening (server); + g_return_val_if_fail (priv->legacy_iface != NULL, NULL); + + return priv->listeners ? priv->listeners->data : NULL; +} + +/** + * soup_server_get_listeners: + * @server: a #SoupServer + * + * Gets @server's list of listening sockets. + * + * You should treat these sockets as read-only; writing to or + * modifiying any of these sockets may cause @server to malfunction. + * + * (Beware that in contrast to the old soup_server_get_listener(), this + * function returns #GSockets, not #SoupSockets.) + * + * Return value: (transfer container) (element-type Gio.Socket): a + * list of listening sockets. + **/ +GSList * +soup_server_get_listeners (SoupServer *server) +{ + SoupServerPrivate *priv; + GSList *listeners, *iter; + + g_return_val_if_fail (SOUP_IS_SERVER (server), NULL); + priv = soup_server_get_instance_private (server); - return priv->listen_sock; + listeners = NULL; + for (iter = priv->listeners; iter; iter = iter->next) + listeners = g_slist_prepend (listeners, soup_socket_get_gsocket (iter->data)); + + /* priv->listeners has the sockets in reverse order from how + * they were added, so listeners now has them back in the + * original order. + */ + return listeners; } static void start_request (SoupServer *, SoupClientContext *); +static void socket_disconnected (SoupSocket *sock, SoupClientContext *client); static SoupClientContext * soup_client_context_new (SoupServer *server, SoupSocket *sock) @@ -833,7 +1131,12 @@ soup_client_context_new (SoupServer *server, SoupSocket *sock) SoupClientContext *client = g_slice_new0 (SoupClientContext); client->server = server; - client->sock = sock; + client->sock = g_object_ref (sock); + client->gsock = soup_socket_get_gsocket (sock); + if (client->gsock) + g_object_ref (client->gsock); + g_signal_connect (sock, "disconnected", + G_CALLBACK (socket_disconnected), client); client->ref_count = 1; return client; @@ -842,14 +1145,11 @@ soup_client_context_new (SoupServer *server, SoupSocket *sock) static void soup_client_context_cleanup (SoupClientContext *client) { - if (client->auth_domain) { - g_object_unref (client->auth_domain); - client->auth_domain = NULL; - } - if (client->auth_user) { - g_free (client->auth_user); - client->auth_user = NULL; - } + g_clear_object (&client->auth_domain); + g_clear_pointer (&client->auth_user, g_free); + g_clear_object (&client->remote_addr); + g_clear_object (&client->local_addr); + client->msg = NULL; } @@ -863,61 +1163,114 @@ soup_client_context_ref (SoupClientContext *client) static void soup_client_context_unref (SoupClientContext *client) { - if (--client->ref_count == 0) { - soup_client_context_cleanup (client); - g_slice_free (SoupClientContext, client); - } + if (--client->ref_count != 0) + return; + + soup_client_context_cleanup (client); + + g_signal_handlers_disconnect_by_func (client->sock, socket_disconnected, client); + g_object_unref (client->sock); + g_clear_object (&client->gsock); + g_clear_pointer (&client->remote_ip, g_free); + g_slice_free (SoupClientContext, client); } static void -request_finished (SoupMessage *msg, gpointer user_data) +request_finished (SoupMessage *msg, SoupMessageIOCompletion completion, gpointer user_data) { SoupClientContext *client = user_data; SoupServer *server = client->server; + SoupServerPrivate *priv = soup_server_get_instance_private (server); SoupSocket *sock = client->sock; + gboolean failed; - soup_message_finished (msg); - g_signal_emit (server, - msg->status_code == SOUP_STATUS_IO_ERROR ? - signals[REQUEST_ABORTED] : signals[REQUEST_FINISHED], - 0, msg, client); + if (completion == SOUP_MESSAGE_IO_STOLEN) { + soup_client_context_unref (client); + g_object_unref (msg); + return; + } - soup_client_context_cleanup (client); - if (soup_socket_is_connected (sock) && soup_message_is_keepalive (msg)) { - /* Start a new request */ + /* Complete the message, assuming it actually really started. */ + if (msg->method) { + soup_message_finished (msg); + + failed = (completion == SOUP_MESSAGE_IO_INTERRUPTED || + msg->status_code == SOUP_STATUS_IO_ERROR); + g_signal_emit (server, + failed ? signals[REQUEST_ABORTED] : signals[REQUEST_FINISHED], + 0, msg, client); + } + + if (completion == SOUP_MESSAGE_IO_COMPLETE && + soup_socket_is_connected (sock) && + soup_message_is_keepalive (msg) && + priv->listeners) { start_request (server, client); } else { - soup_socket_disconnect (sock); + soup_socket_disconnect (client->sock); soup_client_context_unref (client); } g_object_unref (msg); - g_object_unref (sock); } +/* "" was never documented as meaning the same thing as "/", but it + * effectively was. We have to special case it now or otherwise it + * would match "*" too. + */ +#define NORMALIZED_PATH(path) ((path) && *(path) ? (path) : "/") + static SoupServerHandler * -soup_server_get_handler (SoupServer *server, const char *path) +get_handler (SoupServer *server, SoupMessage *msg) { - SoupServerPrivate *priv; - SoupServerHandler *hand; + SoupServerPrivate *priv = soup_server_get_instance_private (server); + SoupURI *uri; - g_return_val_if_fail (SOUP_IS_SERVER (server), NULL); - priv = SOUP_SERVER_GET_PRIVATE (server); + uri = soup_message_get_uri (msg); + return soup_path_map_lookup (priv->handlers, NORMALIZED_PATH (uri->path)); +} - if (path) { - hand = soup_path_map_lookup (priv->handlers, path); - if (hand) - return hand; - if (!strcmp (path, "*")) - return NULL; +static void +call_handler (SoupServer *server, SoupServerHandler *handler, + SoupClientContext *client, SoupMessage *msg, + gboolean early) +{ + GHashTable *form_data_set; + SoupURI *uri; + + if (early && !handler->early_callback) + return; + else if (!early && !handler->callback) + return; + + if (msg->status_code != 0) + return; + + uri = soup_message_get_uri (msg); + if (uri->query) + form_data_set = soup_form_decode (uri->query); + else + form_data_set = NULL; + + if (early) { + (*handler->early_callback) (server, msg, + uri->path, form_data_set, + client, handler->early_user_data); + } else { + (*handler->callback) (server, msg, + uri->path, form_data_set, + client, handler->user_data); } - return priv->default_handler; + + if (form_data_set) + g_hash_table_unref (form_data_set); } static void got_headers (SoupMessage *msg, SoupClientContext *client) { SoupServer *server = client->server; - SoupServerPrivate *priv = SOUP_SERVER_GET_PRIVATE (server); + SoupServerPrivate *priv = soup_server_get_instance_private (server); + SoupServerHandler *handler; SoupURI *uri; SoupDate *date; char *date_string; @@ -926,9 +1279,20 @@ got_headers (SoupMessage *msg, SoupClientContext *client) gboolean rejected = FALSE; char *auth_user; + /* Add required response headers */ + date = soup_date_new_from_now (0); + date_string = soup_date_to_string (date, SOUP_DATE_HTTP); + soup_message_headers_replace (msg->response_headers, "Date", + date_string); + g_free (date_string); + soup_date_free (date); + + if (msg->status_code != 0) + return; + uri = soup_message_get_uri (msg); - if ((soup_server_is_https (server) && !soup_uri_is_https (uri, priv->https_aliases)) || - (!soup_server_is_https (server) && !soup_uri_is_http (uri, priv->http_aliases))) { + if ((soup_socket_is_ssl (client->sock) && !soup_uri_is_https (uri, priv->https_aliases)) || + (!soup_socket_is_ssl (client->sock) && !soup_uri_is_http (uri, priv->http_aliases))) { soup_message_set_status (msg, SOUP_STATUS_BAD_REQUEST); return; } @@ -950,14 +1314,6 @@ got_headers (SoupMessage *msg, SoupClientContext *client) g_free (decoded_path); } - /* Add required response headers */ - date = soup_date_new_from_now (0); - date_string = soup_date_to_string (date, SOUP_DATE_HTTP); - soup_message_headers_replace (msg->response_headers, "Date", - date_string); - g_free (date_string); - soup_date_free (date); - /* Now handle authentication. (We do this here so that if * the request uses "Expect: 100-continue", we can reject it * immediately rather than waiting for the request body to @@ -978,59 +1334,88 @@ got_headers (SoupMessage *msg, SoupClientContext *client) } } - /* If no auth domain rejected it, then it's ok. */ - if (!rejected) + /* If any auth domain rejected it, then it will need authentication. */ + if (rejected) { + for (iter = priv->auth_domains; iter; iter = iter->next) { + domain = iter->data; + + if (soup_auth_domain_covers (domain, msg)) + soup_auth_domain_challenge (domain, msg); + } return; + } - for (iter = priv->auth_domains; iter; iter = iter->next) { - domain = iter->data; + /* Otherwise, call the early handlers. */ + handler = get_handler (server, msg); + if (handler) + call_handler (server, handler, client, msg, TRUE); +} - if (soup_auth_domain_covers (domain, msg)) - soup_auth_domain_challenge (domain, msg); - } +static void +complete_websocket_upgrade (SoupMessage *msg, gpointer user_data) +{ + SoupClientContext *client = user_data; + SoupServer *server = client->server; + SoupURI *uri = soup_message_get_uri (msg); + SoupServerHandler *handler; + GIOStream *stream; + SoupWebsocketConnection *conn; + + handler = get_handler (server, msg); + if (!handler || !handler->websocket_callback) + return; + + soup_client_context_ref (client); + stream = soup_client_context_steal_connection (client); + conn = soup_websocket_connection_new (stream, uri, + SOUP_WEBSOCKET_CONNECTION_SERVER, + soup_message_headers_get_one (msg->request_headers, "Origin"), + soup_message_headers_get_one (msg->response_headers, "Sec-WebSocket-Protocol")); + g_object_unref (stream); + soup_client_context_unref (client); + + (*handler->websocket_callback) (server, conn, uri->path, client, + handler->websocket_user_data); + g_object_unref (conn); + soup_client_context_unref (client); } static void -call_handler (SoupMessage *msg, SoupClientContext *client) +got_body (SoupMessage *msg, SoupClientContext *client) { SoupServer *server = client->server; - SoupServerHandler *hand; - SoupURI *uri; + SoupServerHandler *handler; g_signal_emit (server, signals[REQUEST_READ], 0, msg, client); if (msg->status_code != 0) return; - uri = soup_message_get_uri (msg); - hand = soup_server_get_handler (server, uri->path); - if (!hand) { + handler = get_handler (server, msg); + if (!handler) { soup_message_set_status (msg, SOUP_STATUS_NOT_FOUND); return; } - if (hand->callback) { - GHashTable *form_data_set; - - if (uri->query) - form_data_set = soup_form_decode (uri->query); - else - form_data_set = NULL; - - /* Call method handler */ - (*hand->callback) (server, msg, - uri->path, form_data_set, - client, hand->user_data); + call_handler (server, handler, client, msg, FALSE); + if (msg->status_code != 0) + return; - if (form_data_set) - g_hash_table_unref (form_data_set); + if (handler->websocket_callback) { + if (soup_websocket_server_process_handshake (msg, + handler->websocket_origin, + handler->websocket_protocols)) { + g_signal_connect (msg, "wrote-informational", + G_CALLBACK (complete_websocket_upgrade), + soup_client_context_ref (client)); + } } } static void start_request (SoupServer *server, SoupClientContext *client) { - SoupServerPrivate *priv = SOUP_SERVER_GET_PRIVATE (server); + SoupServerPrivate *priv = soup_server_get_instance_private (server); SoupMessage *msg; soup_client_context_cleanup (client); @@ -1047,89 +1432,156 @@ start_request (SoupServer *server, SoupClientContext *client) } g_signal_connect (msg, "got_headers", G_CALLBACK (got_headers), client); - g_signal_connect (msg, "got_body", G_CALLBACK (call_handler), client); + g_signal_connect (msg, "got_body", G_CALLBACK (got_body), client); g_signal_emit (server, signals[REQUEST_STARTED], 0, msg, client); - g_object_ref (client->sock); - - if (priv->async_context) - g_main_context_push_thread_default (priv->async_context); soup_message_read_request (msg, client->sock, + priv->legacy_iface == NULL, request_finished, client); - if (priv->async_context) - g_main_context_pop_thread_default (priv->async_context); } static void socket_disconnected (SoupSocket *sock, SoupClientContext *client) { - SoupServerPrivate *priv = SOUP_SERVER_GET_PRIVATE (client->server); + SoupServerPrivate *priv = soup_server_get_instance_private (client->server); priv->clients = g_slist_remove (priv->clients, client); - g_signal_handlers_disconnect_by_func (sock, socket_disconnected, client); - g_object_unref (sock); + + if (client->msg) { + soup_message_set_status (client->msg, SOUP_STATUS_IO_ERROR); + soup_message_io_finished (client->msg); + } } static void -new_connection (SoupSocket *listner, SoupSocket *sock, gpointer user_data) +soup_server_accept_socket (SoupServer *server, + SoupSocket *sock) { - SoupServer *server = user_data; - SoupServerPrivate *priv = SOUP_SERVER_GET_PRIVATE (server); + SoupServerPrivate *priv = soup_server_get_instance_private (server); SoupClientContext *client; - client = soup_client_context_new (server, g_object_ref (sock)); + client = soup_client_context_new (server, sock); priv->clients = g_slist_prepend (priv->clients, client); - g_signal_connect (sock, "disconnected", - G_CALLBACK (socket_disconnected), client); start_request (server, client); } /** - * soup_server_run_async: + * soup_server_accept_iostream: * @server: a #SoupServer + * @stream: a #GIOStream + * @local_addr: (allow-none): the local #GSocketAddress associated with the @stream + * @remote_addr: (allow-none): the remote #GSocketAddress associated with the @stream + * @error: return location for a #GError * - * Starts @server, causing it to listen for and process incoming - * connections. + * Add a new client stream to the @server. * - * The server actually runs in @server's #GMainContext. It will not - * actually perform any processing unless the appropriate main loop is - * running. In the simple case where you did not set the server's - * %SOUP_SERVER_ASYNC_CONTEXT property, this means the server will run - * whenever the glib main loop is running. + * Return value: %TRUE on success, %FALSE if the stream could not be + * accepted or any other error occurred (in which case @error will be + * set). + * + * Since: 2.50 **/ -void -soup_server_run_async (SoupServer *server) +gboolean +soup_server_accept_iostream (SoupServer *server, + GIOStream *stream, + GSocketAddress *local_addr, + GSocketAddress *remote_addr, + GError **error) { - SoupServerPrivate *priv; + SoupSocket *sock; + SoupAddress *local = NULL, *remote = NULL; - g_return_if_fail (SOUP_IS_SERVER (server)); - priv = SOUP_SERVER_GET_PRIVATE (server); + if (local_addr) + local = soup_address_new_from_gsockaddr (local_addr); + if (remote_addr) + remote = soup_address_new_from_gsockaddr (remote_addr); - if (!priv->listen_sock) { - if (priv->loop) { - g_main_loop_unref (priv->loop); - priv->loop = NULL; - } - return; - } + sock = g_initable_new (SOUP_TYPE_SOCKET, NULL, error, + "iostream", stream, + "local-address", local, + "remote-address", remote, + NULL); - g_signal_connect (priv->listen_sock, "new_connection", - G_CALLBACK (new_connection), server); + g_clear_object (&local); + g_clear_object (&remote); - return; + if (!sock) + return FALSE; + + soup_server_accept_socket (server, sock); + g_object_unref (sock); + return TRUE; +} + +static void +new_connection (SoupSocket *listener, SoupSocket *sock, gpointer user_data) +{ + SoupServer *server = user_data; + + soup_server_accept_socket (server, sock); +} + +/** + * soup_server_run_async: + * @server: a #SoupServer + * + * Starts @server, if you are using the old API, causing it to listen + * for and process incoming connections. + * + * The server runs in @server's #GMainContext. It will not actually + * perform any processing unless the appropriate main loop is running. + * In the simple case where you did not set the server's + * %SOUP_SERVER_ASYNC_CONTEXT property, this means the server will run + * whenever the glib main loop is running. + * + * Deprecated: When using soup_server_listen(), etc, the server will + * always listen for connections, and will process them whenever the + * thread-default #GMainContext is running. + **/ +void +soup_server_run_async (SoupServer *server) +{ + SoupServerPrivate *priv; + SoupSocket *listener; + + g_return_if_fail (SOUP_IS_SERVER (server)); + priv = soup_server_get_instance_private (server); + + soup_server_ensure_listening (server); + + g_return_if_fail (priv->legacy_iface != NULL); + + if (!priv->listeners) { + if (priv->loop) { + g_main_loop_unref (priv->loop); + priv->loop = NULL; + } + return; + } + + listener = priv->listeners->data; + g_signal_connect (listener, "new_connection", + G_CALLBACK (new_connection), server); + + return; } /** * soup_server_run: * @server: a #SoupServer * - * Starts @server, causing it to listen for and process incoming - * connections. Unlike soup_server_run_async(), this creates a - * #GMainLoop and runs it, and it will not return until someone calls - * soup_server_quit() to stop the server. + * Starts @server, if you are using the old API, causing it to listen + * for and process incoming connections. Unlike + * soup_server_run_async(), this creates a #GMainLoop and runs it, and + * it will not return until someone calls soup_server_quit() to stop + * the server. + * + * Deprecated: When using soup_server_listen(), etc, the server will + * always listen for connections, and will process them whenever the + * thread-default #GMainContext is running. **/ void soup_server_run (SoupServer *server) @@ -1137,11 +1589,13 @@ soup_server_run (SoupServer *server) SoupServerPrivate *priv; g_return_if_fail (SOUP_IS_SERVER (server)); - priv = SOUP_SERVER_GET_PRIVATE (server); + priv = soup_server_get_instance_private (server); if (!priv->loop) { priv->loop = g_main_loop_new (priv->async_context, TRUE); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; soup_server_run_async (server); + G_GNUC_END_IGNORE_DEPRECATIONS; } if (priv->loop) @@ -1152,21 +1606,34 @@ soup_server_run (SoupServer *server) * soup_server_quit: * @server: a #SoupServer * - * Stops processing for @server. Call this to clean up after - * soup_server_run_async(), or to terminate a call to soup_server_run(). + * Stops processing for @server, if you are using the old API. Call + * this to clean up after soup_server_run_async(), or to terminate a + * call to soup_server_run(). + * + * Note that messages currently in progress will continue to be + * handled, if the main loop associated with the server is resumed or + * kept running. * * @server is still in a working state after this call; you can start * and stop a server as many times as you want. + * + * Deprecated: When using soup_server_listen(), etc, the server will + * always listen for connections, and will process them whenever the + * thread-default #GMainContext is running. **/ void soup_server_quit (SoupServer *server) { SoupServerPrivate *priv; + SoupSocket *listener; g_return_if_fail (SOUP_IS_SERVER (server)); - priv = SOUP_SERVER_GET_PRIVATE (server); + priv = soup_server_get_instance_private (server); + g_return_if_fail (priv->legacy_iface != NULL); + g_return_if_fail (priv->listeners != NULL); - g_signal_handlers_disconnect_by_func (priv->listen_sock, + listener = priv->listeners->data; + g_signal_handlers_disconnect_by_func (listener, G_CALLBACK (new_connection), server); if (priv->loop) @@ -1177,43 +1644,525 @@ soup_server_quit (SoupServer *server) * soup_server_disconnect: * @server: a #SoupServer * - * Stops processing for @server and closes its socket. This implies - * the effects of soup_server_quit(), but additionally closes the - * listening socket. Note that messages currently in progress will - * continue to be handled, if the main loop associated with the - * server is resumed or kept running. + * Closes and frees @server's listening sockets. If you are using the + * old #SoupServer APIs, this also includes the effect of + * soup_server_quit(). + * + * Note that if there are currently requests in progress on @server, + * that they will continue to be processed if @server's #GMainContext + * is still running. * - * After calling this function, @server is no longer functional, so it - * has nearly the same effect as destroying @server entirely. The - * function is thus useful mainly for language bindings without - * explicit control over object lifetime. + * You can call soup_server_listen(), etc, after calling this function + * if you want to start listening again. **/ void soup_server_disconnect (SoupServer *server) { SoupServerPrivate *priv; + GSList *listeners, *clients, *iter; + SoupSocket *listener; + SoupClientContext *client; g_return_if_fail (SOUP_IS_SERVER (server)); - priv = SOUP_SERVER_GET_PRIVATE (server); + priv = soup_server_get_instance_private (server); + + if (priv->legacy_iface) { + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + soup_server_quit (server); + G_GNUC_END_IGNORE_DEPRECATIONS; + } + + clients = priv->clients; + priv->clients = NULL; + listeners = priv->listeners; + priv->listeners = NULL; + + for (iter = clients; iter; iter = iter->next) { + client = iter->data; + soup_socket_disconnect (client->sock); + } + g_slist_free (clients); + + for (iter = listeners; iter; iter = iter->next) { + listener = iter->data; + soup_socket_disconnect (listener); + g_object_unref (listener); + } + g_slist_free (listeners); +} + +/** + * SoupServerListenOptions: + * @SOUP_SERVER_LISTEN_HTTPS: Listen for https connections rather + * than plain http. + * @SOUP_SERVER_LISTEN_IPV4_ONLY: Only listen on IPv4 interfaces. + * @SOUP_SERVER_LISTEN_IPV6_ONLY: Only listen on IPv6 interfaces. + * + * Options to pass to soup_server_listen(), etc. + * + * %SOUP_SERVER_LISTEN_IPV4_ONLY and %SOUP_SERVER_LISTEN_IPV6_ONLY + * only make sense with soup_server_listen_all() and + * soup_server_listen_local(), not plain soup_server_listen() (which + * simply listens on whatever kind of socket you give it). And you + * cannot specify both of them in a single call. + * + * Since: 2.48 + */ + +static gboolean +soup_server_listen_internal (SoupServer *server, SoupSocket *listener, + SoupServerListenOptions options, + GError **error) +{ + SoupServerPrivate *priv = soup_server_get_instance_private (server); + gboolean is_listening; + + if (options & SOUP_SERVER_LISTEN_HTTPS) { + if (!priv->tls_cert) { + g_set_error_literal (error, + G_IO_ERROR, + G_IO_ERROR_INVALID_ARGUMENT, + _("Can’t create a TLS server without a TLS certificate")); + return FALSE; + } + + g_object_set (G_OBJECT (listener), + SOUP_SOCKET_SSL_CREDENTIALS, priv->tls_cert, + NULL); + } + + g_object_get (G_OBJECT (listener), + SOUP_SOCKET_IS_SERVER, &is_listening, + NULL); + if (!is_listening) { + if (!soup_socket_listen_full (listener, error)) { + SoupAddress *saddr = soup_socket_get_local_address (listener); + + g_prefix_error (error, + _("Could not listen on address %s, port %d: "), + soup_address_get_physical (saddr), + soup_address_get_port (saddr)); + return FALSE; + } + } + + g_signal_connect (listener, "new_connection", + G_CALLBACK (new_connection), server); + + /* Note: soup_server_listen_ipv4_ipv6() below relies on the + * fact that this does g_slist_prepend(). + */ + priv->listeners = g_slist_prepend (priv->listeners, g_object_ref (listener)); + return TRUE; +} + +/** + * soup_server_listen: + * @server: a #SoupServer + * @address: the address of the interface to listen on + * @options: listening options for this server + * @error: return location for a #GError + * + * This attempts to set up @server to listen for connections on + * @address. + * + * If @options includes %SOUP_SERVER_LISTEN_HTTPS, and @server has + * been configured for TLS, then @server will listen for https + * connections on this port. Otherwise it will listen for plain http. + * + * You may call this method (along with the other "listen" methods) + * any number of times on a server, if you want to listen on multiple + * ports, or set up both http and https service. + * + * After calling this method, @server will begin accepting and + * processing connections as soon as the appropriate #GMainContext is + * run. + * + * Note that #SoupServer never makes use of dual IPv4/IPv6 sockets; if + * @address is an IPv6 address, it will only accept IPv6 connections. + * You must configure IPv4 listening separately. + * + * Return value: %TRUE on success, %FALSE if @address could not be + * bound or any other error occurred (in which case @error will be + * set). + * + * Since: 2.48 + **/ +gboolean +soup_server_listen (SoupServer *server, GSocketAddress *address, + SoupServerListenOptions options, + GError **error) +{ + SoupServerPrivate *priv; + SoupSocket *listener; + SoupAddress *saddr; + gboolean success; + + g_return_val_if_fail (SOUP_IS_SERVER (server), FALSE); + g_return_val_if_fail (!(options & SOUP_SERVER_LISTEN_IPV4_ONLY) && + !(options & SOUP_SERVER_LISTEN_IPV6_ONLY), FALSE); + + priv = soup_server_get_instance_private (server); + g_return_val_if_fail (priv->disposed == FALSE, FALSE); + + saddr = soup_address_new_from_gsockaddr (address); + listener = soup_socket_new (SOUP_SOCKET_LOCAL_ADDRESS, saddr, + SOUP_SOCKET_USE_THREAD_CONTEXT, TRUE, + SOUP_SOCKET_IPV6_ONLY, TRUE, + NULL); + + success = soup_server_listen_internal (server, listener, options, error); + g_object_unref (listener); + g_object_unref (saddr); + + return success; +} + +static gboolean +soup_server_listen_ipv4_ipv6 (SoupServer *server, + GInetAddress *iaddr4, + GInetAddress *iaddr6, + guint port, + SoupServerListenOptions options, + GError **error) +{ + SoupServerPrivate *priv = soup_server_get_instance_private (server); + GSocketAddress *addr4, *addr6; + GError *my_error = NULL; + SoupSocket *v4sock; + guint v4port; + + g_return_val_if_fail (iaddr4 != NULL || iaddr6 != NULL, FALSE); + + options &= ~(SOUP_SERVER_LISTEN_IPV4_ONLY | SOUP_SERVER_LISTEN_IPV6_ONLY); + + try_again: + if (iaddr4) { + addr4 = g_inet_socket_address_new (iaddr4, port); + if (!soup_server_listen (server, addr4, options, error)) { + g_object_unref (addr4); + return FALSE; + } + g_object_unref (addr4); + + v4sock = priv->listeners->data; + v4port = soup_address_get_port (soup_socket_get_local_address (v4sock)); + } else { + v4sock = NULL; + v4port = port; + } + + if (!iaddr6) + return TRUE; + + addr6 = g_inet_socket_address_new (iaddr6, v4port); + if (soup_server_listen (server, addr6, options, &my_error)) { + g_object_unref (addr6); + return TRUE; + } + g_object_unref (addr6); + + if (v4sock && g_error_matches (my_error, G_IO_ERROR, +#if GLIB_CHECK_VERSION (2, 41, 0) + G_IO_ERROR_NOT_SUPPORTED +#else + G_IO_ERROR_FAILED +#endif + )) { + /* No IPv6 support, but IPV6_ONLY wasn't specified, so just + * ignore the failure. + */ + g_error_free (my_error); + return TRUE; + } + + if (v4sock) { + priv->listeners = g_slist_remove (priv->listeners, v4sock); + soup_socket_disconnect (v4sock); + g_object_unref (v4sock); + } + + if (port == 0 && g_error_matches (my_error, G_IO_ERROR, G_IO_ERROR_ADDRESS_IN_USE)) { + /* The randomly-assigned IPv4 port was in use on the IPv6 side... Try again */ + g_clear_error (&my_error); + goto try_again; + } + + g_propagate_error (error, my_error); + return FALSE; +} + +/** + * soup_server_listen_all: + * @server: a #SoupServer + * @port: the port to listen on, or 0 + * @options: listening options for this server + * @error: return location for a #GError + * + * This attempts to set up @server to listen for connections on all + * interfaces on the system. (That is, it listens on the addresses + * 0.0.0.0 and/or ::, depending + * on whether @options includes %SOUP_SERVER_LISTEN_IPV4_ONLY, + * %SOUP_SERVER_LISTEN_IPV6_ONLY, or neither.) If @port is specified, + * @server will listen on that port. If it is 0, @server will find an + * unused port to listen on. (In that case, you can use + * soup_server_get_uris() to find out what port it ended up choosing.) + * + * See soup_server_listen() for more details. + * + * Return value: %TRUE on success, %FALSE if @port could not be bound + * or any other error occurred (in which case @error will be set). + * + * Since: 2.48 + **/ +gboolean +soup_server_listen_all (SoupServer *server, guint port, + SoupServerListenOptions options, + GError **error) +{ + GInetAddress *iaddr4, *iaddr6; + gboolean success; + + g_return_val_if_fail (SOUP_IS_SERVER (server), FALSE); + g_return_val_if_fail (!(options & SOUP_SERVER_LISTEN_IPV4_ONLY) || + !(options & SOUP_SERVER_LISTEN_IPV6_ONLY), FALSE); + + if (options & SOUP_SERVER_LISTEN_IPV6_ONLY) + iaddr4 = NULL; + else + iaddr4 = g_inet_address_new_any (G_SOCKET_FAMILY_IPV4); + + if (options & SOUP_SERVER_LISTEN_IPV4_ONLY) + iaddr6 = NULL; + else + iaddr6 = g_inet_address_new_any (G_SOCKET_FAMILY_IPV6); + + success = soup_server_listen_ipv4_ipv6 (server, iaddr4, iaddr6, + port, options, error); + + g_clear_object (&iaddr4); + g_clear_object (&iaddr6); + + return success; +} + +/** + * soup_server_listen_local: + * @server: a #SoupServer + * @port: the port to listen on, or 0 + * @options: listening options for this server + * @error: return location for a #GError + * + * This attempts to set up @server to listen for connections on + * "localhost" (that is, 127.0.0.1 and/or + * ::1, depending on whether @options includes + * %SOUP_SERVER_LISTEN_IPV4_ONLY, %SOUP_SERVER_LISTEN_IPV6_ONLY, or + * neither). If @port is specified, @server will listen on that port. + * If it is 0, @server will find an unused port to listen on. (In that + * case, you can use soup_server_get_uris() to find out what port it + * ended up choosing.) + * + * See soup_server_listen() for more details. + * + * Return value: %TRUE on success, %FALSE if @port could not be bound + * or any other error occurred (in which case @error will be set). + * + * Since: 2.48 + **/ +gboolean +soup_server_listen_local (SoupServer *server, guint port, + SoupServerListenOptions options, + GError **error) +{ + GInetAddress *iaddr4, *iaddr6; + gboolean success; + + g_return_val_if_fail (SOUP_IS_SERVER (server), FALSE); + g_return_val_if_fail (!(options & SOUP_SERVER_LISTEN_IPV4_ONLY) || + !(options & SOUP_SERVER_LISTEN_IPV6_ONLY), FALSE); + + if (options & SOUP_SERVER_LISTEN_IPV6_ONLY) + iaddr4 = NULL; + else + iaddr4 = g_inet_address_new_loopback (G_SOCKET_FAMILY_IPV4); + + if (options & SOUP_SERVER_LISTEN_IPV4_ONLY) + iaddr6 = NULL; + else + iaddr6 = g_inet_address_new_loopback (G_SOCKET_FAMILY_IPV6); + + success = soup_server_listen_ipv4_ipv6 (server, iaddr4, iaddr6, + port, options, error); + + g_clear_object (&iaddr4); + g_clear_object (&iaddr6); + + return success; +} + +/** + * soup_server_listen_socket: + * @server: a #SoupServer + * @socket: a listening #GSocket + * @options: listening options for this server + * @error: return location for a #GError + * + * This attempts to set up @server to listen for connections on + * @socket. + * + * See soup_server_listen() for more details. + * + * Return value: %TRUE on success, %FALSE if an error occurred (in + * which case @error will be set). + * + * Since: 2.48 + **/ +gboolean +soup_server_listen_socket (SoupServer *server, GSocket *socket, + SoupServerListenOptions options, + GError **error) +{ + SoupServerPrivate *priv; + SoupSocket *listener; + gboolean success; + + g_return_val_if_fail (SOUP_IS_SERVER (server), FALSE); + g_return_val_if_fail (G_IS_SOCKET (socket), FALSE); + g_return_val_if_fail (!(options & SOUP_SERVER_LISTEN_IPV4_ONLY) && + !(options & SOUP_SERVER_LISTEN_IPV6_ONLY), FALSE); + + priv = soup_server_get_instance_private (server); + g_return_val_if_fail (priv->disposed == FALSE, FALSE); + + listener = g_initable_new (SOUP_TYPE_SOCKET, NULL, error, + SOUP_SOCKET_GSOCKET, socket, + SOUP_SOCKET_USE_THREAD_CONTEXT, TRUE, + SOUP_SOCKET_IPV6_ONLY, TRUE, + NULL); + if (!listener) + return FALSE; + + success = soup_server_listen_internal (server, listener, options, error); + g_object_unref (listener); + + return success; +} + +/** + * soup_server_listen_fd: + * @server: a #SoupServer + * @fd: the file descriptor of a listening socket + * @options: listening options for this server + * @error: return location for a #GError + * + * This attempts to set up @server to listen for connections on + * @fd. + * + * See soup_server_listen() for more details. + * + * Note that @server will close @fd when you free it or call + * soup_server_disconnect(). + * + * Return value: %TRUE on success, %FALSE if an error occurred (in + * which case @error will be set). + * + * Since: 2.48 + **/ +gboolean +soup_server_listen_fd (SoupServer *server, int fd, + SoupServerListenOptions options, + GError **error) +{ + SoupServerPrivate *priv; + SoupSocket *listener; + gboolean success; + + g_return_val_if_fail (SOUP_IS_SERVER (server), FALSE); + g_return_val_if_fail (!(options & SOUP_SERVER_LISTEN_IPV4_ONLY) && + !(options & SOUP_SERVER_LISTEN_IPV6_ONLY), FALSE); + + priv = soup_server_get_instance_private (server); + g_return_val_if_fail (priv->disposed == FALSE, FALSE); + + listener = g_initable_new (SOUP_TYPE_SOCKET, NULL, error, + SOUP_SOCKET_FD, fd, + SOUP_SOCKET_USE_THREAD_CONTEXT, TRUE, + SOUP_SOCKET_IPV6_ONLY, TRUE, + NULL); + if (!listener) + return FALSE; + + success = soup_server_listen_internal (server, listener, options, error); + g_object_unref (listener); - soup_server_quit (server); + return success; +} + +/** + * soup_server_get_uris: + * @server: a #SoupServer + * + * Gets a list of URIs corresponding to the interfaces @server is + * listening on. These will contain IP addresses, not hostnames, and + * will also indicate whether the given listener is http or https. + * + * Note that if you used soup_server_listen_all(), the returned URIs + * will use the addresses 0.0.0.0 and + * ::, rather than actually returning separate URIs + * for each interface on the system. + * + * Return value: (transfer full) (element-type Soup.URI): a list of + * #SoupURIs, which you must free when you are done with it. + * + * Since: 2.48 + */ +GSList * +soup_server_get_uris (SoupServer *server) +{ + SoupServerPrivate *priv; + GSList *uris, *l; + SoupSocket *listener; + SoupAddress *addr; + SoupURI *uri; + gpointer creds; - if (priv->listen_sock) { - soup_socket_disconnect (priv->listen_sock); - g_object_unref (priv->listen_sock); - priv->listen_sock = NULL; + g_return_val_if_fail (SOUP_IS_SERVER (server), NULL); + priv = soup_server_get_instance_private (server); + + for (l = priv->listeners, uris = NULL; l; l = l->next) { + listener = l->data; + addr = soup_socket_get_local_address (listener); + g_object_get (G_OBJECT (listener), SOUP_SOCKET_SSL_CREDENTIALS, &creds, NULL); + + uri = soup_uri_new (NULL); + soup_uri_set_scheme (uri, creds ? "https" : "http"); + soup_uri_set_host (uri, soup_address_get_physical (addr)); + soup_uri_set_port (uri, soup_address_get_port (addr)); + soup_uri_set_path (uri, "/"); + + uris = g_slist_prepend (uris, uri); } + + return uris; } /** * soup_server_get_async_context: * @server: a #SoupServer * - * Gets @server's async_context. This does not add a ref to the - * context, so you will need to ref it yourself if you want it to - * outlive its server. + * Gets @server's async_context, if you are using the old API. (With + * the new API, the server runs in the thread's thread-default + * #GMainContext, regardless of what this method returns.) + * + * This does not add a ref to the context, so you will need to ref it + * yourself if you want it to outlive its server. * - * Return value: (transfer none): @server's #GMainContext, which may be %NULL + * Return value: (nullable) (transfer none): @server's #GMainContext, + * which may be %NULL + * + * Deprecated: If you are using soup_server_listen(), etc, then + * the server listens on the thread-default #GMainContext, and this + * property is ignored. **/ GMainContext * soup_server_get_async_context (SoupServer *server) @@ -1221,7 +2170,7 @@ soup_server_get_async_context (SoupServer *server) SoupServerPrivate *priv; g_return_val_if_fail (SOUP_IS_SERVER (server), NULL); - priv = SOUP_SERVER_GET_PRIVATE (server); + priv = soup_server_get_instance_private (server); return priv->async_context; } @@ -1235,9 +2184,9 @@ soup_server_get_async_context (SoupServer *server) * soup_client_context_get_auth_user() to determine if HTTP * authentication was used successfully. * - * soup_client_context_get_address() and/or + * soup_client_context_get_remote_address() and/or * soup_client_context_get_host() can be used to get information for - * logging or debugging purposes. soup_client_context_get_socket() may + * logging or debugging purposes. soup_client_context_get_gsocket() may * also be of use in some situations (eg, tracking when multiple * requests are made on the same connection). **/ @@ -1259,6 +2208,9 @@ G_DEFINE_BOXED_TYPE (SoupClientContext, soup_client_context, soup_client_context * * Return value: (transfer none): the #SoupSocket that @client is * associated with. + * + * Deprecated: use soup_client_context_get_gsocket(), which returns + * a #GSocket. **/ SoupSocket * soup_client_context_get_socket (SoupClientContext *client) @@ -1268,6 +2220,32 @@ soup_client_context_get_socket (SoupClientContext *client) return client->sock; } +/** + * soup_client_context_get_gsocket: + * @client: a #SoupClientContext + * + * Retrieves the #GSocket that @client is associated with. + * + * If you are using this method to observe when multiple requests are + * made on the same persistent HTTP connection (eg, as the ntlm-test + * test program does), you will need to pay attention to socket + * destruction as well (eg, by using weak references), so that you do + * not get fooled when the allocator reuses the memory address of a + * previously-destroyed socket to represent a new socket. + * + * Return value: (nullable) (transfer none): the #GSocket that @client is + * associated with, %NULL if you used soup_server_accept_iostream(). + * + * Since: 2.48 + **/ +GSocket * +soup_client_context_get_gsocket (SoupClientContext *client) +{ + g_return_val_if_fail (client != NULL, NULL); + + return client->gsock; +} + /** * soup_client_context_get_address: * @client: a #SoupClientContext @@ -1275,8 +2253,12 @@ soup_client_context_get_socket (SoupClientContext *client) * Retrieves the #SoupAddress associated with the remote end * of a connection. * - * Return value: (transfer none): the #SoupAddress associated with the - * remote end of a connection. + * Return value: (nullable) (transfer none): the #SoupAddress + * associated with the remote end of a connection, it may be + * %NULL if you used soup_server_accept_iostream(). + * + * Deprecated: Use soup_client_context_get_remote_address(), which returns + * a #GSocketAddress. **/ SoupAddress * soup_client_context_get_address (SoupClientContext *client) @@ -1286,25 +2268,99 @@ soup_client_context_get_address (SoupClientContext *client) return soup_socket_get_remote_address (client->sock); } +/** + * soup_client_context_get_remote_address: + * @client: a #SoupClientContext + * + * Retrieves the #GSocketAddress associated with the remote end + * of a connection. + * + * Return value: (nullable) (transfer none): the #GSocketAddress + * associated with the remote end of a connection, it may be + * %NULL if you used soup_server_accept_iostream(). + * + * Since: 2.48 + **/ +GSocketAddress * +soup_client_context_get_remote_address (SoupClientContext *client) +{ + g_return_val_if_fail (client != NULL, NULL); + + if (client->remote_addr) + return client->remote_addr; + + client->remote_addr = client->gsock ? + g_socket_get_remote_address (client->gsock, NULL) : + soup_address_get_gsockaddr (soup_socket_get_remote_address (client->sock)); + + return client->remote_addr; +} + +/** + * soup_client_context_get_local_address: + * @client: a #SoupClientContext + * + * Retrieves the #GSocketAddress associated with the local end + * of a connection. + * + * Return value: (nullable) (transfer none): the #GSocketAddress + * associated with the local end of a connection, it may be + * %NULL if you used soup_server_accept_iostream(). + * + * Since: 2.48 + **/ +GSocketAddress * +soup_client_context_get_local_address (SoupClientContext *client) +{ + g_return_val_if_fail (client != NULL, NULL); + + if (client->local_addr) + return client->local_addr; + + client->local_addr = client->gsock ? + g_socket_get_local_address (client->gsock, NULL) : + soup_address_get_gsockaddr (soup_socket_get_local_address (client->sock)); + + return client->local_addr; +} + /** * soup_client_context_get_host: * @client: a #SoupClientContext * * Retrieves the IP address associated with the remote end of a - * connection. (If you want the actual hostname, you'll have to call - * soup_client_context_get_address() and then call the appropriate - * #SoupAddress method to resolve it.) - * - * Return value: the IP address associated with the remote end of a * connection. + * + * Return value: (nullable): the IP address associated with the remote + * end of a connection, it may be %NULL if you used + * soup_server_accept_iostream(). **/ const char * soup_client_context_get_host (SoupClientContext *client) { - SoupAddress *address; + g_return_val_if_fail (client != NULL, NULL); + + if (client->remote_ip) + return client->remote_ip; - address = soup_client_context_get_address (client); - return soup_address_get_physical (address); + if (client->gsock) { + GSocketAddress *addr = soup_client_context_get_remote_address (client); + GInetAddress *iaddr; + + if (!addr || !G_IS_INET_SOCKET_ADDRESS (addr)) + return NULL; + iaddr = g_inet_socket_address_get_address (G_INET_SOCKET_ADDRESS (addr)); + client->remote_ip = g_inet_address_to_string (iaddr); + } else { + SoupAddress *addr; + + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + addr = soup_client_context_get_address (client); + G_GNUC_END_IGNORE_DEPRECATIONS; + client->remote_ip = g_strdup (soup_address_get_physical (addr)); + } + + return client->remote_ip; } /** @@ -1315,7 +2371,7 @@ soup_client_context_get_host (SoupClientContext *client) * authenticated, and if so returns the #SoupAuthDomain that * authenticated it. * - * Return value: (transfer none) (allow-none): a #SoupAuthDomain, or + * Return value: (transfer none) (nullable): a #SoupAuthDomain, or * %NULL if the request was not authenticated. **/ SoupAuthDomain * @@ -1334,8 +2390,8 @@ soup_client_context_get_auth_domain (SoupClientContext *client) * authenticated, and if so returns the username that the client * authenticated as. * - * Return value: the authenticated-as user, or %NULL if the request - * was not authenticated. + * Return value: (nullable): the authenticated-as user, or %NULL if + * the request was not authenticated. **/ const char * soup_client_context_get_auth_user (SoupClientContext *client) @@ -1345,20 +2401,64 @@ soup_client_context_get_auth_user (SoupClientContext *client) return client->auth_user; } +/** + * soup_client_context_steal_connection: + * @client: a #SoupClientContext + * + * "Steals" the HTTP connection associated with @client from its + * #SoupServer. This happens immediately, regardless of the current + * state of the connection; if the response to the current + * #SoupMessage has not yet finished being sent, then it will be + * discarded; you can steal the connection from a + * #SoupMessage:wrote-informational or #SoupMessage:wrote-body signal + * handler if you need to wait for part or all of the response to be + * sent. + * + * Note that when calling this function from C, @client will most + * likely be freed as a side effect. + * + * Return value: (transfer full): the #GIOStream formerly associated + * with @client (or %NULL if @client was no longer associated with a + * connection). No guarantees are made about what kind of #GIOStream + * is returned. + * + * Since: 2.50 + **/ +GIOStream * +soup_client_context_steal_connection (SoupClientContext *client) +{ + GIOStream *stream; + + g_return_val_if_fail (client != NULL, NULL); + + soup_client_context_ref (client); + + stream = soup_message_io_steal (client->msg); + if (stream) { + g_object_set_data_full (G_OBJECT (stream), "GSocket", + soup_socket_steal_gsocket (client->sock), + g_object_unref); + } + + socket_disconnected (client->sock, client); + soup_client_context_unref (client); + + return stream; +} + + /** * SoupServerCallback: * @server: the #SoupServer * @msg: the message being processed * @path: the path component of @msg's Request-URI * @query: (element-type utf8 utf8) (allow-none): the parsed query - * component of @msg's Request-URI + * component of @msg's Request-URI * @client: additional contextual information about the client - * @user_data: the data passed to @soup_server_add_handler + * @user_data: the data passed to soup_server_add_handler() or + * soup_server_add_early_handler(). * - * A callback used to handle requests to a #SoupServer. The callback - * will be invoked after receiving the request body; @msg's - * #SoupMessage:method, #SoupMessage:request_headers, and - * #SoupMessage:request_body fields will be filled in. + * A callback used to handle requests to a #SoupServer. * * @path and @query contain the likewise-named components of the * Request-URI, subject to certain assumptions. By default, @@ -1379,22 +2479,67 @@ soup_client_context_get_auth_user (SoupClientContext *client) * and call soup_message_get_uri() and parse the URI's query field * yourself. * + * See soup_server_add_handler() and soup_server_add_early_handler() + * for details of what handlers can/should do. + **/ + +static SoupServerHandler * +get_or_create_handler (SoupServer *server, const char *exact_path) +{ + SoupServerPrivate *priv = soup_server_get_instance_private (server); + SoupServerHandler *handler; + + exact_path = NORMALIZED_PATH (exact_path); + + handler = soup_path_map_lookup (priv->handlers, exact_path); + if (handler && !strcmp (handler->path, exact_path)) + return handler; + + handler = g_slice_new0 (SoupServerHandler); + handler->path = g_strdup (exact_path); + soup_path_map_add (priv->handlers, exact_path, handler); + + return handler; +} + +/** + * soup_server_add_handler: + * @server: a #SoupServer + * @path: (allow-none): the toplevel path for the handler + * @callback: callback to invoke for requests under @path + * @user_data: data for @callback + * @destroy: destroy notifier to free @user_data + * + * Adds a handler to @server for requests under @path. If @path is + * %NULL or "/", then this will be the default handler for all + * requests that don't have a more specific handler. (Note though that + * if you want to handle requests to the special "*" URI, you must + * explicitly register a handler for "*"; the default handler will not + * be used for that case.) + * + * For requests under @path (that have not already been assigned a + * status code by a #SoupAuthDomain, an early #SoupServerHandler, or a + * signal handler), @callback will be invoked after receiving the + * request body; the message's #SoupMessage:method, + * #SoupMessage:request-headers, and #SoupMessage:request-body fields + * will be filled in. + * * After determining what to do with the request, the callback must at * a minimum call soup_message_set_status() (or - * soup_message_set_status_full()) on @msg to set the response status - * code. Additionally, it may set response headers and/or fill in the - * response body. + * soup_message_set_status_full()) on the message to set the response + * status code. Additionally, it may set response headers and/or fill + * in the response body. * * If the callback cannot fully fill in the response before returning * (eg, if it needs to wait for information from a database, or * another network server), it should call soup_server_pause_message() - * to tell #SoupServer to not send the response right away. When the + * to tell @server to not send the response right away. When the * response is ready, call soup_server_unpause_message() to cause it * to be sent. * * To send the response body a bit at a time using "chunked" encoding, * first call soup_message_headers_set_encoding() to set - * %SOUP_ENCODING_CHUNKED on the #SoupMessage:response_headers. Then call + * %SOUP_ENCODING_CHUNKED on the #SoupMessage:response-headers. Then call * soup_message_body_append() (or soup_message_body_append_buffer()) * to append each chunk as it becomes ready, and * soup_server_unpause_message() to make sure it's running. (The @@ -1403,64 +2548,160 @@ soup_client_context_get_auth_user (SoupClientContext *client) * soup_message_body_complete() to indicate that no more chunks are * coming. **/ +void +soup_server_add_handler (SoupServer *server, + const char *path, + SoupServerCallback callback, + gpointer user_data, + GDestroyNotify destroy) +{ + SoupServerHandler *handler; + + g_return_if_fail (SOUP_IS_SERVER (server)); + g_return_if_fail (callback != NULL); + + handler = get_or_create_handler (server, path); + if (handler->destroy) + handler->destroy (handler->user_data); + + handler->callback = callback; + handler->destroy = destroy; + handler->user_data = user_data; +} /** - * soup_server_add_handler: + * soup_server_add_early_handler: * @server: a #SoupServer * @path: (allow-none): the toplevel path for the handler * @callback: callback to invoke for requests under @path * @user_data: data for @callback * @destroy: destroy notifier to free @user_data * - * Adds a handler to @server for requests under @path. See the - * documentation for #SoupServerCallback for information about - * how callbacks should behave. + * Adds an "early" handler to @server for requests under @path. Note + * that "normal" and "early" handlers are matched up together, so if + * you add a normal handler for "/foo" and an early handler for + * "/foo/bar", then a request to "/foo/bar" (or any path below it) + * will run only the early handler. (But if you add both handlers at + * the same path, then both will get run.) * - * If @path is %NULL or "/", then this will be the default handler for - * all requests that don't have a more specific handler. Note though - * that if you want to handle requests to the special "*" URI, you - * must explicitly register a handler for "*"; the default handler - * will not be used for that case. + * For requests under @path (that have not already been assigned a + * status code by a #SoupAuthDomain or a signal handler), @callback + * will be invoked after receiving the request headers, but before + * receiving the request body; the message's #SoupMessage:method and + * #SoupMessage:request-headers fields will be filled in. + * + * Early handlers are generally used for processing requests with + * request bodies in a streaming fashion. If you determine that the + * request will contain a message body, normally you would call + * soup_message_body_set_accumulate() on the message's + * #SoupMessage:request-body to turn off request-body accumulation, + * and connect to the message's #SoupMessage::got-chunk signal to + * process each chunk as it comes in. + * + * To complete the message processing after the full message body has + * been read, you can either also connect to #SoupMessage::got-body, + * or else you can register a non-early handler for @path as well. As + * long as you have not set the #SoupMessage:status-code by the time + * #SoupMessage::got-body is emitted, the non-early handler will be + * run as well. + * + * Since: 2.50 **/ void -soup_server_add_handler (SoupServer *server, - const char *path, - SoupServerCallback callback, - gpointer user_data, - GDestroyNotify destroy) +soup_server_add_early_handler (SoupServer *server, + const char *path, + SoupServerCallback callback, + gpointer user_data, + GDestroyNotify destroy) { - SoupServerPrivate *priv; - SoupServerHandler *hand; + SoupServerHandler *handler; g_return_if_fail (SOUP_IS_SERVER (server)); g_return_if_fail (callback != NULL); - priv = SOUP_SERVER_GET_PRIVATE (server); - /* "" was never documented as meaning the same this as "/", - * but it effectively was. We have to special case it now or - * otherwise it would match "*" too. - */ - if (path && (!*path || !strcmp (path, "/"))) - path = NULL; - - hand = g_slice_new0 (SoupServerHandler); - hand->path = g_strdup (path); - hand->callback = callback; - hand->destroy = destroy; - hand->user_data = user_data; - - soup_server_remove_handler (server, path); - if (path) - soup_path_map_add (priv->handlers, path, hand); - else - priv->default_handler = hand; + handler = get_or_create_handler (server, path); + if (handler->early_destroy) + handler->early_destroy (handler->early_user_data); + + handler->early_callback = callback; + handler->early_destroy = destroy; + handler->early_user_data = user_data; } -static void -unregister_handler (SoupServerHandler *handler) +/** + * SoupServerWebsocketCallback: + * @server: the #SoupServer + * @path: the path component of @msg's Request-URI + * @connection: the newly created WebSocket connection + * @client: additional contextual information about the client + * @user_data: the data passed to @soup_server_add_handler + * + * A callback used to handle WebSocket requests to a #SoupServer. The + * callback will be invoked after sending the handshake response back + * to the client (and is only invoked if the handshake was + * successful). + * + * @path contains the path of the Request-URI, subject to the same + * rules as #SoupServerCallback (qv). + **/ + +/** + * soup_server_add_websocket_handler: + * @server: a #SoupServer + * @path: (allow-none): the toplevel path for the handler + * @origin: (allow-none): the origin of the connection + * @protocols: (allow-none) (array zero-terminated=1): the protocols + * supported by this handler + * @callback: callback to invoke for successful WebSocket requests under @path + * @user_data: data for @callback + * @destroy: destroy notifier to free @user_data + * + * Adds a WebSocket handler to @server for requests under @path. (If + * @path is %NULL or "/", then this will be the default handler for + * all requests that don't have a more specific handler.) + * + * When a path has a WebSocket handler registered, @server will check + * incoming requests for WebSocket handshakes after all other handlers + * have run (unless some earlier handler has already set a status code + * on the message), and update the request's status, response headers, + * and response body accordingly. + * + * If @origin is non-%NULL, then only requests containing a matching + * "Origin" header will be accepted. If @protocols is non-%NULL, then + * only requests containing a compatible "Sec-WebSocket-Protocols" + * header will be accepted. More complicated requirements can be + * handled by adding a normal handler to @path, and having it perform + * whatever checks are needed (possibly calling + * soup_server_check_websocket_handshake() one or more times), and + * setting a failure status code if the handshake should be rejected. + **/ +void +soup_server_add_websocket_handler (SoupServer *server, + const char *path, + const char *origin, + char **protocols, + SoupServerWebsocketCallback callback, + gpointer user_data, + GDestroyNotify destroy) { - if (handler->destroy) - handler->destroy (handler->user_data); + SoupServerHandler *handler; + + g_return_if_fail (SOUP_IS_SERVER (server)); + g_return_if_fail (callback != NULL); + + handler = get_or_create_handler (server, path); + if (handler->websocket_destroy) + handler->websocket_destroy (handler->websocket_user_data); + if (handler->websocket_origin) + g_free (handler->websocket_origin); + if (handler->websocket_protocols) + g_strfreev (handler->websocket_protocols); + + handler->websocket_callback = callback; + handler->websocket_destroy = destroy; + handler->websocket_user_data = user_data; + handler->websocket_origin = g_strdup (origin); + handler->websocket_protocols = g_strdupv (protocols); } /** @@ -1468,31 +2709,17 @@ unregister_handler (SoupServerHandler *handler) * @server: a #SoupServer * @path: the toplevel path for the handler * - * Removes the handler registered at @path. + * Removes all handlers (early and normal) registered at @path. **/ void soup_server_remove_handler (SoupServer *server, const char *path) { SoupServerPrivate *priv; - SoupServerHandler *hand; g_return_if_fail (SOUP_IS_SERVER (server)); - priv = SOUP_SERVER_GET_PRIVATE (server); + priv = soup_server_get_instance_private (server); - if (!path || !*path || !strcmp (path, "/")) { - if (priv->default_handler) { - unregister_handler (priv->default_handler); - free_handler (priv->default_handler); - priv->default_handler = NULL; - } - return; - } - - hand = soup_path_map_lookup (priv->handlers, path); - if (hand && !strcmp (path, hand->path)) { - unregister_handler (hand); - soup_path_map_remove (priv->handlers, path); - } + soup_path_map_remove (priv->handlers, NORMALIZED_PATH (path)); } /** @@ -1518,7 +2745,7 @@ soup_server_add_auth_domain (SoupServer *server, SoupAuthDomain *auth_domain) SoupServerPrivate *priv; g_return_if_fail (SOUP_IS_SERVER (server)); - priv = SOUP_SERVER_GET_PRIVATE (server); + priv = soup_server_get_instance_private (server); priv->auth_domains = g_slist_append (priv->auth_domains, auth_domain); g_object_ref (auth_domain); @@ -1537,7 +2764,7 @@ soup_server_remove_auth_domain (SoupServer *server, SoupAuthDomain *auth_domain) SoupServerPrivate *priv; g_return_if_fail (SOUP_IS_SERVER (server)); - priv = SOUP_SERVER_GET_PRIVATE (server); + priv = soup_server_get_instance_private (server); priv->auth_domains = g_slist_remove (priv->auth_domains, auth_domain); g_object_unref (auth_domain); @@ -1590,4 +2817,3 @@ soup_server_unpause_message (SoupServer *server, soup_message_io_unpause (msg); } - diff --git a/libsoup/soup-server.h b/libsoup/soup-server.h index 0d09322e..63294870 100644 --- a/libsoup/soup-server.h +++ b/libsoup/soup-server.h @@ -8,6 +8,7 @@ #include #include +#include G_BEGIN_DECLS @@ -19,9 +20,16 @@ G_BEGIN_DECLS #define SOUP_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_SERVER, SoupServerClass)) typedef struct SoupClientContext SoupClientContext; +SOUP_AVAILABLE_IN_2_4 GType soup_client_context_get_type (void); #define SOUP_TYPE_CLIENT_CONTEXT (soup_client_context_get_type ()) +typedef enum { + SOUP_SERVER_LISTEN_HTTPS = (1 << 0), + SOUP_SERVER_LISTEN_IPV4_ONLY = (1 << 1), + SOUP_SERVER_LISTEN_IPV6_ONLY = (1 << 2) +} SoupServerListenOptions; + struct _SoupServer { GObject parent; @@ -47,70 +55,176 @@ typedef struct { void (*_libsoup_reserved4) (void); } SoupServerClass; +SOUP_AVAILABLE_IN_2_4 GType soup_server_get_type (void); -typedef void (*SoupServerCallback) (SoupServer *server, - SoupMessage *msg, - const char *path, - GHashTable *query, - SoupClientContext *client, - gpointer user_data); - -#define SOUP_SERVER_PORT "port" -#define SOUP_SERVER_INTERFACE "interface" -#define SOUP_SERVER_SSL_CERT_FILE "ssl-cert-file" -#define SOUP_SERVER_SSL_KEY_FILE "ssl-key-file" #define SOUP_SERVER_TLS_CERTIFICATE "tls-certificate" -#define SOUP_SERVER_ASYNC_CONTEXT "async-context" #define SOUP_SERVER_RAW_PATHS "raw-paths" #define SOUP_SERVER_SERVER_HEADER "server-header" #define SOUP_SERVER_HTTP_ALIASES "http-aliases" #define SOUP_SERVER_HTTPS_ALIASES "https-aliases" -SoupServer *soup_server_new (const char *optname1, - ...) G_GNUC_NULL_TERMINATED; - -gboolean soup_server_is_https (SoupServer *server); -guint soup_server_get_port (SoupServer *server); - -SoupSocket *soup_server_get_listener (SoupServer *server); - -void soup_server_run (SoupServer *server); -void soup_server_run_async (SoupServer *server); -void soup_server_quit (SoupServer *server); -void soup_server_disconnect (SoupServer *server); - -GMainContext *soup_server_get_async_context (SoupServer *server); +SOUP_AVAILABLE_IN_2_4 +SoupServer *soup_server_new (const char *optname1, + ...) G_GNUC_NULL_TERMINATED; + +SOUP_AVAILABLE_IN_2_48 +gboolean soup_server_set_ssl_cert_file (SoupServer *server, + const char *ssl_cert_file, + const char *ssl_key_file, + GError **error); +SOUP_AVAILABLE_IN_2_4 +gboolean soup_server_is_https (SoupServer *server); + +SOUP_AVAILABLE_IN_2_48 +gboolean soup_server_listen (SoupServer *server, + GSocketAddress *address, + SoupServerListenOptions options, + GError **error); +SOUP_AVAILABLE_IN_2_48 +gboolean soup_server_listen_all (SoupServer *server, + guint port, + SoupServerListenOptions options, + GError **error); +SOUP_AVAILABLE_IN_2_48 +gboolean soup_server_listen_local (SoupServer *server, + guint port, + SoupServerListenOptions options, + GError **error); +SOUP_AVAILABLE_IN_2_48 +gboolean soup_server_listen_socket (SoupServer *server, + GSocket *socket, + SoupServerListenOptions options, + GError **error); +SOUP_AVAILABLE_IN_2_48 +gboolean soup_server_listen_fd (SoupServer *server, + int fd, + SoupServerListenOptions options, + GError **error); +SOUP_AVAILABLE_IN_2_48 +GSList *soup_server_get_uris (SoupServer *server); +SOUP_AVAILABLE_IN_2_48 +GSList *soup_server_get_listeners (SoupServer *server); + +SOUP_AVAILABLE_IN_2_4 +void soup_server_disconnect (SoupServer *server); + +SOUP_AVAILABLE_IN_2_50 +gboolean soup_server_accept_iostream (SoupServer *server, + GIOStream *stream, + GSocketAddress *local_addr, + GSocketAddress *remote_addr, + GError **error); /* Handlers and auth */ -void soup_server_add_handler (SoupServer *server, - const char *path, - SoupServerCallback callback, - gpointer user_data, - GDestroyNotify destroy); -void soup_server_remove_handler (SoupServer *server, - const char *path); - -void soup_server_add_auth_domain (SoupServer *server, - SoupAuthDomain *auth_domain); -void soup_server_remove_auth_domain (SoupServer *server, - SoupAuthDomain *auth_domain); +typedef void (*SoupServerCallback) (SoupServer *server, + SoupMessage *msg, + const char *path, + GHashTable *query, + SoupClientContext *client, + gpointer user_data); + +SOUP_AVAILABLE_IN_2_4 +void soup_server_add_handler (SoupServer *server, + const char *path, + SoupServerCallback callback, + gpointer user_data, + GDestroyNotify destroy); +SOUP_AVAILABLE_IN_2_50 +void soup_server_add_early_handler (SoupServer *server, + const char *path, + SoupServerCallback callback, + gpointer user_data, + GDestroyNotify destroy); + +typedef void (*SoupServerWebsocketCallback) (SoupServer *server, + SoupWebsocketConnection *connection, + const char *path, + SoupClientContext *client, + gpointer user_data); +SOUP_AVAILABLE_IN_2_50 +void soup_server_add_websocket_handler (SoupServer *server, + const char *path, + const char *origin, + char **protocols, + SoupServerWebsocketCallback callback, + gpointer user_data, + GDestroyNotify destroy); + +SOUP_AVAILABLE_IN_2_4 +void soup_server_remove_handler (SoupServer *server, + const char *path); + +SOUP_AVAILABLE_IN_2_4 +void soup_server_add_auth_domain (SoupServer *server, + SoupAuthDomain *auth_domain); +SOUP_AVAILABLE_IN_2_4 +void soup_server_remove_auth_domain (SoupServer *server, + SoupAuthDomain *auth_domain); /* I/O */ - -void soup_server_pause_message (SoupServer *server, - SoupMessage *msg); -void soup_server_unpause_message (SoupServer *server, - SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 +void soup_server_pause_message (SoupServer *server, + SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 +void soup_server_unpause_message (SoupServer *server, + SoupMessage *msg); /* Client context */ -SoupSocket *soup_client_context_get_socket (SoupClientContext *client); -SoupAddress *soup_client_context_get_address (SoupClientContext *client); -const char *soup_client_context_get_host (SoupClientContext *client); -SoupAuthDomain *soup_client_context_get_auth_domain (SoupClientContext *client); -const char *soup_client_context_get_auth_user (SoupClientContext *client); +SOUP_AVAILABLE_IN_2_48 +GSocket *soup_client_context_get_gsocket (SoupClientContext *client); +SOUP_AVAILABLE_IN_2_48 +GSocketAddress *soup_client_context_get_local_address (SoupClientContext *client); +SOUP_AVAILABLE_IN_2_48 +GSocketAddress *soup_client_context_get_remote_address (SoupClientContext *client); +SOUP_AVAILABLE_IN_2_4 +const char *soup_client_context_get_host (SoupClientContext *client); +SOUP_AVAILABLE_IN_2_4 +SoupAuthDomain *soup_client_context_get_auth_domain (SoupClientContext *client); +SOUP_AVAILABLE_IN_2_4 +const char *soup_client_context_get_auth_user (SoupClientContext *client); + +SOUP_AVAILABLE_IN_2_50 +GIOStream *soup_client_context_steal_connection (SoupClientContext *client); + +/* Legacy API */ + +#define SOUP_SERVER_PORT "port" +#define SOUP_SERVER_INTERFACE "interface" +#define SOUP_SERVER_ASYNC_CONTEXT "async-context" +#define SOUP_SERVER_SSL_CERT_FILE "ssl-cert-file" +#define SOUP_SERVER_SSL_KEY_FILE "ssl-key-file" + +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_48 +guint soup_server_get_port (SoupServer *server); + +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_48 +SoupSocket *soup_server_get_listener (SoupServer *server); + +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_48 +GMainContext *soup_server_get_async_context (SoupServer *server); + +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_48 +void soup_server_run (SoupServer *server); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_48 +void soup_server_run_async (SoupServer *server); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_48 +void soup_server_quit (SoupServer *server); + +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_48 +SoupAddress *soup_client_context_get_address (SoupClientContext *client); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_48 +SoupSocket *soup_client_context_get_socket (SoupClientContext *client); G_END_DECLS diff --git a/libsoup/soup-session-async.c b/libsoup/soup-session-async.c index b9353480..c1879890 100644 --- a/libsoup/soup-session-async.c +++ b/libsoup/soup-session-async.c @@ -18,18 +18,19 @@ /** * SECTION:soup-session-async - * @short_description: (Deprecated) SoupSession for asynchronous - * (main-loop-based) I/O. + * @short_description: SoupSession for asynchronous (main-loop-based) I/O + * (deprecated). * * #SoupSessionAsync is an implementation of #SoupSession that uses * non-blocking I/O via the glib main loop for all I/O. * - * As of libsoup 2.42, this is deprecated in favor of the plain - * #SoupSession class (which uses both asynchronous and synchronous - * I/O, depending on the API used). See the porting guide. + * Deprecated: 2.42: Use the #SoupSession class (which uses both asynchronous + * and synchronous I/O, depending on the API used). See the + * porting guide. **/ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + G_DEFINE_TYPE (SoupSessionAsync, soup_session_async, SOUP_TYPE_SESSION) static void @@ -141,3 +142,5 @@ soup_session_async_class_init (SoupSessionAsyncClass *soup_session_async_class) session_class->send_message = soup_session_async_send_message; session_class->cancel_message = soup_session_async_cancel_message; } + +G_GNUC_END_IGNORE_DEPRECATIONS; diff --git a/libsoup/soup-session-async.h b/libsoup/soup-session-async.h index 96217638..d5a450ec 100644 --- a/libsoup/soup-session-async.h +++ b/libsoup/soup-session-async.h @@ -14,7 +14,7 @@ G_BEGIN_DECLS #define SOUP_TYPE_SESSION_ASYNC (soup_session_async_get_type ()) #define SOUP_SESSION_ASYNC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_SESSION_ASYNC, SoupSessionAsync)) #define SOUP_SESSION_ASYNC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_SESSION_ASYNC, SoupSessionAsyncClass)) -#define SOUP_IS_SESSION_ASYNC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_SESSION_ASYNC)) +#define SOUP_IS_SESSION_ASYNC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), _soup_session_async_get_type_undeprecated ())) #define SOUP_IS_SESSION_ASYNC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_SESSION_ASYNC)) #define SOUP_SESSION_ASYNC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_SESSION_ASYNC, SoupSessionAsyncClass)) @@ -33,10 +33,24 @@ typedef struct { void (*_libsoup_reserved4) (void); } SoupSessionAsyncClass; +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_54 GType soup_session_async_get_type (void); +static inline GType +_soup_session_async_get_type_undeprecated (void) +{ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + return soup_session_async_get_type (); + G_GNUC_END_IGNORE_DEPRECATIONS; +} + #ifndef SOUP_DISABLE_DEPRECATED +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_54_FOR(soup_session_new) SoupSession *soup_session_async_new (void); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_54_FOR(soup_session_new) SoupSession *soup_session_async_new_with_options (const char *optname1, ...) G_GNUC_NULL_TERMINATED; #endif diff --git a/libsoup/soup-session-feature.c b/libsoup/soup-session-feature.c index 560bb8f7..d8bb10a3 100644 --- a/libsoup/soup-session-feature.c +++ b/libsoup/soup-session-feature.c @@ -41,7 +41,7 @@ * @attach: Perform setup when a feature is added to a session * @detach: Perform cleanup when a feature is removed from a session * @request_queued: Proxies the session's #SoupSession::request_queued signal - * @request_started: Proxies the session's #SoupSession::request_started signal + * @request_started: Proxies the session's #SoupSession::request_started signal. Deprecated 2.50. Use #SoupMessage::starting instead. * @request_unqueued: Proxies the session's #SoupSession::request_unqueued signal * @add_feature: adds a sub-feature to the main feature * @remove_feature: removes a sub-feature from the main feature @@ -52,8 +52,6 @@ * Since: 2.24 **/ -static void soup_session_feature_default_init (SoupSessionFeatureInterface *iface); - G_DEFINE_INTERFACE (SoupSessionFeature, soup_session_feature, G_TYPE_OBJECT) static void @@ -119,6 +117,9 @@ void soup_session_feature_attach (SoupSessionFeature *feature, SoupSession *session) { + g_return_if_fail (SOUP_IS_SESSION_FEATURE (feature)); + g_return_if_fail (SOUP_IS_SESSION (session)); + SOUP_SESSION_FEATURE_GET_CLASS (feature)->attach (feature, session); } @@ -138,6 +139,9 @@ void soup_session_feature_detach (SoupSessionFeature *feature, SoupSession *session) { + g_return_if_fail (SOUP_IS_SESSION_FEATURE (feature)); + g_return_if_fail (SOUP_IS_SESSION (session)); + SOUP_SESSION_FEATURE_GET_CLASS (feature)->detach (feature, session); } diff --git a/libsoup/soup-session-sync.c b/libsoup/soup-session-sync.c index 374f22bd..229ac1e5 100644 --- a/libsoup/soup-session-sync.c +++ b/libsoup/soup-session-sync.c @@ -17,18 +17,19 @@ /** * SECTION:soup-session-sync - * @short_description: (Deprecated) SoupSession for blocking I/O in - * multithreaded programs. + * @short_description: SoupSession for blocking I/O in multithreaded programs + * (deprecated). * * #SoupSessionSync is an implementation of #SoupSession that uses * synchronous I/O, intended for use in multi-threaded programs. * - * As of libsoup 2.42, this is deprecated in favor of the plain - * #SoupSession class (which uses both asynchronous and synchronous - * I/O, depending on the API used). See the porting guide. + * Deprecated: 2.42: Use the #SoupSession class (which uses both asynchronous + * and synchronous I/O, depending on the API used). See the + * porting guide. **/ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + G_DEFINE_TYPE (SoupSessionSync, soup_session_sync, SOUP_TYPE_SESSION) static void @@ -127,3 +128,5 @@ soup_session_sync_class_init (SoupSessionSyncClass *session_sync_class) /* virtual method override */ session_class->queue_message = soup_session_sync_queue_message; } + +G_GNUC_END_IGNORE_DEPRECATIONS; diff --git a/libsoup/soup-session-sync.h b/libsoup/soup-session-sync.h index cf81f6b0..56c340c0 100644 --- a/libsoup/soup-session-sync.h +++ b/libsoup/soup-session-sync.h @@ -14,7 +14,7 @@ G_BEGIN_DECLS #define SOUP_TYPE_SESSION_SYNC (soup_session_sync_get_type ()) #define SOUP_SESSION_SYNC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_SESSION_SYNC, SoupSessionSync)) #define SOUP_SESSION_SYNC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_SESSION_SYNC, SoupSessionSyncClass)) -#define SOUP_IS_SESSION_SYNC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_SESSION_SYNC)) +#define SOUP_IS_SESSION_SYNC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), _soup_session_sync_get_type_undeprecated ())) #define SOUP_IS_SESSION_SYNC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_SESSION_SYNC)) #define SOUP_SESSION_SYNC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_SESSION_SYNC, SoupSessionSyncClass)) @@ -33,10 +33,24 @@ typedef struct { void (*_libsoup_reserved4) (void); } SoupSessionSyncClass; +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_54 GType soup_session_sync_get_type (void); +static inline GType +_soup_session_sync_get_type_undeprecated (void) +{ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + return soup_session_sync_get_type (); + G_GNUC_END_IGNORE_DEPRECATIONS; +} + #ifndef SOUP_DISABLE_DEPRECATED +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_54_FOR(soup_session_new) SoupSession *soup_session_sync_new (void); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_54_FOR(soup_session_new_with_options) SoupSession *soup_session_sync_new_with_options (const char *optname1, ...) G_GNUC_NULL_TERMINATED; #endif diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c index 132554d6..ae340b9c 100644 --- a/libsoup/soup-session.c +++ b/libsoup/soup-session.c @@ -21,6 +21,9 @@ #include "soup-message-queue.h" #include "soup-proxy-resolver-wrapper.h" #include "soup-session-private.h" +#include "soup-socket-private.h" +#include "soup-websocket.h" +#include "soup-websocket-connection.h" #define HOST_KEEP_ALIVE 5 * 60 * 1000 /* 5 min in msecs */ @@ -53,17 +56,27 @@ * behaves like it traditionally did on a #SoupSessionAsync, and * soup_session_send_message() behaves like it traditionally did on a * #SoupSessionSync.) + * + * Additional #SoupSession functionality is provided by + * #SoupSessionFeature objects, which can be added to a session with + * soup_session_add_feature() or soup_session_add_feature_by_type() + * (or at construct time with the %SOUP_SESSION_ADD_FEATURE_BY_TYPE + * pseudo-property). For example, #SoupLogger provides support for + * logging HTTP traffic, #SoupContentDecoder provides support for + * compressed response handling, and #SoupContentSniffer provides + * support for HTML5-style response body content sniffing. + * Additionally, subtypes of #SoupAuth and #SoupRequest can be added + * as features, to add support for additional authentication and URI + * types. + * + * All #SoupSessions are created with a #SoupAuthManager, and support + * for %SOUP_TYPE_AUTH_BASIC and %SOUP_TYPE_AUTH_DIGEST. For + * #SoupRequest types, #SoupRequestHTTP, #SoupRequestFile, and + * #SoupRequestData are supported. Additionally, sessions using the + * plain #SoupSession class (rather than one of its deprecated + * subtypes) have a #SoupContentDecoder by default. **/ -static void -soup_init (void) -{ - bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); -#ifdef HAVE_BIND_TEXTDOMAIN_CODESET - bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); -#endif -} - typedef struct { SoupURI *uri; SoupAddress *addr; @@ -73,8 +86,6 @@ typedef struct { guint num_messages; - gboolean ssl_fallback; - GSource *keep_alive_src; SoupSession *session; } SoupSessionHost; @@ -82,14 +93,24 @@ static guint soup_host_uri_hash (gconstpointer key); static gboolean soup_host_uri_equal (gconstpointer v1, gconstpointer v2); typedef struct { - SoupSession *session; gboolean disposed; GTlsDatabase *tlsdb; + GTlsInteraction *tls_interaction; char *ssl_ca_file; gboolean ssl_strict; gboolean tlsdb_use_default; + guint io_timeout, idle_timeout; + SoupAddress *local_addr; + + GResolver *resolver; + GProxyResolver *proxy_resolver; + gboolean proxy_use_default; + SoupURI *proxy_uri; + + SoupSocketProperties *socket_props; + SoupMessageQueue *queue; char *user_agent; @@ -103,34 +124,25 @@ typedef struct { GHashTable *conns; /* SoupConnection -> SoupSessionHost */ guint num_conns; guint max_conns, max_conns_per_host; - guint io_timeout, idle_timeout; - - SoupAddress *local_addr; /* Must hold the conn_lock before potentially creating a new * SoupSessionHost, adding/removing a connection, - * disconnecting a connection, or moving a connection from - * IDLE to IN_USE. Must not emit signals or destroy objects - * while holding it. conn_cond is signaled when it may be - * possible for a previously-blocked message to continue. + * disconnecting a connection, moving a connection from + * IDLE to IN_USE, or when updating socket properties. + * Must not emit signals or destroy objects while holding it. + * The conn_cond is signaled when it may be possible for + * a previously-blocked message to continue. */ GMutex conn_lock; GCond conn_cond; GMainContext *async_context; gboolean use_thread_context; - GSList *run_queue_sources; - - GResolver *resolver; - GProxyResolver *proxy_resolver; - gboolean proxy_use_default; - SoupURI *proxy_uri; char **http_aliases, **https_aliases; GHashTable *request_types; } SoupSessionPrivate; -#define SOUP_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_SESSION, SoupSessionPrivate)) #define SOUP_IS_PLAIN_SESSION(o) (G_TYPE_FROM_INSTANCE (o) == SOUP_TYPE_SESSION) @@ -156,9 +168,7 @@ static void async_send_request_running (SoupSession *session, SoupMessageQueueIt #define SOUP_SESSION_USER_AGENT_BASE "libsoup/" PACKAGE_VERSION -G_DEFINE_TYPE_WITH_CODE (SoupSession, soup_session, G_TYPE_OBJECT, - soup_init (); - ) +G_DEFINE_TYPE_WITH_PRIVATE (SoupSession, soup_session, G_TYPE_OBJECT) enum { REQUEST_QUEUED, @@ -197,6 +207,7 @@ enum { PROP_HTTP_ALIASES, PROP_HTTPS_ALIASES, PROP_LOCAL_ADDRESS, + PROP_TLS_INTERACTION, LAST_PROP }; @@ -204,11 +215,9 @@ enum { static void soup_session_init (SoupSession *session) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); SoupAuthManager *auth_manager; - priv->session = session; - priv->queue = soup_message_queue_new (session); g_mutex_init (&priv->conn_lock); @@ -268,7 +277,7 @@ soup_session_constructor (GType type, */ if (type == SOUP_TYPE_SESSION) { SoupSession *session = SOUP_SESSION (object); - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); g_clear_pointer (&priv->async_context, g_main_context_unref); priv->async_context = g_main_context_ref_thread_default (); @@ -295,16 +304,7 @@ static void soup_session_dispose (GObject *object) { SoupSession *session = SOUP_SESSION (object); - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); - GSList *iter; - - priv->disposed = TRUE; - - for (iter = priv->run_queue_sources; iter; iter = iter->next) { - g_source_destroy (iter->data); - g_source_unref (iter->data); - } - g_clear_pointer (&priv->run_queue_sources, g_slist_free); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); priv->disposed = TRUE; soup_session_abort (session); @@ -320,7 +320,7 @@ static void soup_session_finalize (GObject *object) { SoupSession *session = SOUP_SESSION (object); - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); soup_message_queue_destroy (priv->queue); @@ -334,6 +334,7 @@ soup_session_finalize (GObject *object) g_free (priv->accept_language); g_clear_object (&priv->tlsdb); + g_clear_object (&priv->tls_interaction); g_free (priv->ssl_ca_file); g_clear_pointer (&priv->async_context, g_main_context_unref); @@ -350,9 +351,44 @@ soup_session_finalize (GObject *object) g_hash_table_destroy (priv->request_types); + g_clear_pointer (&priv->socket_props, soup_socket_properties_unref); + G_OBJECT_CLASS (soup_session_parent_class)->finalize (object); } +/* requires conn_lock */ +static void +ensure_socket_props (SoupSession *session) +{ + SoupSessionPrivate *priv = soup_session_get_instance_private (session); + gboolean ssl_strict; + + if (priv->socket_props) + return; + + if (priv->proxy_use_default) { + priv->proxy_resolver = g_object_ref (g_proxy_resolver_get_default ()); + priv->proxy_use_default = FALSE; + } + if (priv->tlsdb_use_default) { + priv->tlsdb = g_tls_backend_get_default_database (g_tls_backend_get_default ()); + priv->tlsdb_use_default = FALSE; + } + + ssl_strict = priv->ssl_strict && (priv->tlsdb != NULL || + SOUP_IS_PLAIN_SESSION (session)); + + priv->socket_props = soup_socket_properties_new (priv->async_context, + priv->use_thread_context, + priv->proxy_resolver, + priv->local_addr, + priv->tlsdb, + priv->tls_interaction, + ssl_strict, + priv->io_timeout, + priv->idle_timeout); +} + /* Converts a language in POSIX format and to be RFC2616 compliant */ /* Based on code from epiphany-webkit (ephy_langs_append_languages()) */ static gchar * @@ -395,7 +431,7 @@ accept_languages_from_system (void) GPtrArray *langs = NULL; char *lang, *langs_str; int delta; - int i; + guint i; lang_names = g_get_language_names (); g_return_val_if_fail (lang_names != NULL, NULL); @@ -436,7 +472,7 @@ accept_languages_from_system (void) static void set_tlsdb (SoupSession *session, GTlsDatabase *tlsdb) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); GTlsDatabase *system_default; priv->tlsdb_use_default = FALSE; @@ -472,7 +508,7 @@ set_tlsdb (SoupSession *session, GTlsDatabase *tlsdb) static void set_use_system_ca_file (SoupSession *session, gboolean use_system_ca_file) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); GTlsDatabase *system_default; priv->tlsdb_use_default = FALSE; @@ -490,7 +526,7 @@ set_use_system_ca_file (SoupSession *session, gboolean use_system_ca_file) static void set_ssl_ca_file (SoupSession *session, const char *ssl_ca_file) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); GTlsDatabase *tlsdb; GError *error = NULL; @@ -564,7 +600,7 @@ set_proxy_resolver (SoupSession *session, SoupURI *uri, SoupProxyURIResolver *soup_resolver, GProxyResolver *g_resolver) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); G_GNUC_BEGIN_IGNORE_DEPRECATIONS; soup_session_remove_feature_by_type (session, SOUP_TYPE_PROXY_URI_RESOLVER); @@ -577,7 +613,7 @@ set_proxy_resolver (SoupSession *session, SoupURI *uri, char *uri_string; priv->proxy_uri = soup_uri_copy (uri); - uri_string = soup_uri_to_string_internal (uri, FALSE, TRUE); + uri_string = soup_uri_to_string_internal (uri, FALSE, TRUE, TRUE); priv->proxy_resolver = g_simple_proxy_resolver_new (uri_string, NULL); g_free (uri_string); } else if (soup_resolver) { @@ -596,23 +632,27 @@ soup_session_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { SoupSession *session = SOUP_SESSION (object); - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); const char *user_agent; SoupSessionFeature *feature; GMainContext *async_context; + gboolean socket_props_changed = FALSE; switch (prop_id) { case PROP_LOCAL_ADDRESS: priv->local_addr = g_value_dup_object (value); + socket_props_changed = TRUE; break; case PROP_PROXY_URI: set_proxy_resolver (session, g_value_get_boxed (value), NULL, NULL); soup_session_abort (session); + socket_props_changed = TRUE; break; case PROP_PROXY_RESOLVER: set_proxy_resolver (session, NULL, NULL, g_value_get_object (value)); + socket_props_changed = TRUE; break; case PROP_MAX_CONNS: priv->max_conns = g_value_get_int (value); @@ -633,15 +673,23 @@ soup_session_set_property (GObject *object, guint prop_id, break; case PROP_SSL_CA_FILE: set_ssl_ca_file (session, g_value_get_string (value)); + socket_props_changed = TRUE; break; case PROP_SSL_USE_SYSTEM_CA_FILE: set_use_system_ca_file (session, g_value_get_boolean (value)); + socket_props_changed = TRUE; break; case PROP_TLS_DATABASE: set_tlsdb (session, g_value_get_object (value)); + socket_props_changed = TRUE; + break; + case PROP_TLS_INTERACTION: + priv->tls_interaction = g_value_dup_object (value); + socket_props_changed = TRUE; break; case PROP_SSL_STRICT: priv->ssl_strict = g_value_get_boolean (value); + socket_props_changed = TRUE; break; case PROP_ASYNC_CONTEXT: async_context = g_value_get_pointer (value); @@ -650,6 +698,7 @@ soup_session_set_property (GObject *object, guint prop_id, priv->async_context = async_context; if (priv->async_context) g_main_context_ref (priv->async_context); + socket_props_changed = TRUE; break; case PROP_USE_THREAD_CONTEXT: if (!g_value_get_boolean (value)) @@ -662,9 +711,11 @@ soup_session_set_property (GObject *object, guint prop_id, if (priv->async_context) g_main_context_ref (priv->async_context); } + socket_props_changed = TRUE; break; case PROP_TIMEOUT: priv->io_timeout = g_value_get_uint (value); + socket_props_changed = TRUE; break; case PROP_USER_AGENT: g_free (priv->user_agent); @@ -699,6 +750,7 @@ soup_session_set_property (GObject *object, guint prop_id, break; case PROP_IDLE_TIMEOUT: priv->idle_timeout = g_value_get_uint (value); + socket_props_changed = TRUE; break; case PROP_ADD_FEATURE: soup_session_add_feature (session, g_value_get_object (value)); @@ -719,30 +771,14 @@ soup_session_set_property (GObject *object, guint prop_id, G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } -} - -static GProxyResolver * -get_proxy_resolver (SoupSession *session) -{ - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); - - if (priv->proxy_use_default) { - priv->proxy_resolver = g_object_ref (g_proxy_resolver_get_default ()); - priv->proxy_use_default = FALSE; - } - return priv->proxy_resolver; -} -static GTlsDatabase * -get_tls_database (SoupSession *session) -{ - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); - - if (priv->tlsdb_use_default) { - priv->tlsdb = g_tls_backend_get_default_database (g_tls_backend_get_default ()); - priv->tlsdb_use_default = FALSE; + g_mutex_lock (&priv->conn_lock); + if (priv->socket_props && socket_props_changed) { + soup_socket_properties_unref (priv->socket_props); + priv->socket_props = NULL; + ensure_socket_props (session); } - return priv->tlsdb; + g_mutex_unlock (&priv->conn_lock); } static void @@ -750,7 +786,7 @@ soup_session_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { SoupSession *session = SOUP_SESSION (object); - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); SoupSessionFeature *feature; GTlsDatabase *tlsdb; @@ -762,7 +798,10 @@ soup_session_get_property (GObject *object, guint prop_id, g_value_set_boxed (value, priv->proxy_uri); break; case PROP_PROXY_RESOLVER: - g_value_set_object (value, get_proxy_resolver (session)); + g_mutex_lock (&priv->conn_lock); + ensure_socket_props (session); + g_mutex_unlock (&priv->conn_lock); + g_value_set_object (value, priv->proxy_resolver); break; case PROP_MAX_CONNS: g_value_set_int (value, priv->max_conns); @@ -782,11 +821,20 @@ soup_session_get_property (GObject *object, guint prop_id, break; case PROP_SSL_USE_SYSTEM_CA_FILE: tlsdb = g_tls_backend_get_default_database (g_tls_backend_get_default ()); - g_value_set_boolean (value, get_tls_database (session) == tlsdb); + g_mutex_lock (&priv->conn_lock); + ensure_socket_props (session); + g_mutex_unlock (&priv->conn_lock); + g_value_set_boolean (value, priv->tlsdb == tlsdb); g_clear_object (&tlsdb); break; case PROP_TLS_DATABASE: - g_value_set_object (value, get_tls_database (session)); + g_mutex_lock (&priv->conn_lock); + ensure_socket_props (session); + g_mutex_unlock (&priv->conn_lock); + g_value_set_object (value, priv->tlsdb); + break; + case PROP_TLS_INTERACTION: + g_value_set_object (value, priv->tls_interaction); break; case PROP_SSL_STRICT: g_value_set_boolean (value, priv->ssl_strict); @@ -876,8 +924,8 @@ soup_session_new_with_options (const char *optname1, * For a modern #SoupSession, this will always just return the * thread-default #GMainContext, and so is not especially useful. * - * Return value: (transfer none): @session's #GMainContext, which may - * be %NULL + * Return value: (nullable) (transfer none): @session's #GMainContext, + * which may be %NULL **/ GMainContext * soup_session_get_async_context (SoupSession *session) @@ -885,7 +933,7 @@ soup_session_get_async_context (SoupSession *session) SoupSessionPrivate *priv; g_return_val_if_fail (SOUP_IS_SESSION (session), NULL); - priv = SOUP_SESSION_GET_PRIVATE (session); + priv = soup_session_get_instance_private (session); if (priv->use_thread_context) return g_main_context_get_thread_default (); @@ -934,7 +982,7 @@ soup_session_host_new (SoupSession *session, SoupURI *uri) host->uri = soup_uri_copy_host (uri); if (host->uri->scheme != SOUP_URI_SCHEME_HTTP && host->uri->scheme != SOUP_URI_SCHEME_HTTPS) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); if (soup_uri_is_https (host->uri, priv->https_aliases)) host->uri->scheme = SOUP_URI_SCHEME_HTTPS; @@ -957,19 +1005,29 @@ soup_session_host_new (SoupSession *session, SoupURI *uri) static SoupSessionHost * get_host_for_uri (SoupSession *session, SoupURI *uri) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); SoupSessionHost *host; + gboolean https; + SoupURI *uri_tmp = NULL; - if (soup_uri_is_https (uri, priv->https_aliases)) + https = soup_uri_is_https (uri, priv->https_aliases); + if (https) host = g_hash_table_lookup (priv->https_hosts, uri); else host = g_hash_table_lookup (priv->http_hosts, uri); if (host) return host; + if (uri->scheme != SOUP_URI_SCHEME_HTTP && + uri->scheme != SOUP_URI_SCHEME_HTTPS) { + uri = uri_tmp = soup_uri_copy (uri); + uri->scheme = https ? SOUP_URI_SCHEME_HTTPS : SOUP_URI_SCHEME_HTTP; + } host = soup_session_host_new (session, uri); + if (uri_tmp) + soup_uri_free (uri_tmp); - if (soup_uri_is_https (uri, priv->https_aliases)) + if (https) g_hash_table_insert (priv->https_hosts, host->uri, host); else g_hash_table_insert (priv->http_hosts, host->uri, host); @@ -1056,7 +1114,7 @@ redirection_uri (SoupMessage *msg) gboolean soup_session_would_redirect (SoupSession *session, SoupMessage *msg) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); SoupURI *new_uri; /* It must have an appropriate status code and method */ @@ -1178,6 +1236,7 @@ soup_session_set_item_connection (SoupSession *session, } item->conn = conn; + item->conn_is_dedicated = FALSE; soup_message_set_connection (item->msg, conn); if (item->conn) { @@ -1208,7 +1267,7 @@ soup_session_append_queue_item (SoupSession *session, SoupMessage *msg, gboolean async, gboolean new_api, SoupSessionCallback callback, gpointer user_data) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); SoupMessageQueueItem *item; SoupSessionHost *host; @@ -1242,8 +1301,7 @@ soup_session_send_queue_item (SoupSession *session, SoupMessageQueueItem *item, SoupMessageCompletionFn completion_cb) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); - const char *conn_header; + SoupSessionPrivate *priv = soup_session_get_instance_private (session); if (priv->user_agent) { soup_message_headers_replace (item->msg->request_headers, @@ -1263,15 +1321,19 @@ soup_session_send_queue_item (SoupSession *session, * a short period of time, as we wouldn't need to establish * new connections. Keep alive is implicit for HTTP 1.1. */ - conn_header = soup_message_headers_get_list (item->msg->request_headers, "Connection"); - if (!conn_header || - (!soup_header_contains (conn_header, "Keep-Alive") && - !soup_header_contains (conn_header, "close"))) + if (!soup_message_headers_header_contains (item->msg->request_headers, + "Connection", "Keep-Alive") && + !soup_message_headers_header_contains (item->msg->request_headers, + "Connection", "close") && + !soup_message_headers_header_contains (item->msg->request_headers, + "Connection", "Upgrade")) { soup_message_headers_append (item->msg->request_headers, "Connection", "Keep-Alive"); + } g_signal_emit (session, signals[REQUEST_STARTED], 0, item->msg, soup_connection_get_socket (item->conn)); + soup_message_starting (item->msg); if (item->state == SOUP_MESSAGE_RUNNING) soup_connection_send_request (item->conn, item, completion_cb, item); } @@ -1280,7 +1342,7 @@ static gboolean soup_session_cleanup_connections (SoupSession *session, gboolean cleanup_idle) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); GSList *conns = NULL, *c; GHashTableIter iter; gpointer conn, host; @@ -1316,7 +1378,7 @@ static gboolean free_unused_host (gpointer user_data) { SoupSessionHost *host = (SoupSessionHost *) user_data; - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (host->session); + SoupSessionPrivate *priv = soup_session_get_instance_private (host->session); g_mutex_lock (&priv->conn_lock); @@ -1343,7 +1405,7 @@ free_unused_host (gpointer user_data) static void drop_connection (SoupSession *session, SoupSessionHost *host, SoupConnection *conn) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); /* Note: caller must hold conn_lock, and must remove @conn * from priv->conns itself. @@ -1365,9 +1427,6 @@ drop_connection (SoupSession *session, SoupSessionHost *host, SoupConnection *co host); host->keep_alive_src = g_source_ref (host->keep_alive_src); } - - if (soup_connection_get_ssl_fallback (conn)) - host->ssl_fallback = TRUE; } g_signal_handlers_disconnect_by_func (conn, connection_disconnected, session); @@ -1381,7 +1440,7 @@ static void connection_disconnected (SoupConnection *conn, gpointer user_data) { SoupSession *session = user_data; - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); SoupSessionHost *host; g_mutex_lock (&priv->conn_lock); @@ -1409,7 +1468,7 @@ connection_state_changed (GObject *object, GParamSpec *param, gpointer user_data SoupMessageQueue * soup_session_get_queue (SoupSession *session) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); return priv->queue; } @@ -1418,12 +1477,15 @@ static void soup_session_unqueue_item (SoupSession *session, SoupMessageQueueItem *item) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); SoupSessionHost *host; + SoupConnection *dedicated_conn = NULL; if (item->conn) { - if (item->msg->method != SOUP_METHOD_CONNECT || - !SOUP_STATUS_IS_SUCCESSFUL (item->msg->status_code)) + if (item->conn_is_dedicated) + dedicated_conn = g_object_ref (item->conn); + else if (item->msg->method != SOUP_METHOD_CONNECT || + !SOUP_STATUS_IS_SUCCESSFUL (item->msg->status_code)) soup_connection_set_state (item->conn, SOUP_CONNECTION_IDLE); soup_session_set_item_connection (session, item, NULL); } @@ -1438,9 +1500,21 @@ soup_session_unqueue_item (SoupSession *session, g_mutex_lock (&priv->conn_lock); host = get_host_for_message (session, item->msg); host->num_messages--; + if (dedicated_conn) { + /* FIXME: Do not drop the connection if current number of connections + * is no longer over the limits, just mark it as IDLE so it can be reused. + */ + g_hash_table_remove (priv->conns, dedicated_conn); + drop_connection (session, host, dedicated_conn); + } g_cond_broadcast (&priv->conn_cond); g_mutex_unlock (&priv->conn_lock); + if (dedicated_conn) { + soup_connection_disconnect (dedicated_conn); + g_object_unref (dedicated_conn); + } + /* g_signal_handlers_disconnect_by_func doesn't work if you * have a metamarshal, meaning it doesn't work with * soup_message_add_header_handler() @@ -1497,13 +1571,19 @@ soup_session_set_item_status (SoupSession *session, static void -message_completed (SoupMessage *msg, gpointer user_data) +message_completed (SoupMessage *msg, SoupMessageIOCompletion completion, gpointer user_data) { SoupMessageQueueItem *item = user_data; if (item->async) soup_session_kick_queue (item->session); + if (completion == SOUP_MESSAGE_IO_STOLEN) { + item->state = SOUP_MESSAGE_FINISHED; + soup_session_unqueue_item (item->session, item); + return; + } + if (item->state != SOUP_MESSAGE_RESTARTING) { item->state = SOUP_MESSAGE_FINISHING; @@ -1520,19 +1600,7 @@ status_from_connect_error (SoupMessageQueueItem *item, GError *error) if (!error) return SOUP_STATUS_OK; - if (g_error_matches (error, G_TLS_ERROR, G_TLS_ERROR_NOT_TLS)) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (item->session); - SoupSessionHost *host; - - g_mutex_lock (&priv->conn_lock); - host = get_host_for_message (item->session, item->msg); - if (!host->ssl_fallback) { - host->ssl_fallback = TRUE; - status = SOUP_STATUS_TRY_AGAIN; - } else - status = SOUP_STATUS_SSL_FAILED; - g_mutex_unlock (&priv->conn_lock); - } else if (error->domain == G_TLS_ERROR) + if (error->domain == G_TLS_ERROR) status = SOUP_STATUS_SSL_FAILED; else if (error->domain == G_RESOLVER_ERROR) status = SOUP_STATUS_CANT_RESOLVE; @@ -1603,7 +1671,8 @@ tunnel_handshake_complete (GObject *object, } static void -tunnel_message_completed (SoupMessage *msg, gpointer user_data) +tunnel_message_completed (SoupMessage *msg, SoupMessageIOCompletion completion, + gpointer user_data) { SoupMessageQueueItem *tunnel_item = user_data; SoupMessageQueueItem *item = tunnel_item->related; @@ -1723,17 +1792,17 @@ get_connection_for_host (SoupSession *session, SoupMessageQueueItem *item, SoupSessionHost *host, gboolean need_new_connection, - gboolean *try_cleanup) + gboolean ignore_connection_limits, + gboolean *try_cleanup, + gboolean *is_dedicated_connection) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); SoupConnection *conn; GSList *conns; - int num_pending = 0; - GProxyResolver *proxy_resolver; - GTlsDatabase *tlsdb; + guint num_pending = 0; if (priv->disposed) - return FALSE; + return NULL; if (item->conn) { g_return_val_if_fail (soup_connection_get_state (item->conn) != SOUP_CONNECTION_DISCONNECTED, FALSE); @@ -1753,37 +1822,39 @@ get_connection_for_host (SoupSession *session, /* Limit the number of pending connections; num_messages / 2 * is somewhat arbitrary... */ - if (num_pending > host->num_messages / 2) - return NULL; + if (num_pending > host->num_messages / 2) { + if (!ignore_connection_limits) + return NULL; + + *is_dedicated_connection = TRUE; + } if (host->num_conns >= priv->max_conns_per_host) { - if (need_new_connection) - *try_cleanup = TRUE; - return NULL; + if (!ignore_connection_limits) { + if (need_new_connection) + *try_cleanup = TRUE; + return NULL; + } + + *is_dedicated_connection = TRUE; } if (priv->num_conns >= priv->max_conns) { - *try_cleanup = TRUE; - return NULL; + if (!ignore_connection_limits) { + *try_cleanup = TRUE; + return NULL; + } + + *is_dedicated_connection = TRUE; } - proxy_resolver = get_proxy_resolver (session); - tlsdb = get_tls_database (session); - - conn = g_object_new ( - SOUP_TYPE_CONNECTION, - SOUP_CONNECTION_REMOTE_URI, host->uri, - SOUP_CONNECTION_PROXY_RESOLVER, proxy_resolver, - SOUP_CONNECTION_SSL, soup_uri_is_https (soup_message_get_uri (item->msg), priv->https_aliases), - SOUP_CONNECTION_SSL_CREDENTIALS, tlsdb, - SOUP_CONNECTION_SSL_STRICT, priv->ssl_strict && (tlsdb != NULL || SOUP_IS_PLAIN_SESSION (session)), - SOUP_CONNECTION_ASYNC_CONTEXT, priv->async_context, - SOUP_CONNECTION_USE_THREAD_CONTEXT, priv->use_thread_context, - SOUP_CONNECTION_TIMEOUT, priv->io_timeout, - SOUP_CONNECTION_IDLE_TIMEOUT, priv->idle_timeout, - SOUP_CONNECTION_SSL_FALLBACK, host->ssl_fallback, - SOUP_CONNECTION_LOCAL_ADDRESS, priv->local_addr, - NULL); + ensure_socket_props (session); + conn = g_object_new (SOUP_TYPE_CONNECTION, + SOUP_CONNECTION_REMOTE_URI, host->uri, + SOUP_CONNECTION_SSL, soup_uri_is_https (host->uri, priv->https_aliases), + SOUP_CONNECTION_SOCKET_PROPERTIES, priv->socket_props, + NULL); + g_signal_connect (conn, "disconnected", G_CALLBACK (connection_disconnected), session); @@ -1816,11 +1887,13 @@ static gboolean get_connection (SoupMessageQueueItem *item, gboolean *should_cleanup) { SoupSession *session = item->session; - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); SoupSessionHost *host; SoupConnection *conn = NULL; gboolean my_should_cleanup = FALSE; gboolean need_new_connection; + gboolean ignore_connection_limits; + gboolean is_dedicated_connection = FALSE; soup_session_cleanup_connections (session, FALSE); @@ -1828,13 +1901,17 @@ get_connection (SoupMessageQueueItem *item, gboolean *should_cleanup) (soup_message_get_flags (item->msg) & SOUP_MESSAGE_NEW_CONNECTION) || (!(soup_message_get_flags (item->msg) & SOUP_MESSAGE_IDEMPOTENT) && !SOUP_METHOD_IS_IDEMPOTENT (item->msg->method)); + ignore_connection_limits = + (soup_message_get_flags (item->msg) & SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS); g_mutex_lock (&priv->conn_lock); host = get_host_for_message (session, item->msg); while (TRUE) { conn = get_connection_for_host (session, item, host, need_new_connection, - &my_should_cleanup); + ignore_connection_limits, + &my_should_cleanup, + &is_dedicated_connection); if (conn || item->async) break; @@ -1858,6 +1935,7 @@ get_connection (SoupMessageQueueItem *item, gboolean *should_cleanup) } soup_session_set_item_connection (session, item, conn); + item->conn_is_dedicated = is_dedicated_connection; if (soup_connection_get_state (item->conn) != SOUP_CONNECTION_NEW) { item->state = SOUP_MESSAGE_READY; @@ -1908,6 +1986,11 @@ soup_session_process_queue_item (SoupSession *session, break; case SOUP_MESSAGE_READY: + if (item->connect_only) { + item->state = SOUP_MESSAGE_FINISHING; + break; + } + if (item->msg->status_code) { if (item->msg->status_code == SOUP_STATUS_TRY_AGAIN) { soup_message_cleanup_response (item->msg); @@ -1973,7 +2056,7 @@ soup_session_process_queue_item (SoupSession *session, static void async_run_queue (SoupSession *session) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); SoupMessageQueueItem *item; SoupMessage *msg; gboolean try_cleanup = TRUE, should_cleanup = FALSE; @@ -1991,9 +2074,11 @@ async_run_queue (SoupSession *session) if (msg->method == SOUP_METHOD_CONNECT) continue; - if (item->async_context != soup_session_get_async_context (session)) + if (!item->async || + item->async_context != soup_session_get_async_context (session)) continue; + item->async_pending = FALSE; soup_session_process_queue_item (session, item, &should_cleanup, TRUE); } @@ -2014,22 +2099,25 @@ async_run_queue (SoupSession *session) static gboolean idle_run_queue (gpointer user_data) { - SoupSessionPrivate *priv = user_data; - GSource *source; + GWeakRef *wref = user_data; + SoupSession *session; - if (priv->disposed) + session = g_weak_ref_get (wref); + if (!session) return FALSE; - source = g_main_current_source (); - priv->run_queue_sources = g_slist_remove (priv->run_queue_sources, source); + async_run_queue (session); + g_object_unref (session); + return FALSE; +} - /* Ensure that the source is destroyed before running the queue */ - g_source_destroy (source); - g_source_unref (source); +static void +idle_run_queue_dnotify (gpointer user_data) +{ + GWeakRef *wref = user_data; - g_assert (priv->session); - async_run_queue (priv->session); - return FALSE; + g_weak_ref_clear (wref); + g_slice_free (GWeakRef, wref); } /** @@ -2101,7 +2189,7 @@ soup_session_queue_message (SoupSession *session, SoupMessage *msg, static void soup_session_real_requeue_message (SoupSession *session, SoupMessage *msg) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); SoupMessageQueueItem *item; item = soup_message_queue_lookup (priv->queue, msg); @@ -2206,7 +2294,7 @@ soup_session_pause_message (SoupSession *session, g_return_if_fail (SOUP_IS_SESSION (session)); g_return_if_fail (SOUP_IS_MESSAGE (msg)); - priv = SOUP_SESSION_GET_PRIVATE (session); + priv = soup_session_get_instance_private (session); item = soup_message_queue_lookup (priv->queue, msg); g_return_if_fail (item != NULL); g_return_if_fail (item->async); @@ -2220,34 +2308,37 @@ soup_session_pause_message (SoupSession *session, static void soup_session_real_kick_queue (SoupSession *session) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); SoupMessageQueueItem *item; + GHashTable *async_pending; gboolean have_sync_items = FALSE; if (priv->disposed) return; + async_pending = g_hash_table_new (NULL, NULL); for (item = soup_message_queue_first (priv->queue); item; item = soup_message_queue_next (priv->queue, item)) { if (item->async) { - GSource *source; - - /* We use priv rather than session as the - * source data, because other parts of libsoup - * (or the calling app) may have sources using - * the session as the source data. - */ - source = g_main_context_find_source_by_user_data (item->async_context, priv); - if (!source) { - source = soup_add_completion_reffed (item->async_context, - idle_run_queue, priv); - priv->run_queue_sources = g_slist_prepend (priv->run_queue_sources, - source); + GMainContext *context = item->async_context ? item->async_context : g_main_context_default (); + + if (!g_hash_table_contains (async_pending, context)) { + if (!item->async_pending) { + GWeakRef *wref = g_slice_new (GWeakRef); + GSource *source; + + g_weak_ref_init (wref, session); + source = soup_add_completion_reffed (context, idle_run_queue, wref, idle_run_queue_dnotify); + g_source_unref (source); + } + g_hash_table_add (async_pending, context); } + item->async_pending = TRUE; } else have_sync_items = TRUE; } + g_hash_table_unref (async_pending); if (have_sync_items) { g_mutex_lock (&priv->conn_lock); @@ -2287,7 +2378,7 @@ soup_session_unpause_message (SoupSession *session, g_return_if_fail (SOUP_IS_SESSION (session)); g_return_if_fail (SOUP_IS_MESSAGE (msg)); - priv = SOUP_SESSION_GET_PRIVATE (session); + priv = soup_session_get_instance_private (session); item = soup_message_queue_lookup (priv->queue, msg); g_return_if_fail (item != NULL); g_return_if_fail (item->async); @@ -2304,13 +2395,19 @@ soup_session_unpause_message (SoupSession *session, static void soup_session_real_cancel_message (SoupSession *session, SoupMessage *msg, guint status_code) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); SoupMessageQueueItem *item; item = soup_message_queue_lookup (priv->queue, msg); g_return_if_fail (item != NULL); - item->paused = FALSE; + if (item->paused) { + item->paused = FALSE; + + if (soup_message_io_in_progress (msg)) + soup_message_io_unpause (msg); + } + soup_message_set_status (msg, status_code); g_cancellable_cancel (item->cancellable); @@ -2358,7 +2455,7 @@ soup_session_cancel_message (SoupSession *session, SoupMessage *msg, g_return_if_fail (SOUP_IS_SESSION (session)); g_return_if_fail (SOUP_IS_MESSAGE (msg)); - priv = SOUP_SESSION_GET_PRIVATE (session); + priv = soup_session_get_instance_private (session); item = soup_message_queue_lookup (priv->queue, msg); /* If the message is already ending, don't do anything */ if (!item) @@ -2375,7 +2472,7 @@ soup_session_cancel_message (SoupSession *session, SoupMessage *msg, static void soup_session_real_flush_queue (SoupSession *session) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv = soup_session_get_instance_private (session); SoupMessageQueueItem *item; GHashTable *current = NULL; gboolean done = FALSE; @@ -2447,18 +2544,24 @@ soup_session_abort (SoupSession *session) gpointer conn, host; g_return_if_fail (SOUP_IS_SESSION (session)); - priv = SOUP_SESSION_GET_PRIVATE (session); + priv = soup_session_get_instance_private (session); SOUP_SESSION_GET_CLASS (session)->flush_queue (session); - /* Close all connections */ + /* Close all idle connections */ g_mutex_lock (&priv->conn_lock); conns = NULL; g_hash_table_iter_init (&iter, priv->conns); while (g_hash_table_iter_next (&iter, &conn, &host)) { - conns = g_slist_prepend (conns, g_object_ref (conn)); - g_hash_table_iter_remove (&iter); - drop_connection (session, host, conn); + SoupConnectionState state; + + state = soup_connection_get_state (conn); + if (state == SOUP_CONNECTION_IDLE || + state == SOUP_CONNECTION_REMOTE_DISCONNECTED) { + conns = g_slist_prepend (conns, g_object_ref (conn)); + g_hash_table_iter_remove (&iter); + drop_connection (session, host, conn); + } } g_mutex_unlock (&priv->conn_lock); @@ -2479,7 +2582,7 @@ prefetch_uri (SoupSession *session, SoupURI *uri, SoupSessionHost *host; SoupAddress *addr; - priv = SOUP_SESSION_GET_PRIVATE (session); + priv = soup_session_get_instance_private (session); g_mutex_lock (&priv->conn_lock); host = get_host_for_uri (session, uri); @@ -2567,8 +2670,8 @@ soup_session_prefetch_dns (SoupSession *session, const char *hostname, * feature to the session at construct time by using the * %SOUP_SESSION_ADD_FEATURE property. * - * Note that a #SoupContentDecoder is added to the session by default - * (unless you are using one of the deprecated session subclasses). + * See the main #SoupSession documentation for information on what + * features are present in sessions by default. * * Since: 2.24 **/ @@ -2580,7 +2683,7 @@ soup_session_add_feature (SoupSession *session, SoupSessionFeature *feature) g_return_if_fail (SOUP_IS_SESSION (session)); g_return_if_fail (SOUP_IS_SESSION_FEATURE (feature)); - priv = SOUP_SESSION_GET_PRIVATE (session); + priv = soup_session_get_instance_private (session); G_GNUC_BEGIN_IGNORE_DEPRECATIONS; if (SOUP_IS_PROXY_URI_RESOLVER (feature)) { @@ -2613,8 +2716,8 @@ soup_session_add_feature (SoupSession *session, SoupSessionFeature *feature) * You can also add a feature to the session at construct time by * using the %SOUP_SESSION_ADD_FEATURE_BY_TYPE property. * - * Note that a #SoupContentDecoder is added to the session by default - * (unless you are using one of the deprecated session subclasses). + * See the main #SoupSession documentation for information on what + * features are present in sessions by default. * * Since: 2.24 **/ @@ -2625,7 +2728,7 @@ soup_session_add_feature_by_type (SoupSession *session, GType feature_type) g_return_if_fail (SOUP_IS_SESSION (session)); - priv = SOUP_SESSION_GET_PRIVATE (session); + priv = soup_session_get_instance_private (session); if (g_type_is_a (feature_type, SOUP_TYPE_SESSION_FEATURE)) { SoupSessionFeature *feature; @@ -2670,7 +2773,7 @@ soup_session_remove_feature (SoupSession *session, SoupSessionFeature *feature) g_return_if_fail (SOUP_IS_SESSION (session)); - priv = SOUP_SESSION_GET_PRIVATE (session); + priv = soup_session_get_instance_private (session); if (g_slist_find (priv->features, feature)) { priv->features = g_slist_remove (priv->features, feature); g_hash_table_remove_all (priv->features_cache); @@ -2708,7 +2811,7 @@ soup_session_remove_feature_by_type (SoupSession *session, GType feature_type) g_return_if_fail (SOUP_IS_SESSION (session)); - priv = SOUP_SESSION_GET_PRIVATE (session); + priv = soup_session_get_instance_private (session); if (g_type_is_a (feature_type, SOUP_TYPE_SESSION_FEATURE)) { restart: @@ -2721,7 +2824,7 @@ soup_session_remove_feature_by_type (SoupSession *session, GType feature_type) G_GNUC_BEGIN_IGNORE_DEPRECATIONS; if (g_type_is_a (feature_type, SOUP_TYPE_PROXY_URI_RESOLVER)) priv->proxy_use_default = FALSE; - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + G_GNUC_END_IGNORE_DEPRECATIONS; } else if (g_type_is_a (feature_type, SOUP_TYPE_REQUEST)) { SoupRequestClass *request_class; int i; @@ -2765,7 +2868,7 @@ soup_session_has_feature (SoupSession *session, g_return_val_if_fail (SOUP_IS_SESSION (session), FALSE); - priv = SOUP_SESSION_GET_PRIVATE (session); + priv = soup_session_get_instance_private (session); if (g_type_is_a (feature_type, SOUP_TYPE_SESSION_FEATURE)) { for (f = priv->features; f; f = f->next) { @@ -2807,7 +2910,7 @@ soup_session_get_features (SoupSession *session, GType feature_type) g_return_val_if_fail (SOUP_IS_SESSION (session), NULL); - priv = SOUP_SESSION_GET_PRIVATE (session); + priv = soup_session_get_instance_private (session); for (f = priv->features, ret = NULL; f; f = f->next) { if (G_TYPE_CHECK_INSTANCE_TYPE (f->data, feature_type)) ret = g_slist_prepend (ret, f->data); @@ -2824,8 +2927,8 @@ soup_session_get_features (SoupSession *session, GType feature_type) * features where there may be more than one feature of a given type, * use soup_session_get_features(). * - * Return value: (transfer none): a #SoupSessionFeature, or %NULL. The - * feature is owned by @session. + * Return value: (nullable) (transfer none): a #SoupSessionFeature, or + * %NULL. The feature is owned by @session. * * Since: 2.26 **/ @@ -2838,7 +2941,7 @@ soup_session_get_feature (SoupSession *session, GType feature_type) g_return_val_if_fail (SOUP_IS_SESSION (session), NULL); - priv = SOUP_SESSION_GET_PRIVATE (session); + priv = soup_session_get_instance_private (session); feature = g_hash_table_lookup (priv->features_cache, GSIZE_TO_POINTER (feature_type)); @@ -2871,7 +2974,7 @@ soup_session_get_feature (SoupSession *session, GType feature_type) * disabled on @msg, and the second is not, then this will return * %NULL, not the second feature. * - * Return value: (transfer none): a #SoupSessionFeature, or %NULL. The + * Return value: (nullable) (transfer none): a #SoupSessionFeature, or %NULL. The * feature is owned by @session. * * Since: 2.28 @@ -2893,8 +2996,6 @@ soup_session_class_init (SoupSessionClass *session_class) { GObjectClass *object_class = G_OBJECT_CLASS (session_class); - g_type_class_add_private (session_class, sizeof (SoupSessionPrivate)); - /* virtual method definition */ session_class->queue_message = soup_session_real_queue_message; session_class->send_message = soup_session_real_send_message; @@ -2974,6 +3075,8 @@ soup_session_class_init (SoupSessionClass *session_class) * Emitted just before a request is sent. See * #SoupSession::request_queued for a detailed description of * the message lifecycle within a session. + * + * Deprecated: 2.50. Use #SoupMessage::starting instead. **/ signals[REQUEST_STARTED] = g_signal_new ("request-started", @@ -3711,6 +3814,30 @@ soup_session_class_init (SoupSessionClass *session_class) "Address of local end of socket", SOUP_TYPE_ADDRESS, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * SOUP_SESSION_TLS_INTERACTION: + * + * Alias for the #SoupSession:tls-interaction property, qv. + * + * Since: 2.48 + **/ + /** + * SoupSession:tls-interaction: + * + * A #GTlsInteraction object that will be passed on to any + * #GTlsConnections created by the session. (This can be used to + * provide client-side certificates, for example.) + * + * Since: 2.48 + **/ + g_object_class_install_property ( + object_class, PROP_TLS_INTERACTION, + g_param_spec_object (SOUP_SESSION_TLS_INTERACTION, + "TLS Interaction", + "TLS interaction to use", + G_TYPE_TLS_INTERACTION, + G_PARAM_READWRITE)); } @@ -3938,6 +4065,17 @@ async_send_request_running (SoupSession *session, SoupMessageQueueItem *item) try_run_until_read (item); } +static void +cache_stream_finished (GInputStream *stream, + SoupMessageQueueItem *item) +{ + g_signal_handlers_disconnect_matched (stream, G_SIGNAL_MATCH_DATA, + 0, 0, NULL, NULL, item); + item->state = SOUP_MESSAGE_FINISHING; + soup_session_kick_queue (item->session); + soup_message_queue_item_unref (item); +} + static void async_return_from_cache (SoupMessageQueueItem *item, GInputStream *stream) @@ -3953,7 +4091,10 @@ async_return_from_cache (SoupMessageQueueItem *item, g_hash_table_unref (params); } - item->state = SOUP_MESSAGE_FINISHING; + soup_message_queue_item_ref (item); + g_signal_connect (stream, "eof", G_CALLBACK (cache_stream_finished), item); + g_signal_connect (stream, "closed", G_CALLBACK (cache_stream_finished), item); + async_send_request_return_result (item, g_object_ref (stream), NULL); } @@ -4390,7 +4531,7 @@ soup_session_request (SoupSession *session, const char *uri_string, if (!uri) { g_set_error (error, SOUP_REQUEST_ERROR, SOUP_REQUEST_ERROR_BAD_URI, - _("Could not parse URI '%s'"), uri_string); + _("Could not parse URI “%s”"), uri_string); return NULL; } @@ -4421,13 +4562,13 @@ soup_session_request_uri (SoupSession *session, SoupURI *uri, g_return_val_if_fail (SOUP_IS_SESSION (session), NULL); - priv = SOUP_SESSION_GET_PRIVATE (session); + priv = soup_session_get_instance_private (session); request_type = (GType)GPOINTER_TO_SIZE (g_hash_table_lookup (priv->request_types, uri->scheme)); if (!request_type) { g_set_error (error, SOUP_REQUEST_ERROR, SOUP_REQUEST_ERROR_UNSUPPORTED_URI_SCHEME, - _("Unsupported URI scheme '%s'"), uri->scheme); + _("Unsupported URI scheme “%s”"), uri->scheme); return NULL; } @@ -4556,3 +4697,368 @@ soup_request_error_quark (void) error = g_quark_from_static_string ("soup_request_error_quark"); return error; } + +static GIOStream * +steal_connection (SoupSession *session, + SoupMessageQueueItem *item) +{ + SoupSessionPrivate *priv = soup_session_get_instance_private (session); + SoupConnection *conn; + SoupSocket *sock; + SoupSessionHost *host; + GIOStream *stream; + + conn = g_object_ref (item->conn); + soup_session_set_item_connection (session, item, NULL); + + g_mutex_lock (&priv->conn_lock); + host = get_host_for_message (session, item->msg); + g_hash_table_remove (priv->conns, conn); + drop_connection (session, host, conn); + g_mutex_unlock (&priv->conn_lock); + + sock = soup_connection_get_socket (conn); + g_object_set (sock, + SOUP_SOCKET_TIMEOUT, 0, + NULL); + + if (item->connect_only) + stream = g_object_ref (soup_socket_get_connection (sock)); + else + stream = soup_message_io_steal (item->msg); + g_object_set_data_full (G_OBJECT (stream), "GSocket", + soup_socket_steal_gsocket (sock), + g_object_unref); + g_object_unref (conn); + + return stream; +} + +/** + * soup_session_steal_connection: + * @session: a #SoupSession + * @msg: the message whose connection is to be stolen + * + * "Steals" the HTTP connection associated with @msg from @session. + * This happens immediately, regardless of the current state of the + * connection, and @msg's callback will not be called. You can steal + * the connection from a #SoupMessage signal handler if you need to + * wait for part or all of the response to be received first. + * + * Calling this function may cause @msg to be freed if you are not + * holding any other reference to it. + * + * Return value: (transfer full): the #GIOStream formerly associated + * with @msg (or %NULL if @msg was no longer associated with a + * connection). No guarantees are made about what kind of #GIOStream + * is returned. + * + * Since: 2.50 + **/ +GIOStream * +soup_session_steal_connection (SoupSession *session, + SoupMessage *msg) +{ + SoupSessionPrivate *priv = soup_session_get_instance_private (session); + SoupMessageQueueItem *item; + GIOStream *stream = NULL; + + item = soup_message_queue_lookup (priv->queue, msg); + if (!item) + return NULL; + + if (item->conn && soup_connection_get_state (item->conn) == SOUP_CONNECTION_IN_USE) + stream = steal_connection (session, item); + + soup_message_queue_item_unref (item); + + return stream; +} + +static void websocket_connect_async_stop (SoupMessage *msg, gpointer user_data); + +static void +websocket_connect_async_complete (SoupSession *session, SoupMessage *msg, gpointer user_data) +{ + GTask *task = user_data; + + /* Disconnect websocket_connect_async_stop() handler. */ + g_signal_handlers_disconnect_matched (msg, G_SIGNAL_MATCH_DATA, + 0, 0, NULL, NULL, task); + + g_task_return_new_error (task, + SOUP_WEBSOCKET_ERROR, SOUP_WEBSOCKET_ERROR_NOT_WEBSOCKET, + "%s", _("The server did not accept the WebSocket handshake.")); + g_object_unref (task); +} + +static void +websocket_connect_async_stop (SoupMessage *msg, gpointer user_data) +{ + GTask *task = user_data; + SoupMessageQueueItem *item = g_task_get_task_data (task); + GIOStream *stream; + SoupWebsocketConnection *client; + GError *error = NULL; + + /* Disconnect websocket_connect_async_stop() handler. */ + g_signal_handlers_disconnect_matched (msg, G_SIGNAL_MATCH_DATA, + 0, 0, NULL, NULL, task); + + if (soup_websocket_client_verify_handshake (item->msg, &error)){ + stream = soup_session_steal_connection (item->session, item->msg); + client = soup_websocket_connection_new (stream, + soup_message_get_uri (item->msg), + SOUP_WEBSOCKET_CONNECTION_CLIENT, + soup_message_headers_get_one (msg->request_headers, "Origin"), + soup_message_headers_get_one (msg->response_headers, "Sec-WebSocket-Protocol")); + g_object_unref (stream); + + g_task_return_pointer (task, client, g_object_unref); + } else + g_task_return_error (task, error); + g_object_unref (task); +} + +/** + * soup_session_websocket_connect_async: + * @session: a #SoupSession + * @msg: #SoupMessage indicating the WebSocket server to connect to + * @origin: (allow-none): origin of the connection + * @protocols: (allow-none) (array zero-terminated=1): a + * %NULL-terminated array of protocols supported + * @cancellable: a #GCancellable + * @callback: the callback to invoke + * @user_data: data for @callback + * + * Asynchronously creates a #SoupWebsocketConnection to communicate + * with a remote server. + * + * All necessary WebSocket-related headers will be added to @msg, and + * it will then be sent and asynchronously processed normally + * (including handling of redirection and HTTP authentication). + * + * If the server returns "101 Switching Protocols", then @msg's status + * code and response headers will be updated, and then the WebSocket + * handshake will be completed. On success, + * soup_session_websocket_connect_finish() will return a new + * #SoupWebsocketConnection. On failure it will return a #GError. + * + * If the server returns a status other than "101 Switching + * Protocols", then @msg will contain the complete response headers + * and body from the server's response, and + * soup_session_websocket_connect_finish() will return + * %SOUP_WEBSOCKET_ERROR_NOT_WEBSOCKET. + * + * Since: 2.50 + */ +void +soup_session_websocket_connect_async (SoupSession *session, + SoupMessage *msg, + const char *origin, + char **protocols, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + SoupSessionPrivate *priv = soup_session_get_instance_private (session); + SoupMessageQueueItem *item; + GTask *task; + + g_return_if_fail (SOUP_IS_SESSION (session)); + g_return_if_fail (priv->use_thread_context); + g_return_if_fail (SOUP_IS_MESSAGE (msg)); + + soup_websocket_client_prepare_handshake (msg, origin, protocols); + + task = g_task_new (session, cancellable, callback, user_data); + item = soup_session_append_queue_item (session, msg, TRUE, FALSE, + websocket_connect_async_complete, task); + g_task_set_task_data (task, item, (GDestroyNotify) soup_message_queue_item_unref); + + soup_message_add_status_code_handler (msg, "got-informational", + SOUP_STATUS_SWITCHING_PROTOCOLS, + G_CALLBACK (websocket_connect_async_stop), task); + soup_session_kick_queue (session); +} + +/** + * soup_session_websocket_connect_finish: + * @session: a #SoupSession + * @result: the #GAsyncResult passed to your callback + * @error: return location for a #GError, or %NULL + * + * Gets the #SoupWebsocketConnection response to a + * soup_session_websocket_connect_async() call and (if successful), + * returns a #SoupWebsocketConnection that can be used to communicate + * with the server. + * + * Return value: (transfer full): a new #SoupWebsocketConnection, or + * %NULL on error. + * + * Since: 2.50 + */ +SoupWebsocketConnection * +soup_session_websocket_connect_finish (SoupSession *session, + GAsyncResult *result, + GError **error) +{ + g_return_val_if_fail (SOUP_IS_SESSION (session), NULL); + g_return_val_if_fail (g_task_is_valid (result, session), NULL); + + return g_task_propagate_pointer (G_TASK (result), error); +} + +/** + * SoupSessionConnectProgressCallback: + * @session: the #SoupSession + * @event: a #GSocketClientEvent + * @connection: the current state of the network connection + * @user_data: the data passed to soup_session_connect_async(). + * + * Prototype for the progress callback passed to soup_session_connect_async(). + * + * Since: 2.62 + */ + +typedef struct { + SoupMessageQueueItem *item; + SoupSessionConnectProgressCallback progress_callback; + gpointer user_data; +} ConnectAsyncData; + +static ConnectAsyncData * +connect_async_data_new (SoupMessageQueueItem *item, + SoupSessionConnectProgressCallback progress_callback, + gpointer user_data) +{ + ConnectAsyncData *data; + + soup_message_queue_item_ref (item); + + data = g_slice_new (ConnectAsyncData); + data->item = item; + data->progress_callback = progress_callback; + data->user_data = user_data; + + return data; +} + +static void +connect_async_data_free (ConnectAsyncData *data) +{ + soup_message_queue_item_unref (data->item); + + g_slice_free (ConnectAsyncData, data); +} + +static void +connect_async_message_network_event (SoupMessage *msg, + GSocketClientEvent event, + GIOStream *connection, + GTask *task) +{ + ConnectAsyncData *data = g_task_get_task_data (task); + + if (data->progress_callback) + data->progress_callback (data->item->session, event, connection, data->user_data); +} + +static void +connect_async_message_finished (SoupMessage *msg, + GTask *task) +{ + ConnectAsyncData *data = g_task_get_task_data (task); + SoupMessageQueueItem *item = data->item; + + if (!item->conn || item->error) { + g_task_return_error (task, g_error_copy (item->error)); + } else { + g_task_return_pointer (task, + steal_connection (item->session, item), + g_object_unref); + } + g_object_unref (task); +} + +/** + * soup_session_connect_async: + * @session: a #SoupSession + * @uri: a #SoupURI to connect to + * @cancellable: a #GCancellable + * @progress_callback: (allow-none) (scope async): a #SoupSessionConnectProgressCallback which + * will be called for every network event that occurs during the connection. + * @callback: (allow-none) (scope async): the callback to invoke when the operation finishes + * @user_data: data for @progress_callback and @callback + * + * Start a connection to @uri. The operation can be monitored by providing a @progress_callback + * and finishes when the connection is done or an error ocurred. + * + * Call soup_session_connect_finish() to get the #GIOStream to communicate with the server. + * + * Since: 2.62 + */ +void +soup_session_connect_async (SoupSession *session, + SoupURI *uri, + GCancellable *cancellable, + SoupSessionConnectProgressCallback progress_callback, + GAsyncReadyCallback callback, + gpointer user_data) +{ + SoupSessionPrivate *priv; + SoupMessage *msg; + SoupMessageQueueItem *item; + ConnectAsyncData *data; + GTask *task; + + g_return_if_fail (SOUP_IS_SESSION (session)); + g_return_if_fail (!SOUP_IS_SESSION_SYNC (session)); + priv = soup_session_get_instance_private (session); + g_return_if_fail (priv->use_thread_context); + g_return_if_fail (uri != NULL); + + task = g_task_new (session, cancellable, callback, user_data); + + msg = soup_message_new_from_uri (SOUP_METHOD_HEAD, uri); + soup_message_set_flags (msg, SOUP_MESSAGE_NEW_CONNECTION); + g_signal_connect_object (msg, "finished", + G_CALLBACK (connect_async_message_finished), + task, 0); + if (progress_callback) { + g_signal_connect_object (msg, "network-event", + G_CALLBACK (connect_async_message_network_event), + task, 0); + } + + item = soup_session_append_queue_item (session, msg, TRUE, FALSE, NULL, NULL); + item->connect_only = TRUE; + data = connect_async_data_new (item, progress_callback, user_data); + g_task_set_task_data (task, data, (GDestroyNotify) connect_async_data_free); + soup_session_kick_queue (session); + soup_message_queue_item_unref (item); + g_object_unref (msg); +} + +/** + * soup_session_connect_finish: + * @session: a #SoupSession + * @result: the #GAsyncResult passed to your callback + * @error: return location for a #GError, or %NULL + * + * Gets the #GIOStream created for the connection to communicate with the server. + * + * Return value: (transfer full): a new #GIOStream, or %NULL on error. + * + * Since: 2.62 + */ +GIOStream * +soup_session_connect_finish (SoupSession *session, + GAsyncResult *result, + GError **error) +{ + g_return_val_if_fail (SOUP_IS_SESSION (session), NULL); + g_return_val_if_fail (g_task_is_valid (result, session), NULL); + + return g_task_propagate_pointer (G_TASK (result), error); +} diff --git a/libsoup/soup-session.h b/libsoup/soup-session.h index 67a59eaa..24e90b29 100644 --- a/libsoup/soup-session.h +++ b/libsoup/soup-session.h @@ -9,6 +9,7 @@ #include #include #include +#include G_BEGIN_DECLS @@ -58,6 +59,7 @@ typedef struct { void (*_libsoup_reserved4) (void); } SoupSessionClass; +SOUP_AVAILABLE_IN_2_42 GType soup_session_get_type (void); #define SOUP_SESSION_LOCAL_ADDRESS "local-address" @@ -70,6 +72,7 @@ GType soup_session_get_type (void); #define SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE "ssl-use-system-ca-file" #define SOUP_SESSION_TLS_DATABASE "tls-database" #define SOUP_SESSION_SSL_STRICT "ssl-strict" +#define SOUP_SESSION_TLS_INTERACTION "tls-interaction" #define SOUP_SESSION_ASYNC_CONTEXT "async-context" #define SOUP_SESSION_USE_THREAD_CONTEXT "use-thread-context" #define SOUP_SESSION_TIMEOUT "timeout" @@ -90,26 +93,34 @@ SOUP_AVAILABLE_IN_2_42 SoupSession *soup_session_new_with_options (const char *optname1, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 void soup_session_queue_message (SoupSession *session, SoupMessage *msg, SoupSessionCallback callback, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 void soup_session_requeue_message (SoupSession *session, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 guint soup_session_send_message (SoupSession *session, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_session_pause_message (SoupSession *session, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_session_unpause_message (SoupSession *session, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_session_cancel_message (SoupSession *session, SoupMessage *msg, guint status_code); +SOUP_AVAILABLE_IN_2_4 void soup_session_abort (SoupSession *session); +SOUP_AVAILABLE_IN_2_4 GMainContext *soup_session_get_async_context(SoupSession *session); SOUP_AVAILABLE_IN_2_42 @@ -129,7 +140,7 @@ GInputStream *soup_session_send (SoupSession *session, GError **error); #ifndef SOUP_DISABLE_DEPRECATED -/* SOUP_AVAILABLE_IN_2_30 -- this trips up gtkdoc-scan */ +SOUP_AVAILABLE_IN_2_30 SOUP_DEPRECATED_IN_2_38_FOR (soup_session_prefetch_dns) void soup_session_prepare_for_uri (SoupSession *session, SoupURI *uri); @@ -205,6 +216,42 @@ typedef enum { SOUP_REQUEST_ERROR_ENCODING } SoupRequestError; +SOUP_AVAILABLE_IN_2_50 +GIOStream *soup_session_steal_connection (SoupSession *session, + SoupMessage *msg); + +SOUP_AVAILABLE_IN_2_50 +void soup_session_websocket_connect_async (SoupSession *session, + SoupMessage *msg, + const char *origin, + char **protocols, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +SOUP_AVAILABLE_IN_2_50 +SoupWebsocketConnection *soup_session_websocket_connect_finish (SoupSession *session, + GAsyncResult *result, + GError **error); + +typedef void (*SoupSessionConnectProgressCallback) (SoupSession *session, + GSocketClientEvent event, + GIOStream *connection, + gpointer user_data); + +SOUP_AVAILABLE_IN_2_62 +void soup_session_connect_async (SoupSession *session, + SoupURI *uri, + GCancellable *cancellable, + SoupSessionConnectProgressCallback progress_callback, + GAsyncReadyCallback callback, + gpointer user_data); + +SOUP_AVAILABLE_IN_2_62 +GIOStream *soup_session_connect_finish (SoupSession *session, + GAsyncResult *result, + GError **error); + G_END_DECLS #endif /* SOUP_SESSION_H */ diff --git a/libsoup/soup-socket-private.h b/libsoup/soup-socket-private.h new file mode 100644 index 00000000..8677884b --- /dev/null +++ b/libsoup/soup-socket-private.h @@ -0,0 +1,91 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Copyright 2011-2014 Red Hat, Inc. + */ + +#ifndef SOUP_SOCKET_PRIVATE_H +#define SOUP_SOCKET_PRIVATE_H 1 + +#include "soup-socket.h" + +#define SOUP_SOCKET_SOCKET_PROPERTIES "socket-properties" +#define SOUP_SOCKET_FD "fd" +#define SOUP_SOCKET_GSOCKET "gsocket" +#define SOUP_SOCKET_IOSTREAM "iostream" +#define SOUP_SOCKET_IPV6_ONLY "ipv6-only" + +gboolean soup_socket_connect_sync_internal (SoupSocket *sock, + GCancellable *cancellable, + GError **error); +void soup_socket_connect_async_internal (SoupSocket *sock, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean soup_socket_connect_finish_internal (SoupSocket *sock, + GAsyncResult *result, + GError **error); + +gboolean soup_socket_handshake_sync (SoupSocket *sock, + const char *host, + GCancellable *cancellable, + GError **error); +void soup_socket_handshake_async (SoupSocket *sock, + const char *host, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean soup_socket_handshake_finish (SoupSocket *sock, + GAsyncResult *result, + GError **error); + +gboolean soup_socket_is_readable (SoupSocket *sock); +GSocket *soup_socket_get_gsocket (SoupSocket *sock); +GSocket *soup_socket_steal_gsocket (SoupSocket *sock); +GIOStream *soup_socket_get_connection (SoupSocket *sock); +GIOStream *soup_socket_get_iostream (SoupSocket *sock); + +SoupURI *soup_socket_get_http_proxy_uri (SoupSocket *sock); + +gboolean soup_socket_listen_full (SoupSocket *sock, + GError **error); + + + +typedef struct { + GMainContext *async_context; + gboolean use_thread_context; + + GProxyResolver *proxy_resolver; + SoupAddress *local_addr; + + GTlsDatabase *tlsdb; + GTlsInteraction *tls_interaction; + gboolean ssl_strict; + + guint io_timeout; + guint idle_timeout; + + /*< private >*/ + guint ref_count; +} SoupSocketProperties; + +GType soup_socket_properties_get_type (void); +#define SOUP_TYPE_SOCKET_PROPERTIES (soup_socket_properties_get_type ()) + +SoupSocketProperties *soup_socket_properties_new (GMainContext *async_context, + gboolean use_thread_context, + GProxyResolver *proxy_resolver, + SoupAddress *local_addr, + GTlsDatabase *tlsdb, + GTlsInteraction *tls_interaction, + gboolean ssl_strict, + guint io_timeout, + guint idle_timeout); + +SoupSocketProperties *soup_socket_properties_ref (SoupSocketProperties *props); +void soup_socket_properties_unref (SoupSocketProperties *props); + +void soup_socket_properties_push_async_context (SoupSocketProperties *props); +void soup_socket_properties_pop_async_context (SoupSocketProperties *props); + +#endif /* SOUP_SOCKET_PRIVATE_H */ diff --git a/libsoup/soup-socket-properties.c b/libsoup/soup-socket-properties.c new file mode 100644 index 00000000..8dea78c6 --- /dev/null +++ b/libsoup/soup-socket-properties.c @@ -0,0 +1,81 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Copyright 2013 Red Hat, Inc. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include "soup-socket-private.h" +#include "soup.h" + +SoupSocketProperties * +soup_socket_properties_new (GMainContext *async_context, + gboolean use_thread_context, + GProxyResolver *proxy_resolver, + SoupAddress *local_addr, + GTlsDatabase *tlsdb, + GTlsInteraction *tls_interaction, + gboolean ssl_strict, + guint io_timeout, + guint idle_timeout) +{ + SoupSocketProperties *props; + + props = g_slice_new (SoupSocketProperties); + props->ref_count = 1; + + props->async_context = async_context ? g_main_context_ref (async_context) : NULL; + props->use_thread_context = use_thread_context; + + props->proxy_resolver = proxy_resolver ? g_object_ref (proxy_resolver) : NULL; + props->local_addr = local_addr ? g_object_ref (local_addr) : NULL; + + props->tlsdb = tlsdb ? g_object_ref (tlsdb) : NULL; + props->tls_interaction = tls_interaction ? g_object_ref (tls_interaction) : NULL; + props->ssl_strict = ssl_strict; + + props->io_timeout = io_timeout; + props->idle_timeout = idle_timeout; + + return props; +} + +SoupSocketProperties * +soup_socket_properties_ref (SoupSocketProperties *props) +{ + props->ref_count++; + return props; +} + +void +soup_socket_properties_unref (SoupSocketProperties *props) +{ + if (--props->ref_count) + return; + + g_clear_pointer (&props->async_context, g_main_context_unref); + g_clear_object (&props->proxy_resolver); + g_clear_object (&props->local_addr); + g_clear_object (&props->tlsdb); + g_clear_object (&props->tls_interaction); + + g_slice_free (SoupSocketProperties, props); +} + +void +soup_socket_properties_push_async_context (SoupSocketProperties *props) +{ + if (props->async_context && !props->use_thread_context) + g_main_context_push_thread_default (props->async_context); +} + +void +soup_socket_properties_pop_async_context (SoupSocketProperties *props) +{ + if (props->async_context && !props->use_thread_context) + g_main_context_pop_thread_default (props->async_context); +} + +G_DEFINE_BOXED_TYPE (SoupSocketProperties, soup_socket_properties, soup_socket_properties_ref, soup_socket_properties_unref) diff --git a/libsoup/soup-socket.c b/libsoup/soup-socket.c index b9f1dfca..311c627c 100644 --- a/libsoup/soup-socket.c +++ b/libsoup/soup-socket.c @@ -11,13 +11,14 @@ #include +#include #include #include "soup-socket.h" +#include "soup-socket-private.h" #include "soup.h" #include "soup-filter-input-stream.h" #include "soup-io-stream.h" -#include "soup-misc-private.h" /** * SECTION:soup-socket @@ -29,8 +30,6 @@ * soup_socket_get_remote_address()) may be useful to applications. **/ -G_DEFINE_TYPE (SoupSocket, soup_socket, G_TYPE_OBJECT) - enum { READABLE, WRITABLE, @@ -45,9 +44,13 @@ static guint signals[LAST_SIGNAL] = { 0 }; enum { PROP_0, + PROP_FD, + PROP_GSOCKET, + PROP_IOSTREAM, PROP_LOCAL_ADDRESS, PROP_REMOTE_ADDRESS, PROP_NON_BLOCKING, + PROP_IPV6_ONLY, PROP_IS_SERVER, PROP_SSL_CREDENTIALS, PROP_SSL_STRICT, @@ -56,10 +59,9 @@ enum { PROP_USE_THREAD_CONTEXT, PROP_TIMEOUT, PROP_TRUSTED_CERTIFICATE, - PROP_CLEAN_DISPOSE, PROP_TLS_CERTIFICATE, PROP_TLS_ERRORS, - PROP_PROXY_RESOLVER, + PROP_SOCKET_PROPERTIES, LAST_PROP }; @@ -71,9 +73,11 @@ typedef struct { GInputStream *istream; GOutputStream *ostream; GTlsCertificateFlags tls_errors; + GTlsInteraction *tls_interaction; GProxyResolver *proxy_resolver; guint non_blocking:1; + guint ipv6_only:1; guint is_server:1; guint ssl:1; guint ssl_strict:1; @@ -90,31 +94,103 @@ typedef struct { guint timeout; GCancellable *connect_cancel; + int fd; } SoupSocketPrivate; -#define SOUP_SOCKET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_SOCKET, SoupSocketPrivate)) + +static void soup_socket_initable_interface_init (GInitableIface *initable_interface); + +G_DEFINE_TYPE_WITH_CODE (SoupSocket, soup_socket, G_TYPE_OBJECT, + G_ADD_PRIVATE (SoupSocket) + G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, + soup_socket_initable_interface_init)) static void soup_socket_peer_certificate_changed (GObject *conn, GParamSpec *pspec, gpointer user_data); +static void finish_socket_setup (SoupSocket *sock); +static void finish_listener_setup (SoupSocket *sock); static void soup_socket_init (SoupSocket *sock) { - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); priv->non_blocking = TRUE; + priv->fd = -1; g_mutex_init (&priv->addrlock); g_mutex_init (&priv->iolock); } +static gboolean +soup_socket_initable_init (GInitable *initable, + GCancellable *cancellable, + GError **error) +{ + SoupSocket *sock = SOUP_SOCKET (initable); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); + + if (priv->conn) { + g_warn_if_fail (priv->gsock == NULL); + g_warn_if_fail (priv->fd == -1); + + finish_socket_setup (sock); + } + + if (priv->fd != -1) { + guint type, len = sizeof (type); + + g_warn_if_fail (priv->gsock == NULL); + + /* GSocket will g_error() this, so we have to check ourselves. */ + if (getsockopt (priv->fd, SOL_SOCKET, SO_TYPE, + (gpointer)&type, (gpointer)&len) == -1) { + g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, + _("Can’t import non-socket as SoupSocket")); + return FALSE; + } + + priv->gsock = g_socket_new_from_fd (priv->fd, error); + if (!priv->gsock) + return FALSE; + } + + if (priv->gsock != NULL) { + int listening; + + g_warn_if_fail (priv->local_addr == NULL); + g_warn_if_fail (priv->remote_addr == NULL); + + if (!g_socket_get_option (priv->gsock, + SOL_SOCKET, SO_ACCEPTCONN, + &listening, error)) { + g_prefix_error (error, _("Could not import existing socket: ")); + return FALSE; + } + + finish_socket_setup (sock); + if (listening) + finish_listener_setup (sock); + else if (!g_socket_is_connected (priv->gsock)) { + g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, + _("Can’t import unconnected socket")); + return FALSE; + } + } + + return TRUE; +} + static void disconnect_internal (SoupSocket *sock, gboolean close) { - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); g_clear_object (&priv->gsock); - if (priv->conn && close) + if (priv->conn && close) { g_io_stream_close (priv->conn, NULL, NULL); + g_signal_handlers_disconnect_by_data (priv->conn, sock); + g_clear_object (&priv->conn); + } if (priv->read_src) { g_source_destroy (priv->read_src); @@ -129,14 +205,15 @@ disconnect_internal (SoupSocket *sock, gboolean close) static void soup_socket_finalize (GObject *object) { - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (object); + SoupSocket *sock = SOUP_SOCKET (object); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); if (priv->connect_cancel) { if (priv->clean_dispose) g_warning ("Disposing socket %p during connect", object); g_object_unref (priv->connect_cancel); } - if (priv->gsock) { + if (priv->conn) { if (priv->clean_dispose) g_warning ("Disposing socket %p while still connected", object); disconnect_internal (SOUP_SOCKET (object), TRUE); @@ -150,7 +227,9 @@ soup_socket_finalize (GObject *object) g_clear_object (&priv->local_addr); g_clear_object (&priv->remote_addr); + g_clear_object (&priv->tls_interaction); g_clear_object (&priv->proxy_resolver); + g_clear_object (&priv->ssl_creds); if (priv->watch_src) { if (priv->clean_dispose && !priv->is_server) @@ -165,44 +244,64 @@ soup_socket_finalize (GObject *object) G_OBJECT_CLASS (soup_socket_parent_class)->finalize (object); } - static void -finish_socket_setup (SoupSocketPrivate *priv) +finish_socket_setup (SoupSocket *sock) { - if (!priv->gsock) - return; + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); + + if (priv->gsock) { + if (!priv->conn) + priv->conn = (GIOStream *)g_socket_connection_factory_create_connection (priv->gsock); + + g_socket_set_timeout (priv->gsock, priv->timeout); + g_socket_set_option (priv->gsock, IPPROTO_TCP, TCP_NODELAY, TRUE, NULL); + } if (!priv->conn) - priv->conn = (GIOStream *)g_socket_connection_factory_create_connection (priv->gsock); + return; + if (!priv->iostream) priv->iostream = soup_io_stream_new (priv->conn, FALSE); if (!priv->istream) priv->istream = g_object_ref (g_io_stream_get_input_stream (priv->iostream)); if (!priv->ostream) priv->ostream = g_object_ref (g_io_stream_get_output_stream (priv->iostream)); - - g_socket_set_timeout (priv->gsock, priv->timeout); - g_socket_set_option (priv->gsock, IPPROTO_TCP, TCP_NODELAY, TRUE, NULL); } static void soup_socket_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (object); + SoupSocket *sock = SOUP_SOCKET (object); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); + SoupSocketProperties *props; switch (prop_id) { + case PROP_FD: + priv->fd = g_value_get_int (value); + break; + case PROP_GSOCKET: + priv->gsock = g_value_dup_object (value); + break; + case PROP_IOSTREAM: + priv->conn = g_value_dup_object (value); + break; case PROP_LOCAL_ADDRESS: - priv->local_addr = (SoupAddress *)g_value_dup_object (value); + priv->local_addr = g_value_dup_object (value); break; case PROP_REMOTE_ADDRESS: - priv->remote_addr = (SoupAddress *)g_value_dup_object (value); + priv->remote_addr = g_value_dup_object (value); break; case PROP_NON_BLOCKING: priv->non_blocking = g_value_get_boolean (value); break; + case PROP_IPV6_ONLY: + priv->ipv6_only = g_value_get_boolean (value); + break; case PROP_SSL_CREDENTIALS: priv->ssl_creds = g_value_get_pointer (value); + if (priv->ssl_creds) + g_object_ref (priv->ssl_creds); break; case PROP_SSL_STRICT: priv->ssl_strict = g_value_get_boolean (value); @@ -211,23 +310,59 @@ soup_socket_set_property (GObject *object, guint prop_id, priv->ssl_fallback = g_value_get_boolean (value); break; case PROP_ASYNC_CONTEXT: - priv->async_context = g_value_get_pointer (value); - if (priv->async_context) - g_main_context_ref (priv->async_context); + if (!priv->use_thread_context) { + priv->async_context = g_value_get_pointer (value); + if (priv->async_context) + g_main_context_ref (priv->async_context); + } break; case PROP_USE_THREAD_CONTEXT: priv->use_thread_context = g_value_get_boolean (value); + if (priv->use_thread_context) { + g_clear_pointer (&priv->async_context, g_main_context_unref); + priv->async_context = g_main_context_ref_thread_default (); + } break; case PROP_TIMEOUT: priv->timeout = g_value_get_uint (value); if (priv->conn) g_socket_set_timeout (priv->gsock, priv->timeout); break; - case PROP_PROXY_RESOLVER: - priv->proxy_resolver = g_value_dup_object (value); - break; - case PROP_CLEAN_DISPOSE: - priv->clean_dispose = g_value_get_boolean (value); + case PROP_SOCKET_PROPERTIES: + props = g_value_get_boxed (value); + if (props) { + g_clear_pointer (&priv->async_context, g_main_context_unref); + if (props->use_thread_context) { + priv->use_thread_context = TRUE; + priv->async_context = g_main_context_ref_thread_default (); + } else { + priv->use_thread_context = FALSE; + if (props->async_context) + priv->async_context = g_main_context_ref (props->async_context); + } + + g_clear_object (&priv->proxy_resolver); + if (props->proxy_resolver) + priv->proxy_resolver = g_object_ref (props->proxy_resolver); + + g_clear_object (&priv->local_addr); + if (props->local_addr) + priv->local_addr = g_object_ref (props->local_addr); + + g_clear_object (&priv->ssl_creds); + if (props->tlsdb) + priv->ssl_creds = g_object_ref (props->tlsdb); + g_clear_object (&priv->tls_interaction); + if (props->tls_interaction) + priv->tls_interaction = g_object_ref (props->tls_interaction); + priv->ssl_strict = props->ssl_strict; + + priv->timeout = props->io_timeout; + if (priv->conn) + g_socket_set_timeout (priv->gsock, priv->timeout); + + priv->clean_dispose = TRUE; + } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -239,9 +374,13 @@ static void soup_socket_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (object); + SoupSocket *sock = SOUP_SOCKET (object); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); switch (prop_id) { + case PROP_FD: + g_value_set_int (value, priv->fd); + break; case PROP_LOCAL_ADDRESS: g_value_set_object (value, soup_socket_get_local_address (SOUP_SOCKET (object))); break; @@ -251,6 +390,9 @@ soup_socket_get_property (GObject *object, guint prop_id, case PROP_NON_BLOCKING: g_value_set_boolean (value, priv->non_blocking); break; + case PROP_IPV6_ONLY: + g_value_set_boolean (value, priv->ipv6_only); + break; case PROP_IS_SERVER: g_value_set_boolean (value, priv->is_server); break; @@ -284,9 +426,6 @@ soup_socket_get_property (GObject *object, guint prop_id, case PROP_TLS_ERRORS: g_value_set_flags (value, priv->tls_errors); break; - case PROP_PROXY_RESOLVER: - g_value_set_object (value, priv->proxy_resolver); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -298,8 +437,6 @@ soup_socket_class_init (SoupSocketClass *socket_class) { GObjectClass *object_class = G_OBJECT_CLASS (socket_class); - g_type_class_add_private (socket_class, sizeof (SoupSocketPrivate)); - /* virtual method override */ object_class->finalize = soup_socket_finalize; object_class->set_property = soup_socket_set_property; @@ -400,6 +537,28 @@ soup_socket_class_init (SoupSocketClass *socket_class) /* properties */ + g_object_class_install_property ( + object_class, PROP_FD, + g_param_spec_int (SOUP_SOCKET_FD, + "FD", + "The socket's file descriptor", + -1, G_MAXINT, -1, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property ( + object_class, PROP_GSOCKET, + g_param_spec_object (SOUP_SOCKET_GSOCKET, + "GSocket", + "The socket's underlying GSocket", + G_TYPE_SOCKET, + G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property ( + object_class, PROP_IOSTREAM, + g_param_spec_object (SOUP_SOCKET_IOSTREAM, + "GIOStream", + "The socket's underlying GIOStream", + G_TYPE_IO_STREAM, + G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); + /** * SOUP_SOCKET_LOCAL_ADDRESS: * @@ -463,11 +622,28 @@ soup_socket_class_init (SoupSocketClass *socket_class) "Whether or not the socket uses non-blocking I/O", TRUE, G_PARAM_READWRITE)); + g_object_class_install_property ( + object_class, PROP_IPV6_ONLY, + g_param_spec_boolean (SOUP_SOCKET_IPV6_ONLY, + "IPv6 only", + "IPv6 only", + FALSE, + G_PARAM_READWRITE)); /** * SOUP_SOCKET_IS_SERVER: * - * Alias for the #SoupSocket:is-server property. (Whether or - * not the socket is a server socket.) + * Alias for the #SoupSocket:is-server property, qv. + **/ + /** + * SoupSocket:is-server: + * + * Whether or not the socket is a server socket. + * + * Note that for "ordinary" #SoupSockets this will be set for + * both listening sockets and the sockets emitted by + * #SoupSocket::new-connection, but for sockets created by + * setting #SoupSocket:fd, it will only be set for listening + * sockets. **/ g_object_class_install_property ( object_class, PROP_IS_SERVER, @@ -579,13 +755,6 @@ soup_socket_class_init (SoupSocketClass *socket_class) 0, G_MAXUINT, 0, G_PARAM_READWRITE)); - g_object_class_install_property ( - object_class, PROP_CLEAN_DISPOSE, - g_param_spec_boolean ("clean-dispose", - "Clean dispose", - "Warn on unclean dispose", - FALSE, - G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); /** * SOUP_SOCKET_TLS_CERTIFICATE: * @@ -622,12 +791,18 @@ soup_socket_class_init (SoupSocketClass *socket_class) G_PARAM_READABLE)); g_object_class_install_property ( - object_class, PROP_PROXY_RESOLVER, - g_param_spec_object (SOUP_SOCKET_PROXY_RESOLVER, - "Proxy resolver", - "GProxyResolver to use", - G_TYPE_PROXY_RESOLVER, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + object_class, PROP_SOCKET_PROPERTIES, + g_param_spec_boxed (SOUP_SOCKET_SOCKET_PROPERTIES, + "Socket properties", + "Socket properties", + SOUP_TYPE_SOCKET_PROPERTIES, + G_PARAM_WRITABLE)); +} + +static void +soup_socket_initable_interface_init (GInitableIface *initable_interface) +{ + initable_interface->init = soup_socket_initable_init; } @@ -654,6 +829,15 @@ soup_socket_new (const char *optname1, ...) return sock; } +static void +soup_socket_event (SoupSocket *sock, + GSocketClientEvent event, + GIOStream *connection) +{ + g_signal_emit (sock, signals[EVENT], 0, + event, connection); +} + static void re_emit_socket_client_event (GSocketClient *client, GSocketClientEvent event, @@ -663,21 +847,20 @@ re_emit_socket_client_event (GSocketClient *client, { SoupSocket *sock = user_data; - g_signal_emit (sock, signals[EVENT], 0, - event, connection); + soup_socket_event (sock, event, connection); } static gboolean socket_connect_finish (SoupSocket *sock, GSocketConnection *conn) { - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); g_clear_object (&priv->connect_cancel); if (conn) { priv->conn = (GIOStream *)conn; priv->gsock = g_object_ref (g_socket_connection_get_socket (conn)); - finish_socket_setup (priv); + finish_socket_setup (sock); return TRUE; } else return FALSE; @@ -702,7 +885,7 @@ socket_legacy_error (SoupSocket *sock, GError *error) static GSocketClient * new_socket_client (SoupSocket *sock) { - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); GSocketClient *client = g_socket_client_new (); g_signal_connect (client, "event", @@ -762,7 +945,7 @@ soup_socket_connect_async_internal (SoupSocket *sock, GTask *task; g_return_if_fail (SOUP_IS_SOCKET (sock)); - priv = SOUP_SOCKET_GET_PRIVATE (sock); + priv = soup_socket_get_instance_private (sock); g_return_if_fail (!priv->is_server); g_return_if_fail (priv->gsock == NULL); g_return_if_fail (priv->remote_addr != NULL); @@ -799,14 +982,10 @@ legacy_connect_async_cb (GObject *object, gpointer user_data) { SoupSocket *sock = SOUP_SOCKET (object); - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock); SoupSocketAsyncConnectData *sacd = user_data; GError *error = NULL; guint status; - if (priv->async_context && !priv->use_thread_context) - g_main_context_pop_thread_default (priv->async_context); - if (soup_socket_connect_finish_internal (sock, result, &error)) status = SOUP_STATUS_OK; else @@ -840,7 +1019,7 @@ soup_socket_connect_async (SoupSocket *sock, GCancellable *cancellable, SoupSocketAsyncConnectData *sacd; g_return_if_fail (SOUP_IS_SOCKET (sock)); - priv = SOUP_SOCKET_GET_PRIVATE (sock); + priv = soup_socket_get_instance_private (sock); g_return_if_fail (!priv->is_server); g_return_if_fail (priv->gsock == NULL); g_return_if_fail (priv->remote_addr != NULL); @@ -856,6 +1035,9 @@ soup_socket_connect_async (SoupSocket *sock, GCancellable *cancellable, soup_socket_connect_async_internal (sock, cancellable, legacy_connect_async_cb, sacd); + + if (priv->async_context && !priv->use_thread_context) + g_main_context_pop_thread_default (priv->async_context); } gboolean @@ -868,7 +1050,7 @@ soup_socket_connect_sync_internal (SoupSocket *sock, GSocketConnection *conn; g_return_val_if_fail (SOUP_IS_SOCKET (sock), SOUP_STATUS_MALFORMED); - priv = SOUP_SOCKET_GET_PRIVATE (sock); + priv = soup_socket_get_instance_private (sock); g_return_val_if_fail (!priv->is_server, SOUP_STATUS_MALFORMED); g_return_val_if_fail (priv->gsock == NULL, SOUP_STATUS_MALFORMED); g_return_val_if_fail (priv->remote_addr != NULL, SOUP_STATUS_MALFORMED); @@ -904,7 +1086,7 @@ soup_socket_connect_sync (SoupSocket *sock, GCancellable *cancellable) GError *error = NULL; g_return_val_if_fail (SOUP_IS_SOCKET (sock), SOUP_STATUS_MALFORMED); - priv = SOUP_SOCKET_GET_PRIVATE (sock); + priv = soup_socket_get_instance_private (sock); g_return_val_if_fail (!priv->is_server, SOUP_STATUS_MALFORMED); g_return_val_if_fail (priv->gsock == NULL, SOUP_STATUS_MALFORMED); g_return_val_if_fail (priv->remote_addr != NULL, SOUP_STATUS_MALFORMED); @@ -929,33 +1111,77 @@ soup_socket_connect_sync (SoupSocket *sock, GCancellable *cancellable) int soup_socket_get_fd (SoupSocket *sock) { + SoupSocketPrivate *priv; + g_return_val_if_fail (SOUP_IS_SOCKET (sock), -1); - return g_socket_get_fd (SOUP_SOCKET_GET_PRIVATE (sock)->gsock); + priv = soup_socket_get_instance_private (sock); + + return g_socket_get_fd (priv->gsock); } GSocket * soup_socket_get_gsocket (SoupSocket *sock) { + SoupSocketPrivate *priv; + + g_return_val_if_fail (SOUP_IS_SOCKET (sock), NULL); + + priv = soup_socket_get_instance_private (sock); + + return priv->gsock; +} + +GSocket * +soup_socket_steal_gsocket (SoupSocket *sock) +{ + SoupSocketPrivate *priv; + GSocket *gsock; + g_return_val_if_fail (SOUP_IS_SOCKET (sock), NULL); + priv = soup_socket_get_instance_private (sock); + + gsock = priv->gsock; + priv->gsock = NULL; + g_clear_object (&priv->conn); + g_clear_object (&priv->iostream); - return SOUP_SOCKET_GET_PRIVATE (sock)->gsock; + return gsock; +} + +gboolean +soup_socket_is_readable (SoupSocket *sock) +{ + SoupSocketPrivate *priv; + + g_return_val_if_fail (SOUP_IS_SOCKET (sock), FALSE); + priv = soup_socket_get_instance_private (sock); + + return g_pollable_input_stream_is_readable (G_POLLABLE_INPUT_STREAM (priv->istream)); } GIOStream * soup_socket_get_connection (SoupSocket *sock) { + SoupSocketPrivate *priv; + g_return_val_if_fail (SOUP_IS_SOCKET (sock), NULL); - return SOUP_SOCKET_GET_PRIVATE (sock)->conn; + priv = soup_socket_get_instance_private (sock); + + return priv->conn; } GIOStream * soup_socket_get_iostream (SoupSocket *sock) { + SoupSocketPrivate *priv; + g_return_val_if_fail (SOUP_IS_SOCKET (sock), NULL); - return SOUP_SOCKET_GET_PRIVATE (sock)->iostream; + priv = soup_socket_get_instance_private (sock); + + return priv->iostream; } static GSource * @@ -964,7 +1190,6 @@ soup_socket_create_watch (SoupSocketPrivate *priv, GIOCondition cond, GCancellable *cancellable) { GSource *watch; - GMainContext *async_context; if (cond == G_IO_IN) watch = g_pollable_input_stream_create_source (G_POLLABLE_INPUT_STREAM (priv->istream), cancellable); @@ -972,12 +1197,7 @@ soup_socket_create_watch (SoupSocketPrivate *priv, GIOCondition cond, watch = g_pollable_output_stream_create_source (G_POLLABLE_OUTPUT_STREAM (priv->ostream), cancellable); g_source_set_callback (watch, (GSourceFunc)callback, user_data, NULL); - if (priv->use_thread_context) - async_context = g_main_context_get_thread_default (); - else - async_context = priv->async_context; - - g_source_attach (watch, async_context); + g_source_attach (watch, priv->async_context); g_source_unref (watch); return watch; @@ -987,7 +1207,7 @@ static gboolean listen_watch (GObject *pollable, gpointer data) { SoupSocket *sock = data, *new; - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock), *new_priv; + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock), *new_priv; GSocket *new_gsock; new_gsock = g_socket_accept (priv->gsock, NULL, NULL); @@ -995,17 +1215,18 @@ listen_watch (GObject *pollable, gpointer data) return FALSE; new = g_object_new (SOUP_TYPE_SOCKET, NULL); - new_priv = SOUP_SOCKET_GET_PRIVATE (new); + new_priv = soup_socket_get_instance_private (new); new_priv->gsock = new_gsock; if (priv->async_context) new_priv->async_context = g_main_context_ref (priv->async_context); new_priv->use_thread_context = priv->use_thread_context; new_priv->non_blocking = priv->non_blocking; + new_priv->clean_dispose = priv->clean_dispose; new_priv->is_server = TRUE; new_priv->ssl = priv->ssl; if (priv->ssl_creds) - new_priv->ssl_creds = priv->ssl_creds; - finish_socket_setup (new_priv); + new_priv->ssl_creds = g_object_ref (priv->ssl_creds); + finish_socket_setup (new); if (new_priv->ssl_creds) { if (!soup_socket_start_proxy_ssl (new, NULL, NULL)) { @@ -1020,6 +1241,17 @@ listen_watch (GObject *pollable, gpointer data) return TRUE; } +static void +finish_listener_setup (SoupSocket *sock) +{ + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); + + priv->is_server = TRUE; + priv->watch_src = soup_socket_create_watch (priv, G_IO_IN, + listen_watch, sock, + NULL); +} + /** * soup_socket_listen: * @sock: a server #SoupSocket (which must not already be connected or @@ -1032,18 +1264,33 @@ listen_watch (GObject *pollable, gpointer data) **/ gboolean soup_socket_listen (SoupSocket *sock) +{ + return soup_socket_listen_full (sock, NULL); +} + +/** + * soup_socket_listen_full: + * @sock: a server #SoupSocket (which must not already be connected or listening) + * @error: error pointer + * + * Makes @sock start listening on its local address. When connections + * come in, @sock will emit #SoupSocket::new_connection. + * + * Return value: whether or not @sock is now listening. + **/ +gboolean +soup_socket_listen_full (SoupSocket *sock, + GError **error) { SoupSocketPrivate *priv; GSocketAddress *addr; g_return_val_if_fail (SOUP_IS_SOCKET (sock), FALSE); - priv = SOUP_SOCKET_GET_PRIVATE (sock); + priv = soup_socket_get_instance_private (sock); g_return_val_if_fail (priv->gsock == NULL, FALSE); g_return_val_if_fail (priv->local_addr != NULL, FALSE); - priv->is_server = TRUE; - /* @local_addr may have its port set to 0. So we intentionally * don't store it in priv->local_addr, so that if the * caller calls soup_socket_get_local_address() later, we'll @@ -1056,25 +1303,34 @@ soup_socket_listen (SoupSocket *sock) priv->gsock = g_socket_new (g_socket_address_get_family (addr), G_SOCKET_TYPE_STREAM, G_SOCKET_PROTOCOL_DEFAULT, - NULL); + error); if (!priv->gsock) goto cant_listen; - finish_socket_setup (priv); + finish_socket_setup (sock); + +#if defined (IPPROTO_IPV6) && defined (IPV6_V6ONLY) + if (priv->ipv6_only) { + int fd, v6_only; + + fd = g_socket_get_fd (priv->gsock); + v6_only = TRUE; + setsockopt (fd, IPPROTO_IPV6, IPV6_V6ONLY, + &v6_only, sizeof (v6_only)); + } +#endif /* Bind */ - if (!g_socket_bind (priv->gsock, addr, TRUE, NULL)) + if (!g_socket_bind (priv->gsock, addr, TRUE, error)) goto cant_listen; /* Force local_addr to be re-resolved now */ g_object_unref (priv->local_addr); priv->local_addr = NULL; /* Listen */ - if (!g_socket_listen (priv->gsock, NULL)) + if (!g_socket_listen (priv->gsock, error)) goto cant_listen; + finish_listener_setup (sock); - priv->watch_src = soup_socket_create_watch (priv, G_IO_IN, - listen_watch, sock, - NULL); g_object_unref (addr); return TRUE; @@ -1090,7 +1346,7 @@ static void soup_socket_peer_certificate_changed (GObject *conn, GParamSpec *pspec, gpointer sock) { - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); priv->tls_errors = g_tls_connection_get_peer_certificate_errors (G_TLS_CONNECTION (priv->conn)); @@ -1111,7 +1367,7 @@ soup_socket_setup_ssl (SoupSocket *sock, GCancellable *cancellable, GError **error) { - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); GTlsBackend *backend = g_tls_backend_get_default (); if (G_IS_TLS_CONNECTION (priv->conn)) @@ -1140,6 +1396,14 @@ soup_socket_setup_ssl (SoupSocket *sock, if (!conn) return FALSE; + /* GLib < 2.41 mistakenly doesn't implement this property in the + * dummy TLS backend, so we don't include it in the g_initable_new() + * call above. + */ + g_object_set (G_OBJECT (conn), + "interaction", priv->tls_interaction, + NULL); + g_object_unref (priv->conn); priv->conn = G_IO_STREAM (conn); @@ -1190,12 +1454,12 @@ soup_socket_setup_ssl (SoupSocket *sock, gboolean soup_socket_start_ssl (SoupSocket *sock, GCancellable *cancellable) { - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); return soup_socket_setup_ssl (sock, soup_address_get_name (priv->remote_addr), cancellable, NULL); } - + /** * soup_socket_start_proxy_ssl: * @sock: the socket @@ -1220,13 +1484,19 @@ soup_socket_handshake_sync (SoupSocket *sock, GCancellable *cancellable, GError **error) { - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); if (!soup_socket_setup_ssl (sock, ssl_host, cancellable, error)) return FALSE; - return g_tls_connection_handshake (G_TLS_CONNECTION (priv->conn), - cancellable, error); + soup_socket_event (sock, G_SOCKET_CLIENT_TLS_HANDSHAKING, priv->conn); + + if (!g_tls_connection_handshake (G_TLS_CONNECTION (priv->conn), + cancellable, error)) + return FALSE; + + soup_socket_event (sock, G_SOCKET_CLIENT_TLS_HANDSHAKED, priv->conn); + return TRUE; } static void @@ -1236,9 +1506,13 @@ handshake_async_ready (GObject *source, GAsyncResult *result, gpointer user_data GError *error = NULL; if (g_tls_connection_handshake_finish (G_TLS_CONNECTION (source), - result, &error)) + result, &error)) { + SoupSocket *sock = g_task_get_source_object (task); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); + + soup_socket_event (sock, G_SOCKET_CLIENT_TLS_HANDSHAKED, priv->conn); g_task_return_boolean (task, TRUE); - else + } else g_task_return_error (task, error); g_object_unref (task); } @@ -1250,7 +1524,7 @@ soup_socket_handshake_async (SoupSocket *sock, GAsyncReadyCallback callback, gpointer user_data) { - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); GTask *task; GError *error = NULL; @@ -1262,6 +1536,8 @@ soup_socket_handshake_async (SoupSocket *sock, return; } + soup_socket_event (sock, G_SOCKET_CLIENT_TLS_HANDSHAKING, priv->conn); + g_tls_connection_handshake_async (G_TLS_CONNECTION (priv->conn), G_PRIORITY_DEFAULT, cancellable, handshake_async_ready, @@ -1287,7 +1563,7 @@ soup_socket_handshake_finish (SoupSocket *sock, gboolean soup_socket_is_ssl (SoupSocket *sock) { - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); return priv->ssl; } @@ -1306,14 +1582,14 @@ soup_socket_disconnect (SoupSocket *sock) gboolean already_disconnected = FALSE; g_return_if_fail (SOUP_IS_SOCKET (sock)); - priv = SOUP_SOCKET_GET_PRIVATE (sock); + priv = soup_socket_get_instance_private (sock); if (priv->connect_cancel) { disconnect_internal (sock, FALSE); g_cancellable_cancel (priv->connect_cancel); return; } else if (g_mutex_trylock (&priv->iolock)) { - if (priv->gsock) + if (priv->conn) disconnect_internal (sock, TRUE); else already_disconnected = TRUE; @@ -1363,7 +1639,7 @@ soup_socket_is_connected (SoupSocket *sock) SoupSocketPrivate *priv; g_return_val_if_fail (SOUP_IS_SOCKET (sock), FALSE); - priv = SOUP_SOCKET_GET_PRIVATE (sock); + priv = soup_socket_get_instance_private (sock); return priv->conn && !g_io_stream_is_closed (priv->conn); } @@ -1385,7 +1661,7 @@ soup_socket_get_local_address (SoupSocket *sock) SoupSocketPrivate *priv; g_return_val_if_fail (SOUP_IS_SOCKET (sock), NULL); - priv = SOUP_SOCKET_GET_PRIVATE (sock); + priv = soup_socket_get_instance_private (sock); g_mutex_lock (&priv->addrlock); if (!priv->local_addr) { @@ -1433,7 +1709,7 @@ soup_socket_get_remote_address (SoupSocket *sock) SoupSocketPrivate *priv; g_return_val_if_fail (SOUP_IS_SOCKET (sock), NULL); - priv = SOUP_SOCKET_GET_PRIVATE (sock); + priv = soup_socket_get_instance_private (sock); g_mutex_lock (&priv->addrlock); if (!priv->remote_addr) { @@ -1467,7 +1743,7 @@ unlock: SoupURI * soup_socket_get_http_proxy_uri (SoupSocket *sock) { - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); GSocketAddress *addr; GProxyAddress *paddr; SoupURI *uri; @@ -1494,7 +1770,7 @@ static gboolean socket_read_watch (GObject *pollable, gpointer user_data) { SoupSocket *sock = user_data; - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); priv->read_src = NULL; g_signal_emit (sock, signals[READABLE], 0); @@ -1506,7 +1782,7 @@ translate_read_status (SoupSocket *sock, GCancellable *cancellable, gssize my_nread, gsize *nread, GError *my_err, GError **error) { - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); if (my_nread > 0) { g_assert_no_error (my_err); @@ -1544,7 +1820,8 @@ translate_read_status (SoupSocket *sock, GCancellable *cancellable, /** * soup_socket_read: * @sock: the socket - * @buffer: buffer to read into + * @buffer: (array length=len) (element-type guint8): buffer to read + * into * @len: size of @buffer in bytes * @nread: (out): on return, the number of bytes read into @buffer * @cancellable: a #GCancellable, or %NULL @@ -1580,7 +1857,7 @@ soup_socket_read (SoupSocket *sock, gpointer buffer, gsize len, g_return_val_if_fail (SOUP_IS_SOCKET (sock), SOUP_SOCKET_ERROR); g_return_val_if_fail (nread != NULL, SOUP_SOCKET_ERROR); - priv = SOUP_SOCKET_GET_PRIVATE (sock); + priv = soup_socket_get_instance_private (sock); g_mutex_lock (&priv->iolock); @@ -1609,7 +1886,8 @@ out: /** * soup_socket_read_until: * @sock: the socket - * @buffer: buffer to read into + * @buffer: (array length=len) (element-type guint8): buffer to read + * into * @len: size of @buffer in bytes * @boundary: boundary to read until * @boundary_len: length of @boundary in bytes @@ -1649,7 +1927,7 @@ soup_socket_read_until (SoupSocket *sock, gpointer buffer, gsize len, g_return_val_if_fail (nread != NULL, SOUP_SOCKET_ERROR); g_return_val_if_fail (len >= boundary_len, SOUP_SOCKET_ERROR); - priv = SOUP_SOCKET_GET_PRIVATE (sock); + priv = soup_socket_get_instance_private (sock); g_mutex_lock (&priv->iolock); @@ -1675,7 +1953,7 @@ static gboolean socket_write_watch (GObject *pollable, gpointer user_data) { SoupSocket *sock = user_data; - SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock); + SoupSocketPrivate *priv = soup_socket_get_instance_private (sock); priv->write_src = NULL; g_signal_emit (sock, signals[WRITABLE], 0); @@ -1685,7 +1963,7 @@ socket_write_watch (GObject *pollable, gpointer user_data) /** * soup_socket_write: * @sock: the socket - * @buffer: data to write + * @buffer: (array length=len) (element-type guint8): data to write * @len: size of @buffer, in bytes * @nwrote: (out): on return, number of bytes written * @cancellable: a #GCancellable, or %NULL @@ -1720,7 +1998,7 @@ soup_socket_write (SoupSocket *sock, gconstpointer buffer, g_return_val_if_fail (SOUP_IS_SOCKET (sock), SOUP_SOCKET_ERROR); g_return_val_if_fail (nwrote != NULL, SOUP_SOCKET_ERROR); - priv = SOUP_SOCKET_GET_PRIVATE (sock); + priv = soup_socket_get_instance_private (sock); g_mutex_lock (&priv->iolock); diff --git a/libsoup/soup-socket.h b/libsoup/soup-socket.h index 5c1264f9..993d1c66 100644 --- a/libsoup/soup-socket.h +++ b/libsoup/soup-socket.h @@ -57,32 +57,45 @@ typedef void (*SoupSocketCallback) (SoupSocket *sock, guint status, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 GType soup_socket_get_type (void); +SOUP_AVAILABLE_IN_2_4 SoupSocket *soup_socket_new (const char *optname1, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 void soup_socket_connect_async (SoupSocket *sock, GCancellable *cancellable, SoupSocketCallback callback, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 guint soup_socket_connect_sync (SoupSocket *sock, GCancellable *cancellable); +SOUP_AVAILABLE_IN_2_4 int soup_socket_get_fd (SoupSocket *sock); +SOUP_AVAILABLE_IN_2_4 gboolean soup_socket_listen (SoupSocket *sock); +SOUP_AVAILABLE_IN_2_4 gboolean soup_socket_start_ssl (SoupSocket *sock, GCancellable *cancellable); +SOUP_AVAILABLE_IN_2_4 gboolean soup_socket_start_proxy_ssl (SoupSocket *sock, const char *ssl_host, GCancellable *cancellable); +SOUP_AVAILABLE_IN_2_4 gboolean soup_socket_is_ssl (SoupSocket *sock); +SOUP_AVAILABLE_IN_2_4 void soup_socket_disconnect (SoupSocket *sock); +SOUP_AVAILABLE_IN_2_4 gboolean soup_socket_is_connected (SoupSocket *sock); +SOUP_AVAILABLE_IN_2_4 SoupAddress *soup_socket_get_local_address (SoupSocket *sock); +SOUP_AVAILABLE_IN_2_4 SoupAddress *soup_socket_get_remote_address (SoupSocket *sock); typedef enum { @@ -92,12 +105,14 @@ typedef enum { SOUP_SOCKET_ERROR } SoupSocketIOStatus; +SOUP_AVAILABLE_IN_2_4 SoupSocketIOStatus soup_socket_read (SoupSocket *sock, gpointer buffer, gsize len, gsize *nread, GCancellable *cancellable, GError **error); +SOUP_AVAILABLE_IN_2_4 SoupSocketIOStatus soup_socket_read_until (SoupSocket *sock, gpointer buffer, gsize len, @@ -108,6 +123,7 @@ SoupSocketIOStatus soup_socket_read_until (SoupSocket *sock, GCancellable *cancellable, GError **error); +SOUP_AVAILABLE_IN_2_4 SoupSocketIOStatus soup_socket_write (SoupSocket *sock, gconstpointer buffer, gsize len, diff --git a/libsoup/soup-status.h b/libsoup/soup-status.h index fb4147c6..28d481db 100644 --- a/libsoup/soup-status.h +++ b/libsoup/soup-status.h @@ -93,11 +93,13 @@ typedef enum { SOUP_STATUS_NOT_EXTENDED = 510 /* RFC 2774 */ } SoupStatus; +SOUP_AVAILABLE_IN_2_4 const char *soup_status_get_phrase (guint status_code); SOUP_AVAILABLE_IN_2_26 guint soup_status_proxify (guint status_code); #define SOUP_HTTP_ERROR soup_http_error_quark() +SOUP_AVAILABLE_IN_2_4 GQuark soup_http_error_quark (void); #ifndef SOUP_DISABLE_DEPRECATED diff --git a/libsoup/soup-tld.c b/libsoup/soup-tld.c index 2e3da62d..f598a805 100644 --- a/libsoup/soup-tld.c +++ b/libsoup/soup-tld.c @@ -97,8 +97,7 @@ soup_tld_get_base_domain (const char *hostname, GError **error) * * Prior to libsoup 2.46, this function required that @domain be in * UTF-8 if it was an IDN. From 2.46 on, the name can be in either - * UTF-8 or ASCII format (and the return value will be in the same - * format). + * UTF-8 or ASCII format. * * Returns: %TRUE if it is a public domain, %FALSE otherwise. * diff --git a/libsoup/soup-types.h b/libsoup/soup-types.h index 0776bdbf..e020de7d 100644 --- a/libsoup/soup-types.h +++ b/libsoup/soup-types.h @@ -13,22 +13,24 @@ G_BEGIN_DECLS -typedef struct _SoupAddress SoupAddress; -typedef struct _SoupAuth SoupAuth; -typedef struct _SoupAuthDomain SoupAuthDomain; -typedef struct _SoupCookie SoupCookie; -typedef struct _SoupCookieJar SoupCookieJar; -typedef struct _SoupDate SoupDate; -typedef struct _SoupMessage SoupMessage; -typedef struct _SoupRequest SoupRequest; -typedef struct _SoupRequestHTTP SoupRequestHTTP; -typedef struct _SoupServer SoupServer; -typedef struct _SoupSession SoupSession; -typedef struct _SoupSessionAsync SoupSessionAsync; -typedef struct _SoupSessionFeature SoupSessionFeature; -typedef struct _SoupSessionSync SoupSessionSync; -typedef struct _SoupSocket SoupSocket; -typedef struct _SoupURI SoupURI; +typedef struct _SoupAddress SoupAddress; +typedef struct _SoupAuth SoupAuth; +typedef struct _SoupAuthDomain SoupAuthDomain; +typedef struct _SoupCookie SoupCookie; +typedef struct _SoupCookieJar SoupCookieJar; +typedef struct _SoupDate SoupDate; +typedef struct _SoupMessage SoupMessage; +typedef struct _SoupRequest SoupRequest; +typedef struct _SoupRequestHTTP SoupRequestHTTP; +typedef struct _SoupServer SoupServer; +typedef struct _SoupSession SoupSession; +typedef struct _SoupSessionAsync SoupSessionAsync; +typedef struct _SoupSessionFeature SoupSessionFeature; +typedef struct _SoupSessionSync SoupSessionSync; +typedef struct _SoupSocket SoupSocket; +typedef struct _SoupURI SoupURI; +typedef struct _SoupWebsocketConnection SoupWebsocketConnection; + /*< private >*/ typedef struct _SoupConnection SoupConnection; diff --git a/libsoup/soup-uri.c b/libsoup/soup-uri.c index 42c2f680..be778d6c 100644 --- a/libsoup/soup-uri.c +++ b/libsoup/soup-uri.c @@ -5,6 +5,10 @@ * Copyright 1999-2003 Ximian, Inc. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include @@ -29,7 +33,7 @@ * @scheme: the URI scheme (eg, "http") * @user: a username, or %NULL * @password: a password, or %NULL - * @host: the hostname or IP address + * @host: the hostname or IP address, or %NULL * @port: the port number on @host * @path: the path on @host * @query: a query for @path, or %NULL @@ -155,11 +159,30 @@ * * Since: 2.42 */ +/** + * SOUP_URI_SCHEME_WS: + * + * "ws" (WebSocket) as an interned string; you can compare this + * directly to a #SoupURI's scheme field using + * ==. + * + * Since: 2.50 + */ +/** + * SOUP_URI_SCHEME_WSS: + * + * "wss" (WebSocket over TLS) as an interned string; you can compare + * this directly to a #SoupURI's scheme field using + * ==. + * + * Since: 2.50 + */ static void append_uri_encoded (GString *str, const char *in, const char *extra_enc_chars); static char *uri_normalized_copy (const char *str, int length, const char *unescape_extra); gpointer _SOUP_URI_SCHEME_HTTP, _SOUP_URI_SCHEME_HTTPS; +gpointer _SOUP_URI_SCHEME_WS, _SOUP_URI_SCHEME_WSS; gpointer _SOUP_URI_SCHEME_FTP; gpointer _SOUP_URI_SCHEME_FILE, _SOUP_URI_SCHEME_DATA, _SOUP_URI_SCHEME_RESOURCE; @@ -172,6 +195,10 @@ soup_uri_parse_scheme (const char *scheme, int len) return SOUP_URI_SCHEME_HTTPS; } else if (len == 8 && !g_ascii_strncasecmp (scheme, "resource", len)) { return SOUP_URI_SCHEME_RESOURCE; + } else if (len == 2 && !g_ascii_strncasecmp (scheme, "ws", len)) { + return SOUP_URI_SCHEME_WS; + } else if (len == 3 && !g_ascii_strncasecmp (scheme, "wss", len)) { + return SOUP_URI_SCHEME_WSS; } else { char *lower_scheme; @@ -186,9 +213,9 @@ soup_uri_parse_scheme (const char *scheme, int len) static inline guint soup_scheme_default_port (const char *scheme) { - if (scheme == SOUP_URI_SCHEME_HTTP) + if (scheme == SOUP_URI_SCHEME_HTTP || scheme == SOUP_URI_SCHEME_WS) return 80; - else if (scheme == SOUP_URI_SCHEME_HTTPS) + else if (scheme == SOUP_URI_SCHEME_HTTPS || scheme == SOUP_URI_SCHEME_WSS) return 443; else if (scheme == SOUP_URI_SCHEME_FTP) return 21; @@ -426,7 +453,7 @@ soup_uri_new_with_base (SoupURI *base, const char *uri_string) } /* Remove "/.." at end where != ".." */ q = strrchr (uri->path, '/'); - if (q && !strcmp (q, "/..")) { + if (q && q != uri->path && !strcmp (q, "/..")) { p = q - 1; while (p > uri->path && *p != '/') p--; @@ -478,8 +505,8 @@ soup_uri_new_with_base (SoupURI *base, const char *uri_string) * call at least soup_uri_set_scheme() and soup_uri_set_path(), since * those fields are required.) * - * Return value: a #SoupURI, or %NULL if the given string was found to be - * invalid. + * Return value: (nullable): a #SoupURI, or %NULL if the given string + * was found to be invalid. **/ SoupURI * soup_uri_new (const char *uri_string) @@ -503,7 +530,7 @@ soup_uri_new (const char *uri_string) char * soup_uri_to_string_internal (SoupURI *uri, gboolean just_path_and_query, - gboolean force_port) + gboolean include_password, gboolean force_port) { GString *str; char *return_result; @@ -519,6 +546,10 @@ soup_uri_to_string_internal (SoupURI *uri, gboolean just_path_and_query, g_string_append (str, "//"); if (uri->user) { append_uri_encoded (str, uri->user, ":;@?/"); + if (uri->password && include_password) { + g_string_append_c (str, ':'); + append_uri_encoded (str, uri->password, ";@?/"); + } g_string_append_c (str, '@'); } if (strchr (uri->host, ':')) { @@ -584,7 +615,7 @@ soup_uri_to_string_internal (SoupURI *uri, gboolean just_path_and_query, char * soup_uri_to_string (SoupURI *uri, gboolean just_path_and_query) { - return soup_uri_to_string_internal (uri, just_path_and_query, FALSE); + return soup_uri_to_string_internal (uri, just_path_and_query, FALSE, FALSE); } /** @@ -838,10 +869,11 @@ uri_normalized_copy (const char *part, int length, /** * soup_uri_normalize: * @part: a URI part - * @unescape_extra: reserved characters to unescape (or %NULL) + * @unescape_extra: (allow-none): reserved characters to unescape (or %NULL) * * %-decodes any "unreserved" characters (or characters in - * @unescape_extra) in @part. + * @unescape_extra) in @part, and %-encodes any non-ASCII + * characters, spaces, and non-printing characters in @part. * * "Unreserved" characters are those that are not allowed to be used * for punctuation according to the URI spec. For example, letters are @@ -1302,9 +1334,11 @@ soup_uri_is_http (SoupURI *uri, char **aliases) { int i; - if (uri->scheme == SOUP_URI_SCHEME_HTTP) + if (uri->scheme == SOUP_URI_SCHEME_HTTP || + uri->scheme == SOUP_URI_SCHEME_WS) return TRUE; - else if (uri->scheme == SOUP_URI_SCHEME_HTTPS) + else if (uri->scheme == SOUP_URI_SCHEME_HTTPS || + uri->scheme == SOUP_URI_SCHEME_WSS) return FALSE; else if (!aliases) return FALSE; @@ -1325,9 +1359,11 @@ soup_uri_is_https (SoupURI *uri, char **aliases) { int i; - if (uri->scheme == SOUP_URI_SCHEME_HTTPS) + if (uri->scheme == SOUP_URI_SCHEME_HTTPS || + uri->scheme == SOUP_URI_SCHEME_WSS) return TRUE; - else if (uri->scheme == SOUP_URI_SCHEME_HTTP) + else if (uri->scheme == SOUP_URI_SCHEME_HTTP || + uri->scheme == SOUP_URI_SCHEME_WS) return FALSE; else if (!aliases) return FALSE; diff --git a/libsoup/soup-uri.h b/libsoup/soup-uri.h index fca97f76..b9360c64 100644 --- a/libsoup/soup-uri.h +++ b/libsoup/soup-uri.h @@ -28,6 +28,7 @@ struct _SoupURI { char *fragment; }; +SOUP_AVAILABLE_IN_2_4 GType soup_uri_get_type (void); #define SOUP_TYPE_URI (soup_uri_get_type ()) @@ -37,67 +38,91 @@ GType soup_uri_get_type (void); #define SOUP_URI_SCHEME_FILE _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_FILE, "file") #define SOUP_URI_SCHEME_DATA _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_DATA, "data") #define SOUP_URI_SCHEME_RESOURCE _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_RESOURCE, "resource") -extern gpointer _SOUP_URI_SCHEME_HTTP, _SOUP_URI_SCHEME_HTTPS; -extern gpointer _SOUP_URI_SCHEME_FTP; -extern gpointer _SOUP_URI_SCHEME_FILE, _SOUP_URI_SCHEME_DATA, _SOUP_URI_SCHEME_RESOURCE; +#define SOUP_URI_SCHEME_WS _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_WS, "ws") +#define SOUP_URI_SCHEME_WSS _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_WSS, "wss") +SOUP_VAR gpointer _SOUP_URI_SCHEME_HTTP, _SOUP_URI_SCHEME_HTTPS; +SOUP_VAR gpointer _SOUP_URI_SCHEME_FTP; +SOUP_VAR gpointer _SOUP_URI_SCHEME_FILE, _SOUP_URI_SCHEME_DATA, _SOUP_URI_SCHEME_RESOURCE; +SOUP_VAR gpointer _SOUP_URI_SCHEME_WS, _SOUP_URI_SCHEME_WSS; + +SOUP_AVAILABLE_IN_2_4 SoupURI *soup_uri_new_with_base (SoupURI *base, const char *uri_string); +SOUP_AVAILABLE_IN_2_4 SoupURI *soup_uri_new (const char *uri_string); +SOUP_AVAILABLE_IN_2_4 char *soup_uri_to_string (SoupURI *uri, gboolean just_path_and_query); +SOUP_AVAILABLE_IN_2_4 SoupURI *soup_uri_copy (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 gboolean soup_uri_equal (SoupURI *uri1, SoupURI *uri2); +SOUP_AVAILABLE_IN_2_4 void soup_uri_free (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 char *soup_uri_encode (const char *part, const char *escape_extra); +SOUP_AVAILABLE_IN_2_4 char *soup_uri_decode (const char *part); +SOUP_AVAILABLE_IN_2_4 char *soup_uri_normalize (const char *part, const char *unescape_extra); +SOUP_AVAILABLE_IN_2_4 gboolean soup_uri_uses_default_port (SoupURI *uri); SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_scheme (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_scheme (SoupURI *uri, const char *scheme); SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_user (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_user (SoupURI *uri, const char *user); SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_password (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_password (SoupURI *uri, const char *password); SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_host (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_host (SoupURI *uri, const char *host); SOUP_AVAILABLE_IN_2_32 guint soup_uri_get_port (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_port (SoupURI *uri, guint port); SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_path (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_path (SoupURI *uri, const char *path); SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_query (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_query (SoupURI *uri, const char *query); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_query_from_form (SoupURI *uri, GHashTable *form); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_query_from_fields (SoupURI *uri, const char *first_field, ...) G_GNUC_NULL_TERMINATED; SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_fragment (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_fragment (SoupURI *uri, const char *fragment); diff --git a/libsoup/soup-value-utils.c b/libsoup/soup-value-utils.c index e1f7c92f..014eb5bc 100644 --- a/libsoup/soup-value-utils.c +++ b/libsoup/soup-value-utils.c @@ -23,6 +23,8 @@ * * They are written for use with soup-xmlrpc, but they also work with * types not used by XML-RPC. + * + * Deprecated: Use #GVariant API instead. **/ /** @@ -34,6 +36,8 @@ * Copies an argument of type @type from @args into @val. @val will * point directly to the value in @args rather than copying it, so you * must g_value_copy() it if you want it to remain valid. + * + * Deprecated: Use #GVariant API instead. **/ /** @@ -45,8 +49,13 @@ * Extracts a value of type @type from @val into @args. The return * value will point to the same data as @val rather than being a copy * of it. + * + * Deprecated: Use #GVariant API instead. **/ +/* This whole file is deprecated and replaced by GVariant API */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + static void soup_value_hash_value_free (gpointer val) { @@ -62,6 +71,8 @@ soup_value_hash_value_free (gpointer val) * * Return value: (element-type utf8 GValue) (transfer full): a new * empty #GHashTable + * + * Deprecated: Use #GVariant API instead. **/ GHashTable * soup_value_hash_new (void) @@ -101,6 +112,8 @@ soup_value_hash_insert_valist (GHashTable *hash, const char *first_key, * * Return value: (element-type utf8 GValue) (transfer full): a new * #GHashTable, initialized with the given values + * + * Deprecated: Use #GVariant API instead. **/ GHashTable * soup_value_hash_new_with_vals (const char *first_key, ...) @@ -123,6 +136,8 @@ soup_value_hash_new_with_vals (const char *first_key, ...) * * Inserts @value into @hash. (Unlike with g_hash_table_insert(), both * the key and the value are copied). + * + * Deprecated: Use #GVariant API instead. **/ void soup_value_hash_insert_value (GHashTable *hash, const char *key, GValue *value) @@ -143,6 +158,8 @@ soup_value_hash_insert_value (GHashTable *hash, const char *key, GValue *value) * * Inserts the provided value of type @type into @hash. (Unlike with * g_hash_table_insert(), both the key and the value are copied). + * + * Deprecated: Use #GVariant API instead. **/ void soup_value_hash_insert (GHashTable *hash, const char *key, GType type, ...) @@ -166,6 +183,8 @@ soup_value_hash_insert (GHashTable *hash, const char *key, GType type, ...) * Inserts the given data into @hash. As with * soup_value_hash_insert(), the keys and values are copied rather * than being inserted directly. + * + * Deprecated: Use #GVariant API instead. **/ void soup_value_hash_insert_vals (GHashTable *hash, const char *first_key, ...) @@ -189,6 +208,8 @@ soup_value_hash_insert_vals (GHashTable *hash, const char *first_key, ...) * * Return value: %TRUE if @hash contained a value with key @key and * type @type, %FALSE if not. + * + * Deprecated: Use #GVariant API instead. **/ gboolean soup_value_hash_lookup (GHashTable *hash, const char *key, GType type, ...) @@ -222,6 +243,8 @@ soup_value_hash_lookup (GHashTable *hash, const char *key, GType type, ...) * initialize each destination variable to a reasonable default * value, since there is no way to tell which keys were found * and which were not. + * + * Deprecated: Use #GVariant API instead. **/ gboolean soup_value_hash_lookup_vals (GHashTable *hash, const char *first_key, ...) @@ -253,10 +276,6 @@ soup_value_hash_lookup_vals (GHashTable *hash, const char *first_key, ...) } -#ifdef G_GNUC_BEGIN_IGNORE_DEPRECATIONS -G_GNUC_BEGIN_IGNORE_DEPRECATIONS -#endif - /** * soup_value_array_from_args: * @args: arguments to create a #GValueArray from @@ -266,7 +285,10 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS * by %G_TYPE_INVALID. (The array will contain copies of the provided * data rather than pointing to the passed-in data directly.) * - * Return value: a new #GValueArray, or %NULL if an error occurred. + * Return value: (nullable): a new #GValueArray, or %NULL if an error + * occurred. + * + * Deprecated: Use #GVariant API instead. **/ GValueArray * soup_value_array_from_args (va_list args) @@ -294,13 +316,15 @@ soup_value_array_from_args (va_list args) * same memory as the values in the array. * * Return value: success or failure + * + * Deprecated: Use #GVariant API instead. **/ gboolean soup_value_array_to_args (GValueArray *array, va_list args) { GType type; GValue *value; - int i; + guint i; for (i = 0; i < array->n_values; i++) { type = va_arg (args, GType); @@ -321,6 +345,8 @@ soup_value_array_to_args (GValueArray *array, va_list args) * g_value_array_new(), for naming consistency purposes.) * * Return value: a new %GValueArray + * + * Deprecated: Use #GVariant API instead. **/ GValueArray * soup_value_array_new (void) @@ -354,6 +380,8 @@ soup_value_array_append_valist (GValueArray *array, * into it. * * Return value: a new %GValueArray + * + * Deprecated: Use #GVariant API instead. **/ GValueArray * soup_value_array_new_with_vals (GType first_type, ...) @@ -378,6 +406,8 @@ soup_value_array_new_with_vals (GType first_type, ...) * Inserts the provided value of type @type into @array as with * g_value_array_insert(). (The provided data is copied rather than * being inserted directly.) + * + * Deprecated: Use #GVariant API instead. **/ void soup_value_array_insert (GValueArray *array, guint index_, GType type, ...) @@ -400,6 +430,8 @@ soup_value_array_insert (GValueArray *array, guint index_, GType type, ...) * Appends the provided value of type @type to @array as with * g_value_array_append(). (The provided data is copied rather than * being inserted directly.) + * + * Deprecated: Use #GVariant API instead. **/ void soup_value_array_append (GValueArray *array, GType type, ...) @@ -423,6 +455,8 @@ soup_value_array_append (GValueArray *array, GType type, ...) * Appends the provided values into @array as with * g_value_array_append(). (The provided data is copied rather than * being inserted directly.) + * + * Deprecated: Use #GVariant API instead. **/ void soup_value_array_append_vals (GValueArray *array, GType first_type, ...) @@ -446,6 +480,8 @@ soup_value_array_append_vals (GValueArray *array, GType first_type, ...) * * Return value: %TRUE if @array contained a value with index @index_ * and type @type, %FALSE if not. + * + * Deprecated: Use #GVariant API instead. **/ gboolean soup_value_array_get_nth (GValueArray *array, guint index_, GType type, ...) @@ -463,10 +499,6 @@ soup_value_array_get_nth (GValueArray *array, guint index_, GType type, ...) return TRUE; } -#ifdef G_GNUC_END_IGNORE_DEPRECATIONS -G_GNUC_END_IGNORE_DEPRECATIONS -#endif - static GByteArray * soup_byte_array_copy (GByteArray *ba) { @@ -488,6 +520,10 @@ soup_byte_array_free (GByteArray *ba) * * glib did not used to define a #GType for #GByteArray, so libsoup * defines this one itself. + * + * Deprecated: Use #GVariant API instead. **/ typedef GByteArray SoupByteArray; G_DEFINE_BOXED_TYPE (SoupByteArray, soup_byte_array, soup_byte_array_copy, soup_byte_array_free) + +G_GNUC_END_IGNORE_DEPRECATIONS diff --git a/libsoup/soup-value-utils.h b/libsoup/soup-value-utils.h index 1d265263..7910beff 100644 --- a/libsoup/soup-value-utils.h +++ b/libsoup/soup-value-utils.h @@ -13,69 +13,99 @@ G_BEGIN_DECLS #define SOUP_VALUE_SETV(val, type, args) \ G_STMT_START { \ - char *error = NULL; \ + char *setv_error = NULL; \ \ memset (val, 0, sizeof (GValue)); \ g_value_init (val, type); \ - G_VALUE_COLLECT (val, args, G_VALUE_NOCOPY_CONTENTS, &error); \ - if (error) \ - g_free (error); \ + G_VALUE_COLLECT (val, args, G_VALUE_NOCOPY_CONTENTS, &setv_error); \ + g_free (setv_error); \ } G_STMT_END #define SOUP_VALUE_GETV(val, type, args) \ G_STMT_START { \ - char *error = NULL; \ + char *getv_error = NULL; \ \ - G_VALUE_LCOPY (val, args, G_VALUE_NOCOPY_CONTENTS, &error); \ - if (error) \ - g_free (error); \ + G_VALUE_LCOPY (val, args, G_VALUE_NOCOPY_CONTENTS, &getv_error); \ + g_free (getv_error); \ } G_STMT_END +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52 GHashTable *soup_value_hash_new (void); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52 GHashTable *soup_value_hash_new_with_vals (const char *first_key, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52 void soup_value_hash_insert_value (GHashTable *hash, const char *key, GValue *value); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52 void soup_value_hash_insert (GHashTable *hash, const char *key, GType type, ...); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52 void soup_value_hash_insert_vals (GHashTable *hash, const char *first_key, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52 gboolean soup_value_hash_lookup (GHashTable *hash, const char *key, GType type, ...); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52 gboolean soup_value_hash_lookup_vals (GHashTable *hash, const char *first_key, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52 GValueArray *soup_value_array_from_args (va_list args); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52 gboolean soup_value_array_to_args (GValueArray *array, va_list args); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52 GValueArray *soup_value_array_new (void); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52 GValueArray *soup_value_array_new_with_vals (GType first_type, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52 void soup_value_array_insert (GValueArray *array, guint index_, GType type, ...); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52 void soup_value_array_append (GValueArray *array, GType type, ...); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52 void soup_value_array_append_vals (GValueArray *array, GType first_type, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52 gboolean soup_value_array_get_nth (GValueArray *array, guint index_, GType type, ...); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52 GType soup_byte_array_get_type (void); #define SOUP_TYPE_BYTE_ARRAY (soup_byte_array_get_type ()) diff --git a/libsoup/soup-version.c b/libsoup/soup-version.c index 31e7262d..99c3b530 100644 --- a/libsoup/soup-version.c +++ b/libsoup/soup-version.c @@ -305,3 +305,33 @@ soup_check_version (guint major, * * Since: 2.46 */ + +/** + * SOUP_VERSION_2_48: + * + * A macro that evaluates to the 2.48 version of libsoup, in a format + * that can be used by %SOUP_VERSION_MIN_REQUIRED and + * %SOUP_VERSION_MAX_ALLOWED. + * + * Since: 2.48 + */ + +/** + * SOUP_VERSION_2_50: + * + * A macro that evaluates to the 2.50 version of libsoup, in a format + * that can be used by %SOUP_VERSION_MIN_REQUIRED and + * %SOUP_VERSION_MAX_ALLOWED. + * + * Since: 2.50 + */ + +/** + * SOUP_VERSION_2_52: + * + * A macro that evaluates to the 2.52 version of libsoup, in a format + * that can be used by %SOUP_VERSION_MIN_REQUIRED and + * %SOUP_VERSION_MAX_ALLOWED. + * + * Since: 2.52 + */ diff --git a/libsoup/soup-version.h.in b/libsoup/soup-version.h.in index 000b9456..0af245be 100644 --- a/libsoup/soup-version.h.in +++ b/libsoup/soup-version.h.in @@ -22,47 +22,65 @@ G_BEGIN_DECLS (SOUP_MAJOR_VERSION == (major) && SOUP_MINOR_VERSION == (minor) && \ SOUP_MICRO_VERSION >= (micro))) -guint soup_get_major_version (void); - -guint soup_get_minor_version (void); - -guint soup_get_micro_version (void); +#ifndef _SOUP_EXTERN +#define _SOUP_EXTERN extern +#endif -gboolean soup_check_version (guint major, - guint minor, - guint micro); +/* We prefix variable declarations so they can + * properly get exported in Windows DLLs. + */ +#ifndef SOUP_VAR +# ifdef G_PLATFORM_WIN32 +# ifdef LIBSOUP_COMPILATION +# ifdef DLL_EXPORT +# define SOUP_VAR __declspec(dllexport) +# else /* !DLL_EXPORT */ +# define SOUP_VAR extern +# endif /* !DLL_EXPORT */ +# else /* !SOUP_COMPILATION */ +# define SOUP_VAR extern __declspec(dllimport) +# endif /* !LIBSOUP_COMPILATION */ +# else /* !G_PLATFORM_WIN32 */ +# define SOUP_VAR _SOUP_EXTERN +# endif /* !G_PLATFORM_WIN32 */ +#endif /* SOUP_VAR */ /* Deprecation / Availability macros */ -#define SOUP_ENCODE_VERSION(major,minor) ((major) << 16 | (minor) << 8) - -#define SOUP_VERSION_2_24 (SOUP_ENCODE_VERSION (2, 24)) -#define SOUP_VERSION_2_26 (SOUP_ENCODE_VERSION (2, 26)) -#define SOUP_VERSION_2_28 (SOUP_ENCODE_VERSION (2, 28)) -#define SOUP_VERSION_2_30 (SOUP_ENCODE_VERSION (2, 30)) -#define SOUP_VERSION_2_32 (SOUP_ENCODE_VERSION (2, 32)) -#define SOUP_VERSION_2_34 (SOUP_ENCODE_VERSION (2, 34)) -#define SOUP_VERSION_2_36 (SOUP_ENCODE_VERSION (2, 36)) -#define SOUP_VERSION_2_38 (SOUP_ENCODE_VERSION (2, 38)) -#define SOUP_VERSION_2_40 (SOUP_ENCODE_VERSION (2, 40)) -#define SOUP_VERSION_2_42 (SOUP_ENCODE_VERSION (2, 42)) -#define SOUP_VERSION_2_44 (SOUP_ENCODE_VERSION (2, 44)) -#define SOUP_VERSION_2_46 (SOUP_ENCODE_VERSION (2, 46)) +#define SOUP_VERSION_2_24 (G_ENCODE_VERSION (2, 24)) +#define SOUP_VERSION_2_26 (G_ENCODE_VERSION (2, 26)) +#define SOUP_VERSION_2_28 (G_ENCODE_VERSION (2, 28)) +#define SOUP_VERSION_2_30 (G_ENCODE_VERSION (2, 30)) +#define SOUP_VERSION_2_32 (G_ENCODE_VERSION (2, 32)) +#define SOUP_VERSION_2_34 (G_ENCODE_VERSION (2, 34)) +#define SOUP_VERSION_2_36 (G_ENCODE_VERSION (2, 36)) +#define SOUP_VERSION_2_38 (G_ENCODE_VERSION (2, 38)) +#define SOUP_VERSION_2_40 (G_ENCODE_VERSION (2, 40)) +#define SOUP_VERSION_2_42 (G_ENCODE_VERSION (2, 42)) +#define SOUP_VERSION_2_44 (G_ENCODE_VERSION (2, 44)) +#define SOUP_VERSION_2_46 (G_ENCODE_VERSION (2, 46)) +#define SOUP_VERSION_2_48 (G_ENCODE_VERSION (2, 48)) +#define SOUP_VERSION_2_50 (G_ENCODE_VERSION (2, 50)) +#define SOUP_VERSION_2_52 (G_ENCODE_VERSION (2, 52)) +#define SOUP_VERSION_2_54 (G_ENCODE_VERSION (2, 54)) +#define SOUP_VERSION_2_56 (G_ENCODE_VERSION (2, 56)) +#define SOUP_VERSION_2_58 (G_ENCODE_VERSION (2, 58)) +#define SOUP_VERSION_2_62 (G_ENCODE_VERSION (2, 62)) /* evaluates to the current stable version; for development cycles, * this means the next stable target */ #if (SOUP_MINOR_VERSION % 2) -#define SOUP_VERSION_CUR_STABLE (SOUP_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION + 1)) +#define SOUP_VERSION_CUR_STABLE (G_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION + 1)) #else -#define SOUP_VERSION_CUR_STABLE (SOUP_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION)) +#define SOUP_VERSION_CUR_STABLE (G_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION)) #endif /* evaluates to the previous stable version */ #if (SOUP_MINOR_VERSION % 2) -#define SOUP_VERSION_PREV_STABLE (SOUP_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION - 1)) +#define SOUP_VERSION_PREV_STABLE (G_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION - 1)) #else -#define SOUP_VERSION_PREV_STABLE (SOUP_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION - 2)) +#define SOUP_VERSION_PREV_STABLE (G_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION - 2)) #endif #ifndef SOUP_VERSION_MIN_REQUIRED @@ -88,174 +106,288 @@ gboolean soup_check_version (guint major, #error "SOUP_VERSION_MIN_REQUIRED must be >= SOUP_VERSION_2_24" #endif +#define SOUP_AVAILABLE_IN_2_4 _SOUP_EXTERN + #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_24 -# define SOUP_DEPRECATED_IN_2_24 GLIB_DEPRECATED -# define SOUP_DEPRECATED_IN_2_24_FOR(f) GLIB_DEPRECATED_FOR(f) +# define SOUP_DEPRECATED_IN_2_24 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_24_FOR(f) G_DEPRECATED_FOR(f) #else # define SOUP_DEPRECATED_IN_2_24 # define SOUP_DEPRECATED_IN_2_24_FOR(f) #endif #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_24 -# define SOUP_AVAILABLE_IN_2_24 GLIB_UNAVAILABLE(2, 24) +# define SOUP_AVAILABLE_IN_2_24 G_UNAVAILABLE(2, 24) _SOUP_EXTERN #else -# define SOUP_AVAILABLE_IN_2_24 +# define SOUP_AVAILABLE_IN_2_24 _SOUP_EXTERN #endif #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_26 -# define SOUP_DEPRECATED_IN_2_26 GLIB_DEPRECATED -# define SOUP_DEPRECATED_IN_2_26_FOR(f) GLIB_DEPRECATED_FOR(f) +# define SOUP_DEPRECATED_IN_2_26 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_26_FOR(f) G_DEPRECATED_FOR(f) #else # define SOUP_DEPRECATED_IN_2_26 # define SOUP_DEPRECATED_IN_2_26_FOR(f) #endif #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_26 -# define SOUP_AVAILABLE_IN_2_26 GLIB_UNAVAILABLE(2, 26) +# define SOUP_AVAILABLE_IN_2_26 G_UNAVAILABLE(2, 26) _SOUP_EXTERN #else -# define SOUP_AVAILABLE_IN_2_26 +# define SOUP_AVAILABLE_IN_2_26 _SOUP_EXTERN #endif #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_28 -# define SOUP_DEPRECATED_IN_2_28 GLIB_DEPRECATED -# define SOUP_DEPRECATED_IN_2_28_FOR(f) GLIB_DEPRECATED_FOR(f) +# define SOUP_DEPRECATED_IN_2_28 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_28_FOR(f) G_DEPRECATED_FOR(f) #else # define SOUP_DEPRECATED_IN_2_28 # define SOUP_DEPRECATED_IN_2_28_FOR(f) #endif #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_28 -# define SOUP_AVAILABLE_IN_2_28 GLIB_UNAVAILABLE(2, 28) +# define SOUP_AVAILABLE_IN_2_28 G_UNAVAILABLE(2, 28) _SOUP_EXTERN #else -# define SOUP_AVAILABLE_IN_2_28 +# define SOUP_AVAILABLE_IN_2_28 _SOUP_EXTERN #endif #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_30 -# define SOUP_DEPRECATED_IN_2_30 GLIB_DEPRECATED -# define SOUP_DEPRECATED_IN_2_30_FOR(f) GLIB_DEPRECATED_FOR(f) +# define SOUP_DEPRECATED_IN_2_30 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_30_FOR(f) G_DEPRECATED_FOR(f) #else # define SOUP_DEPRECATED_IN_2_30 # define SOUP_DEPRECATED_IN_2_30_FOR(f) #endif #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_30 -# define SOUP_AVAILABLE_IN_2_30 GLIB_UNAVAILABLE(2, 30) +# define SOUP_AVAILABLE_IN_2_30 G_UNAVAILABLE(2, 30) _SOUP_EXTERN #else -# define SOUP_AVAILABLE_IN_2_30 +# define SOUP_AVAILABLE_IN_2_30 _SOUP_EXTERN #endif #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_32 -# define SOUP_DEPRECATED_IN_2_32 GLIB_DEPRECATED -# define SOUP_DEPRECATED_IN_2_32_FOR(f) GLIB_DEPRECATED_FOR(f) +# define SOUP_DEPRECATED_IN_2_32 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_32_FOR(f) G_DEPRECATED_FOR(f) #else # define SOUP_DEPRECATED_IN_2_32 # define SOUP_DEPRECATED_IN_2_32_FOR(f) #endif #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_32 -# define SOUP_AVAILABLE_IN_2_32 GLIB_UNAVAILABLE(2, 32) +# define SOUP_AVAILABLE_IN_2_32 G_UNAVAILABLE(2, 32) _SOUP_EXTERN #else -# define SOUP_AVAILABLE_IN_2_32 +# define SOUP_AVAILABLE_IN_2_32 _SOUP_EXTERN #endif #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_34 -# define SOUP_DEPRECATED_IN_2_34 GLIB_DEPRECATED -# define SOUP_DEPRECATED_IN_2_34_FOR(f) GLIB_DEPRECATED_FOR(f) +# define SOUP_DEPRECATED_IN_2_34 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_34_FOR(f) G_DEPRECATED_FOR(f) #else # define SOUP_DEPRECATED_IN_2_34 # define SOUP_DEPRECATED_IN_2_34_FOR(f) #endif #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_34 -# define SOUP_AVAILABLE_IN_2_34 GLIB_UNAVAILABLE(2, 34) +# define SOUP_AVAILABLE_IN_2_34 G_UNAVAILABLE(2, 34) _SOUP_EXTERN #else -# define SOUP_AVAILABLE_IN_2_34 +# define SOUP_AVAILABLE_IN_2_34 _SOUP_EXTERN #endif #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_36 -# define SOUP_DEPRECATED_IN_2_36 GLIB_DEPRECATED -# define SOUP_DEPRECATED_IN_2_36_FOR(f) GLIB_DEPRECATED_FOR(f) +# define SOUP_DEPRECATED_IN_2_36 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_36_FOR(f) G_DEPRECATED_FOR(f) #else # define SOUP_DEPRECATED_IN_2_36 # define SOUP_DEPRECATED_IN_2_36_FOR(f) #endif #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_36 -# define SOUP_AVAILABLE_IN_2_36 GLIB_UNAVAILABLE(2, 36) +# define SOUP_AVAILABLE_IN_2_36 G_UNAVAILABLE(2, 36) _SOUP_EXTERN #else -# define SOUP_AVAILABLE_IN_2_36 +# define SOUP_AVAILABLE_IN_2_36 _SOUP_EXTERN #endif #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_38 -# define SOUP_DEPRECATED_IN_2_38 GLIB_DEPRECATED -# define SOUP_DEPRECATED_IN_2_38_FOR(f) GLIB_DEPRECATED_FOR(f) +# define SOUP_DEPRECATED_IN_2_38 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_38_FOR(f) G_DEPRECATED_FOR(f) #else # define SOUP_DEPRECATED_IN_2_38 # define SOUP_DEPRECATED_IN_2_38_FOR(f) #endif #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_38 -# define SOUP_AVAILABLE_IN_2_38 GLIB_UNAVAILABLE(2, 38) +# define SOUP_AVAILABLE_IN_2_38 G_UNAVAILABLE(2, 38) _SOUP_EXTERN #else -# define SOUP_AVAILABLE_IN_2_38 +# define SOUP_AVAILABLE_IN_2_38 _SOUP_EXTERN #endif #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_40 -# define SOUP_DEPRECATED_IN_2_40 GLIB_DEPRECATED -# define SOUP_DEPRECATED_IN_2_40_FOR(f) GLIB_DEPRECATED_FOR(f) +# define SOUP_DEPRECATED_IN_2_40 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_40_FOR(f) G_DEPRECATED_FOR(f) #else # define SOUP_DEPRECATED_IN_2_40 # define SOUP_DEPRECATED_IN_2_40_FOR(f) #endif #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_40 -# define SOUP_AVAILABLE_IN_2_40 GLIB_UNAVAILABLE(2, 40) +# define SOUP_AVAILABLE_IN_2_40 G_UNAVAILABLE(2, 40) _SOUP_EXTERN #else -# define SOUP_AVAILABLE_IN_2_40 +# define SOUP_AVAILABLE_IN_2_40 _SOUP_EXTERN #endif #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_42 -# define SOUP_DEPRECATED_IN_2_42 GLIB_DEPRECATED -# define SOUP_DEPRECATED_IN_2_42_FOR(f) GLIB_DEPRECATED_FOR(f) +# define SOUP_DEPRECATED_IN_2_42 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_42_FOR(f) G_DEPRECATED_FOR(f) #else # define SOUP_DEPRECATED_IN_2_42 # define SOUP_DEPRECATED_IN_2_42_FOR(f) #endif #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_42 -# define SOUP_AVAILABLE_IN_2_42 GLIB_UNAVAILABLE(2, 42) +# define SOUP_AVAILABLE_IN_2_42 G_UNAVAILABLE(2, 42) _SOUP_EXTERN #else -# define SOUP_AVAILABLE_IN_2_42 +# define SOUP_AVAILABLE_IN_2_42 _SOUP_EXTERN #endif #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_44 -# define SOUP_DEPRECATED_IN_2_44 GLIB_DEPRECATED -# define SOUP_DEPRECATED_IN_2_44_FOR(f) GLIB_DEPRECATED_FOR(f) +# define SOUP_DEPRECATED_IN_2_44 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_44_FOR(f) G_DEPRECATED_FOR(f) #else # define SOUP_DEPRECATED_IN_2_44 # define SOUP_DEPRECATED_IN_2_44_FOR(f) #endif #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_44 -# define SOUP_AVAILABLE_IN_2_44 GLIB_UNAVAILABLE(2, 44) +# define SOUP_AVAILABLE_IN_2_44 G_UNAVAILABLE(2, 44) _SOUP_EXTERN #else -# define SOUP_AVAILABLE_IN_2_44 +# define SOUP_AVAILABLE_IN_2_44 _SOUP_EXTERN #endif #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_46 -# define SOUP_DEPRECATED_IN_2_46 GLIB_DEPRECATED -# define SOUP_DEPRECATED_IN_2_46_FOR(f) GLIB_DEPRECATED_FOR(f) +# define SOUP_DEPRECATED_IN_2_46 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_46_FOR(f) G_DEPRECATED_FOR(f) #else # define SOUP_DEPRECATED_IN_2_46 # define SOUP_DEPRECATED_IN_2_46_FOR(f) #endif #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_46 -# define SOUP_AVAILABLE_IN_2_46 GLIB_UNAVAILABLE(2, 46) +# define SOUP_AVAILABLE_IN_2_46 G_UNAVAILABLE(2, 46) _SOUP_EXTERN +#else +# define SOUP_AVAILABLE_IN_2_46 _SOUP_EXTERN +#endif + +#if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_48 +# define SOUP_DEPRECATED_IN_2_48 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_48_FOR(f) G_DEPRECATED_FOR(f) +#else +# define SOUP_DEPRECATED_IN_2_48 +# define SOUP_DEPRECATED_IN_2_48_FOR(f) +#endif + +#if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_48 +# define SOUP_AVAILABLE_IN_2_48 G_UNAVAILABLE(2, 48) _SOUP_EXTERN +#else +# define SOUP_AVAILABLE_IN_2_48 _SOUP_EXTERN +#endif + +#if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_50 +# define SOUP_DEPRECATED_IN_2_50 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_50_FOR(f) G_DEPRECATED_FOR(f) +#else +# define SOUP_DEPRECATED_IN_2_50 +# define SOUP_DEPRECATED_IN_2_50_FOR(f) +#endif + +#if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_50 +# define SOUP_AVAILABLE_IN_2_50 G_UNAVAILABLE(2, 50) _SOUP_EXTERN +#else +# define SOUP_AVAILABLE_IN_2_50 _SOUP_EXTERN +#endif + +#if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_52 +# define SOUP_DEPRECATED_IN_2_52 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_52_FOR(f) G_DEPRECATED_FOR(f) +#else +# define SOUP_DEPRECATED_IN_2_52 +# define SOUP_DEPRECATED_IN_2_52_FOR(f) +#endif + +#if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_52 +# define SOUP_AVAILABLE_IN_2_52 G_UNAVAILABLE(2, 52) _SOUP_EXTERN +#else +# define SOUP_AVAILABLE_IN_2_52 _SOUP_EXTERN +#endif + +#if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_54 +# define SOUP_DEPRECATED_IN_2_54 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_54_FOR(f) G_DEPRECATED_FOR(f) #else -# define SOUP_AVAILABLE_IN_2_46 +# define SOUP_DEPRECATED_IN_2_54 +# define SOUP_DEPRECATED_IN_2_54_FOR(f) #endif +#if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_54 +# define SOUP_AVAILABLE_IN_2_54 G_UNAVAILABLE(2, 54) _SOUP_EXTERN +#else +# define SOUP_AVAILABLE_IN_2_54 _SOUP_EXTERN +#endif + +#if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_56 +# define SOUP_DEPRECATED_IN_2_56 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_56_FOR(f) G_DEPRECATED_FOR(f) +#else +# define SOUP_DEPRECATED_IN_2_56 +# define SOUP_DEPRECATED_IN_2_56_FOR(f) +#endif + +#if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_56 +# define SOUP_AVAILABLE_IN_2_56 G_UNAVAILABLE(2, 56) _SOUP_EXTERN +#else +# define SOUP_AVAILABLE_IN_2_56 _SOUP_EXTERN +#endif + +#if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_58 +# define SOUP_DEPRECATED_IN_2_58 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_58_FOR(f) G_DEPRECATED_FOR(f) +#else +# define SOUP_DEPRECATED_IN_2_58 +# define SOUP_DEPRECATED_IN_2_58_FOR(f) +#endif + +#if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_58 +# define SOUP_AVAILABLE_IN_2_58 G_UNAVAILABLE(2, 58) _SOUP_EXTERN +#else +# define SOUP_AVAILABLE_IN_2_58 _SOUP_EXTERN +#endif + +#if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_62 +# define SOUP_DEPRECATED_IN_2_62 G_DEPRECATED +# define SOUP_DEPRECATED_IN_2_62_FOR(f) G_DEPRECATED_FOR(f) +#else +# define SOUP_DEPRECATED_IN_2_62 +# define SOUP_DEPRECATED_IN_2_62_FOR(f) +#endif + +#if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_62 +# define SOUP_AVAILABLE_IN_2_62 G_UNAVAILABLE(2, 62) _SOUP_EXTERN +#else +# define SOUP_AVAILABLE_IN_2_62 _SOUP_EXTERN +#endif + +SOUP_AVAILABLE_IN_2_42 +guint soup_get_major_version (void); + +SOUP_AVAILABLE_IN_2_42 +guint soup_get_minor_version (void); + +SOUP_AVAILABLE_IN_2_42 +guint soup_get_micro_version (void); + +SOUP_AVAILABLE_IN_2_42 +gboolean soup_check_version (guint major, + guint minor, + guint micro); + G_END_DECLS #endif /* SOUP_VERSION_H */ diff --git a/libsoup/soup-websocket-connection.c b/libsoup/soup-websocket-connection.c new file mode 100644 index 00000000..35eee6a6 --- /dev/null +++ b/libsoup/soup-websocket-connection.c @@ -0,0 +1,1898 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * soup-websocket-connection.c: This file was originally part of Cockpit. + * + * Copyright 2013, 2014 Red Hat, Inc. + * + * Cockpit is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * Cockpit 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; If not, see . + */ + +#include "config.h" + +#include + +#include "soup-websocket-connection.h" +#include "soup-enum-types.h" +#include "soup-uri.h" + +/* + * SECTION:websocketconnection + * @title: SoupWebsocketConnection + * @short_description: A WebSocket connection + * + * A #SoupWebsocketConnection is a WebSocket connection to a peer. + * This API is modeled after the W3C API for interacting with + * WebSockets. + * + * The #SoupWebsocketConnection:state property will indicate the + * state of the connection. + * + * Use soup_websocket_connection_send() to send a message to the peer. + * When a message is received the #SoupWebsocketConnection::message + * signal will fire. + * + * The soup_websocket_connection_close() function will perform an + * orderly close of the connection. The + * #SoupWebsocketConnection::closed signal will fire once the + * connection closes, whether it was initiated by this side or the + * peer. + * + * Connect to the #SoupWebsocketConnection::closing signal to detect + * when either peer begins closing the connection. + */ + +/** + * SoupWebsocketConnection: + * + * A class representing a WebSocket connection. + * + * Since: 2.50 + */ + +/** + * SoupWebsocketConnectionClass: + * @message: default handler for the #SoupWebsocketConnection::message signal + * @error: default handler for the #SoupWebsocketConnection::error signal + * @closing: the default handler for the #SoupWebsocketConnection:closing signal + * @closed: default handler for the #SoupWebsocketConnection::closed signal + * @pong: default handler for the #SoupWebsocketConnection::pong signal + * + * The abstract base class for #SoupWebsocketConnection + * + * Since: 2.50 + */ + +enum { + PROP_0, + PROP_IO_STREAM, + PROP_CONNECTION_TYPE, + PROP_URI, + PROP_ORIGIN, + PROP_PROTOCOL, + PROP_STATE, + PROP_MAX_INCOMING_PAYLOAD_SIZE, + PROP_KEEPALIVE_INTERVAL, +}; + +enum { + MESSAGE, + ERROR, + CLOSING, + CLOSED, + PONG, + NUM_SIGNALS +}; + +static guint signals[NUM_SIGNALS] = { 0, }; + +typedef enum { + SOUP_WEBSOCKET_QUEUE_NORMAL = 0, + SOUP_WEBSOCKET_QUEUE_URGENT = 1 << 0, + SOUP_WEBSOCKET_QUEUE_LAST = 1 << 1, +} SoupWebsocketQueueFlags; + +typedef struct { + GBytes *data; + gsize sent; + gsize amount; + SoupWebsocketQueueFlags flags; + gboolean pending; +} Frame; + +struct _SoupWebsocketConnectionPrivate { + GIOStream *io_stream; + SoupWebsocketConnectionType connection_type; + SoupURI *uri; + char *origin; + char *protocol; + guint64 max_incoming_payload_size; + guint keepalive_interval; + + gushort peer_close_code; + char *peer_close_data; + gboolean close_sent; + gboolean close_received; + gboolean dirty_close; + GSource *close_timeout; + + GMainContext *main_context; + + gboolean io_closing; + gboolean io_closed; + + GPollableInputStream *input; + GSource *input_source; + GByteArray *incoming; + + GPollableOutputStream *output; + GSource *output_source; + GQueue outgoing; + + /* Current message being assembled */ + guint8 message_opcode; + GByteArray *message_data; + + GSource *keepalive_timeout; +}; + +#define MAX_INCOMING_PAYLOAD_SIZE_DEFAULT 128 * 1024 + +G_DEFINE_TYPE_WITH_PRIVATE (SoupWebsocketConnection, soup_websocket_connection, G_TYPE_OBJECT) + +static void queue_frame (SoupWebsocketConnection *self, SoupWebsocketQueueFlags flags, + gpointer data, gsize len, gsize amount); + +static void protocol_error_and_close (SoupWebsocketConnection *self); + +static void +frame_free (gpointer data) +{ + Frame *frame = data; + + if (frame) { + g_bytes_unref (frame->data); + g_slice_free (Frame, frame); + } +} + +static void +soup_websocket_connection_init (SoupWebsocketConnection *self) +{ + SoupWebsocketConnectionPrivate *pv; + + pv = self->pv = soup_websocket_connection_get_instance_private (self); + + pv->incoming = g_byte_array_sized_new (1024); + g_queue_init (&pv->outgoing); + pv->main_context = g_main_context_ref_thread_default (); +} + +static void +on_iostream_closed (GObject *source, + GAsyncResult *result, + gpointer user_data) +{ + SoupWebsocketConnection *self = user_data; + SoupWebsocketConnectionPrivate *pv = self->pv; + GError *error = NULL; + + /* We treat connection as closed even if close fails */ + pv->io_closed = TRUE; + g_io_stream_close_finish (pv->io_stream, result, &error); + + if (error) { + g_debug ("error closing web socket stream: %s", error->message); + if (!pv->dirty_close) + g_signal_emit (self, signals[ERROR], 0, error); + pv->dirty_close = TRUE; + g_error_free (error); + } + + g_assert (soup_websocket_connection_get_state (self) == SOUP_WEBSOCKET_STATE_CLOSED); + g_debug ("closed: completed io stream close"); + g_signal_emit (self, signals[CLOSED], 0); + + g_object_unref (self); +} + +static void +stop_input (SoupWebsocketConnection *self) +{ + SoupWebsocketConnectionPrivate *pv = self->pv; + + if (pv->input_source) { + g_debug ("stopping input source"); + g_source_destroy (pv->input_source); + g_source_unref (pv->input_source); + pv->input_source = NULL; + } +} + +static void +stop_output (SoupWebsocketConnection *self) +{ + SoupWebsocketConnectionPrivate *pv = self->pv; + + if (pv->output_source) { + g_debug ("stopping output source"); + g_source_destroy (pv->output_source); + g_source_unref (pv->output_source); + pv->output_source = NULL; + } +} + +static void +keepalive_stop_timeout (SoupWebsocketConnection *self) +{ + SoupWebsocketConnectionPrivate *pv = self->pv; + + if (pv->keepalive_timeout) { + g_source_destroy (pv->keepalive_timeout); + g_source_unref (pv->keepalive_timeout); + pv->keepalive_timeout = NULL; + } +} + +static void +close_io_stop_timeout (SoupWebsocketConnection *self) +{ + SoupWebsocketConnectionPrivate *pv = self->pv; + + if (pv->close_timeout) { + g_source_destroy (pv->close_timeout); + g_source_unref (pv->close_timeout); + pv->close_timeout = NULL; + } +} + +static void +close_io_stream (SoupWebsocketConnection *self) +{ + SoupWebsocketConnectionPrivate *pv = self->pv; + + keepalive_stop_timeout (self); + close_io_stop_timeout (self); + + if (!pv->io_closing) { + stop_input (self); + stop_output (self); + pv->io_closing = TRUE; + g_debug ("closing io stream"); + g_io_stream_close_async (pv->io_stream, G_PRIORITY_DEFAULT, + NULL, on_iostream_closed, g_object_ref (self)); + } + + g_object_notify (G_OBJECT (self), "state"); +} + +static void +shutdown_wr_io_stream (SoupWebsocketConnection *self) +{ + SoupWebsocketConnectionPrivate *pv = self->pv; + GSocket *socket; + GError *error = NULL; + + stop_output (self); + + if (G_IS_SOCKET_CONNECTION (pv->io_stream)) { + socket = g_socket_connection_get_socket (G_SOCKET_CONNECTION (pv->io_stream)); + g_socket_shutdown (socket, FALSE, TRUE, &error); + if (error != NULL) { + g_debug ("error shutting down io stream: %s", error->message); + g_error_free (error); + } + } + + g_object_notify (G_OBJECT (self), "state"); +} + +static gboolean +on_timeout_close_io (gpointer user_data) +{ + SoupWebsocketConnection *self = SOUP_WEBSOCKET_CONNECTION (user_data); + SoupWebsocketConnectionPrivate *pv = self->pv; + + pv->close_timeout = 0; + + g_debug ("peer did not close io when expected"); + close_io_stream (self); + + return FALSE; +} + +static void +close_io_after_timeout (SoupWebsocketConnection *self) +{ + SoupWebsocketConnectionPrivate *pv = self->pv; + const int timeout = 5; + + if (pv->close_timeout) + return; + + g_debug ("waiting %d seconds for peer to close io", timeout); + pv->close_timeout = g_timeout_source_new_seconds (timeout); + g_source_set_callback (pv->close_timeout, on_timeout_close_io, self, NULL); + g_source_attach (pv->close_timeout, pv->main_context); +} + +static void +xor_with_mask (const guint8 *mask, + guint8 *data, + gsize len) +{ + gsize n; + + /* Do the masking */ + for (n = 0; n < len; n++) + data[n] ^= mask[n & 3]; +} + +static void +send_message (SoupWebsocketConnection *self, + SoupWebsocketQueueFlags flags, + guint8 opcode, + const guint8 *data, + gsize length) +{ + gsize buffered_amount = length; + GByteArray *bytes; + gsize frame_len; + guint8 *outer; + guint8 *mask = 0; + guint8 *at; + + if (!(soup_websocket_connection_get_state (self) == SOUP_WEBSOCKET_STATE_OPEN)) { + g_debug ("Ignoring message since the connection is closed or is closing"); + return; + } + + bytes = g_byte_array_sized_new (14 + length); + outer = bytes->data; + outer[0] = 0x80 | opcode; + + /* If control message, check payload size */ + if (opcode & 0x08) { + if (length > 125) { + g_warning ("WebSocket control message payload exceeds size limit"); + protocol_error_and_close (self); + return; + } + + buffered_amount = 0; + } + + if (length < 126) { + outer[1] = (0xFF & length); /* mask | 7-bit-len */ + bytes->len = 2; + } else if (length < 65536) { + outer[1] = 126; /* mask | 16-bit-len */ + outer[2] = (length >> 8) & 0xFF; + outer[3] = (length >> 0) & 0xFF; + bytes->len = 4; + } else { + outer[1] = 127; /* mask | 64-bit-len */ +#if GLIB_SIZEOF_SIZE_T > 4 + outer[2] = (length >> 56) & 0xFF; + outer[3] = (length >> 48) & 0xFF; + outer[4] = (length >> 40) & 0xFF; + outer[5] = (length >> 32) & 0xFF; +#else + outer[2] = outer[3] = outer[4] = outer[5] = 0; +#endif + outer[6] = (length >> 24) & 0xFF; + outer[7] = (length >> 16) & 0xFF; + outer[8] = (length >> 8) & 0xFF; + outer[9] = (length >> 0) & 0xFF; + bytes->len = 10; + } + + /* The server side doesn't need to mask, so we don't. There's + * probably a client somewhere that's not expecting it. + */ + if (self->pv->connection_type == SOUP_WEBSOCKET_CONNECTION_CLIENT) { + guint32 rnd = g_random_int (); + outer[1] |= 0x80; + mask = outer + bytes->len; + memcpy (mask, &rnd, sizeof (rnd)); + bytes->len += 4; + } + + at = bytes->data + bytes->len; + g_byte_array_append (bytes, data, length); + + if (self->pv->connection_type == SOUP_WEBSOCKET_CONNECTION_CLIENT) + xor_with_mask (mask, at, length); + + frame_len = bytes->len; + queue_frame (self, flags, g_byte_array_free (bytes, FALSE), + frame_len, buffered_amount); + g_debug ("queued %d frame of len %u", (int)opcode, (guint)frame_len); +} + +static void +send_close (SoupWebsocketConnection *self, + SoupWebsocketQueueFlags flags, + gushort code, + const char *reason) +{ + /* Note that send_message truncates as expected */ + char buffer[128]; + gsize len = 0; + + if (code != 0) { + buffer[len++] = code >> 8; + buffer[len++] = code & 0xFF; + if (reason) + len += g_strlcpy (buffer + len, reason, sizeof (buffer) - len); + } + + send_message (self, flags, 0x08, (guint8 *)buffer, len); + self->pv->close_sent = TRUE; + + keepalive_stop_timeout (self); +} + +static void +emit_error_and_close (SoupWebsocketConnection *self, + GError *error, + gboolean prejudice) +{ + gboolean ignore = FALSE; + gushort code; + + if (soup_websocket_connection_get_state (self) == SOUP_WEBSOCKET_STATE_CLOSED) { + g_error_free (error); + return; + } + + if (error && error->domain == SOUP_WEBSOCKET_ERROR) + code = error->code; + else + code = SOUP_WEBSOCKET_CLOSE_GOING_AWAY; + + self->pv->dirty_close = TRUE; + g_signal_emit (self, signals[ERROR], 0, error); + g_error_free (error); + + /* If already closing, just ignore this stuff */ + switch (soup_websocket_connection_get_state (self)) { + case SOUP_WEBSOCKET_STATE_CLOSED: + ignore = TRUE; + break; + case SOUP_WEBSOCKET_STATE_CLOSING: + ignore = !prejudice; + break; + default: + break; + } + + if (ignore) { + g_debug ("already closing/closed, ignoring error"); + } else if (prejudice) { + g_debug ("forcing close due to error"); + close_io_stream (self); + } else { + g_debug ("requesting close due to error"); + send_close (self, SOUP_WEBSOCKET_QUEUE_URGENT | SOUP_WEBSOCKET_QUEUE_LAST, code, NULL); + } +} + +static void +protocol_error_and_close_full (SoupWebsocketConnection *self, + gboolean prejudice) +{ + GError *error; + + error = g_error_new_literal (SOUP_WEBSOCKET_ERROR, + SOUP_WEBSOCKET_CLOSE_PROTOCOL_ERROR, + self->pv->connection_type == SOUP_WEBSOCKET_CONNECTION_SERVER ? + "Received invalid WebSocket response from the client" : + "Received invalid WebSocket response from the server"); + emit_error_and_close (self, error, prejudice); +} + +static void +protocol_error_and_close (SoupWebsocketConnection *self) +{ + protocol_error_and_close_full (self, FALSE); +} + +static void +bad_data_error_and_close (SoupWebsocketConnection *self) +{ + GError *error; + + error = g_error_new_literal (SOUP_WEBSOCKET_ERROR, + SOUP_WEBSOCKET_CLOSE_BAD_DATA, + self->pv->connection_type == SOUP_WEBSOCKET_CONNECTION_SERVER ? + "Received invalid WebSocket data from the client" : + "Received invalid WebSocket data from the server"); + emit_error_and_close (self, error, FALSE); +} + +static void +too_big_error_and_close (SoupWebsocketConnection *self, + guint64 payload_len) +{ + GError *error; + + error = g_error_new_literal (SOUP_WEBSOCKET_ERROR, + SOUP_WEBSOCKET_CLOSE_TOO_BIG, + self->pv->connection_type == SOUP_WEBSOCKET_CONNECTION_SERVER ? + "Received extremely large WebSocket data from the client" : + "Received extremely large WebSocket data from the server"); + g_debug ("%s is trying to frame of size %" G_GUINT64_FORMAT " or greater, but max supported size is %" G_GUINT64_FORMAT, + self->pv->connection_type == SOUP_WEBSOCKET_CONNECTION_SERVER ? "server" : "client", + payload_len, self->pv->max_incoming_payload_size); + emit_error_and_close (self, error, TRUE); + + /* The input is in an invalid state now */ + stop_input (self); +} + +static void +close_connection (SoupWebsocketConnection *self, + gushort code, + const char *data) +{ + SoupWebsocketQueueFlags flags; + SoupWebsocketConnectionPrivate *pv; + + pv = self->pv; + + if (pv->close_sent) { + g_debug ("close code already sent"); + return; + } + + /* Validate the closing code received by the peer */ + switch (code) { + case SOUP_WEBSOCKET_CLOSE_NORMAL: + case SOUP_WEBSOCKET_CLOSE_GOING_AWAY: + case SOUP_WEBSOCKET_CLOSE_PROTOCOL_ERROR: + case SOUP_WEBSOCKET_CLOSE_UNSUPPORTED_DATA: + case SOUP_WEBSOCKET_CLOSE_BAD_DATA: + case SOUP_WEBSOCKET_CLOSE_POLICY_VIOLATION: + case SOUP_WEBSOCKET_CLOSE_TOO_BIG: + break; + case SOUP_WEBSOCKET_CLOSE_NO_EXTENSION: + if (pv->connection_type == SOUP_WEBSOCKET_CONNECTION_SERVER) { + g_debug ("Wrong closing code %d received for a server connection", + code); + } + break; + case SOUP_WEBSOCKET_CLOSE_SERVER_ERROR: + if (pv->connection_type != SOUP_WEBSOCKET_CONNECTION_SERVER) { + g_debug ("Wrong closing code %d received for a non server connection", + code); + } + break; + default: + if (code < 3000) { + g_debug ("Wrong closing code %d received", code); + protocol_error_and_close (self); + return; + } + } + + g_signal_emit (self, signals[CLOSING], 0); + + if (pv->close_received) + g_debug ("responding to close request"); + + flags = 0; + if (pv->connection_type == SOUP_WEBSOCKET_CONNECTION_SERVER && pv->close_received) + flags |= SOUP_WEBSOCKET_QUEUE_LAST; + send_close (self, flags, code, data); + close_io_after_timeout (self); +} + +static void +receive_close (SoupWebsocketConnection *self, + const guint8 *data, + gsize len) +{ + SoupWebsocketConnectionPrivate *pv = self->pv; + + pv->peer_close_code = 0; + g_free (pv->peer_close_data); + pv->peer_close_data = NULL; + pv->close_received = TRUE; + + switch (len) { + case 0: + /* Send a clean close when having an empty payload */ + close_connection (self, 1000, NULL); + return; + case 1: + /* Send a protocol error since the close code is incomplete */ + protocol_error_and_close (self); + return; + default: + /* Store the code/data payload */ + pv->peer_close_code = (guint16)data[0] << 8 | data[1]; + break; + } + + if (len > 2) { + data += 2; + len -= 2; + + if (!g_utf8_validate ((char *)data, len, NULL)) { + g_debug ("received non-UTF8 close data: %d '%.*s' %d", (int)len, (int)len, (char *)data, (int)data[0]); + protocol_error_and_close (self); + return; + } + + pv->peer_close_data = g_strndup ((char *)data, len); + } + + /* Once we receive close response on server, close immediately */ + if (pv->close_sent) { + shutdown_wr_io_stream (self); + if (pv->connection_type == SOUP_WEBSOCKET_CONNECTION_SERVER) + close_io_stream (self); + } else { + close_connection (self, pv->peer_close_code, pv->peer_close_data); + } +} + +static void +receive_ping (SoupWebsocketConnection *self, + const guint8 *data, + gsize len) +{ + /* Send back a pong with same data */ + g_debug ("received ping, responding"); + send_message (self, SOUP_WEBSOCKET_QUEUE_URGENT, 0x0A, data, len); +} + +static void +receive_pong (SoupWebsocketConnection *self, + const guint8 *data, + gsize len) +{ + GByteArray *bytes; + + g_debug ("received pong message"); + + bytes = g_byte_array_sized_new (len + 1); + g_byte_array_append (bytes, data, len); + /* Always null terminate, as a convenience */ + g_byte_array_append (bytes, (guchar *)"\0", 1); + /* But don't include the null terminator in the byte count */ + bytes->len--; + + g_signal_emit (self, signals[PONG], 0, bytes); + g_byte_array_unref (bytes); + +} + +static void +process_contents (SoupWebsocketConnection *self, + gboolean control, + gboolean fin, + guint8 opcode, + gconstpointer payload, + gsize payload_len) +{ + SoupWebsocketConnectionPrivate *pv = self->pv; + GBytes *message; + + if (control) { + /* Control frames must never be fragmented */ + if (!fin) { + g_debug ("received fragmented control frame"); + protocol_error_and_close (self); + return; + } + + g_debug ("received control frame %d with %d payload", (int)opcode, (int)payload_len); + + switch (opcode) { + case 0x08: + receive_close (self, payload, payload_len); + break; + case 0x09: + receive_ping (self, payload, payload_len); + break; + case 0x0A: + receive_pong (self, payload, payload_len); + break; + default: + g_debug ("received unsupported control frame: %d", (int)opcode); + protocol_error_and_close (self); + return; + } + } else if (pv->close_received) { + g_debug ("received message after close was received"); + } else { + /* A message frame */ + + if (!fin && opcode) { + /* Initial fragment of a message */ + if (pv->message_data) { + g_debug ("received out of order initial message fragment"); + protocol_error_and_close (self); + return; + } + g_debug ("received initial fragment frame %d with %d payload", (int)opcode, (int)payload_len); + } else if (!fin && !opcode) { + /* Middle fragment of a message */ + if (!pv->message_data) { + g_debug ("received out of order middle message fragment"); + protocol_error_and_close (self); + return; + } + g_debug ("received middle fragment frame with %d payload", (int)payload_len); + } else if (fin && !opcode) { + /* Last fragment of a message */ + if (!pv->message_data) { + g_debug ("received out of order ending message fragment"); + protocol_error_and_close (self); + return; + } + g_debug ("received last fragment frame with %d payload", (int)payload_len); + } else { + /* An unfragmented message */ + g_assert (opcode != 0); + if (pv->message_data) { + g_debug ("received unfragmented message when fragment was expected"); + protocol_error_and_close (self); + return; + } + g_debug ("received frame %d with %d payload", (int)opcode, (int)payload_len); + } + + if (opcode) { + pv->message_opcode = opcode; + pv->message_data = g_byte_array_sized_new (payload_len + 1); + } + + switch (pv->message_opcode) { + case 0x01: + case 0x02: + g_byte_array_append (pv->message_data, payload, payload_len); + break; + default: + g_debug ("received unknown data frame: %d", (int)opcode); + protocol_error_and_close (self); + return; + } + + /* Actually deliver the message? */ + if (fin) { + if (pv->message_opcode == 0x01 && + !g_utf8_validate((char *)pv->message_data->data, + pv->message_data->len, + NULL)) { + + g_debug ("received invalid non-UTF8 text data"); + + /* Discard the entire message */ + g_byte_array_unref (pv->message_data); + pv->message_data = NULL; + pv->message_opcode = 0; + + bad_data_error_and_close (self); + return; + } + + /* Always null terminate, as a convenience */ + g_byte_array_append (pv->message_data, (guchar *)"\0", 1); + + /* But don't include the null terminator in the byte count */ + pv->message_data->len--; + + opcode = pv->message_opcode; + message = g_byte_array_free_to_bytes (pv->message_data); + pv->message_data = NULL; + pv->message_opcode = 0; + g_debug ("message: delivering %d with %d length", + (int)opcode, (int)g_bytes_get_size (message)); + g_signal_emit (self, signals[MESSAGE], 0, (int)opcode, message); + g_bytes_unref (message); + } + } +} + +static gboolean +process_frame (SoupWebsocketConnection *self) +{ + guint8 *header; + guint8 *payload; + guint64 payload_len; + guint8 *mask; + gboolean fin; + gboolean control; + gboolean masked; + guint8 opcode; + gsize len; + gsize at; + + len = self->pv->incoming->len; + if (len < 2) + return FALSE; /* need more data */ + + header = self->pv->incoming->data; + fin = ((header[0] & 0x80) != 0); + control = header[0] & 0x08; + opcode = header[0] & 0x0f; + masked = ((header[1] & 0x80) != 0); + + /* We do not support extensions, reserved bits must be 0 */ + if (header[0] & 0x70) { + protocol_error_and_close (self); + } + + switch (header[1] & 0x7f) { + case 126: + at = 4; + if (len < at) + return FALSE; /* need more data */ + payload_len = (((guint16)header[2] << 8) | + ((guint16)header[3] << 0)); + break; + case 127: + at = 10; + if (len < at) + return FALSE; /* need more data */ + payload_len = (((guint64)header[2] << 56) | + ((guint64)header[3] << 48) | + ((guint64)header[4] << 40) | + ((guint64)header[5] << 32) | + ((guint64)header[6] << 24) | + ((guint64)header[7] << 16) | + ((guint64)header[8] << 8) | + ((guint64)header[9] << 0)); + break; + default: + payload_len = header[1] & 0x7f; + at = 2; + break; + } + + /* Safety valve */ + if (self->pv->max_incoming_payload_size > 0 && + payload_len >= self->pv->max_incoming_payload_size) { + too_big_error_and_close (self, payload_len); + return FALSE; + } + + if (len < at + payload_len) + return FALSE; /* need more data */ + + payload = header + at; + + if (masked) { + mask = header + at; + payload += 4; + at += 4; + + if (len < at + payload_len) + return FALSE; /* need more data */ + + xor_with_mask (mask, payload, payload_len); + } + + /* Note that now that we've unmasked, we've modified the buffer, we can + * only return below via discarding or processing the message + */ + process_contents (self, control, fin, opcode, payload, payload_len); + + /* Move past the parsed frame */ + g_byte_array_remove_range (self->pv->incoming, 0, at + payload_len); + return TRUE; +} + +static void +process_incoming (SoupWebsocketConnection *self) +{ + while (process_frame (self)) + ; +} + +static gboolean +on_web_socket_input (GObject *pollable_stream, + gpointer user_data) +{ + SoupWebsocketConnection *self = SOUP_WEBSOCKET_CONNECTION (user_data); + SoupWebsocketConnectionPrivate *pv = self->pv; + GError *error = NULL; + gboolean end = FALSE; + gssize count; + gsize len; + + do { + len = pv->incoming->len; + g_byte_array_set_size (pv->incoming, len + 1024); + + count = g_pollable_input_stream_read_nonblocking (pv->input, + pv->incoming->data + len, + 1024, NULL, &error); + + if (count < 0) { + if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK)) { + g_error_free (error); + count = 0; + } else { + emit_error_and_close (self, error, TRUE); + return TRUE; + } + } else if (count == 0) { + end = TRUE; + } + + pv->incoming->len = len + count; + } while (count > 0); + + process_incoming (self); + + if (end) { + if (!pv->close_sent || !pv->close_received) { + pv->dirty_close = TRUE; + g_debug ("connection unexpectedly closed by peer"); + } else { + g_debug ("peer has closed socket"); + } + + close_io_stream (self); + } + + return TRUE; +} + +static gboolean +on_web_socket_output (GObject *pollable_stream, + gpointer user_data) +{ + SoupWebsocketConnection *self = SOUP_WEBSOCKET_CONNECTION (user_data); + SoupWebsocketConnectionPrivate *pv = self->pv; + const guint8 *data; + GError *error = NULL; + Frame *frame; + gssize count; + gsize len; + + if (soup_websocket_connection_get_state (self) == SOUP_WEBSOCKET_STATE_CLOSED) { + g_debug ("Ignoring message since the connection is closed"); + stop_output (self); + return TRUE; + } + + frame = g_queue_peek_head (&pv->outgoing); + + /* No more frames to send */ + if (frame == NULL) { + stop_output (self); + return TRUE; + } + + data = g_bytes_get_data (frame->data, &len); + g_assert (len > 0); + g_assert (len > frame->sent); + + count = g_pollable_output_stream_write_nonblocking (pv->output, + data + frame->sent, + len - frame->sent, + NULL, &error); + + if (count < 0) { + if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK)) { + g_clear_error (&error); + count = 0; + + g_debug ("failed to send frame because it would block, marking as pending"); + frame->pending = TRUE; + } else { + emit_error_and_close (self, error, TRUE); + return FALSE; + } + } + + frame->sent += count; + if (frame->sent >= len) { + g_debug ("sent frame"); + g_queue_pop_head (&pv->outgoing); + + if (frame->flags & SOUP_WEBSOCKET_QUEUE_LAST) { + if (pv->connection_type == SOUP_WEBSOCKET_CONNECTION_SERVER) { + close_io_stream (self); + } else { + shutdown_wr_io_stream (self); + close_io_after_timeout (self); + } + } + frame_free (frame); + } + + return TRUE; +} + +static void +start_output (SoupWebsocketConnection *self) +{ + SoupWebsocketConnectionPrivate *pv = self->pv; + + if (pv->output_source) + return; + + g_debug ("starting output source"); + pv->output_source = g_pollable_output_stream_create_source (pv->output, NULL); + g_source_set_callback (pv->output_source, (GSourceFunc)on_web_socket_output, self, NULL); + g_source_attach (pv->output_source, pv->main_context); +} + +static void +queue_frame (SoupWebsocketConnection *self, + SoupWebsocketQueueFlags flags, + gpointer data, + gsize len, + gsize amount) +{ + SoupWebsocketConnectionPrivate *pv = self->pv; + Frame *frame; + + g_return_if_fail (SOUP_IS_WEBSOCKET_CONNECTION (self)); + g_return_if_fail (pv->close_sent == FALSE); + g_return_if_fail (data != NULL); + g_return_if_fail (len > 0); + + frame = g_slice_new0 (Frame); + frame->data = g_bytes_new_take (data, len); + frame->amount = amount; + frame->flags = flags; + + /* If urgent put at front of queue */ + if (flags & SOUP_WEBSOCKET_QUEUE_URGENT) { + GList *l; + + /* Find out the first frame that is not urgent or partially sent or pending */ + for (l = g_queue_peek_head_link (&pv->outgoing); l != NULL; l = l->next) { + Frame *prev = l->data; + + if (!(prev->flags & SOUP_WEBSOCKET_QUEUE_URGENT) && + prev->sent == 0 && !prev->pending) + break; + } + + g_queue_insert_before (&pv->outgoing, l, frame); + } else { + g_queue_push_tail (&pv->outgoing, frame); + } + + start_output (self); +} + +static void +soup_websocket_connection_constructed (GObject *object) +{ + SoupWebsocketConnection *self = SOUP_WEBSOCKET_CONNECTION (object); + SoupWebsocketConnectionPrivate *pv = self->pv; + GInputStream *is; + GOutputStream *os; + + G_OBJECT_CLASS (soup_websocket_connection_parent_class)->constructed (object); + + g_return_if_fail (pv->io_stream != NULL); + + is = g_io_stream_get_input_stream (pv->io_stream); + g_return_if_fail (G_IS_POLLABLE_INPUT_STREAM (is)); + pv->input = G_POLLABLE_INPUT_STREAM (is); + g_return_if_fail (g_pollable_input_stream_can_poll (pv->input)); + + os = g_io_stream_get_output_stream (pv->io_stream); + g_return_if_fail (G_IS_POLLABLE_OUTPUT_STREAM (os)); + pv->output = G_POLLABLE_OUTPUT_STREAM (os); + g_return_if_fail (g_pollable_output_stream_can_poll (pv->output)); + + pv->input_source = g_pollable_input_stream_create_source (pv->input, NULL); + g_source_set_callback (pv->input_source, (GSourceFunc)on_web_socket_input, self, NULL); + g_source_attach (pv->input_source, pv->main_context); +} + +static void +soup_websocket_connection_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + SoupWebsocketConnection *self = SOUP_WEBSOCKET_CONNECTION (object); + SoupWebsocketConnectionPrivate *pv = self->pv; + + switch (prop_id) { + case PROP_IO_STREAM: + g_value_set_object (value, soup_websocket_connection_get_io_stream (self)); + break; + + case PROP_CONNECTION_TYPE: + g_value_set_enum (value, soup_websocket_connection_get_connection_type (self)); + break; + + case PROP_URI: + g_value_set_boxed (value, soup_websocket_connection_get_uri (self)); + break; + + case PROP_ORIGIN: + g_value_set_string (value, soup_websocket_connection_get_origin (self)); + break; + + case PROP_PROTOCOL: + g_value_set_string (value, soup_websocket_connection_get_protocol (self)); + break; + + case PROP_STATE: + g_value_set_enum (value, soup_websocket_connection_get_state (self)); + break; + + case PROP_MAX_INCOMING_PAYLOAD_SIZE: + g_value_set_uint64 (value, pv->max_incoming_payload_size); + break; + + case PROP_KEEPALIVE_INTERVAL: + g_value_set_uint (value, pv->keepalive_interval); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +soup_websocket_connection_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + SoupWebsocketConnection *self = SOUP_WEBSOCKET_CONNECTION (object); + SoupWebsocketConnectionPrivate *pv = self->pv; + + switch (prop_id) { + case PROP_IO_STREAM: + g_return_if_fail (pv->io_stream == NULL); + pv->io_stream = g_value_dup_object (value); + break; + + case PROP_CONNECTION_TYPE: + pv->connection_type = g_value_get_enum (value); + break; + + case PROP_URI: + g_return_if_fail (pv->uri == NULL); + pv->uri = g_value_dup_boxed (value); + break; + + case PROP_ORIGIN: + g_return_if_fail (pv->origin == NULL); + pv->origin = g_value_dup_string (value); + break; + + case PROP_PROTOCOL: + g_return_if_fail (pv->protocol == NULL); + pv->protocol = g_value_dup_string (value); + break; + + case PROP_MAX_INCOMING_PAYLOAD_SIZE: + pv->max_incoming_payload_size = g_value_get_uint64 (value); + break; + + case PROP_KEEPALIVE_INTERVAL: + soup_websocket_connection_set_keepalive_interval (self, + g_value_get_uint (value)); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +soup_websocket_connection_dispose (GObject *object) +{ + SoupWebsocketConnection *self = SOUP_WEBSOCKET_CONNECTION (object); + + self->pv->dirty_close = TRUE; + close_io_stream (self); + + G_OBJECT_CLASS (soup_websocket_connection_parent_class)->dispose (object); +} + +static void +soup_websocket_connection_finalize (GObject *object) +{ + SoupWebsocketConnection *self = SOUP_WEBSOCKET_CONNECTION (object); + SoupWebsocketConnectionPrivate *pv = self->pv; + + g_free (pv->peer_close_data); + + g_main_context_unref (pv->main_context); + + if (pv->incoming) + g_byte_array_free (pv->incoming, TRUE); + while (!g_queue_is_empty (&pv->outgoing)) + frame_free (g_queue_pop_head (&pv->outgoing)); + + g_clear_object (&pv->io_stream); + g_assert (!pv->input_source); + g_assert (!pv->output_source); + g_assert (pv->io_closing); + g_assert (pv->io_closed); + g_assert (!pv->close_timeout); + g_assert (!pv->keepalive_timeout); + + if (pv->message_data) + g_byte_array_free (pv->message_data, TRUE); + + if (pv->uri) + soup_uri_free (pv->uri); + g_free (pv->origin); + g_free (pv->protocol); + + G_OBJECT_CLASS (soup_websocket_connection_parent_class)->finalize (object); +} + +static void +soup_websocket_connection_class_init (SoupWebsocketConnectionClass *klass) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + + gobject_class->constructed = soup_websocket_connection_constructed; + gobject_class->get_property = soup_websocket_connection_get_property; + gobject_class->set_property = soup_websocket_connection_set_property; + gobject_class->dispose = soup_websocket_connection_dispose; + gobject_class->finalize = soup_websocket_connection_finalize; + + /** + * SoupWebsocketConnection:io-stream: + * + * The underlying IO stream the WebSocket is communicating + * over. + * + * The input and output streams must be pollable streams. + * + * Since: 2.50 + */ + g_object_class_install_property (gobject_class, PROP_IO_STREAM, + g_param_spec_object ("io-stream", + "I/O Stream", + "Underlying I/O stream", + G_TYPE_IO_STREAM, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); + + /** + * SoupWebsocketConnection:connection-type: + * + * The type of connection (client/server). + * + * Since: 2.50 + */ + g_object_class_install_property (gobject_class, PROP_CONNECTION_TYPE, + g_param_spec_enum ("connection-type", + "Connection type", + "Connection type (client/server)", + SOUP_TYPE_WEBSOCKET_CONNECTION_TYPE, + SOUP_WEBSOCKET_CONNECTION_UNKNOWN, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); + + /** + * SoupWebsocketConnection:uri: + * + * The URI of the WebSocket. + * + * For servers this represents the address of the WebSocket, + * and for clients it is the address connected to. + * + * Since: 2.50 + */ + g_object_class_install_property (gobject_class, PROP_URI, + g_param_spec_boxed ("uri", + "URI", + "The WebSocket URI", + SOUP_TYPE_URI, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); + + /** + * SoupWebsocketConnection:origin: + * + * The client's Origin. + * + * Since: 2.50 + */ + g_object_class_install_property (gobject_class, PROP_ORIGIN, + g_param_spec_string ("origin", + "Origin", + "The WebSocket origin", + NULL, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); + + /** + * SoupWebsocketConnection:protocol: + * + * The chosen protocol, or %NULL if a protocol was not agreed + * upon. + * + * Since: 2.50 + */ + g_object_class_install_property (gobject_class, PROP_PROTOCOL, + g_param_spec_string ("protocol", + "Protocol", + "The chosen WebSocket protocol", + NULL, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); + + /** + * SoupWebsocketConnection:state: + * + * The current state of the WebSocket. + * + * Since: 2.50 + */ + g_object_class_install_property (gobject_class, PROP_STATE, + g_param_spec_enum ("state", + "State", + "State ", + SOUP_TYPE_WEBSOCKET_STATE, + SOUP_WEBSOCKET_STATE_OPEN, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); + + /** + * SoupWebsocketConnection:max-incoming-payload-size: + * + * The maximum payload size for incoming packets the protocol expects + * or 0 to not limit it. + * + * Since: 2.56 + */ + g_object_class_install_property (gobject_class, PROP_MAX_INCOMING_PAYLOAD_SIZE, + g_param_spec_uint64 ("max-incoming-payload-size", + "Max incoming payload size", + "Max incoming payload size ", + 0, + G_MAXUINT64, + MAX_INCOMING_PAYLOAD_SIZE_DEFAULT, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + G_PARAM_STATIC_STRINGS)); + + /** + * SoupWebsocketConnection:keepalive-interval: + * + * Interval in seconds on when to send a ping message which will + * serve as a keepalive message. If set to 0 the keepalive message is + * disabled. + * + * Since: 2.58 + */ + g_object_class_install_property (gobject_class, PROP_KEEPALIVE_INTERVAL, + g_param_spec_uint ("keepalive-interval", + "Keepalive interval", + "Keepalive interval", + 0, + G_MAXUINT, + 0, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + G_PARAM_STATIC_STRINGS)); + + /** + * SoupWebsocketConnection::message: + * @self: the WebSocket + * @type: the type of message contents + * @message: the message data + * + * Emitted when we receive a message from the peer. + * + * As a convenience, the @message data will always be + * NUL-terminated, but the NUL byte will not be included in + * the length count. + * + * Since: 2.50 + */ + signals[MESSAGE] = g_signal_new ("message", + SOUP_TYPE_WEBSOCKET_CONNECTION, + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (SoupWebsocketConnectionClass, message), + NULL, NULL, g_cclosure_marshal_generic, + G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_BYTES); + + /** + * SoupWebsocketConnection::error: + * @self: the WebSocket + * @error: the error that occured + * + * Emitted when an error occurred on the WebSocket. This may + * be fired multiple times. Fatal errors will be followed by + * the #SoupWebsocketConnection::closed signal being emitted. + * + * Since: 2.50 + */ + signals[ERROR] = g_signal_new ("error", + SOUP_TYPE_WEBSOCKET_CONNECTION, + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (SoupWebsocketConnectionClass, error), + NULL, NULL, g_cclosure_marshal_generic, + G_TYPE_NONE, 1, G_TYPE_ERROR); + + /** + * SoupWebsocketConnection::closing: + * @self: the WebSocket + * + * This signal will be emitted during an orderly close. + * + * Since: 2.50 + */ + signals[CLOSING] = g_signal_new ("closing", + SOUP_TYPE_WEBSOCKET_CONNECTION, + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (SoupWebsocketConnectionClass, closing), + NULL, NULL, g_cclosure_marshal_generic, + G_TYPE_NONE, 0); + + /** + * SoupWebsocketConnection::closed: + * @self: the WebSocket + * + * Emitted when the connection has completely closed, either + * due to an orderly close from the peer, one initiated via + * soup_websocket_connection_close() or a fatal error + * condition that caused a close. + * + * This signal will be emitted once. + * + * Since: 2.50 + */ + signals[CLOSED] = g_signal_new ("closed", + SOUP_TYPE_WEBSOCKET_CONNECTION, + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (SoupWebsocketConnectionClass, closed), + NULL, NULL, g_cclosure_marshal_generic, + G_TYPE_NONE, 0); + + /** + * SoupWebsocketConnection::pong: + * @self: the WebSocket + * @message: the application data (if any) + * + * Emitted when we receive a Pong frame (solicited or + * unsolicited) from the peer. + * + * As a convenience, the @message data will always be + * NUL-terminated, but the NUL byte will not be included in + * the length count. + * + * Since: 2.60 + */ + signals[PONG] = g_signal_new ("pong", + SOUP_TYPE_WEBSOCKET_CONNECTION, + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (SoupWebsocketConnectionClass, pong), + NULL, NULL, g_cclosure_marshal_generic, + G_TYPE_NONE, 1, G_TYPE_BYTES); +} + +/** + * soup_websocket_connection_new: + * @stream: a #GIOStream connected to the WebSocket server + * @uri: the URI of the connection + * @type: the type of connection (client/side) + * @origin: (allow-none): the Origin of the client + * @protocol: (allow-none): the subprotocol in use + * + * Creates a #SoupWebsocketConnection on @stream. This should be + * called after completing the handshake to begin using the WebSocket + * protocol. + * + * Returns: a new #SoupWebsocketConnection + * + * Since: 2.50 + */ +SoupWebsocketConnection * +soup_websocket_connection_new (GIOStream *stream, + SoupURI *uri, + SoupWebsocketConnectionType type, + const char *origin, + const char *protocol) +{ + g_return_val_if_fail (G_IS_IO_STREAM (stream), NULL); + g_return_val_if_fail (uri != NULL, NULL); + g_return_val_if_fail (type != SOUP_WEBSOCKET_CONNECTION_UNKNOWN, NULL); + + return g_object_new (SOUP_TYPE_WEBSOCKET_CONNECTION, + "io-stream", stream, + "uri", uri, + "connection-type", type, + "origin", origin, + "protocol", protocol, + NULL); +} + +/** + * soup_websocket_connection_get_io_stream: + * @self: the WebSocket + * + * Get the I/O stream the WebSocket is communicating over. + * + * Returns: (transfer none): the WebSocket's I/O stream. + * + * Since: 2.50 + */ +GIOStream * +soup_websocket_connection_get_io_stream (SoupWebsocketConnection *self) +{ + g_return_val_if_fail (SOUP_IS_WEBSOCKET_CONNECTION (self), NULL); + + return self->pv->io_stream; +} + +/** + * soup_websocket_connection_get_connection_type: + * @self: the WebSocket + * + * Get the connection type (client/server) of the connection. + * + * Returns: the connection type + * + * Since: 2.50 + */ +SoupWebsocketConnectionType +soup_websocket_connection_get_connection_type (SoupWebsocketConnection *self) +{ + g_return_val_if_fail (SOUP_IS_WEBSOCKET_CONNECTION (self), SOUP_WEBSOCKET_CONNECTION_UNKNOWN); + + return self->pv->connection_type; +} + +/** + * soup_websocket_connection_get_uri: + * @self: the WebSocket + * + * Get the URI of the WebSocket. + * + * For servers this represents the address of the WebSocket, and + * for clients it is the address connected to. + * + * Returns: (transfer none): the URI + * + * Since: 2.50 + */ +SoupURI * +soup_websocket_connection_get_uri (SoupWebsocketConnection *self) +{ + g_return_val_if_fail (SOUP_IS_WEBSOCKET_CONNECTION (self), NULL); + + return self->pv->uri; +} + +/** + * soup_websocket_connection_get_origin: + * @self: the WebSocket + * + * Get the origin of the WebSocket. + * + * Returns: (nullable): the origin, or %NULL + * + * Since: 2.50 + */ +const char * +soup_websocket_connection_get_origin (SoupWebsocketConnection *self) +{ + g_return_val_if_fail (SOUP_IS_WEBSOCKET_CONNECTION (self), NULL); + + return self->pv->origin; +} + +/** + * soup_websocket_connection_get_protocol: + * @self: the WebSocket + * + * Get the protocol chosen via negotiation with the peer. + * + * Returns: (nullable): the chosen protocol, or %NULL + * + * Since: 2.50 + */ +const char * +soup_websocket_connection_get_protocol (SoupWebsocketConnection *self) +{ + g_return_val_if_fail (SOUP_IS_WEBSOCKET_CONNECTION (self), NULL); + + return self->pv->protocol; +} + +/** + * soup_websocket_connection_get_state: + * @self: the WebSocket + * + * Get the current state of the WebSocket. + * + * Returns: the state + * + * Since: 2.50 + */ +SoupWebsocketState +soup_websocket_connection_get_state (SoupWebsocketConnection *self) +{ + g_return_val_if_fail (SOUP_IS_WEBSOCKET_CONNECTION (self), 0); + + if (self->pv->io_closed) + return SOUP_WEBSOCKET_STATE_CLOSED; + else if (self->pv->io_closing || self->pv->close_sent) + return SOUP_WEBSOCKET_STATE_CLOSING; + else + return SOUP_WEBSOCKET_STATE_OPEN; +} + +/** + * soup_websocket_connection_get_close_code: + * @self: the WebSocket + * + * Get the close code received from the WebSocket peer. + * + * This only becomes valid once the WebSocket is in the + * %SOUP_WEBSOCKET_STATE_CLOSED state. The value will often be in the + * #SoupWebsocketCloseCode enumeration, but may also be an application + * defined close code. + * + * Returns: the close code or zero. + * + * Since: 2.50 + */ +gushort +soup_websocket_connection_get_close_code (SoupWebsocketConnection *self) +{ + g_return_val_if_fail (SOUP_IS_WEBSOCKET_CONNECTION (self), 0); + + return self->pv->peer_close_code; +} + +/** + * soup_websocket_connection_get_close_data: + * @self: the WebSocket + * + * Get the close data received from the WebSocket peer. + * + * This only becomes valid once the WebSocket is in the + * %SOUP_WEBSOCKET_STATE_CLOSED state. The data may be freed once + * the main loop is run, so copy it if you need to keep it around. + * + * Returns: the close data or %NULL + * + * Since: 2.50 + */ +const char * +soup_websocket_connection_get_close_data (SoupWebsocketConnection *self) +{ + g_return_val_if_fail (SOUP_IS_WEBSOCKET_CONNECTION (self), NULL); + + return self->pv->peer_close_data; +} + +/** + * soup_websocket_connection_send_text: + * @self: the WebSocket + * @text: the message contents + * + * Send a text (UTF-8) message to the peer. + * + * The message is queued to be sent and will be sent when the main loop + * is run. + * + * Since: 2.50 + */ +void +soup_websocket_connection_send_text (SoupWebsocketConnection *self, + const char *text) +{ + gsize length; + + g_return_if_fail (SOUP_IS_WEBSOCKET_CONNECTION (self)); + g_return_if_fail (soup_websocket_connection_get_state (self) == SOUP_WEBSOCKET_STATE_OPEN); + g_return_if_fail (text != NULL); + + length = strlen (text); + g_return_if_fail (g_utf8_validate (text, length, NULL)); + + send_message (self, SOUP_WEBSOCKET_QUEUE_NORMAL, 0x01, (const guint8 *) text, length); +} + +/** + * soup_websocket_connection_send_binary: + * @self: the WebSocket + * @data: (array length=length) (element-type guint8): the message contents + * @length: the length of @data + * + * Send a binary message to the peer. + * + * The message is queued to be sent and will be sent when the main loop + * is run. + * + * Since: 2.50 + */ +void +soup_websocket_connection_send_binary (SoupWebsocketConnection *self, + gconstpointer data, + gsize length) +{ + g_return_if_fail (SOUP_IS_WEBSOCKET_CONNECTION (self)); + g_return_if_fail (soup_websocket_connection_get_state (self) == SOUP_WEBSOCKET_STATE_OPEN); + g_return_if_fail (data != NULL); + + send_message (self, SOUP_WEBSOCKET_QUEUE_NORMAL, 0x02, data, length); +} + +/** + * soup_websocket_connection_close: + * @self: the WebSocket + * @code: close code + * @data: (allow-none): close data + * + * Close the connection in an orderly fashion. + * + * Note that until the #SoupWebsocketConnection::closed signal fires, the connection + * is not yet completely closed. The close message is not even sent until the + * main loop runs. + * + * The @code and @data are sent to the peer along with the close request. + * Note that the @data must be UTF-8 valid. + * + * Since: 2.50 + */ +void +soup_websocket_connection_close (SoupWebsocketConnection *self, + gushort code, + const char *data) +{ + SoupWebsocketConnectionPrivate *pv; + + g_return_if_fail (SOUP_IS_WEBSOCKET_CONNECTION (self)); + pv = self->pv; + g_return_if_fail (!pv->close_sent); + + g_return_if_fail (code != SOUP_WEBSOCKET_CLOSE_NO_STATUS && + code != SOUP_WEBSOCKET_CLOSE_ABNORMAL && + code != SOUP_WEBSOCKET_CLOSE_TLS_HANDSHAKE); + if (pv->connection_type == SOUP_WEBSOCKET_CONNECTION_SERVER) + g_return_if_fail (code != SOUP_WEBSOCKET_CLOSE_NO_EXTENSION); + else + g_return_if_fail (code != SOUP_WEBSOCKET_CLOSE_SERVER_ERROR); + + close_connection (self, code, data); +} + +/** + * soup_websocket_connection_get_max_incoming_payload_size: + * @self: the WebSocket + * + * Gets the maximum payload size allowed for incoming packets. + * + * Returns: the maximum payload size. + * + * Since: 2.56 + */ +guint64 +soup_websocket_connection_get_max_incoming_payload_size (SoupWebsocketConnection *self) +{ + SoupWebsocketConnectionPrivate *pv; + + g_return_val_if_fail (SOUP_IS_WEBSOCKET_CONNECTION (self), MAX_INCOMING_PAYLOAD_SIZE_DEFAULT); + pv = self->pv; + + return pv->max_incoming_payload_size; +} + +/** + * soup_websocket_connection_set_max_incoming_payload_size: + * @self: the WebSocket + * @max_incoming_payload_size: the maximum payload size + * + * Sets the maximum payload size allowed for incoming packets. It + * does not limit the outgoing packet size. + * + * Since: 2.56 + */ +void +soup_websocket_connection_set_max_incoming_payload_size (SoupWebsocketConnection *self, + guint64 max_incoming_payload_size) +{ + SoupWebsocketConnectionPrivate *pv; + + g_return_if_fail (SOUP_IS_WEBSOCKET_CONNECTION (self)); + pv = self->pv; + + if (pv->max_incoming_payload_size != max_incoming_payload_size) { + pv->max_incoming_payload_size = max_incoming_payload_size; + g_object_notify (G_OBJECT (self), "max-incoming-payload-size"); + } +} + +/** + * soup_websocket_connection_get_keepalive_interval: + * @self: the WebSocket + * + * Gets the keepalive interval in seconds or 0 if disabled. + * + * Returns: the keepalive interval. + * + * Since: 2.58 + */ +guint +soup_websocket_connection_get_keepalive_interval (SoupWebsocketConnection *self) +{ + SoupWebsocketConnectionPrivate *pv; + + g_return_val_if_fail (SOUP_IS_WEBSOCKET_CONNECTION (self), 0); + pv = self->pv; + + return pv->keepalive_interval; +} + +static gboolean +on_queue_ping (gpointer user_data) +{ + SoupWebsocketConnection *self = SOUP_WEBSOCKET_CONNECTION (user_data); + static const char ping_payload[] = "libsoup"; + + g_debug ("sending ping message"); + + send_message (self, SOUP_WEBSOCKET_QUEUE_NORMAL, 0x09, + (guint8 *) ping_payload, strlen(ping_payload)); + + return G_SOURCE_CONTINUE; +} + +/** + * soup_websocket_connection_set_keepalive_interval: + * @self: the WebSocket + * @interval: the interval to send a ping message or 0 to disable it + * + * Sets the interval in seconds on when to send a ping message which will serve + * as a keepalive message. If set to 0 the keepalive message is disabled. + * + * Since: 2.58 + */ +void +soup_websocket_connection_set_keepalive_interval (SoupWebsocketConnection *self, + guint interval) +{ + SoupWebsocketConnectionPrivate *pv; + + g_return_if_fail (SOUP_IS_WEBSOCKET_CONNECTION (self)); + pv = self->pv; + + if (pv->keepalive_interval != interval) { + pv->keepalive_interval = interval; + g_object_notify (G_OBJECT (self), "keepalive-interval"); + + keepalive_stop_timeout (self); + + if (interval > 0) { + pv->keepalive_timeout = g_timeout_source_new_seconds (interval); + g_source_set_callback (pv->keepalive_timeout, on_queue_ping, self, NULL); + g_source_attach (pv->keepalive_timeout, pv->main_context); + } + } +} diff --git a/libsoup/soup-websocket-connection.h b/libsoup/soup-websocket-connection.h new file mode 100644 index 00000000..bbd79e4d --- /dev/null +++ b/libsoup/soup-websocket-connection.h @@ -0,0 +1,127 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * soup-websocket-connection.h: This file was originally part of Cockpit. + * + * Copyright 2013, 2014 Red Hat, Inc. + * + * Cockpit is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * Cockpit 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; If not, see . + */ + +#ifndef __SOUP_WEBSOCKET_CONNECTION_H__ +#define __SOUP_WEBSOCKET_CONNECTION_H__ + +#include +#include + +G_BEGIN_DECLS + +#define SOUP_TYPE_WEBSOCKET_CONNECTION (soup_websocket_connection_get_type ()) +#define SOUP_WEBSOCKET_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SOUP_TYPE_WEBSOCKET_CONNECTION, SoupWebsocketConnection)) +#define SOUP_IS_WEBSOCKET_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SOUP_TYPE_WEBSOCKET_CONNECTION)) +#define SOUP_WEBSOCKET_CONNECTION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), SOUP_TYPE_WEBSOCKET_CONNECTION, SoupWebsocketConnectionClass)) +#define SOUP_WEBSOCKET_CONNECTION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), SOUP_TYPE_WEBSOCKET_CONNECTION, SoupWebsocketConnectionClass)) +#define SOUP_IS_WEBSOCKET_CONNECTION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SOUP_TYPE_WEBSOCKET_CONNECTION)) + +typedef struct _SoupWebsocketConnectionPrivate SoupWebsocketConnectionPrivate; + +struct _SoupWebsocketConnection { + GObject parent; + + /*< private >*/ + SoupWebsocketConnectionPrivate *pv; +}; + +typedef struct { + GObjectClass parent; + + /* signals */ + void (* message) (SoupWebsocketConnection *self, + SoupWebsocketDataType type, + GBytes *message); + + void (* error) (SoupWebsocketConnection *self, + GError *error); + + void (* closing) (SoupWebsocketConnection *self); + + void (* closed) (SoupWebsocketConnection *self); + + void (* pong) (SoupWebsocketConnection *self, + GBytes *message); +} SoupWebsocketConnectionClass; + +SOUP_AVAILABLE_IN_2_50 +GType soup_websocket_connection_get_type (void) G_GNUC_CONST; + +SOUP_AVAILABLE_IN_2_50 +SoupWebsocketConnection *soup_websocket_connection_new (GIOStream *stream, + SoupURI *uri, + SoupWebsocketConnectionType type, + const char *origin, + const char *protocol); + +SOUP_AVAILABLE_IN_2_50 +GIOStream * soup_websocket_connection_get_io_stream (SoupWebsocketConnection *self); + +SOUP_AVAILABLE_IN_2_50 +SoupWebsocketConnectionType soup_websocket_connection_get_connection_type (SoupWebsocketConnection *self); + +SOUP_AVAILABLE_IN_2_50 +SoupURI * soup_websocket_connection_get_uri (SoupWebsocketConnection *self); + +SOUP_AVAILABLE_IN_2_50 +const char * soup_websocket_connection_get_origin (SoupWebsocketConnection *self); + +SOUP_AVAILABLE_IN_2_50 +const char * soup_websocket_connection_get_protocol (SoupWebsocketConnection *self); + +SOUP_AVAILABLE_IN_2_50 +SoupWebsocketState soup_websocket_connection_get_state (SoupWebsocketConnection *self); + +SOUP_AVAILABLE_IN_2_50 +gushort soup_websocket_connection_get_close_code (SoupWebsocketConnection *self); + +SOUP_AVAILABLE_IN_2_50 +const char * soup_websocket_connection_get_close_data (SoupWebsocketConnection *self); + +SOUP_AVAILABLE_IN_2_50 +void soup_websocket_connection_send_text (SoupWebsocketConnection *self, + const char *text); +SOUP_AVAILABLE_IN_2_50 +void soup_websocket_connection_send_binary (SoupWebsocketConnection *self, + gconstpointer data, + gsize length); + +SOUP_AVAILABLE_IN_2_50 +void soup_websocket_connection_close (SoupWebsocketConnection *self, + gushort code, + const char *data); + +SOUP_AVAILABLE_IN_2_56 +guint64 soup_websocket_connection_get_max_incoming_payload_size (SoupWebsocketConnection *self); + +SOUP_AVAILABLE_IN_2_56 +void soup_websocket_connection_set_max_incoming_payload_size (SoupWebsocketConnection *self, + guint64 max_incoming_payload_size); + +SOUP_AVAILABLE_IN_2_58 +guint soup_websocket_connection_get_keepalive_interval (SoupWebsocketConnection *self); + +SOUP_AVAILABLE_IN_2_58 +void soup_websocket_connection_set_keepalive_interval (SoupWebsocketConnection *self, + guint interval); + +G_END_DECLS + +#endif /* __SOUP_WEBSOCKET_CONNECTION_H__ */ diff --git a/libsoup/soup-websocket.c b/libsoup/soup-websocket.c new file mode 100644 index 00000000..5038041d --- /dev/null +++ b/libsoup/soup-websocket.c @@ -0,0 +1,568 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * soup-websocket.c: This file was originally part of Cockpit. + * + * Copyright 2013, 2014 Red Hat, Inc. + * + * Cockpit is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * Cockpit 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; If not, see . + */ + +#include "config.h" + +#include +#include +#include + +#include "soup-websocket.h" +#include "soup-headers.h" +#include "soup-message.h" + +#define FIXED_DIGEST_LEN 20 + +/** + * SECTION:soup-websocket + * @short_description: The WebSocket Protocol + * @see_also: soup_session_websocket_connect_async(), + * soup_server_add_websocket_handler() + * + * #SoupWebsocketConnection provides support for the WebSocket protocol. + * + * To connect to a WebSocket server, create a #SoupSession and call + * soup_session_websocket_connect_async(). To accept WebSocket + * connections, create a #SoupServer and add a handler to it with + * soup_server_add_websocket_handler(). + * + * (Lower-level support is available via + * soup_websocket_client_prepare_handshake() and + * soup_websocket_client_verify_handshake(), for handling the client + * side of the WebSocket handshake, and + * soup_websocket_server_process_handshake() for handling the server + * side.) + * + * #SoupWebsocketConnection handles the details of WebSocket + * communication. You can use soup_websocket_connection_send_text() + * and soup_websocket_connection_send_binary() to send data, and the + * #SoupWebsocketConnection::message signal to receive data. + * (#SoupWebsocketConnection currently only supports asynchronous + * I/O.) + * + * Since: 2.50 + */ + +/** + * SOUP_WEBSOCKET_ERROR: + * + * A #GError domain for WebSocket-related errors. Used with + * #SoupWebsocketError. + * + * Since: 2.50 + */ + +/** + * SoupWebsocketError: + * @SOUP_WEBSOCKET_ERROR_FAILED: a generic error + * @SOUP_WEBSOCKET_ERROR_NOT_WEBSOCKET: attempted to handshake with a + * server that does not appear to understand WebSockets. + * @SOUP_WEBSOCKET_ERROR_BAD_HANDSHAKE: the WebSocket handshake failed + * because some detail was invalid (eg, incorrect accept key). + * @SOUP_WEBSOCKET_ERROR_BAD_ORIGIN: the WebSocket handshake failed + * because the "Origin" header was not an allowed value. + * + * WebSocket-related errors. + * + * Since: 2.50 + */ + +/** + * SoupWebsocketConnectionType: + * @SOUP_WEBSOCKET_CONNECTION_UNKNOWN: unknown/invalid connection + * @SOUP_WEBSOCKET_CONNECTION_CLIENT: a client-side connection + * @SOUP_WEBSOCKET_CONNECTION_SERVER: a server-side connection + * + * The type of a #SoupWebsocketConnection. + * + * Since: 2.50 + */ + +/** + * SoupWebsocketDataType: + * @SOUP_WEBSOCKET_DATA_TEXT: UTF-8 text + * @SOUP_WEBSOCKET_DATA_BINARY: binary data + * + * The type of data contained in a #SoupWebsocketConnection::message + * signal. + * + * Since: 2.50 + */ + +/** + * SoupWebsocketCloseCode: + * @SOUP_WEBSOCKET_CLOSE_NORMAL: a normal, non-error close + * @SOUP_WEBSOCKET_CLOSE_GOING_AWAY: the client/server is going away + * @SOUP_WEBSOCKET_CLOSE_PROTOCOL_ERROR: a protocol error occurred + * @SOUP_WEBSOCKET_CLOSE_UNSUPPORTED_DATA: the endpoint received data + * of a type that it does not support. + * @SOUP_WEBSOCKET_CLOSE_NO_STATUS: reserved value indicating that + * no close code was present; must not be sent. + * @SOUP_WEBSOCKET_CLOSE_ABNORMAL: reserved value indicating that + * the connection was closed abnormally; must not be sent. + * @SOUP_WEBSOCKET_CLOSE_BAD_DATA: the endpoint received data that + * was invalid (eg, non-UTF-8 data in a text message). + * @SOUP_WEBSOCKET_CLOSE_POLICY_VIOLATION: generic error code + * indicating some sort of policy violation. + * @SOUP_WEBSOCKET_CLOSE_TOO_BIG: the endpoint received a message + * that is too big to process. + * @SOUP_WEBSOCKET_CLOSE_NO_EXTENSION: the client is closing the + * connection because the server failed to negotiate a required + * extension. + * @SOUP_WEBSOCKET_CLOSE_SERVER_ERROR: the server is closing the + * connection because it was unable to fulfill the request. + * @SOUP_WEBSOCKET_CLOSE_TLS_HANDSHAKE: reserved value indicating that + * the TLS handshake failed; must not be sent. + * + * Pre-defined close codes that can be passed to + * soup_websocket_connection_close() or received from + * soup_websocket_connection_get_close_code(). (However, other codes + * are also allowed.) + * + * Since: 2.50 + */ + +/** + * SoupWebsocketState: + * @SOUP_WEBSOCKET_STATE_OPEN: the connection is ready to send messages + * @SOUP_WEBSOCKET_STATE_CLOSING: the connection is in the process of + * closing down; messages may be received, but not sent + * @SOUP_WEBSOCKET_STATE_CLOSED: the connection is completely closed down + * + * The state of the WebSocket connection. + * + * Since: 2.50 + */ + +GQuark +soup_websocket_error_get_quark (void) +{ + return g_quark_from_static_string ("web-socket-error-quark"); +} + +static gboolean +validate_key (const char *key) +{ + guchar buf[18]; + int state = 0; + guint save = 0; + + /* The spec requires us to check that the key is "a + * base64-encoded value that, when decoded, is 16 bytes in + * length". + */ + if (strlen (key) != 24) + return FALSE; + if (g_base64_decode_step (key, 24, buf, &state, &save) != 16) + return FALSE; + return TRUE; +} + +static char * +compute_accept_key (const char *key) +{ + gsize digest_len = FIXED_DIGEST_LEN; + guchar digest[FIXED_DIGEST_LEN]; + GChecksum *checksum; + + if (!key) + return NULL; + + checksum = g_checksum_new (G_CHECKSUM_SHA1); + g_return_val_if_fail (checksum != NULL, NULL); + + g_checksum_update (checksum, (guchar *)key, -1); + + /* magic from: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17 */ + g_checksum_update (checksum, (guchar *)"258EAFA5-E914-47DA-95CA-C5AB0DC85B11", -1); + + g_checksum_get_digest (checksum, digest, &digest_len); + g_checksum_free (checksum); + + g_assert (digest_len == FIXED_DIGEST_LEN); + + return g_base64_encode (digest, digest_len); +} + +static gboolean +choose_subprotocol (SoupMessage *msg, + const char **server_protocols, + const char **chosen_protocol) +{ + const char *client_protocols_str; + char **client_protocols; + int i, j; + + if (chosen_protocol) + *chosen_protocol = NULL; + + if (!server_protocols) + return TRUE; + + client_protocols_str = soup_message_headers_get_one (msg->request_headers, + "Sec-Websocket-Protocol"); + if (!client_protocols_str) + return TRUE; + + client_protocols = g_strsplit_set (client_protocols_str, ", ", -1); + if (!client_protocols || !client_protocols[0]) { + g_strfreev (client_protocols); + return TRUE; + } + + for (i = 0; server_protocols[i] != NULL; i++) { + for (j = 0; client_protocols[j] != NULL; j++) { + if (g_str_equal (server_protocols[i], client_protocols[j])) { + g_strfreev (client_protocols); + if (chosen_protocol) + *chosen_protocol = server_protocols[i]; + return TRUE; + } + } + } + + g_strfreev (client_protocols); + return FALSE; +} + +/** + * soup_websocket_client_prepare_handshake: + * @msg: a #SoupMessage + * @origin: (allow-none): the "Origin" header to set + * @protocols: (allow-none) (array zero-terminated=1): list of + * protocols to offer + * + * Adds the necessary headers to @msg to request a WebSocket + * handshake. The message body and non-WebSocket-related headers are + * not modified. + * + * This is a low-level function; if you use + * soup_session_websocket_connect_async() to create a WebSocket + * connection, it will call this for you. + * + * Since: 2.50 + */ +void +soup_websocket_client_prepare_handshake (SoupMessage *msg, + const char *origin, + char **protocols) +{ + guint32 raw[4]; + char *key; + + soup_message_headers_replace (msg->request_headers, "Upgrade", "websocket"); + soup_message_headers_append (msg->request_headers, "Connection", "Upgrade"); + + raw[0] = g_random_int (); + raw[1] = g_random_int (); + raw[2] = g_random_int (); + raw[3] = g_random_int (); + key = g_base64_encode ((const guchar *)raw, sizeof (raw)); + soup_message_headers_replace (msg->request_headers, "Sec-WebSocket-Key", key); + g_free (key); + + soup_message_headers_replace (msg->request_headers, "Sec-WebSocket-Version", "13"); + + if (origin) + soup_message_headers_replace (msg->request_headers, "Origin", origin); + + if (protocols) { + char *protocols_str; + + protocols_str = g_strjoinv (", ", protocols); + soup_message_headers_replace (msg->request_headers, + "Sec-WebSocket-Protocol", protocols_str); + g_free (protocols_str); + } +} + +/** + * soup_websocket_server_check_handshake: + * @msg: #SoupMessage containing the client side of a WebSocket handshake + * @origin: (allow-none): expected Origin header + * @protocols: (allow-none) (array zero-terminated=1): allowed WebSocket + * protocols. + * @error: return location for a #GError + * + * Examines the method and request headers in @msg and determines + * whether @msg contains a valid handshake request. + * + * If @origin is non-%NULL, then only requests containing a matching + * "Origin" header will be accepted. If @protocols is non-%NULL, then + * only requests containing a compatible "Sec-WebSocket-Protocols" + * header will be accepted. + * + * Normally soup_websocket_server_process_handshake() will take care + * of this for you, and if you use soup_server_add_websocket_handler() + * to handle accepting WebSocket connections, it will call that for + * you. However, this function may be useful if you need to perform + * more complicated validation; eg, accepting multiple different Origins, + * or handling different protocols depending on the path. + * + * Returns: %TRUE if @msg contained a valid WebSocket handshake, + * %FALSE and an error if not. + * + * Since: 2.50 + */ +gboolean +soup_websocket_server_check_handshake (SoupMessage *msg, + const char *expected_origin, + char **protocols, + GError **error) +{ + const char *origin; + const char *key; + + if (msg->method != SOUP_METHOD_GET) { + g_set_error_literal (error, + SOUP_WEBSOCKET_ERROR, + SOUP_WEBSOCKET_ERROR_NOT_WEBSOCKET, + _("WebSocket handshake expected")); + return FALSE; + } + + if (!soup_message_headers_header_equals (msg->request_headers, "Upgrade", "websocket") || + !soup_message_headers_header_contains (msg->request_headers, "Connection", "upgrade")) { + g_set_error_literal (error, + SOUP_WEBSOCKET_ERROR, + SOUP_WEBSOCKET_ERROR_NOT_WEBSOCKET, + _("WebSocket handshake expected")); + return FALSE; + } + + if (!soup_message_headers_header_equals (msg->request_headers, "Sec-WebSocket-Version", "13")) { + g_set_error_literal (error, + SOUP_WEBSOCKET_ERROR, + SOUP_WEBSOCKET_ERROR_BAD_HANDSHAKE, + _("Unsupported WebSocket version")); + return FALSE; + } + + key = soup_message_headers_get_one (msg->request_headers, "Sec-WebSocket-Key"); + if (key == NULL || !validate_key (key)) { + g_set_error_literal (error, + SOUP_WEBSOCKET_ERROR, + SOUP_WEBSOCKET_ERROR_BAD_HANDSHAKE, + _("Invalid WebSocket key")); + return FALSE; + } + + if (expected_origin) { + origin = soup_message_headers_get_one (msg->request_headers, "Origin"); + if (!origin || g_ascii_strcasecmp (origin, expected_origin) != 0) { + g_set_error (error, + SOUP_WEBSOCKET_ERROR, + SOUP_WEBSOCKET_ERROR_BAD_ORIGIN, + _("Incorrect WebSocket “%s” header"), "Origin"); + return FALSE; + } + } + + if (!choose_subprotocol (msg, (const char **) protocols, NULL)) { + g_set_error_literal (error, + SOUP_WEBSOCKET_ERROR, + SOUP_WEBSOCKET_ERROR_BAD_HANDSHAKE, + _("Unsupported WebSocket subprotocol")); + return FALSE; + } + + return TRUE; +} + +#define RESPONSE_FORBIDDEN "400 Forbidden\r\n" \ + "Received invalid WebSocket request\r\n" + +static void +respond_handshake_forbidden (SoupMessage *msg) +{ + soup_message_set_status (msg, SOUP_STATUS_FORBIDDEN); + soup_message_headers_append (msg->response_headers, "Connection", "close"); + soup_message_set_response (msg, "text/html", SOUP_MEMORY_COPY, + RESPONSE_FORBIDDEN, strlen (RESPONSE_FORBIDDEN)); +} + +#define RESPONSE_BAD "400 Bad Request\r\n" \ + "Received invalid WebSocket request: %s\r\n" + +static void +respond_handshake_bad (SoupMessage *msg, const char *why) +{ + char *text; + + text = g_strdup_printf (RESPONSE_BAD, why); + soup_message_set_status (msg, SOUP_STATUS_BAD_REQUEST); + soup_message_headers_append (msg->response_headers, "Connection", "close"); + soup_message_set_response (msg, "text/html", SOUP_MEMORY_TAKE, + text, strlen (text)); +} + +/** + * soup_websocket_server_process_handshake: + * @msg: #SoupMessage containing the client side of a WebSocket handshake + * @expected_origin: (allow-none): expected Origin header + * @protocols: (allow-none) (array zero-terminated=1): allowed WebSocket + * protocols. + * + * Examines the method and request headers in @msg and (assuming @msg + * contains a valid handshake request), fills in the handshake + * response. + * + * If @expected_origin is non-%NULL, then only requests containing a matching + * "Origin" header will be accepted. If @protocols is non-%NULL, then + * only requests containing a compatible "Sec-WebSocket-Protocols" + * header will be accepted. + * + * This is a low-level function; if you use + * soup_server_add_websocket_handler() to handle accepting WebSocket + * connections, it will call this for you. + * + * Returns: %TRUE if @msg contained a valid WebSocket handshake + * request and was updated to contain a handshake response. %FALSE if not. + * + * Since: 2.50 + */ +gboolean +soup_websocket_server_process_handshake (SoupMessage *msg, + const char *expected_origin, + char **protocols) +{ + const char *chosen_protocol = NULL; + const char *key; + char *accept_key; + GError *error = NULL; + + if (!soup_websocket_server_check_handshake (msg, expected_origin, protocols, &error)) { + if (g_error_matches (error, + SOUP_WEBSOCKET_ERROR, + SOUP_WEBSOCKET_ERROR_BAD_ORIGIN)) + respond_handshake_forbidden (msg); + else + respond_handshake_bad (msg, error->message); + g_error_free (error); + return FALSE; + } + + soup_message_set_status (msg, SOUP_STATUS_SWITCHING_PROTOCOLS); + soup_message_headers_replace (msg->response_headers, "Upgrade", "websocket"); + soup_message_headers_append (msg->response_headers, "Connection", "Upgrade"); + + key = soup_message_headers_get_one (msg->request_headers, "Sec-WebSocket-Key"); + accept_key = compute_accept_key (key); + soup_message_headers_append (msg->response_headers, "Sec-WebSocket-Accept", accept_key); + g_free (accept_key); + + choose_subprotocol (msg, (const char **) protocols, &chosen_protocol); + if (chosen_protocol) + soup_message_headers_append (msg->response_headers, "Sec-WebSocket-Protocol", chosen_protocol); + + return TRUE; +} + +/** + * soup_websocket_client_verify_handshake: + * @msg: #SoupMessage containing both client and server sides of a + * WebSocket handshake + * @error: return location for a #GError + * + * Looks at the response status code and headers in @msg and + * determines if they contain a valid WebSocket handshake response + * (given the handshake request in @msg's request headers). + * + * This is a low-level function; if you use + * soup_session_websocket_connect_async() to create a WebSocket + * connection, it will call this for you. + * + * Returns: %TRUE if @msg contains a completed valid WebSocket + * handshake, %FALSE and an error if not. + * + * Since: 2.50 + */ +gboolean +soup_websocket_client_verify_handshake (SoupMessage *msg, + GError **error) +{ + const char *protocol, *request_protocols, *extensions, *accept_key; + char *expected_accept_key; + gboolean key_ok; + + if (msg->status_code == SOUP_STATUS_BAD_REQUEST) { + g_set_error_literal (error, + SOUP_WEBSOCKET_ERROR, + SOUP_WEBSOCKET_ERROR_BAD_HANDSHAKE, + _("Server rejected WebSocket handshake")); + return FALSE; + } + + if (msg->status_code != SOUP_STATUS_SWITCHING_PROTOCOLS) { + g_set_error_literal (error, + SOUP_WEBSOCKET_ERROR, + SOUP_WEBSOCKET_ERROR_NOT_WEBSOCKET, + _("Server ignored WebSocket handshake")); + return FALSE; + } + + if (!soup_message_headers_header_equals (msg->response_headers, "Upgrade", "websocket") || + !soup_message_headers_header_contains (msg->response_headers, "Connection", "upgrade")) { + g_set_error_literal (error, + SOUP_WEBSOCKET_ERROR, + SOUP_WEBSOCKET_ERROR_NOT_WEBSOCKET, + _("Server ignored WebSocket handshake")); + return FALSE; + } + + protocol = soup_message_headers_get_one (msg->response_headers, "Sec-WebSocket-Protocol"); + if (protocol) { + request_protocols = soup_message_headers_get_one (msg->request_headers, "Sec-WebSocket-Protocol"); + if (!request_protocols || + !soup_header_contains (request_protocols, protocol)) { + g_set_error_literal (error, + SOUP_WEBSOCKET_ERROR, + SOUP_WEBSOCKET_ERROR_BAD_HANDSHAKE, + _("Server requested unsupported protocol")); + return FALSE; + } + } + + extensions = soup_message_headers_get_list (msg->response_headers, "Sec-WebSocket-Extensions"); + if (extensions && *extensions) { + g_set_error_literal (error, + SOUP_WEBSOCKET_ERROR, + SOUP_WEBSOCKET_ERROR_BAD_HANDSHAKE, + _("Server requested unsupported extension")); + return FALSE; + } + + accept_key = soup_message_headers_get_one (msg->response_headers, "Sec-WebSocket-Accept"); + expected_accept_key = compute_accept_key (soup_message_headers_get_one (msg->request_headers, "Sec-WebSocket-Key")); + key_ok = (accept_key && expected_accept_key && + !g_ascii_strcasecmp (accept_key, expected_accept_key)); + g_free (expected_accept_key); + if (!key_ok) { + g_set_error (error, + SOUP_WEBSOCKET_ERROR, + SOUP_WEBSOCKET_ERROR_BAD_HANDSHAKE, + _("Server returned incorrect “%s” key"), + "Sec-WebSocket-Accept"); + return FALSE; + } + + return TRUE; +} diff --git a/libsoup/soup-websocket.h b/libsoup/soup-websocket.h new file mode 100644 index 00000000..20584982 --- /dev/null +++ b/libsoup/soup-websocket.h @@ -0,0 +1,93 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * soup-websocket.h: This file was originally part of Cockpit. + * + * Copyright 2013, 2014 Red Hat, Inc. + * + * Cockpit is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * Cockpit 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; If not, see . + */ + +#ifndef __SOUP_WEBSOCKET_H__ +#define __SOUP_WEBSOCKET_H__ + +#include + +G_BEGIN_DECLS + +#define SOUP_WEBSOCKET_ERROR (soup_websocket_error_get_quark ()) +SOUP_AVAILABLE_IN_2_50 +GQuark soup_websocket_error_get_quark (void) G_GNUC_CONST; + +typedef enum { + SOUP_WEBSOCKET_ERROR_FAILED, + SOUP_WEBSOCKET_ERROR_NOT_WEBSOCKET, + SOUP_WEBSOCKET_ERROR_BAD_HANDSHAKE, + SOUP_WEBSOCKET_ERROR_BAD_ORIGIN, +} SoupWebsocketError; + +typedef enum { + SOUP_WEBSOCKET_CONNECTION_UNKNOWN, + SOUP_WEBSOCKET_CONNECTION_CLIENT, + SOUP_WEBSOCKET_CONNECTION_SERVER +} SoupWebsocketConnectionType; + +typedef enum { + SOUP_WEBSOCKET_DATA_TEXT = 0x01, + SOUP_WEBSOCKET_DATA_BINARY = 0x02, +} SoupWebsocketDataType; + +typedef enum { + SOUP_WEBSOCKET_CLOSE_NORMAL = 1000, + SOUP_WEBSOCKET_CLOSE_GOING_AWAY = 1001, + SOUP_WEBSOCKET_CLOSE_PROTOCOL_ERROR = 1002, + SOUP_WEBSOCKET_CLOSE_UNSUPPORTED_DATA = 1003, + SOUP_WEBSOCKET_CLOSE_NO_STATUS = 1005, + SOUP_WEBSOCKET_CLOSE_ABNORMAL = 1006, + SOUP_WEBSOCKET_CLOSE_BAD_DATA = 1007, + SOUP_WEBSOCKET_CLOSE_POLICY_VIOLATION = 1008, + SOUP_WEBSOCKET_CLOSE_TOO_BIG = 1009, + SOUP_WEBSOCKET_CLOSE_NO_EXTENSION = 1010, + SOUP_WEBSOCKET_CLOSE_SERVER_ERROR = 1011, + SOUP_WEBSOCKET_CLOSE_TLS_HANDSHAKE = 1015, +} SoupWebsocketCloseCode; + +typedef enum { + SOUP_WEBSOCKET_STATE_OPEN = 1, + SOUP_WEBSOCKET_STATE_CLOSING = 2, + SOUP_WEBSOCKET_STATE_CLOSED = 3, +} SoupWebsocketState; + +SOUP_AVAILABLE_IN_2_50 +void soup_websocket_client_prepare_handshake (SoupMessage *msg, + const char *origin, + char **protocols); + +SOUP_AVAILABLE_IN_2_50 +gboolean soup_websocket_client_verify_handshake (SoupMessage *msg, + GError **error); + +SOUP_AVAILABLE_IN_2_50 +gboolean soup_websocket_server_check_handshake (SoupMessage *msg, + const char *origin, + char **protocols, + GError **error); + +SOUP_AVAILABLE_IN_2_50 +gboolean soup_websocket_server_process_handshake (SoupMessage *msg, + const char *expected_origin, + char **protocols); + +G_END_DECLS + +#endif /* __SOUP_WEBSOCKET_H__ */ diff --git a/libsoup/soup-xmlrpc-old.c b/libsoup/soup-xmlrpc-old.c new file mode 100644 index 00000000..c57086b6 --- /dev/null +++ b/libsoup/soup-xmlrpc-old.c @@ -0,0 +1,738 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * soup-xmlrpc.c: XML-RPC parser/generator + * + * Copyright (C) 2007 Red Hat, Inc. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + +#include + +#include "soup-xmlrpc-old.h" +#include "soup.h" + +/** + * SECTION:soup-xmlrpc + * @short_description: XML-RPC support + * + **/ + +/* This whole file is deprecated and replaced by soup-xmlrpc.c */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + +static xmlNode *find_real_node (xmlNode *node); + +static gboolean insert_value (xmlNode *parent, GValue *value); + +static gboolean +insert_value (xmlNode *parent, GValue *value) +{ + GType type = G_VALUE_TYPE (value); + xmlNode *xvalue; + char buf[128]; + + xvalue = xmlNewChild (parent, NULL, (const xmlChar *)"value", NULL); + + if (type == G_TYPE_INT) { + g_snprintf (buf, sizeof (buf), "%d", g_value_get_int (value)); + xmlNewChild (xvalue, NULL, + (const xmlChar *)"int", + (const xmlChar *)buf); + } else if (type == G_TYPE_BOOLEAN) { + g_snprintf (buf, sizeof (buf), "%d", g_value_get_boolean (value)); + xmlNewChild (xvalue, NULL, + (const xmlChar *)"boolean", + (const xmlChar *)buf); + } else if (type == G_TYPE_STRING) { + xmlNewTextChild (xvalue, NULL, + (const xmlChar *)"string", + (const xmlChar *)g_value_get_string (value)); + } else if (type == G_TYPE_DOUBLE) { + g_ascii_dtostr (buf, sizeof (buf), g_value_get_double (value)); + xmlNewChild (xvalue, NULL, + (const xmlChar *)"double", + (const xmlChar *)buf); + } else if (type == SOUP_TYPE_DATE) { + SoupDate *date = g_value_get_boxed (value); + char *timestamp = soup_date_to_string (date, SOUP_DATE_ISO8601_XMLRPC); + xmlNewChild (xvalue, NULL, + (const xmlChar *)"dateTime.iso8601", + (const xmlChar *)timestamp); + g_free (timestamp); + } else if (type == SOUP_TYPE_BYTE_ARRAY) { + GByteArray *ba = g_value_get_boxed (value); + char *encoded; + + encoded = g_base64_encode (ba->data, ba->len); + xmlNewChild (xvalue, NULL, + (const xmlChar *)"base64", + (const xmlChar *)encoded); + g_free (encoded); + } else if (type == G_TYPE_HASH_TABLE) { + GHashTable *hash = g_value_get_boxed (value); + GHashTableIter iter; + gpointer mname, mvalue; + xmlNode *struct_node, *member; + + struct_node = xmlNewChild (xvalue, NULL, + (const xmlChar *)"struct", NULL); + + g_hash_table_iter_init (&iter, hash); + + while (g_hash_table_iter_next (&iter, &mname, &mvalue)) { + member = xmlNewChild (struct_node, NULL, + (const xmlChar *)"member", NULL); + xmlNewTextChild (member, NULL, + (const xmlChar *)"name", + (const xmlChar *)mname); + if (!insert_value (member, mvalue)) { + xmlFreeNode (struct_node); + struct_node = NULL; + break; + } + } + + if (!struct_node) + return FALSE; + } else if (type == G_TYPE_VALUE_ARRAY) { + GValueArray *va = g_value_get_boxed (value); + xmlNode *node; + guint i; + + node = xmlNewChild (xvalue, NULL, + (const xmlChar *)"array", NULL); + node = xmlNewChild (node, NULL, + (const xmlChar *)"data", NULL); + for (i = 0; i < va->n_values; i++) { + if (!insert_value (node, &va->values[i])) + return FALSE; + } + } else + return FALSE; + + return TRUE; +} + +/** + * soup_xmlrpc_build_method_call: + * @method_name: the name of the XML-RPC method + * @params: (array length=n_params): arguments to @method + * @n_params: length of @params + * + * This creates an XML-RPC methodCall and returns it as a string. + * This is the low-level method that soup_xmlrpc_request_new() is + * built on. + * + * @params is an array of #GValue representing the parameters to + * @method. (It is *not* a #GValueArray, although if you have a + * #GValueArray, you can just pass its valuesf and + * n_values fields.) + * + * The correspondence between glib types and XML-RPC types is: + * + * int: #int (%G_TYPE_INT) + * boolean: #gboolean (%G_TYPE_BOOLEAN) + * string: #char* (%G_TYPE_STRING) + * double: #double (%G_TYPE_DOUBLE) + * datetime.iso8601: #SoupDate (%SOUP_TYPE_DATE) + * base64: #GByteArray (%SOUP_TYPE_BYTE_ARRAY) + * struct: #GHashTable (%G_TYPE_HASH_TABLE) + * array: #GValueArray (%G_TYPE_VALUE_ARRAY) + * + * For structs, use a #GHashTable that maps strings to #GValue; + * soup_value_hash_new() and related methods can help with this. + * + * Return value: (nullable): the text of the methodCall, or %NULL on + * error + * + * Deprecated: Use soup_xmlrpc_build_request() instead. + **/ +char * +soup_xmlrpc_build_method_call (const char *method_name, + GValue *params, int n_params) +{ + xmlDoc *doc; + xmlNode *node, *param; + xmlChar *xmlbody; + int i, len; + char *body; + + doc = xmlNewDoc ((const xmlChar *)"1.0"); + doc->standalone = FALSE; + doc->encoding = xmlCharStrdup ("UTF-8"); + + node = xmlNewDocNode (doc, NULL, (const xmlChar *)"methodCall", NULL); + xmlDocSetRootElement (doc, node); + xmlNewChild (node, NULL, (const xmlChar *)"methodName", + (const xmlChar *)method_name); + + node = xmlNewChild (node, NULL, (const xmlChar *)"params", NULL); + for (i = 0; i < n_params; i++) { + param = xmlNewChild (node, NULL, + (const xmlChar *)"param", NULL); + if (!insert_value (param, ¶ms[i])) { + xmlFreeDoc (doc); + return NULL; + } + } + + xmlDocDumpMemory (doc, &xmlbody, &len); + body = g_strndup ((char *)xmlbody, len); + xmlFree (xmlbody); + xmlFreeDoc (doc); + return body; +} + +static SoupMessage * +soup_xmlrpc_request_newv (const char *uri, const char *method_name, va_list args) +{ + SoupMessage *msg; + GValueArray *params; + char *body; + + params = soup_value_array_from_args (args); + if (!params) + return NULL; + + body = soup_xmlrpc_build_method_call (method_name, params->values, + params->n_values); + g_value_array_free (params); + + if (!body) + return NULL; + + msg = soup_message_new ("POST", uri); + soup_message_set_request (msg, "text/xml", SOUP_MEMORY_TAKE, + body, strlen (body)); + return msg; +} + +/** + * soup_xmlrpc_request_new: + * @uri: URI of the XML-RPC service + * @method_name: the name of the XML-RPC method to invoke at @uri + * @...: parameters for @method + * + * Creates an XML-RPC methodCall and returns a #SoupMessage, ready + * to send, for that method call. + * + * The parameters are passed as type/value pairs; ie, first a #GType, + * and then a value of the appropriate type, finally terminated by + * %G_TYPE_INVALID. + * + * Return value: (transfer full): a #SoupMessage encoding the + * indicated XML-RPC request. + * + * Deprecated: Use soup_xmlrpc_message_new() instead. + **/ +SoupMessage * +soup_xmlrpc_request_new (const char *uri, const char *method_name, ...) +{ + SoupMessage *msg; + va_list args; + + va_start (args, method_name); + msg = soup_xmlrpc_request_newv (uri, method_name, args); + va_end (args); + return msg; +} + +/** + * soup_xmlrpc_build_method_response: + * @value: the return value + * + * This creates a (successful) XML-RPC methodResponse and returns it + * as a string. To create a fault response, use + * soup_xmlrpc_build_fault(). + * + * The glib type to XML-RPC type mapping is as with + * soup_xmlrpc_build_method_call(), qv. + * + * Return value: (nullable): the text of the methodResponse, or %NULL + * on error + * + * Deprecated: Use soup_xmlrpc_build_response() instead. + **/ +char * +soup_xmlrpc_build_method_response (GValue *value) +{ + xmlDoc *doc; + xmlNode *node; + xmlChar *xmlbody; + char *body; + int len; + + doc = xmlNewDoc ((const xmlChar *)"1.0"); + doc->standalone = FALSE; + doc->encoding = xmlCharStrdup ("UTF-8"); + + node = xmlNewDocNode (doc, NULL, + (const xmlChar *)"methodResponse", NULL); + xmlDocSetRootElement (doc, node); + + node = xmlNewChild (node, NULL, (const xmlChar *)"params", NULL); + node = xmlNewChild (node, NULL, (const xmlChar *)"param", NULL); + if (!insert_value (node, value)) { + xmlFreeDoc (doc); + return NULL; + } + + xmlDocDumpMemory (doc, &xmlbody, &len); + body = g_strndup ((char *)xmlbody, len); + xmlFree (xmlbody); + xmlFreeDoc (doc); + return body; +} + +/** + * soup_xmlrpc_set_response: + * @msg: an XML-RPC request + * @type: the type of the response value + * @...: the response value + * + * Sets the status code and response body of @msg to indicate a + * successful XML-RPC call, with a return value given by @type and the + * following varargs argument, of the type indicated by @type. + * + * Deprecated: Use soup_xmlrpc_message_set_response() instead. + **/ +void +soup_xmlrpc_set_response (SoupMessage *msg, GType type, ...) +{ + va_list args; + GValue value; + char *body; + + va_start (args, type); + SOUP_VALUE_SETV (&value, type, args); + va_end (args); + + body = soup_xmlrpc_build_method_response (&value); + g_value_unset (&value); + soup_message_set_status (msg, SOUP_STATUS_OK); + soup_message_set_response (msg, "text/xml", SOUP_MEMORY_TAKE, + body, strlen (body)); +} + +char *soup_xmlrpc_build_faultv (int fault_code, + const char *fault_format, + va_list args) G_GNUC_PRINTF (2, 0); + +/** + * soup_xmlrpc_set_fault: + * @msg: an XML-RPC request + * @fault_code: the fault code + * @fault_format: a printf()-style format string + * @...: the parameters to @fault_format + * + * Sets the status code and response body of @msg to indicate an + * unsuccessful XML-RPC call, with the error described by @fault_code + * and @fault_format. + * + * Deprecated: Use soup_xmlrpc_message_set_fault() instead. + **/ +void +soup_xmlrpc_set_fault (SoupMessage *msg, int fault_code, + const char *fault_format, ...) +{ + va_list args; + char *body; + + va_start (args, fault_format); + body = soup_xmlrpc_build_faultv (fault_code, fault_format, args); + va_end (args); + + soup_message_set_status (msg, SOUP_STATUS_OK); + soup_message_set_response (msg, "text/xml", SOUP_MEMORY_TAKE, + body, strlen (body)); +} + + + +static gboolean +parse_value (xmlNode *xmlvalue, GValue *value) +{ + xmlNode *typenode; + const char *typename; + xmlChar *content; + + memset (value, 0, sizeof (GValue)); + + typenode = find_real_node (xmlvalue->children); + if (!typenode) { + /* If no type node, it's a string */ + content = xmlNodeGetContent (typenode); + g_value_init (value, G_TYPE_STRING); + g_value_set_string (value, (char *)content); + xmlFree (content); + return TRUE; + } + + typename = (const char *)typenode->name; + + if (!strcmp (typename, "i4") || !strcmp (typename, "int")) { + content = xmlNodeGetContent (typenode); + g_value_init (value, G_TYPE_INT); + g_value_set_int (value, atoi ((char *)content)); + xmlFree (content); + } else if (!strcmp (typename, "boolean")) { + content = xmlNodeGetContent (typenode); + g_value_init (value, G_TYPE_BOOLEAN); + g_value_set_boolean (value, atoi ((char *)content)); + xmlFree (content); + } else if (!strcmp (typename, "string")) { + content = xmlNodeGetContent (typenode); + g_value_init (value, G_TYPE_STRING); + g_value_set_string (value, (char *)content); + xmlFree (content); + } else if (!strcmp (typename, "double")) { + content = xmlNodeGetContent (typenode); + g_value_init (value, G_TYPE_DOUBLE); + g_value_set_double (value, g_ascii_strtod ((char *)content, NULL)); + xmlFree (content); + } else if (!strcmp (typename, "dateTime.iso8601")) { + content = xmlNodeGetContent (typenode); + g_value_init (value, SOUP_TYPE_DATE); + g_value_take_boxed (value, soup_date_new_from_string ((char *)content)); + xmlFree (content); + } else if (!strcmp (typename, "base64")) { + GByteArray *ba; + guchar *decoded; + gsize len; + + content = xmlNodeGetContent (typenode); + decoded = g_base64_decode ((char *)content, &len); + ba = g_byte_array_sized_new (len); + g_byte_array_append (ba, decoded, len); + g_free (decoded); + xmlFree (content); + g_value_init (value, SOUP_TYPE_BYTE_ARRAY); + g_value_take_boxed (value, ba); + } else if (!strcmp (typename, "struct")) { + xmlNode *member, *child, *mname, *mxval; + GHashTable *hash; + GValue mgval; + + hash = soup_value_hash_new (); + for (member = find_real_node (typenode->children); + member; + member = find_real_node (member->next)) { + if (strcmp ((const char *)member->name, "member") != 0) { + g_hash_table_destroy (hash); + return FALSE; + } + mname = mxval = NULL; + memset (&mgval, 0, sizeof (mgval)); + + for (child = find_real_node (member->children); + child; + child = find_real_node (child->next)) { + if (!strcmp ((const char *)child->name, "name")) + mname = child; + else if (!strcmp ((const char *)child->name, "value")) + mxval = child; + else + break; + } + + if (!mname || !mxval || !parse_value (mxval, &mgval)) { + g_hash_table_destroy (hash); + return FALSE; + } + + content = xmlNodeGetContent (mname); + soup_value_hash_insert_value (hash, (char *)content, &mgval); + xmlFree (content); + g_value_unset (&mgval); + } + g_value_init (value, G_TYPE_HASH_TABLE); + g_value_take_boxed (value, hash); + } else if (!strcmp (typename, "array")) { + xmlNode *data, *xval; + GValueArray *array; + GValue gval; + + data = find_real_node (typenode->children); + if (!data || strcmp ((const char *)data->name, "data") != 0) + return FALSE; + + array = g_value_array_new (1); + for (xval = find_real_node (data->children); + xval; + xval = find_real_node (xval->next)) { + memset (&gval, 0, sizeof (gval)); + if (strcmp ((const char *)xval->name, "value") != 0 || + !parse_value (xval, &gval)) { + g_value_array_free (array); + return FALSE; + } + + g_value_array_append (array, &gval); + g_value_unset (&gval); + } + g_value_init (value, G_TYPE_VALUE_ARRAY); + g_value_take_boxed (value, array); + } else + return FALSE; + + return TRUE; +} + +/** + * soup_xmlrpc_parse_method_call: + * @method_call: the XML-RPC methodCall string + * @length: the length of @method_call, or -1 if it is NUL-terminated + * @method_name: (out): on return, the methodName from @method_call + * @params: (out): on return, the parameters from @method_call + * + * Parses @method_call to get the name and parameters, and returns the + * parameter values in a #GValueArray; see also + * soup_xmlrpc_extract_method_call(), which is more convenient if you + * know in advance what the types of the parameters will be. + * + * Return value: success or failure. + * + * Deprecated: Use soup_xmlrpc_parse_request_full() instead. + **/ +gboolean +soup_xmlrpc_parse_method_call (const char *method_call, int length, + char **method_name, GValueArray **params) +{ + xmlDoc *doc; + xmlNode *node, *param, *xval; + xmlChar *xmlMethodName = NULL; + gboolean success = FALSE; + GValue value; + + doc = xmlParseMemory (method_call, + length == -1 ? strlen (method_call) : length); + if (!doc) + return FALSE; + + node = xmlDocGetRootElement (doc); + if (!node || strcmp ((const char *)node->name, "methodCall") != 0) + goto fail; + + node = find_real_node (node->children); + if (!node || strcmp ((const char *)node->name, "methodName") != 0) + goto fail; + xmlMethodName = xmlNodeGetContent (node); + + node = find_real_node (node->next); + if (node) { + if (strcmp ((const char *)node->name, "params") != 0) + goto fail; + + *params = soup_value_array_new (); + param = find_real_node (node->children); + while (param && !strcmp ((const char *)param->name, "param")) { + xval = find_real_node (param->children); + if (!xval || strcmp ((const char *)xval->name, "value") != 0 || + !parse_value (xval, &value)) { + g_value_array_free (*params); + goto fail; + } + g_value_array_append (*params, &value); + g_value_unset (&value); + + param = find_real_node (param->next); + } + } else + *params = soup_value_array_new (); + + success = TRUE; + *method_name = g_strdup ((char *)xmlMethodName); + +fail: + xmlFreeDoc (doc); + if (xmlMethodName) + xmlFree (xmlMethodName); + return success; +} + +/** + * soup_xmlrpc_extract_method_call: + * @method_call: the XML-RPC methodCall string + * @length: the length of @method_call, or -1 if it is NUL-terminated + * @method_name: (out): on return, the methodName from @method_call + * @...: return types and locations for parameters + * + * Parses @method_call to get the name and parameters, and puts + * the parameters into variables of the appropriate types. + * + * The parameters are handled similarly to + * @soup_xmlrpc_build_method_call, with pairs of types and values, + * terminated by %G_TYPE_INVALID, except that values are pointers to + * variables of the indicated type, rather than values of the type. + * + * See also soup_xmlrpc_parse_method_call(), which can be used if + * you don't know the types of the parameters. + * + * Return value: success or failure. + * + * Deprecated: Use soup_xmlrpc_parse_request_full() instead. + **/ +gboolean +soup_xmlrpc_extract_method_call (const char *method_call, int length, + char **method_name, ...) +{ + GValueArray *params; + gboolean success; + va_list args; + + if (!soup_xmlrpc_parse_method_call (method_call, length, + method_name, ¶ms)) + return FALSE; + + va_start (args, method_name); + success = soup_value_array_to_args (params, args); + va_end (args); + + g_value_array_free (params); + + return success; +} + +/** + * soup_xmlrpc_parse_method_response: + * @method_response: the XML-RPC methodResponse string + * @length: the length of @method_response, or -1 if it is NUL-terminated + * @value: (out): on return, the return value from @method_call + * @error: error return value + * + * Parses @method_response and returns the return value in @value. If + * @method_response is a fault, @value will be unchanged, and @error + * will be set to an error of type %SOUP_XMLRPC_FAULT, with the error + * #code containing the fault code, and the error #message containing + * the fault string. (If @method_response cannot be parsed at all, + * soup_xmlrpc_parse_method_response() will return %FALSE, but @error + * will be unset.) + * + * Return value: %TRUE if a return value was parsed, %FALSE if the + * response could not be parsed, or contained a fault. + * + * Deprecated: Use soup_xmlrpc_parse_response() instead. + **/ +gboolean +soup_xmlrpc_parse_method_response (const char *method_response, int length, + GValue *value, GError **error) +{ + xmlDoc *doc; + xmlNode *node; + gboolean success = FALSE; + + doc = xmlParseMemory (method_response, + length == -1 ? strlen (method_response) : length); + if (!doc) + return FALSE; + + node = xmlDocGetRootElement (doc); + if (!node || strcmp ((const char *)node->name, "methodResponse") != 0) + goto fail; + + node = find_real_node (node->children); + if (!node) + goto fail; + + if (!strcmp ((const char *)node->name, "fault") && error) { + int fault_code; + char *fault_string; + GValue fault_val; + GHashTable *fault_hash; + + node = find_real_node (node->children); + if (!node || strcmp ((const char *)node->name, "value") != 0) + goto fail; + if (!parse_value (node, &fault_val)) + goto fail; + if (!G_VALUE_HOLDS (&fault_val, G_TYPE_HASH_TABLE)) { + g_value_unset (&fault_val); + goto fail; + } + fault_hash = g_value_get_boxed (&fault_val); + if (!soup_value_hash_lookup (fault_hash, "faultCode", + G_TYPE_INT, &fault_code) || + !soup_value_hash_lookup (fault_hash, "faultString", + G_TYPE_STRING, &fault_string)) { + g_value_unset (&fault_val); + goto fail; + } + + g_set_error (error, SOUP_XMLRPC_FAULT, + fault_code, "%s", fault_string); + g_value_unset (&fault_val); + } else if (!strcmp ((const char *)node->name, "params")) { + node = find_real_node (node->children); + if (!node || strcmp ((const char *)node->name, "param") != 0) + goto fail; + node = find_real_node (node->children); + if (!node || strcmp ((const char *)node->name, "value") != 0) + goto fail; + if (!parse_value (node, value)) + goto fail; + success = TRUE; + } + +fail: + xmlFreeDoc (doc); + return success; +} + +/** + * soup_xmlrpc_extract_method_response: + * @method_response: the XML-RPC methodResponse string + * @length: the length of @method_response, or -1 if it is NUL-terminated + * @error: error return value + * @type: the expected type of the return value + * @...: location for return value + * + * Parses @method_response and extracts the return value into + * a variable of the correct type. + * + * If @method_response is a fault, the return value will be unset, + * and @error will be set to an error of type %SOUP_XMLRPC_FAULT, with + * the error #code containing the fault code, and the error #message + * containing the fault string. (If @method_response cannot be parsed + * at all, soup_xmlrpc_extract_method_response() will return %FALSE, + * but @error will be unset.) + * + * Return value: %TRUE if a return value was parsed, %FALSE if the + * response was of the wrong type, or contained a fault. + * + * Deprecated: Use soup_xmlrpc_parse_response() instead. + **/ +gboolean +soup_xmlrpc_extract_method_response (const char *method_response, int length, + GError **error, GType type, ...) +{ + GValue value; + va_list args; + + if (!soup_xmlrpc_parse_method_response (method_response, length, + &value, error)) + return FALSE; + if (!G_VALUE_HOLDS (&value, type)) + return FALSE; + + va_start (args, type); + SOUP_VALUE_GETV (&value, type, args); + va_end (args); + + return TRUE; +} + +static xmlNode * +find_real_node (xmlNode *node) +{ + while (node && (node->type == XML_COMMENT_NODE || + xmlIsBlankNode (node))) + node = node->next; + return node; +} + +G_GNUC_END_IGNORE_DEPRECATIONS diff --git a/libsoup/soup-xmlrpc-old.h b/libsoup/soup-xmlrpc-old.h new file mode 100644 index 00000000..1f486eff --- /dev/null +++ b/libsoup/soup-xmlrpc-old.h @@ -0,0 +1,68 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Copyright (C) 2007 Red Hat, Inc. + */ + +#ifndef SOUP_XMLRPC_OLD_H +#define SOUP_XMLRPC_OLD_H 1 + +#include + +G_BEGIN_DECLS + +/* XML-RPC client */ +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_build_request) +char *soup_xmlrpc_build_method_call (const char *method_name, + GValue *params, + int n_params); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_message_new) +SoupMessage *soup_xmlrpc_request_new (const char *uri, + const char *method_name, + ...); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_parse_response) +gboolean soup_xmlrpc_parse_method_response (const char *method_response, + int length, + GValue *value, + GError **error); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_parse_response) +gboolean soup_xmlrpc_extract_method_response (const char *method_response, + int length, + GError **error, + GType type, + ...); + +/* XML-RPC server */ +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_parse_request) +gboolean soup_xmlrpc_parse_method_call (const char *method_call, + int length, + char **method_name, + GValueArray **params); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_parse_request) +gboolean soup_xmlrpc_extract_method_call (const char *method_call, + int length, + char **method_name, + ...); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_build_response) +char *soup_xmlrpc_build_method_response (GValue *value); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_message_set_response) +void soup_xmlrpc_set_response (SoupMessage *msg, + GType type, + ...); +SOUP_AVAILABLE_IN_2_4 +SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_message_set_fault) +void soup_xmlrpc_set_fault (SoupMessage *msg, + int fault_code, + const char *fault_format, + ...) G_GNUC_PRINTF (3, 4); + +G_END_DECLS + +#endif /* SOUP_XMLRPC_OLD_H */ diff --git a/libsoup/soup-xmlrpc.c b/libsoup/soup-xmlrpc.c index e2890100..42dcda9c 100644 --- a/libsoup/soup-xmlrpc.c +++ b/libsoup/soup-xmlrpc.c @@ -2,7 +2,13 @@ /* * soup-xmlrpc.c: XML-RPC parser/generator * - * Copyright (C) 2007 Red Hat, Inc. + * Copyright 2007 Red Hat, Inc. + * Copyright 2007 OpenedHand Ltd. + * Copyright 2015 Collabora ltd. + * + * Author: + * Eduardo Lima Mitev + * Xavier Claessens */ #ifdef HAVE_CONFIG_H @@ -10,157 +16,275 @@ #endif #include - +#include #include - #include "soup-xmlrpc.h" #include "soup.h" -/** - * SECTION:soup-xmlrpc - * @short_description: XML-RPC support - * - **/ +static gboolean insert_value (xmlNode *parent, GVariant *value, GError **error); + +static gboolean +insert_array (xmlNode *parent, GVariant *value, GError **error) +{ + xmlNode *node; + GVariantIter iter; + GVariant *child; + + node = xmlNewChild (parent, NULL, + (const xmlChar *)"array", NULL); + node = xmlNewChild (node, NULL, + (const xmlChar *)"data", NULL); + + g_variant_iter_init (&iter, value); + while ((child = g_variant_iter_next_value (&iter))) { + if (!insert_value (node, child, error)) { + g_variant_unref (child); + return FALSE; + } + g_variant_unref (child); + } + + return TRUE; +} + +static gboolean +insert_struct_member (xmlNode *parent, GVariant *value, GError **error) +{ + xmlNode *member; + GVariant *mname; + GVariant *mvalue; + gboolean ret = FALSE; + + mname = g_variant_get_child_value (value, 0); + mvalue = g_variant_get_child_value (value, 1); + + if (g_variant_classify (mname) != G_VARIANT_CLASS_STRING) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "Only string keys are supported in dictionaries, got %s", + g_variant_get_type_string (mname)); + goto fail; + } -static xmlNode *find_real_node (xmlNode *node); + member = xmlNewChild (parent, NULL, + (const xmlChar *)"member", NULL); -static gboolean insert_value (xmlNode *parent, GValue *value); + xmlNewTextChild (member, NULL, + (const xmlChar *)"name", + (const xmlChar *)g_variant_get_string (mname, NULL)); + + ret = insert_value (member, mvalue, error); + +fail: + g_variant_unref (mname); + g_variant_unref (mvalue); + + return ret; +} static gboolean -insert_value (xmlNode *parent, GValue *value) +insert_struct (xmlNode *parent, GVariant *value, GError **error) +{ + xmlNode *struct_node; + GVariantIter iter; + GVariant *child; + + struct_node = xmlNewChild (parent, NULL, + (const xmlChar *)"struct", NULL); + + g_variant_iter_init (&iter, value); + while ((child = g_variant_iter_next_value (&iter))) { + if (!insert_struct_member (struct_node, child, error)) { + g_variant_unref (child); + return FALSE; + } + g_variant_unref (child); + } + + return TRUE; +} + +static gboolean +insert_value (xmlNode *parent, GVariant *value, GError **error) { - GType type = G_VALUE_TYPE (value); xmlNode *xvalue; + const char *type_str = NULL; char buf[128]; xvalue = xmlNewChild (parent, NULL, (const xmlChar *)"value", NULL); - if (type == G_TYPE_INT) { - snprintf (buf, sizeof (buf), "%d", g_value_get_int (value)); - xmlNewChild (xvalue, NULL, - (const xmlChar *)"int", - (const xmlChar *)buf); - } else if (type == G_TYPE_BOOLEAN) { - snprintf (buf, sizeof (buf), "%d", g_value_get_boolean (value)); - xmlNewChild (xvalue, NULL, - (const xmlChar *)"boolean", - (const xmlChar *)buf); - } else if (type == G_TYPE_STRING) { + switch (g_variant_classify (value)) { + case G_VARIANT_CLASS_BOOLEAN: + g_snprintf (buf, sizeof (buf), "%d", g_variant_get_boolean (value)); + type_str = "boolean"; + break; + case G_VARIANT_CLASS_BYTE: + g_snprintf (buf, sizeof (buf), "%u", g_variant_get_byte (value)); + type_str = "int"; + break; + case G_VARIANT_CLASS_INT16: + g_snprintf (buf, sizeof (buf), "%d", g_variant_get_int16 (value)); + type_str = "int"; + break; + case G_VARIANT_CLASS_UINT16: + g_snprintf (buf, sizeof (buf), "%u", g_variant_get_uint16 (value)); + type_str = "int"; + break; + case G_VARIANT_CLASS_INT32: + g_snprintf (buf, sizeof (buf), "%d", g_variant_get_int32 (value)); + type_str = "int"; + break; + case G_VARIANT_CLASS_UINT32: + g_snprintf (buf, sizeof (buf), "%u", g_variant_get_uint32 (value)); + type_str = "i8"; + break; + case G_VARIANT_CLASS_INT64: + g_snprintf (buf, sizeof (buf), "%"G_GINT64_FORMAT, g_variant_get_int64 (value)); + type_str = "i8"; + break; + case G_VARIANT_CLASS_DOUBLE: + g_ascii_dtostr (buf, sizeof (buf), g_variant_get_double (value)); + type_str = "double"; + break; + case G_VARIANT_CLASS_STRING: xmlNewTextChild (xvalue, NULL, - (const xmlChar *)"string", - (const xmlChar *)g_value_get_string (value)); - } else if (type == G_TYPE_DOUBLE) { - g_ascii_dtostr (buf, sizeof (buf), g_value_get_double (value)); - xmlNewChild (xvalue, NULL, - (const xmlChar *)"double", - (const xmlChar *)buf); - } else if (type == SOUP_TYPE_DATE) { - SoupDate *date = g_value_get_boxed (value); - char *timestamp = soup_date_to_string (date, SOUP_DATE_ISO8601_XMLRPC); - xmlNewChild (xvalue, NULL, - (const xmlChar *)"dateTime.iso8601", - (const xmlChar *)timestamp); - g_free (timestamp); - } else if (type == SOUP_TYPE_BYTE_ARRAY) { - GByteArray *ba = g_value_get_boxed (value); - char *encoded; - - encoded = g_base64_encode (ba->data, ba->len); - xmlNewChild (xvalue, NULL, - (const xmlChar *)"base64", - (const xmlChar *)encoded); - g_free (encoded); - } else if (type == G_TYPE_HASH_TABLE) { - GHashTable *hash = g_value_get_boxed (value); - GHashTableIter iter; - gpointer mname, mvalue; - xmlNode *struct_node, *member; - - struct_node = xmlNewChild (xvalue, NULL, - (const xmlChar *)"struct", NULL); - - g_hash_table_iter_init (&iter, hash); - - while (g_hash_table_iter_next (&iter, &mname, &mvalue)) { - member = xmlNewChild (struct_node, NULL, - (const xmlChar *)"member", NULL); - xmlNewTextChild (member, NULL, - (const xmlChar *)"name", - (const xmlChar *)mname); - if (!insert_value (member, mvalue)) { - xmlFreeNode (struct_node); - struct_node = NULL; + (const xmlChar *)"string", + (const xmlChar *)g_variant_get_string (value, NULL)); + break; + case G_VARIANT_CLASS_VARIANT: { + GVariant *child; + + xmlUnlinkNode (xvalue); + xmlFreeNode (xvalue); + + child = g_variant_get_variant (value); + if (!insert_value (parent, child, error)) { + g_variant_unref (child); + return FALSE; + } + g_variant_unref (child); + break; + } + case G_VARIANT_CLASS_ARRAY: { + if (g_variant_is_of_type (value, G_VARIANT_TYPE_BYTESTRING)) { + char *encoded; + + encoded = g_base64_encode (g_variant_get_data (value), + g_variant_get_size (value)); + xmlNewChild (xvalue, NULL, + (const xmlChar *)"base64", + (const xmlChar *)encoded); + g_free (encoded); + } else if (g_variant_is_of_type (value, G_VARIANT_TYPE_DICTIONARY)) { + if (!insert_struct (xvalue, value, error)) + return FALSE; + } else { + if (!insert_array (xvalue, value, error)) + return FALSE; + } + + break; + } + case G_VARIANT_CLASS_TUPLE: { + /* Special case for custom types */ + if (g_variant_is_of_type (value, G_VARIANT_TYPE ("(oss)"))) { + const char *path; + const char *type; + const char *v; + + g_variant_get (value, "(&o&s&s)", &path, &type, &v); + if (g_str_equal (path, "/org/gnome/libsoup/ExtensionType")) { + xmlNewTextChild (xvalue, NULL, + (const xmlChar *)type, + (const xmlChar *)v); break; } } - if (!struct_node) + if (!insert_array (xvalue, value, error)) return FALSE; -#ifdef G_GNUC_BEGIN_IGNORE_DEPRECATIONS -G_GNUC_BEGIN_IGNORE_DEPRECATIONS -#endif - } else if (type == G_TYPE_VALUE_ARRAY) { -#ifdef G_GNUC_END_IGNORE_DEPRECATIONS -G_GNUC_END_IGNORE_DEPRECATIONS -#endif - GValueArray *va = g_value_get_boxed (value); + break; + } + case G_VARIANT_CLASS_DICT_ENTRY: { xmlNode *node; - int i; node = xmlNewChild (xvalue, NULL, - (const xmlChar *)"array", NULL); - node = xmlNewChild (node, NULL, - (const xmlChar *)"data", NULL); - for (i = 0; i < va->n_values; i++) { - if (!insert_value (node, &va->values[i])) - return FALSE; - } - } else - return FALSE; + (const xmlChar *)"struct", NULL); + if (!insert_struct_member (node, value, error)) + return FALSE; + break; + } + case G_VARIANT_CLASS_HANDLE: + case G_VARIANT_CLASS_MAYBE: + case G_VARIANT_CLASS_UINT64: + case G_VARIANT_CLASS_OBJECT_PATH: + case G_VARIANT_CLASS_SIGNATURE: + default: + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "Unsupported type: %s", g_variant_get_type_string (value)); + goto fail; + } + + if (type_str != NULL) { + xmlNewTextChild (xvalue, NULL, + (const xmlChar *)type_str, + (const xmlChar *)buf); + } return TRUE; + +fail: + return FALSE; } /** - * soup_xmlrpc_build_method_call: + * soup_xmlrpc_build_request: * @method_name: the name of the XML-RPC method - * @params: (array length=n_params): arguments to @method - * @n_params: length of @params + * @params: a #GVariant tuple + * @error: a #GError, or %NULL * * This creates an XML-RPC methodCall and returns it as a string. - * This is the low-level method that soup_xmlrpc_request_new() is + * This is the low-level method that soup_xmlrpc_message_new() is * built on. * - * @params is an array of #GValue representing the parameters to - * @method. (It is *not* a #GValueArray, although if you have a - * #GValueArray, you can just pass its valuesf and - * n_values fields.) - * - * The correspondence between glib types and XML-RPC types is: + * @params is a #GVariant tuple representing the method parameters. * - * int: #int (%G_TYPE_INT) - * boolean: #gboolean (%G_TYPE_BOOLEAN) - * string: #char* (%G_TYPE_STRING) - * double: #double (%G_TYPE_DOUBLE) - * datetime.iso8601: #SoupDate (%SOUP_TYPE_DATE) - * base64: #GByteArray (%SOUP_TYPE_BYTE_ARRAY) - * struct: #GHashTable (%G_TYPE_HASH_TABLE) - * array: #GValueArray (%G_TYPE_VALUE_ARRAY) + * Serialization details: + * - "a{s*}" and "{s*}" are serialized as <struct> + * - "ay" is serialized as <base64> + * - Other arrays and tuples are serialized as <array> + * - booleans are serialized as <boolean> + * - byte, int16, uint16 and int32 are serialized as <int> + * - uint32 and int64 are serialized as the nonstandard <i8> type + * - doubles are serialized as <double> + * - Strings are serialized as <string> + * - Variants (i.e. "v" type) are unwrapped and their child is serialized. + * - #GVariants created by soup_xmlrpc_variant_new_datetime() are serialized as + * <dateTime.iso8601> + * - Other types are not supported and will return %NULL and set @error. + * This notably includes: object-paths, signatures, uint64, handles, maybes + * and dictionaries with non-string keys. * - * For structs, use a #GHashTable that maps strings to #GValue; - * soup_value_hash_new() and related methods can help with this. + * If @params is floating, it is consumed. * - * Return value: the text of the methodCall, or %NULL on error + * Return value: the text of the methodCall, or %NULL on error. + * Since: 2.52 **/ char * -soup_xmlrpc_build_method_call (const char *method_name, - GValue *params, int n_params) +soup_xmlrpc_build_request (const char *method_name, + GVariant *params, + GError **error) { xmlDoc *doc; xmlNode *node, *param; xmlChar *xmlbody; - int i, len; - char *body; + GVariantIter iter; + GVariant *child; + int len; + char *body = NULL; + + g_return_val_if_fail (g_variant_is_of_type (params, G_VARIANT_TYPE_TUPLE), NULL); + + g_variant_ref_sink (params); doc = xmlNewDoc ((const xmlChar *)"1.0"); doc->standalone = FALSE; @@ -172,94 +296,88 @@ soup_xmlrpc_build_method_call (const char *method_name, (const xmlChar *)method_name); node = xmlNewChild (node, NULL, (const xmlChar *)"params", NULL); - for (i = 0; i < n_params; i++) { + g_variant_iter_init (&iter, params); + while ((child = g_variant_iter_next_value (&iter))) { param = xmlNewChild (node, NULL, (const xmlChar *)"param", NULL); - if (!insert_value (param, ¶ms[i])) { + if (!insert_value (param, child, error)) { xmlFreeDoc (doc); + g_variant_unref (child); + g_variant_unref (params); return NULL; } + g_variant_unref (child); } xmlDocDumpMemory (doc, &xmlbody, &len); body = g_strndup ((char *)xmlbody, len); xmlFree (xmlbody); - xmlFreeDoc (doc); - return body; -} - -static SoupMessage * -soup_xmlrpc_request_newv (const char *uri, const char *method_name, va_list args) -{ - SoupMessage *msg; - GValueArray *params; - char *body; - params = soup_value_array_from_args (args); - if (!params) - return NULL; - - body = soup_xmlrpc_build_method_call (method_name, params->values, - params->n_values); -#ifdef G_GNUC_BEGIN_IGNORE_DEPRECATIONS -G_GNUC_BEGIN_IGNORE_DEPRECATIONS -#endif - g_value_array_free (params); -#ifdef G_GNUC_END_IGNORE_DEPRECATIONS -G_GNUC_END_IGNORE_DEPRECATIONS -#endif - if (!body) - return NULL; + xmlFreeDoc (doc); + g_variant_unref (params); - msg = soup_message_new ("POST", uri); - soup_message_set_request (msg, "text/xml", SOUP_MEMORY_TAKE, - body, strlen (body)); - return msg; + return body; } /** - * soup_xmlrpc_request_new: + * soup_xmlrpc_message_new: * @uri: URI of the XML-RPC service * @method_name: the name of the XML-RPC method to invoke at @uri - * @...: parameters for @method + * @params: a #GVariant tuple + * @error: a #GError, or %NULL * * Creates an XML-RPC methodCall and returns a #SoupMessage, ready * to send, for that method call. * - * The parameters are passed as type/value pairs; ie, first a #GType, - * and then a value of the appropriate type, finally terminated by - * %G_TYPE_INVALID. + * See soup_xmlrpc_build_request() for serialization details. + * + * If @params is floating, it is consumed. * - * Return value: (transfer full): a #SoupMessage encoding the - * indicated XML-RPC request. + * Returns: (transfer full): a #SoupMessage encoding the + * indicated XML-RPC request, or %NULL on error. + * + * Since: 2.52 **/ SoupMessage * -soup_xmlrpc_request_new (const char *uri, const char *method_name, ...) +soup_xmlrpc_message_new (const char *uri, + const char *method_name, + GVariant *params, + GError **error) { SoupMessage *msg; - va_list args; + char *body; - va_start (args, method_name); - msg = soup_xmlrpc_request_newv (uri, method_name, args); - va_end (args); + body = soup_xmlrpc_build_request (method_name, params, error); + if (!body) + return NULL; + + msg = soup_message_new ("POST", uri); + soup_message_set_request (msg, "text/xml", SOUP_MEMORY_TAKE, + body, strlen (body)); return msg; } /** - * soup_xmlrpc_build_method_response: + * soup_xmlrpc_build_response: * @value: the return value + * @error: a #GError, or %NULL * * This creates a (successful) XML-RPC methodResponse and returns it - * as a string. To create a fault response, use - * soup_xmlrpc_build_fault(). + * as a string. To create a fault response, use soup_xmlrpc_build_fault(). This + * is the low-level method that soup_xmlrpc_message_set_response() is built on. + * + * See soup_xmlrpc_build_request() for serialization details, but note + * that since a method can only have a single return value, @value + * should not be a tuple here (unless the return value is an array). + * + * If @value is floating, it is consumed. * - * The glib type to XML-RPC type mapping is as with - * soup_xmlrpc_build_method_call(), qv. + * Returns: the text of the methodResponse, or %NULL on error. * - * Return value: the text of the methodResponse, or %NULL on error + * Since: 2.52 **/ char * -soup_xmlrpc_build_method_response (GValue *value) +soup_xmlrpc_build_response (GVariant *value, GError **error) { xmlDoc *doc; xmlNode *node; @@ -267,6 +385,8 @@ soup_xmlrpc_build_method_response (GValue *value) char *body; int len; + g_variant_ref_sink (value); + doc = xmlNewDoc ((const xmlChar *)"1.0"); doc->standalone = FALSE; doc->encoding = xmlCharStrdup ("UTF-8"); @@ -277,29 +397,33 @@ soup_xmlrpc_build_method_response (GValue *value) node = xmlNewChild (node, NULL, (const xmlChar *)"params", NULL); node = xmlNewChild (node, NULL, (const xmlChar *)"param", NULL); - if (!insert_value (node, value)) { + if (!insert_value (node, value, error)) { xmlFreeDoc (doc); + g_variant_unref (value); return NULL; } xmlDocDumpMemory (doc, &xmlbody, &len); body = g_strndup ((char *)xmlbody, len); xmlFree (xmlbody); + xmlFreeDoc (doc); + g_variant_unref (value); + return body; } -static char * +char * soup_xmlrpc_build_faultv (int fault_code, const char *fault_format, va_list args) G_GNUC_PRINTF (2, 0); -static char * +char * soup_xmlrpc_build_faultv (int fault_code, const char *fault_format, va_list args) { xmlDoc *doc; xmlNode *node, *member; - GValue value; + GVariant *value; xmlChar *xmlbody; char *fault_string, *body; int len; @@ -317,23 +441,19 @@ soup_xmlrpc_build_faultv (int fault_code, const char *fault_format, va_list args node = xmlNewChild (node, NULL, (const xmlChar *)"value", NULL); node = xmlNewChild (node, NULL, (const xmlChar *)"struct", NULL); - memset (&value, 0, sizeof (value)); - member = xmlNewChild (node, NULL, (const xmlChar *)"member", NULL); xmlNewChild (member, NULL, (const xmlChar *)"name", (const xmlChar *)"faultCode"); - g_value_init (&value, G_TYPE_INT); - g_value_set_int (&value, fault_code); - insert_value (member, &value); - g_value_unset (&value); + value = g_variant_new_int32 (fault_code); + insert_value (member, value, NULL); + g_variant_unref (value); member = xmlNewChild (node, NULL, (const xmlChar *)"member", NULL); xmlNewChild (member, NULL, (const xmlChar *)"name", (const xmlChar *)"faultString"); - g_value_init (&value, G_TYPE_STRING); - g_value_take_string (&value, fault_string); - insert_value (member, &value); - g_value_unset (&value); + value = g_variant_new_take_string (fault_string); + insert_value (member, value, NULL); + g_variant_unref (value); xmlDocDumpMemory (doc, &xmlbody, &len); body = g_strndup ((char *)xmlbody, len); @@ -368,451 +488,953 @@ soup_xmlrpc_build_fault (int fault_code, const char *fault_format, ...) } /** - * soup_xmlrpc_set_response: + * soup_xmlrpc_message_set_fault: * @msg: an XML-RPC request - * @type: the type of the response value - * @...: the response value + * @fault_code: the fault code + * @fault_format: a printf()-style format string + * @...: the parameters to @fault_format * - * Sets the status code and response body of @msg to indicate a - * successful XML-RPC call, with a return value given by @type and the - * following varargs argument, of the type indicated by @type. + * Sets the status code and response body of @msg to indicate an + * unsuccessful XML-RPC call, with the error described by @fault_code + * and @fault_format. + * + * Since: 2.52 **/ void -soup_xmlrpc_set_response (SoupMessage *msg, GType type, ...) +soup_xmlrpc_message_set_fault (SoupMessage *msg, int fault_code, + const char *fault_format, ...) { va_list args; - GValue value; char *body; - va_start (args, type); - SOUP_VALUE_SETV (&value, type, args); + va_start (args, fault_format); + body = soup_xmlrpc_build_faultv (fault_code, fault_format, args); va_end (args); - body = soup_xmlrpc_build_method_response (&value); - g_value_unset (&value); soup_message_set_status (msg, SOUP_STATUS_OK); soup_message_set_response (msg, "text/xml", SOUP_MEMORY_TAKE, body, strlen (body)); } /** - * soup_xmlrpc_set_fault: + * soup_xmlrpc_message_set_response: * @msg: an XML-RPC request - * @fault_code: the fault code - * @fault_format: a printf()-style format string - * @...: the parameters to @fault_format + * @value: a #GVariant + * @error: a #GError, or %NULL * - * Sets the status code and response body of @msg to indicate an - * unsuccessful XML-RPC call, with the error described by @fault_code - * and @fault_format. + * Sets the status code and response body of @msg to indicate a + * successful XML-RPC call, with a return value given by @value. To set a + * fault response, use soup_xmlrpc_message_set_fault(). + * + * See soup_xmlrpc_build_request() for serialization details. + * + * If @value is floating, it is consumed. + * + * Returns: %TRUE on success, %FALSE otherwise. + * + * Since: 2.52 **/ -void -soup_xmlrpc_set_fault (SoupMessage *msg, int fault_code, - const char *fault_format, ...) +gboolean +soup_xmlrpc_message_set_response (SoupMessage *msg, GVariant *value, GError **error) { - va_list args; char *body; - va_start (args, fault_format); - body = soup_xmlrpc_build_faultv (fault_code, fault_format, args); - va_end (args); + body = soup_xmlrpc_build_response (value, error); + if (!body) + return FALSE; soup_message_set_status (msg, SOUP_STATUS_OK); soup_message_set_response (msg, "text/xml", SOUP_MEMORY_TAKE, body, strlen (body)); + return TRUE; } +static GVariant *parse_value (xmlNode *node, const char **signature, GError **error); +static xmlNode * +find_real_node (xmlNode *node) +{ + while (node && (node->type == XML_COMMENT_NODE || + xmlIsBlankNode (node))) + node = node->next; + return node; +} -static gboolean -parse_value (xmlNode *xmlvalue, GValue *value) +static char * +signature_get_next_complete_type (const char **signature) { - xmlNode *typenode; - const char *typename; - xmlChar *content; + GVariantClass class; + const char *initial_signature; + char *result; - memset (value, 0, sizeof (GValue)); + /* here it is assumed that 'signature' is a valid type string */ - typenode = find_real_node (xmlvalue->children); - if (!typenode) { - /* If no type node, it's a string */ - content = xmlNodeGetContent (typenode); - g_value_init (value, G_TYPE_STRING); - g_value_set_string (value, (char *)content); - xmlFree (content); - return TRUE; + initial_signature = *signature; + class = (*signature)[0]; + + if (class == G_VARIANT_CLASS_TUPLE || class == G_VARIANT_CLASS_DICT_ENTRY) { + char stack[256] = {0}; + guint stack_len = 0; + + do { + if ((*signature)[0] == G_VARIANT_CLASS_TUPLE) { + stack[stack_len] = ')'; + stack_len++; + } + else if ( (*signature)[0] == G_VARIANT_CLASS_DICT_ENTRY) { + stack[stack_len] = '}'; + stack_len++; + } + + (*signature)++; + + if ( (*signature)[0] == stack[stack_len - 1]) + stack_len--; + } while (stack_len > 0); + + (*signature)++; + } else if (class == G_VARIANT_CLASS_ARRAY || class == G_VARIANT_CLASS_MAYBE) { + char *tmp_sig; + + (*signature)++; + tmp_sig = signature_get_next_complete_type (signature); + g_free (tmp_sig); + } else { + (*signature)++; } - typename = (const char *)typenode->name; + result = g_strndup (initial_signature, (*signature) - initial_signature); - if (!strcmp (typename, "i4") || !strcmp (typename, "int")) { - content = xmlNodeGetContent (typenode); - g_value_init (value, G_TYPE_INT); - g_value_set_int (value, atoi ((char *)content)); - xmlFree (content); - } else if (!strcmp (typename, "boolean")) { - content = xmlNodeGetContent (typenode); - g_value_init (value, G_TYPE_BOOLEAN); - g_value_set_boolean (value, atoi ((char *)content)); - xmlFree (content); - } else if (!strcmp (typename, "string")) { - content = xmlNodeGetContent (typenode); - g_value_init (value, G_TYPE_STRING); - g_value_set_string (value, (char *)content); - xmlFree (content); - } else if (!strcmp (typename, "double")) { - content = xmlNodeGetContent (typenode); - g_value_init (value, G_TYPE_DOUBLE); - g_value_set_double (value, g_ascii_strtod ((char *)content, NULL)); - xmlFree (content); - } else if (!strcmp (typename, "dateTime.iso8601")) { - content = xmlNodeGetContent (typenode); - g_value_init (value, SOUP_TYPE_DATE); - g_value_take_boxed (value, soup_date_new_from_string ((char *)content)); - xmlFree (content); - } else if (!strcmp (typename, "base64")) { - GByteArray *ba; - guchar *decoded; - gsize len; + return result; +} - content = xmlNodeGetContent (typenode); - decoded = g_base64_decode ((char *)content, &len); - ba = g_byte_array_sized_new (len); - g_byte_array_append (ba, decoded, len); - g_free (decoded); - xmlFree (content); - g_value_init (value, SOUP_TYPE_BYTE_ARRAY); - g_value_take_boxed (value, ba); - } else if (!strcmp (typename, "struct")) { - xmlNode *member, *child, *mname, *mxval; - GHashTable *hash; - GValue mgval; - - hash = soup_value_hash_new (); - for (member = find_real_node (typenode->children); - member; - member = find_real_node (member->next)) { - if (strcmp ((const char *)member->name, "member") != 0) { - g_hash_table_destroy (hash); - return FALSE; - } - mname = mxval = NULL; - memset (&mgval, 0, sizeof (mgval)); - - for (child = find_real_node (member->children); - child; - child = find_real_node (child->next)) { - if (!strcmp ((const char *)child->name, "name")) - mname = child; - else if (!strcmp ((const char *)child->name, "value")) - mxval = child; - else - break; +static GVariant * +parse_array (xmlNode *node, const char **signature, GError **error) +{ + GVariant *variant = NULL; + char *child_signature = NULL; + char *array_signature = NULL; + const char *tmp_signature; + gboolean is_tuple = FALSE; + xmlNode *member; + GVariantBuilder builder; + gboolean is_params = FALSE; + + if (signature && *signature[0] == G_VARIANT_CLASS_VARIANT) + signature = NULL; + + if (g_str_equal (node->name, "array")) { + node = find_real_node (node->children); + if (!g_str_equal (node->name, "data")) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + " expected but got '%s'", node->name); + goto fail; + } + } else if (g_str_equal (node->name, "params")) { + is_params = TRUE; + } else { + g_assert_not_reached (); + } + + if (signature != NULL) { + if ((*signature)[0] == G_VARIANT_CLASS_TUPLE) { + tmp_signature = *signature; + array_signature = signature_get_next_complete_type (&tmp_signature); + is_tuple = TRUE; + } + (*signature)++; + child_signature = signature_get_next_complete_type (signature); + } else { + child_signature = g_strdup ("v"); + } + + if (!array_signature) + array_signature = g_strdup_printf ("a%s", child_signature); + g_variant_builder_init (&builder, G_VARIANT_TYPE (array_signature)); + + for (member = find_real_node (node->children); + member; + member = find_real_node (member->next)) { + GVariant *child; + xmlNode *xval = member; + + if (is_params) { + if (!g_str_equal (member->name, "param")) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + " expected but got '%s'", member->name); + goto fail; } + xval = find_real_node (member->children); + } - if (!mname || !mxval || !parse_value (mxval, &mgval)) { - g_hash_table_destroy (hash); - return FALSE; + if (strcmp ((const char *)xval->name, "value") != 0) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + " expected but got '%s'", xval->name); + goto fail; + } + + if (is_tuple && child_signature[0] == ')') { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "Too many values for tuple"); + goto fail; + } + + tmp_signature = child_signature; + child = parse_value (xval, &tmp_signature, error); + if (child == NULL) + goto fail; + + if (is_tuple) { + g_free (child_signature), + child_signature = signature_get_next_complete_type (signature); + } + + g_variant_builder_add_value (&builder, child); + } + + if (is_tuple && child_signature[0] != ')') { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "Too few values for tuple"); + goto fail; + } + + variant = g_variant_builder_end (&builder); + +fail: + g_variant_builder_clear (&builder); + g_free (child_signature); + g_free (array_signature); + + /* compensate the (*signature)++ call at the end of 'recurse()' */ + if (signature) + (*signature)--; + + return variant; +} + +static void +parse_dict_entry_signature (const char **signature, + char **entry_signature, + char **key_signature, + char **value_signature) +{ + const char *tmp_sig; + + if (signature) + *entry_signature = signature_get_next_complete_type (signature); + else + *entry_signature = g_strdup ("{sv}"); + + tmp_sig = (*entry_signature) + 1; + *key_signature = signature_get_next_complete_type (&tmp_sig); + *value_signature = signature_get_next_complete_type (&tmp_sig); +} + +static GVariant * +parse_dictionary (xmlNode *node, const char **signature, GError **error) +{ + GVariant *variant = NULL; + char *dict_signature; + char *entry_signature; + char *key_signature; + char *value_signature; + GVariantBuilder builder; + xmlNode *member; + + if (signature && *signature[0] == G_VARIANT_CLASS_VARIANT) + signature = NULL; + + if (signature) + (*signature)++; + + parse_dict_entry_signature (signature, + &entry_signature, + &key_signature, + &value_signature); + + dict_signature = g_strdup_printf ("a%s", entry_signature); + g_variant_builder_init (&builder, G_VARIANT_TYPE (dict_signature)); + + if (!g_str_equal (key_signature, "s")) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "Dictionary key must be string but got '%s'", key_signature); + goto fail; + } + + for (member = find_real_node (node->children); + member; + member = find_real_node (member->next)) { + xmlNode *child, *mname, *mxval; + const char *tmp_signature; + GVariant *value; + xmlChar *content; + + if (strcmp ((const char *)member->name, "member") != 0) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + " expected but got '%s'", member->name); + goto fail; + } + + mname = mxval = NULL; + + for (child = find_real_node (member->children); + child; + child = find_real_node (child->next)) { + if (!strcmp ((const char *)child->name, "name")) + mname = child; + else if (!strcmp ((const char *)child->name, "value")) + mxval = child; + else { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + " or expected but got '%s'", child->name); + goto fail; } + } - content = xmlNodeGetContent (mname); - soup_value_hash_insert_value (hash, (char *)content, &mgval); - xmlFree (content); - g_value_unset (&mgval); + if (!mname || !mxval) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "Missing name or value in "); + goto fail; } - g_value_init (value, G_TYPE_HASH_TABLE); - g_value_take_boxed (value, hash); - } else if (!strcmp (typename, "array")) { - xmlNode *data, *xval; - GValueArray *array; - GValue gval; - - data = find_real_node (typenode->children); - if (!data || strcmp ((const char *)data->name, "data") != 0) - return FALSE; -#ifdef G_GNUC_BEGIN_IGNORE_DEPRECATIONS -G_GNUC_BEGIN_IGNORE_DEPRECATIONS -#endif - array = g_value_array_new (1); - for (xval = find_real_node (data->children); - xval; - xval = find_real_node (xval->next)) { - memset (&gval, 0, sizeof (gval)); - if (strcmp ((const char *)xval->name, "value") != 0 || - !parse_value (xval, &gval)) { - g_value_array_free (array); - return FALSE; + tmp_signature = value_signature; + value = parse_value (mxval, &tmp_signature, error); + if (!value) + goto fail; + + content = xmlNodeGetContent (mname); + g_variant_builder_open (&builder, G_VARIANT_TYPE (entry_signature)); + g_variant_builder_add (&builder, "s", content); + g_variant_builder_add_value (&builder, value); + g_variant_builder_close (&builder); + xmlFree (content); + } + + variant = g_variant_builder_end (&builder); + +fail: + g_variant_builder_clear (&builder); + g_free (value_signature); + g_free (key_signature); + g_free (entry_signature); + g_free (dict_signature); + + /* compensate the (*signature)++ call at the end of 'recurse()' */ + if (signature != NULL) + (*signature)--; + + return variant; +} + +static GVariant * +parse_number (xmlNode *typenode, GVariantClass class, GError **error) +{ + xmlChar *content; + const char *str; + char *endptr; + gint64 num = 0; + guint64 unum = 0; + GVariant *variant = NULL; + + content = xmlNodeGetContent (typenode); + str = (const char *) content; + + errno = 0; + + if (class == G_VARIANT_CLASS_UINT64) + unum = g_ascii_strtoull (str, &endptr, 10); + else + num = g_ascii_strtoll (str, &endptr, 10); + + if (errno || endptr == str) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "Couldn't parse number '%s'", str); + goto fail; + } + +#define RANGE(v, min, max) \ +G_STMT_START{ \ + if (v < min || v > max) { \ + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, \ + "Number out of range '%s'", str); \ + goto fail; \ + } \ +} G_STMT_END + + switch (class) { + case G_VARIANT_CLASS_BOOLEAN: + RANGE (num, 0, 1); + variant = g_variant_new_boolean (num); + break; + case G_VARIANT_CLASS_BYTE: + RANGE (num, 0, G_MAXUINT8); + variant = g_variant_new_byte (num); + break; + case G_VARIANT_CLASS_INT16: + RANGE (num, G_MININT16, G_MAXINT16); + variant = g_variant_new_int16 (num); + break; + case G_VARIANT_CLASS_UINT16: + RANGE (num, 0, G_MAXUINT16); + variant = g_variant_new_uint16 (num); + break; + case G_VARIANT_CLASS_INT32: + RANGE (num, G_MININT32, G_MAXINT32); + variant = g_variant_new_int32 (num); + break; + case G_VARIANT_CLASS_UINT32: + RANGE (num, 0, G_MAXUINT32); + variant = g_variant_new_uint32 (num); + break; + case G_VARIANT_CLASS_INT64: + RANGE (num, G_MININT64, G_MAXINT64); + variant = g_variant_new_int64 (num); + break; + case G_VARIANT_CLASS_UINT64: + RANGE (unum, 0, G_MAXUINT64); + variant = g_variant_new_uint64 (unum); + break; + default: + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "<%s> node does not match signature", + (const char *)typenode->name); + goto fail; + } + +fail: + xmlFree (content); + + return variant; +} + +static GVariant * +parse_double (xmlNode *typenode, GError **error) +{ + GVariant *variant = NULL; + xmlChar *content; + const char *str; + char *endptr; + gdouble d; + + content = xmlNodeGetContent (typenode); + str = (const char *) content; + + errno = 0; + d = g_ascii_strtod (str, &endptr); + if (errno || endptr == str) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "Couldn't parse double '%s'", str); + goto fail; + } + + variant = g_variant_new_double (d); + +fail: + xmlFree (content); + + return variant; +} + +static GVariant * +parse_base64 (xmlNode *typenode, GError **error) +{ + GVariant *variant; + xmlChar *content; + guchar *decoded; + gsize len; + + content = xmlNodeGetContent (typenode); + decoded = g_base64_decode ((char *)content, &len); + variant = g_variant_new_from_data (G_VARIANT_TYPE ("ay"), + decoded, len, + TRUE, + g_free, decoded); + xmlFree (content); + + return variant; +} + +static GVariant * +soup_xmlrpc_variant_new_custom (const char *type, const char *v) +{ + return g_variant_new ("(oss)", "/org/gnome/libsoup/ExtensionType", + type, v); +} + +static GVariant * +parse_value (xmlNode *node, const char **signature, GError **error) +{ + xmlNode *typenode; + const char *typename; + xmlChar *content = NULL; + GVariant *variant = NULL; + GVariantClass class = G_VARIANT_CLASS_VARIANT; + + if (signature) + class = *signature[0]; + + if (g_str_equal ((const char *)node->name, "value")) { + typenode = find_real_node (node->children); + if (!typenode) { + /* If no typenode, assume value's content is string */ + typename = "string"; + typenode = node; + } else { + typename = (const char *)typenode->name; + } + } else if (g_str_equal ((const char *)node->name, "params")) { + typenode = node; + typename = "params"; + } else { + g_assert_not_reached (); + } + + if (g_str_equal (typename, "boolean")) { + if (class != G_VARIANT_CLASS_VARIANT && class != G_VARIANT_CLASS_BOOLEAN) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + " node does not match signature"); + goto fail; + } + variant = parse_number (typenode, G_VARIANT_CLASS_BOOLEAN, error); + } else if (g_str_equal (typename, "int") || g_str_equal (typename, "i4")) { + if (class == G_VARIANT_CLASS_VARIANT) + variant = parse_number (typenode, G_VARIANT_CLASS_INT32, error); + else + variant = parse_number (typenode, class, error); + } else if (g_str_equal (typename, "i8")) { + if (class == G_VARIANT_CLASS_VARIANT) + variant = parse_number (typenode, G_VARIANT_CLASS_INT64, error); + else + variant = parse_number (typenode, class, error); + } else if (g_str_equal (typename, "double")) { + if (class != G_VARIANT_CLASS_VARIANT && class != G_VARIANT_CLASS_DOUBLE) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + " node does not match signature"); + goto fail; + } + variant = parse_double (typenode, error); + } else if (g_str_equal (typename, "string")) { + if (class != G_VARIANT_CLASS_VARIANT && class != G_VARIANT_CLASS_STRING) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + " node does not match signature"); + goto fail; + } + content = xmlNodeGetContent (typenode); + variant = g_variant_new_string ((const char *)content); + } else if (g_str_equal (typename, "base64")) { + if (class != G_VARIANT_CLASS_VARIANT) { + if (!g_str_has_prefix (*signature, "ay")) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + " node does not match signature"); + goto fail; } + (*signature)++; + } + variant = parse_base64 (typenode, error); + } else if (g_str_equal (typename, "struct")) { + if (class != G_VARIANT_CLASS_VARIANT && + !g_str_has_prefix (*signature, "a{")) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + " node does not match signature"); + goto fail; + } + variant = parse_dictionary (typenode, signature, error); + } else if (g_str_equal (typename, "array") || g_str_equal (typename, "params")) { + if (class != G_VARIANT_CLASS_VARIANT && + class != G_VARIANT_CLASS_ARRAY && + class != G_VARIANT_CLASS_TUPLE) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "<%s> node does not match signature", typename); + goto fail; + } + variant = parse_array (typenode, signature, error); + } else if (g_str_equal (typename, "dateTime.iso8601")) { + if (class != G_VARIANT_CLASS_VARIANT) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + " node does not match signature"); + goto fail; + } + + content = xmlNodeGetContent (typenode); + variant = soup_xmlrpc_variant_new_custom ("dateTime.iso8601", + (const char *)content); + } else { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "Unknown node name %s", typename); + goto fail; + } + + if (variant && signature) { + if (class == G_VARIANT_CLASS_VARIANT) + variant = g_variant_new_variant (variant); + (*signature)++; + } + +fail: + if (content) + xmlFree (content); + + return variant; +} + +/** + * SoupXMLRPCParams: + * + * Opaque structure containing XML-RPC methodCall parameter values. + * Can be parsed using soup_xmlrpc_params_parse() and freed with + * soup_xmlrpc_params_free(). + * + * Since: 2.52 + */ +struct _SoupXMLRPCParams +{ + xmlNode *node; +}; + +/** + * soup_xmlrpc_params_free: + * @self: a SoupXMLRPCParams + * + * Free a #SoupXMLRPCParams returned by soup_xmlrpc_parse_request(). + * + * Since: 2.52 + */ +void +soup_xmlrpc_params_free (SoupXMLRPCParams *self) +{ + g_return_if_fail (self != NULL); - g_value_array_append (array, &gval); - g_value_unset (&gval); + if (self->node) + xmlFreeDoc (self->node->doc); + g_slice_free (SoupXMLRPCParams, self); +} + +static SoupXMLRPCParams * +soup_xmlrpc_params_new (xmlNode *node) +{ + SoupXMLRPCParams *self; + + self = g_slice_new (SoupXMLRPCParams); + self->node = node; + + return self; +} + +/** + * soup_xmlrpc_params_parse: + * @self: A #SoupXMLRPCParams + * @signature: (allow-none): A valid #GVariant type string, or %NULL + * @error: a #GError, or %NULL + * + * Parse method parameters returned by soup_xmlrpc_parse_request(). + * + * Deserialization details: + * - If @signature is provided, <int> and <i4> can be deserialized + * to byte, int16, uint16, int32, uint32, int64 or uint64. Otherwise + * it will be deserialized to int32. If the value is out of range + * for the target type it will return an error. + * - <struct> will be deserialized to "a{sv}". @signature could define + * another value type (e.g. "a{ss}"). + * - <array> will be deserialized to "av". @signature could define + * another element type (e.g. "as") or could be a tuple (e.g. "(ss)"). + * - <base64> will be deserialized to "ay". + * - <string> will be deserialized to "s". + * - <dateTime.iso8601> will be deserialized to an unspecified variant + * type. If @signature is provided it must have the generic "v" type, which + * means there is no guarantee that it's actually a datetime that has been + * received. soup_xmlrpc_variant_get_datetime() must be used to parse and + * type check this special variant. + * - @signature must not have maybes, otherwise an error is returned. + * - Dictionaries must have string keys, otherwise an error is returned. + * + * Returns: (transfer full): a new (non-floating) #GVariant, or %NULL + * + * Since: 2.52 + */ +GVariant * +soup_xmlrpc_params_parse (SoupXMLRPCParams *self, + const char *signature, + GError **error) +{ + GVariant *value = NULL; + + g_return_val_if_fail (self, NULL); + g_return_val_if_fail (!signature || g_variant_type_string_is_valid (signature), NULL); + + if (!self->node) { + if (!signature || g_variant_type_equal (G_VARIANT_TYPE (signature), G_VARIANT_TYPE ("av"))) + value = g_variant_new_array (G_VARIANT_TYPE_VARIANT, NULL, 0); + else if (g_variant_type_equal (G_VARIANT_TYPE (signature), G_VARIANT_TYPE_UNIT)) + value = g_variant_new_tuple (NULL, 0); + else { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "Invalid signature '%s', was expecting '()'", signature); + goto fail; } - g_value_init (value, G_TYPE_VALUE_ARRAY); - g_value_take_boxed (value, array); -#ifdef G_GNUC_END_IGNORE_DEPRECATIONS -G_GNUC_END_IGNORE_DEPRECATIONS -#endif - } else - return FALSE; + } else { + value = parse_value (self->node, signature ? &signature : NULL, error); + } - return TRUE; +fail: + return value ? g_variant_ref_sink (value) : NULL; } /** - * soup_xmlrpc_parse_method_call: + * soup_xmlrpc_parse_request: * @method_call: the XML-RPC methodCall string * @length: the length of @method_call, or -1 if it is NUL-terminated - * @method_name: (out): on return, the methodName from @method_call - * @params: (out): on return, the parameters from @method_call + * @params: (out): on success, a new #SoupXMLRPCParams + * @error: a #GError, or %NULL * - * Parses @method_call to get the name and parameters, and returns the - * parameter values in a #GValueArray; see also - * soup_xmlrpc_extract_method_call(), which is more convenient if you - * know in advance what the types of the parameters will be. + * Parses @method_call and return the method name. Method parameters can be + * parsed later using soup_xmlrpc_params_parse(). * - * Return value: success or failure. + * Returns: (transfer full): method's name, or %NULL on error. + * Since: 2.52 **/ -gboolean -soup_xmlrpc_parse_method_call (const char *method_call, int length, - char **method_name, GValueArray **params) +char * +soup_xmlrpc_parse_request (const char *method_call, + int length, + SoupXMLRPCParams **params, + GError **error) { - xmlDoc *doc; - xmlNode *node, *param, *xval; + xmlDoc *doc = NULL; + xmlNode *node; xmlChar *xmlMethodName = NULL; - gboolean success = FALSE; - GValue value; + char *method_name = NULL; - doc = xmlParseMemory (method_call, - length == -1 ? strlen (method_call) : length); - if (!doc) - return FALSE; + doc = xmlParseMemory (method_call, length == -1 ? strlen (method_call) : length); + if (!doc) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "Could not parse XML document"); + goto fail; + } node = xmlDocGetRootElement (doc); - if (!node || strcmp ((const char *)node->name, "methodCall") != 0) + if (!node || strcmp ((const char *)node->name, "methodCall") != 0) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + " node expected"); goto fail; + } node = find_real_node (node->children); - if (!node || strcmp ((const char *)node->name, "methodName") != 0) + if (!node || strcmp ((const char *)node->name, "methodName") != 0) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + " node expected"); goto fail; + } xmlMethodName = xmlNodeGetContent (node); - node = find_real_node (node->next); - if (node) { - if (strcmp ((const char *)node->name, "params") != 0) - goto fail; - -#ifdef G_GNUC_BEGIN_IGNORE_DEPRECATIONS -G_GNUC_BEGIN_IGNORE_DEPRECATIONS -#endif - *params = soup_value_array_new (); - param = find_real_node (node->children); - while (param && !strcmp ((const char *)param->name, "param")) { - xval = find_real_node (param->children); - if (!xval || strcmp ((const char *)xval->name, "value") != 0 || - !parse_value (xval, &value)) { - g_value_array_free (*params); + if (params) { + node = find_real_node (node->next); + if (node) { + if (strcmp ((const char *)node->name, "params") != 0) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + " node expected"); goto fail; } - g_value_array_append (*params, &value); - g_value_unset (&value); - - param = find_real_node (param->next); + *params = soup_xmlrpc_params_new (node); + doc = NULL; + } else { + *params = soup_xmlrpc_params_new (NULL); } -#ifdef G_GNUC_END_IGNORE_DEPRECATIONS -G_GNUC_END_IGNORE_DEPRECATIONS -#endif - } else - *params = soup_value_array_new (); + } - success = TRUE; - *method_name = g_strdup ((char *)xmlMethodName); + method_name = g_strdup ((char *)xmlMethodName); fail: - xmlFreeDoc (doc); + if (doc) + xmlFreeDoc (doc); if (xmlMethodName) xmlFree (xmlMethodName); - return success; + + return method_name; } /** - * soup_xmlrpc_extract_method_call: - * @method_call: the XML-RPC methodCall string - * @length: the length of @method_call, or -1 if it is NUL-terminated - * @method_name: (out): on return, the methodName from @method_call - * @...: return types and locations for parameters + * soup_xmlrpc_parse_response: + * @method_response: the XML-RPC methodResponse string + * @length: the length of @method_response, or -1 if it is NUL-terminated + * @signature: (allow-none): A valid #GVariant type string, or %NULL + * @error: a #GError, or %NULL * - * Parses @method_call to get the name and parameters, and puts - * the parameters into variables of the appropriate types. + * Parses @method_response and returns the return value. If + * @method_response is a fault, %NULL is returned, and @error + * will be set to an error in the %SOUP_XMLRPC_FAULT domain, with the error + * code containing the fault code, and the error message containing + * the fault string. If @method_response cannot be parsed, %NULL is returned, + * and @error will be set to an error in the %SOUP_XMLRPC_ERROR domain. * - * The parameters are handled similarly to - * @soup_xmlrpc_build_method_call, with pairs of types and values, - * terminated by %G_TYPE_INVALID, except that values are pointers to - * variables of the indicated type, rather than values of the type. + * See soup_xmlrpc_params_parse() for deserialization details. * - * See also soup_xmlrpc_parse_method_call(), which can be used if - * you don't know the types of the parameters. + * Returns: (transfer full): a new (non-floating) #GVariant, or %NULL * - * Return value: success or failure. + * Since: 2.52 **/ -gboolean -soup_xmlrpc_extract_method_call (const char *method_call, int length, - char **method_name, ...) +GVariant * +soup_xmlrpc_parse_response (const char *method_response, + int length, + const char *signature, + GError **error) { - GValueArray *params; - gboolean success; - va_list args; - - if (!soup_xmlrpc_parse_method_call (method_call, length, - method_name, ¶ms)) - return FALSE; - - va_start (args, method_name); - success = soup_value_array_to_args (params, args); - va_end (args); - -#ifdef G_GNUC_BEGIN_IGNORE_DEPRECATIONS -G_GNUC_BEGIN_IGNORE_DEPRECATIONS -#endif - g_value_array_free (params); -#ifdef G_GNUC_END_IGNORE_DEPRECATIONS -G_GNUC_END_IGNORE_DEPRECATIONS -#endif - return success; -} - -/** - * soup_xmlrpc_parse_method_response: - * @method_response: the XML-RPC methodResponse string - * @length: the length of @method_response, or -1 if it is NUL-terminated - * @value: (out): on return, the return value from @method_call - * @error: error return value - * - * Parses @method_response and returns the return value in @value. If - * @method_response is a fault, @value will be unchanged, and @error - * will be set to an error of type %SOUP_XMLRPC_FAULT, with the error - * #code containing the fault code, and the error #message containing - * the fault string. (If @method_response cannot be parsed at all, - * soup_xmlrpc_parse_method_response() will return %FALSE, but @error - * will be unset.) - * - * Return value: %TRUE if a return value was parsed, %FALSE if the - * response could not be parsed, or contained a fault. - **/ -gboolean -soup_xmlrpc_parse_method_response (const char *method_response, int length, - GValue *value, GError **error) -{ - xmlDoc *doc; + xmlDoc *doc = NULL; xmlNode *node; - gboolean success = FALSE; + GVariant *value = NULL; + + g_return_val_if_fail (!signature || g_variant_type_string_is_valid (signature), NULL); doc = xmlParseMemory (method_response, - length == -1 ? strlen (method_response) : length); - if (!doc) - return FALSE; + length == -1 ? strlen (method_response) : length); + if (!doc) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "Failed to parse response XML"); + goto fail; + } node = xmlDocGetRootElement (doc); - if (!node || strcmp ((const char *)node->name, "methodResponse") != 0) + if (!node || strcmp ((const char *)node->name, "methodResponse") != 0) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "Missing 'methodResponse' node"); goto fail; + } node = find_real_node (node->children); - if (!node) + if (!node) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "'methodResponse' has no child"); goto fail; + } - if (!strcmp ((const char *)node->name, "fault") && error) { + if (!strcmp ((const char *)node->name, "fault")) { int fault_code; - char *fault_string; - GValue fault_val; - GHashTable *fault_hash; + const char *fault_string; + const char *fault_sig = "a{sv}"; + GVariant *fault_val; node = find_real_node (node->children); - if (!node || strcmp ((const char *)node->name, "value") != 0) - goto fail; - if (!parse_value (node, &fault_val)) - goto fail; - if (!G_VALUE_HOLDS (&fault_val, G_TYPE_HASH_TABLE)) { - g_value_unset (&fault_val); + if (!node || strcmp ((const char *)node->name, "value") != 0) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "'fault' has no 'value' child"); goto fail; } - fault_hash = g_value_get_boxed (&fault_val); - if (!soup_value_hash_lookup (fault_hash, "faultCode", - G_TYPE_INT, &fault_code) || - !soup_value_hash_lookup (fault_hash, "faultString", - G_TYPE_STRING, &fault_string)) { - g_value_unset (&fault_val); + + fault_val = parse_value (node, &fault_sig, error); + if (!fault_val) goto fail; - } + if (!g_variant_lookup (fault_val, "faultCode", "i", &fault_code) || + !g_variant_lookup (fault_val, "faultString", "&s", &fault_string)) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "'fault' missing 'faultCode' or 'faultString'"); + goto fail; + } g_set_error (error, SOUP_XMLRPC_FAULT, - fault_code, "%s", fault_string); - g_value_unset (&fault_val); + fault_code, "%s", fault_string); + g_variant_unref (fault_val); } else if (!strcmp ((const char *)node->name, "params")) { node = find_real_node (node->children); - if (!node || strcmp ((const char *)node->name, "param") != 0) + if (!node || strcmp ((const char *)node->name, "param") != 0) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "'params' has no 'param' child"); goto fail; + } node = find_real_node (node->children); - if (!node || strcmp ((const char *)node->name, "value") != 0) - goto fail; - if (!parse_value (node, value)) + if (!node || strcmp ((const char *)node->name, "value") != 0) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "'param' has no 'value' child"); goto fail; - success = TRUE; + } + value = parse_value (node, signature ? &signature : NULL, error); } fail: - xmlFreeDoc (doc); - return success; + if (doc) + xmlFreeDoc (doc); + return value ? g_variant_ref_sink (value) : NULL; } /** - * soup_xmlrpc_extract_method_response: - * @method_response: the XML-RPC methodResponse string - * @length: the length of @method_response, or -1 if it is NUL-terminated - * @error: error return value - * @type: the expected type of the return value - * @...: location for return value - * - * Parses @method_response and extracts the return value into - * a variable of the correct type. - * - * If @method_response is a fault, the return value will be unset, - * and @error will be set to an error of type %SOUP_XMLRPC_FAULT, with - * the error #code containing the fault code, and the error #message - * containing the fault string. (If @method_response cannot be parsed - * at all, soup_xmlrpc_extract_method_response() will return %FALSE, - * but @error will be unset.) - * - * Return value: %TRUE if a return value was parsed, %FALSE if the - * response was of the wrong type, or contained a fault. - **/ -gboolean -soup_xmlrpc_extract_method_response (const char *method_response, int length, - GError **error, GType type, ...) + * soup_xmlrpc_variant_new_datetime: + * @date: a #SoupDate + * + * Construct a special #GVariant used to serialize a <dateTime.iso8601> + * node. See soup_xmlrpc_build_request(). + * + * The actual type of the returned #GVariant is unspecified and "v" or "*" + * should be used in variant format strings. For example: + * + * args = g_variant_new ("(v)", soup_xmlrpc_variant_new_datetime (date)); + * + * + * Returns: a floating #GVariant. + * + * Since: 2.52 + */ +GVariant * +soup_xmlrpc_variant_new_datetime (SoupDate *date) { - GValue value; - va_list args; + GVariant *variant; + char *str; - if (!soup_xmlrpc_parse_method_response (method_response, length, - &value, error)) - return FALSE; - if (!G_VALUE_HOLDS (&value, type)) - return FALSE; + str = soup_date_to_string (date, SOUP_DATE_ISO8601_XMLRPC); + variant = soup_xmlrpc_variant_new_custom ("dateTime.iso8601", str); + g_free (str); - va_start (args, type); - SOUP_VALUE_GETV (&value, type, args); - va_end (args); - - return TRUE; + return variant; } - -GQuark -soup_xmlrpc_error_quark (void) +/** + * soup_xmlrpc_variant_get_datetime: + * @variant: a #GVariant + * @error: a #GError, or %NULL + * + * Get the #SoupDate from special #GVariant created by + * soup_xmlrpc_variant_new_datetime() or by parsing a <dateTime.iso8601> + * node. See soup_xmlrpc_params_parse(). + * + * If @variant does not contain a datetime it will return an error but it is not + * considered a programmer error because it generally means parameters received + * are not in the expected type. + * + * Returns: a new #SoupDate, or %NULL on error. + * + * Since: 2.52 + */ +SoupDate * +soup_xmlrpc_variant_get_datetime (GVariant *variant, GError **error) { - static GQuark error; - if (!error) - error = g_quark_from_static_string ("soup_xmlrpc_error_quark"); - return error; + SoupDate *date = NULL; + const char *path; + const char *type; + const char *v; + + if (!g_variant_is_of_type (variant, G_VARIANT_TYPE ("(oss)"))) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "Variant is of type '%s' which is not expected for a datetime", + g_variant_get_type_string (variant)); + return NULL; + } + + g_variant_get (variant, "(&o&s&s)", &path, &type, &v); + + if (!g_str_equal (path, "/org/gnome/libsoup/ExtensionType") || + !g_str_equal (type, "dateTime.iso8601")) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "Variant doesn't represent a datetime: %s", + g_variant_get_type_string (variant)); + return NULL; + } + + date = soup_date_new_from_string (v); + + if (date == NULL) { + g_set_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS, + "Can't parse datetime string: %s", v); + return NULL; + } + + return date; + } /** @@ -852,20 +1474,5 @@ soup_xmlrpc_error_quark (void) * assume servers will use them. */ -GQuark -soup_xmlrpc_fault_quark (void) -{ - static GQuark error; - if (!error) - error = g_quark_from_static_string ("soup_xmlrpc_fault_quark"); - return error; -} - -static xmlNode * -find_real_node (xmlNode *node) -{ - while (node && (node->type == XML_COMMENT_NODE || - xmlIsBlankNode (node))) - node = node->next; - return node; -} +G_DEFINE_QUARK (soup_xmlrpc_fault_quark, soup_xmlrpc_fault); +G_DEFINE_QUARK (soup_xmlrpc_error_quark, soup_xmlrpc_error); diff --git a/libsoup/soup-xmlrpc.h b/libsoup/soup-xmlrpc.h index d25e3804..1c4634f2 100644 --- a/libsoup/soup-xmlrpc.h +++ b/libsoup/soup-xmlrpc.h @@ -1,56 +1,73 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 2007 Red Hat, Inc. + * Copyright 2015 - Collabora Ltd. */ #ifndef SOUP_XMLRPC_H #define SOUP_XMLRPC_H 1 #include +#include G_BEGIN_DECLS /* XML-RPC client */ -char *soup_xmlrpc_build_method_call (const char *method_name, - GValue *params, - int n_params); -SoupMessage *soup_xmlrpc_request_new (const char *uri, - const char *method_name, - ...); -gboolean soup_xmlrpc_parse_method_response (const char *method_response, - int length, - GValue *value, - GError **error); -gboolean soup_xmlrpc_extract_method_response (const char *method_response, - int length, - GError **error, - GType type, - ...); +SOUP_AVAILABLE_IN_2_52 +char *soup_xmlrpc_build_request (const char *method_name, + GVariant *params, + GError **error); +SOUP_AVAILABLE_IN_2_52 +SoupMessage *soup_xmlrpc_message_new (const char *uri, + const char *method_name, + GVariant *params, + GError **error); +SOUP_AVAILABLE_IN_2_52 +GVariant *soup_xmlrpc_parse_response (const char *method_response, + int length, + const char *signature, + GError **error); /* XML-RPC server */ -gboolean soup_xmlrpc_parse_method_call (const char *method_call, - int length, - char **method_name, - GValueArray **params); -gboolean soup_xmlrpc_extract_method_call (const char *method_call, - int length, - char **method_name, - ...); -char *soup_xmlrpc_build_method_response (GValue *value); -char *soup_xmlrpc_build_fault (int fault_code, - const char *fault_format, - ...) G_GNUC_PRINTF (2, 3); -void soup_xmlrpc_set_response (SoupMessage *msg, - GType type, - ...); -void soup_xmlrpc_set_fault (SoupMessage *msg, - int fault_code, - const char *fault_format, - ...) G_GNUC_PRINTF (3, 4); +typedef struct _SoupXMLRPCParams SoupXMLRPCParams; +SOUP_AVAILABLE_IN_2_52 +void soup_xmlrpc_params_free (SoupXMLRPCParams *self); +SOUP_AVAILABLE_IN_2_52 +GVariant *soup_xmlrpc_params_parse (SoupXMLRPCParams *self, + const char *signature, + GError **error); +SOUP_AVAILABLE_IN_2_52 +char *soup_xmlrpc_parse_request (const char *method_call, + int length, + SoupXMLRPCParams **params, + GError **error); +SOUP_AVAILABLE_IN_2_52 +char *soup_xmlrpc_build_response (GVariant *value, + GError **error); +SOUP_AVAILABLE_IN_2_4 +char *soup_xmlrpc_build_fault (int fault_code, + const char *fault_format, + ...) G_GNUC_PRINTF (2, 3); +SOUP_AVAILABLE_IN_2_52 +gboolean soup_xmlrpc_message_set_response (SoupMessage *msg, + GVariant *value, + GError **error); +SOUP_AVAILABLE_IN_2_52 +void soup_xmlrpc_message_set_fault (SoupMessage *msg, + int fault_code, + const char *fault_format, + ...) G_GNUC_PRINTF (3, 4); +/* Utils */ +SOUP_AVAILABLE_IN_2_52 +GVariant *soup_xmlrpc_variant_new_datetime (SoupDate *date); + +SOUP_AVAILABLE_IN_2_52 +SoupDate *soup_xmlrpc_variant_get_datetime (GVariant *variant, + GError **error); /* Errors */ #define SOUP_XMLRPC_ERROR soup_xmlrpc_error_quark() +SOUP_AVAILABLE_IN_2_4 GQuark soup_xmlrpc_error_quark (void); typedef enum { @@ -59,6 +76,7 @@ typedef enum { } SoupXMLRPCError; #define SOUP_XMLRPC_FAULT soup_xmlrpc_fault_quark() +SOUP_AVAILABLE_IN_2_4 GQuark soup_xmlrpc_fault_quark (void); typedef enum { diff --git a/libsoup/soup.h b/libsoup/soup.h index 82a26329..6bedb624 100644 --- a/libsoup/soup.h +++ b/libsoup/soup.h @@ -10,6 +10,8 @@ extern "C" { #endif +#define __SOUP_H_INSIDE__ + #include #include #include @@ -50,7 +52,14 @@ extern "C" { #include #include #include +#include +#include #include +#include + +#include + +#undef __SOUP_H_INSIDE__ #ifdef __cplusplus } diff --git a/libsoup/tld-parser.py b/libsoup/tld-parser.py index 5d9d2ba5..a743471a 100755 --- a/libsoup/tld-parser.py +++ b/libsoup/tld-parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Generate tld rules # Copyright (C) 2012 Red Hat, Inc. diff --git a/ltmain.sh b/ltmain.sh new file mode 100644 index 00000000..a736cf99 --- /dev/null +++ b/ltmain.sh @@ -0,0 +1,11156 @@ +#! /bin/sh +## DO NOT EDIT - This file generated from ./build-aux/ltmain.in +## by inline-source v2014-01-03.01 + +# libtool (GNU libtool) 2.4.6 +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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, see . + + +PROGRAM=libtool +PACKAGE=libtool +VERSION="2.4.6 Debian-2.4.6-2" +package_revision=2.4.6 + + +## ------ ## +## Usage. ## +## ------ ## + +# Run './libtool --help' for help with using this script from the +# command line. + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# After configure completes, it has a better idea of some of the +# shell tools we need than the defaults used by the functions shared +# with bootstrap, so set those here where they can still be over- +# ridden by the user, but otherwise take precedence. + +: ${AUTOCONF="autoconf"} +: ${AUTOMAKE="automake"} + + +## -------------------------- ## +## Source external libraries. ## +## -------------------------- ## + +# Much of our low-level functionality needs to be sourced from external +# libraries, which are installed to $pkgauxdir. + +# Set a version string for this script. +scriptversion=2015-01-20.17; # UTC + +# General shell script boiler plate, and helper functions. +# Written by Gary V. Vaughan, 2004 + +# Copyright (C) 2004-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# 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 3 of the License, or +# (at your option) any later version. + +# As a special exception to the GNU General Public License, if you distribute +# this file as part of a program or library that is built using GNU Libtool, +# you may include this file under the same distribution terms that you use +# for the rest of that program. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES 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, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# Evaluate this file near the top of your script to gain access to +# the functions and variables defined here: +# +# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh +# +# If you need to override any of the default environment variable +# settings, do that before evaluating this file. + + +## -------------------- ## +## Shell normalisation. ## +## -------------------- ## + +# Some shells need a little help to be as Bourne compatible as possible. +# Before doing anything else, make sure all that help has been provided! + +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac +fi + +# NLS nuisances: We save the old values in case they are required later. +_G_user_locale= +_G_safe_locale= +for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test set = \"\${$_G_var+set}\"; then + save_$_G_var=\$$_G_var + $_G_var=C + export $_G_var + _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" + _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" + fi" +done + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Make sure IFS has a sensible default +sp=' ' +nl=' +' +IFS="$sp $nl" + +# There are apparently some retarded systems that use ';' as a PATH separator! +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + + +## ------------------------- ## +## Locate command utilities. ## +## ------------------------- ## + + +# func_executable_p FILE +# ---------------------- +# Check that FILE is an executable regular file. +func_executable_p () +{ + test -f "$1" && test -x "$1" +} + + +# func_path_progs PROGS_LIST CHECK_FUNC [PATH] +# -------------------------------------------- +# Search for either a program that responds to --version with output +# containing "GNU", or else returned by CHECK_FUNC otherwise, by +# trying all the directories in PATH with each of the elements of +# PROGS_LIST. +# +# CHECK_FUNC should accept the path to a candidate program, and +# set $func_check_prog_result if it truncates its output less than +# $_G_path_prog_max characters. +func_path_progs () +{ + _G_progs_list=$1 + _G_check_func=$2 + _G_PATH=${3-"$PATH"} + + _G_path_prog_max=0 + _G_path_prog_found=false + _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} + for _G_dir in $_G_PATH; do + IFS=$_G_save_IFS + test -z "$_G_dir" && _G_dir=. + for _G_prog_name in $_G_progs_list; do + for _exeext in '' .EXE; do + _G_path_prog=$_G_dir/$_G_prog_name$_exeext + func_executable_p "$_G_path_prog" || continue + case `"$_G_path_prog" --version 2>&1` in + *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; + *) $_G_check_func $_G_path_prog + func_path_progs_result=$func_check_prog_result + ;; + esac + $_G_path_prog_found && break 3 + done + done + done + IFS=$_G_save_IFS + test -z "$func_path_progs_result" && { + echo "no acceptable sed could be found in \$PATH" >&2 + exit 1 + } +} + + +# We want to be able to use the functions in this file before configure +# has figured out where the best binaries are kept, which means we have +# to search for them ourselves - except when the results are already set +# where we skip the searches. + +# Unless the user overrides by setting SED, search the path for either GNU +# sed, or the sed that truncates its output the least. +test -z "$SED" && { + _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for _G_i in 1 2 3 4 5 6 7; do + _G_sed_script=$_G_sed_script$nl$_G_sed_script + done + echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed + _G_sed_script= + + func_check_prog_sed () + { + _G_path_prog=$1 + + _G_count=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo '' >> conftest.nl + "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + rm -f conftest.sed + SED=$func_path_progs_result +} + + +# Unless the user overrides by setting GREP, search the path for either GNU +# grep, or the grep that truncates its output the least. +test -z "$GREP" && { + func_check_prog_grep () + { + _G_path_prog=$1 + + _G_count=0 + _G_path_prog_max=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo 'GREP' >> conftest.nl + "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + GREP=$func_path_progs_result +} + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# All uppercase variable names are used for environment variables. These +# variables can be overridden by the user before calling a script that +# uses them if a suitable command of that name is not already available +# in the command search PATH. + +: ${CP="cp -f"} +: ${ECHO="printf %s\n"} +: ${EGREP="$GREP -E"} +: ${FGREP="$GREP -F"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} + + +## -------------------- ## +## Useful sed snippets. ## +## -------------------- ## + +sed_dirname='s|/[^/]*$||' +sed_basename='s|^.*/||' + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' + +# Same as above, but do not quote variable references. +sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' + +# Sed substitution that converts a w32 file name or path +# that contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-'\' parameter expansions in output of sed_double_quote_subst that +# were '\'-ed in input to the same. If an odd number of '\' preceded a +# '$' in input to sed_double_quote_subst, that '$' was protected from +# expansion. Since each input '\' is now two '\'s, look for any number +# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. +_G_bs='\\' +_G_bs2='\\\\' +_G_bs4='\\\\\\\\' +_G_dollar='\$' +sed_double_backslash="\ + s/$_G_bs4/&\\ +/g + s/^$_G_bs2$_G_dollar/$_G_bs&/ + s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g + s/\n//g" + + +## ----------------- ## +## Global variables. ## +## ----------------- ## + +# Except for the global variables explicitly listed below, the following +# functions in the '^func_' namespace, and the '^require_' namespace +# variables initialised in the 'Resource management' section, sourcing +# this file will not pollute your global namespace with anything +# else. There's no portable way to scope variables in Bourne shell +# though, so actually running these functions will sometimes place +# results into a variable named after the function, and often use +# temporary variables in the '^_G_' namespace. If you are careful to +# avoid using those namespaces casually in your sourcing script, things +# should continue to work as you expect. And, of course, you can freely +# overwrite any of the functions or variables defined here before +# calling anything to customize them. + +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +# Allow overriding, eg assuming that you follow the convention of +# putting '$debug_cmd' at the start of all your functions, you can get +# bash to show function call trace with: +# +# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +debug_cmd=${debug_cmd-":"} +exit_cmd=: + +# By convention, finish your script with: +# +# exit $exit_status +# +# so that you can set exit_status to non-zero if you want to indicate +# something went wrong during execution without actually bailing out at +# the point of failure. +exit_status=$EXIT_SUCCESS + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath=$0 + +# The name of this program. +progname=`$ECHO "$progpath" |$SED "$sed_basename"` + +# Make sure we have an absolute progpath for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` + progdir=`cd "$progdir" && pwd` + progpath=$progdir/$progname + ;; + *) + _G_IFS=$IFS + IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS=$_G_IFS + test -x "$progdir/$progname" && break + done + IFS=$_G_IFS + test -n "$progdir" || progdir=`pwd` + progpath=$progdir/$progname + ;; +esac + + +## ----------------- ## +## Standard options. ## +## ----------------- ## + +# The following options affect the operation of the functions defined +# below, and should be set appropriately depending on run-time para- +# meters passed on the command line. + +opt_dry_run=false +opt_quiet=false +opt_verbose=false + +# Categories 'all' and 'none' are always available. Append any others +# you will pass as the first argument to func_warning from your own +# code. +warning_categories= + +# By default, display warnings according to 'opt_warning_types'. Set +# 'warning_func' to ':' to elide all warnings, or func_fatal_error to +# treat the next displayed warning as a fatal error. +warning_func=func_warn_and_continue + +# Set to 'all' to display all warnings, 'none' to suppress all +# warnings, or a space delimited list of some subset of +# 'warning_categories' to display only the listed warnings. +opt_warning_types=all + + +## -------------------- ## +## Resource management. ## +## -------------------- ## + +# This section contains definitions for functions that each ensure a +# particular resource (a file, or a non-empty configuration variable for +# example) is available, and if appropriate to extract default values +# from pertinent package files. Call them using their associated +# 'require_*' variable to ensure that they are executed, at most, once. +# +# It's entirely deliberate that calling these functions can set +# variables that don't obey the namespace limitations obeyed by the rest +# of this file, in order that that they be as useful as possible to +# callers. + + +# require_term_colors +# ------------------- +# Allow display of bold text on terminals that support it. +require_term_colors=func_require_term_colors +func_require_term_colors () +{ + $debug_cmd + + test -t 1 && { + # COLORTERM and USE_ANSI_COLORS environment variables take + # precedence, because most terminfo databases neglect to describe + # whether color sequences are supported. + test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} + + if test 1 = "$USE_ANSI_COLORS"; then + # Standard ANSI escape sequences + tc_reset='' + tc_bold=''; tc_standout='' + tc_red=''; tc_green='' + tc_blue=''; tc_cyan='' + else + # Otherwise trust the terminfo database after all. + test -n "`tput sgr0 2>/dev/null`" && { + tc_reset=`tput sgr0` + test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` + tc_standout=$tc_bold + test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` + test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` + test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` + test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` + test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` + } + fi + } + + require_term_colors=: +} + + +## ----------------- ## +## Function library. ## +## ----------------- ## + +# This section contains a variety of useful functions to call in your +# scripts. Take note of the portable wrappers for features provided by +# some modern shells, which will fall back to slower equivalents on +# less featureful shells. + + +# func_append VAR VALUE +# --------------------- +# Append VALUE onto the existing contents of VAR. + + # We should try to minimise forks, especially on Windows where they are + # unreasonably slow, so skip the feature probes when bash or zsh are + # being used: + if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then + : ${_G_HAVE_ARITH_OP="yes"} + : ${_G_HAVE_XSI_OPS="yes"} + # The += operator was introduced in bash 3.1 + case $BASH_VERSION in + [12].* | 3.0 | 3.0*) ;; + *) + : ${_G_HAVE_PLUSEQ_OP="yes"} + ;; + esac + fi + + # _G_HAVE_PLUSEQ_OP + # Can be empty, in which case the shell is probed, "yes" if += is + # useable or anything else if it does not work. + test -z "$_G_HAVE_PLUSEQ_OP" \ + && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ + && _G_HAVE_PLUSEQ_OP=yes + +if test yes = "$_G_HAVE_PLUSEQ_OP" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_append () + { + $debug_cmd + + eval "$1+=\$2" + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_append () + { + $debug_cmd + + eval "$1=\$$1\$2" + } +fi + + +# func_append_quoted VAR VALUE +# ---------------------------- +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +if test yes = "$_G_HAVE_PLUSEQ_OP"; then + eval 'func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1+=\\ \$func_quote_for_eval_result" + }' +else + func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1=\$$1\\ \$func_quote_for_eval_result" + } +fi + + +# func_append_uniq VAR VALUE +# -------------------------- +# Append unique VALUE onto the existing contents of VAR, assuming +# entries are delimited by the first character of VALUE. For example: +# +# func_append_uniq options " --another-option option-argument" +# +# will only append to $options if " --another-option option-argument " +# is not already present somewhere in $options already (note spaces at +# each end implied by leading space in second argument). +func_append_uniq () +{ + $debug_cmd + + eval _G_current_value='`$ECHO $'$1'`' + _G_delim=`expr "$2" : '\(.\)'` + + case $_G_delim$_G_current_value$_G_delim in + *"$2$_G_delim"*) ;; + *) func_append "$@" ;; + esac +} + + +# func_arith TERM... +# ------------------ +# Set func_arith_result to the result of evaluating TERMs. + test -z "$_G_HAVE_ARITH_OP" \ + && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ + && _G_HAVE_ARITH_OP=yes + +if test yes = "$_G_HAVE_ARITH_OP"; then + eval 'func_arith () + { + $debug_cmd + + func_arith_result=$(( $* )) + }' +else + func_arith () + { + $debug_cmd + + func_arith_result=`expr "$@"` + } +fi + + +# func_basename FILE +# ------------------ +# Set func_basename_result to FILE with everything up to and including +# the last / stripped. +if test yes = "$_G_HAVE_XSI_OPS"; then + # If this shell supports suffix pattern removal, then use it to avoid + # forking. Hide the definitions single quotes in case the shell chokes + # on unsupported syntax... + _b='func_basename_result=${1##*/}' + _d='case $1 in + */*) func_dirname_result=${1%/*}$2 ;; + * ) func_dirname_result=$3 ;; + esac' + +else + # ...otherwise fall back to using sed. + _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' + _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` + if test "X$func_dirname_result" = "X$1"; then + func_dirname_result=$3 + else + func_append func_dirname_result "$2" + fi' +fi + +eval 'func_basename () +{ + $debug_cmd + + '"$_b"' +}' + + +# func_dirname FILE APPEND NONDIR_REPLACEMENT +# ------------------------------------------- +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +eval 'func_dirname () +{ + $debug_cmd + + '"$_d"' +}' + + +# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT +# -------------------------------------------------------- +# Perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# For efficiency, we do not delegate to the functions above but instead +# duplicate the functionality here. +eval 'func_dirname_and_basename () +{ + $debug_cmd + + '"$_b"' + '"$_d"' +}' + + +# func_echo ARG... +# ---------------- +# Echo program name prefixed message. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_echo_all ARG... +# -------------------- +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + + +# func_echo_infix_1 INFIX ARG... +# ------------------------------ +# Echo program name, followed by INFIX on the first line, with any +# additional lines not showing INFIX. +func_echo_infix_1 () +{ + $debug_cmd + + $require_term_colors + + _G_infix=$1; shift + _G_indent=$_G_infix + _G_prefix="$progname: $_G_infix: " + _G_message=$* + + # Strip color escape sequences before counting printable length + for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" + do + test -n "$_G_tc" && { + _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` + _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` + } + done + _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes + + func_echo_infix_1_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_infix_1_IFS + $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 + _G_prefix=$_G_indent + done + IFS=$func_echo_infix_1_IFS +} + + +# func_error ARG... +# ----------------- +# Echo program name prefixed message to standard error. +func_error () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 +} + + +# func_fatal_error ARG... +# ----------------------- +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + $debug_cmd + + func_error "$*" + exit $EXIT_FAILURE +} + + +# func_grep EXPRESSION FILENAME +# ----------------------------- +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $debug_cmd + + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_len STRING +# --------------- +# Set func_len_result to the length of STRING. STRING may not +# start with a hyphen. + test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_len () + { + $debug_cmd + + func_len_result=${#1} + }' +else + func_len () + { + $debug_cmd + + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` + } +fi + + +# func_mkdir_p DIRECTORY-PATH +# --------------------------- +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + $debug_cmd + + _G_directory_path=$1 + _G_dir_list= + + if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then + + # Protect directory names starting with '-' + case $_G_directory_path in + -*) _G_directory_path=./$_G_directory_path ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$_G_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + _G_dir_list=$_G_directory_path:$_G_dir_list + + # If the last portion added has no slash in it, the list is done + case $_G_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` + done + _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` + + func_mkdir_p_IFS=$IFS; IFS=: + for _G_dir in $_G_dir_list; do + IFS=$func_mkdir_p_IFS + # mkdir can fail with a 'File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$_G_dir" 2>/dev/null || : + done + IFS=$func_mkdir_p_IFS + + # Bail out if we (or some other process) failed to create a directory. + test -d "$_G_directory_path" || \ + func_fatal_error "Failed to create '$1'" + fi +} + + +# func_mktempdir [BASENAME] +# ------------------------- +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, BASENAME is the basename for that directory. +func_mktempdir () +{ + $debug_cmd + + _G_template=${TMPDIR-/tmp}/${1-$progname} + + if test : = "$opt_dry_run"; then + # Return a directory name, but don't create it in dry-run mode + _G_tmpdir=$_G_template-$$ + else + + # If mktemp works, use that first and foremost + _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` + + if test ! -d "$_G_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + _G_tmpdir=$_G_template-${RANDOM-0}$$ + + func_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$_G_tmpdir" + umask $func_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$_G_tmpdir" || \ + func_fatal_error "cannot create temporary directory '$_G_tmpdir'" + fi + + $ECHO "$_G_tmpdir" +} + + +# func_normal_abspath PATH +# ------------------------ +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +func_normal_abspath () +{ + $debug_cmd + + # These SED scripts presuppose an absolute path with a trailing slash. + _G_pathcar='s|^/\([^/]*\).*$|\1|' + _G_pathcdr='s|^/[^/]*||' + _G_removedotparts=':dotsl + s|/\./|/|g + t dotsl + s|/\.$|/|' + _G_collapseslashes='s|/\{1,\}|/|g' + _G_finalslash='s|/*$|/|' + + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` + while :; do + # Processed it all yet? + if test / = "$func_normal_abspath_tpath"; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result"; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + + +# func_notquiet ARG... +# -------------------- +# Echo program name prefixed message only when not in quiet mode. +func_notquiet () +{ + $debug_cmd + + $opt_quiet || func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + + +# func_relative_path SRCDIR DSTDIR +# -------------------------------- +# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. +func_relative_path () +{ + $debug_cmd + + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=$func_dirname_result + if test -z "$func_relative_path_tlibdir"; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test -n "$func_stripname_result"; then + func_append func_relative_path_result "/$func_stripname_result" + fi + + # Normalisation. If bindir is libdir, return '.' else relative path. + if test -n "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + fi + + test -n "$func_relative_path_result" || func_relative_path_result=. + + : +} + + +# func_quote_for_eval ARG... +# -------------------------- +# Aesthetically quote ARGs to be evaled later. +# This function returns two values: +# i) func_quote_for_eval_result +# double-quoted, suitable for a subsequent eval +# ii) func_quote_for_eval_unquoted_result +# has all characters that are still active within double +# quotes backslashified. +func_quote_for_eval () +{ + $debug_cmd + + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do + case $1 in + *[\\\`\"\$]*) + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + *) + _G_unquoted_arg=$1 ;; + esac + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else + func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + fi + + case $_G_unquoted_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_quoted_arg=\"$_G_unquoted_arg\" + ;; + *) + _G_quoted_arg=$_G_unquoted_arg + ;; + esac + + if test -n "$func_quote_for_eval_result"; then + func_append func_quote_for_eval_result " $_G_quoted_arg" + else + func_append func_quote_for_eval_result "$_G_quoted_arg" + fi + shift + done +} + + +# func_quote_for_expand ARG +# ------------------------- +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + $debug_cmd + + case $1 in + *[\\\`\"]*) + _G_arg=`$ECHO "$1" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; + *) + _G_arg=$1 ;; + esac + + case $_G_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_arg=\"$_G_arg\" + ;; + esac + + func_quote_for_expand_result=$_G_arg +} + + +# func_stripname PREFIX SUFFIX NAME +# --------------------------------- +# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_stripname () + { + $debug_cmd + + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary variable first. + func_stripname_result=$3 + func_stripname_result=${func_stripname_result#"$1"} + func_stripname_result=${func_stripname_result%"$2"} + }' +else + func_stripname () + { + $debug_cmd + + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; + esac + } +fi + + +# func_show_eval CMD [FAIL_EXP] +# ----------------------------- +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + func_quote_for_expand "$_G_cmd" + eval "func_notquiet $func_quote_for_expand_result" + + $opt_dry_run || { + eval "$_G_cmd" + _G_status=$? + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_show_eval_locale CMD [FAIL_EXP] +# ------------------------------------ +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + $opt_quiet || { + func_quote_for_expand "$_G_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + $opt_dry_run || { + eval "$_G_user_locale + $_G_cmd" + _G_status=$? + eval "$_G_safe_locale" + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_tr_sh +# ---------- +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + $debug_cmd + + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + + +# func_verbose ARG... +# ------------------- +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $debug_cmd + + $opt_verbose && func_echo "$*" + + : +} + + +# func_warn_and_continue ARG... +# ----------------------------- +# Echo program name prefixed warning message to standard error. +func_warn_and_continue () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 +} + + +# func_warning CATEGORY ARG... +# ---------------------------- +# Echo program name prefixed warning message to standard error. Warning +# messages can be filtered according to CATEGORY, where this function +# elides messages where CATEGORY is not listed in the global variable +# 'opt_warning_types'. +func_warning () +{ + $debug_cmd + + # CATEGORY must be in the warning_categories list! + case " $warning_categories " in + *" $1 "*) ;; + *) func_internal_error "invalid warning category '$1'" ;; + esac + + _G_category=$1 + shift + + case " $opt_warning_types " in + *" $_G_category "*) $warning_func ${1+"$@"} ;; + esac +} + + +# func_sort_ver VER1 VER2 +# ----------------------- +# 'sort -V' is not generally available. +# Note this deviates from the version comparison in automake +# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a +# but this should suffice as we won't be specifying old +# version formats or redundant trailing .0 in bootstrap.conf. +# If we did want full compatibility then we should probably +# use m4_version_compare from autoconf. +func_sort_ver () +{ + $debug_cmd + + printf '%s\n%s\n' "$1" "$2" \ + | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n +} + +# func_lt_ver PREV CURR +# --------------------- +# Return true if PREV and CURR are in the correct order according to +# func_sort_ver, otherwise false. Use it like this: +# +# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." +func_lt_ver () +{ + $debug_cmd + + test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: +#! /bin/sh + +# Set a version string for this script. +scriptversion=2014-01-07.03; # UTC + +# A portable, pluggable option parser for Bourne shell. +# Written by Gary V. Vaughan, 2010 + +# Copyright (C) 2010-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# 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 3 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, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# This file is a library for parsing options in your shell scripts along +# with assorted other useful supporting features that you can make use +# of too. +# +# For the simplest scripts you might need only: +# +# #!/bin/sh +# . relative/path/to/funclib.sh +# . relative/path/to/options-parser +# scriptversion=1.0 +# func_options ${1+"$@"} +# eval set dummy "$func_options_result"; shift +# ...rest of your script... +# +# In order for the '--version' option to work, you will need to have a +# suitably formatted comment like the one at the top of this file +# starting with '# Written by ' and ending with '# warranty; '. +# +# For '-h' and '--help' to work, you will also need a one line +# description of your script's purpose in a comment directly above the +# '# Written by ' line, like the one at the top of this file. +# +# The default options also support '--debug', which will turn on shell +# execution tracing (see the comment above debug_cmd below for another +# use), and '--verbose' and the func_verbose function to allow your script +# to display verbose messages only when your user has specified +# '--verbose'. +# +# After sourcing this file, you can plug processing for additional +# options by amending the variables from the 'Configuration' section +# below, and following the instructions in the 'Option parsing' +# section further down. + +## -------------- ## +## Configuration. ## +## -------------- ## + +# You should override these variables in your script after sourcing this +# file so that they reflect the customisations you have added to the +# option parser. + +# The usage line for option parsing errors and the start of '-h' and +# '--help' output messages. You can embed shell variables for delayed +# expansion at the time the message is displayed, but you will need to +# quote other shell meta-characters carefully to prevent them being +# expanded when the contents are evaled. +usage='$progpath [OPTION]...' + +# Short help message in response to '-h' and '--help'. Add to this or +# override it after sourcing this library to reflect the full set of +# options your script accepts. +usage_message="\ + --debug enable verbose shell tracing + -W, --warnings=CATEGORY + report the warnings falling in CATEGORY [all] + -v, --verbose verbosely report processing + --version print version information and exit + -h, --help print short or long help message and exit +" + +# Additional text appended to 'usage_message' in response to '--help'. +long_help_message=" +Warning categories include: + 'all' show all warnings + 'none' turn off all the warnings + 'error' warnings are treated as fatal errors" + +# Help message printed before fatal option parsing errors. +fatal_help="Try '\$progname --help' for more information." + + + +## ------------------------- ## +## Hook function management. ## +## ------------------------- ## + +# This section contains functions for adding, removing, and running hooks +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. + +# func_hookable FUNC_NAME +# ----------------------- +# Declare that FUNC_NAME will run hooks added with +# 'func_add_hook FUNC_NAME ...'. +func_hookable () +{ + $debug_cmd + + func_append hookable_fns " $1" +} + + +# func_add_hook FUNC_NAME HOOK_FUNC +# --------------------------------- +# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must +# first have been declared "hookable" by a call to 'func_hookable'. +func_add_hook () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not accept hook functions." ;; + esac + + eval func_append ${1}_hooks '" $2"' +} + + +# func_remove_hook FUNC_NAME HOOK_FUNC +# ------------------------------------ +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +func_remove_hook () +{ + $debug_cmd + + eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' +} + + +# func_run_hooks FUNC_NAME [ARG]... +# --------------------------------- +# Run all hook functions registered to FUNC_NAME. +# It is assumed that the list of hook functions contains nothing more +# than a whitespace-delimited list of legal shell function names, and +# no effort is wasted trying to catch shell meta-characters or preserve +# whitespace. +func_run_hooks () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; + esac + + eval _G_hook_fns=\$$1_hooks; shift + + for _G_hook in $_G_hook_fns; do + eval $_G_hook '"$@"' + + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + done + + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result +} + + + +## --------------- ## +## Option parsing. ## +## --------------- ## + +# In order to add your own option parsing hooks, you must accept the +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed +# options in '_result', escaped suitably for +# 'eval'. Like this: +# +# my_options_prep () +# { +# $debug_cmd +# +# # Extend the existing usage message. +# usage_message=$usage_message' +# -s, --silent don'\''t print informational messages +# ' +# +# func_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result +# } +# func_add_hook func_options_prep my_options_prep +# +# +# my_silent_option () +# { +# $debug_cmd +# +# # Note that for efficiency, we parse as many options as we can +# # recognise in a loop before passing the remainder back to the +# # caller on the first unrecognised argument we encounter. +# while test $# -gt 0; do +# opt=$1; shift +# case $opt in +# --silent|-s) opt_silent=: ;; +# # Separate non-argument short options: +# -s*) func_split_short_opt "$_G_opt" +# set dummy "$func_split_short_opt_name" \ +# "-$func_split_short_opt_arg" ${1+"$@"} +# shift +# ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; +# esac +# done +# +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# } +# func_add_hook func_parse_options my_silent_option +# +# +# my_option_validation () +# { +# $debug_cmd +# +# $opt_silent && $opt_verbose && func_fatal_help "\ +# '--silent' and '--verbose' options are mutually exclusive." +# +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result +# } +# func_add_hook func_validate_options my_option_validation +# +# You'll alse need to manually amend $usage_message to reflect the extra +# options you parse. It's preferable to append if you can, so that +# multiple option parsing hooks can be added safely. + + +# func_options [ARG]... +# --------------------- +# All the functions called inside func_options are hookable. See the +# individual implementations for details. +func_hookable func_options +func_options () +{ + $debug_cmd + + func_options_prep ${1+"$@"} + eval func_parse_options \ + ${func_options_prep_result+"$func_options_prep_result"} + eval func_validate_options \ + ${func_parse_options_result+"$func_parse_options_result"} + + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_result"} + + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result +} + + +# func_options_prep [ARG]... +# -------------------------- +# All initialisations required before starting the option parse loop. +# Note that when calling hook functions, we pass through the list of +# positional parameters. If a hook function modifies that list, and +# needs to propogate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning. +func_hookable func_options_prep +func_options_prep () +{ + $debug_cmd + + # Option defaults: + opt_verbose=false + opt_warning_types= + + func_run_hooks func_options_prep ${1+"$@"} + + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result +} + + +# func_parse_options [ARG]... +# --------------------------- +# The main option parsing loop. +func_hookable func_parse_options +func_parse_options () +{ + $debug_cmd + + func_parse_options_result= + + # this just eases exit handling + while test $# -gt 0; do + # Defer to hook functions for initial option parsing, so they + # get priority in the event of reusing an option name. + func_run_hooks func_parse_options ${1+"$@"} + + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift + + # Break out of the loop if we already parsed every option. + test $# -gt 0 || break + + _G_opt=$1 + shift + case $_G_opt in + --debug|-x) debug_cmd='set -x' + func_echo "enabling shell trace mode" + $debug_cmd + ;; + + --no-warnings|--no-warning|--no-warn) + set dummy --warnings none ${1+"$@"} + shift + ;; + + --warnings|--warning|-W) + test $# = 0 && func_missing_arg $_G_opt && break + case " $warning_categories $1" in + *" $1 "*) + # trailing space prevents matching last $1 above + func_append_uniq opt_warning_types " $1" + ;; + *all) + opt_warning_types=$warning_categories + ;; + *none) + opt_warning_types=none + warning_func=: + ;; + *error) + opt_warning_types=$warning_categories + warning_func=func_fatal_error + ;; + *) + func_fatal_error \ + "unsupported warning category: '$1'" + ;; + esac + shift + ;; + + --verbose|-v) opt_verbose=: ;; + --version) func_version ;; + -\?|-h) func_usage ;; + --help) func_help ;; + + # Separate optargs to long options (plugins may need this): + --*=*) func_split_equals "$_G_opt" + set dummy "$func_split_equals_lhs" \ + "$func_split_equals_rhs" ${1+"$@"} + shift + ;; + + # Separate optargs to short options: + -W*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-v*|-x*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result +} + + +# func_validate_options [ARG]... +# ------------------------------ +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +func_hookable func_validate_options +func_validate_options () +{ + $debug_cmd + + # Display all warnings if -W was not given. + test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" + + func_run_hooks func_validate_options ${1+"$@"} + + # Bail if the options were screwed! + $exit_cmd $EXIT_FAILURE + + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result +} + + + +## ----------------- ## +## Helper functions. ## +## ----------------- ## + +# This section contains the helper functions used by the rest of the +# hookable option parser framework in ascii-betical order. + + +# func_fatal_help ARG... +# ---------------------- +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + eval \$ECHO \""$fatal_help"\" + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + + +# func_help +# --------- +# Echo long help message to standard output and exit. +func_help () +{ + $debug_cmd + + func_usage_message + $ECHO "$long_help_message" + exit 0 +} + + +# func_missing_arg ARGNAME +# ------------------------ +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + $debug_cmd + + func_error "Missing argument for '$1'." + exit_cmd=exit +} + + +# func_split_equals STRING +# ------------------------ +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. +test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=${1%%=*} + func_split_equals_rhs=${1#*=} + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` + func_split_equals_rhs= + test "x$func_split_equals_lhs" = "x$1" \ + || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` + } +fi #func_split_equals + + +# func_split_short_opt SHORTOPT +# ----------------------------- +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"} + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` + } +fi #func_split_short_opt + + +# func_usage +# ---------- +# Echo short help message to standard output and exit. +func_usage () +{ + $debug_cmd + + func_usage_message + $ECHO "Run '$progname --help |${PAGER-more}' for full usage" + exit 0 +} + + +# func_usage_message +# ------------------ +# Echo short help message to standard output. +func_usage_message () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + echo + $SED -n 's|^# || + /^Written by/{ + x;p;x + } + h + /^Written by/q' < "$progpath" + echo + eval \$ECHO \""$usage_message"\" +} + + +# func_version +# ------------ +# Echo version message to standard output and exit. +func_version () +{ + $debug_cmd + + printf '%s\n' "$progname $scriptversion" + $SED -n ' + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more + } + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p + } + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" + + exit $? +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: + +# Set a version string. +scriptversion='(GNU libtool) 2.4.6' + + +# func_echo ARG... +# ---------------- +# Libtool also displays the current mode in messages, so override +# funclib.sh func_echo with this custom definition. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_warning ARG... +# ------------------- +# Libtool warnings are not categorized, so override funclib.sh +# func_warning with this simpler definition. +func_warning () +{ + $debug_cmd + + $warning_func ${1+"$@"} +} + + +## ---------------- ## +## Options parsing. ## +## ---------------- ## + +# Hook in the functions to make sure our own options are parsed during +# the option parsing loop. + +usage='$progpath [OPTION]... [MODE-ARG]...' + +# Short help message in response to '-h'. +usage_message="Options: + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --mode=MODE use operation mode MODE + --no-warnings equivalent to '-Wnone' + --preserve-dup-deps don't remove duplicate dependency libraries + --quiet, --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + -v, --verbose print more informational messages than default + --version print version information + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] + -h, --help, --help-all print short, long, or detailed help message +" + +# Additional text appended to 'usage_message' in response to '--help'. +func_help () +{ + $debug_cmd + + func_usage_message + $ECHO "$long_help_message + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. When passed as first option, +'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. +Try '$progname --help --mode=MODE' for a more detailed description of MODE. + +When reporting a bug, please describe a test case to reproduce it and +include the following information: + + host-triplet: $host + shell: $SHELL + compiler: $LTCC + compiler flags: $LTCFLAGS + linker: $LD (gnu? $with_gnu_ld) + version: $progname $scriptversion Debian-2.4.6-2 + automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` + autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` + +Report bugs to . +GNU libtool home page: . +General help using GNU software: ." + exit 0 +} + + +# func_lo2o OBJECT-NAME +# --------------------- +# Transform OBJECT-NAME from a '.lo' suffix to the platform specific +# object suffix. + +lo2o=s/\\.lo\$/.$objext/ +o2lo=s/\\.$objext\$/.lo/ + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_lo2o () + { + case $1 in + *.lo) func_lo2o_result=${1%.lo}.$objext ;; + * ) func_lo2o_result=$1 ;; + esac + }' + + # func_xform LIBOBJ-OR-SOURCE + # --------------------------- + # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) + # suffix to a '.lo' libtool-object suffix. + eval 'func_xform () + { + func_xform_result=${1%.*}.lo + }' +else + # ...otherwise fall back to using sed. + func_lo2o () + { + func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` + } + + func_xform () + { + func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` + } +fi + + +# func_fatal_configuration ARG... +# ------------------------------- +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func__fatal_error ${1+"$@"} \ + "See the $PACKAGE documentation for more information." \ + "Fatal configuration error." +} + + +# func_config +# ----------- +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + + +# func_features +# ------------- +# Display the features supported by this script. +func_features () +{ + echo "host: $host" + if test yes = "$build_libtool_libs"; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test yes = "$build_old_libs"; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + + exit $? +} + + +# func_enable_tag TAGNAME +# ----------------------- +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname=$1 + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf=/$re_begincf/,/$re_endcf/p + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + + +# func_check_version_match +# ------------------------ +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# libtool_options_prep [ARG]... +# ----------------------------- +# Preparation for options parsed by libtool. +libtool_options_prep () +{ + $debug_mode + + # Option defaults: + opt_config=false + opt_dlopen= + opt_dry_run=false + opt_help=false + opt_mode= + opt_preserve_dup_deps=false + opt_quiet=false + + nonopt= + preserve_args= + + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + esac + + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result +} +func_add_hook func_options_prep libtool_options_prep + + +# libtool_parse_options [ARG]... +# --------------------------------- +# Provide handling for libtool specific options. +libtool_parse_options () +{ + $debug_cmd + + # Perform our own loop to consume as many options as possible in + # each iteration. + while test $# -gt 0; do + _G_opt=$1 + shift + case $_G_opt in + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + + --config) func_config ;; + + --dlopen|-dlopen) + opt_dlopen="${opt_dlopen+$opt_dlopen +}$1" + shift + ;; + + --preserve-dup-deps) + opt_preserve_dup_deps=: ;; + + --features) func_features ;; + + --finish) set dummy --mode finish ${1+"$@"}; shift ;; + + --help) opt_help=: ;; + + --help-all) opt_help=': help-all' ;; + + --mode) test $# = 0 && func_missing_arg $_G_opt && break + opt_mode=$1 + case $1 in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $_G_opt" + exit_cmd=exit + break + ;; + esac + shift + ;; + + --no-silent|--no-quiet) + opt_quiet=false + func_append preserve_args " $_G_opt" + ;; + + --no-warnings|--no-warning|--no-warn) + opt_warning=false + func_append preserve_args " $_G_opt" + ;; + + --no-verbose) + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --silent|--quiet) + opt_quiet=: + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --tag) test $# = 0 && func_missing_arg $_G_opt && break + opt_tag=$1 + func_append preserve_args " $_G_opt $1" + func_enable_tag "$1" + shift + ;; + + --verbose|-v) opt_quiet=false + opt_verbose=: + func_append preserve_args " $_G_opt" + ;; + + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result +} +func_add_hook func_parse_options libtool_parse_options + + + +# libtool_validate_options [ARG]... +# --------------------------------- +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +libtool_validate_options () +{ + # save first non-option argument + if test 0 -lt $#; then + nonopt=$1 + shift + fi + + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" + + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + test yes != "$build_libtool_libs" \ + && test yes != "$build_old_libs" \ + && func_fatal_configuration "not configured to build any kind of library" + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test execute != "$opt_mode"; then + func_error "unrecognized option '-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help=$help + help="Try '$progname --help --mode=$opt_mode' for more information." + } + + # Pass back the unparsed argument list + func_quote_for_eval ${1+"$@"} + libtool_validate_options_result=$func_quote_for_eval_result +} +func_add_hook func_validate_options libtool_validate_options + + +# Process options as early as possible so that --help and --version +# can return quickly. +func_options ${1+"$@"} +eval set dummy "$func_options_result"; shift + + + +## ----------- ## +## Main. ## +## ----------- ## + +magic='%%%MAGIC variable%%%' +magic_exe='%%%MAGIC EXE variable%%%' + +# Global variables. +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# func_generated_by_libtool +# True iff stdin has been generated by Libtool. This function is only +# a basic sanity check; it will hardly flush out determined imposters. +func_generated_by_libtool_p () +{ + $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_p file +# True iff FILE is a libtool '.la' library or '.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool '.la' library or '.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if 'file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case $lalib_p_line in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test yes = "$lalib_p" +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + test -f "$1" && + $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $debug_cmd + + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$sp$nl + eval cmd=\"$cmd\" + IFS=$save_ifs + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# 'FILE.' does not work on cygwin managed mounts. +func_source () +{ + $debug_cmd + + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case $lt_sysroot:$1 in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result='='$func_stripname_result + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $debug_cmd + + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case "$@ " in + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with '--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=$1 + if test yes = "$build_libtool_libs"; then + write_lobj=\'$2\' + else + write_lobj=none + fi + + if test yes = "$build_old_libs"; then + write_oldobj=\'$3\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T </dev/null` + if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $debug_cmd + + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result= + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result"; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $debug_cmd + + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $debug_cmd + + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $debug_cmd + + if test -z "$2" && test -n "$1"; then + func_error "Could not determine host file name corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result=$1 + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $debug_cmd + + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " '$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result=$3 + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $debug_cmd + + case $4 in + $1 ) func_to_host_path_result=$3$func_to_host_path_result + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via '$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $debug_cmd + + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $debug_cmd + + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result=$1 +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result=$func_convert_core_msys_to_w32_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result=$func_convert_core_file_wine_to_w32_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result=$func_cygpath_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result=$func_cygpath_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via '$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $debug_cmd + + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd=func_convert_path_$func_stripname_result + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $debug_cmd + + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result=$1 +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result=$func_convert_core_msys_to_w32_result + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result=$func_convert_core_path_wine_to_w32_result + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result=$func_cygpath_result + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result=$func_cygpath_result + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + +# func_dll_def_p FILE +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with _LT_DLL_DEF_P in libtool.m4 +func_dll_def_p () +{ + $debug_cmd + + func_dll_def_p_tmp=`$SED -n \ + -e 's/^[ ]*//' \ + -e '/^\(;.*\)*$/d' \ + -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ + -e q \ + "$1"` + test DEF = "$func_dll_def_p_tmp" +} + + +# func_mode_compile arg... +func_mode_compile () +{ + $debug_cmd + + # Get the compilation command and the source file. + base_compile= + srcfile=$nonopt # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + pie_flag= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg=$arg + arg_mode=normal + ;; + + target ) + libobj=$arg + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + test -n "$libobj" && \ + func_fatal_error "you cannot specify '-o' more than once" + arg_mode=target + continue + ;; + + -pie | -fpie | -fPIE) + func_append pie_flag " $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) + func_append later " $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + lastarg= + save_ifs=$IFS; IFS=, + for arg in $args; do + IFS=$save_ifs + func_append_quoted lastarg "$arg" + done + IFS=$save_ifs + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. + func_append base_compile " $lastarg" + continue + ;; + + *) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg=$srcfile + srcfile=$arg + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in + arg) + func_fatal_error "you must specify an argument for -Xcompile" + ;; + target) + func_fatal_error "you must specify a target with '-o'" + ;; + *) + # Get the name of the library object. + test -z "$libobj" && { + func_basename "$srcfile" + libobj=$func_basename_result + } + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + case $libobj in + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) + func_xform "$libobj" + libobj=$func_xform_result + ;; + esac + + case $libobj in + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) + func_fatal_error "cannot determine name of library object from '$libobj'" + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -shared) + test yes = "$build_libtool_libs" \ + || func_fatal_configuration "cannot build a shared library" + build_old_libs=no + continue + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name '$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname=$func_basename_result + xdir=$func_dirname_result + lobj=$xdir$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test yes = "$build_old_libs"; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test no = "$compiler_c_o"; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext + lockfile=$output_obj.lock + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test yes = "$need_locks"; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test warn = "$need_locks"; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + func_append removelist " $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + func_append removelist " $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test yes = "$build_libtool_libs"; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test no != "$pic_mode"; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + func_append command " -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test warn = "$need_locks" && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test yes = "$suppress_opt"; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test yes = "$build_old_libs"; then + if test yes != "$pic_mode"; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test yes = "$compiler_c_o"; then + func_append command " -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + func_append command "$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test warn = "$need_locks" && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test no != "$need_locks"; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { + test compile = "$opt_mode" && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only + -shared do not build a '.o' file suitable for static linking + -static only build a '.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler + +COMPILE-COMMAND is a command to be used in creating a 'standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix '.c' with the +library object suffix, '.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to '-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the '--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the 'install' or 'cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) + -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE use a list of object files found in FILE to specify objects + -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) + +All other options (arguments beginning with '-') are ignored. + +Every other argument is treated as a filename. Files ending in '.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in '.la', then a libtool library is created, +only library objects ('.lo' files) may be specified, and '-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created +using 'ar' and 'ranlib', or on Windows using 'lib'. + +If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode '$opt_mode'" + ;; + esac + + echo + $ECHO "Try '$progname --help' for more information about other modes." +} + +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test : = "$opt_help"; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | $SED -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + $SED '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi + + +# func_mode_execute arg... +func_mode_execute () +{ + $debug_cmd + + # The first argument is the command name. + cmd=$nonopt + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "'$file' is not a file" + + dir= + case $file in + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "'$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "'$file' was not linked with '-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir=$func_dirname_result + + if test -f "$dir/$objdir/$dlname"; then + func_append dir "/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir=$func_dirname_result + ;; + + *) + func_warning "'-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir=$absdir + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic=$magic + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -* | *.la | *.lo ) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file=$progdir/$program + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file=$progdir/$program + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_append_quoted args "$file" + done + + if $opt_dry_run; then + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + else + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd=\$cmd$args + fi +} + +test execute = "$opt_mode" && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $debug_cmd + + libs= + libdirs= + admincmds= + + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "'$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument '$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and '=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || func_append admincmds " + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_quiet && exit $EXIT_SUCCESS + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the '-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the '$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the '$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the '$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" + fi + echo + + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi + exit $EXIT_SUCCESS +} + +test finish = "$opt_mode" && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $debug_cmd + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || + # Allow the use of GNU shtool's install command. + case $nonopt in *shtool*) :;; *) false;; esac + then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=false + stripme= + no_mode=: + for arg + do + arg2= + if test -n "$dest"; then + func_append files " $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=: ;; + -f) + if $install_cp; then :; else + prev=$arg + fi + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + if test X-m = "X$prev" && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the '$prev' option requires an argument" + + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=: + if $isdir; then + destdir=$dest + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir=$func_dirname_result + destname=$func_basename_result + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "'$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "'$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic=$magic + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + func_append staticlibs " $file" + ;; + + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "'$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir=$func_dirname_result + func_append dir "$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking '$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname=$1 + shift + + srcname=$realname + test -n "$relink_command" && srcname=${realname}T + + # Install the shared library and build the symlinks. + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme=$stripme + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme= + ;; + esac + ;; + os2*) + case $realname in + *_dll.a) + tstripme= + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try 'ln -sf' first, because the 'ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib=$destdir/$realname + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name=$func_basename_result + instname=$dir/${name}i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile=$destdir/$destname + else + func_basename "$file" + destfile=$func_basename_result + destfile=$destdir/$destfile + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest=$destfile + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to '$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test yes = "$build_old_libs"; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile=$destdir/$destname + else + func_basename "$file" + destfile=$func_basename_result + destfile=$destdir/$destfile + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext= + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=.exe + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script '$wrapper'" + + finalize=: + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "'$lib' has not been installed in '$libdir'" + finalize=false + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test no = "$fast_install" && test -n "$relink_command"; then + $opt_dry_run || { + if $finalize; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file=$func_basename_result + outputname=$tmpdir/$file + # Replace the output file specification. + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_quiet || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink '$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file=$outputname + else + func_warning "cannot relink '$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name=$func_basename_result + + # Set up the ranlib parameters. + oldlib=$destdir/$name + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run '$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test install = "$opt_mode" && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $debug_cmd + + my_outputname=$1 + my_originator=$2 + my_pic_p=${3-false} + my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms=${my_outputname}S.c + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist=$output_objdir/$my_outputname.nm + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined __osf__ +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + +/* External symbol declarations for the compiler. */\ +" + + if test yes = "$dlself"; then + func_verbose "generating symbol list for '$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from '$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols=$output_objdir/$outputname.exp + $opt_dry_run || { + $RM $export_symbols + eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from '$dlprefile'" + func_basename "$dlprefile" + name=$func_basename_result + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename= + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname"; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename=$func_basename_result + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename"; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + func_show_eval '$RM "${nlist}I"' + if test -n "$global_symbol_to_import"; then + eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' + fi + + echo >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[];\ +" + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ +static void lt_syminit(void) +{ + LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; + for (; symbol->name; ++symbol) + {" + $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" + echo >> "$output_objdir/$my_dlsyms" "\ + } +}" + fi + echo >> "$output_objdir/$my_dlsyms" "\ +LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{ {\"$my_originator\", (void *) 0}," + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ + {\"@INIT@\", (void *) <_syminit}," + fi + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + echo >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + $my_pic_p && pic_flag_for_symtable=" $pic_flag" + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) func_append symtab_cflags " $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' + + # Transform the symbol file into the correct name. + symfileobj=$output_objdir/${my_outputname}S.$objext + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for '$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` + fi +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. +func_win32_libid () +{ + $debug_cmd + + win32_libid_type=unknown + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + case $nm_interface in + "MS dumpbin") + if func_cygming_ms_implib_p "$1" || + func_cygming_gnu_implib_p "$1" + then + win32_nmres=import + else + win32_nmres= + fi + ;; + *) + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ + s|.*|import| + p + q + } + }'` + ;; + esac + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $debug_cmd + + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $debug_cmd + + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive that possess that section. Heuristic: eliminate + # all those that have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $debug_cmd + + if func_cygming_gnu_implib_p "$1"; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1"; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result= + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $debug_cmd + + f_ex_an_ar_dir=$1; shift + f_ex_an_ar_oldlib=$1 + if test yes = "$lock_old_archive_extraction"; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test yes = "$lock_old_archive_extraction"; then + $opt_dry_run || rm -f "$lockfile" + fi + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $debug_cmd + + my_gentop=$1; shift + my_oldlibs=${1+"$@"} + my_oldobjs= + my_xlib= + my_xabs= + my_xdir= + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib=$func_basename_result + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir=$my_gentop/$my_xlib_u + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + func_basename "$darwin_archive" + darwin_base_archive=$func_basename_result + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches; do + func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" + $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" + cd "unfat-$$/$darwin_base_archive-$darwin_arch" + func_extract_an_archive "`pwd`" "$darwin_base_archive" + cd "$darwin_curdir" + $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result=$my_oldobjs +} + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory where it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ that is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options that match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test yes = "$fast_install"; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + \$ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + # Export our shlibpath_var if we have one. + if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + + export $shlibpath_var +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} + + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +#else +# include +# include +# ifdef __CYGWIN__ +# include +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + +/* declarations of non-ANSI functions */ +#if defined __MINGW32__ +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined __CYGWIN__ +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined other_platform || defined ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined _MSC_VER +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +#elif defined __MINGW32__ +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined __CYGWIN__ +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined other platforms ... */ +#endif + +#if defined PATH_MAX +# define LT_PATHMAX PATH_MAX +#elif defined MAXPATHLEN +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +/* path handling portability macros */ +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ + defined __OS2__ +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free (stale); stale = 0; } \ +} while (0) + +#if defined LT_DEBUGWRAPPER +static int lt_debug = 1; +#else +static int lt_debug = 0; +#endif + +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); +EOF + + cat <= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + size_t tmp_len; + char *concat_name; + + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined HAVE_DOS_BASED_FILE_SYSTEM + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined HAVE_DOS_BASED_FILE_SYSTEM + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = (size_t) (q - p); + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (STREQ (str, pat)) + *str = '\0'; + } + return str; +} + +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + +static void +lt_error_core (int exit_status, const char *file, + int line, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *file, int line, const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); +} + +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + +void +lt_setenv (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + size_t len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + size_t orig_value_len = strlen (orig_value); + size_t add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + size_t len = strlen (new_value); + while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[--len] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' + cat <<"EOF" +} +EOF +} +# end: func_emit_cwrapperexe_src + +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $debug_cmd + + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + +# func_suncc_cstd_abi +# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! +# Several compiler flags select an ABI that is incompatible with the +# Cstd library. Avoid specifying it if any are in CXXFLAGS. +func_suncc_cstd_abi () +{ + $debug_cmd + + case " $compile_command " in + *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) + suncc_use_cstd_abi=no + ;; + *) + suncc_use_cstd_abi=yes + ;; + esac +} + +# func_mode_link arg... +func_mode_link () +{ + $debug_cmd + + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # what system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll that has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + bindir= + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + os2dllname= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=false + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module=$wl-single_module + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test yes != "$build_libtool_libs" \ + && func_fatal_configuration "cannot build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg=$1 + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + bindir) + bindir=$arg + prev= + continue + ;; + dlfiles|dlprefiles) + $preload || { + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=: + } + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test no = "$dlself"; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test dlprefiles = "$prev"; then + dlself=yes + elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test dlfiles = "$prev"; then + func_append dlfiles " $arg" + else + func_append dlprefiles " $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols=$arg + test -f "$arg" \ + || func_fatal_error "symbol file '$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex=$arg + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) func_append deplibs " $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir=$arg + prev= + continue + ;; + mllvm) + # Clang does not use LLVM to link, so we can simply discard any + # '-mllvm $arg' options when doing the link step. + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# func_append moreargs " $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + if test none != "$pic_object"; then + # Prepend the subdirectory the object is found in. + pic_object=$xdir$pic_object + + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test dlprefiles = "$prev"; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg=$pic_object + fi + + # Non-PIC object. + if test none != "$non_pic_object"; then + # Prepend the subdirectory the object is found in. + non_pic_object=$xdir$non_pic_object + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object=$pic_object + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "'$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file '$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + os2dllname) + os2dllname=$arg + prev= + continue + ;; + precious_regex) + precious_files_regex=$arg + prev= + continue + ;; + release) + release=-$arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test rpath = "$prev"; then + case "$rpath " in + *" $arg "*) ;; + *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) func_append xrpath " $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds=$arg + prev= + continue + ;; + weak) + func_append weak_libs " $arg" + prev= + continue + ;; + xcclinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg=$arg + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "'-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -bindir) + prev=bindir + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test X-export-symbols = "X$arg"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between '-L' and '$1'" + else + func_fatal_error "need path for '-L' option" + fi + fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of '$dir'" + dir=$absdir + ;; + esac + case "$deplibs " in + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; + *) + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) func_append dllsearchpath ":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test X-lc = "X$arg" || test X-lm = "X$arg"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test X-lc = "X$arg" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + # Do not include libc due to us having libc/libc_r. + test X-lc = "X$arg" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + func_append deplibs " System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test X-lc = "X$arg" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test X-lc = "X$arg" && continue + ;; + esac + elif test X-lc_r = "X$arg"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + func_append deplibs " $arg" + continue + ;; + + -mllvm) + prev=mllvm + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + continue + ;; + + -multi_module) + single_module=$wl-multi_module + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "'-no-install' is ignored for $host" + func_warning "assuming '-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -os2dllname) + prev=os2dllname + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs=$IFS; IFS=, + for flag in $args; do + IFS=$save_ifs + func_quote_for_eval "$flag" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" + done + IFS=$save_ifs + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs=$IFS; IFS=, + for flag in $args; do + IFS=$save_ifs + func_quote_for_eval "$flag" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" + done + IFS=$save_ifs + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # -fstack-protector* stack protector flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -specs=* GCC specs files + # -stdlib=* select c++ std lib with clang + # -fsanitize=* Clang/GCC memory and address sanitizer + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ + -specs=*|-fsanitize=*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + func_append compile_command " $arg" + func_append finalize_command " $arg" + func_append compiler_flags " $arg" + continue + ;; + + -Z*) + if test os2 = "`expr $host : '.*\(os2\)'`"; then + # OS/2 uses -Zxxx to specify OS/2-specific options + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case $arg in + -Zlinker | -Zstack) + prev=xcompiler + ;; + esac + continue + else + # Otherwise treat like 'Some other compiler flag' below + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + fi + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + + *.$objext) + # A standard object. + func_append objs " $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + test none = "$pic_object" || { + # Prepend the subdirectory the object is found in. + pic_object=$xdir$pic_object + + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test dlprefiles = "$prev"; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg=$pic_object + } + + # Non-PIC object. + if test none != "$non_pic_object"; then + # Prepend the subdirectory the object is found in. + non_pic_object=$xdir$non_pic_object + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object=$pic_object + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "'$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + func_append deplibs " $arg" + func_append old_deplibs " $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + func_resolve_sysroot "$arg" + if test dlfiles = "$prev"; then + # This library was specified with -dlopen. + func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test dlprefiles = "$prev"; then + # The library was specified with -dlpreopen. + func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else + func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the '$prevarg' option requires an argument" + + if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname=$func_basename_result + libobjs_save=$libobjs + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + # Definition is injected by LT_CONFIG during libtool generation. + func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" + + func_dirname "$output" "/" "" + output_objdir=$func_dirname_result$objdir + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_preserve_dup_deps; then + case "$libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append libs " $deplib" + done + + if test lib = "$linkmode"; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + esac + func_append pre_post_deps " $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=false + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test lib,link = "$linkmode,$pass"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs=$tmp_deplibs + fi + + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass"; then + libs=$deplibs + deplibs= + fi + if test prog = "$linkmode"; then + case $pass in + dlopen) libs=$dlfiles ;; + dlpreopen) libs=$dlprefiles ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; + esac + fi + if test lib,dlpreopen = "$linkmode,$pass"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + func_resolve_sysroot "$lib" + case $lib in + *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + func_basename "$deplib" + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; + *) func_append deplibs " $deplib" ;; + esac + done + done + libs=$dlprefiles + fi + if test dlopen = "$pass"; then + # Collect dlpreopened libraries + save_deplibs=$deplibs + deplibs= + fi + + for deplib in $libs; do + lib= + found=false + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append compiler_flags " $deplib" + if test lib = "$linkmode"; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test lib != "$linkmode" && test prog != "$linkmode"; then + func_warning "'-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test lib = "$linkmode"; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib=$searchdir/lib$name$search_ext + if test -f "$lib"; then + if test .la = "$search_ext"; then + found=: + else + found=false + fi + break 2 + fi + done + done + if $found; then + # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll=$l + done + if test "X$ll" = "X$old_library"; then # only static version available + found=false + func_dirname "$lib" "" "." + ladir=$func_dirname_result + lib=$ladir/$old_library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + else + # deplib doesn't seem to be a libtool library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + ;; # -l + *.ltframework) + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test lib = "$linkmode"; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test conv = "$pass" && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + continue + fi + if test scan = "$pass"; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) + func_warning "'-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test link = "$pass"; then + func_stripname '-R' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; + *.$libext) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=false + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=: + fi + ;; + pass_all) + valid_a_lib=: + ;; + esac + if $valid_a_lib; then + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + else + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." + fi + ;; + esac + continue + ;; + prog) + if test link != "$pass"; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + elif test prog = "$linkmode"; then + if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + func_append newdlprefiles " $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append newdlfiles " $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=: + continue + ;; + esac # case $deplib + + $found || test -f "$lib" \ + || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "'$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir=$func_dirname_result + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass" || + { test prog != "$linkmode" && test lib != "$linkmode"; }; then + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi + + if test conv = "$pass"; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for '$lib'" + fi + # It is a libtool convenience library, so add in its objects. + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done + elif test prog != "$linkmode" && test lib != "$linkmode"; then + func_fatal_error "'$lib' is not a convenience library" + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + if test -n "$old_library" && + { test yes = "$prefer_static_libs" || + test built,no = "$prefer_static_libs,$installed"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib=$l + done + fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for '$lib'" + fi + + # This library was specified with -dlopen. + if test dlopen = "$pass"; then + test -z "$libdir" \ + && func_fatal_error "cannot -dlopen a convenience library: '$lib'" + if test -z "$dlname" || + test yes != "$dlopen_support" || + test no = "$build_libtool_libs" + then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + func_append dlprefiles " $lib $dependency_libs" + else + func_append newdlfiles " $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of '$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir=$ladir + fi + ;; + esac + func_basename "$lib" + laname=$func_basename_result + + # Find the relevant object directory and library name. + if test yes = "$installed"; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library '$lib' was moved." + dir=$ladir + absdir=$abs_ladir + libdir=$abs_ladir + else + dir=$lt_sysroot$libdir + absdir=$lt_sysroot$libdir + fi + test yes = "$hardcode_automatic" && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir=$ladir + absdir=$abs_ladir + # Remove this search path later + func_append notinst_path " $abs_ladir" + else + dir=$ladir/$objdir + absdir=$abs_ladir/$objdir + # Remove this search path later + func_append notinst_path " $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test dlpreopen = "$pass"; then + if test -z "$libdir" && test prog = "$linkmode"; then + func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" + fi + case $host in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test lib = "$linkmode"; then + deplibs="$dir/$old_library $deplibs" + elif test prog,link = "$linkmode,$pass"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test prog = "$linkmode" && test link != "$pass"; then + func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=false + if test no != "$link_all_deplibs" || test -z "$library_names" || + test no = "$build_libtool_libs"; then + linkalldeplibs=: + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? + if $linkalldeplibs; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test prog,link = "$linkmode,$pass"; then + if test -n "$library_names" && + { { test no = "$prefer_static_libs" || + test built,yes = "$prefer_static_libs,$installed"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then + # Make sure the rpath contains only unique directories. + case $temp_rpath: in + *"$absdir:"*) ;; + *) func_append temp_rpath "$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if $alldeplibs && + { test pass_all = "$deplibs_check_method" || + { test yes = "$build_libtool_libs" && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test built = "$use_static_libs" && test yes = "$installed"; then + use_static_libs=no + fi + if test -n "$library_names" && + { test no = "$use_static_libs" || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc* | *os2*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" + need_relink=no + ;; + *) + if test no = "$installed"; then + func_append notinst_deplibs " $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule= + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule=$dlpremoduletest + break + fi + done + if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then + echo + if test prog = "$linkmode"; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test lib = "$linkmode" && + test yes = "$hardcode_into_libs"; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname=$1 + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname=$dlname + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc* | *os2*) + func_arith $current - $age + major=$func_arith_result + versuffix=-$major + ;; + esac + eval soname=\"$soname_spec\" + else + soname=$realname + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot=$soname + func_basename "$soroot" + soname=$func_basename_result + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from '$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for '$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test prog = "$linkmode" || test relink != "$opt_mode"; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test no = "$hardcode_direct"; then + add=$dir/$linklib + case $host in + *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; + *-*-sysv4*uw2*) add_dir=-L$dir ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir=-L$dir ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we cannot + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library"; then + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" + else + add=$dir/$old_library + fi + elif test -n "$old_library"; then + add=$dir/$old_library + fi + fi + esac + elif test no = "$hardcode_minus_L"; then + case $host in + *-*-sunos*) add_shlibpath=$dir ;; + esac + add_dir=-L$dir + add=-l$name + elif test no = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name + else + lib_linked=no + fi + ;; + relink) + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$dir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$absdir + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test yes != "$lib_linked"; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi + if test prog = "$linkmode"; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test yes != "$hardcode_direct" && + test yes != "$hardcode_minus_L" && + test yes = "$hardcode_shlibpath_var"; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi + + if test prog = "$linkmode" || test relink = "$opt_mode"; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$libdir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$libdir + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + add=-l$name + elif test yes = "$hardcode_automatic"; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib"; then + add=$inst_prefix_dir$libdir/$linklib + else + add=$libdir/$linklib + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir=-L$libdir + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add=-l$name + fi + + if test prog = "$linkmode"; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test prog = "$linkmode"; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test unsupported != "$hardcode_direct"; then + test -n "$old_library" && linklib=$old_library + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test yes = "$build_libtool_libs"; then + # Not a shared library + if test pass_all != "$deplibs_check_method"; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + $ECHO "*** Warning: This system cannot link to static lib archive $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test yes = "$module"; then + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** 'nm' from GNU binutils and a full rebuild may help." + fi + if test no = "$build_old_libs"; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test lib = "$linkmode"; then + if test -n "$dependency_libs" && + { test yes != "$hardcode_into_libs" || + test yes = "$build_old_libs" || + test yes = "$link_static"; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) func_append xrpath " $temp_xrpath";; + esac;; + *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs=$temp_deplibs + fi + + func_append newlib_search_path " $absdir" + # Link against this library + test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; + esac + fi + func_append tmp_libs " $func_resolve_sysroot_result" + done + + if test no != "$link_all_deplibs"; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path=$deplib ;; + *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." + dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of '$dir'" + absdir=$dir + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names"; then + for tmp in $deplibrary_names; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl"; then + depdepl=$absdir/$objdir/$depdepl + darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" + func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" + path= + fi + fi + ;; + *) + path=-L$absdir/$objdir + ;; + esac + else + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "'$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "'$deplib' seems to be moved" + + path=-L$absdir + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test link = "$pass"; then + if test prog = "$linkmode"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs=$newdependency_libs + if test dlpreopen = "$pass"; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test dlopen != "$pass"; then + test conv = "$pass" || { + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= + } + + if test prog,link = "$linkmode,$pass"; then + vars="compile_deplibs finalize_deplibs" + else + vars=deplibs + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) func_append tmp_libs " $deplib" ;; + esac + ;; + *) func_append tmp_libs " $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + + # Add Sun CC postdeps if required: + test CXX = "$tagname" && { + case $host_os in + linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C++ 5.9 + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + + solaris*) + func_cc_basename "$CC" + case $func_cc_basename_result in + CC* | sunCC*) + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + esac + } + + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i= + ;; + esac + if test -n "$i"; then + func_append tmp_libs " $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test prog = "$linkmode"; then + dlfiles=$newdlfiles + fi + if test prog = "$linkmode" || test lib = "$linkmode"; then + dlprefiles=$newdlprefiles + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "'-l' and '-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "'-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "'-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "'-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "'-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "'-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs=$output + func_append objs "$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form 'libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test no = "$module" \ + && func_fatal_help "libtool library '$output' must begin with 'lib'" + + if test no != "$need_lib_prefix"; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test pass_all != "$deplibs_check_method"; then + func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" + else + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + func_append libobjs " $objs" + fi + fi + + test no = "$dlself" \ + || func_warning "'-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test 1 -lt "$#" \ + && func_warning "ignoring multiple '-rpath's for a libtool library" + + install_libdir=$1 + + oldlibs= + if test -z "$rpath"; then + if test yes = "$build_libtool_libs"; then + # Building a libtool convenience library. + # Some compilers have problems with a '.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "'-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "'-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs=$IFS; IFS=: + set dummy $vinfo 0 0 0 + shift + IFS=$save_ifs + + test -n "$7" && \ + func_fatal_help "too many parameters to '-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major=$1 + number_minor=$2 + number_revision=$3 + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # that has an extra 1 added just for fun + # + case $version_type in + # correct linux to gnu/linux during the next big refactor + darwin|freebsd-elf|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age=$number_minor + revision=$number_revision + ;; + freebsd-aout|qnx|sunos) + current=$number_major + revision=$number_minor + age=0 + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age=$number_minor + revision=$number_minor + lt_irix_increment=no + ;; + *) + func_fatal_configuration "$modename: unknown library version type '$version_type'" + ;; + esac + ;; + no) + current=$1 + revision=$2 + age=$3 + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT '$current' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION '$revision' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE '$age' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE '$age' is greater than the current interface number '$current'" + func_fatal_error "'$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + # On Darwin other compilers + case $CC in + nagfor*) + verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + ;; + *) + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + esac + ;; + + freebsd-aout) + major=.$current + versuffix=.$current.$revision + ;; + + freebsd-elf) + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + ;; + + irix | nonstopux) + if test no = "$lt_irix_increment"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring=$verstring_prefix$major.$revision + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test 0 -ne "$loop"; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring=$verstring_prefix$major.$iface:$verstring + done + + # Before this point, $major must not contain '.'. + major=.$major + versuffix=$major.$revision + ;; + + linux) # correct to gnu/linux during the next big refactor + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=.$current.$age.$revision + verstring=$current.$age.$revision + + # Add in all the interfaces that we are compatible with. + loop=$age + while test 0 -ne "$loop"; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring=$verstring:$iface.0 + done + + # Make executables depend on our current version. + func_append verstring ":$current.0" + ;; + + qnx) + major=.$current + versuffix=.$current + ;; + + sco) + major=.$current + versuffix=.$current + ;; + + sunos) + major=.$current + versuffix=.$current.$revision + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 file systems. + func_arith $current - $age + major=$func_arith_result + versuffix=-$major + ;; + + *) + func_fatal_configuration "unknown library version type '$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring=0.0 + ;; + esac + if test no = "$need_version"; then + versuffix= + else + versuffix=.0.0 + fi + fi + + # Remove version info from name if versioning should be avoided + if test yes,no = "$avoid_version,$need_version"; then + major= + versuffix= + verstring= + fi + + # Check to see if the archive will have undefined symbols. + if test yes = "$allow_undefined"; then + if test unsupported = "$allow_undefined_flag"; then + if test yes = "$build_old_libs"; then + func_warning "undefined symbols not allowed in $host shared libraries; building static only" + build_libtool_libs=no + else + func_fatal_error "can't build $host shared library unless -no-undefined is specified" + fi + fi + else + # Don't allow undefined symbols. + allow_undefined_flag=$no_undefined_flag + fi + + fi + + func_generate_dlsyms "$libname" "$libname" : + func_append libobjs " $symfileobj" + test " " = "$libobjs" && libobjs= + + if test relink != "$opt_mode"; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) + if test -n "$precious_files_regex"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + func_append removelist " $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then + func_append oldlibs " $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles=$dlfiles + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) func_append dlfiles " $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles=$dlprefiles + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) func_append dlprefiles " $lib" ;; + esac + done + + if test yes = "$build_libtool_libs"; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + func_append deplibs " System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test yes = "$build_libtool_need_lc"; then + func_append deplibs " -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release= + versuffix= + major= + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib=$potent_lib + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | $SED 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; + *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib= + break 2 + fi + done + done + fi + if test -n "$a_deplib"; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib"; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + case " $predeps $postdeps " in + *" $a_deplib "*) + func_append newdeplibs " $a_deplib" + a_deplib= + ;; + esac + fi + if test -n "$a_deplib"; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib=$potent_lib # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib= + break 2 + fi + done + done + fi + if test -n "$a_deplib"; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib"; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs= + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + for i in $predeps $postdeps; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` + done + fi + case $tmp_deplibs in + *[!\ \ ]*) + echo + if test none = "$deplibs_check_method"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + ;; + esac + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + if test yes = "$droppeddeps"; then + if test yes = "$module"; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** 'nm' from GNU binutils and a full rebuild may help." + fi + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + + if test no = "$allow_undefined"; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + deplibs=$new_libs + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test yes = "$build_libtool_libs"; then + # Remove $wl instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac + if test yes = "$hardcode_into_libs"; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath=$finalize_rpath + test relink = "$opt_mode" || rpath=$compile_rpath$rpath + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath=$finalize_shlibpath + test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname=$1 + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname=$realname + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib=$output_objdir/$realname + linknames= + for link + do + func_append linknames " $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols=$output_objdir/$libname.uexp + func_append delfiles " $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + func_dll_def_p "$export_symbols" || { + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols=$export_symbols + export_symbols= + always_export_symbols=yes + } + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs=$IFS; IFS='~' + for cmd1 in $cmds; do + IFS=$save_ifs + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test yes = "$try_normal_branch" \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=$output_objdir/$output_la.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS=$save_ifs + if test -n "$export_symbols_regex" && test : != "$skipped_export"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test : != "$skipped_export" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands, which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + func_append tmp_deplibs " $test_deplib" + ;; + esac + done + deplibs=$tmp_deplibs + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test yes = "$compiler_needs_object" && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + func_append linker_flags " $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test relink = "$opt_mode"; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test yes = "$module" && test -n "$module_cmds"; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test : != "$skipped_export" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + func_basename "$output" + output_la=$func_basename_result + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then + output=$output_objdir/$output_la.lnkscript + func_verbose "creating GNU ld script: $output" + echo 'INPUT (' > $output + for obj in $save_libobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then + output=$output_objdir/$output_la.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test yes = "$compiler_needs_object"; then + firstobj="$1 " + shift + fi + for obj + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-$k.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test -z "$objlist" || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test 1 -eq "$k"; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-$k.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-$k.$objext + objlist=" $obj" + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds$reload_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + func_append delfiles " $output" + + else + output= + fi + + ${skipped_export-false} && { + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + } + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs=$IFS; IFS='~' + for cmd in $concat_cmds; do + IFS=$save_ifs + $opt_quiet || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS=$save_ifs + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + ${skipped_export-false} && { + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands, which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + } + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test yes = "$module" && test -n "$module_cmds"; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs=$IFS; IFS='~' + for cmd in $cmds; do + IFS=$sp$nl + eval cmd=\"$cmd\" + IFS=$save_ifs + $opt_quiet || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS=$save_ifs + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test yes = "$module" || test yes = "$export_dynamic"; then + # On all known operating systems, these are identical. + dlname=$soname + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "'-l' and '-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "'-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "'-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "'-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "'-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object '$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj=$output + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # if reload_cmds runs $LD directly, get rid of -Wl from + # whole_archive_flag_spec and hope we can get by with turning comma + # into space. + case $reload_cmds in + *\$LD[\ \$]*) wl= ;; + esac + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags + else + gentop=$output_objdir/${obj}x + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # If we're not building shared, we need to use non_pic_objs + test yes = "$build_libtool_libs" || libobjs=$non_pic_objects + + # Create the old-style object. + reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs + + output=$obj + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + test yes = "$build_libtool_libs" || { + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + } + + if test -n "$pic_flag" || test default != "$pic_mode"; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output=$libobj + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "'-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "'-release' is ignored for programs" + + $preload \ + && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ + && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test CXX = "$tagname"; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + func_append compile_command " $wl-bind_at_load" + func_append finalize_command " $wl-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + compile_deplibs=$new_libs + + + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) func_append dllsearchpath ":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath=$rpath + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath=$rpath + + if test -n "$libobjs" && test yes = "$build_old_libs"; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" false + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=: + case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=false + ;; + *cygwin* | *mingw* ) + test yes = "$build_libtool_libs" || wrappers_required=false + ;; + *) + if test no = "$need_relink" || test yes != "$build_libtool_libs"; then + wrappers_required=false + fi + ;; + esac + $wrappers_required || { + # Replace the output file specification. + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command=$compile_command$compile_rpath + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.$objext"; then + func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' + fi + + exit $exit_status + } + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test yes = "$no_install"; then + # We don't need to create a wrapper script. + link_command=$compile_var$compile_command$compile_rpath + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + exit $EXIT_SUCCESS + fi + + case $hardcode_action,$fast_install in + relink,*) + # Fast installation is not supported + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "'$output' will be relinked during installation" + ;; + *,yes) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + ;; + *,no) + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + ;; + *,needless) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command= + ;; + esac + + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource=$output_path/$objdir/lt-$output_name.c + cwrapper=$output_path/$output_name.exe + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host"; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + case $build_libtool_libs in + convenience) + oldobjs="$libobjs_save $symfileobj" + addlibs=$convenience + build_libtool_libs=no + ;; + module) + oldobjs=$libobjs_save + addlibs=$old_convenience + build_libtool_libs=no + ;; + *) + oldobjs="$old_deplibs $non_pic_objects" + $preload && test -f "$symfileobj" \ + && func_append oldobjs " $symfileobj" + addlibs=$old_convenience + ;; + esac + + if test -n "$addlibs"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $addlibs + func_append oldobjs " $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append oldobjs " $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + echo "copying selected object files to avoid basename conflicts..." + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase=$func_basename_result + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" + ;; + *) func_append oldobjs " $obj" ;; + esac + done + fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj"; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test -z "$oldobjs"; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test yes = "$build_old_libs" && old_library=$libname.$libext + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + if test yes = "$hardcode_automatic"; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test yes = "$installed"; then + if test -z "$install_libdir"; then + break + fi + output=$output_objdir/${outputname}i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name=$func_basename_result + func_resolve_sysroot "$deplib" + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "'$deplib' is not a valid libtool archive" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" + ;; + *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs=$newdependency_libs + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "'$lib' is not a valid libtool archive" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" + ;; + *) func_append newdlfiles " $lib" ;; + esac + done + dlfiles=$newdlfiles + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "'$lib' is not a valid libtool archive" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done + dlprefiles=$newdlprefiles + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlfiles " $abs" + done + dlfiles=$newdlfiles + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlprefiles " $abs" + done + dlprefiles=$newdlprefiles + fi + $RM $output + # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test -n "$bindir"; then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result/$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that cannot go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test no,yes = "$installed,$need_relink"; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +if test link = "$opt_mode" || test relink = "$opt_mode"; then + func_mode_link ${1+"$@"} +fi + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $debug_cmd + + RM=$nonopt + files= + rmforce=false + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic=$magic + + for arg + do + case $arg in + -f) func_append RM " $arg"; rmforce=: ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + for file in $files; do + func_dirname "$file" "" "." + dir=$func_dirname_result + if test . = "$dir"; then + odir=$objdir + else + odir=$dir/$objdir + fi + func_basename "$file" + name=$func_basename_result + test uninstall = "$opt_mode" && odir=$dir + + # Remember odir for removal later, being careful to avoid duplicates + if test clean = "$opt_mode"; then + case " $rmdirs " in + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif $rmforce; then + continue + fi + + rmfiles=$file + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + func_append rmfiles " $odir/$n" + done + test -n "$old_library" && func_append rmfiles " $odir/$old_library" + + case $opt_mode in + clean) + case " $library_names " in + *" $dlname "*) ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + esac + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && test none != "$pic_object"; then + func_append rmfiles " $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && test none != "$non_pic_object"; then + func_append rmfiles " $dir/$non_pic_object" + fi + fi + ;; + + *) + if test clean = "$opt_mode"; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + func_append rmfiles " $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + func_append rmfiles " $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + func_append rmfiles " $odir/$name $odir/${name}S.$objext" + if test yes = "$fast_install" && test -n "$relink_command"; then + func_append rmfiles " $odir/lt-$name" + fi + if test "X$noexename" != "X$name"; then + func_append rmfiles " $odir/lt-$noexename.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + + # Try to remove the $objdir's in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then + func_mode_uninstall ${1+"$@"} +fi + +test -z "$opt_mode" && { + help=$generic_help + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode '$opt_mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# where we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/m4/ax_code_coverage.m4 b/m4/ax_code_coverage.m4 new file mode 100644 index 00000000..93dfce3a --- /dev/null +++ b/m4/ax_code_coverage.m4 @@ -0,0 +1,274 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_code_coverage.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CODE_COVERAGE() +# +# DESCRIPTION +# +# Defines CODE_COVERAGE_CPPFLAGS, CODE_COVERAGE_CFLAGS, +# CODE_COVERAGE_CXXFLAGS and CODE_COVERAGE_LDFLAGS which should be +# included in the CPPFLAGS, CFLAGS CXXFLAGS and LIBS/LDFLAGS variables of +# every build target (program or library) which should be built with code +# coverage support. Also defines CODE_COVERAGE_RULES which should be +# substituted in your Makefile; and $enable_code_coverage which can be +# used in subsequent configure output. CODE_COVERAGE_ENABLED is defined +# and substituted, and corresponds to the value of the +# --enable-code-coverage option, which defaults to being disabled. +# +# Test also for gcov program and create GCOV variable that could be +# substituted. +# +# Note that all optimisation flags in CFLAGS must be disabled when code +# coverage is enabled. +# +# Usage example: +# +# configure.ac: +# +# AX_CODE_COVERAGE +# +# Makefile.am: +# +# @CODE_COVERAGE_RULES@ +# my_program_LIBS = ... $(CODE_COVERAGE_LDFLAGS) ... +# my_program_CPPFLAGS = ... $(CODE_COVERAGE_CPPFLAGS) ... +# my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ... +# my_program_CXXFLAGS = ... $(CODE_COVERAGE_CXXFLAGS) ... +# +# This results in a "check-code-coverage" rule being added to any +# Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module +# has been configured with --enable-code-coverage). Running `make +# check-code-coverage` in that directory will run the module's test suite +# (`make check`) and build a code coverage report detailing the code which +# was touched, then print the URI for the report. +# +# This code was derived from Makefile.decl in GLib, originally licenced +# under LGPLv2.1+. +# +# LICENSE +# +# Copyright (c) 2012, 2016 Philip Withnall +# Copyright (c) 2012 Xan Lopez +# Copyright (c) 2012 Christian Persch +# Copyright (c) 2012 Paolo Borelli +# Copyright (c) 2012 Dan Winship +# Copyright (c) 2015 Bastien ROUCARIES +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or (at +# your option) any later version. +# +# This library 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 Lesser +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program. If not, see . + +#serial 16 + +AC_DEFUN([AX_CODE_COVERAGE],[ + dnl Check for --enable-code-coverage + AC_REQUIRE([AC_PROG_SED]) + + # allow to override gcov location + AC_ARG_WITH([gcov], + [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])], + [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov], + [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov]) + + AC_MSG_CHECKING([whether to build with code coverage support]) + AC_ARG_ENABLE([code-coverage], + AS_HELP_STRING([--enable-code-coverage], + [Whether to enable code coverage support]),, + enable_code_coverage=no) + + AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes]) + AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage]) + AC_MSG_RESULT($enable_code_coverage) + + AS_IF([ test "$enable_code_coverage" = "yes" ], [ + # check for gcov + AC_CHECK_TOOL([GCOV], + [$_AX_CODE_COVERAGE_GCOV_PROG_WITH], + [:]) + AS_IF([test "X$GCOV" = "X:"], + [AC_MSG_ERROR([gcov is needed to do coverage])]) + AC_SUBST([GCOV]) + + dnl Check if gcc is being used + AS_IF([ test "$GCC" = "no" ], [ + AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage]) + ]) + + # List of supported lcov versions. + lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12" + + AC_CHECK_PROG([LCOV], [lcov], [lcov]) + AC_CHECK_PROG([GENHTML], [genhtml], [genhtml]) + + AS_IF([ test "$LCOV" ], [ + AC_CACHE_CHECK([for lcov version], ax_cv_lcov_version, [ + ax_cv_lcov_version=invalid + lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'` + for lcov_check_version in $lcov_version_list; do + if test "$lcov_version" = "$lcov_check_version"; then + ax_cv_lcov_version="$lcov_check_version (ok)" + fi + done + ]) + ], [ + lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list" + AC_MSG_ERROR([$lcov_msg]) + ]) + + case $ax_cv_lcov_version in + ""|invalid[)] + lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)." + AC_MSG_ERROR([$lcov_msg]) + LCOV="exit 0;" + ;; + esac + + AS_IF([ test -z "$GENHTML" ], [ + AC_MSG_ERROR([Could not find genhtml from the lcov package]) + ]) + + dnl Build the code coverage flags + CODE_COVERAGE_CPPFLAGS="-DNDEBUG" + CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_LDFLAGS="-lgcov" + + AC_SUBST([CODE_COVERAGE_CPPFLAGS]) + AC_SUBST([CODE_COVERAGE_CFLAGS]) + AC_SUBST([CODE_COVERAGE_CXXFLAGS]) + AC_SUBST([CODE_COVERAGE_LDFLAGS]) + ]) + +[CODE_COVERAGE_RULES=' +# Code coverage +# +# Optional: +# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. +# Multiple directories may be specified, separated by whitespace. +# (Default: $(top_builddir)) +# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated +# by lcov for code coverage. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info) +# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage +# reports to be created. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) +# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, +# set to 0 to disable it and leave empty to stay with the default. +# (Default: empty) +# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov +# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov +# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov +# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the +# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov +# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering +# lcov instance. (Default: empty) +# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov +# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the +# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml +# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) +# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore +# +# The generated report will be titled using the $(PACKAGE_NAME) and +# $(PACKAGE_VERSION). In order to add the current git hash to the title, +# use the git-version-gen script, available online. + +# Optional variables +CODE_COVERAGE_DIRECTORY ?= $(top_builddir) +CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info +CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage +CODE_COVERAGE_BRANCH_COVERAGE ?= +CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" +CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= +CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ +$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS) +CODE_COVERAGE_IGNORE_PATTERN ?= + +code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) +code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ + $(CODE_COVERAGE_OUTPUT_FILE); +code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) +code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ + $(CODE_COVERAGE_IGNORE_PATTERN); +code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) +code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); +code_coverage_quiet = $(code_coverage_quiet_$(V)) +code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) +code_coverage_quiet_0 = --quiet + +# sanitizes the test-name: replaces with underscores: dashes and dots +code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) + +# Use recursive makes in order to ignore errors during check +check-code-coverage: +ifeq ($(CODE_COVERAGE_ENABLED),yes) + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture +else + @echo "Need to reconfigure with --enable-code-coverage" +endif + +# Capture code coverage data +code-coverage-capture: code-coverage-capture-hook +ifeq ($(CODE_COVERAGE_ENABLED),yes) + $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) + $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) + -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp + $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) + @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" +else + @echo "Need to reconfigure with --enable-code-coverage" +endif + +# Hook rule executed before code-coverage-capture, overridable by the user +code-coverage-capture-hook: + +ifeq ($(CODE_COVERAGE_ENABLED),yes) +clean: code-coverage-clean +distclean: code-coverage-clean +code-coverage-clean: + -$(LCOV) --directory $(top_builddir) -z + -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete +endif + +GITIGNOREFILES ?= +GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) + +A''M_DISTCHECK_CONFIGURE_FLAGS ?= +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage + +.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean +'] + + AC_SUBST([CODE_COVERAGE_RULES]) + m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])]) +]) diff --git a/m4/gtk-doc.m4 b/m4/gtk-doc.m4 index 36755432..2d12f01f 100644 --- a/m4/gtk-doc.m4 +++ b/m4/gtk-doc.m4 @@ -1,4 +1,29 @@ -dnl -*- mode: autoconf -*- +# -*- mode: autoconf -*- +# +# gtk-doc.m4 - configure macro to check for gtk-doc +# Copyright (C) 2003 James Henstridge +# 2007-2017 Stefan Sauer +# +# 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 3 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, see . +# +# As a special exception, the above copyright owner gives unlimited +# permission to copy, distribute and modify the configure scripts that +# are the output of Autoconf when processing the Macro. You need not +# follow the terms of the GNU General Public License when using or +# distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. # serial 2 diff --git a/m4/libtool.m4 b/m4/libtool.m4 index f12cfdf0..ee80844b 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1,8 +1,6 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -10,36 +8,30 @@ # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. +# Copyright (C) 2014 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool 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 of the License, or +# (at your option) any later version. # -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. # -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . ]) -# serial 57 LT_INIT +# serial 58 LT_INIT # LT_PREREQ(VERSION) @@ -67,7 +59,7 @@ esac # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl @@ -91,7 +83,7 @@ dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" +LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -111,26 +103,43 @@ dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) +# _LT_PREPARE_CC_BASENAME +# ----------------------- +m4_defun([_LT_PREPARE_CC_BASENAME], [ +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in @S|@*""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} +])# _LT_PREPARE_CC_BASENAME + + # _LT_CC_BASENAME(CC) # ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, +# but that macro is also expanded into generated libtool script, which +# arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +[m4_require([_LT_PREPARE_CC_BASENAME])dnl +AC_REQUIRE([_LT_DECL_SED])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +func_cc_basename $1 +cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} @@ -177,15 +186,16 @@ m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl +m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our +# See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then +if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) -if test -n "${ZSH_VERSION+set}" ; then +if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi @@ -198,7 +208,7 @@ aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then + if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -209,14 +219,14 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -with_gnu_ld="$lt_cv_prog_gnu_ld" +with_gnu_ld=$lt_cv_prog_gnu_ld -old_CC="$CC" -old_CFLAGS="$CFLAGS" +old_CC=$CC +old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -269,14 +279,14 @@ no_glob_subst='s/\*/\\\*/g' # _LT_PROG_LTMAIN # --------------- -# Note that this code is called both from `configure', and `config.status' +# Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, +# 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN @@ -286,7 +296,7 @@ ltmain="$ac_aux_dir/ltmain.sh" # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' +# in macros and then make a single call at the end using the 'libtool' # label. @@ -421,8 +431,8 @@ m4_define([_lt_decl_all_varnames], # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME +# Quote a variable value, and forward it to 'config.status' so that its +# declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) @@ -446,7 +456,7 @@ m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl +available_tags='_LT_TAGS'dnl ]) @@ -474,7 +484,7 @@ m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], @@ -500,8 +510,8 @@ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated +# into 'config.status', and then the shell code to quote escape them in +# for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], @@ -547,7 +557,7 @@ for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -560,7 +570,7 @@ for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -576,7 +586,7 @@ _LT_OUTPUT_LIBTOOL_INIT # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this +# '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). @@ -598,7 +608,7 @@ AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl +test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT @@ -621,7 +631,7 @@ exec AS_MESSAGE_LOG_FD>>config.log } >&AS_MESSAGE_LOG_FD lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, +'$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. @@ -643,7 +653,7 @@ Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." -while test $[#] != 0 +while test 0 != $[#] do case $[1] in --version | --v* | -V ) @@ -656,10 +666,10 @@ do lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; +Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; +Try '$[0] --help' for more information.]) ;; esac shift done @@ -685,7 +695,7 @@ chmod +x "$CONFIG_LT" # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: -test "$silent" = yes && +test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false @@ -705,32 +715,46 @@ m4_defun([_LT_CONFIG], _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our + # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then + if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi - cfgfile="${ofile}T" + cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. -# + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + _LT_COPYING _LT_LIBTOOL_TAGS +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} + # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +_LT_PREPARE_MUNGE_PATH_LIST +_LT_PREPARE_CC_BASENAME + +# ### END FUNCTIONS SHARED WITH CONFIGURE + _LT_EOF case $host_os in @@ -739,7 +763,7 @@ _LT_EOF # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then +if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -756,8 +780,6 @@ _LT_EOF sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) - _LT_PROG_REPLACE_SHELLFNS - mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -775,7 +797,6 @@ _LT_EOF [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS @@ -974,7 +995,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then + if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the @@ -992,7 +1013,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1010,7 +1031,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], @@ -1032,7 +1053,7 @@ _LT_EOF _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1042,32 +1063,32 @@ _LT_EOF ]) case $host_os in rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then + if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -1087,29 +1108,29 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + if test yes = "$lt_cv_ld_force_load"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then + if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" +[ if test yes != "$lt_cv_apple_cc_single_mod"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1129,7 +1150,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl -if test "${lt_cv_aix_libpath+set}" = set; then +if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], @@ -1147,7 +1168,7 @@ else _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) @@ -1167,8 +1188,8 @@ m4_define([_LT_SHELL_INIT], # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). +# of the generated configure script that will find a shell with a builtin +# printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO @@ -1196,10 +1217,10 @@ fi # Invoke $ECHO with all args, space-separated. func_echo_all () { - $ECHO "$*" + $ECHO "$*" } -case "$ECHO" in +case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; @@ -1225,16 +1246,17 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], -[ --with-sysroot[=DIR] Search for dependent libraries within DIR - (or the compiler's sysroot if not specified).], +[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], + [Search for dependent libraries within DIR (or the compiler's sysroot + if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= -case ${with_sysroot} in #( +case $with_sysroot in #( yes) - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -1244,14 +1266,14 @@ case ${with_sysroot} in #( no|'') ;; #( *) - AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and in which our libraries should be installed.])]) +[dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- @@ -1259,31 +1281,33 @@ m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE="32" + HPUX_IA64_MODE=32 ;; *ELF-64*) - HPUX_IA64_MODE="64" + HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -1312,9 +1336,46 @@ ia64-*-hpux*) rm -rf conftest* ;; +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in @@ -1324,7 +1385,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" @@ -1369,19 +1437,20 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" + SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then + if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in @@ -1389,7 +1458,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) case $lt_cv_prog_gnu_ld in yes*) case $host in - i?86-*-solaris*) + i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) @@ -1398,7 +1467,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" + LD=${LD-ld}_sol2 fi ;; *) @@ -1414,7 +1483,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; esac -need_locks="$enable_libtool_lock" +need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK @@ -1433,11 +1502,11 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -eq 0; then + if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -ne 0; then + if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi @@ -1445,7 +1514,7 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], ]) ]) -if test "x$lt_cv_ar_at_file" = xno; then +if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -1476,7 +1545,7 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in - openbsd*) + bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -1512,7 +1581,7 @@ AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" + lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -1539,7 +1608,7 @@ AC_CACHE_CHECK([$1], [$2], $RM conftest* ]) -if test x"[$]$2" = xyes; then +if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) @@ -1561,7 +1630,7 @@ AC_DEFUN([_LT_LINKER_OPTION], m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -1580,10 +1649,10 @@ AC_CACHE_CHECK([$1], [$2], fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS ]) -if test x"[$]$2" = xyes; then +if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) @@ -1604,7 +1673,7 @@ AC_DEFUN([LT_CMD_MAX_LEN], AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 - teststring="ABCD" + teststring=ABCD case $build_os in msdosdjgpp*) @@ -1644,7 +1713,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1694,22 +1763,23 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do + for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough + test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -1725,7 +1795,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl ;; esac ]) -if test -n $lt_cv_sys_max_cmd_len ; then +if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) @@ -1753,7 +1823,7 @@ m4_defun([_LT_HEADER_DLFCN], # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : +if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -1800,9 +1870,9 @@ else # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -1828,7 +1898,7 @@ int main () return status; }] _LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in @@ -1849,7 +1919,7 @@ rm -fr conftest* # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then +if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -1859,44 +1929,52 @@ else case $host_os in beos*) - lt_cv_dlopen="load_add_on" + lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ + lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + *) AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], + [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], + [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) @@ -1905,21 +1983,21 @@ else ;; esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else + if test no = "$lt_cv_dlopen"; then enable_dlopen=no + else + enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS="$LIBS" + save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], @@ -1929,7 +2007,7 @@ else lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) - if test "x$lt_cv_dlopen_self" = xyes; then + if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl @@ -1939,9 +2017,9 @@ else ]) fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS ;; esac @@ -2033,8 +2111,8 @@ m4_defun([_LT_COMPILER_FILE_LOCKS], m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then +hard_links=nottested +if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes @@ -2044,8 +2122,8 @@ if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + if test no = "$hard_links"; then + AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else @@ -2072,8 +2150,8 @@ objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) +AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", + [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR @@ -2085,15 +2163,15 @@ m4_defun([_LT_LINKER_HARDCODE_LIBPATH], _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && + test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else @@ -2107,12 +2185,12 @@ else fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then +if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || + test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -2136,7 +2214,7 @@ else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP" ; then + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) @@ -2154,6 +2232,47 @@ _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB +# _LT_PREPARE_MUNGE_PATH_LIST +# --------------------------- +# Make sure func_munge_path_list() is defined correctly. +m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], +[[# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x@S|@2 in + x) + ;; + *:) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" + ;; + x:*) + eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" + ;; + *) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + esac +} +]])# _LT_PREPARE_PATH_LIST + + # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics @@ -2164,17 +2283,18 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; + mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in @@ -2190,28 +2310,35 @@ if test "$GCC" = yes; then ;; esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. + # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; + lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } @@ -2225,7 +2352,7 @@ BEGIN {RS=" "; FS="/|\n";} { # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else @@ -2234,7 +2361,7 @@ fi]) library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -2251,14 +2378,17 @@ hardcode_into_libs=no # flags to be left without arguments need_version=unknown +AC_ARG_VAR([LT_SYS_LIBRARY_PATH], +[User-defined run-time library search path.]) + case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' + soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) @@ -2266,41 +2396,91 @@ aix[[4-9]]*) need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -2310,18 +2490,18 @@ amigaos*) powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='${libname}${shared_ext}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -2329,8 +2509,8 @@ beos*) bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -2342,7 +2522,7 @@ bsdi[[45]]*) cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll need_version=no need_lib_prefix=no @@ -2351,8 +2531,8 @@ cygwin* | mingw* | pw32* | cegcc*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ @@ -2368,17 +2548,17 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' @@ -2387,8 +2567,8 @@ m4_if([$1], [],[ *,cl*) # Native MSVC libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' case $build_os in mingw*) @@ -2415,7 +2595,7 @@ m4_if([$1], [],[ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec="$LIB" + sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -2428,8 +2608,8 @@ m4_if([$1], [],[ esac # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' @@ -2442,7 +2622,7 @@ m4_if([$1], [],[ *) # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -2455,8 +2635,8 @@ darwin* | rhapsody*) version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -2469,8 +2649,8 @@ dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -2488,12 +2668,13 @@ freebsd* | dragonfly*) version_type=freebsd-$objformat case $version_type in freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac @@ -2518,26 +2699,15 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -2555,14 +2725,15 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -2570,8 +2741,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -2580,8 +2751,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... @@ -2594,8 +2765,8 @@ interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -2606,7 +2777,7 @@ irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -2614,8 +2785,8 @@ irix5* | irix6* | nonstopux*) esac need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -2634,8 +2805,8 @@ irix5* | irix6* | nonstopux*) esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; @@ -2644,13 +2815,33 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + ;; + # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -2675,14 +2866,15 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) # before this can be enabled. hardcode_into_libs=yes - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - - # Append ld.so.conf contents to the search path + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -2694,17 +2886,29 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -2714,7 +2918,7 @@ netbsd*) newsos6) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; @@ -2723,58 +2927,68 @@ newsos6) version_type=qnx need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no else - shlibpath_overrides_runpath=yes + need_version=yes fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH 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" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -2785,8 +2999,8 @@ solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes @@ -2796,11 +3010,11 @@ solaris*) sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes @@ -2808,8 +3022,8 @@ sunos4*) sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) @@ -2830,24 +3044,24 @@ sysv4 | sysv4.3*) ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=sco need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -2865,7 +3079,7 @@ tpf*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -2873,8 +3087,8 @@ tpf*) uts4*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -2883,20 +3097,30 @@ uts4*) ;; esac AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) @@ -2929,39 +3153,41 @@ _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) +_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], + [Detected run-time system search path for libraries]) +_LT_DECL([], [configure_time_lt_sys_library_path], [2], + [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- -# find a file program which can recognize shared library +# find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -f "$ac_dir/$1"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -2984,11 +3210,11 @@ _LT_EOF break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else @@ -3006,7 +3232,7 @@ dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- -# find a file program which can recognize a shared library +# find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then @@ -3033,16 +3259,16 @@ m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], + [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw + # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -3056,7 +3282,7 @@ if test "$GCC" = yes; then while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD="$ac_prog" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -3067,37 +3293,37 @@ if test "$GCC" = yes; then with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" + lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], +[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi]) +rm -f conftest.i conftest2.i conftest.out]) +])# _LT_PATH_DD + + +# _LT_CMD_TRUNCATE +# ---------------- +# find command to truncate a binary pipe +m4_defun([_LT_CMD_TRUNCATE], +[m4_require([_LT_PATH_DD]) +AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], +[printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) +_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], + [Command to truncate a binary pipe]) +])# _LT_CMD_TRUNCATE + + # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies @@ -3183,13 +3446,13 @@ lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. +# 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) @@ -3216,8 +3479,7 @@ mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else @@ -3253,10 +3515,6 @@ freebsd* | dragonfly*) fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3295,11 +3553,11 @@ irix5* | irix6* | nonstopux*) ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -3317,8 +3575,8 @@ newos6*) lt_cv_deplibs_check_method=pass_all ;; -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' @@ -3371,6 +3629,9 @@ sysv4 | sysv4.3*) tpf*) lt_cv_deplibs_check_method=pass_all ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; esac ]) @@ -3411,33 +3672,38 @@ AC_DEFUN([LT_PATH_NM], AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM="$NM" + lt_cv_path_NM=$NM else - lt_nm_to_check="${ac_tool_prefix}nm" + lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break + break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break + break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -3448,21 +3714,21 @@ else esac fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols" + DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: @@ -3470,8 +3736,8 @@ else esac fi AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + if test : != "$DUMPBIN"; then + NM=$DUMPBIN fi fi test -z "$NM" && NM=nm @@ -3517,8 +3783,8 @@ lt_cv_sharedlib_from_linklib_cmd, case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -3530,7 +3796,7 @@ cygwin* | mingw* | pw32* | cegcc*) ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" + lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) @@ -3557,13 +3823,28 @@ AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) -if test "x$lt_cv_path_mainfest_tool" != xyes; then +if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL +# _LT_DLL_DEF_P([FILE]) +# --------------------- +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with func_dll_def_p in the libtool script +AC_DEFUN([_LT_DLL_DEF_P], +[dnl + test DEF = "`$SED -n dnl + -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace + -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments + -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl + -e q dnl Only consider the first "real" line + $1`" dnl +])# _LT_DLL_DEF_P + + # LT_LIB_M # -------- # check for math library @@ -3575,11 +3856,11 @@ case $host in # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) - AC_CHECK_LIB(m, cos, LIBM="-lm") + AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) @@ -3598,7 +3879,7 @@ m4_defun([_LT_COMPILER_NO_RTTI], _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; @@ -3650,7 +3931,7 @@ cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; @@ -3683,14 +3964,44 @@ case `$NM -V 2>&1` in symcode='[[ABCDGIRSTW]]' ;; esac +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -3708,21 +4019,24 @@ for ac_symprfx in "" "_"; do # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" @@ -3762,11 +4076,11 @@ _LT_EOF if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else @@ -3792,7 +4106,7 @@ lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -3812,9 +4126,9 @@ _LT_EOF mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" + LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -3835,7 +4149,7 @@ _LT_EOF rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then + if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= @@ -3862,12 +4176,16 @@ _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], + [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], + [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS @@ -3883,17 +4201,18 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then + if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) @@ -3904,8 +4223,8 @@ m4_if([$1], [CXX], [ ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -3921,6 +4240,11 @@ m4_if([$1], [CXX], [ # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; darwin* | rhapsody*) # PIC is the default on this platform @@ -3970,7 +4294,7 @@ m4_if([$1], [CXX], [ case $host_os in aix[[4-9]]*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else @@ -4011,14 +4335,14 @@ m4_if([$1], [CXX], [ case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' + if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default @@ -4047,7 +4371,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -4055,7 +4379,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. + # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' @@ -4111,7 +4435,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -4200,17 +4524,18 @@ m4_if([$1], [CXX], [ fi ], [ - if test "$GCC" = yes; then + if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) @@ -4221,8 +4546,8 @@ m4_if([$1], [CXX], [ ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -4239,6 +4564,11 @@ m4_if([$1], [CXX], [ # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; darwin* | rhapsody*) @@ -4309,7 +4639,7 @@ m4_if([$1], [CXX], [ case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else @@ -4317,11 +4647,30 @@ m4_if([$1], [CXX], [ fi ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; hpux9* | hpux10* | hpux11*) @@ -4337,7 +4686,7 @@ m4_if([$1], [CXX], [ ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -4346,9 +4695,9 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. + # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4373,6 +4722,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -4470,7 +4825,7 @@ m4_if([$1], [CXX], [ ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi @@ -4499,7 +4854,7 @@ m4_if([$1], [CXX], [ fi ]) case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; @@ -4565,17 +4920,21 @@ m4_if([$1], [CXX], [ case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in @@ -4588,6 +4947,9 @@ m4_if([$1], [CXX], [ ;; esac ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -4621,9 +4983,9 @@ m4_if([$1], [CXX], [ # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if @@ -4639,7 +5001,7 @@ dnl Note also adjust exclude_expsyms for C++ above. # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. - if test "$GCC" != yes; then + if test yes != "$GCC"; then with_gnu_ld=no fi ;; @@ -4647,9 +5009,12 @@ dnl Note also adjust exclude_expsyms for C++ above. # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd*) + openbsd* | bitrig*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -4657,7 +5022,7 @@ dnl Note also adjust exclude_expsyms for C++ above. # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility @@ -4679,24 +5044,24 @@ dnl Note also adjust exclude_expsyms for C++ above. esac fi - if test "$lt_use_gnu_ld_interface" = yes; then + if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no - case `$LD -v 2>&1` in + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -4709,7 +5074,7 @@ dnl Note also adjust exclude_expsyms for C++ above. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then + if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 @@ -4728,7 +5093,7 @@ _LT_EOF case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) @@ -4744,7 +5109,7 @@ _LT_EOF _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4754,7 +5119,7 @@ _LT_EOF # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes @@ -4762,61 +5127,89 @@ _LT_EOF _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no - if test "$host_os" = linux-dietlibc; then + if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no + && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -4827,42 +5220,47 @@ _LT_EOF lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in + tcc*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' + ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -4871,13 +5269,13 @@ _LT_EOF fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -4895,8 +5293,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4908,7 +5306,7 @@ _LT_EOF _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify @@ -4923,9 +5321,9 @@ _LT_EOF # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4942,15 +5340,15 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= @@ -4966,7 +5364,7 @@ _LT_EOF # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported @@ -4974,34 +5372,57 @@ _LT_EOF ;; aix[[4-9]]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -5020,13 +5441,21 @@ _LT_EOF _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac - if test "$GCC" = yes; then + if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -5045,61 +5474,80 @@ _LT_EOF ;; esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -5108,7 +5556,7 @@ _LT_EOF case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) @@ -5138,16 +5586,17 @@ _LT_EOF # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes @@ -5156,18 +5605,18 @@ _LT_EOF # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # Assume MSVC wrapper @@ -5176,7 +5625,7 @@ _LT_EOF # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. @@ -5226,33 +5675,33 @@ _LT_EOF ;; hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test yes,no = "$GCC,$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5260,25 +5709,25 @@ _LT_EOF ;; hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then + if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ @@ -5286,14 +5735,14 @@ _LT_EOF # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in @@ -5304,7 +5753,7 @@ _LT_EOF *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -5315,16 +5764,16 @@ _LT_EOF ;; irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], - [save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + [save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], @@ -5337,22 +5786,33 @@ _LT_EOF end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) - LDFLAGS="$save_LDFLAGS"]) - if test "$lt_cv_irix_exported_symbol" = yes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + LDFLAGS=$save_LDFLAGS]) + if test yes = "$lt_cv_irix_exported_symbol"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi + _LT_TAGVAR(link_all_deplibs, $1)=no else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; - netbsd*) + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(ld_shlibs, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -5366,7 +5826,7 @@ _LT_EOF newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; @@ -5374,27 +5834,19 @@ _LT_EOF *nto* | *qnx*) ;; - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no @@ -5405,33 +5857,53 @@ _LT_EOF _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -5442,24 +5914,24 @@ _LT_EOF solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -5469,11 +5941,11 @@ _LT_EOF solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', + # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + if test yes = "$GCC"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi @@ -5483,10 +5955,10 @@ _LT_EOF ;; sunos4*) - if test "x$host_vendor" = xsequent; then + if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi @@ -5535,43 +6007,43 @@ _LT_EOF ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; @@ -5586,17 +6058,17 @@ _LT_EOF ;; esac - if test x$host_vendor = xsni; then + if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no +test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld @@ -5613,7 +6085,7 @@ x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -5693,12 +6165,12 @@ _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the + "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR @@ -5739,10 +6211,10 @@ dnl [Compiler flag to generate thread safe objects]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. +# the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" +lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. @@ -5782,18 +6254,18 @@ if test -n "$compiler"; then LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB - # Report which library types will actually be built + # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -5801,8 +6273,12 @@ if test -n "$compiler"; then ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -5810,13 +6286,13 @@ if test -n "$compiler"; then AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP -CC="$lt_save_CC" +CC=$lt_save_CC ])# _LT_LANG_C_CONFIG @@ -5824,14 +6300,14 @@ CC="$lt_save_CC" # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. +# the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then +if test -n "$CXX" && ( test no != "$CXX" && + ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || + (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes @@ -5873,7 +6349,7 @@ _LT_TAGVAR(objext, $1)=$objext # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then +if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" @@ -5915,35 +6391,35 @@ if test "$_lt_caught_CXX_error" != yes; then if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately - if test "$GXX" = yes; then + if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi - if test "$GXX" = yes; then + if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + if test yes = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) - wlarc='${wl}' + wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi @@ -5979,18 +6455,30 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in @@ -6000,6 +6488,13 @@ if test "$_lt_caught_CXX_error" != yes; then ;; esac done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -6018,13 +6513,21 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac - if test "$GXX" = yes; then + if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -6042,64 +6545,84 @@ if test "$_lt_caught_CXX_error" != yes; then fi esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag=$shared_flag' $wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # The "-G" linker flag allows undefined symbols. + _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared + # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -6109,7 +6632,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -6137,57 +6660,58 @@ if test "$_lt_caught_CXX_error" != yes; then # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -6198,6 +6722,34 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_DARWIN_LINKER_FEATURES($1) ;; + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + dgux*) case $cc_basename in ec++*) @@ -6232,18 +6784,15 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=yes ;; - gnu*) - ;; - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default @@ -6255,7 +6804,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -6264,11 +6813,11 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GXX"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no @@ -6278,15 +6827,15 @@ if test "$_lt_caught_CXX_error" != yes; then ;; hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi @@ -6312,13 +6861,13 @@ if test "$_lt_caught_CXX_error" != yes; then aCC*) case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists @@ -6329,20 +6878,20 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -6357,22 +6906,22 @@ if test "$_lt_caught_CXX_error" != yes; then interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -6381,22 +6930,22 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -6404,8 +6953,8 @@ if test "$_lt_caught_CXX_error" != yes; then # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -6414,10 +6963,10 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. @@ -6431,59 +6980,59 @@ if test "$_lt_caught_CXX_error" != yes; then # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -6497,18 +7046,18 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) @@ -6516,10 +7065,10 @@ if test "$_lt_caught_CXX_error" != yes; then *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on @@ -6577,22 +7126,17 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=yes ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else @@ -6608,9 +7152,9 @@ if test "$_lt_caught_CXX_error" != yes; then # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using @@ -6628,17 +7172,17 @@ if test "$_lt_caught_CXX_error" != yes; then cxx*) case $host in osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ + $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac @@ -6653,21 +7197,21 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists @@ -6713,9 +7257,9 @@ if test "$_lt_caught_CXX_error" != yes; then # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -6723,7 +7267,7 @@ if test "$_lt_caught_CXX_error" != yes; then solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. + # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; @@ -6740,30 +7284,30 @@ if test "$_lt_caught_CXX_error" != yes; then ;; gcx*) # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else - # g++ 2.7 appears to require `-G' NOT `-shared' on this + # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -6771,11 +7315,11 @@ if test "$_lt_caught_CXX_error" != yes; then output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi @@ -6784,52 +7328,52 @@ if test "$_lt_caught_CXX_error" != yes; then ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" + '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" + '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; @@ -6860,10 +7404,10 @@ if test "$_lt_caught_CXX_error" != yes; then esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$GXX + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -6890,7 +7434,7 @@ if test "$_lt_caught_CXX_error" != yes; then lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes +fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG @@ -6912,13 +7456,14 @@ AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + case @S|@2 in + .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; + *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose @@ -7002,13 +7547,13 @@ if AC_TRY_EVAL(ac_compile); then pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in + case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. - if test $p = "-L" || - test $p = "-R"; then + if test x-L = "$p" || + test x-R = "$p"; then prev=$p continue fi @@ -7024,16 +7569,16 @@ if AC_TRY_EVAL(ac_compile); then case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in + if test no = "$pre_test_object_deps_done"; then + case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being @@ -7041,9 +7586,9 @@ if AC_TRY_EVAL(ac_compile); then esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" + _LT_TAGVAR(postdeps, $1)=$prev$p else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= @@ -7058,15 +7603,15 @@ if AC_TRY_EVAL(ac_compile); then continue fi - if test "$pre_test_object_deps_done" = no; then + if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" + _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" + _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi @@ -7097,51 +7642,6 @@ interix[[3-9]]*) _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; esac ]) @@ -7150,7 +7650,7 @@ case " $_LT_TAGVAR(postdeps, $1) " in esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) @@ -7170,10 +7670,10 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1], # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then +if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi @@ -7210,7 +7710,7 @@ _LT_TAGVAR(objext, $1)=$objext # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then +if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t @@ -7232,7 +7732,7 @@ if test "$_lt_disable_F77" != yes; then _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. - lt_save_CC="$CC" + lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} @@ -7246,21 +7746,25 @@ if test "$_lt_disable_F77" != yes; then AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -7268,11 +7772,11 @@ if test "$_lt_disable_F77" != yes; then AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$G77 + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -7289,9 +7793,9 @@ if test "$_lt_disable_F77" != yes; then fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" - CFLAGS="$lt_save_CFLAGS" -fi # test "$_lt_disable_F77" != yes + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG @@ -7301,11 +7805,11 @@ AC_LANG_POP # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) -if test -z "$FC" || test "X$FC" = "Xno"; then +if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi @@ -7342,7 +7846,7 @@ _LT_TAGVAR(objext, $1)=$objext # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then +if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t @@ -7364,7 +7868,7 @@ if test "$_lt_disable_FC" != yes; then _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. - lt_save_CC="$CC" + lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} @@ -7380,21 +7884,25 @@ if test "$_lt_disable_FC" != yes; then AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -7402,11 +7910,11 @@ if test "$_lt_disable_FC" != yes; then AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -7426,7 +7934,7 @@ if test "$_lt_disable_FC" != yes; then GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes +fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG @@ -7436,7 +7944,7 @@ AC_LANG_POP # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE @@ -7470,7 +7978,7 @@ CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" +_LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. @@ -7507,7 +8015,7 @@ CFLAGS=$lt_save_CFLAGS # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE @@ -7541,7 +8049,7 @@ CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" +_LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. @@ -7578,7 +8086,7 @@ CFLAGS=$lt_save_CFLAGS # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE @@ -7594,7 +8102,7 @@ _LT_TAGVAR(objext, $1)=$objext lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" +lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER @@ -7604,7 +8112,7 @@ _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. -lt_save_CC="$CC" +lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= @@ -7633,7 +8141,7 @@ AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) @@ -7744,7 +8252,7 @@ lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue + test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in @@ -7761,9 +8269,9 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break + test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then + if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi @@ -7787,27 +8295,7 @@ dnl AC_DEFUN([LT_AC_PROG_SED], []) # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false @@ -7831,102 +8319,9 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES -# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -# ------------------------------------------------------ -# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -m4_defun([_LT_PROG_FUNCTION_REPLACE], -[dnl { -sed -e '/^$1 ()$/,/^} # $1 /c\ -$1 ()\ -{\ -m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: -]) - - -# _LT_PROG_REPLACE_SHELLFNS -# ------------------------- -# Replace existing portable implementations of several shell functions with -# equivalent extended shell implementations where those features are available.. -m4_defun([_LT_PROG_REPLACE_SHELLFNS], -[if test x"$xsi_shell" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl - func_split_long_opt_name=${1%%=*} - func_split_long_opt_arg=${1#*=}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) - - _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - - _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - - _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -fi - -if test x"$lt_shell_append" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - - _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl - func_quote_for_eval "${2}" -dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ - eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -fi -]) - # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- -# Determine which file name conversion functions should be used by +# Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 index 5d9acd8e..94b08297 100644 --- a/m4/ltoptions.m4 +++ b/m4/ltoptions.m4 @@ -1,14 +1,14 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # 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. -# serial 7 ltoptions.m4 +# serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) @@ -29,7 +29,7 @@ m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl + [m4_warning([Unknown $1 option '$2'])])[]dnl ]) @@ -75,13 +75,15 @@ m4_if([$1],[LT_INIT],[ dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) + [_LT_ENABLE_FAST_INSTALL]) + _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], + [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS @@ -112,7 +114,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) +put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -148,7 +150,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL], _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) +put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -157,9 +159,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-shared flag, and supports the 'shared' and +# 'disable-shared' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], @@ -172,14 +174,14 @@ AC_ARG_ENABLE([shared], *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) @@ -211,9 +213,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-static flag, and support the 'static' and +# 'disable-static' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], @@ -226,14 +228,14 @@ AC_ARG_ENABLE([static], *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) @@ -265,9 +267,9 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-fast-install flag, and support the 'fast-install' +# and 'disable-fast-install' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], @@ -280,14 +282,14 @@ AC_ARG_ENABLE([fast-install], *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) @@ -304,14 +306,14 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) +the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) +the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -319,11 +321,64 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) +# _LT_WITH_AIX_SONAME([DEFAULT]) +# ---------------------------------- +# implement the --with-aix-soname flag, and support the `aix-soname=aix' +# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT +# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. +m4_define([_LT_WITH_AIX_SONAME], +[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl +shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[[5-9]]*,yes) + AC_MSG_CHECKING([which variant of shared library versioning to provide]) + AC_ARG_WITH([aix-soname], + [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], + [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], + [case $withval in + aix|svr4|both) + ;; + *) + AC_MSG_ERROR([Unknown argument to --with-aix-soname]) + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname], + [AC_CACHE_VAL([lt_cv_with_aix_soname], + [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) + with_aix_soname=$lt_cv_with_aix_soname]) + AC_MSG_RESULT([$with_aix_soname]) + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + +_LT_DECL([], [shared_archive_member_spec], [0], + [Shared archive member basename, for filename based shared library versioning on AIX])dnl +])# _LT_WITH_AIX_SONAME + +LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) + + # _LT_WITH_PIC([MODE]) # -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], @@ -334,19 +389,17 @@ m4_define([_LT_WITH_PIC], *) pic_mode=default # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC @@ -359,7 +412,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) +put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4 index 9000a057..48bc9344 100644 --- a/m4/ltsugar.m4 +++ b/m4/ltsugar.m4 @@ -1,6 +1,7 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software +# Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives @@ -33,7 +34,7 @@ m4_define([_lt_join], # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. +# Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], @@ -44,7 +45,7 @@ m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different diff --git a/m4/ltversion.m4 b/m4/ltversion.m4 index 07a8602d..fa04b52a 100644 --- a/m4/ltversion.m4 +++ b/m4/ltversion.m4 @@ -1,6 +1,6 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -9,15 +9,15 @@ # @configure_input@ -# serial 3337 ltversion.m4 +# serial 4179 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4.2]) -m4_define([LT_PACKAGE_REVISION], [1.3337]) +m4_define([LT_PACKAGE_VERSION], [2.4.6]) +m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.2' -macro_revision='1.3337' +[macro_version='2.4.6' +macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4 index c573da90..c6b26f88 100644 --- a/m4/lt~obsolete.m4 +++ b/m4/lt~obsolete.m4 @@ -1,6 +1,7 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives @@ -11,7 +12,7 @@ # These exist entirely to fool aclocal when bootstrapping libtool. # -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # @@ -25,7 +26,7 @@ # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until diff --git a/m4/vapigen.m4 b/m4/vapigen.m4 new file mode 100644 index 00000000..99e5493c --- /dev/null +++ b/m4/vapigen.m4 @@ -0,0 +1,177 @@ +dnl vapigen.m4 +dnl +dnl Copyright 2012 Evan Nemerson, Daniel Espinosa +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND-INTROSPECTION], [DEFAULT]) +# -------------------------------------- +# Check vapigen existence and version. GObject Introspection is required, then +# set FOUND-INTROSPECTION to [yes] or use call GOBJECT_INTROSPECTION_CHECK or +# GOBJECT_INTROSPECTION_REQUIRE. This is an internal macro, use VAPIGEN_CHECK, +# VAPIGEN_GI_CHECK or VAPIGEN_GI_REQUIRE. +# +# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation +m4_define([_VAPIGEN_CHECK_INTERNAL], +[ + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + AC_REQUIRE([AM_PROG_VALAC]) + AC_ARG_ENABLE([vala], + [AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[ + AS_IF([ test "x$4" = "x"], [ + enable_vala=auto + ], [ + enable_vala=$4 + ]) + ]) + AS_IF([ test "x$enable_vala" = "xyes" -o "x$enable_vala" = "xauto"], + [ + AS_IF([ test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [ + AC_MSG_ERROR([Vala bindings require GObject Introspection]) + ]) + ], [ + AS_IF([ test "x$enable_vala" != "no"],[ + vapigen_pkg_found=no + ],[ + AC_MSG_ERROR([Invalid argument passed to --enable-vala, should be one of @<:@no/auto/yes@:>@]) + ]) + ]) + AS_IF([ test "x$2" = "x"], [ + vapigen_pkg_name=vapigen + ], [ + vapigen_pkg_name=vapigen-$2 + ]) + AS_IF([ test "x$1" = "x"], [ + vapigen_pkg="$vapigen_pkg_name" + ], [ + vapigen_pkg="$vapigen_pkg_name >= $1" + ]) + AS_IF([ test "x$enable_vala" = "xyes" -o "x$enable_vala" = "xauto"], [ + AC_MSG_CHECKING([for vapigen $vapigen_pkg_name]) + PKG_CHECK_EXISTS([ $vapigen_pkg ], [ + vapigen_pkg_found=yes + ], [ + vapigen_pkg_found=no + AC_MSG_RESULT([no]) + AC_MSG_NOTICE([Searching for $vapigen_pkg_name program...]) + AC_PATH_PROG(VAPIGEN, [$vapigen_pkg_name], [no]) + if test "x$VAPIGEN" = "xno" + then + check_prog=no + else + check_prog=yes + fi + ]) + + AS_CASE([$vapigen_pkg_found], + [yes], [ + VAPIGEN=`$PKG_CONFIG --variable=vapigen vapigen` + VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir vapigen`/vala/Makefile.vapigen + VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen` + AS_IF([ test "x$2" = "x"], [ + VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen` + ], [ + VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned vapigen` + ]) + ], + [no], [ + AS_CASE([$check_prog],[no],[ + AC_MSG_ERROR([Can't locate $vapigen_pkg program]) + ], [yes], [ + AS_IF([ test "x$2" = "x"], [ + vala_pkg_name=libvala + ], [ + vala_pkg_name=libvala-$2 + ]) + AS_IF([ test "x$1" = "x"], [ + vala_pkg="$vala_pkg_name" + ], [ + vala_pkg="$vala_pkg_name >= $1" + ]) + AC_MSG_CHECKING([for $vala_pkg]) + PKG_CHECK_EXISTS([$vala_pkg], [ + VALA_DATADIR=`pkg-config $vala_pkg --variable=datadir` + VAPIDIR="$VALA_DATADIR/vala/vapi" + VAPIGEN_MAKEFILE="$VALA_DATADIR/vala/Makefile.vapigen" + AS_IF([ test "x$2" = "x"], [ + VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen` + ], [ + VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned vapigen` + ]) + vapigen_pkg_found=yes + ], [ + AS_CASE([$enable_vala], [yes], [ + AC_MSG_ERROR([$vala_pkg not found]) + ], [auto], [ + vapigen_pkg_found=no + ]) + ]) + ]) + ]) + + AC_MSG_RESULT([$vapigen_pkg_found]) + + + ]) + AC_SUBST([VAPIGEN]) + AC_SUBST([VAPIGEN_VAPIDIR]) + AC_SUBST([VAPIDIR]) + AC_SUBST([VAPIGEN_MAKEFILE]) + + AM_CONDITIONAL(ENABLE_VAPIGEN, test "x$vapigen_pkg_found" = "xyes") +]) + +dnl Check VAPIGEN +# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND-INTROSPECTION], [DEFAULT]) +# -------------------------------------- +# Check vapigen existence and version. Set FOUND-INTROSPECTION to [yes] +# if you have detected GObject Introspection without GOBJECT_INTROSPECTION_CHECK +# or GOBJECT_INTROSPECTION_REQUIRE macros. +# +# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation +AC_DEFUN([VAPIGEN_CHECK], +[ + _VAPIGEN_CHECK_INTERNAL($1,$2,$3,$4) +] +) + +dnl usage: +# VAPIGEN_GI_CHECK([VERSION], [API_VERSION], [DEFAULT]) +# -------------------------------------- +# Check vapigen existence and version. You must call GOBJECT_INTROSPECTION_CHECK +# first in order to call this macro. +# +# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation +AC_DEFUN([VAPIGEN_GI_CHECK], +[ + AC_REQUIRE([GOBJECT_INTROSPECTION_CHECK]) + _VAPIGEN_CHECK_INTERNAL([$1],[$2],[$found_introspection],[$3]) +] +) + +dnl usage: +# VAPIGEN_GI_REQUIRE([VERSION], [API_VERSION], [DEFAULT]) +# -------------------------------------- +# Check vapigen existence and version. You must call GOBJECT_INTROSPECTION_REQUIRE +# first in order to call this macro. +# +# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation +AC_DEFUN([VAPIGEN_GI_REQUIRE], +[ + AC_REQUIRE([GOBJECT_INTROSPECTION_REQUIRE]) + _VAPIGEN_CHECK_INTERNAL([$1],[$2],[$found_introspection],[$3]) +] +) + diff --git a/missing b/missing new file mode 100755 index 00000000..f62bbae3 --- /dev/null +++ b/missing @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2013-10-28.13; # UTC + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 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, 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, see . + +# 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. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/po/LINGUAS b/po/LINGUAS index a1d98a9e..0eaf8a78 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -3,6 +3,7 @@ as be bg bn_IN +bs ca ca@valencia cs @@ -17,10 +18,12 @@ eu fa fr fur +gd gl gu he hi +hr hu id it @@ -32,7 +35,9 @@ lv ml mr nb +ne nl +oc or pa pl diff --git a/po/POTFILES.in b/po/POTFILES.in index 21c70d42..3cd20bf4 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -5,5 +5,8 @@ libsoup/soup-message-client-io.c libsoup/soup-message-io.c libsoup/soup-message-server-io.c libsoup/soup-request.c +libsoup/soup-server.c libsoup/soup-session.c +libsoup/soup-socket.c +libsoup/soup-websocket.c libsoup/soup-tld.c diff --git a/po/an.po b/po/an.po index 5d207a9a..c8460692 100644 --- a/po/an.po +++ b/po/an.po @@ -6,28 +6,31 @@ msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-19 15:37+0000\n" -"PO-Revision-Date: 2013-02-19 23:17+0100\n" -"Last-Translator: Daniel Martinez \n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libsoup" +"&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2015-05-06 22:23+0000\n" +"PO-Revision-Date: 2015-05-07 23:03+0200\n" +"Last-Translator: Daniel \n" "Language-Team: Aragonese \n" "Language: an\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Pootle 2.5.1.1\n" +"X-POOTLE-MTIME: 1431036239.000000\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 -#: ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:235 msgid "Connection terminated unexpectedly" msgstr "A connexión remató inasperadament" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "Petición de búsqueda no válida" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr "No se puede truncar SoupBodyInputStream" @@ -52,16 +55,15 @@ msgstr "No se podió analisar a respuesta HTTP" msgid "Unrecognized HTTP response encoding" msgstr "Codificación d'a respuesta HTTP no reconoixida" -#: ../libsoup/soup-message-io.c:846 -#: ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Se canceló a operación" - -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:392 ../libsoup/soup-message-io.c:1020 msgid "Operation would block" msgstr "A operación se blocará" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:972 ../libsoup/soup-message-io.c:1005 +msgid "Operation was cancelled" +msgstr "Se canceló a operación" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "No se podió analisar a solicitut HTTP" @@ -75,34 +77,100 @@ msgstr "No s'ha proporcionau un URI" msgid "Invalid '%s' URI: %s" msgstr "URI '%s' no válida: %s" -#: ../libsoup/soup-session.c:4211 +#: ../libsoup/soup-server.c:1711 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "No se puede creyar un servidor TLS sin un certificau TLS" + +#: ../libsoup/soup-server.c:1730 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "No se puede escuitar en l'adreza %s, puerto %d: " + +#: ../libsoup/soup-session.c:4554 #, c-format msgid "Could not parse URI '%s'" -msgstr "No se podió analisar l'URI «%s»" +msgstr "No se podió analisar l'URI '%s'" -#: ../libsoup/soup-session.c:4248 +#: ../libsoup/soup-session.c:4591 #, c-format msgid "Unsupported URI scheme '%s'" -msgstr "Esquema %s d'URI no suportau" +msgstr "Esquema '%s' d'URI no suportau" -#: ../libsoup/soup-session.c:4270 +#: ../libsoup/soup-session.c:4613 #, c-format msgid "Not an HTTP URI" msgstr "No ye un URI HTTP" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4797 +msgid "The server did not accept the WebSocket handshake." +msgstr "O servidor no ha acceptau a negociación WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can't import non-socket as SoupSocket" +msgstr "No se puede importar bella cosa que no ye un socket como SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "No se podió importar o socket existent: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can't import unconnected socket" +msgstr "No se puede importar un socket no connectau" + +#: ../libsoup/soup-websocket.c:336 ../libsoup/soup-websocket.c:345 +msgid "WebSocket handshake expected" +msgstr "S'asperaba a negociación WebSocket" + +#: ../libsoup/soup-websocket.c:353 +msgid "Unsupported WebSocket version" +msgstr "Versión de Websocket no suportada" + +#: ../libsoup/soup-websocket.c:362 +msgid "Invalid WebSocket key" +msgstr "Clau de WebSocket no valida" + +#: ../libsoup/soup-websocket.c:372 +#, c-format +msgid "Incorrect WebSocket \"%s\" header" +msgstr "Capitero \"%s\" de WebSocket no valida" + +#: ../libsoup/soup-websocket.c:381 +msgid "Unsupported WebSocket subprotocol" +msgstr "Subprotocolo de WebSocket no suportau" + +#: ../libsoup/soup-websocket.c:508 +msgid "Server rejected WebSocket handshake" +msgstr "O servidor ha refusau a negociación de WebSocket" + +#: ../libsoup/soup-websocket.c:516 ../libsoup/soup-websocket.c:525 +msgid "Server ignored WebSocket handshake" +msgstr "O servidor ha ignorau a negociación de WebSocket" + +#: ../libsoup/soup-websocket.c:537 +msgid "Server requested unsupported protocol" +msgstr "O servidor ha solicitau un protocolo no suportau" + +#: ../libsoup/soup-websocket.c:547 +msgid "Server requested unsupported extension" +msgstr "O servidor ha solicitau una extensión no suportada" + +#: ../libsoup/soup-websocket.c:560 +#, c-format +msgid "Server returned incorrect \"%s\" key" +msgstr "O servidor ha tornau una clau \"%s\" incorrecta" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "O nombre de l'equipo ye una adreza IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "O nombre de l'equipo no ye válido" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "O nombre de l'equipo no tiene un dominio base" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "No i hai suficients dominios" - diff --git a/po/as.po b/po/as.po index b87688a1..4c839120 100644 --- a/po/as.po +++ b/po/as.po @@ -2,14 +2,14 @@ # Copyright (C) 2012 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. # -# Nilamdyuti Goswami , 2012, 2013. +# Nilamdyuti Goswami , 2012, 2013, 2014. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-03-12 18:37+0530\n" +"POT-Creation-Date: 2014-08-18 09:39+0000\n" +"PO-Revision-Date: 2014-08-18 21:29+0530\n" "Last-Translator: Nilamdyuti Goswami \n" "Language-Team: Assamese \n" "Language: as\n" @@ -19,25 +19,25 @@ msgstr "" "X-Generator: Lokalize 1.5\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:196 msgid "Connection terminated unexpectedly" msgstr "সংযোগ অপ্ৰত্যাশিতভাৱে অন্ত হল" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "অবৈধ সন্ধান অনুৰোধ" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr "SoupBodyInputStream চুটি কৰিব নোৱাৰি" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:73 msgid "Network stream unexpectedly closed" -msgstr "নেটৱাৰ্ক স্ট্ৰিম অপ্ৰত্যাশিতভাৱে বন্ধ হল" +msgstr "নেটৱৰ্ক স্ট্ৰিম অপ্ৰত্যাশিতভাৱে বন্ধ হল" -#: ../libsoup/soup-cache-input-stream.c:291 +#: ../libsoup/soup-cache-input-stream.c:290 msgid "Failed to completely cache the resource" msgstr "সম্পদক সম্পূৰ্ণভাৱে ক্যাশ কৰিবলে ব্যৰ্থ" @@ -54,15 +54,15 @@ msgstr "HTTP প্ৰতিক্ৰিয়া বিশ্লেষণ কৰ msgid "Unrecognized HTTP response encoding" msgstr "অপৰিচিত HTTP প্ৰতিক্ৰিয়া এনক'ডিং" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 +#: ../libsoup/soup-message-io.c:854 ../libsoup/soup-message-io.c:890 msgid "Operation was cancelled" msgstr "কাৰ্য্য বাতিল কৰা হৈছিল" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:901 msgid "Operation would block" msgstr "কাৰ্য্য প্ৰতিৰোধ কৰিব" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-server-io.c:41 msgid "Could not parse HTTP request" msgstr "HTTP অনুৰোধ বিশ্লেষণ কৰিব পৰা নগল" @@ -76,34 +76,55 @@ msgstr "কোনো URl প্ৰদান কৰা হোৱা নাই" msgid "Invalid '%s' URI: %s" msgstr "অবৈধ '%s' URI: %s" -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-server.c:1528 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "এটা TLS প্ৰমাণপত্ৰ নহোৱাকৈ এটা TLS চাৰ্ভাৰ সৃষ্টি কৰিব নোৱাৰি" + +#: ../libsoup/soup-server.c:1547 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "ঠিকনা %s, পৰ্ট %d ত শুনিব নোৱাৰি: " + +#: ../libsoup/soup-session.c:4466 #, c-format msgid "Could not parse URI '%s'" msgstr "URI '%s' বিশ্লেষণ কৰিব পৰা নগল" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4503 #, c-format msgid "Unsupported URI scheme '%s'" msgstr "অসমৰ্থিত URl আঁচনি '%s'" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4525 #, c-format msgid "Not an HTTP URI" msgstr "এটা HTTP URI নহয়" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-socket.c:142 +msgid "Can't import non-socket as SoupSocket" +msgstr "SoupSocket ৰূপে নন-চকেটক ইমপৰ্ট কৰিব নোৱাৰি" + +#: ../libsoup/soup-socket.c:160 +msgid "Could not import existing socket: " +msgstr "স্থায়ী চকেটক ইমপৰ্ট কৰিব নোৱাৰি" + +#: ../libsoup/soup-socket.c:169 +msgid "Can't import unconnected socket" +msgstr "অসংযুক্ত চকেটক ইমপৰ্ট কৰিব নোৱাৰি" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "হস্টনাম এটা IP ঠিকনা" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "অবৈধ হস্টনাম" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "হস্টনামৰ কোনো ভিত্তি ডমেইন নাই" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "পৰ্যাপ্ত ডমেইন নাই" diff --git a/po/be.po b/po/be.po index e2b35341..841678b1 100644 --- a/po/be.po +++ b/po/be.po @@ -1,34 +1,36 @@ # Ihar Hrachyshka , 2012. +# Yuras Shumovich , 2017. # msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2012-09-14 13:29+0300\n" -"Last-Translator: Ihar Hrachyshka \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2017-02-23 10:17+0000\n" +"PO-Revision-Date: 2017-03-27 11:48+0300\n" +"Last-Translator: Yuras Shumovich \n" "Language-Team: Belarusian \n" "Language: be\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:235 msgid "Connection terminated unexpectedly" msgstr "Злучэнне нечакана перарвана" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Хібны запыт пракручвання змесціва" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "Немагчыма абрэзаць SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Сеткавы струмень нечакана закрыўся" @@ -36,7 +38,7 @@ msgstr "Сеткавы струмень нечакана закрыўся" msgid "Failed to completely cache the resource" msgstr "Не ўдалося цалкам змясціць рэсурс у кэш-памяці" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Выхадны буфер надта малы" @@ -49,55 +51,122 @@ msgstr "Не ўдалося разабраць HTTP-адказ" msgid "Unrecognized HTTP response encoding" msgstr "Невядомае кадаванне HTTP-адказу" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Аперацыя была скасавана" - -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:392 ../libsoup/soup-message-io.c:1020 msgid "Operation would block" msgstr "Аперацыя заблакіруе працэс" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:972 ../libsoup/soup-message-io.c:1005 +msgid "Operation was cancelled" +msgstr "Аперацыя была скасавана" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Не ўдалося разабраць HTTP-запыт" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "URI-адрас не пададзены" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "Хібны URI-адрас \"%s\": %s" -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Нельга стварыць TLS сервер без сертыфіката TLS" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Could not parse URI '%s'" +msgid "Could not listen on address %s, port %d: " +msgstr "Не ўдалося праслухаць адрас %s, порт %d: " + +#: ../libsoup/soup-session.c:4518 +#, c-format +msgid "Could not parse URI “%s”" msgstr "Не ўдалося разабраць URI-адрас \"%s\"" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4555 #, c-format -msgid "Unsupported URI scheme '%s'" +msgid "Unsupported URI scheme “%s”" msgstr "URI-схема \"%s\" не падтрымліваецца" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4577 #, c-format msgid "Not an HTTP URI" msgstr "Гэта не HTTP URI-адрас" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4763 +msgid "The server did not accept the WebSocket handshake." +msgstr "Сервер не прыняў поціск WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Толькі сокет можна імпартаваць як SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Не ўдалося імпартаваць існуючы сокет: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Нельга імпартаваць нязвязаны сокет" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Чакаўся поціск WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Версія WebSocket не падтрымліваецца" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Хібны ключ WebSocket" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Хібны загаловак WebSocket %s" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Падпратакол WebSocket не падтрымліваецца" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Сервер адхіліў поціск WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Сервер ігнараваў поціск WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Сервер запрасіў непадтрымліваемы пратакол" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Сервер запрасіў непадтрымліваемае пашырэнне" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Сервер вярнуў хібны ключ \"%s\"" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Назва хоста з'яўляецца IP-адрасам" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Хібная назва хоста" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Назва хоста не мае базавага дамена" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Не хапае даменаў" diff --git a/po/bg.po b/po/bg.po index 42ae49e2..6bac87b7 100644 --- a/po/bg.po +++ b/po/bg.po @@ -1,40 +1,44 @@ # Bulgarian translation of libsoup po-file. -# Copyright (C) 2012, 2013 Free Software Foundation, Inc. +# Copyright (C) 2012, 2013, 2016 Free Software Foundation, Inc. # This file is distributed under the same license as the libsoup package. -# Alexander Shopov , 2012, 2013. +# Alexander Shopov , 2012, 2013, 2016. # msgid "" msgstr "" "Project-Id-Version: libsoup master\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-01-12 06:56+0200\n" -"PO-Revision-Date: 2013-01-12 06:56+0200\n" +"POT-Creation-Date: 2016-02-01 06:26+0200\n" +"PO-Revision-Date: 2016-02-01 06:26+0200\n" "Last-Translator: Alexander Shopov \n" "Language-Team: Bulgarian \n" -"Language: \n" +"Language: bg\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:235 msgid "Connection terminated unexpectedly" msgstr "Връзката прекъсна неочаквано" -#: ../libsoup/soup-body-input-stream.c:461 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "Неправилна заявка за търсене" -#: ../libsoup/soup-body-input-stream.c:489 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr "Потокът SoupBodyInputStream не може да бъде прекъснат" -#: ../libsoup/soup-cache-input-stream.c:77 +#: ../libsoup/soup-cache-input-stream.c:74 msgid "Network stream unexpectedly closed" msgstr "Потокът от мрежата неочаквано прекъсна" +#: ../libsoup/soup-cache-input-stream.c:291 +msgid "Failed to completely cache the resource" +msgstr "Ресурсът не може да бъде напълно кеширан" + #: ../libsoup/soup-converter-wrapper.c:192 #, c-format msgid "Output buffer is too small" @@ -48,15 +52,15 @@ msgstr "Отговорът от HTTP не може да бъде анализи msgid "Unrecognized HTTP response encoding" msgstr "Непознато кодиране на отговора от HTTP" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Операцията е отменена" - -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:392 ../libsoup/soup-message-io.c:1020 msgid "Operation would block" msgstr "Операцията ще блокира" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:972 ../libsoup/soup-message-io.c:1005 +msgid "Operation was cancelled" +msgstr "Операцията е отменена" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Заявката към HTTP не може да бъде анализирана" @@ -70,33 +74,100 @@ msgstr "Не е даден адрес" msgid "Invalid '%s' URI: %s" msgstr "Неправилен адрес на „%s“: %s" -#: ../libsoup/soup-session.c:4032 +#: ../libsoup/soup-server.c:1720 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "Не може да се създаде сървър с TLS без съответния сертификат" + +#: ../libsoup/soup-server.c:1739 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "Не може да се слуша на адрес „%s“, порт %d: " + +#: ../libsoup/soup-session.c:4543 #, c-format msgid "Could not parse URI '%s'" msgstr "Адресът „%s“ е неправилен" -#: ../libsoup/soup-session.c:4069 +#: ../libsoup/soup-session.c:4580 #, c-format msgid "Unsupported URI scheme '%s'" msgstr "Схемата на адреса не се поддържа „%s“" -#: ../libsoup/soup-session.c:4091 +#: ../libsoup/soup-session.c:4602 #, c-format msgid "Not an HTTP URI" -msgstr "Не е адрес URI за HTTP" +msgstr "Не е адрес за HTTP" + +#: ../libsoup/soup-session.c:4788 +msgid "The server did not accept the WebSocket handshake." +msgstr "Сървърът не прие ръкостискането за WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can't import non-socket as SoupSocket" +msgstr "Не може да се внесе като гнездо за soup нещо, което не е гнездо" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Съществуващото гнездо не може да бъде внесено: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can't import unconnected socket" +msgstr "Гнездо, което не е свързано, не може да се внесе" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Очаква се ръкостискане за WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Неподдържана версия на WebSocket" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Неправилен ключ за WebSocket" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket \"%s\" header" +msgstr "Неправилна заглавна част „%s“ за WebSocket" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Неподдържан подпротокол за WebSocket" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Сървърът отхвърли ръкостискането по WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Сървърът пренебрегна ръкостискането по WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Сървърът изиска неподдържан протокол" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Сървърът изиска неподдържано разширение" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect \"%s\" key" +msgstr "Сървърът върна неправилен ключ „%s“" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Името на машината е адрес по IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Неправилно име на машина" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Името на машината не съдържа домейн" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Няма достатъчно домейни" diff --git a/po/bn_IN.po b/po/bn_IN.po index 847d4b0d..7d9c8fdf 100644 --- a/po/bn_IN.po +++ b/po/bn_IN.po @@ -3,81 +3,129 @@ # This file is distributed under the same license as the libsoup package. # # Sayak Sarkar , 2012. +# sray , 2013, 2014. #zanata. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2012-09-20 11:30+0000\n" -"PO-Revision-Date: 2012-09-20 22:38+0530\n" -"Last-Translator: Sayak Sarkar \n" -"Language-Team: Bengali (India) \n" -"Language: bn\n" +"POT-Creation-Date: 2014-10-06 21:59+0000\n" +"PO-Revision-Date: 2014-10-07 13:28+0000\n" +"Last-Translator: \n" +"Language-Team: Bengali (India) \n" +"Language: bn_IN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Lokalize 1.4\n" +"X-Generator: Lokalize 1.5\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:196 msgid "Connection terminated unexpectedly" msgstr "সংযোগ অপ্রত্যাশিতভাবে পর্যবসিত" -#: ../libsoup/soup-body-input-stream.c:461 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "অবৈধ সিক্ অনুরোধ" -#: ../libsoup/soup-body-input-stream.c:489 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr "SoupBodyInputStream ছাঁটা যাচ্ছে না।" +#: ../libsoup/soup-cache-input-stream.c:73 +msgid "Network stream unexpectedly closed" +msgstr "নেটওয়ার্ক স্ট্রীম অপ্রত্যাশিত ভাবে বন্ধ হয়েছে" + +#: ../libsoup/soup-cache-input-stream.c:290 +msgid "Failed to completely cache the resource" +msgstr "রিসোর্স সম্পূর্ণ ভাবে ক্যাশ করতে ব্যর্থ" + #: ../libsoup/soup-converter-wrapper.c:192 #, c-format msgid "Output buffer is too small" msgstr "আউটপুট বাফার অত্যন্ত ছোট" -#: ../libsoup/soup-message-io.c:818 ../libsoup/soup-message-io.c:854 +#: ../libsoup/soup-message-client-io.c:41 +msgid "Could not parse HTTP response" +msgstr "HTTP প্রত্যুত্তর পার্জ করা গেল না" + +#: ../libsoup/soup-message-client-io.c:66 +msgid "Unrecognized HTTP response encoding" +msgstr "অস্বীকৃত HTTP প্রত্যুত্তর এনকোডিং" + +#: ../libsoup/soup-message-io.c:854 ../libsoup/soup-message-io.c:890 msgid "Operation was cancelled" msgstr "অপারেশন বাতিল হয়েছে" -#: ../libsoup/soup-message-io.c:865 +#: ../libsoup/soup-message-io.c:901 msgid "Operation would block" msgstr "অপারেশন ব্লক করবে" -#: ../libsoup/soup-request.c:142 +#: ../libsoup/soup-message-server-io.c:41 +msgid "Could not parse HTTP request" +msgstr "HTTP অনুরোধ পার্জ করা গেল না" + +#: ../libsoup/soup-request.c:140 #, c-format msgid "No URI provided" msgstr "কোন URI দেওয়া হয়নি" -#: ../libsoup/soup-request.c:152 +#: ../libsoup/soup-request.c:150 #, c-format msgid "Invalid '%s' URI: %s" msgstr "অবৈধ '%s' URI: %s" -#: ../libsoup/soup-requester.c:219 +#: ../libsoup/soup-server.c:1528 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "একটি TLS সার্টিফিকেট ছাড়া একটি TLS সার্ভার তৈরি করা সম্ভব নয়" + +#: ../libsoup/soup-server.c:1547 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "ঠিকানা %s, পোর্ট %d এ শোনা যায়নি: " + +#: ../libsoup/soup-session.c:4466 #, c-format msgid "Could not parse URI '%s'" msgstr "URI '%s' পার্স করা যায়নি" -#: ../libsoup/soup-requester.c:253 +#: ../libsoup/soup-session.c:4503 #, c-format msgid "Unsupported URI scheme '%s'" msgstr "অসমর্থিত URI স্কিম '%s'" -#: ../libsoup/soup-tld.c:154 +#: ../libsoup/soup-session.c:4525 +#, c-format +msgid "Not an HTTP URI" +msgstr "একটি HTTP URI নয়" + +#: ../libsoup/soup-socket.c:142 +msgid "Can't import non-socket as SoupSocket" +msgstr "নন-সকেট SoupSocket হিসাবে অামদানি করা সম্ভব নয়" + +#: ../libsoup/soup-socket.c:160 +msgid "Could not import existing socket: " +msgstr "বিদ্যমান সকেট অামদানি করা যায়নি: " + +#: ../libsoup/soup-socket.c:169 +msgid "Can't import unconnected socket" +msgstr "অসংযুক্ত সকেট অামদানি করা সম্ভব নয়" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "হোস্টনেমটি একটি IP অ্যাড্রেস" -#: ../libsoup/soup-tld.c:175 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "অবৈধ হোস্টনেম" -#: ../libsoup/soup-tld.c:204 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "হোস্টনেমটির কোনো বেস ডোমেইন নেই" -#: ../libsoup/soup-tld.c:226 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "ডোমেইনগুলি পর্যাপ্ত নয়" + diff --git a/po/bs.po b/po/bs.po new file mode 100644 index 00000000..3b0f9112 --- /dev/null +++ b/po/bs.po @@ -0,0 +1,124 @@ +msgid "" +msgstr "" +"Project-Id-Version: libsoup2.4\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2015-02-26 23:06+0000\n" +"PO-Revision-Date: 2015-02-04 15:38+0000\n" +"Last-Translator: Samir Ribić \n" +"Language-Team: Bosnian \n" +"Language: bs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2015-02-05 06:47+0000\n" +"X-Generator: Launchpad (build 17331)\n" + +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:200 +msgid "Connection terminated unexpectedly" +msgstr "Konekcija je neočekivano završena" + +#: ../libsoup/soup-body-input-stream.c:462 +msgid "Invalid seek request" +msgstr "Zatražena je neispravna pretraga" + +#: ../libsoup/soup-body-input-stream.c:490 +msgid "Cannot truncate SoupBodyInputStream" +msgstr "Ne mogu odsjećie SoupBodyInputStream" + +#: ../libsoup/soup-cache-input-stream.c:73 +msgid "Network stream unexpectedly closed" +msgstr "Mrežni protok neočekivano zatvoren" + +#: ../libsoup/soup-cache-input-stream.c:290 +msgid "Failed to completely cache the resource" +msgstr "Nije uspjelo u potpunosti keširanje resursa" + +#: ../libsoup/soup-converter-wrapper.c:192 +#, c-format +msgid "Output buffer is too small" +msgstr "Izlazni bafer je premali" + +#: ../libsoup/soup-message-client-io.c:41 +msgid "Could not parse HTTP response" +msgstr "Nije moguće analizirati HTTP odgovor" + +#: ../libsoup/soup-message-client-io.c:66 +msgid "Unrecognized HTTP response encoding" +msgstr "Neprepoznato HTTP kodiranje odgovora" + +#: ../libsoup/soup-message-io.c:357 ../libsoup/soup-message-io.c:960 +msgid "Operation would block" +msgstr "Operacija bi se blokirala" + +#: ../libsoup/soup-message-io.c:912 ../libsoup/soup-message-io.c:949 +msgid "Operation was cancelled" +msgstr "Operacija je prekinuta" + +#: ../libsoup/soup-message-server-io.c:41 +msgid "Could not parse HTTP request" +msgstr "Nije moguće analizirati HTTP zahtjeve" + +#: ../libsoup/soup-request.c:140 +#, c-format +msgid "No URI provided" +msgstr "URI nije naveden" + +#: ../libsoup/soup-request.c:150 +#, c-format +msgid "Invalid '%s' URI: %s" +msgstr "Nevažeći '%s' URI: %s" + +#: ../libsoup/soup-server.c:1585 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "Ne mogu stvoriti TLS poslužitelja bez TLS certifikat" + +#: ../libsoup/soup-server.c:1604 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "Ne mogu slušati na adresi %s,%d port: " + +#: ../libsoup/soup-session.c:4485 +#, c-format +msgid "Could not parse URI '%s'" +msgstr "Ne mogu analizirati URI '%s'" + +#: ../libsoup/soup-session.c:4522 +#, c-format +msgid "Unsupported URI scheme '%s'" +msgstr "Nepodržana URI šema '%s'" + +#: ../libsoup/soup-session.c:4544 +#, c-format +msgid "Not an HTTP URI" +msgstr "Nije HTTP URI" + +#: ../libsoup/soup-socket.c:150 +msgid "Can't import non-socket as SoupSocket" +msgstr "Ne možete uvesti ne-utičnice kao SoupSocket" + +#: ../libsoup/soup-socket.c:168 +msgid "Could not import existing socket: " +msgstr "Ne mogu se uvesti postojeće utičnice: " + +#: ../libsoup/soup-socket.c:177 +msgid "Can't import unconnected socket" +msgstr "Ne mogu uvesti nepovezane utičnice" + +#: ../libsoup/soup-tld.c:188 +msgid "Hostname is an IP address" +msgstr "Ime domaćina je IP adresa" + +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 +msgid "Invalid hostname" +msgstr "Loše ime domaćina" + +#: ../libsoup/soup-tld.c:250 +msgid "Hostname has no base domain" +msgstr "Ime domaćina nema baznu domenu" + +#: ../libsoup/soup-tld.c:304 +msgid "Not enough domains" +msgstr "Nema dovoljno domena" diff --git a/po/ca.po b/po/ca.po index 60d22f79..5941c4df 100644 --- a/po/ca.po +++ b/po/ca.po @@ -1,39 +1,41 @@ # Catalan translation for libsoup. # Copyright (C) 2012 Free Software Foundation, Inc. # This file is distributed under the same license as the libsoup package. -# Gil Forcada , 2012, 2013. -# +# Gil Forcada , 2012, 2013, 2014. +# Xavi Ivars , 2015. +# Jordi Serratosa , 2017. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-03-09 09:45+0000\n" -"PO-Revision-Date: 2012-09-23 17:22+0200\n" -"Last-Translator: Gil Forcada \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2017-08-28 17:31+0000\n" +"PO-Revision-Date: 2017-08-21 23:33+0200\n" +"Last-Translator: Xavi Ivars \n" "Language-Team: Catalan \n" "Language: ca\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bits\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Gtranslator 2.91.5\n" - -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.8.11\n" +"X-Project-Style: gnome\n" + +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:237 msgid "Connection terminated unexpectedly" msgstr "S'ha finalitzat la connexió inesperadament" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" -msgstr "La petició de cerca no és vàlida" +msgstr "La petició de cerca no és vàlida" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "No es pot truncar el SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "S'ha tancat inesperadament el flux de xarxa" @@ -41,7 +43,7 @@ msgstr "S'ha tancat inesperadament el flux de xarxa" msgid "Failed to completely cache the resource" msgstr "No s'ha pogut carregar completament el recurs a la memòria cau" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "La memòria intermèdia de sortida és massa petita" @@ -54,55 +56,123 @@ msgstr "No s'ha pogut analitzar la resposta HTTP" msgid "Unrecognized HTTP response encoding" msgstr "No es reconeix la codificació de la resposta HTTP" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "S'ha cancel·lat l'operació" - -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:387 ../libsoup/soup-message-io.c:1015 msgid "Operation would block" msgstr "L'operació bloquejaria" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:967 ../libsoup/soup-message-io.c:1000 +msgid "Operation was cancelled" +msgstr "S'ha cancel·lat l'operació" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "No s'ha pogut analitzar la petició HTTP" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "No s'ha proporcionat cap URI" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "L'URI «%s» no és vàlid: %s" -#: ../libsoup/soup-session.c:4252 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "No es pot crear un servidor de TLS sense un certificat TLS" + +#: ../libsoup/soup-server.c:1742 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "No es pot escoltar a l'adreça %s, port %d: " + +#: ../libsoup/soup-session.c:4517 #, c-format -msgid "Could not parse URI '%s'" +msgid "Could not parse URI “%s”" msgstr "No s'ha pogut analitzar l'URI «%s»" -#: ../libsoup/soup-session.c:4289 +#: ../libsoup/soup-session.c:4554 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "No es sap gestionar l'esquema d'URI «%s»" +msgid "Unsupported URI scheme “%s”" +msgstr "L'esquema d'URI «%s» és incompatible" -#: ../libsoup/soup-session.c:4311 +#: ../libsoup/soup-session.c:4576 #, c-format msgid "Not an HTTP URI" msgstr "No és un URI HTTP" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4762 +msgid "The server did not accept the WebSocket handshake." +msgstr "" +"El servidor no ha acceptat la conformitat de la connexió del WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "No es pot importar un objecte que no sigui un sòcol com a SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "No s'ha pogut importar un sòcol existent: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "No es pot importar un sòcol desconnectat" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "S'esperava una conformitat de la connexió del WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Versió del WebSocket no implementada" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Clau del WebSocket invàlida" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "La capçalera «%s» del WebSocket és incorrecta" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Subprotocol del WebSocket no implementat" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "El servidor ha rebutjat la conformitat de la connexió del WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "El servidor ha ignorat la conformitat de la connexió del WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "El servidor ha demanat un protocol no implementat" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "El servidor ha demanat una extensió no implementada" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "El servidor ha enviat una clau «%s» incorrecta" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "El nom d'ordinador és una adreça IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "El nom d'ordinador no és vàlid" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "El nom d'ordinador no té cap domini base" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "No hi ha prou dominis" diff --git a/po/ca@valencia.po b/po/ca@valencia.po index 04aee98f..a8e82407 100644 --- a/po/ca@valencia.po +++ b/po/ca@valencia.po @@ -1,38 +1,41 @@ # Catalan translation for libsoup. # Copyright (C) 2012 Free Software Foundation, Inc. # This file is distributed under the same license as the libsoup package. -# Gil Forcada , 2012, 2013. -# +# Gil Forcada , 2012, 2013, 2014. +# Xavi Ivars , 2015. +# Jordi Serratosa , 2017. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-12 23:07+0100\n" -"PO-Revision-Date: 2012-09-23 17:22+0200\n" -"Last-Translator: Gil Forcada \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2017-10-02 12:16+0000\n" +"PO-Revision-Date: 2017-08-21 23:33+0200\n" +"Last-Translator: Xavi Ivars \n" "Language-Team: Catalan \n" -"Language: ca-XV\n" +"Language: ca-valencia\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bits\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Gtranslator 2.91.5\n" - -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.8.11\n" +"X-Project-Style: gnome\n" + +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:237 msgid "Connection terminated unexpectedly" msgstr "S'ha finalitzat la connexió inesperadament" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" -msgstr "La petició de cerca no és vàlida" +msgstr "La petició de busca no és vàlida" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "No es pot truncar el SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "S'ha tancat inesperadament el flux de xarxa" @@ -40,7 +43,7 @@ msgstr "S'ha tancat inesperadament el flux de xarxa" msgid "Failed to completely cache the resource" msgstr "No s'ha pogut carregar completament el recurs a la memòria cau" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "La memòria intermèdia d'eixida és massa petita" @@ -53,55 +56,123 @@ msgstr "No s'ha pogut analitzar la resposta HTTP" msgid "Unrecognized HTTP response encoding" msgstr "No es reconeix la codificació de la resposta HTTP" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "S'ha cancel·lat l'operació" - -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:387 ../libsoup/soup-message-io.c:1015 msgid "Operation would block" msgstr "L'operació bloquejaria" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:967 ../libsoup/soup-message-io.c:1000 +msgid "Operation was cancelled" +msgstr "S'ha cancel·lat l'operació" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "No s'ha pogut analitzar la petició HTTP" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "No s'ha proporcionat cap URI" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "L'URI «%s» no és vàlid: %s" -#: ../libsoup/soup-session.c:4252 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "No es pot crear un servidor de TLS sense un certificat TLS" + +#: ../libsoup/soup-server.c:1742 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "No es pot escoltar a l'adreça %s, port %d: " + +#: ../libsoup/soup-session.c:4517 #, c-format -msgid "Could not parse URI '%s'" +msgid "Could not parse URI “%s”" msgstr "No s'ha pogut analitzar l'URI «%s»" -#: ../libsoup/soup-session.c:4289 +#: ../libsoup/soup-session.c:4554 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "No es sap gestionar l'esquema d'URI «%s»" +msgid "Unsupported URI scheme “%s”" +msgstr "L'esquema d'URI «%s» és incompatible" -#: ../libsoup/soup-session.c:4311 +#: ../libsoup/soup-session.c:4576 #, c-format msgid "Not an HTTP URI" msgstr "No és un URI HTTP" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4762 +msgid "The server did not accept the WebSocket handshake." +msgstr "" +"El servidor no ha acceptat la conformitat de la connexió del WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "No es pot importar un objecte que no siga un sòcol com a SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "No s'ha pogut importar un sòcol existent: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "No es pot importar un sòcol desconnectat" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "S'esperava una conformitat de la connexió del WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Versió del WebSocket no implementada" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Clau del WebSocket invàlida" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "La capçalera «%s» del WebSocket és incorrecta" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Subprotocol del WebSocket no implementat" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "El servidor ha rebutjat la conformitat de la connexió del WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "El servidor ha ignorat la conformitat de la connexió del WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "El servidor ha demanat un protocol no implementat" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "El servidor ha demanat una extensió no implementada" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "El servidor ha enviat una clau «%s» incorrecta" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "El nom d'ordinador és una adreça IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "El nom d'ordinador no és vàlid" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "El nom d'ordinador no té cap domini base" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "No hi ha prou dominis" diff --git a/po/cs.po b/po/cs.po index 3deeec02..e066de4d 100644 --- a/po/cs.po +++ b/po/cs.po @@ -1,39 +1,39 @@ # Czech translation for libsoup. # Copyright (C) 2012 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. -# Marek Černocký , 2012, 2013. +# Marek Černocký , 2012, 2013, 2014, 2015, 2016, 2018. # msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-02-19 11:21+0100\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-02-22 10:25+0100\n" "Last-Translator: Marek Černocký \n" -"Language-Team: Czech \n" +"Language-Team: čeština \n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -"X-Generator: Gtranslator 2.91.6\n" +"X-Generator: Gtranslator 2.91.7\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Připojení bylo neočekávaně ukončeno" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Neplatný požadavek na posun" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "Nelze zkrátit SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Síťový proud byl neočekávaně uzavřen" @@ -41,13 +41,12 @@ msgstr "Síťový proud byl neočekávaně uzavřen" msgid "Failed to completely cache the resource" msgstr "Selhalo úplné uložení prostředku do mezipaměti" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Výstupní vyrovnávací paměť je příliš malá" #: ../libsoup/soup-message-client-io.c:41 -#| msgid "Could not parse URI '%s'" msgid "Could not parse HTTP response" msgstr "Nelze zpracovat odpověď HTTP" @@ -55,56 +54,126 @@ msgstr "Nelze zpracovat odpověď HTTP" msgid "Unrecognized HTTP response encoding" msgstr "Nerozpoznáno kódování odpovědi HTTP" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Operace byla zrušena" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Hlavička je příliš velká" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "Operace by blokovala" -#: ../libsoup/soup-message-server-io.c:40 -#| msgid "Could not parse URI '%s'" +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Operace byla zrušena" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Nelze zpracovat požadavek HTTP" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Není poskytnuta žádná adresa URI" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "Neplatná adresa URI „%s“: %s" -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Nelze vytvořit server TLS bez certifikátu TLS" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Could not parse URI '%s'" +msgid "Could not listen on address %s, port %d: " +msgstr "Nelze naslouchat na adrese %s, portu %d: " + +#: ../libsoup/soup-session.c:4524 +#, c-format +msgid "Could not parse URI “%s”" msgstr "Nelze zpracovat adresu URI „%s“" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" +msgid "Unsupported URI scheme “%s”" msgstr "Nepodporované schéma URI „%s“" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Nejedná se o adresu HTTP URI" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Server nepřijímá vyjednávání WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Nelze naimportovat ne-soket jako SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Nelze naimportovat stávající soket: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Nelze naimportovat nepřipojený soket" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Očekáváno vyjednávání WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Nepodporovaná verze protokolu WebSocket" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Neplatný klíč WebSocket" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Nesprávná hlavička „%s“ protokolu WebSocket" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Nepodporovaný podprotokol protokolu WebSocket" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Server odmítl vyjednávání WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Server ignoruje vyjednávání WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Server požaduje nepodporovaný protokol" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Server požaduje nepodporované rozšíření" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Server vrátil nesprávný klíč „%s“" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Název počítače je adresa IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Neplatný název počítače" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Název počítače nemá základní doménu" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Nedostatek domén" diff --git a/po/da.po b/po/da.po index fc187292..68f28e34 100644 --- a/po/da.po +++ b/po/da.po @@ -1,16 +1,17 @@ # Danish translation for libsoup. -# Copyright (C) 2013 libsoup's COPYRIGHT HOLDER +# Copyright (C) 2013-15, 2018 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. -# Ask Hjorth Larsen , 2012. +# Ask Hjorth Larsen , 2012, 2014-15, 2018. # Joe Hansen (joedalton2@yahoo.dk), 2013. # msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-12 23:14+0100\n" -"PO-Revision-Date: 2013-03-12 18:15+0200\n" -"Last-Translator: Joe Hansen \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-03-06 23:20+0100\n" +"Last-Translator: Ask Hjorth Larsen \n" "Language-Team: Danish \n" "Language: da\n" "MIME-Version: 1.0\n" @@ -18,22 +19,22 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Forbindelsen blev uventet afbrudt" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Ugyldig søgeforespørgsel" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "Kan ikke afkorte SoupBodyInputStream" # evt. Netværksstrømmen -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Netværksudsendelsen blev uventet lukket ned" @@ -41,7 +42,7 @@ msgstr "Netværksudsendelsen blev uventet lukket ned" msgid "Failed to completely cache the resource" msgstr "Kunne ikke lave fuldt mellemlager for ressourcen" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Outputbuffer er for lille" @@ -54,55 +55,126 @@ msgstr "Kunne ikke fortolke HTTP-svar" msgid "Unrecognized HTTP response encoding" msgstr "Ej genkendt HTTP-svarkodning" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Operationen blev annulleret" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Teksthovedet er for stort" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "Operationen ville blokere" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Operationen blev annulleret" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Kunne ikke fortolke HTTP-forespørgsel" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Ingen URI givet" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 +#, c-format +msgid "Invalid “%s” URI: %s" +msgstr "Ugyldig “%s”-URI: %s" + +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Kan ikke oprette en TLS-server uden et TLS-certifikat" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "Ugyldig \"%s\"-URI: %s" +msgid "Could not listen on address %s, port %d: " +msgstr "Kunne ikke lytte på adresse %s, port %d: " -#: ../libsoup/soup-session.c:4252 +#: ../libsoup/soup-session.c:4524 #, c-format -msgid "Could not parse URI '%s'" -msgstr "Kunne ikke fortolke URI \"%s\"" +msgid "Could not parse URI “%s”" +msgstr "Kunne ikke fortolke URI “%s”" -#: ../libsoup/soup-session.c:4289 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "Uunderstøttet URI-skema \"%s\"" +msgid "Unsupported URI scheme “%s”" +msgstr "Uunderstøttet URI-skema “%s”" -#: ../libsoup/soup-session.c:4311 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Ikke en HTTP URI" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Serveren accepterede ikke WebSocket-håndtrykket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Kan ikke importere ikke-sokkel som SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Kunne ikke importere eksisterende sokkel: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Kan ikke importere uforbundet sokkel" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "WebSocket-håndtryk forventet" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Version af WebSocket understøttes ikke" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Igyldig WebSocket-nøgle" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Forkert “%s”-header for WebSocket" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Underprotokol for WebSocket understøttes ikke" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Serveren afviste WebSocket-håndtryk" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Serveren ignorerede WebSocket-håndtryk" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Serveren forespurgte om en protokol som ikke understøttes" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Serveren forespurgte om en udvidelse som ikke understøttes" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Serveren returnerede forkert “%s”-nøgle" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Værtsnavn er en IP-adresse" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Ugyldigt værtsnavn" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Værtsnavnet har intet basisdomæne" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Ikke nok domæner" diff --git a/po/de.po b/po/de.po index cdb26022..ecc3c10b 100644 --- a/po/de.po +++ b/po/de.po @@ -2,40 +2,41 @@ # Copyright (C) 2012 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. # Tobias Endrigkeit , 2012. -# Mario Blättermann , 2012, 2013. +# Mario Blättermann , 2012-2013, 2016, 2018. # Andre Jonas , 2013. +# Bernd Homuth , 2015. # msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-03-03 21:07+0100\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-02-18 14:09+0100\n" "Last-Translator: Mario Blättermann \n" -"Language-Team: Deutsch >\n" +"Language-Team: Deutsch \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Gtranslator 2.91.6\n" +"X-Generator: Poedit 2.0.6\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Die Verbindung wurde unerwartet beendet" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Ungültige Suchanfrage" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "SoupBodyInputStream konnte nicht abgeschnitten werden" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Netzwerk-Stream wurde unerwartet geschlossen" @@ -43,7 +44,7 @@ msgstr "Netzwerk-Stream wurde unerwartet geschlossen" msgid "Failed to completely cache the resource" msgstr "Das vollständige Zwischenspeichern der Ressource ist fehlgeschlagen" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Der Ausgabe-Zwischenspeicher ist zu klein" @@ -56,55 +57,126 @@ msgstr "HTTP-Antwort konnte nicht verarbeitet werden" msgid "Unrecognized HTTP response encoding" msgstr "Unbekannte Kodierung der HTTP-Antwort" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Der Vorgang wurde abgebrochen" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Kopf ist zu groß" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "Der Vorgang würde gestoppt werden" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Der Vorgang wurde abgebrochen" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "HTTP-Anfrage konnte nicht verarbeitet werden" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" -msgstr "Keine Adresse wurde bereitgestellt" +msgstr "Es wurde keine Adresse bereitgestellt" + +#: ../libsoup/soup-request.c:151 +#, c-format +msgid "Invalid “%s” URI: %s" +msgstr "Ungültige »%s«-Adresse: %s" + +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "TLS-Server kann nicht ohne TLS-Zertifikat erstellt werden" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "Ungültige »%s« Adresse: %s" +msgid "Could not listen on address %s, port %d: " +msgstr "Auf Adresse %s, Port %d kann nicht gehört werden: " -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-session.c:4524 #, c-format -msgid "Could not parse URI '%s'" +msgid "Could not parse URI “%s”" msgstr "Die Adresse »%s« konnte nicht verarbeitet werden" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" +msgid "Unsupported URI scheme “%s”" msgstr "Nicht unterstütztes Adressenschema »%s«" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Keine HTTP-Adresse" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Der Server hat den WebSocket-Handshake nicht angenommen." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Nicht-Socket kann nicht als SoupSocket importiert werden" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Bestehendes Socket konnte nicht importieren werden: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Unverbundenes Socket kann nicht importiert werden" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "WebSocket-Handshale erwartet" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Nicht unterstütze WebSocket-Version" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Ungültiger WebSocket-Schlüssel" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Falscher WebSocket »%s«-Kopf" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Nicht unterstütztes WebSocket-Subprotokoll" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Server lehnte WebSocket-Handshake ab" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Server ignorierte WebSocket-Handshake" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Server forderte nicht unterstütztes Protokoll an" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Server forderte nicht unterstützte Erweiterung an" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Server gab falschen »%s«-Schlüssel zurück" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Der Rechnername ist eine IP-Adresse" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Ungültiger Rechnername" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Der Rechnername hat keine Hauptdomäne" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Nicht genug Domänen" diff --git a/po/el.po b/po/el.po index d71f863d..d72673da 100644 --- a/po/el.po +++ b/po/el.po @@ -3,52 +3,53 @@ # This file is distributed under the same license as the libsoup package. # Tom Tryfonidis , 2012. # Dimitris Spingos (Δημήτρης Σπίγγος) , 2013. +# Efstathios Iosifidis , 2018. +# msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libsou" -"p&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-03-09 11:44+0300\n" -"Last-Translator: Dimitris Spingos (Δημήτρης Σπίγγος) \n" -"Language-Team: team@gnome.gr\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-02-20 22:19+0200\n" +"Last-Translator: Efstathios Iosifidis \n" +"Language-Team: Ελληνικά <>\n" "Language: el\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Virtaal 0.7.1\n" +"X-Generator: Gtranslator 2.91.7\n" "X-Project-Style: gnome\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Η σύνδεση τερματίστηκε απρόσμενα" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Άκυρη αίτηση αναζήτησης" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "Αδυναμία περικοπής του SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" -msgstr "Η ροή του δικτύου έκλεισε αναπάντεχα" +msgstr "Η ροή του δικτύου έκλεισε απρόσμενα" #: ../libsoup/soup-cache-input-stream.c:291 msgid "Failed to completely cache the resource" msgstr "Αποτυχία πλήρους απόκρυψης του πόρου" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Η ενδιάμεση μνήμη εξόδου είναι πολύ μικρή" #: ../libsoup/soup-message-client-io.c:41 -#| msgid "Could not parse URI '%s'" msgid "Could not parse HTTP response" msgstr "Αδυναμία ανάλυσης της απάντησης HTTP" @@ -56,56 +57,126 @@ msgstr "Αδυναμία ανάλυσης της απάντησης HTTP" msgid "Unrecognized HTTP response encoding" msgstr "Μη αναγνωρίσιμη κωδικοποίηση απάντησης HTTP" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Η λειτουργία ακυρώθηκε" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Η επικεφαλίδα είναι πολύ μεγάλη" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "Η λειτουργία θα μπλοκαριστεί" -#: ../libsoup/soup-message-server-io.c:40 -#| msgid "Could not parse URI '%s'" +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Η λειτουργία ακυρώθηκε" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Αδυναμία ανάλυσης αιτήματος HTTP" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Δεν έχει δοθεί URI" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 +#, c-format +msgid "Invalid “%s” URI: %s" +msgstr "Μη έγκυρο «%s» URI: %s" + +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Αδύνατη η δημιουργία ενός διακομιστή TLS χωρίς πιστοποιητικό TLS" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "Μη έγκυρο '%s' URI: %s" +msgid "Could not listen on address %s, port %d: " +msgstr "Αδυναμία ακρόασης στη διεύθυνση %s, θύρα %d: " -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-session.c:4524 #, c-format -msgid "Could not parse URI '%s'" -msgstr "Αδυναμία ανάλυσης URI '%s'" +msgid "Could not parse URI “%s”" +msgstr "Αδυναμία ανάλυσης URI «%s»" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "Μη υποστηριζόμενο URI σχήμα '%s'" +msgid "Unsupported URI scheme “%s”" +msgstr "Μη υποστηριζόμενο σχήμα URI «%s»" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" -msgstr "Δεν είναι URI HTTP" +msgstr "Δεν είναι HTTP URI" + +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Ο διακομιστής δεν αποδέχεται τη χειραψία WebSocket" + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Αδύνατη η εισαγωγή μιας μη υποδοχής ως SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Αδυναμία εισαγωγής υπάρχουσας υποδοχής" + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Αδύνατη η εισαγωγή μιας μη συνδεμένης υποδοχής" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Αναμένεται χειραψία WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Η έκδοση WebSocket δεν υποστηρίζεται" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Μη έγκυρο κλειδί κρυπτογράφησης WebSocket" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Εσφαλμένη κεφαλίδα WebSocket «%s»" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Το υποπρωτόκολλο WebSocket δεν υποστηρίζεται" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Ο διακομιστής απέρριψε την χειραψία WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Ο διακομιστής αγνόησε την χειραψία WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Ο διακομιστής αιτήθηκε ένα μη υποστηριζόμενο πρωτόκολλο" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Ο διακομιστής αιτήθηκε μια μη υποστηριζόμενη επέκταση" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Ο διακομιστής επέστρεψε ένα εσφαλμένο κλειδί «%s»" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" -msgstr "Το όνομα συστήματος είναι μια διεύθυνση IP" +msgstr "Το όνομα κεντρικού υπολογιστή είναι μια διεύθυνση IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" -msgstr "Μη έγκυρο όνομα συστήματος" +msgstr "Μη έγκυρο όνομα κεντρικού υπολογιστή" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" -msgstr "Το όνομα συστήματος δεν έχει βασικό τομέα" +msgstr "Το όνομα κεντρικού υπολογιστή δεν έχει βασικό τομέα" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Δεν υπάρχουν αρκετοί τομείς" diff --git a/po/en_GB.po b/po/en_GB.po index 1331d1e7..ac6df729 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -8,9 +8,9 @@ msgstr "" "Project-Id-Version: libsoup master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2012-09-10 19:10+0000\n" -"PO-Revision-Date: 2012-09-10 21:39-0400\n" -"Last-Translator: Chris Leonard \n" +"POT-Creation-Date: 2016-04-25 20:57+0000\n" +"PO-Revision-Date: 2016-09-18 12:16+0200\n" +"Last-Translator: David King \n" "Language-Team: Sugar Labs\n" "Language: en_GB\n" "MIME-Version: 1.0\n" @@ -20,65 +20,157 @@ msgstr "" "X-Generator: Virtaal 0.7.0\n" "X-Project-Style: gnome\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:235 msgid "Connection terminated unexpectedly" msgstr "Connection terminated unexpectedly" -#: ../libsoup/soup-body-input-stream.c:461 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "Invalid seek request" -#: ../libsoup/soup-body-input-stream.c:489 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr "Cannot truncate SoupBodyInputStream" +#: ../libsoup/soup-cache-input-stream.c:74 +msgid "Network stream unexpectedly closed" +msgstr "Network stream unexpectedly closed" + +#: ../libsoup/soup-cache-input-stream.c:291 +msgid "Failed to completely cache the resource" +msgstr "Failed to completely cache the resource" + #: ../libsoup/soup-converter-wrapper.c:192 #, c-format msgid "Output buffer is too small" msgstr "Output buffer is too small" -#: ../libsoup/soup-message-io.c:818 ../libsoup/soup-message-io.c:854 -msgid "Operation was cancelled" -msgstr "Operation was cancelled" +#: ../libsoup/soup-message-client-io.c:41 +msgid "Could not parse HTTP response" +msgstr "Could not parse HTTP response" -#: ../libsoup/soup-message-io.c:865 +#: ../libsoup/soup-message-client-io.c:66 +msgid "Unrecognized HTTP response encoding" +msgstr "Unrecognised HTTP response encoding" + +#: ../libsoup/soup-message-io.c:392 ../libsoup/soup-message-io.c:1020 msgid "Operation would block" msgstr "Operation would block" -#: ../libsoup/soup-request.c:142 +#: ../libsoup/soup-message-io.c:972 ../libsoup/soup-message-io.c:1005 +msgid "Operation was cancelled" +msgstr "Operation was cancelled" + +#: ../libsoup/soup-message-server-io.c:64 +msgid "Could not parse HTTP request" +msgstr "Could not parse HTTP request" + +#: ../libsoup/soup-request.c:140 #, c-format msgid "No URI provided" msgstr "No URI provided" -#: ../libsoup/soup-request.c:152 +#: ../libsoup/soup-request.c:150 #, c-format msgid "Invalid '%s' URI: %s" msgstr "Invalid '%s' URI: %s" -#: ../libsoup/soup-requester.c:219 +#: ../libsoup/soup-server.c:1720 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "Can't create a TLS server without a TLS certificate" + +#: ../libsoup/soup-server.c:1737 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "Could not listen on address %s, port %d: " + +#: ../libsoup/soup-session.c:4543 #, c-format msgid "Could not parse URI '%s'" msgstr "Could not parse URI '%s'" -#: ../libsoup/soup-requester.c:253 +#: ../libsoup/soup-session.c:4580 #, c-format msgid "Unsupported URI scheme '%s'" msgstr "Unsupported URI scheme '%s'" -#: ../libsoup/soup-tld.c:154 +#: ../libsoup/soup-session.c:4602 +#, c-format +msgid "Not an HTTP URI" +msgstr "Not an HTTP URI" + +#: ../libsoup/soup-session.c:4788 +msgid "The server did not accept the WebSocket handshake." +msgstr "The server did not accept the WebSocket handshake." + +#: ../libsoup/soup-socket.c:148 +msgid "Can't import non-socket as SoupSocket" +msgstr "Can't import non-socket as SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Could not import existing socket: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can't import unconnected socket" +msgstr "Can't import unconnected socket" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "WebSocket handshake expected" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Unsupported WebSocket version" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Invalid WebSocket key" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket \"%s\" header" +msgstr "Incorrect WebSocket \"%s\" header" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Unsupported WebSocket subprotocol" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Server rejected WebSocket handshake" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Server ignored WebSocket handshake" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Server requested unsupported protocol" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Server requested unsupported extension" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect \"%s\" key" +msgstr "Server returned incorrect \"%s\" key" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Hostname is an IP address" -#: ../libsoup/soup-tld.c:175 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Invalid hostname" -#: ../libsoup/soup-tld.c:204 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Hostname has no base domain" -#: ../libsoup/soup-tld.c:226 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Not enough domains" diff --git a/po/eo.po b/po/eo.po index c1550eef..678e12f8 100644 --- a/po/eo.po +++ b/po/eo.po @@ -1,74 +1,180 @@ # Esperanto translation for libsoup. # Copyright (C) 2012 Free Software Foundation, Inc. # This file is distributed under the same license as the libsoup package. -# Kristjan SCHMIDT , 2012. -# +# Kristjan SCHMIDT , 2012, 2017. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2012-07-31 00:03+0000\n" -"PO-Revision-Date: 2012-08-01 19:57+0200\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?product=libsou" +"p&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2017-02-23 10:17+0000\n" +"PO-Revision-Date: 2017-06-11 12:37+0200\n" "Last-Translator: Kristjan SCHMIDT \n" -"Language-Team: Esperanto \n" +"Language-Team: Esperanto \n" "Language: eo\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Virtaal 0.7.1\n" +"X-Project-Style: gnome\n" -#: ../libsoup/soup-body-input-stream.c:136 -#: ../libsoup/soup-body-input-stream.c:167 -#: ../libsoup/soup-body-input-stream.c:200 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:235 msgid "Connection terminated unexpectedly" -msgstr "La konekto estas neatendite fermita." +msgstr "La konekto estas neatendite fermita" -#: ../libsoup/soup-converter-wrapper.c:191 +#: ../libsoup/soup-body-input-stream.c:459 +msgid "Invalid seek request" +msgstr "Nevalida serĉ-peto" + +#: ../libsoup/soup-body-input-stream.c:487 +msgid "Cannot truncate SoupBodyInputStream" +msgstr "Ne eblas trunki SoupBodyInputStream-on" + +#: ../libsoup/soup-cache-input-stream.c:76 +msgid "Network stream unexpectedly closed" +msgstr "Reta fluo neatatendite fermiĝis" + +#: ../libsoup/soup-cache-input-stream.c:291 +msgid "Failed to completely cache the resource" +msgstr "" + +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "La elig-bufro estas tro malgranda" -#: ../libsoup/soup-message-io.c:817 ../libsoup/soup-message-io.c:853 +#: ../libsoup/soup-message-client-io.c:41 +#| msgid "Could not parse URI '%s'" +msgid "Could not parse HTTP response" +msgstr "Ne eblis analizi HTTP-respondon" + +#: ../libsoup/soup-message-client-io.c:66 +msgid "Unrecognized HTTP response encoding" +msgstr "" + +#: ../libsoup/soup-message-io.c:392 ../libsoup/soup-message-io.c:1020 +msgid "Operation would block" +msgstr "La operacio estus haltigota" + +#: ../libsoup/soup-message-io.c:972 ../libsoup/soup-message-io.c:1005 msgid "Operation was cancelled" msgstr "La operacio estas ĉesigita" -#: ../libsoup/soup-message-io.c:864 -msgid "Operation would block" -msgstr "La operacio estus haltigota." +#: ../libsoup/soup-message-server-io.c:64 +#| msgid "Could not parse URI '%s'" +msgid "Could not parse HTTP request" +msgstr "Ne eblis analizi HTTP-peton" -#: ../libsoup/soup-request.c:142 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Neniu URI estas diponigita" -#: ../libsoup/soup-request.c:152 +#: ../libsoup/soup-request.c:151 +#, c-format +#| msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" +msgstr "Nevalida “%s” URI: %s" + +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "Nevalida '%s' URI: %s" +msgid "Could not listen on address %s, port %d: " +msgstr "" -#: ../libsoup/soup-requester.c:219 +#: ../libsoup/soup-session.c:4518 #, c-format -msgid "Could not parse URI '%s'" -msgstr "Ne eblis analizi na URI '%s'" +#| msgid "Could not parse URI '%s'" +msgid "Could not parse URI “%s”" +msgstr "Ne eblis analizi na URI “%s”" -#: ../libsoup/soup-requester.c:253 +#: ../libsoup/soup-session.c:4555 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "Nesuptenata URI-skemo '%s'" +#| msgid "Unsupported URI scheme '%s'" +msgid "Unsupported URI scheme “%s”" +msgstr "Nesubtenata URI-skemo “%s”" -#: ../libsoup/soup-tld.c:148 +#: ../libsoup/soup-session.c:4577 +#, c-format +msgid "Not an HTTP URI" +msgstr "" + +#: ../libsoup/soup-session.c:4763 +msgid "The server did not accept the WebSocket handshake." +msgstr "" + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "" + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Nesubtenata WebSocket-versio" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Nevalida WebSocket-ŝlosilo" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Servilo petis nesubtenatan protokolon" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Servilo redonis malĝustan ŝlosilon “%s”" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "La komputilnomo estas IP-adreso" -#: ../libsoup/soup-tld.c:169 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Nevalida komputilnomo" -#: ../libsoup/soup-tld.c:184 ../libsoup/soup-tld.c:226 -msgid "Not enough domains" -msgstr "Ne sufiĉe da retregionoj" - -#: ../libsoup/soup-tld.c:204 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "La komputilnomo ne havas ĉefan retregionon" + +#: ../libsoup/soup-tld.c:304 +msgid "Not enough domains" +msgstr "Ne sufiĉe da retregionoj" diff --git a/po/es.po b/po/es.po index 8cac889c..a9158d77 100644 --- a/po/es.po +++ b/po/es.po @@ -2,39 +2,39 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. -# Daniel Mustieles , 2012, 2013. +# Daniel Mustieles , 2012, 2013, 2014, 2015, 2016, 2018. # msgid "" msgstr "" "Project-Id-Version: libsoup\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-02-19 12:33+0100\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-02-21 17:30+0100\n" "Last-Translator: Daniel Mustieles \n" -"Language-Team: Español \n" -"Language: \n" +"Language-Team: es \n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n!=1);\n" -"X-Generator: Gtranslator 2.91.5\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Gtranslator 2.91.6\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "La conexión terminó inesperadamente" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Petición de búsqueda no válida" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "No se puede truncar SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "El flujo de red se cerró inesperadamente" @@ -42,7 +42,7 @@ msgstr "El flujo de red se cerró inesperadamente" msgid "Failed to completely cache the resource" msgstr "Falló al cachear completamente el recurso" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "El búfer de salida es demasiado pequeño" @@ -55,55 +55,126 @@ msgstr "No se pudo analizar la respuesta HTTP" msgid "Unrecognized HTTP response encoding" msgstr "Codificación de la respuesta HTTP no reconocida" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Se canceló la operación" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "La cabecera es demasiado grande" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "La operación se bloqueará" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Se canceló la operación" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "No se pudo analizar la solicitud HTTP" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "No se ha proporcionado un URI" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "URI «%s» no válida: %s" -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "No se puede crear un servidor TLS sin un certificado TLS" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Could not parse URI '%s'" +msgid "Could not listen on address %s, port %d: " +msgstr "No se puede escuchar en la dirección %s, puerto %d: " + +#: ../libsoup/soup-session.c:4524 +#, c-format +msgid "Could not parse URI “%s”" msgstr "No se pudo analizar el URI «%s»" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "Esquema %s de URI no soportado" +msgid "Unsupported URI scheme “%s”" +msgstr "Esquema «%s» de URI no soportado" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "No es un URI HTTP" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "El servidor no ha aceptado la negociación WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "No se puede importar algo que no es un socket como SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "No se pudo importar el socket existente: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "No se puede importar un socket no conectado" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Se esperaba la negociación WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Versión de Websocket no soportada" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Clave de WebSocket no válida" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Cabecera «%s» de WebSocket no válida" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Subprotocolo de WebSocket no válido" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "El servidor ha rechazado la negociación de WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "El servidor ha ignorado la negociación de WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "El servidor ha solicitado un protocolo no soportado" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "El servidor ha solicitado una extensión no soportada" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "El servidor ha devuelto una clave «%s» incorrecta" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "El nombre del equipo es una dirección IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "El nombre del equipo no es válido" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "El nombre del equipo no tiene un dominio base" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "No hay suficientes dominios" diff --git a/po/et.po b/po/et.po index b57ce405..8a3ac39c 100644 --- a/po/et.po +++ b/po/et.po @@ -2,84 +2,179 @@ # Copyright (C) 2012 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. # Mattias Põldaru , 2012, 2013. +# Mart Raudsepp , 2018. # msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-03-12 16:51+0000\n" -"PO-Revision-Date: 2013-03-12 22:43+0300\n" -"Last-Translator: Mattias Põldaru \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-02-14 03:02+0200\n" +"Last-Translator: Mart Raudsepp \n" "Language-Team: Estonian \n" "Language: et\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 2.0.6\n" +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Ühendus katkes ootamatult" +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" -msgstr "Sobimatu kerimise päring" +msgstr "Sobimatu kerimispäring" +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "SoupBodyInputStream-i pole võimalik lühendada" +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Võrguvoog sulgus ootamatult" +#: ../libsoup/soup-cache-input-stream.c:291 msgid "Failed to completely cache the resource" msgstr "Ressursi täielik puhverdamine nurjus" +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Väljundpuhver on liiga väike" +#: ../libsoup/soup-message-client-io.c:41 msgid "Could not parse HTTP response" msgstr "HTTP vastust polnud võimalik parsida" +#: ../libsoup/soup-message-client-io.c:66 msgid "Unrecognized HTTP response encoding" msgstr "Tundmatu HTTP vastuse kodeering" -msgid "Operation was cancelled" -msgstr "Operatsioon katkestati" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Päis on liiga suur" +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "Operatsioon blokeeruks" +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Operatsioon katkestati" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "HTTP päringut polnud võimalik parsida" +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "URI-d ei antud" +#: ../libsoup/soup-request.c:151 +#, c-format +msgid "Invalid “%s” URI: %s" +msgstr "Sobimatu „%s“ URI: %s" + +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "TLS serverit pole võimalik luua ilma TLS sertifikaadita" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "Sobimatu '%s' URI: %s" +msgid "Could not listen on address %s, port %d: " +msgstr "Aadressi %s pordil %d polnud võimalik kuulata: " +#: ../libsoup/soup-session.c:4524 #, c-format -msgid "Could not parse URI '%s'" -msgstr "URI-d '%s' polnud võimalik parsida" +msgid "Could not parse URI “%s”" +msgstr "URI-d „%s“ polnud võimalik parsida" +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "URI skeem pole toetatud '%s'" +msgid "Unsupported URI scheme “%s”" +msgstr "URI skeem „%s“ pole toetatud" +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Pole HTTP URI" +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Server ei nõustunud WebSocket kätlusega." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Mitte-soklit pole võimalik importida SoupSocket'ina" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Olemasoleva sokli import ebaõnnestus: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Ühendamata soklit pole võimalik importida" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "WebSocket kätlus on eeldatud" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Toetamata WebSocket versioon" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Sobimatu WebSocket võti" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Vigane WebSocket „%s“ päis" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Toetamata WebSocket alamprotokoll" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Server keeldus WebSocket kätlusest" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Server eiras WebSocket kätlust" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Server küsis toetamata protokolli" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Server küsis toetamata laiendust" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Server tagastas vigase „%s“ võtme" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Hostinimi on IP-aadress" +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Sobimatu hostinimi" +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Hostinimel puudub baasdomeen" +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Pole piisavalt domeene" diff --git a/po/eu.po b/po/eu.po index 28bbd393..81ae38e0 100644 --- a/po/eu.po +++ b/po/eu.po @@ -1,33 +1,36 @@ +# Basque translation for libsoup. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # -# Iñaki Larrañaga Murgoitio , 2013. +# +# Iñaki Larrañaga Murgoitio , 2013, 2014, 2015, 2017. msgid "" msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-26 11:25+0100\n" -"PO-Revision-Date: 2013-03-24 16:37+0100\n" +"Project-Id-Version: libsoup master\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2016-10-27 12:38+0000\n" +"PO-Revision-Date: 2017-02-16 22:10+0100\n" "Last-Translator: Iñaki Larrañaga Murgoitio \n" -"Language-Team: Basque \n" +"Language-Team: Basque \n" "Language: eu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Lokalize 1.4\n" +"X-Generator: Lokalize 1.5\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:235 msgid "Connection terminated unexpectedly" msgstr "Konexioa ustekabean amaitu da" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "Bilaketa-eskaera baliogabea" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr "Ezin da SoupBodyInputStream trunkatu" @@ -52,15 +55,15 @@ msgstr "Ezin izan da HTTP erantzuna analizatu" msgid "Unrecognized HTTP response encoding" msgstr "HTTP erantzunaren kodeketa ezezaguna" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Eragiketa bertan behera utzi da" - -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:392 ../libsoup/soup-message-io.c:1020 msgid "Operation would block" msgstr "Eragiketak blokea dezake" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:972 ../libsoup/soup-message-io.c:1005 +msgid "Operation was cancelled" +msgstr "Eragiketa bertan behera utzi da" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Ezin izan da HTTP eskaera analizatu" @@ -71,36 +74,112 @@ msgstr "Ez da URIrik eman" #: ../libsoup/soup-request.c:150 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "Baliogabeko '%s' URIa: %s" +#| msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" +msgstr "Baliogabeko “%s“ URIa: %s" -#: ../libsoup/soup-session.c:4252 +#: ../libsoup/soup-server.c:1727 +#| msgid "Can't create a TLS server without a TLS certificate" +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Ezin da TLS zerbitzaria sortu TLS ziurtagirik gabe" + +#: ../libsoup/soup-server.c:1744 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "Ezin izan da '%s:%d' helbidean entzun: " + +#: ../libsoup/soup-session.c:4525 #, c-format -msgid "Could not parse URI '%s'" -msgstr "Ezin izan da '%s' URIa analizatu" +#| msgid "Could not parse URI '%s'" +msgid "Could not parse URI “%s”" +msgstr "Ezin izan da “%s“ URIa analizatu" -#: ../libsoup/soup-session.c:4289 +#: ../libsoup/soup-session.c:4562 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "Onartu gabeko '%s' URI eskema" +#| msgid "Unsupported URI scheme '%s'" +msgid "Unsupported URI scheme “%s”" +msgstr "Onartu gabeko “%s“ URI eskema" -#: ../libsoup/soup-session.c:4311 +#: ../libsoup/soup-session.c:4584 #, c-format msgid "Not an HTTP URI" msgstr "Ez da HTTP URIa" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4770 +msgid "The server did not accept the WebSocket handshake." +msgstr "Zerbitzariak ez du WebSocket diosala onartu" + +#: ../libsoup/soup-socket.c:148 +#| msgid "Can't import non-socket as SoupSocket" +msgid "Can’t import non-socket as SoupSocket" +msgstr "Ezin da SoupSocket bezalako ez-socketa inportatu" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Ezin izan da dagoen socket-a inportatu: " + +#: ../libsoup/soup-socket.c:175 +#| msgid "Can't import unconnected socket" +msgid "Can’t import unconnected socket" +msgstr "Ezin da deskonektatutako socket-a inportatu" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "WebSocket diosala espero zen" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Onartu gabeko WebSocket bertsioa" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Baliogabeko WebSocket gakoa" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +#| msgid "Incorrect WebSocket \"%s\" header" +msgid "Incorrect WebSocket “%s” header" +msgstr "Okerreko “%s“ WebSocket-aren goiburua" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Onartu gabeko WebSocket azpi-protokoloa" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Zerbitzariak ukatu egin du WebSocket diosala" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Zerbitzariak ez ikusi egin dio WebSocket diosalari" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Zerbitzariak onartu gabeko protokoloa eskatu du" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Zerbitzariak onartu gabeko hedapena eskatu du" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +#| msgid "Server returned incorrect \"%s\" key" +msgid "Server returned incorrect “%s” key" +msgstr "Zerbitzariak okerreko “%s“ gakoa itzuli du" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Ostalari-izena IP helbide bat da" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Baliogabeko ostalari-izena" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Ostalari-izenak ez dauka oinarrizko domeinurik" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Ez dago nahikoa domeinurik" + diff --git a/po/fr.po b/po/fr.po index a92665e9..82b1b212 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1,109 +1,183 @@ # French translation for libsoup. -# Copyright (C) 2012 libsoup's COPYRIGHT HOLDER +# Copyright (C) 2012-2017 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. # # Pierre Henry , 2012. # Alain Lojewski , 2012. # Mickael Albertus , 2012. +# Charles Monzat , 2018. # msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-03-12 17:51+0100\n" -"Last-Translator: Claude Paroz \n" -"Language-Team: GNOME French Team \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-03-01 11:53+0100\n" +"Last-Translator: Charles Monzat \n" +"Language-Team: français \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Gtranslator 2.91.7\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "La connexion a été interrompue de manière inattendue" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Requête de recherche invalide" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "Impossible de tronquer le SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" -msgstr "Le flux réseau s'est arrêté inopinément" +msgstr "Le flux réseau s’est arrêté inopinément" #: ../libsoup/soup-cache-input-stream.c:291 msgid "Failed to completely cache the resource" msgstr "Impossible de mettre la ressource totalement en cache" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 +#, c-format msgid "Output buffer is too small" msgstr "La mémoire tampon de sortie est trop petite" #: ../libsoup/soup-message-client-io.c:41 msgid "Could not parse HTTP response" -msgstr "Impossible d'analyser la réponse HTTP" +msgstr "Impossible d’analyser la réponse HTTP" #: ../libsoup/soup-message-client-io.c:66 msgid "Unrecognized HTTP response encoding" msgstr "Codage de réponse HTTP inconnu" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "L'opération a été annulée" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "En-tête trop grand" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" -msgstr "L'opération aurait bloqué" +msgstr "L’opération aurait bloqué" + +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "L’opération a été annulée" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" -msgstr "Impossible d'analyser la requête HTTP" +msgstr "Impossible d’analyser la requête HTTP" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Aucun URI fourni" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "URI « %s » non valide : %s" -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Impossible de créer un serveur TLS sans un certificat TLS" + +#: ../libsoup/soup-server.c:1742 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "Impossible d’écouter l’adresse %s sur le port %d: " + +#: ../libsoup/soup-session.c:4524 #, c-format -msgid "Could not parse URI '%s'" -msgstr "Impossible d'analyser l'URI « %s »" +msgid "Could not parse URI “%s”" +msgstr "Impossible d’analyser l’URI « %s »" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "Le schéma d'URI « %s » n'est pas pris en charge" +msgid "Unsupported URI scheme “%s”" +msgstr "Le schéma d’URI « %s » n’est pas pris en charge" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" -msgstr "Ce n'est pas un URI HTTP" +msgstr "Ce n’est pas un URI HTTP" + +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Le serveur n’a pas accepté la négociation WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Impossible d’importer du contenu non-socket comme SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Impossible d’importer le connecteur réseau existant : " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Impossible d’importer le connecteur réseau non connecté" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Négociation WebSocket attendue" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Version de WebSocket non prise en charge" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Clé WebSocket non valable" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "En-tête WebSocket « %s » incorrect" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Sous-protocole de WebSocket non pris en charge" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Le serveur a rejeté la négociation WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Le serveur a ignoré la négociation WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Le serveur a demandé un protocole non pris en charge" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Le serveur a demandé une extension non prise en charge" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Le serveur a renvoyé une clé « %s » incorrecte" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" -msgstr "Le nom d'hôte est une adresse IP" +msgstr "Le nom d’hôte est une adresse IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" -msgstr "Nom d'hôte non valide" +msgstr "Nom d’hôte non valide" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" -msgstr "Le nom d'hôte n'a pas de domaine de base" +msgstr "Le nom d’hôte n’a pas de domaine de base" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Pas assez de domaines" diff --git a/po/fur.po b/po/fur.po index 04579ca1..437edde4 100644 --- a/po/fur.po +++ b/po/fur.po @@ -6,76 +6,173 @@ msgid "" msgstr "" "Project-Id-Version: libsoup gnome-3-6\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2012-12-10 10:22+0000\n" -"PO-Revision-Date: 2012-12-28 13:53+0100\n" -"Last-Translator: TmTFx \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-02-10 00:41+0100\n" +"Last-Translator: Fabio Tomat \n" "Language-Team: Friulian \n" "Language: fur\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.0.3\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "No si spietave il termin de conession" -#: ../libsoup/soup-body-input-stream.c:461 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Domande di ricerche no valide" -#: ../libsoup/soup-body-input-stream.c:489 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "No puès cjonçâ SoupBodyInputStream" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-cache-input-stream.c:76 +msgid "Network stream unexpectedly closed" +msgstr "Flus di rêt sierât a colp" + +#: ../libsoup/soup-cache-input-stream.c:291 +msgid "Failed to completely cache the resource" +msgstr "Salvament in memorie de risorse falît" + +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Il buffer di jessude al è masse piçul" -#: ../libsoup/soup-message-io.c:818 ../libsoup/soup-message-io.c:854 -msgid "Operation was cancelled" -msgstr "L'operazion a je stade scancelade" +#: ../libsoup/soup-message-client-io.c:41 +msgid "Could not parse HTTP response" +msgstr "Impussibil analizâ la rispueste HTTP" + +#: ../libsoup/soup-message-client-io.c:66 +msgid "Unrecognized HTTP response encoding" +msgstr "Codifiche rispueste HTTP no cognossude" -#: ../libsoup/soup-message-io.c:865 +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Intestazion masse grande" + +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" -msgstr "L'operazion a sarà blocade" +msgstr "L'operazion e sarà blocade" + +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "L'operazion e je stade scancelade" + +#: ../libsoup/soup-message-server-io.c:64 +msgid "Could not parse HTTP request" +msgstr "Impussibil analizâ la richieste HTTP" -#: ../libsoup/soup-request.c:142 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "No'l è stât furnît un URI" -#: ../libsoup/soup-request.c:152 +#: ../libsoup/soup-request.c:151 +#, c-format +msgid "Invalid “%s” URI: %s" +msgstr "URI “%s”no valit: %s" + +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Impussibil creâ un servidôr TLS cence un certificât TLS" + +#: ../libsoup/soup-server.c:1742 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "Impussibil scoltâ te direzion %s, puarte %d: " + +#: ../libsoup/soup-session.c:4524 +#, c-format +msgid "Could not parse URI “%s”" +msgstr "No puès analizâ il URI “%s”" + +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "URI '%s' no valit: %s" +msgid "Unsupported URI scheme “%s”" +msgstr "Scheme URI “%s” no supuartât" -#: ../libsoup/soup-requester.c:219 +#: ../libsoup/soup-session.c:4583 #, c-format -msgid "Could not parse URI '%s'" -msgstr "No puès analizâ l'URI '%s'" +msgid "Not an HTTP URI" +msgstr "No un URI HTTP" + +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Il servidôr nol acete il handshake WebSocket" + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Impussibil impuartâ non-socket come SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Impussibil impuartâ socket esistent: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Impussibil impuartâ socket no conetût" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Si spietave handshake WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Version WebSocket no supuartade" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Clâf WebSocket no valide" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Intestazion WebSocket “%s” no valide" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Sot-protocol WebSocket no supuartât" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Il servidôr al à refudât l'handshake WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Il servidôr al à ignorât l'handshake WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Il servidôr al à domandât un protocol no supuartât" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Il servidôr al à domandât une estension no supuartade" -#: ../libsoup/soup-requester.c:253 +#: ../libsoup/soup-websocket.c:562 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "Scheme URI '%s' no supuartât" +msgid "Server returned incorrect “%s” key" +msgstr "Il servidôr al à tornât la clâf “%s” sbaliade" -#: ../libsoup/soup-tld.c:154 +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Il non host al è un indiriz IP" -#: ../libsoup/soup-tld.c:175 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" -msgstr "Il non host a no'l è valit" +msgstr "Il non host nol è valit" -#: ../libsoup/soup-tld.c:204 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" -msgstr "Il non host a no'l a un domini di base" +msgstr "Il non host nol à un domini di base" -#: ../libsoup/soup-tld.c:226 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "No vonde dominis" diff --git a/po/gd.po b/po/gd.po new file mode 100644 index 00000000..7007ec3f --- /dev/null +++ b/po/gd.po @@ -0,0 +1,186 @@ +# Scottish Gaelic translation for libsoup. +# Copyright (C) 2016 libsoup's COPYRIGHT HOLDER +# This file is distributed under the same license as the libsoup package. +# GunChleoc , 2016, 2018. +msgid "" +msgstr "" +"Project-Id-Version: libsoup master\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?product=libso" +"up&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2017-10-27 08:22+0000\n" +"PO-Revision-Date: 2018-03-01 10:41+0100\n" +"Last-Translator: GunChleoc \n" +"Language-Team: Fòram na Gàidhlig\n" +"Language: gd\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : " +"(n > 2 && n < 20) ? 2 : 3;\n" +"X-Generator: Virtaal 0.7.1\n" +"X-Project-Style: gnome\n" + +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:237 +msgid "Connection terminated unexpectedly" +msgstr "Chaidh crìoch a chur air a’ cheangal gun dùil" + +#: ../libsoup/soup-body-input-stream.c:459 +msgid "Invalid seek request" +msgstr "Iarrtas siridh mì-dhligheach" + +#: ../libsoup/soup-body-input-stream.c:487 +msgid "Cannot truncate SoupBodyInputStream" +msgstr "Chan urrainn dhuinn buntach a dhèanamh air SoupBodyInputStream" + +#: ../libsoup/soup-cache-input-stream.c:76 +msgid "Network stream unexpectedly closed" +msgstr "Chaidh an sreath lìonraidh a dhùnadh gun dùil" + +#: ../libsoup/soup-cache-input-stream.c:291 +msgid "Failed to completely cache the resource" +msgstr "Cha deach leinn an goireas slàn a chur dhan tasgadan" + +#: ../libsoup/soup-converter-wrapper.c:189 +#, c-format +msgid "Output buffer is too small" +msgstr "Tha bufair an às-chuir ro bheag" + +#: ../libsoup/soup-message-client-io.c:41 +msgid "Could not parse HTTP response" +msgstr "Cha b’ urrainn dhuinn an fhreagairt HTTP a pharsadh" + +#: ../libsoup/soup-message-client-io.c:66 +msgid "Unrecognized HTTP response encoding" +msgstr "Cha do dh’aithnich sinn còdachadh an fhreagairt HTTP" + +#: ../libsoup/soup-message-io.c:387 ../libsoup/soup-message-io.c:1015 +msgid "Operation would block" +msgstr "Dhèanadh an t-obrachadh bacadh" + +#: ../libsoup/soup-message-io.c:967 ../libsoup/soup-message-io.c:1000 +msgid "Operation was cancelled" +msgstr "Chaidh sgur dhen obrachadh" + +#: ../libsoup/soup-message-server-io.c:64 +msgid "Could not parse HTTP request" +msgstr "Cha b’ urrainn dhuinn an t-iarrtas HTTP a pharsadh" + +#: ../libsoup/soup-request.c:141 +#, c-format +msgid "No URI provided" +msgstr "Cha deach URI a sholar" + +#: ../libsoup/soup-request.c:151 +#, c-format +#| msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" +msgstr "URI “%s” mì-dhligheach: %s" + +#: ../libsoup/soup-server.c:1725 +#| msgid "Can't create a TLS server without a TLS certificate" +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "" +"Chan urrainn dhuinn frithealaiche TLS a chruthachadh às aonais teisteanais " +"TLS" + +#: ../libsoup/soup-server.c:1742 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "Chan urrainn dhuinn èisteachd ris an t-seòladh %s, port %d: " + +#: ../libsoup/soup-session.c:4517 +#, c-format +#| msgid "Could not parse URI '%s'" +msgid "Could not parse URI “%s”" +msgstr "Cha b’ urrainn dhuinn an URI “%s” a pharsadh" + +#: ../libsoup/soup-session.c:4554 +#, c-format +#| msgid "Unsupported URI scheme '%s'" +msgid "Unsupported URI scheme “%s”" +msgstr "Chan eil taic ri sgeama “%s” an URI" + +#: ../libsoup/soup-session.c:4576 +#, c-format +msgid "Not an HTTP URI" +msgstr "Chan e URI HTTP a th’ ann" + +#: ../libsoup/soup-session.c:4762 +msgid "The server did not accept the WebSocket handshake." +msgstr "Cha do ghabh am frithealaiche ris a’ chrathadh-làimhe WebSocket." + +#: ../libsoup/soup-socket.c:148 +#| msgid "Can't import non-socket as SoupSocket" +msgid "Can’t import non-socket as SoupSocket" +msgstr "Chan urrainn dhuinn nì nach eil ’na shocaid ion-phortadh mar SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Cha b’ urrainn dhuinn socaid a tha ann ion-phortadh: " + +#: ../libsoup/soup-socket.c:175 +#| msgid "Can't import unconnected socket" +msgid "Can’t import unconnected socket" +msgstr "Chan urrainn dhuinn socaid gun cheangal ion-phortadh" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "An dùil air crathadh-làimhe WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Tionndadh dhe WebSocket ris nach cuirear taic" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Iuchair WebSocket mì-dhligheach" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +#| msgid "Incorrect WebSocket \"%s\" header" +msgid "Incorrect WebSocket “%s” header" +msgstr "Bann-cinn WebSocket “%s” nach eil mar bu chòir" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Fo-phròtacal aig WebSocket ris nach cuirear taic" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Dhiùlt am frithealaiche an crathadh-làimhe WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Leig am frithealaiche an crathadh-làimhe WebSocket seachad" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Dh’iarr am frithealaiche pròtacal ris nach cuirear taic" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Dh’iarr am frithealaiche leudachan ris nach cuirear taic" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +#| msgid "Server returned incorrect \"%s\" key" +msgid "Server returned incorrect “%s” key" +msgstr "Thill am frithealaiche iuchair “%s” nach eil mar bu chòir" + +#: ../libsoup/soup-tld.c:188 +msgid "Hostname is an IP address" +msgstr "’S e seòladh IP a tha san ainm-òstair" + +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 +msgid "Invalid hostname" +msgstr "Ainm-òstair mì-dhligheach" + +#: ../libsoup/soup-tld.c:250 +msgid "Hostname has no base domain" +msgstr "Chan eil bun-àrainn aig an ainm-òstair" + +#: ../libsoup/soup-tld.c:304 +msgid "Not enough domains" +msgstr "Chan eil àrainnean gu leòr ann" diff --git a/po/gl.po b/po/gl.po index b2cfc9bb..261f1682 100644 --- a/po/gl.po +++ b/po/gl.po @@ -1,37 +1,39 @@ # Galician translation for libsoup. # Copyright (C) 2012 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. -# Fran Dieguez , 2012, 2013. +# Fran Dieguez , 2012, 2013, 2014, 2015, 2017, 2018. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-20 10:39+0100\n" -"PO-Revision-Date: 2013-02-20 10:40+0200\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?product=libsou" +"p&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-02-10 19:58+0200\n" "Last-Translator: Fran Dieguez \n" -"Language-Team: gnome-l10n-gl@gnome.org\n" +"Language-Team: Galician\n" "Language: gl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Virtaal 0.7.1\n" +"X-Project-Style: gnome\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "A conexión rematou de forma non esperada" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Petición de busca non válida" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "Non é posíbel truncar SoupbodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Fluxo de rede pechado de forma non esperada" @@ -39,7 +41,7 @@ msgstr "Fluxo de rede pechado de forma non esperada" msgid "Failed to completely cache the resource" msgstr "Produciuse un fallo ao cachear completamente o recurso" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "O búfer de saída é demasiado pequeno" @@ -52,55 +54,126 @@ msgstr "Non é posíbel analizar a resposta HTTP" msgid "Unrecognized HTTP response encoding" msgstr "Codificación da resposta HTTP non recoñecida" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "A operación foi cancelada" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Cabeceira demasiado grande" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "A operación bloquearase" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "A operación foi cancelada" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Non é posíbel analizar a consulta HTTP" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Non se forneceu un URI" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "URI «%s» non válida: %s" -#: ../libsoup/soup-session.c:4211 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Non é posíbel crear un servidor TLS sen un certificado TLS" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Could not parse URI '%s'" +msgid "Could not listen on address %s, port %d: " +msgstr "Non é posíbel escoitar no enderezo %s, porto %d: " + +#: ../libsoup/soup-session.c:4524 +#, c-format +msgid "Could not parse URI “%s”" msgstr "Non é posíbel analizar o URI «%s»" -#: ../libsoup/soup-session.c:4248 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" +msgid "Unsupported URI scheme “%s”" msgstr "Esquema de URI «%s» non admitido" -#: ../libsoup/soup-session.c:4270 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Non é unha URI de HTTP" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "O servidor non acepta un saúdo WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Non é posíbel importar un non socket como SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Non é posíbel importar un socket existente: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Non é posíbel importar un socket non conectado" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Agardábase un saúdo WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Versión de WebSocket non admitida" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Chave de WebSocket non válida" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Cabeceira «%s» WebSocket incorrecta" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Subprotocolo WebSocket non compatíbel" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Saúdo WebSocket rexeitado polo servidor" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Saúdo WebSocket ignorado polo servidor" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Protocolo solicitado polo servidor non compatíbel" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Extensión solicitado polo servidor non compatíbel" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Chave «%s» devolta polo servidor incorrecta" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "O nome do computador é un enderezo IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "O nome do computador non é válido" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "O nome do computador non ten un dominio base" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Non hai dominios dabondo" diff --git a/po/gu.po b/po/gu.po index 19d46368..a62920ae 100644 --- a/po/gu.po +++ b/po/gu.po @@ -2,14 +2,14 @@ # Copyright (C) 2012 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. # -# , 2013. +# , 2014. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug." "cgi?product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-03-12 16:21+0530\n" +"POT-Creation-Date: 2014-09-11 21:40+0000\n" +"PO-Revision-Date: 2014-09-12 12:08+0530\n" "Last-Translator: \n" "Language-Team: American English \n" "Language: gu\n" @@ -19,25 +19,25 @@ msgstr "" "X-Generator: Lokalize 1.0\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:196 msgid "Connection terminated unexpectedly" msgstr "જોડાણ અનિચ્છનીય રીતે તૂટી ગયુ" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "અયોગ્ય સીક માંગણી" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr "SoupBodyInputStream કાઢી શકાતુ નથી" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:73 msgid "Network stream unexpectedly closed" msgstr "નેટવર્ક સ્ટ્રીમ અનિચ્છનીય રીતે બંધ થઇ ગઇ" -#: ../libsoup/soup-cache-input-stream.c:291 +#: ../libsoup/soup-cache-input-stream.c:290 msgid "Failed to completely cache the resource" msgstr "સ્ત્રોતને સંપૂર્ણપણે કેશ કરવામાં નિષ્ફળતા" @@ -47,7 +47,6 @@ msgid "Output buffer is too small" msgstr "આઉટપુટ બફર ઘણુ નાનું છે" #: ../libsoup/soup-message-client-io.c:41 -#| msgid "Could not parse URI '%s'" msgid "Could not parse HTTP response" msgstr "HTTP જવાબનું પદચ્છેદન કરી શક્યા નહિં" @@ -55,16 +54,15 @@ msgstr "HTTP જવાબનું પદચ્છેદન કરી શક્ msgid "Unrecognized HTTP response encoding" msgstr "બિનઓળખાયેલ HTTP જવાબ એનકોડીંગ" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 +#: ../libsoup/soup-message-io.c:854 ../libsoup/soup-message-io.c:890 msgid "Operation was cancelled" msgstr "ક્રિયા રદ થયેલ હતી" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:901 msgid "Operation would block" msgstr "ક્રિયા રોકી રખાશે" -#: ../libsoup/soup-message-server-io.c:40 -#| msgid "Could not parse URI '%s'" +#: ../libsoup/soup-message-server-io.c:41 msgid "Could not parse HTTP request" msgstr "HTTP માંગણીનુ પદચ્છેદન કરી શક્યા નહિં" @@ -78,34 +76,55 @@ msgstr "URI પૂરુ પાડેલ નથી" msgid "Invalid '%s' URI: %s" msgstr "અમાન્ય '%s' URI: %s" -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-server.c:1528 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "TLS પ્રમાણપત્ર વગર TLS સર્વરને બનાવી શકાતુ નથી" + +#: ../libsoup/soup-server.c:1547 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "સરનામાં %s પર સાંભળી શક્યા નહિં, પોર્ટ %d: " + +#: ../libsoup/soup-session.c:4466 #, c-format msgid "Could not parse URI '%s'" msgstr "URI '%s' ને પદચ્છેદન કરી શક્યા નહિં" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4503 #, c-format msgid "Unsupported URI scheme '%s'" msgstr "બિનઆધારભૂત URI યોજના '%s'" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4525 #, c-format msgid "Not an HTTP URI" msgstr "HTTP URI નથી" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-socket.c:142 +msgid "Can't import non-socket as SoupSocket" +msgstr "SoupSocket તરીકે બિન-સોકેટને આયાત કરી શકાતુ નથી" + +#: ../libsoup/soup-socket.c:160 +msgid "Could not import existing socket: " +msgstr "હાલનાં સોકેટને આયાત કરી શક્યા નહિં: " + +#: ../libsoup/soup-socket.c:169 +msgid "Can't import unconnected socket" +msgstr "બિનજોડાયેલ સોકેટને આયાત કરી શકાતુ નથી" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "યજમાનનામ એ IP સરનામું છે" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "અમાન્ય યજમાનનામ" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "યજમાન પાસે મૂળ ડોમેઇન નથી" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "પૂરતુ ડોમેઇન નથી" diff --git a/po/he.po b/po/he.po index 7658eed8..6bfc5945 100644 --- a/po/he.po +++ b/po/he.po @@ -2,16 +2,17 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. +# Yosef Or Boczko , 2014. # msgid "" msgstr "" "Project-Id-Version: libsoup gnome\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-21 19:54+0200\n" -"PO-Revision-Date: 2013-02-21 19:55+0200\n" -"Last-Translator: Yaron Shahrabani \n" -"Language-Team: Hebrew \n" -"Language: \n" +"POT-Creation-Date: 2016-11-17 22:36+0200\n" +"PO-Revision-Date: 2016-11-17 22:38+0200\n" +"Last-Translator: Yosef Or Boczko \n" +"Language-Team: עברית <>\n" +"Language: he\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -19,23 +20,23 @@ msgstr "" "X-Poedit-Language: Hebrew\n" "X-Poedit-Country: ISRAEL\n" "X-Poedit-SourceCharset: utf-8\n" +"X-Generator: Gtranslator 2.91.6\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 -#: ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:235 msgid "Connection terminated unexpectedly" msgstr "החיבור הופסק באופן בלתי צפוי" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "בקשת חיפוש שגויה" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "לא ניתן לקצץ את SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "תזרים הרשת נסגר בפתאומיות" @@ -43,7 +44,7 @@ msgstr "תזרים הרשת נסגר בפתאומיות" msgid "Failed to completely cache the resource" msgstr "שמירת המשאב במלואו במטמון נכשלה" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "אוגר הפלט קטן מדי" @@ -56,16 +57,15 @@ msgstr "לא ניתן לנתח את תגובת ה־HTTP" msgid "Unrecognized HTTP response encoding" msgstr "קידוד תגובת ה־HTTP אינו מוכר" -#: ../libsoup/soup-message-io.c:846 -#: ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "הפעולה בוטלה" - -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:392 ../libsoup/soup-message-io.c:1020 msgid "Operation would block" msgstr "הפעולה תיחסם" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:972 ../libsoup/soup-message-io.c:1005 +msgid "Operation was cancelled" +msgstr "הפעולה בוטלה" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "לא ניתן לנתח את תגובת ה־HTTP" @@ -76,37 +76,103 @@ msgstr "לא סופקה כתובת" #: ../libsoup/soup-request.c:150 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "כתובת '%s' שגויה: %s" +msgid "Invalid “%s” URI: %s" +msgstr "כתובת „%s” שגויה: %s" + +#: ../libsoup/soup-server.c:1727 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "לא ניתן ליצור שרות TLS ללא תעודת TLS" -#: ../libsoup/soup-session.c:4211 +#: ../libsoup/soup-server.c:1744 #, c-format -msgid "Could not parse URI '%s'" -msgstr "לא ניתן לנתח את הכתובת '%s'" +msgid "Could not listen on address %s, port %d: " +msgstr "לא ניתן להאזין לכתובת %s, פתחה %d:" -#: ../libsoup/soup-session.c:4248 +#: ../libsoup/soup-session.c:4525 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "תבנית הכתובת אינה נתמכת '%s'" +msgid "Could not parse URI “%s”" +msgstr "לא ניתן לנתח את הכתובת „%s”" -#: ../libsoup/soup-session.c:4270 +#: ../libsoup/soup-session.c:4562 +#, c-format +msgid "Unsupported URI scheme “%s”" +msgstr "תבנית הכתובת אינה נתמכת „%s”" + +#: ../libsoup/soup-session.c:4584 #, c-format msgid "Not an HTTP URI" msgstr "כתובת שאינה HTTP" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4770 +msgid "The server did not accept the WebSocket handshake." +msgstr "השרת לא קיבל את לחיצת היד של ה־WebSocket" + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "לא ניתן לייבא לא-שקע כ־SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "לא ניתן לייבא שקע קיים:" + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "לא ניתן לייבא שקע לא מחובר" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "צפויה לחיצת יד מה־WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "גרסת WebSocket לא נתמכת" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "מפתח WebSocket לא חוקי" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "כותר WebSocket ‏„%s” שגוי" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "פרוטוקול WebSocket לא נתמך" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "השרת דחה את לחיצת היד של ה־WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "השרת התעלם מלחיצת היד של ה־WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "השרת דורש פרוטוקול לא נתמך" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "השרת דורש הרחבה לא נתמכת" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "השרת מחזיר מפתח „%s” שגוי" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "שם המארח הוא כתובת IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "שם מארח שגוי" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "לשם המארח אין שם מתחם בסיסי" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "אין מספיק שמות מתחם" - diff --git a/po/hi.po b/po/hi.po index de85b345..cff07c65 100644 --- a/po/hi.po +++ b/po/hi.po @@ -4,14 +4,15 @@ # 1 <1>, 2012. # 1 Pratibha kumari <1pratibharoshan1526@gmail.com>, 2012. # raj , 2013. +# rajesh , 2014. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-03-20 16:47+0530\n" -"Last-Translator: raj \n" +"POT-Creation-Date: 2014-09-19 21:50+0000\n" +"PO-Revision-Date: 2014-09-22 15:47+0630\n" +"Last-Translator: rajesh \n" "Language-Team: Hindi \n" "Language: hi\n" "MIME-Version: 1.0\n" @@ -21,25 +22,25 @@ msgstr "" "X-Generator: Lokalize 1.5\n" "X-Project-Style: gnome\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:196 msgid "Connection terminated unexpectedly" msgstr "मिलाप अनपेक्षित रुप से खतम हो गया " -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "अमान्य खोज अनुरोध" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr "SoupBodyInputStream का नहीं कर सकता" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:73 msgid "Network stream unexpectedly closed" msgstr "संजाल स्ट्रीम अप्रत्याशित रूप से बंद हो गया" -#: ../libsoup/soup-cache-input-stream.c:291 +#: ../libsoup/soup-cache-input-stream.c:290 msgid "Failed to completely cache the resource" msgstr "संसाधन को पूरी तरह कैश करने में विफल" @@ -49,7 +50,6 @@ msgid "Output buffer is too small" msgstr "निर्गम बफर बहुत छोटा है" #: ../libsoup/soup-message-client-io.c:41 -#| msgid "Could not parse URI '%s'" msgid "Could not parse HTTP response" msgstr "HTTP अनुक्रिया विश्लेषित नहीं कर सका" @@ -57,16 +57,15 @@ msgstr "HTTP अनुक्रिया विश्लेषित नही msgid "Unrecognized HTTP response encoding" msgstr "अपरिचित HTTP अनुक्रिया एन्कोडिंग" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 +#: ../libsoup/soup-message-io.c:854 ../libsoup/soup-message-io.c:890 msgid "Operation was cancelled" msgstr "आपरेशन रद्द कर दिया गया" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:901 msgid "Operation would block" msgstr "आपरेशन बंद हो जाएगा" -#: ../libsoup/soup-message-server-io.c:40 -#| msgid "Could not parse URI '%s'" +#: ../libsoup/soup-message-server-io.c:41 msgid "Could not parse HTTP request" msgstr "HTTP आग्रह विश्लेषित नहीं कर सका" @@ -80,34 +79,55 @@ msgstr "यूआरआई नहीं प्रदान किया गय msgid "Invalid '%s' URI: %s" msgstr "यूआरआई '%s' अमान्य: %s" -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-server.c:1528 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "TLS सर्वर को बिना TLS प्रमाणपत्र के बना नहीं सकता है" + +#: ../libsoup/soup-server.c:1547 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "पता %s, पोर्ट %d पर सुन नहीं सकता है: " + +#: ../libsoup/soup-session.c:4466 #, c-format msgid "Could not parse URI '%s'" msgstr "URI '%s' पद व्याख्या नहीं हो सका" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4503 #, c-format msgid "Unsupported URI scheme '%s'" msgstr "URI योजना '%s' को सहारा नहीं" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4525 #, c-format msgid "Not an HTTP URI" msgstr "कोई HTTP URI नहीं" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-socket.c:142 +msgid "Can't import non-socket as SoupSocket" +msgstr "सूपसॉकेट के रूप में आयात नहीं कर सकता है" + +#: ../libsoup/soup-socket.c:160 +msgid "Could not import existing socket: " +msgstr "मौजूदा सॉकेट आयात नहीं कर सकता है: " + +#: ../libsoup/soup-socket.c:169 +msgid "Can't import unconnected socket" +msgstr "बिना कनेक्टेड सॉकेट आयात नहीं कर सकता है" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "मेजबाननाम एक आईपी पता है" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "मेजबाननाम मान्य नहीं" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "मेजबाननाम को आधार डोमेन नहीं है" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "डोमेन पर्याप्त नहीं" diff --git a/po/hr.po b/po/hr.po new file mode 100644 index 00000000..57112e0d --- /dev/null +++ b/po/hr.po @@ -0,0 +1,178 @@ +# Croatian translation for libsoup2.4 +# Copyright (c) 2018 Rosetta Contributors and Canonical Ltd 2018 +# This file is distributed under the same license as the libsoup2.4 package. +# FIRST AUTHOR , 2018. +# +msgid "" +msgstr "" +"Project-Id-Version: libsoup2.4\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2018-03-12 23:01+0000\n" +"PO-Revision-Date: 2018-03-17 19:30+0100\n" +"Last-Translator: gogo \n" +"Language-Team: Croatian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2018-03-17 18:28+0000\n" +"X-Generator: Poedit 2.0.6\n" +"Language: hr\n" + +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 +msgid "Connection terminated unexpectedly" +msgstr "Povezivanje je neočekivano prekinuto" + +#: ../libsoup/soup-body-input-stream.c:459 +msgid "Invalid seek request" +msgstr "Neispravan zahtjev pretraživanja" + +#: ../libsoup/soup-body-input-stream.c:487 +msgid "Cannot truncate SoupBodyInputStream" +msgstr "Nemoguće skaratiti SoupBodyInputStream" + +#: ../libsoup/soup-cache-input-stream.c:76 +msgid "Network stream unexpectedly closed" +msgstr "Mrežno strujanje je neočekivano zatvoreno" + +#: ../libsoup/soup-cache-input-stream.c:291 +msgid "Failed to completely cache the resource" +msgstr "Neuspjelo potpuno međuspremanje resursa" + +#: ../libsoup/soup-converter-wrapper.c:189 +#, c-format +msgid "Output buffer is too small" +msgstr "Izlazni međuspremnik je premali" + +#: ../libsoup/soup-message-client-io.c:41 +msgid "Could not parse HTTP response" +msgstr "Nemoguća obrada HTTP odgovora" + +#: ../libsoup/soup-message-client-io.c:66 +msgid "Unrecognized HTTP response encoding" +msgstr "Nepoznato kôdiranje HTTP odgovora" + +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Zaglavlje je preveliko" + +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 +msgid "Operation would block" +msgstr "Radnja će blokirati" + +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Radnja je prekinuta" + +#: ../libsoup/soup-message-server-io.c:64 +msgid "Could not parse HTTP request" +msgstr "Nemoguća obrada HTTP zahtjeva" + +#: ../libsoup/soup-request.c:141 +#, c-format +msgid "No URI provided" +msgstr "Nema pruženog URI-ja" + +#: ../libsoup/soup-request.c:151 +#, c-format +msgid "Invalid “%s” URI: %s" +msgstr "Neispravno “%s” URI: %s" + +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Nemoguće stvaranje TLS poslužitelja bez TLS vjerodajnice" + +#: ../libsoup/soup-server.c:1742 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "Nemoguće osluškivanje adrese %s, ulaz %d: " + +#: ../libsoup/soup-session.c:4524 +#, c-format +msgid "Could not parse URI “%s”" +msgstr "Nemoguća obrada URI-ja “%s”" + +#: ../libsoup/soup-session.c:4561 +#, c-format +msgid "Unsupported URI scheme “%s”" +msgstr "Nepodržana URI shema “%s”" + +#: ../libsoup/soup-session.c:4583 +#, c-format +msgid "Not an HTTP URI" +msgstr "Nije HTTP URI" + +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Poslužitelj ne prihvaća WebSocket rukovanje." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Nemoguće prihvaćanje nepriključnice bez SoupSocketa" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Nemoguć uvoz postojeće priključnice: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Nemoguć uvoz nepovezane priključnice" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "WebSocket rukovanje je očekivano" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Nepodržana WebSocket inačica" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Neispravan WebSocket ključ" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Neispravno WebSocket “%s” zaglavlje" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Nepodržan WebSocket podprotokol" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Posljužitelj je odbio WebSocket rukovanje" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Posljužitelj je zanemario WebSocket rukovanje" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Poslužitelj je zahtijevao nepodržani protokol" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Poslužitelj je zahtijevao nepodržano proširenje" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Poslužitelj je vratio neispravni “%s” ključ" + +#: ../libsoup/soup-tld.c:187 +msgid "Hostname is an IP address" +msgstr "Naziv poslužitelja je IP adresa" + +#: ../libsoup/soup-tld.c:197 ../libsoup/soup-tld.c:219 +msgid "Invalid hostname" +msgstr "Neispravan naziv poslužitelja" + +#: ../libsoup/soup-tld.c:249 +msgid "Hostname has no base domain" +msgstr "Naziv poslužitelja nema osnovnu domenu" + +#: ../libsoup/soup-tld.c:303 +msgid "Not enough domains" +msgstr "Nedovoljno domena" diff --git a/po/hu.po b/po/hu.po index dc3311ea..bd9561f8 100644 --- a/po/hu.po +++ b/po/hu.po @@ -1,18 +1,18 @@ -# Hungarian translation of libsoup -# Copyright (C) 2012. Free Software Foundation, Inc. +# Hungarian translation for libsoup. +# Copyright (C) 2012, 2013, 2014, 2015, 2016, 2018 Free Software Foundation, Inc. # This file is distributed under the same license as the libsoup package. # -# Gabor Kelemen , 2012. -# Balázs Úr , 2013. +# Gabor Kelemen , 2012, 2016. +# Balázs Úr , 2013, 2014, 2015, 2018. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-03-15 12:35+0100\n" -"Last-Translator: Balázs Úr \n" -"Language-Team: Hungarian \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-02-23 23:51+0100\n" +"Last-Translator: Balázs Úr \n" +"Language-Team: Hungarian \n" "Language: hu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -20,21 +20,21 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Lokalize 1.2\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Kapcsolat váratlanul megszakítva" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Érvénytelen pozicionálási kérés" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "A SoupBodyInputStream nem csonkítható" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Az hálózati adatfolyam váratlanul lezárult" @@ -42,13 +42,12 @@ msgstr "Az hálózati adatfolyam váratlanul lezárult" msgid "Failed to completely cache the resource" msgstr "Nem sikerült teljesen gyorsítótárazni az erőforrást" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "A kimeneti puffer túl kicsi" #: ../libsoup/soup-message-client-io.c:41 -#| msgid "Could not parse URI '%s'" msgid "Could not parse HTTP response" msgstr "Nem dolgozható fel a HTTP válasz" @@ -56,57 +55,127 @@ msgstr "Nem dolgozható fel a HTTP válasz" msgid "Unrecognized HTTP response encoding" msgstr "Ismeretlen HTTP válasz kódolás" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "A művelet megszakítva" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "A fejléc túl nagy" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "A művelet blokkoló lenne" -#: ../libsoup/soup-message-server-io.c:40 -#| msgid "Could not parse URI '%s'" +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "A művelet megszakítva" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Nem dolgozható fel a HTTP kérés" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Nincs megadva URI" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "Érvénytelen „%s” URI: „%s”" -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Nem lehet TLS kiszolgálót létrehozni TLS tanúsítvány nélkül" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Could not parse URI '%s'" +msgid "Could not listen on address %s, port %d: " +msgstr "Nem sikerült figyelni a(z) %s címen a(z) %d. porton: " + +#: ../libsoup/soup-session.c:4524 +#, c-format +msgid "Could not parse URI “%s”" msgstr "Nem dolgozható fel a(z) „%s” URI" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" +msgid "Unsupported URI scheme “%s”" msgstr "Nem támogatott URI séma: „%s”" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Ez nem HTTP URI" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "A kiszolgáló nem fogadta el a WebSocket kézfogást." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Nem lehet egy foglalattól eltérőt SoupSocket-ként importálni" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Nem sikerült a meglévő foglalat importálása: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Nem lehet importálni a nem csatlakoztatott foglalatot" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "WebSocket kézfogást várt" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Nem támogatott WebSocket verzió" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Érvénytelen WebSocket kulcs" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Helytelen „%s” WebSocket fejléc" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Nem támogatott WebSocket alprotokoll" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "A kiszolgáló visszautasította a WebSocket kézfogást" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "A kiszolgáló mellőzte a WebSocket kézfogást" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "A kiszolgáló nem támogatott protokollt kért" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "A kiszolgáló nem támogatott kiterjesztést kért" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "A kiszolgáló helytelen „%s” kulccsal tért vissza" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "A gépnév egy IP-cím" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Érvénytelen gépnév" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "A gépnévnek nincs alap tartománya" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Nincs elég tartomány" diff --git a/po/id.po b/po/id.po index 96307099..37074110 100644 --- a/po/id.po +++ b/po/id.po @@ -2,47 +2,47 @@ # Copyright (C) 2012 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. # -# Andika Triwidada , 2012. +# Andika Triwidada , 2012, 2015. # Dirgita , 2012, 2013. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-09-16 22:19+0000\n" -"PO-Revision-Date: 2013-09-18 20:55+0700\n" -"Last-Translator: Dirgita \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-02-11 20:48+0700\n" +"Last-Translator: Andika Triwidada \n" "Language-Team: Indonesian \n" "Language: id\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.5\n" +"X-Generator: Poedit 1.8.11\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: ../libsoup/soup-body-input-stream.c:140 -#: ../libsoup/soup-body-input-stream.c:171 -#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Sambungan terputus secara tak diharapkan" -#: ../libsoup/soup-body-input-stream.c:462 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Permintaan seek yang tak valid" -#: ../libsoup/soup-body-input-stream.c:490 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "Tak bisa memenggal SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:73 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Lalu lintas jaringan putus tak terduga" -#: ../libsoup/soup-cache-input-stream.c:290 +#: ../libsoup/soup-cache-input-stream.c:291 msgid "Failed to completely cache the resource" msgstr "Gagal melengkapi tembolok sumber" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Penyangga keluaran terlalu kecil" @@ -55,55 +55,126 @@ msgstr "Tak dapat mengurai tanggapan HTTP" msgid "Unrecognized HTTP response encoding" msgstr "Enkode tanggapan HTTP tak dikenal" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Operasi dibatalkan" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Header terlalu besar" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "Operasi akan memblokir" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Operasi dibatalkan" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Tak dapat mengurai permintaan HTTP" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "URI tak diberikan" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 +#, c-format +msgid "Invalid “%s” URI: %s" +msgstr "URI \"%s\" tak valid: %s" + +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Tak bisa membuat sebuah server TLS tanpa suatu sertifikat TLS" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "URI '%s' tak valid: %s" +msgid "Could not listen on address %s, port %d: " +msgstr "Tak bisa mendengar pada alamat %s, port %d: " -#: ../libsoup/soup-session.c:4259 +#: ../libsoup/soup-session.c:4524 #, c-format -msgid "Could not parse URI '%s'" -msgstr "Tak bisa mengurai URI '%s'" +msgid "Could not parse URI “%s”" +msgstr "Tak bisa mengurai URI \"%s\"" -#: ../libsoup/soup-session.c:4296 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "Skema URI '%s' tak didukung" +msgid "Unsupported URI scheme “%s”" +msgstr "Skema URI \"%s\" tak didukung" -#: ../libsoup/soup-session.c:4318 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Bukan URI HTTP" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Server tak menerima jabat tangan WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Tak bisa mengimpor non-soket sebagai SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Tak dapat mengimpor soket yang telah ada: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Tak bisa mengimpor soket yang tak tersambung" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Jabat tangan WebSocket diharapkan" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Versi WebSocket tak didukung" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Kunci WebSocket tak valid" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Kepala WebSocket \"%s\" salah" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Subprotokol WebSocket tak didukung" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Server menolak jabat tangan WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Server mengabaikan jabat tangan WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Server meminta protokol yang tak didukung" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Server meminta ekstensi yang tak didukung" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Server mengembalikan kunci \"%s\" yang salah" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Nama host adalah suatu alamat IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Nama host tak valid" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Nama host tidak memiliki domain dasar" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Tak cukup domain" diff --git a/po/it.po b/po/it.po index ba800dba..8481f1f6 100644 --- a/po/it.po +++ b/po/it.po @@ -1,37 +1,39 @@ # Italian translations for libsoup package -# Copyright (C) 2012, 2013 the Free Software Foundation, Inc. +# Copyright (C) 2012, 2013, 2014, 2015, 2017, 2018 the Free Software Foundation, Inc. # This file is distributed under the same license as the libsoup package. -# Milo Casagrande , 2012, 2013. +# Milo Casagrande , 2012, 2013, 2014, 2015, 2017, 2018. # msgid "" msgstr "" "Project-Id-Version: libsoup\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-11 16:59+0100\n" -"PO-Revision-Date: 2013-03-11 17:00+0100\n" -"Last-Translator: Milo Casagrande \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-02-09 16:37+0100\n" +"Last-Translator: Milo Casagrande \n" "Language-Team: Italian \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8-bit\n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n!=1);\n" +"X-Generator: Poedit 2.0.4\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Connessione terminata inaspettatamente" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Richiesta di posizionamento non valida" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "Impossibile troncare SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Flusso di rete chiuso inaspettatamente" @@ -39,7 +41,7 @@ msgstr "Flusso di rete chiuso inaspettatamente" msgid "Failed to completely cache the resource" msgstr "Salvataggio in memoria della risorsa non riuscito" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Il buffer di uscita è troppo piccolo" @@ -52,55 +54,126 @@ msgstr "Impossibile analizzare la risposta HTTP" msgid "Unrecognized HTTP response encoding" msgstr "Codifica risposta HTTP non riconosciuta" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "L'operazione è stata annullata" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Intestazione troppo grande" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "L'operazione potrebbe bloccarsi" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "L'operazione è stata annullata" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Impossibile analizzare la richiesta HTTP" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Nessun URI fornito" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "URI «%s» non valido: %s" -#: ../libsoup/soup-session.c:4252 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Impossibile creare un server TLS senza un certificato TLS" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Could not parse URI '%s'" +msgid "Could not listen on address %s, port %d: " +msgstr "Impossibile restare in ascolto sull'indirizzo %s, porta %d: " + +#: ../libsoup/soup-session.c:4524 +#, c-format +msgid "Could not parse URI “%s”" msgstr "Impossibile analizzare l'URI «%s»" -#: ../libsoup/soup-session.c:4289 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" +msgid "Unsupported URI scheme “%s”" msgstr "Schema URI «%s» non supportato" -#: ../libsoup/soup-session.c:4311 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Non è uno URI HTTP" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Il server non ha accettato l'handshake WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Impossibile importare un non-socket come SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Impossibile importare il socket esistente: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Impossibile importare un socket non connesso" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Atteso handshake WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Version WebSocket non supportata" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Chiave WebSocket non valida" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Intestazione WebSocket «%s» non valida" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Sotto-protocollo WebSocket non supportato" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Il server ha rifiutato l'handshake WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Il server ha ignorato l'handshake WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Il server ha richiesto un protocollo non supportato" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Il server ha richiesto un'estensione non supportata" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Il server ha restituito una chiave «%s» non corretta" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Il nome host è un indirizzo IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Nome host non valido" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Il nome host non ha un dominio di base" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Domini insufficienti" diff --git a/po/kn.po b/po/kn.po index 98bd11e4..e53ba248 100644 --- a/po/kn.po +++ b/po/kn.po @@ -1,43 +1,42 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# -# Shankar Prasad , 2012, 2013. +# +# Shankar Prasad , 2012, 2013, 2014. msgid "" msgstr "" "Project-Id-Version: \n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=" -"libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-03-24 08:30-0400\n" -"Last-Translator: Shankar Prasad \n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2014-09-02 09:47+0000\n" +"PO-Revision-Date: 2014-09-22 09:37+0530\n" +"Last-Translator: Shankar Prasad \n" "Language-Team: Kannada \n" +"Language: kn\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: kn\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Zanata 3.2.3\n" +"X-Generator: Lokalize 1.5\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 -#: ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:196 msgid "Connection terminated unexpectedly" msgstr "ಸಂಪರ್ಕವು ಅನಿರೀಕ್ಷಿತವಾಗಿ ಕೊನೆಗೊಂಡಿದೆ" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "ಅಮಾನ್ಯವಾದ ಕೋರಿಕೆಯ ಮನವಿ" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr "SoupBodyInputStream ಅನ್ನು ತುಂಡರಿಸಲಾಗಿಲ್ಲ" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:73 msgid "Network stream unexpectedly closed" msgstr "ಜಾಲಬಂಧ ಸ್ಟ್ರೀಮ್ ಅನ್ನು ಅನಿರೀಕ್ಷಿತವಾಗಿ ಮುಚ್ಚಲಾಗಿದೆ" -#: ../libsoup/soup-cache-input-stream.c:291 +#: ../libsoup/soup-cache-input-stream.c:290 msgid "Failed to completely cache the resource" msgstr "ಸಂಪನ್ಮೂಲವನ್ನು ಸಂಪೂರ್ಣವಾಗಿ ಕ್ಯಾಶ್ ಮಾಡುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ" @@ -54,16 +53,15 @@ msgstr "HTTP ಪ್ರತ್ಯುತ್ತರವನ್ನು ಪಾರ್ಸ್ msgid "Unrecognized HTTP response encoding" msgstr "ಗುರುತಿಸಲಾಗದ HTTP ಪ್ರತಿಕ್ರಿಯೆ ಎನ್ಕೋಡಿಂಗ್" -#: ../libsoup/soup-message-io.c:846 -#: ../libsoup/soup-message-io.c:882 +#: ../libsoup/soup-message-io.c:854 ../libsoup/soup-message-io.c:890 msgid "Operation was cancelled" msgstr "ಕಾರ್ಯಾಚರಣೆಯನ್ನು ರದ್ದುಗೊಳಿಸಲಾಗಿದೆ" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:901 msgid "Operation would block" msgstr "ಕಾರ್ಯಾಚರಣೆ ತಡೆಯಲ್ಪಡಬಹುದು" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-server-io.c:41 msgid "Could not parse HTTP request" msgstr "HTTP ಮನವಿಯನ್ನು ಪಾರ್ಸ್ ಮಾಡಲಾಗಿಲ್ಲ" @@ -77,33 +75,55 @@ msgstr "ಯಾವುದೆ URI ಅನ್ನು ಒದಗಿಸಲಾಗಿಲ್ msgid "Invalid '%s' URI: %s" msgstr "ಅಮಾನ್ಯವಾದ '%s' URI:'%s" -#: ../libsoup/soup-session.c:4252 +#: ../libsoup/soup-server.c:1528 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "ಒಂದು TLS ಪ್ರಮಾಣಪತ್ರವಿರದೆ TLS ಪೂರೈಕೆಗಣಕವನ್ನು ರಚಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ" + +#: ../libsoup/soup-server.c:1547 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "%s ವಿಳಾಸದಲ್ಲಿ, %d ಸಂಪರ್ಕಸ್ಥಾನದಲ್ಲಿ ಆಲಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ:" + +#: ../libsoup/soup-session.c:4466 #, c-format msgid "Could not parse URI '%s'" msgstr "'%s' URL ಅನ್ನು ಪಾರ್ಸ್ ಮಾಡಲಾಗಿಲ್ಲ" -#: ../libsoup/soup-session.c:4289 +#: ../libsoup/soup-session.c:4503 #, c-format msgid "Unsupported URI scheme '%s'" msgstr "ಬೆಂಬಲವಿಲ್ಲದ ಯುಆರ್ಐ ಮಾದರಿ '%s'" -#: ../libsoup/soup-session.c:4311 +#: ../libsoup/soup-session.c:4525 #, c-format msgid "Not an HTTP URI" msgstr "ಒಂದು HTTP URI ಅಲ್ಲ" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-socket.c:142 +msgid "Can't import non-socket as SoupSocket" +msgstr "SoupSocket ಆಗಿ ಸಾಕೆಟ್‌-ಅಲ್ಲದಿರುವುದನ್ನು ಆಮದು ಮಾಡಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ" + +#: ../libsoup/soup-socket.c:160 +msgid "Could not import existing socket: " +msgstr "ಈಗಿರುವ ಸಾಕೆಟ್ ಅನ್ನು ಆಮದು ಮಾಡಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ:" + +#: ../libsoup/soup-socket.c:169 +msgid "Can't import unconnected socket" +msgstr "ಸಂಪರ್ಕಜೋಡಿಸದೆ ಇರುವ ಸಾಕೆಟ್‌ ಅನ್ನು ಆಮದು ಮಾಡಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "ಆತಿಥೇಯವು ಒಂದು IP ವಿಳಾಸವಾಗಿದೆ" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "ಅಮಾನ್ಯವಾದ ಅತಿಥೇಯದ ಹೆಸರು" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "ಆತಿಥೇಯದ ಹೆಸರಿನಲ್ಲಿ ಯಾವುದೆ ಮೂಲ ಡೊಮೈನ್ ಇಲ್ಲ" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "ಬೇಕಾದಷ್ಟು ಡೊಮೈನ್‌ಗಳಿಲ್ಲ" + diff --git a/po/ko.po b/po/ko.po index c07240e5..52982d91 100644 --- a/po/ko.po +++ b/po/ko.po @@ -3,14 +3,15 @@ # This file is distributed under the same license as the libsoup package. # # eukim , 2012. -# Changwoo Ryu , 2013. +# Changwoo Ryu , 2013-2015, 2017-2018. # msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-03-22 04:46+0900\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-02-23 11:27+0900\n" "Last-Translator: Changwoo Ryu \n" "Language-Team: Korean \n" "Language: ko\n" @@ -20,21 +21,21 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Lokalize 1.0\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "예상치 않게 연결이 중지됨" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "탐색 요청이 잘못되었습니다" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "SoupBodyInputStream을 자를 수 없습니다" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "네트워크 스트림이 예상치 못하게 닫혔습니다" @@ -42,7 +43,7 @@ msgstr "네트워크 스트림이 예상치 못하게 닫혔습니다" msgid "Failed to completely cache the resource" msgstr "리소스를 완전히 캐시에 저장하는데 실패했습니다" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "출력 버퍼가 너무 작습니다" @@ -55,55 +56,126 @@ msgstr "HTTP 응답을 구문 분석할 수 없습니다" msgid "Unrecognized HTTP response encoding" msgstr "HTTP 응답 인코딩을 알 수 없습니다" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "작업이 취소되었습니다" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "헤더가 너무 큽니다" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "작업이 블럭되었습니다" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "작업이 취소되었습니다" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "HTTP 요청을 구문 분석할 수 없습니다" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "URI가 없습니다" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 +#, c-format +msgid "Invalid “%s” URI: %s" +msgstr "잘못된 “%s” URI: %s" + +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "TLS 인증서 없이 TLS 서버를 만들 수 없습니다" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "잘못된 '%s' URI: %s" +msgid "Could not listen on address %s, port %d: " +msgstr "주소 %s, 포트 %d번에 연결을 받을 수 없습니다: " -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-session.c:4524 #, c-format -msgid "Could not parse URI '%s'" -msgstr "'%s' URI를 구문 분석할 수 없습니다" +msgid "Could not parse URI “%s”" +msgstr "“%s” URI를 구문 분석할 수 없습니다" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "'%s' URI 스킴을 지원하지 않습니다" +msgid "Unsupported URI scheme “%s”" +msgstr "“%s” URI 스킴을 지원하지 않습니다" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "HTTP URI가 아닙니다" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "서버에서 웹소켓 핸드셰이크를 받아들이지 않습니다." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "소켓이 아닌 핸들을 SoupSocket으로 가져올 수 없습니다" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "기존 소켓을 가져올 수 없습니다: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "연결하지 않은 소켓을 가져올 수 없습니다" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "웹소켓 핸드셰이크가 와야 합니다" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "웹소켓 버전을 지원하지 않습니다" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "웹소켓 키가 올바르지 않습니다" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "웹소켓 “%s” 헤더가 올바르지 않습니다" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "웹소켓 서브프로토콜을 지원하지 않습니다" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "서버에서 웹소켓 핸드셰이크를 거부했습니다" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "서버에서 웹소켓 핸드셰이크를 무시헀습니다" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "서버에서 지원하지 않는 프로토콜을 요청했습니다" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "서버에서 지원하지 않는 확장 기능을 요청했습니다" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "서버에서 올바르지 않은 “%s” 키를 리턴했습니다" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "호스트 이름은 IP 주소입니다" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "잘못된 호스트 이름입니다" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "호스트 이름에 기본 도메인이 없습니다" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "도메인이 충분하지 않습니다" diff --git a/po/lt.po b/po/lt.po index ae9183e4..d13800c1 100644 --- a/po/lt.po +++ b/po/lt.po @@ -1,16 +1,16 @@ # Lithuanian translation for libsoup. # Copyright (C) 2012 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. -# Aurimas Černius , 2012, 2013. +# Aurimas Černius , 2012, 2013, 2014, 2015. # msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-02-24 21:55+0200\n" -"Last-Translator: Aurimas Černius \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-03-01 21:42+0000\n" +"PO-Revision-Date: 2018-03-02 11:59+0200\n" +"Last-Translator: Moo\n" "Language-Team: Lietuvių \n" "Language: lt\n" "MIME-Version: 1.0\n" @@ -18,23 +18,23 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" "%100<10 || n%100>=20) ? 1 : 2);\n" -"X-Generator: Gtranslator 2.91.6\n" +"X-Generator: Poedit 2.0.4\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Ryšys netikėtai nutrūko" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Netinkama paieškos užklausa" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "Negalima trumpinti SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Tinklo srautas netikėtai užsivėrė" @@ -42,13 +42,12 @@ msgstr "Tinklo srautas netikėtai užsivėrė" msgid "Failed to completely cache the resource" msgstr "Nepavyko visiškai patalpinti resurso į podėlį" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Išvesties buferis yra per mažas" #: ../libsoup/soup-message-client-io.c:41 -#| msgid "Could not parse URI '%s'" msgid "Could not parse HTTP response" msgstr "Nepavyko perskaityti URI „%s“Nepavyko perskaityti HTTP atsako" @@ -56,56 +55,126 @@ msgstr "Nepavyko perskaityti URI „%s“Nepavyko perskaityti HTTP atsako" msgid "Unrecognized HTTP response encoding" msgstr "Neatpažinta HTTP atsako koduotė" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Veiksmas buvo nutrauktas" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Antraštė yra per didelė" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "Veiksmas blokuosis" -#: ../libsoup/soup-message-server-io.c:40 -#| msgid "Could not parse URI '%s'" +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Veiksmas buvo nutrauktas" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Nepavyko perskaityti HTTP užklausos" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Nepateiktas URI" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "Netinkamas „%s“ URI: %s" -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Negalima sukurti TLS serverio be TLS liudijimo" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Could not parse URI '%s'" -msgstr "Nepavyko perskaityti URI „%s“" +msgid "Could not listen on address %s, port %d: " +msgstr "Nepavyksta klausytis adreso %s, prievadu %d: " -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4524 #, c-format -msgid "Unsupported URI scheme '%s'" +msgid "Could not parse URI “%s”" +msgstr "Nepavyko išanalizuoti URI „%s“" + +#: ../libsoup/soup-session.c:4561 +#, c-format +msgid "Unsupported URI scheme “%s”" msgstr "Nepalaikoma URI schema „%s“" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Ne HTTP URI" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Serveris nepriėmė WebSocket rankos paspaudimo." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Negalima importuoti ne lizdo kaip SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Nepavyko importuoti esamo lizdo: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Negalima importuoti neprijungto lizdo" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Tikėtasi WebSocket rankos paspaudimo" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Nepalaikoma WebSocket versija" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Netinkamas WebSocket raktas" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Neteisinga WebSocket „%s“ antraštė" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Nepalaikomas WebSocket paprotokolis" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Serveris atmetė WebSocket rankos paspaudimą" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Serveris nepaisė WebSocket rankos paspaudimo" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Serveris paprašė nepalaikomo protokolo" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Serveris paprašė nepalaikomo plėtinio" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Serveris grąžino neteisingą „%s“ raktą" + +#: ../libsoup/soup-tld.c:187 msgid "Hostname is an IP address" msgstr "Serverio vardas arba IP adresas" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:197 ../libsoup/soup-tld.c:219 msgid "Invalid hostname" msgstr "Netinkamas serverio vardas" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:249 msgid "Hostname has no base domain" msgstr "Serverio vardas neturi bazinio domeno" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:303 msgid "Not enough domains" msgstr "Nepakanka domenų" diff --git a/po/lv.po b/po/lv.po index c22e57a4..696e8af1 100644 --- a/po/lv.po +++ b/po/lv.po @@ -3,39 +3,39 @@ # This file is distributed under the same license as the libsoup package. # # Tranzistors , 2012. -# Rūdolfs Mazurs , 2012, 2013. +# Rūdolfs Mazurs , 2012, 2013, 2014, 2016, 2017, 2018. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-03-17 20:11+0200\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?product=libsoup" +"&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-02-24 20:14+0200\n" "Last-Translator: Rūdolfs Mazurs \n" "Language-Team: Latvian \n" "Language: lv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : " -"2);\n" -"X-Generator: Lokalize 1.4\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 :" +" 2);\n" +"X-Generator: Lokalize 2.0\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Savienojums tika negaidīti pārtraukts" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Nederīgs meklēšanas pieprasījums" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "Nevar apraut SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Tīkla straume negaidīti aizvērās" @@ -43,13 +43,12 @@ msgstr "Tīkla straume negaidīti aizvērās" msgid "Failed to completely cache the resource" msgstr "Neizdevās resursu pilnībā noglabāt kešatmiņā" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Izvades buferis ir pārāk mazs" #: ../libsoup/soup-message-client-io.c:41 -#| msgid "Could not parse URI '%s'" msgid "Could not parse HTTP response" msgstr "Nevarēja parsēt HTTP atbildi" @@ -57,57 +56,127 @@ msgstr "Nevarēja parsēt HTTP atbildi" msgid "Unrecognized HTTP response encoding" msgstr "Neatpazīts HTTP atbildes kodējums" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Darbība tika atcelta" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Galvene ir pārāk liela" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "Darbība bloķētu" -#: ../libsoup/soup-message-server-io.c:40 -#| msgid "Could not parse URI '%s'" +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Darbība tika atcelta" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Nevarēja parsēt HTTP pieprasījumu" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Nav sniegts URI" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "Nederīgs “%s” URI — %s" -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Bez TLS sertifikāta nevar izveidot TLS serveri" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Could not parse URI '%s'" +msgid "Could not listen on address %s, port %d: " +msgstr "Nevarēja sākt klausīties adresi %s, portu %d: " + +#: ../libsoup/soup-session.c:4524 +#, c-format +msgid "Could not parse URI “%s”" msgstr "Nevarēja parsēt URI “%s”" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" +msgid "Unsupported URI scheme “%s”" msgstr "Neatbalstīta URI shēma “%s”" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Nav HTTP URI" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Serveris nepieņēma WebSocket rokasspiedienu." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Nevar importēt ne-ligzdu kā SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Nevarēja importēt esošu ligzdu: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Nevar importēt nesavienotu ligzdu" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "WebSocket rokasspiedienam beidzās termiņš" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Neatbalstīta WebSocket versija" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Nederīga WebSocket atslēga" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Nederīga WebSocket “%s” galvene" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Neatbalstīts WebSocket apakšprotokols" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Serveris noraidīja WebSocket rokasspiedienu" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Serveris ignorēja WebSocket rokasspiedienu" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Serveris pieprasīja neatbalstītu protokolu" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Serveris pieprasīja neatbalstītu paplašinājumu" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Serveris atgrieza nederīgu “%s” atslēgu" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Datora nosaukums ir IP adrese" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Nederīgs datora nosaukums" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Datora nosaukumam nav bāzes domēna" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Nepietiekami daudz domēnu" diff --git a/po/mr.po b/po/mr.po index e2ca1630..36f49cc1 100644 --- a/po/mr.po +++ b/po/mr.po @@ -2,14 +2,14 @@ # Copyright (C) 2012 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. # -# Sandeep Shedmake , 2012, 2013. +# Sandeep Shedmake , 2012, 2013, 2014. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-03-20 06:56+0530\n" +"POT-Creation-Date: 2014-09-15 09:44+0000\n" +"PO-Revision-Date: 2014-09-15 15:54+0530\n" "Last-Translator: Sandeep Shedmake \n" "Language-Team: Marathi \n" "Language: mr\n" @@ -19,25 +19,25 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Lokalize 1.5\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:196 msgid "Connection terminated unexpectedly" msgstr "जोडणी अनपेक्षितपणे बंद झाली" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "अवैध सीक विनंती" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr "SoupBodyInputStream ट्रंकेट करणे अशक्य" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:73 msgid "Network stream unexpectedly closed" msgstr "नेटवर्क स्ट्रिम अनपेक्षितरित्या बंद झाले" -#: ../libsoup/soup-cache-input-stream.c:291 +#: ../libsoup/soup-cache-input-stream.c:290 msgid "Failed to completely cache the resource" msgstr "रिसोअर्स संपूर्णपणे कॅशे करण्यास अपयशी" @@ -47,7 +47,6 @@ msgid "Output buffer is too small" msgstr "आउटपुट बफर खूपच लहान आहे" #: ../libsoup/soup-message-client-io.c:41 -#| msgid "Could not parse URI '%s'" msgid "Could not parse HTTP response" msgstr "HTTP प्रतिसाद वाचणे अशक्य" @@ -55,16 +54,15 @@ msgstr "HTTP प्रतिसाद वाचणे अशक्य" msgid "Unrecognized HTTP response encoding" msgstr "अपरिचीत HTTP प्रतिसाद एंकोडिंग" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 +#: ../libsoup/soup-message-io.c:854 ../libsoup/soup-message-io.c:890 msgid "Operation was cancelled" msgstr "कार्य रद्द केले" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:901 msgid "Operation would block" msgstr "कार्य बंधिस्त करू शकते" -#: ../libsoup/soup-message-server-io.c:40 -#| msgid "Could not parse URI '%s'" +#: ../libsoup/soup-message-server-io.c:41 msgid "Could not parse HTTP request" msgstr "HTTP विनंती वाचणे अशक्य" @@ -78,34 +76,55 @@ msgstr "URI पुरवले नाही" msgid "Invalid '%s' URI: %s" msgstr "अवैध '%s' URI: %s" -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-server.c:1528 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "TLS प्रमाणपत्रविना TLS सर्व्हर निर्माण करणे अशक्य" + +#: ../libsoup/soup-server.c:1547 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "पत्ता %s, पोर्ट %d वर ऐकणे अशक्य: " + +#: ../libsoup/soup-session.c:4466 #, c-format msgid "Could not parse URI '%s'" msgstr "URI '%s' वाचणे अशक्य" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4503 #, c-format msgid "Unsupported URI scheme '%s'" msgstr "असमर्थीत URI सुत्रयोजना '%s'" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4525 #, c-format msgid "Not an HTTP URI" msgstr "HTTP URI नाही" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-socket.c:142 +msgid "Can't import non-socket as SoupSocket" +msgstr "विना-सॉकेटला SoupSocket म्हणून आयात करणे अशक्य" + +#: ../libsoup/soup-socket.c:160 +msgid "Could not import existing socket: " +msgstr "अस्तित्वातील सॉकेट आयात करणे अशक्य: " + +#: ../libsoup/soup-socket.c:169 +msgid "Can't import unconnected socket" +msgstr "विना जोडणी सॉकेट आयात करणे अशक्य" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "यजमाननाव IP पत्ता आहे" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "अवैध यजमाननाव" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "यजमाननावात बेस डोमैन नाही" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "अतिरिक्त डोमैन्स् आढळले नाही" diff --git a/po/nb.po b/po/nb.po index b2293d90..8d69ef48 100644 --- a/po/nb.po +++ b/po/nb.po @@ -1,32 +1,32 @@ # Norwegian bokmål translation of libsoup. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# Kjartan Maraas , 2012-2013. +# Kjartan Maraas , 2012-2017. # msgid "" msgstr "" -"Project-Id-Version: libsoup 3.7.x\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-25 17:06+0100\n" -"PO-Revision-Date: 2013-02-25 17:07+0100\n" +"Project-Id-Version: libsoup 2.57.x\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2016-10-27 12:38+0000\n" +"PO-Revision-Date: 2017-02-14 07:59+0100\n" "Last-Translator: Kjartan Maraas \n" "Language-Team: Norwegian bokmål \n" -"Language: \n" +"Language: nb\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:235 msgid "Connection terminated unexpectedly" msgstr "Tilkoblingen ble brutt uventet" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "Ugyldig søkeforespørsel" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr "Kan ikke avkorte SoupBodyInputStream" @@ -51,15 +51,15 @@ msgstr "Kunne ikke tolke HTTP-svar" msgid "Unrecognized HTTP response encoding" msgstr "Ikke gjenkjent koding av HTTP-svar" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Operasjonen ble avbrutt" - -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:392 ../libsoup/soup-message-io.c:1020 msgid "Operation would block" msgstr "Operasjonen ville blokkere" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:972 ../libsoup/soup-message-io.c:1005 +msgid "Operation was cancelled" +msgstr "Operasjonen ble avbrutt" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Kunne ikke tolke HTTP-forespørsel" @@ -70,36 +70,103 @@ msgstr "Ingen URI ble oppgitt" #: ../libsoup/soup-request.c:150 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "Ugyldig «%s» URI: %s" -#: ../libsoup/soup-session.c:4211 +#: ../libsoup/soup-server.c:1727 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Kan ikke lage en TLS-tjener uten et TLS-sertifikat" + +#: ../libsoup/soup-server.c:1744 #, c-format -msgid "Could not parse URI '%s'" +msgid "Could not listen on address %s, port %d: " +msgstr "Kunne ikke lytte på adresse %s, port %d: " + +#: ../libsoup/soup-session.c:4525 +#, c-format +msgid "Could not parse URI “%s”" msgstr "Kunne ikke tolke URI «%s»" -#: ../libsoup/soup-session.c:4248 +#: ../libsoup/soup-session.c:4562 #, c-format -msgid "Unsupported URI scheme '%s'" +msgid "Unsupported URI scheme “%s”" msgstr "URI-skjema «%s» er ikke støttet" -#: ../libsoup/soup-session.c:4270 +#: ../libsoup/soup-session.c:4584 #, c-format msgid "Not an HTTP URI" msgstr "Ikke en HTTP URI" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4770 +msgid "The server did not accept the WebSocket handshake." +msgstr "Tjeneren godtok ikke WebSocket-håndtrykk." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Kan ikke importere noe som ikke er en socket som SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Kunne ikke importere eksisterende socket: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Kan ikke importere ikke-tilkoblet socket" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "WebSocket-håndtrykk forventet" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "WebSocket-versjon ikke støttet" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Ugyldig WebSocket-nøkkel" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Ugyldig «%s»-hode for WebSocket" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Ikke støttet underprotokoll av WebSocket" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Tjener avviste håndtrykk for WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Tjener overså håndtrykk fra WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Tjener forespurte protokoll som ikke støttes" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Tjener forespurte utvidelse som ikke støttes" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Tjener returnerte feil «%s»-nøkkel" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Vertsnavnet er en IP-adresse" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Ugyldig vertsnavn" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Vertsnavnet har ikke noe grunndomene" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Ikke mange nok domener" diff --git a/po/ne.po b/po/ne.po new file mode 100644 index 00000000..86ab8a52 --- /dev/null +++ b/po/ne.po @@ -0,0 +1,175 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Gnome Nepali Translation Project\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2017-08-10 12:33+0000\n" +"PO-Revision-Date: 2017-10-16 16:09+0545\n" +"Language-Team: Nepali Translation Team \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.0.4\n" +"Last-Translator: Pawan Chitrakar \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: ne\n" + +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:237 +msgid "Connection terminated unexpectedly" +msgstr "जडान अप्रत्याशित रूपमा समाप्त भयो" + +#: ../libsoup/soup-body-input-stream.c:459 +msgid "Invalid seek request" +msgstr "अमान्य खोज अनुरोध" + +#: ../libsoup/soup-body-input-stream.c:487 +msgid "Cannot truncate SoupBodyInputStream" +msgstr "सूपबडीइनपुटस्ट्रीम ट्रंक गर्न सकिँदैन" + +#: ../libsoup/soup-cache-input-stream.c:76 +msgid "Network stream unexpectedly closed" +msgstr "सञ्जाल स्ट्रीम अनपेक्षित रूपमा बन्द गरियो" + +#: ../libsoup/soup-cache-input-stream.c:291 +msgid "Failed to completely cache the resource" +msgstr "संसाधन पुरा तरिकाले क्यास गर्न असफल भयो" + +#: ../libsoup/soup-converter-wrapper.c:189 +#, c-format +msgid "Output buffer is too small" +msgstr "निर्गत बफर धेरै सानो छ" + +#: ../libsoup/soup-message-client-io.c:41 +msgid "Could not parse HTTP response" +msgstr "HTTP प्रतिक्रिया पार्स गर्न सकिएन" + +#: ../libsoup/soup-message-client-io.c:66 +msgid "Unrecognized HTTP response encoding" +msgstr "अपरिचित HTTP प्रतिक्रिया इन्कोडिङ" + +#: ../libsoup/soup-message-io.c:387 ../libsoup/soup-message-io.c:1015 +msgid "Operation would block" +msgstr "सञ्चालन ब्लक हुनेछ" + +#: ../libsoup/soup-message-io.c:967 ../libsoup/soup-message-io.c:1000 +msgid "Operation was cancelled" +msgstr "सञ्चालन रद्द भएको छ" + +#: ../libsoup/soup-message-server-io.c:64 +msgid "Could not parse HTTP request" +msgstr "HTTP अनुरोध पार्स गर्न सकिएन" + +#: ../libsoup/soup-request.c:141 +#, c-format +msgid "No URI provided" +msgstr "कुनै URI प्रदान गरिएको छैन" + +#: ../libsoup/soup-request.c:151 +#, c-format +msgid "Invalid “%s” URI: %s" +msgstr "अमान्य \"%s\" URI:%s" + +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "TLS प्रमाणपत्र बिना TLS सर्भर सिर्जना गर्न सक्दैन" + +#: ../libsoup/soup-server.c:1742 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "ठेगाना%s, पोर्ट%d मा सुन्न सकेन: " + +#: ../libsoup/soup-session.c:4517 +#, c-format +msgid "Could not parse URI “%s”" +msgstr "URI \"%s\" पार्स गर्न सकिएन" + +#: ../libsoup/soup-session.c:4554 +#, c-format +msgid "Unsupported URI scheme “%s”" +msgstr "असमर्थित यूआरआई योजना \"%s\"" + +#: ../libsoup/soup-session.c:4576 +#, c-format +msgid "Not an HTTP URI" +msgstr "HTTP URI होइन" + +#: ../libsoup/soup-session.c:4762 +msgid "The server did not accept the WebSocket handshake." +msgstr "सर्भरले वेबसकेट ह्यान्डशक स्वीकार गरेन।." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "सूपसकेटको रूपमा गैर-सकेट आयात गर्न सकिँदैन" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "अवस्थित सकेट आयात गर्न सकिएन: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "जडान नगरिएको सकेट सकिएन" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "वेबसकेट ह्यान्डशेक अपेक्षित" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "असमर्थित वेबसकेट संस्करण" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "असमर्थित वेबसकेट सबप्रटोकल" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "गलत वेबसकेट \"%s\" हेडर" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Unsupported WebSocket subprotocol" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "सर्भरले वेबस्केट ह्यान्डशकलाई अस्वीकार गर्यो" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "सर्भरले वेबस्केट ह्यान्डशेकलाई बेवास्ता गर्यो" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "सर्भरले असमर्थित प्रोटोकल अनुरोध गर्यो" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "सर्भरले असमर्थित एक्सटेन्सन अनुरोध गर्यो" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "सर्भरले गलत \"%s\" कुञ्जीलाई फर्कायो" + +#: ../libsoup/soup-tld.c:188 +msgid "Hostname is an IP address" +msgstr "होस्टनाम आईपी ठेगाना हो" + +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 +msgid "Invalid hostname" +msgstr "अवैध होस्टनाम" + +#: ../libsoup/soup-tld.c:250 +msgid "Hostname has no base domain" +msgstr "होस्टनामसँग कुनै आधार डोमेन छैन" + +#: ../libsoup/soup-tld.c:304 +msgid "Not enough domains" +msgstr "पर्याप्त डोमेनहरू छैनन्" diff --git a/po/nl.po b/po/nl.po index 77fc8526..7414db79 100644 --- a/po/nl.po +++ b/po/nl.po @@ -3,46 +3,47 @@ # This file is distributed under the same license as the libsoup package. # Reinout van Schouwen , 2013. # Reinout van Schouwen , 2013. +# Nathan Follens , 2015-2018. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libsou" -"p&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-09-16 22:19+0000\n" -"PO-Revision-Date: 2013-09-18 23:22+0200\n" -"Last-Translator: Reinout van Schouwen \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-02-22 20:11+0100\n" +"Last-Translator: Nathan Follens \n" "Language-Team: Dutch \n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Virtaal 0.7.1\n" +"X-Generator: Poedit 2.0.6\n" "X-Project-Style: gnome\n" -#: ../libsoup/soup-body-input-stream.c:140 -#: ../libsoup/soup-body-input-stream.c:171 -#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Verbinding werd onverwacht verbroken" -#: ../libsoup/soup-body-input-stream.c:462 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Ongeldige zoekaanvraag" -#: ../libsoup/soup-body-input-stream.c:490 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "Kan SoupBodyInputStream niet afkappen" -#: ../libsoup/soup-cache-input-stream.c:73 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Netwerkstroom onverwacht gesloten" -#: ../libsoup/soup-cache-input-stream.c:290 +#: ../libsoup/soup-cache-input-stream.c:291 msgid "Failed to completely cache the resource" msgstr "Volledig bufferen van de bron is mislukt" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Uitvoerbuffer is te klein" @@ -55,55 +56,126 @@ msgstr "Kan HTTP-antwoord niet verwerken" msgid "Unrecognized HTTP response encoding" msgstr "Niet-herkende HTTP-antwoordcodering" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Bewerking is geannuleerd" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Hoofding te groot" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "Bewerking zou blokkeren" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Bewerking is geannuleerd" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Kan HTTP-aanvraag niet verwerken" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Geen URI aangeleverd" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "Ongeldige ‘%s’-URI: %s" -#: ../libsoup/soup-session.c:4259 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Kan geen TLS-server aanmaken zonder een TLS-certificaat" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Could not parse URI '%s'" +msgid "Could not listen on address %s, port %d: " +msgstr "Kan niet luisteren op adres %s, poort %d: " + +#: ../libsoup/soup-session.c:4524 +#, c-format +msgid "Could not parse URI “%s”" msgstr "Kon URI ‘%s’ niet verwerken" -#: ../libsoup/soup-session.c:4296 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "Niet-ondersteund URI-schema ‘%s’." +msgid "Unsupported URI scheme “%s”" +msgstr "Niet-ondersteund URI-schema ‘%s’" -#: ../libsoup/soup-session.c:4318 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Geen HTTP-URI" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "De server aanvaardde de WebSocket-handdruk niet." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Kan niet-socket niet importeren als SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Kan bestaande socket niet importeren: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Kan niet-verbonden socket niet importeren" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "WebSocket-handdruk verwacht" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Niet-ondersteunde WebSocket-versie" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Ongeldige WebSocket-sleutel" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Onjuiste WebSocket ‘%s’-hoofding" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Niet-ondersteund WebSocket subprotocol" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "WebSocket-handdruk geweigerd door server" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "WebSocket-handdruk genegeerd door server" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Niet-ondersteund protocol aangevraagd door server" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Niet-ondersteunde uitbreiding aangevraagd door server" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Onjuiste ‘%s’-sleutel weergegeven door server" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Hostnaam is een IP-adres" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Ongeldige hostnaam" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Hostnaam heeft geen basisdomein" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Niet genoeg domeinen" diff --git a/po/oc.po b/po/oc.po new file mode 100644 index 00000000..838e45f0 --- /dev/null +++ b/po/oc.po @@ -0,0 +1,177 @@ +# Occitan translation for libsoup. +# Copyright (C) 2012-2015 libsoup's COPYRIGHT HOLDER +# This file is distributed under the same license as the libsoup package. +# Cédric Valmary , 2015. +# Cédric Valmary (Tot en òc) , 2015. +# Cédric Valmary (totenoc.eu) , 2016. +msgid "" +msgstr "" +"Project-Id-Version: libsoup master\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2016-05-05 20:07+0000\n" +"PO-Revision-Date: 2016-05-05 21:46+0200\n" +"Last-Translator: Cédric Valmary (totenoc.eu) \n" +"Language-Team: Tot En Òc\n" +"Language: oc\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Virtaal 0.7.1\n" +"X-Project-Style: gnome\n" + +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:235 +msgid "Connection terminated unexpectedly" +msgstr "La connexion es estada interrompuda d'un biais imprevist" + +#: ../libsoup/soup-body-input-stream.c:462 +msgid "Invalid seek request" +msgstr "Requèsta de recèrca invalida" + +#: ../libsoup/soup-body-input-stream.c:490 +msgid "Cannot truncate SoupBodyInputStream" +msgstr "Impossible de trocejar lo SoupBodyInputStream" + +#: ../libsoup/soup-cache-input-stream.c:74 +msgid "Network stream unexpectedly closed" +msgstr "Lo flux ret s'es arrestat inopinèament" + +#: ../libsoup/soup-cache-input-stream.c:291 +msgid "Failed to completely cache the resource" +msgstr "Impossible de metre la ressorsa totalament en cache" + +#: ../libsoup/soup-converter-wrapper.c:192 +#, c-format +msgid "Output buffer is too small" +msgstr "La memòria tampon de sortida es tròp pichona" + +#: ../libsoup/soup-message-client-io.c:41 +msgid "Could not parse HTTP response" +msgstr "Impossible d'analisar la responsa HTTP" + +#: ../libsoup/soup-message-client-io.c:66 +msgid "Unrecognized HTTP response encoding" +msgstr "Encodatge de responsa HTTP desconegut" + +#: ../libsoup/soup-message-io.c:392 ../libsoup/soup-message-io.c:1020 +msgid "Operation would block" +msgstr "L'operacion auriá blocat" + +#: ../libsoup/soup-message-io.c:972 ../libsoup/soup-message-io.c:1005 +msgid "Operation was cancelled" +msgstr "L'operacion es estada anullada" + +#: ../libsoup/soup-message-server-io.c:64 +msgid "Could not parse HTTP request" +msgstr "Impossible d'analisar la requèsta HTTP" + +#: ../libsoup/soup-request.c:140 +#, c-format +msgid "No URI provided" +msgstr "Cap d'URI pas provesit" + +#: ../libsoup/soup-request.c:150 +#, c-format +msgid "Invalid '%s' URI: %s" +msgstr "URI « %s » invalid : %s" + +#: ../libsoup/soup-server.c:1720 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "Impossible de crear un servidor TLS sens un certificat TLS" + +#: ../libsoup/soup-server.c:1737 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "Impossible d'escotar l'adreça %s sul pòrt %d: " + +#: ../libsoup/soup-session.c:4525 +#, c-format +msgid "Could not parse URI '%s'" +msgstr "Impossible d'analisar l'URI « %s »" + +#: ../libsoup/soup-session.c:4562 +#, c-format +msgid "Unsupported URI scheme '%s'" +msgstr "L'esquèma d'URI « %s » es pas pres en carga" + +#: ../libsoup/soup-session.c:4584 +#, c-format +msgid "Not an HTTP URI" +msgstr "Es pas un URI HTTP" + +#: ../libsoup/soup-session.c:4770 +msgid "The server did not accept the WebSocket handshake." +msgstr "Lo servidor a pas acceptat la negociacion WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can't import non-socket as SoupSocket" +msgstr "Impossible d'importar de contengut non-socket coma SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Impossible d'importar lo connectador ret existent : " + +#: ../libsoup/soup-socket.c:175 +msgid "Can't import unconnected socket" +msgstr "Impossible d'importar lo connectador ret non connectat" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Negociacion WebSocket esperada" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Version de WebSocket pas presa en carga" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Clau WebSocket pas valabla" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket \"%s\" header" +msgstr "Entèsta WebSocket « %s » incorrècta" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Sosprotocòl de WebSocket pas pres en carga" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Lo servidor a regetat la negociacion WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Lo servidor a ignorat la negociacion WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Lo servidor a demandat un protocòl pas pres en carga" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Lo servidor a demandat una extension pas presa en carga" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect \"%s\" key" +msgstr "Lo servidor a renviat una clau « %s » incorrècta" + +#: ../libsoup/soup-tld.c:188 +msgid "Hostname is an IP address" +msgstr "Lo nom d'òste es una adreça IP" + +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 +msgid "Invalid hostname" +msgstr "Nom d'òste invalid" + +#: ../libsoup/soup-tld.c:250 +msgid "Hostname has no base domain" +msgstr "Lo nom d'òste a pas de domeni de basa" + +#: ../libsoup/soup-tld.c:304 +msgid "Not enough domains" +msgstr "Pas pro de domenis" diff --git a/po/or.po b/po/or.po index f6be296d..6ae2f33f 100644 --- a/po/or.po +++ b/po/or.po @@ -1,14 +1,14 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # -# Manoj Kumar Giri , 2012, 2013. +# Manoj Kumar Giri , 2012, 2013, 2014. msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-03-22 18:02+0530\n" +"POT-Creation-Date: 2014-09-15 09:44+0000\n" +"PO-Revision-Date: 2014-09-15 18:37+0530\n" "Last-Translator: Manoj Kumar Giri \n" "Language-Team: Oriya \n" "Language: or\n" @@ -18,25 +18,25 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Lokalize 1.5\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:196 msgid "Connection terminated unexpectedly" msgstr "ସଂଯୋଗଟି ଅପ୍ରତ୍ୟାଶିତ ଭାବରେ ବନ୍ଦ ହୋଇଛି" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "ଅବୈଧ ଅନୁସନ୍ଧାନ ଅନୁରୋଧ" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr " SoupBodyInputStream କୁ ବିଚ୍ଛିନ୍ନ କରିହେବ ନାହିଁ " -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:73 msgid "Network stream unexpectedly closed" msgstr "ନେଟୱର୍କ୍‌ ଧାରା ଅପ୍ରତ୍ୟାଶିତ ଭାବରେ ବନ୍ଦ ହୋଇଛି" -#: ../libsoup/soup-cache-input-stream.c:291 +#: ../libsoup/soup-cache-input-stream.c:290 msgid "Failed to completely cache the resource" msgstr "ଉତ୍ସକୁ ସମ୍ପୂର୍ଣ୍ଣ ଭାବରେ କ୍ୟାଶେ କରିବାରେ ବିଫଳ" @@ -46,7 +46,6 @@ msgid "Output buffer is too small" msgstr "ଫଳାଫଳ ବଫରଟି ଅତି ଛୋଟ ଅଟେ" #: ../libsoup/soup-message-client-io.c:41 -#| msgid "Could not parse URI '%s'" msgid "Could not parse HTTP response" msgstr "HTTP ଉତ୍ତର ବିଶ୍ଳେଷଣ କରିପାରିଲା ନାହିଁ" @@ -54,16 +53,15 @@ msgstr "HTTP ଉତ୍ତର ବିଶ୍ଳେଷଣ କରିପାରିଲ msgid "Unrecognized HTTP response encoding" msgstr "ଅଚିହ୍ନା HTTP ଉତ୍ତର ସାଙ୍କେତିକରଣ" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 +#: ../libsoup/soup-message-io.c:854 ../libsoup/soup-message-io.c:890 msgid "Operation was cancelled" msgstr "ପ୍ରୟୋଗକୁ ବାତିଲ କରାଯାଇଛି" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:901 msgid "Operation would block" msgstr "ପ୍ରୟୋଗଟି ବନ୍ଦ ହୋଇପାରେ" -#: ../libsoup/soup-message-server-io.c:40 -#| msgid "Could not parse URI '%s'" +#: ../libsoup/soup-message-server-io.c:41 msgid "Could not parse HTTP request" msgstr "HTTP ଅନୁରୋଧକୁ ବିଶ୍ଳେଷଣ କରିପାରିଲା ନାହିଁ" @@ -77,34 +75,55 @@ msgstr "କୌଣସି URI ଦିଆଯାଇ ନାହିଁ" msgid "Invalid '%s' URI: %s" msgstr "ଅବୈଧ '%s' URI: %s" -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-server.c:1528 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "TLS ପ୍ରମାଣପତ୍ର ବିନା TLS ସର୍ଭର ସୃଷ୍ଟି କରିପାରିବେ ନାହିଁ" + +#: ../libsoup/soup-server.c:1547 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "ଠିକଣା %s, ପୋର୍ଟ %d ରେ ଶୁଣିପାରିବେ ନାହିଁ: " + +#: ../libsoup/soup-session.c:4466 #, c-format msgid "Could not parse URI '%s'" msgstr "URI '%s'କୁ ବିଶ୍ଳେଷଣ କରିପାରିଲା ନାହିଁ" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4503 #, c-format msgid "Unsupported URI scheme '%s'" msgstr "ଅସମର୍ଥିତ URI ଯୋଜନା '%s'" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4525 #, c-format msgid "Not an HTTP URI" msgstr "ଏହା ଏକ HTTP URI ନୁହଁ" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-socket.c:142 +msgid "Can't import non-socket as SoupSocket" +msgstr "non-socket କୁ SoupSocket ଭାବରେ ଆମଦାନୀ କରିପାରିବେ ନାହିଁ" + +#: ../libsoup/soup-socket.c:160 +msgid "Could not import existing socket: " +msgstr "ସ୍ଥିତବାନ ସକେଟକୁ ଆମଦାନୀ କରିପାରିବେ ନାହିଁ: " + +#: ../libsoup/soup-socket.c:169 +msgid "Can't import unconnected socket" +msgstr "ଅସଂଯୁକ୍ତ ସକେଟକୁ ଆମଦାନୀ କରିପାରିବେ ନାହିଁ" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "ହୋଷ୍ଟନାମଟି ଏକ IP ଠିକଣା ଅଟେ" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "ଅବୈଧ ହୋଷ୍ଟ ନାମ" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "ହୋଷ୍ଟ ନାମରେ କୌଣସି ମୂଳ ଡମେନ ନଥାଏ" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "ଯଥେଷ୍ଟ ଡମେନ ନାହିଁ" diff --git a/po/pa.po b/po/pa.po index 3edbf498..aaae94e8 100644 --- a/po/pa.po +++ b/po/pa.po @@ -2,14 +2,14 @@ # Copyright (C) 2012 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. # -# A S Alam , 2012, 2013. +# A S Alam , 2012, 2013, 2014. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-02-26 07:36+0530\n" +"POT-Creation-Date: 2014-09-21 09:39+0000\n" +"PO-Revision-Date: 2014-09-21 08:57-0500\n" "Last-Translator: A S Alam \n" "Language-Team: Punjabi/Panjabi \n" "Language: pa\n" @@ -19,25 +19,25 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Lokalize 1.5\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:196 msgid "Connection terminated unexpectedly" msgstr "ਕੁਨੈਕਸ਼ਨ ਅਚਾਨਕ ਬੰਦ ਹੋ ਗਿਆ" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "ਸੀਕ ਮੰਗ ਗਲਤ ਹੈ" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr "SoupBodyInputStream ਨੂੰ ਛੋਟਾ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:73 msgid "Network stream unexpectedly closed" msgstr "ਨੈੱਟਵਰਕ ਸਟਰੀਮ ਅਚਾਨਕ ਬੰਦ ਹੋਈ" -#: ../libsoup/soup-cache-input-stream.c:291 +#: ../libsoup/soup-cache-input-stream.c:290 msgid "Failed to completely cache the resource" msgstr "ਸਰੋਤ ਨੂੰ ਪੂਰੀ ਕੈਸ਼ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ" @@ -47,7 +47,6 @@ msgid "Output buffer is too small" msgstr "ਆਉਟਪੁੱਟ ਬਫ਼ਰ ਬਹੁਤ ਛੋਟਾ ਹੈ" #: ../libsoup/soup-message-client-io.c:41 -#| msgid "Could not parse URI '%s'" msgid "Could not parse HTTP response" msgstr "HTTP ਨੂੰ ਪਾਰਸ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ" @@ -55,16 +54,15 @@ msgstr "HTTP ਨੂੰ ਪਾਰਸ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿ msgid "Unrecognized HTTP response encoding" msgstr "ਬੇਪਛਾਣ HTTP ਜਵਾਬ ਇੰਕੋਡਿੰਗ" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 +#: ../libsoup/soup-message-io.c:854 ../libsoup/soup-message-io.c:890 msgid "Operation was cancelled" msgstr "ਕਾਰਵਾਈ ਰੱਦ ਕੀਤੀ ਗਈ" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:901 msgid "Operation would block" msgstr "ਕਾਰਵਾਈ ਉੱਤੇ ਪਾਬੰਦੀ ਹੋਵੇਗੀ" -#: ../libsoup/soup-message-server-io.c:40 -#| msgid "Could not parse URI '%s'" +#: ../libsoup/soup-message-server-io.c:41 msgid "Could not parse HTTP request" msgstr "HTTP ਮੰਗ ਨੂੰ ਪਾਰਸ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ" @@ -78,34 +76,55 @@ msgstr "ਕੋਈ URI ਨਹੀਂ ਦਿੱਤਾ" msgid "Invalid '%s' URI: %s" msgstr "ਗਲਤ '%s' URI: %s" -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-server.c:1528 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "TLS ਸਰਟੀਫਿਕੇਟ ਦੇ ਬਿਨਾਂ TLS ਸਰਵਰ ਬਣਾਇਆ ਨਹੀਂ ਜਾ ਸਕਦਾ" + +#: ../libsoup/soup-server.c:1547 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "ਸਿਰਨਾਵਾਂ %s, ਪੋਰਟ %d ਉੱਤੇ ਸੁਣਿਆ ਨਹੀਂ ਜਾ ਸਕਿਆ: " + +#: ../libsoup/soup-session.c:4466 #, c-format msgid "Could not parse URI '%s'" msgstr "URI '%s' ਨੂੰ ਪਾਰਸ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4503 #, c-format msgid "Unsupported URI scheme '%s'" msgstr "ਗ਼ੈਰ-ਸਹਾਇਕ URI ਸਕੀਮ '%s'" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4525 #, c-format msgid "Not an HTTP URI" msgstr "HTTP URI ਨਹੀਂ ਹੈ" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-socket.c:142 +msgid "Can't import non-socket as SoupSocket" +msgstr "SoupSocket ਵਜੋਂ ਗ਼ੈਰ-ਸਾਕਟ ਨੂੰ ਦਰਾਮਦ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ" + +#: ../libsoup/soup-socket.c:160 +msgid "Could not import existing socket: " +msgstr "ਮੌਜੂਦਾ ਸਾਕਟ ਨੂੰ ਦਰਾਮਦ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ: " + +#: ../libsoup/soup-socket.c:169 +msgid "Can't import unconnected socket" +msgstr "ਨਾ-ਕੁਨੈਕਟ ਹੋਈ ਸਾਕਟ ਦਰਾਮਦ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕਦੀ" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "ਹੋਸਟ ਨਾਂ IP ਐਡਰੈਸ ਹੈ" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "ਗਲਤ ਹੋਸਟ-ਨਾਂ" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "ਹੋਸਟ-ਨਾਂ ਲਈ ਬੇਸ ਡੋਮੇਮ ਨਹੀਂ ਹੈ" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "ਲੋੜੀਦੀਆਂ ਡੋਮੇਨ ਨਹੀਂ ਹੈ" diff --git a/po/pl.po b/po/pl.po index be2b5bfe..84c1865d 100644 --- a/po/pl.po +++ b/po/pl.po @@ -1,51 +1,47 @@ -# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -# Aviary.pl -# Jeśli masz jakiekolwiek uwagi odnoszące się do tłumaczenia lub chcesz -# pomóc w jego rozwijaniu i pielęgnowaniu, napisz do nas: -# gnomepl@aviary.pl -# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -# Piotr Drąg , 2012-2013. -# Aviary.pl , 2012-2013. +# Polish translation for libsoup. +# Copyright © 2012-2018 the libsoup authors. +# This file is distributed under the same license as the libsoup package. +# Piotr Drąg , 2012-2018. +# Aviary.pl , 2012-2018. +# msgid "" msgstr "" "Project-Id-Version: libsoup\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-18 16:13+0100\n" -"PO-Revision-Date: 2013-02-18 16:14+0100\n" +"POT-Creation-Date: 2018-02-10 14:42+0100\n" +"PO-Revision-Date: 2018-02-10 14:44+0100\n" "Last-Translator: Piotr Drąg \n" -"Language-Team: Polish \n" +"Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" -"X-Poedit-Language: Polish\n" -"X-Poedit-Country: Poland\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Połączenie zostało nieoczekiwanie zakończone" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Nieprawidłowe żądanie przewinięcia" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "Nie można skrócić SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Strumień sieciowy został nieoczekiwanie zamknięty" #: ../libsoup/soup-cache-input-stream.c:291 msgid "Failed to completely cache the resource" -msgstr "Całkowite umieszczenie zasobu w pamięci podręcznej się nie powiodło" +msgstr "Całkowite umieszczenie zasobu w pamięci podręcznej się nie powiodło" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Bufor wyjściowy jest za mały" @@ -58,55 +54,126 @@ msgstr "Nie można przetworzyć odpowiedzi HTTP" msgid "Unrecognized HTTP response encoding" msgstr "Nierozpoznane kodowanie odpowiedzi HTTP" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Anulowano działanie" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Nagłówek jest za duży" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "Działanie spowodowałoby zablokowanie" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Anulowano działanie" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Nie można przetworzyć żądania HTTP" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Nie podano adresu URI" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 +#, c-format +msgid "Invalid “%s” URI: %s" +msgstr "Nieprawidłowy adres URI „%s”: %s" + +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Nie można utworzyć serwera TLS bez certyfikatu TLS" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "Nieprawidłowy adres URI \"%s\": %s" +msgid "Could not listen on address %s, port %d: " +msgstr "Nie można nasłuchiwać na adresie %s, porcie %d: " -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-session.c:4524 #, c-format -msgid "Could not parse URI '%s'" -msgstr "Nie można przetworzyć adresu URI \"%s\"" +msgid "Could not parse URI “%s”" +msgstr "Nie można przetworzyć adresu URI „%s”" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "Nieobsługiwany schemat adresu URI \"%s\"" +msgid "Unsupported URI scheme “%s”" +msgstr "Nieobsługiwany schemat adresu URI „%s”" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Nie jest adresem URI protokołu HTTP" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Serwer nie przyjął powitania WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Nie można zaimportować niegniazda jako SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Nie można zaimportować istniejącego gniazda: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Nie można zaimportować niepołączonego gniazda" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Oczekiwano powitania WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Nieobsługiwana wersja WebSocket" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Nieprawidłowy klucz WebSocket" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Niepoprawny nagłówek „%s” WebSocket" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Nieobsługiwany podprotokół WebSocket" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Serwer odrzucił powitanie WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Serwer zignorował powitanie WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Serwer zażądał nieobsługiwanego protokołu" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Serwer zażądał nieobsługiwanego rozszerzenia" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Serwer zwrócił niepoprawny klucz „%s”" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Nazwa komputera jest adresem IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Nieprawidłowa nazwa komputera" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" -msgstr "Nazwa komputera nie posiada podstawowej domeny" +msgstr "Nazwa komputera nie ma podstawowej domeny" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Brak wystarczającej liczby domen" diff --git a/po/pt.po b/po/pt.po index 7db149fb..adf94b1a 100644 --- a/po/pt.po +++ b/po/pt.po @@ -3,32 +3,37 @@ # This file is distributed under the same license as the libsoup package. # Duarte Loreto , 2012, 2013. # +# Pedro Albuquerque , 2015. +# msgid "" msgstr "" "Project-Id-Version: 3.8\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-11 22:54+0000\n" -"PO-Revision-Date: 2013-03-11 23:00+0100\n" -"Last-Translator: Duarte Loreto \n" -"Language-Team: Portuguese \n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2015-06-07 22:39+0000\n" +"PO-Revision-Date: 2015-06-24 09:25+0100\n" +"Last-Translator: Pedro Albuquerque \n" +"Language-Team: Português \n" "Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Gtranslator 2.91.6\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:235 msgid "Connection terminated unexpectedly" msgstr "Ligação terminou inesperadamente" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "Pedido de procura inválido" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" -msgstr "Incapaz de truncar SoupBodyInputStream" +msgstr "Impossível truncar SoupBodyInputStream" #: ../libsoup/soup-cache-input-stream.c:74 msgid "Network stream unexpectedly closed" @@ -45,23 +50,23 @@ msgstr "Buffer de resultado é demasiado pequeno" #: ../libsoup/soup-message-client-io.c:41 msgid "Could not parse HTTP response" -msgstr "Incapaz de processar a resposta HTTP" +msgstr "Impossível processar a resposta HTTP" #: ../libsoup/soup-message-client-io.c:66 msgid "Unrecognized HTTP response encoding" msgstr "Codificação de resposta HTTP desconhecida" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "A operação foi cancelada" - -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:392 ../libsoup/soup-message-io.c:1020 msgid "Operation would block" msgstr "A operação iria bloquear" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:972 ../libsoup/soup-message-io.c:1005 +msgid "Operation was cancelled" +msgstr "A operação foi cancelada" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" -msgstr "Incapaz de processar o pedido HTTP" +msgstr "Impossível processar o pedido HTTP" #: ../libsoup/soup-request.c:140 #, c-format @@ -71,35 +76,102 @@ msgstr "Nenhum URI especificado" #: ../libsoup/soup-request.c:150 #, c-format msgid "Invalid '%s' URI: %s" -msgstr "URI '%s' inválido: %s" +msgstr "URI \"%s\" inválido: %s" + +#: ../libsoup/soup-server.c:1711 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "Impossível criar um servidor TLS sem um certificado TLS" -#: ../libsoup/soup-session.c:4252 +#: ../libsoup/soup-server.c:1730 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "Impossível ouvir no endereço %s, porta %d: " + +#: ../libsoup/soup-session.c:4554 #, c-format msgid "Could not parse URI '%s'" -msgstr "Incapaz de processar o URI '%s'" +msgstr "Impossível processar o URI \"%s\"" -#: ../libsoup/soup-session.c:4289 +#: ../libsoup/soup-session.c:4591 #, c-format msgid "Unsupported URI scheme '%s'" -msgstr "Esquema de URI '%s' não suportado" +msgstr "Esquema de URI \"%s\" não suportado" -#: ../libsoup/soup-session.c:4311 +#: ../libsoup/soup-session.c:4613 #, c-format msgid "Not an HTTP URI" msgstr "Não é um URI HTTP" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4797 +msgid "The server did not accept the WebSocket handshake." +msgstr "O servidor não aceitou o handshake WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can't import non-socket as SoupSocket" +msgstr "Impossível importar não socket como SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Impossível importar socket existente: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can't import unconnected socket" +msgstr "Impossível importar socket desligado" + +#: ../libsoup/soup-websocket.c:336 ../libsoup/soup-websocket.c:345 +msgid "WebSocket handshake expected" +msgstr "Esperado handshake WebSocket" + +#: ../libsoup/soup-websocket.c:353 +msgid "Unsupported WebSocket version" +msgstr "Versão WebSocket não suportada" + +#: ../libsoup/soup-websocket.c:362 +msgid "Invalid WebSocket key" +msgstr "Chave WebSocket inválida" + +#: ../libsoup/soup-websocket.c:372 +#, c-format +msgid "Incorrect WebSocket \"%s\" header" +msgstr "Cabeçalho WebSocket \"%s\" incorreto" + +#: ../libsoup/soup-websocket.c:381 +msgid "Unsupported WebSocket subprotocol" +msgstr "Subprotocolo WebSocket não suportado" + +#: ../libsoup/soup-websocket.c:508 +msgid "Server rejected WebSocket handshake" +msgstr "O servidor rejeitou o handshake WebSocket" + +#: ../libsoup/soup-websocket.c:516 ../libsoup/soup-websocket.c:525 +msgid "Server ignored WebSocket handshake" +msgstr "O servidor ignorou o handshake WebSocket" + +#: ../libsoup/soup-websocket.c:537 +msgid "Server requested unsupported protocol" +msgstr "O servidor pediu um protocolo não suportado" + +#: ../libsoup/soup-websocket.c:547 +msgid "Server requested unsupported extension" +msgstr "O servidor pediu uma extensão não suportada" + +#: ../libsoup/soup-websocket.c:560 +#, c-format +msgid "Server returned incorrect \"%s\" key" +msgstr "O servidor devolveu uma chave \"%s\" incorreta" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Nome da máquina é um endereço IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Nome de máquina inválido" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Nome de máquina não possui domínio base" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Domínios insuficientes" diff --git a/po/pt_BR.po b/po/pt_BR.po index c567838b..f09b5a3a 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -1,39 +1,41 @@ # Brazilian Portuguese translation for libsoup. -# Copyright (C) 2013 libsoup's COPYRIGHT HOLDER +# Copyright (C) 2018 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. # Gabriel F. Vilar , 2012. -# Enrico Nicoletto , 2013. +# Enrico Nicoletto , 2013, 2014. +# Rafael Fontenelle , 2015, 2017, 2018. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-03-06 19:50+0000\n" -"PO-Revision-Date: 2013-02-28 10:19-0300\n" -"Last-Translator: Enrico Nicoletto \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?product=libsou" +"p&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-02-16 14:47-0200\n" +"Last-Translator: Rafael Fontenelle \n" "Language-Team: Brazilian Portuguese \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Poedit 1.5.4\n" +"X-Generator: Virtaal 1.0.0-beta1\n" +"X-Project-Style: gnome\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "A conexão terminou inesperadamente" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Requisição de busca inválida" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "Não foi possível truncar SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "O fluxo de rede fechou de forma inesperada" @@ -41,7 +43,7 @@ msgstr "O fluxo de rede fechou de forma inesperada" msgid "Failed to completely cache the resource" msgstr "Falha ao armazenar completamente em cache o recurso" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "O buffer de saída é muito pequeno" @@ -54,55 +56,126 @@ msgstr "Não foi possível analisar a resposta HTTP" msgid "Unrecognized HTTP response encoding" msgstr "Codificação de resposta HTTP não reconhecível" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "A operação foi cancelada" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Cabeçalho grande demais" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "A operação será bloqueada" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "A operação foi cancelada" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Não foi possível analisar a solicitação HTTP" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Nenhuma URI foi fornecida" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 +#, c-format +msgid "Invalid “%s” URI: %s" +msgstr "URI “%s” inválida: %s" + +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Não foi possível criar um servidor TLS sem um certificado TLS" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "URI: %s inválida '%s'" +msgid "Could not listen on address %s, port %d: " +msgstr "Não foi possível escutar o endereço %s, porta %d: " -#: ../libsoup/soup-session.c:4208 +#: ../libsoup/soup-session.c:4524 #, c-format -msgid "Could not parse URI '%s'" -msgstr "Não foi possível analisar URI '%s'" +msgid "Could not parse URI “%s”" +msgstr "Não foi possível analisar URI “%s”" -#: ../libsoup/soup-session.c:4245 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "Esquema de URI não suportado '%s'" +msgid "Unsupported URI scheme “%s”" +msgstr "Esquema de URI não suportado “%s”" -#: ../libsoup/soup-session.c:4267 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Não é um URI do tipo HTTP" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "O servidor não aceitou handshake de WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Não foi possível importar um não-soquete como SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Não foi possível importar o soquete existente: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Não foi possível importar soquete desconectado" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Handshake de WebSocket esperado" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Sem suporte à versão WebSocket" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Chave WebSocket inválida" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Cabeçalho WebSocket “%s” incorreto" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Sem suporte ao subprotocolo WebSocket" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "O servidor rejeitou o handshake de WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "O servidor ignorou handshake de WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "O servidor requisitou um protocolo sem suporte" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "O servidor requisitou uma extensão sem suporte" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "O servidor retornou chave “%s” incorreta" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "O nome da máquina é um endereço de IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "O nome da máquina é inválido" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" -msgstr "Nome da máquina não está na base do domínio" +msgstr "O nome da máquina não está na base do domínio" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Não há domínios suficientes" diff --git a/po/ro.po b/po/ro.po index 33fdfa07..d07bb725 100644 --- a/po/ro.po +++ b/po/ro.po @@ -7,11 +7,11 @@ msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libsou" -"p&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2012-05-01 13:45+0000\n" -"PO-Revision-Date: 2012-05-02 13:55+0300\n" -"Last-Translator: Mișu Moldovan \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-04-06 15:20+0000\n" +"PO-Revision-Date: 2018-04-11 20:07+0300\n" +"Last-Translator: Florentina Mușat \n" "Language-Team: Romanian \n" "Language: ro\n" "MIME-Version: 1.0\n" @@ -19,41 +19,164 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " "20)) ? 1 : 2);;\n" -"X-Generator: Virtaal 0.7.0\n" +"X-Generator: Poedit 2.0.6\n" "X-Project-Style: gnome\n" #: ../libsoup/soup-body-input-stream.c:139 #: ../libsoup/soup-body-input-stream.c:170 -#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:227 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Conexiunea s-a terminat neașteptat" -#: ../libsoup/soup-converter-wrapper.c:185 +#: ../libsoup/soup-body-input-stream.c:459 +msgid "Invalid seek request" +msgstr "Cerere de căutare nevalidă" + +#: ../libsoup/soup-body-input-stream.c:487 +msgid "Cannot truncate SoupBodyInputStream" +msgstr "Nu se poate trunchia SoupBodyInputStream" + +#: ../libsoup/soup-cache-input-stream.c:76 +msgid "Network stream unexpectedly closed" +msgstr "Fluxul de rețea s-a închis neașteptat" + +#: ../libsoup/soup-cache-input-stream.c:291 +msgid "Failed to completely cache the resource" +msgstr "Nu s-a putut adăuga complet la cache resursa" + +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" -msgstr "Memoria tampon pentru output e insuficientă" +msgstr "Preîncărcarea de rezultat este prea mică" + +#: ../libsoup/soup-message-client-io.c:41 +msgid "Could not parse HTTP response" +msgstr "Nu s-a putut parsa răspunsul HTTP" -#: ../libsoup/soup-message-io.c:813 +#: ../libsoup/soup-message-client-io.c:66 +msgid "Unrecognized HTTP response encoding" +msgstr "Codare de răspuns HTTP nerecunoscută" + +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Antetul este prea mare" + +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 +msgid "Operation would block" +msgstr "Operația ar bloca" + +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 msgid "Operation was cancelled" -msgstr "Operațiunea a fost anulată" +msgstr "Operația a fost anulată" + +#: ../libsoup/soup-message-server-io.c:64 +msgid "Could not parse HTTP request" +msgstr "Nu s-a putut parsa cererea HTTP" -#: ../libsoup/soup-request.c:145 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" -msgstr "Nu s-a precizat un URI" +msgstr "Nu s-a furnizat un URI" -#: ../libsoup/soup-request.c:155 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "URI nevalid „%s”: %s" -#: ../libsoup/soup-requester.c:220 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Nu se poate crea un server TLS fără un certificat TLS" + +#: ../libsoup/soup-server.c:1742 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "Nu s-a putut asculta la adresa %s, portul %d: " + +#: ../libsoup/soup-session.c:4534 +#, c-format +msgid "Could not parse URI “%s”" +msgstr "Nu s-a putut parsa URI „%s”" + +#: ../libsoup/soup-session.c:4571 #, c-format -msgid "Could not parse URI '%s'" -msgstr "Nu s-a putut prelucra URI-ul „%s”" +msgid "Unsupported URI scheme “%s”" +msgstr "Schemă de URI nesuportată „%s”" -#: ../libsoup/soup-requester.c:254 +#: ../libsoup/soup-session.c:4593 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "Nu există suport pentru schema URI „%s”" +msgid "Not an HTTP URI" +msgstr "Nu este un URI HTTP" + +#: ../libsoup/soup-session.c:4791 +msgid "The server did not accept the WebSocket handshake." +msgstr "Serverul nu a acceptat conectarea WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Nu se poate importa non-soclul ca SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Nu s-a putut importa soclul existent: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Nu se poate importa soclul neconectat" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "S-a așteptat o conectare WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Versiune de WebSocket nesuportată" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Cheie de WebSocket nevalidă" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Antet „%s” de WebSocket incorect" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Subprotocol de WebSocket nesuportat" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Serverul a respins conectarea WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Serverul a ignorat conectarea WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Serverul a cerut un protocol nesuportat" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Serverul a cerut o extensie nesuportată" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Serverul a întors cheia „%s” incorectă" + +#: ../libsoup/soup-tld.c:187 +msgid "Hostname is an IP address" +msgstr "Numele de gazdă este o adresă IP" + +#: ../libsoup/soup-tld.c:197 ../libsoup/soup-tld.c:219 +msgid "Invalid hostname" +msgstr "Nume de gazdă nevalid" + +#: ../libsoup/soup-tld.c:249 +msgid "Hostname has no base domain" +msgstr "Numele de gazdă nu are un domeniu de bază" +#: ../libsoup/soup-tld.c:303 +msgid "Not enough domains" +msgstr "Nu sunt destule domenii" diff --git a/po/ru.po b/po/ru.po index 375b8bc0..a3458b48 100644 --- a/po/ru.po +++ b/po/ru.po @@ -1,40 +1,42 @@ -# Russian translation for libsoup. -# Copyright (C) 2012 libsoup's COPYRIGHT HOLDER -# This file is distributed under the same license as the libsoup package. -# -# Yuri Myasoedov , 2012, 2013. , 2013. +# Russian translation for libsoup. +# Copyright (C) 2012 libsoup's COPYRIGHT HOLDER +# This file is distributed under the same license as the libsoup package. +# +# Yuri Myasoedov , 2012, 2013. +# Stas Solovey , 2015. # msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-03-15 11:36+0000\n" -"PO-Revision-Date: 2013-03-16 22:47+0400\n" -"Last-Translator: Yuri Myasoedov \n" -"Language-Team: русский \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2017-02-23 10:17+0000\n" +"PO-Revision-Date: 2017-03-17 19:33+0400\n" +"Last-Translator: Yuri Myasoedov \n" +"Language-Team: Русский \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Generator: Poedit 1.8.7.1\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:235 msgid "Connection terminated unexpectedly" msgstr "Соединение было неожиданно разорвано" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Неверный запрос поиска" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "Не удалось отсечь SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Сетевой поток неожиданно закрылся" @@ -42,7 +44,7 @@ msgstr "Сетевой поток неожиданно закрылся" msgid "Failed to completely cache the resource" msgstr "Не удалось полностью закэшировать ресурс" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Слишком маленький буфер вывода" @@ -55,55 +57,123 @@ msgstr "Не удалось разобрать HTTP-ответ" msgid "Unrecognized HTTP response encoding" msgstr "Нераспознанная кодировка HTTP-ответа" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Действие отменено" - -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:392 ../libsoup/soup-message-io.c:1020 msgid "Operation would block" msgstr "Действие заблокировано" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:972 ../libsoup/soup-message-io.c:1005 +msgid "Operation was cancelled" +msgstr "Действие отменено" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Не удалось разобрать HTTP-запрос" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Не указан URI" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "Недопустимый URI «%s»: %s" -#: ../libsoup/soup-session.c:4252 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Невозможно создать TLS-сервер без TLS-сертификата" + +#: ../libsoup/soup-server.c:1742 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "Не удалось начать прослушивание по адресу %s (порт — %d): " + +#: ../libsoup/soup-session.c:4518 #, c-format -msgid "Could not parse URI '%s'" +msgid "Could not parse URI “%s”" msgstr "Не удалось разобрать URI «%s»" -#: ../libsoup/soup-session.c:4289 +#: ../libsoup/soup-session.c:4555 #, c-format -msgid "Unsupported URI scheme '%s'" +msgid "Unsupported URI scheme “%s”" msgstr "Неподдерживаемая схема URI «%s»" -#: ../libsoup/soup-session.c:4311 +#: ../libsoup/soup-session.c:4577 #, c-format msgid "Not an HTTP URI" msgstr "Формат URI отличается от HTTP" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4763 +msgid "The server did not accept the WebSocket handshake." +msgstr "Сервер не принимает подтверждение связи WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "" +"Невозможно импортировать объект, отличный от сокета, в качестве SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Не удалось импортировать существующий сокет: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Невозможно импортировать неподключенный сокет" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Ожидается подтверждение связи WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Неподдерживаемая версия WebSocket" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Неверный ключ WebSocket" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Неправильный заголовок WebSocket «%s»" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Неподдерживаемый подпротокол WebSocket" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Сервер отклонил подтверждение связи WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Сервер проигнорировал подтверждение связи WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Сервер запросил неподдерживаемый протокол" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Сервер запросил неподдерживаемое расширение" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Сервер вернул неправильный ключ «%s»" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Имя компьютера является IP-адресом" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Неверное имя компьютера" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Имя компьютера не содержит доменной части" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Недостаточно доменных имён в адресе" diff --git a/po/sk.po b/po/sk.po index cb442ca0..8e03e5a3 100644 --- a/po/sk.po +++ b/po/sk.po @@ -6,10 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: libsoup\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-20 09:40+0000\n" -"PO-Revision-Date: 2013-02-20 20:57+0000\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-03-17 21:37+0100\n" "Last-Translator: Dušan Kazik \n" "Language-Team: Slovak \n" "Language: sk\n" @@ -17,24 +17,24 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 1 : (n>=2 && n<=4) ? 2 : 0;\n" -"X-Generator: Poedit 1.5.4\n" +"X-Generator: Poedit 2.0.6\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Pripojenie bolo neočakávane ukončené" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Neplatná požiadavka na posunutie" # struct -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "SoupBodyInputStream sa nedá skrátiť" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Sieťový prúd bol neočakávane uzavretý" @@ -44,7 +44,7 @@ msgstr "Úplné načítanie zdroja do dočasnej pamäte zlyhalo" # PM: buffer by som preložil ako schránka # PK: schranka je clipboard, buffer je jednoznacne vyrovnavacia pamet -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Výstupná vyrovnávacia pamäť je príliš malá" @@ -57,58 +57,129 @@ msgstr "Nepodarilo sa analyzovať odpoveď HTTP" msgid "Unrecognized HTTP response encoding" msgstr "Nerozpoznané kódovanie odpovede HTTP" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Operácia bola zrušená" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Záhlavie je príliš veľké" # PK: tu neviem ako to povedat, malo by ist o to, ze proste ta operacia neni async -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "Operácia by blokovala spracovanie" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Operácia bola zrušená" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Nepodarilo sa analyzovať požiadavku HTTP" # error -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Nebol poskytnutý identifikátor URI" # first %s - scheme (http, ftp, ...) -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "Neplatná schéma „%s“ identifikátora URI: %s" -#: ../libsoup/soup-session.c:4211 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Nedá sa vytvoriť TLS server bez TLS certifikátu" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Could not parse URI '%s'" +msgid "Could not listen on address %s, port %d: " +msgstr "Nepodarilo sa počúvať na adrese %s, porte %d: " + +#: ../libsoup/soup-session.c:4524 +#, c-format +msgid "Could not parse URI “%s”" msgstr "Nepodarilo sa analyzovať identifikátor URI „%s“" -#: ../libsoup/soup-session.c:4248 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" +msgid "Unsupported URI scheme “%s”" msgstr "Nepodporovaná schéma „%s“ pre identifikátor URI" -#: ../libsoup/soup-session.c:4270 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Nie je HTTP URI" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Server neprijal vyjednanie protokolu WebSocket." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Nedá sa importovať ne-soket ako SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Nepodarilo sa importovať existujúci soket: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Nedá sa importovať nepripojený soket" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Očakávalo sa vyjednanie protokolu WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Nepodporovaná verzia protokolu WebSocket" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Neplatný kľúč protokolu WebSocket" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Nesprávna hlavička „%s“ protokolu Websocket" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Nepodporovaný podprotokol protokolu WebSocket" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Server odmietol vyjednanie protokolu WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Server ignoroval vyjednanie protokolu WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Server si vyžiadal nepodporovaný protokol" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Server si vyžiadal nepodporované rozšírenie" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Server vrátil nesprávny kľúč „%s“" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Názov hostiteľa je adresa IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Neplatný názov hostiteľa" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Názov hostiteľa neobsahuje základnú doménu" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Nedostatočný počet domén" diff --git a/po/sl.po b/po/sl.po index 483f0337..ecded717 100644 --- a/po/sl.po +++ b/po/sl.po @@ -2,15 +2,15 @@ # Copyright (C) 2012 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. # -# Matej Urbančič , 2012. +# Matej Urbančič , 2012–2018. # msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-03-07 15:08+0000\n" -"PO-Revision-Date: 2013-03-07 17:00+0100\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-03-05 17:45+0000\n" +"PO-Revision-Date: 2018-03-06 22:01+0100\n" "Last-Translator: Matej Urbančič \n" "Language-Team: Slovenian \n" "Language: sl\n" @@ -20,23 +20,23 @@ msgstr "" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n" "%100==4 ? 3 : 0);\n" "X-Poedit-SourceCharset: utf-8\n" -"X-Generator: Poedit 1.5.4\n" +"X-Generator: Poedit 2.0.4\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Povezava je nepričakovano končana" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Neveljavna zahteva iskanja" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "Ni mogoče porezati SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Omrežni pretok se je nepričakovano zaprl" @@ -44,7 +44,7 @@ msgstr "Omrežni pretok se je nepričakovano zaprl" msgid "Failed to completely cache the resource" msgstr "Ustvarjanje predpomnilnika vira je spodletelo" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Odvodni medpomnilnik je premajhen." @@ -57,55 +57,153 @@ msgstr "Odziva HTTP ni mogoče razčleniti" msgid "Unrecognized HTTP response encoding" msgstr "Neprepoznano kodiranje odziva HTTP" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Opravilo je preklicano." +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Glava je prevelika" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "Opravilo bi zaustavilo delovanje" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Opravilo je preklicano." + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Zahteve HTTP ni mogoče razčleniti" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Ni podanega naslova URI" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "Neveljaven naslov URI '%s': %s" +msgid "Invalid “%s” URI: %s" +msgstr "Neveljaven naslov URI “%s”: %s" -#: ../libsoup/soup-session.c:4252 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Ni mogoče ustvariti strežnika TLS brez ustreznega potrdila TLS." + +#: ../libsoup/soup-server.c:1742 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "Ni mogoče prisluhniti naslovu %s, vrata %d:" + +#: ../libsoup/soup-session.c:4524 #, c-format -msgid "Could not parse URI '%s'" -msgstr "Ni mogoče razčleniti naslova URI '%s'" +msgid "Could not parse URI “%s”" +msgstr "Ni mogoče razčleniti naslova URI “%s”" -#: ../libsoup/soup-session.c:4289 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "Nepodprta shema URI '%s'" +msgid "Unsupported URI scheme “%s”" +msgstr "Nepodprta shema naslova URI “%s”" -#: ../libsoup/soup-session.c:4311 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Naslov ni v obliki HTTP URI" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Strežnik ne podpira zahteve overitve WebSocket" + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Ni mogoče uvoziti predmeta, ki ni vtič, kot SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Ni mogoče uvoziti obstoječega vtiča:" + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Ni mogoče uvoziti nepovezanega vtiča" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Pričakovana je zahteva overitve z WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Nepodprta različica WebSocket" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Neveljaven ključ WebSocket" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Neveljavna glava WebSocket \"%s\"" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Nepodprt podrejeni protokol WebSocket" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Strežnik je zavrnil zahtevo overitve WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Strežnik je prezrl zahtevo overitve z WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Strežnik zahteva nepodprt protokol" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Strežnik zahteva nepodprto razširitev" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Strežnik je vrnil neveljaven ključ \"%s\"" + +#: ../libsoup/soup-tld.c:187 msgid "Hostname is an IP address" msgstr "Ime gostitelja je naslov IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:197 ../libsoup/soup-tld.c:219 msgid "Invalid hostname" msgstr "Neveljavno ime gostitelja" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:249 msgid "Hostname has no base domain" msgstr "Ime gostitelja je brez osnovne domene" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:303 msgid "Not enough domains" msgstr "Ni dovolj domen" + +#~ msgid "Invalid '%s' URI: %s" +#~ msgstr "Neveljaven naslov URI '%s': %s" + +#~ msgid "Can't create a TLS server without a TLS certificate" +#~ msgstr "Ni mogoče ustvariti strežnika TLS brez ustreznega potrdila TLS." + +#~ msgid "Could not listen on address %s, port %d" +#~ msgstr "Ni mogoče prisluhniti naslovu %s, vrata %d" + +#~ msgid "Could not parse URI '%s'" +#~ msgstr "Ni mogoče razčleniti naslova URI '%s'" + +#~ msgid "Unsupported URI scheme '%s'" +#~ msgstr "Nepodprta shema URI '%s'" + +#~ msgid "Can't import non-socket as SoupSocket" +#~ msgstr "Ni mogoče uvoziti predmeta, ki ni vtič, kot SoupSocket" + +#~ msgid "Can't import unconnected socket" +#~ msgstr "Ni mogoče uvoziti nepovezanega vtiča" + +#~ msgid "Incorrect WebSocket \"%s\" header" +#~ msgstr "Neveljavna glava WebSocket \"%s\"" + +#~ msgid "Server returned incorrect \"%s\" key" +#~ msgstr "Strežnik je vrnil neveljavni ključ \"%s\"" diff --git a/po/sr.po b/po/sr.po index 885af1d3..0848f4c7 100644 --- a/po/sr.po +++ b/po/sr.po @@ -1,47 +1,48 @@ # Serbian translation of libsoup. -# Courtesy of Prevod.org team (http://prevod.org/) -- 2012. +# Courtesy of Prevod.org team (http://prevod.org/) -- 2012—2017. # This file is distributed under the same license as the libsoup package. -# Мирослав Николић , 2011, 2012, 2013. +# Мирослав Николић , 2011—2017. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libsou" -"p&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-02-18 20:11+0200\n" -"Last-Translator: Мирослав Николић \n" -"Language-Team: Serbian \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-02-21 21:49+0100\n" +"Last-Translator: Марко М. Костић \n" +"Language-Team: Serbian <(nothing)>\n" "Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=4; plural=n==1? 3 : n%10==1 && n%100!=11 ? 0 : " -"n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=4; plural=n==1? 3 : n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Project-Style: gnome\n" +"X-Generator: Poedit 2.0.6\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Веза је неочекивано затворена" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Неисправан захтев претраге" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" -msgstr "Не могу да скратим улазни ток тела Супе" +msgstr "Не могу да скратим улазни ток тела Супице" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Мрежни ток је изненадно затворен" #: ../libsoup/soup-cache-input-stream.c:291 msgid "Failed to completely cache the resource" -msgstr "Нисам успео у потпуности да сместим извориште у оставу " +msgstr "Нисам успео у потпуности да сместим извориште у оставу" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Међумеморија излаза је премала" @@ -54,55 +55,126 @@ msgstr "Не могу да обрадим ХТТП одговор" msgid "Unrecognized HTTP response encoding" msgstr "Непознато кодирање ХТТП одговора" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Радња је отказана" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Заглавље је превелико" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "Поступак би блокирао" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Радња је отказана" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Не могу да обрадим ХТТП захтев" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" -msgstr "Није наведена адреса" +msgstr "Није наведена путања" + +#: ../libsoup/soup-request.c:151 +#, c-format +msgid "Invalid “%s” URI: %s" +msgstr "Неисправна „%s“ путања: %s" + +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Не могу да направим ТЛС сервер без ТЛС уверења" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "Неисправна „%s“ адреса: %s" +msgid "Could not listen on address %s, port %d: " +msgstr "Не могу да ослушкујем на адреси „%s“, прикључник %d: " -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-session.c:4524 #, c-format -msgid "Could not parse URI '%s'" -msgstr "Не могу да обрадим адресу „%s“" +msgid "Could not parse URI “%s”" +msgstr "Не могу да обрадим путању „%s“" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "Неподржана „%s“ шема адресе" +msgid "Unsupported URI scheme “%s”" +msgstr "Неподржана „%s“ шема путање" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Није ХТТП путања" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Сервер не прихвата руковање Веб прикључнице." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Не могу да увезем не-прикључницу на прикључници Супице" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Не могу да увезем постојећу прикључницу: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Не могу да увезем неповезану прикључницу" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Очекивано је руковање Веб прикључнице" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Неподржано издање Веб прикључнице" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Неисправан кључ Веб прикључнице" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Неисправно заглавље „%s“ Веб прикључнице" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Неподржан подпротокол Веб прикључнице" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Сервер је одбацио руковање Веб прикључнице" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Сервер је занемарио руковање Веб прикључнице" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Сервер је затражио неподржани протокол" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Сервер је затражио неподржано проширење" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Сервер је вратио неисправан кључ „%s“" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Назив домаћина је ИП адреса" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Неисправан назив домаћина" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Назив домаћина нема основни домен" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Нема довољно домена" diff --git a/po/sr@latin.po b/po/sr@latin.po index 04d8dc0b..f4cb5e3c 100644 --- a/po/sr@latin.po +++ b/po/sr@latin.po @@ -1,47 +1,48 @@ # Serbian translation of libsoup. -# Courtesy of Prevod.org team (http://prevod.org/) -- 2012. +# Courtesy of Prevod.org team (http://prevod.org/) -- 2012—2017. # This file is distributed under the same license as the libsoup package. -# Miroslav Nikolić , 2011, 2012, 2013. +# Miroslav Nikolić , 2011—2017. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libsou" -"p&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-02-18 20:11+0200\n" -"Last-Translator: Miroslav Nikolić \n" -"Language-Team: Serbian \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-21 17:01+0000\n" +"PO-Revision-Date: 2018-02-21 21:49+0100\n" +"Last-Translator: Marko M. Kostić \n" +"Language-Team: Serbian <(nothing)>\n" "Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=4; plural=n==1? 3 : n%10==1 && n%100!=11 ? 0 : " -"n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=4; plural=n==1? 3 : n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Project-Style: gnome\n" +"X-Generator: Poedit 2.0.6\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Veza je neočekivano zatvorena" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "Neispravan zahtev pretrage" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" -msgstr "Ne mogu da skratim ulazni tok tela Supe" +msgstr "Ne mogu da skratim ulazni tok tela Supice" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Mrežni tok je iznenadno zatvoren" #: ../libsoup/soup-cache-input-stream.c:291 msgid "Failed to completely cache the resource" -msgstr "Nisam uspeo u potpunosti da smestim izvorište u ostavu " +msgstr "Nisam uspeo u potpunosti da smestim izvorište u ostavu" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Međumemorija izlaza je premala" @@ -54,55 +55,126 @@ msgstr "Ne mogu da obradim HTTP odgovor" msgid "Unrecognized HTTP response encoding" msgstr "Nepoznato kodiranje HTTP odgovora" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Radnja je otkazana" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Zaglavlje je preveliko" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "Postupak bi blokirao" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Radnja je otkazana" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Ne mogu da obradim HTTP zahtev" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" -msgstr "Nije navedena adresa" +msgstr "Nije navedena putanja" + +#: ../libsoup/soup-request.c:151 +#, c-format +msgid "Invalid “%s” URI: %s" +msgstr "Neispravna „%s“ putanja: %s" + +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Ne mogu da napravim TLS server bez TLS uverenja" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "Neispravna „%s“ adresa: %s" +msgid "Could not listen on address %s, port %d: " +msgstr "Ne mogu da osluškujem na adresi „%s“, priključnik %d: " -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-session.c:4524 #, c-format -msgid "Could not parse URI '%s'" -msgstr "Ne mogu da obradim adresu „%s“" +msgid "Could not parse URI “%s”" +msgstr "Ne mogu da obradim putanju „%s“" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "Nepodržana „%s“ šema adrese" +msgid "Unsupported URI scheme “%s”" +msgstr "Nepodržana „%s“ šema putanje" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "Nije HTTP putanja" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Server ne prihvata rukovanje Veb priključnice." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Ne mogu da uvezem ne-priključnicu na priključnici Supice" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Ne mogu da uvezem postojeću priključnicu: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Ne mogu da uvezem nepovezanu priključnicu" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Očekivano je rukovanje Veb priključnice" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Nepodržano izdanje Veb priključnice" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Neispravan ključ Veb priključnice" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Neispravno zaglavlje „%s“ Veb priključnice" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Nepodržan podprotokol Veb priključnice" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Server je odbacio rukovanje Veb priključnice" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Server je zanemario rukovanje Veb priključnice" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Server je zatražio nepodržani protokol" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Server je zatražio nepodržano proširenje" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Server je vratio neispravan ključ „%s“" + +#: ../libsoup/soup-tld.c:187 msgid "Hostname is an IP address" msgstr "Naziv domaćina je IP adresa" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:197 ../libsoup/soup-tld.c:219 msgid "Invalid hostname" msgstr "Neispravan naziv domaćina" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:249 msgid "Hostname has no base domain" msgstr "Naziv domaćina nema osnovni domen" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:303 msgid "Not enough domains" msgstr "Nema dovoljno domena" diff --git a/po/sv.po b/po/sv.po index 364abfa1..d6ce9c7d 100644 --- a/po/sv.po +++ b/po/sv.po @@ -1,75 +1,180 @@ # Swedish translation for libsoup. -# Copyright (C) 2012 Free Software Foundation, Inc. +# Copyright © 2012-2018 Free Software Foundation, Inc. # This file is distributed under the same license as the libsoup package. # Daniel Nylander , 2012. +# Sebastian Rasmussen , 2015, 2016. +# Anders Jonsson , 2018. # msgid "" msgstr "" "Project-Id-Version: libsoup\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-09-02 12:00+0200\n" -"PO-Revision-Date: 2012-09-02 12:02+0100\n" -"Last-Translator: Daniel Nylander \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-02-09 16:11+0100\n" +"Last-Translator: Anders Jonsson \n" "Language-Team: Swedish \n" -"Language: \n" +"Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.0.5\n" -#: ../libsoup/soup-body-input-stream.c:136 -#: ../libsoup/soup-body-input-stream.c:167 -#: ../libsoup/soup-body-input-stream.c:200 -#: ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Anslutningen avslutades oväntat" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-body-input-stream.c:459 +msgid "Invalid seek request" +msgstr "Ogiltig ”seek”-förfrågan" + +#: ../libsoup/soup-body-input-stream.c:487 +msgid "Cannot truncate SoupBodyInputStream" +msgstr "Kan inte trunkera ”SoupBodyInputStream”" + +#: ../libsoup/soup-cache-input-stream.c:76 +msgid "Network stream unexpectedly closed" +msgstr "Nätverksström stängdes oväntat" + +#: ../libsoup/soup-cache-input-stream.c:291 +msgid "Failed to completely cache the resource" +msgstr "Misslyckades med att helt mellanlagra resursen" + +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Utmatningsbufferten är för liten" -#: ../libsoup/soup-message-io.c:818 -#: ../libsoup/soup-message-io.c:854 -msgid "Operation was cancelled" -msgstr "Åtgärden avbröts" +#: ../libsoup/soup-message-client-io.c:41 +msgid "Could not parse HTTP response" +msgstr "Kunde inte tolka HTTP-svar" + +#: ../libsoup/soup-message-client-io.c:66 +msgid "Unrecognized HTTP response encoding" +msgstr "Okänd kodning på HTTP-svar" -#: ../libsoup/soup-message-io.c:865 +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Huvudet är för stort" + +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "Åtgärden skulle blockera" -#: ../libsoup/soup-request.c:142 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "Åtgärden avbröts" + +#: ../libsoup/soup-message-server-io.c:64 +msgid "Could not parse HTTP request" +msgstr "Kunde inte tolka HTTP-förfrågan" + +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "Ingen URI angavs" -#: ../libsoup/soup-request.c:152 +#: ../libsoup/soup-request.c:151 +#, c-format +msgid "Invalid “%s” URI: %s" +msgstr "Ogiltig ”%s”-URI: %s" + +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Kan inte skapa en TLS-server utan ett TLS-certifikat" + +#: ../libsoup/soup-server.c:1742 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "Kan inte lyssna på adress %s, port %d: " + +#: ../libsoup/soup-session.c:4524 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "Ogiltig \"%s\"-URI: %s" +msgid "Could not parse URI “%s”" +msgstr "Kunde inte tolka URI:n ”%s”" -#: ../libsoup/soup-requester.c:219 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Could not parse URI '%s'" -msgstr "Kunde inte tolka URI:n \"%s\"" +msgid "Unsupported URI scheme “%s”" +msgstr "URI-schemat ”%s” stöds inte" -#: ../libsoup/soup-requester.c:253 +#: ../libsoup/soup-session.c:4583 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "URI-schemat \"%s\" stöds inte" +msgid "Not an HTTP URI" +msgstr "Inte en HTTP-URI" -#: ../libsoup/soup-tld.c:154 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Servern accepterade inte WebSocket-handskakningen." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Kan inte importera ett icke-uttag (non-socket) som ”SoupSocket”" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Kan inte importera befintligt uttag (socket): " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Kan inte importera ett icke anslutet uttag (socket)" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "WebSocket-handskakning förväntad" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "WebSocket-version stöds ej" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Ogiltig WebSocket-nyckel" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Felaktigt WebSocket ”%s”-huvud" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "WebSocket-underprotokoll stöds ej" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Servern avböjde WebSocket-handskakning" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Servern ignorerade WebSocket-handskakning" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Servern begärde protokoll som ej stöds" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Servern begärde tillägg som ej stöds" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Servern returnerade felaktig ”%s”-nyckel" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Värdnamnet är en IP-adress" -#: ../libsoup/soup-tld.c:175 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Ogiltigt värdnamn" -#: ../libsoup/soup-tld.c:204 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Värdnamnet har ingen basdomän" -#: ../libsoup/soup-tld.c:226 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Inte tillräckligt många domäner" - diff --git a/po/ta.po b/po/ta.po index 96b82ab4..69128b2b 100644 --- a/po/ta.po +++ b/po/ta.po @@ -3,44 +3,44 @@ # This file is distributed under the same license as the libsoup package. # # Dr.T.Vasudevan , 2012. -# Shantha kumar , 2013. +# Shantha kumar , 2012, 2014. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug." -"cgi?product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-03-25 10:44+0530\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2014-07-19 15:23+0000\n" +"PO-Revision-Date: 2014-09-13 21:44+0630\n" "Last-Translator: Shantha kumar \n" -"Language-Team: Tamil <>\n" +"Language-Team: Tamil \n" "Language: ta\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.0\n" +"X-Generator: Lokalize 1.5\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:196 msgid "Connection terminated unexpectedly" msgstr "இணைப்பு எதிர்பாராமல் துண்டிக்கப்பட்டது" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" -msgstr "செல்லுபடியாகாத தேடல் கோரிக்கை" +msgstr "தவறான தேடும் கோரிக்கை" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" -msgstr "SoupBodyInputStream ஐ பிரிக்க இயலாது" +msgstr "SoupBodyInputStream ஐ தசமிடமுடியவில்லை" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:73 msgid "Network stream unexpectedly closed" -msgstr "பிணைய ஸ்ட்ரீம் எதிர்பாராமல் முடிந்துவிட்டது" +msgstr "பிணைய ஸ்ட்ரீம் எதிர்பாரா விதமாக மூடப்பட்டது" -#: ../libsoup/soup-cache-input-stream.c:291 +#: ../libsoup/soup-cache-input-stream.c:290 msgid "Failed to completely cache the resource" -msgstr "வளத்தை முழுவதுமாக தேக்ககப்படுத்துவதில் தோல்வியடைந்தது" +msgstr "வளத்தை முழுமையாக தேக்ககப்படுத்துதல் தோல்வியடைந்தது" #: ../libsoup/soup-converter-wrapper.c:192 #, c-format @@ -50,24 +50,24 @@ msgstr "வெளியீட்டு இடைநினைவு மிகச #: ../libsoup/soup-message-client-io.c:41 #| msgid "Could not parse URI '%s'" msgid "Could not parse HTTP response" -msgstr "HTTP பதிலை பாகுபடுத்த முடியவில்லை" +msgstr "HTTP பதிலைப் பாகுபடுத்த முடியவில்லை" #: ../libsoup/soup-message-client-io.c:66 msgid "Unrecognized HTTP response encoding" -msgstr "அடையாளம் காண முடியாத HTTP பதிலளிப்பு குறியீடாக்கம்" +msgstr "அறியப்படாத HTTP பதிலளிப்புக் குறியீடாக்கம்" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 +#: ../libsoup/soup-message-io.c:854 ../libsoup/soup-message-io.c:890 msgid "Operation was cancelled" msgstr "செயல்பாடு ரத்து செய்யப்பட்டது" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:901 msgid "Operation would block" msgstr "செயல்பாடு தடை செய்யும்" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-server-io.c:41 #| msgid "Could not parse URI '%s'" msgid "Could not parse HTTP request" -msgstr "HTTP கோரிக்கையை பாகுபடுத்த முடியவில்லை" +msgstr "HTTP கோரிக்கையைப் பாகுபடுத்த முடியவில்லை" #: ../libsoup/soup-request.c:140 #, c-format @@ -79,34 +79,55 @@ msgstr "யூஆர்ஐ ஏதும் தரப்படவில்லை" msgid "Invalid '%s' URI: %s" msgstr "செல்லுபடியாகாத '%s' URI: %s" -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-server.c:1528 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "TLS சான்றிதழ் இல்லாமல் TLS சேவையகத்தை உருவாக்க முடியாது" + +#: ../libsoup/soup-server.c:1547 +#, c-format +msgid "Could not listen on address %s, port %d" +msgstr "முகவரி %s, துறை %d இல் கவனிக்க முடியவில்லை" + +#: ../libsoup/soup-session.c:4466 #, c-format msgid "Could not parse URI '%s'" msgstr "'%s' யூஆர்ஐ ஐ அலகிட முடியவில்லை" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4503 #, c-format msgid "Unsupported URI scheme '%s'" msgstr "ஆதரவு இல்லாத யூஆர்ஐ திட்டம் '%s'" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4525 #, c-format msgid "Not an HTTP URI" msgstr "HTTP URI அல்ல" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-socket.c:142 +msgid "Can't import non-socket as SoupSocket" +msgstr "நான் சாக்கெட்டை சூப்சாக்கெட்டாக இறக்குமதி செய்ய முடியாது" + +#: ../libsoup/soup-socket.c:160 +msgid "Could not import existing socket: " +msgstr "முன்பே உள்ள சாக்கெட்டை இறக்குமதி செய்ய முடியாது" + +#: ../libsoup/soup-socket.c:169 +msgid "Can't import unconnected socket" +msgstr "இணைக்கப்படாத சாக்கெட்டை இறக்குமதி செய்ய முடியாது" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "புரவலன் பெயர் ஒரு ஐபி முகவரி" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "செல்லுபடியாகாத கணிணிப்பெயர்" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "புரவலன் பெயருக்கு ஒரு செயற்களம் இல்லை" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "போதிய செயற்களம் இல்லை" diff --git a/po/te.po b/po/te.po index 4b2fed78..f66e4b65 100644 --- a/po/te.po +++ b/po/te.po @@ -3,16 +3,16 @@ # This file is distributed under the same license as the libsoup package. # # Sasi Bhushan Boddepalli , 2012. -# Krishnababu Krothapalli , 2012, 2013. +# Krishnababu Krothapalli , 2012, 2013, 2014. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-03-25 14:39+0530\n" +"POT-Creation-Date: 2014-09-23 09:50+0000\n" +"PO-Revision-Date: 2014-09-23 16:55+0530\n" "Last-Translator: Krishnababu Krothapalli \n" -"Language-Team: Telugu \n" +"Language-Team: Telugu \n" "Language: te\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -20,25 +20,25 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Lokalize 1.5\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:196 msgid "Connection terminated unexpectedly" msgstr "కనెక్షను అనుకోకుండా అంతమైంది" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "చెల్లని సీక్ అభ్యర్ధన" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr "SoupBodyInputStream ట్రంకేట్ చేయలేదు" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:73 msgid "Network stream unexpectedly closed" msgstr "నెట్వర్కు స్ట్రీమ్ అనుకోకుండా మూయబడింది" -#: ../libsoup/soup-cache-input-stream.c:291 +#: ../libsoup/soup-cache-input-stream.c:290 msgid "Failed to completely cache the resource" msgstr "వనరును సంపూర్ణంగా క్యాచీ చేయుటకు విఫలమైంది" @@ -48,7 +48,6 @@ msgid "Output buffer is too small" msgstr "అవుట్పుట్ బఫర్ మరీ చిన్నది" #: ../libsoup/soup-message-client-io.c:41 -#| msgid "Could not parse URI '%s'" msgid "Could not parse HTTP response" msgstr "HTTP స్పందనను పార్శ్ చేయలేక పోయింది" @@ -56,16 +55,15 @@ msgstr "HTTP స్పందనను పార్శ్ చేయలేక ప msgid "Unrecognized HTTP response encoding" msgstr "గుర్తించని HTTP స్పందన యెన్కోడింగ్" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 +#: ../libsoup/soup-message-io.c:854 ../libsoup/soup-message-io.c:890 msgid "Operation was cancelled" msgstr "ఆపరేషన్ రద్దు చేయబడింది" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:901 msgid "Operation would block" msgstr "ఆపరేషన్ బ్లాక్ చేస్తుంది" -#: ../libsoup/soup-message-server-io.c:40 -#| msgid "Could not parse URI '%s'" +#: ../libsoup/soup-message-server-io.c:41 msgid "Could not parse HTTP request" msgstr "HTTP అభ్యర్ధనను పార్స్ చేయలేదు" @@ -79,34 +77,55 @@ msgstr "URl అందించబడలేదు" msgid "Invalid '%s' URI: %s" msgstr "చెల్లని '%s' URI: %s" -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-server.c:1528 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "TLS ధృవీకరణపత్రం లేకుండా TLS సేవిక సృష్టించలేదు" + +#: ../libsoup/soup-server.c:1547 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "చిరునామా %s పైన వినలేదు, పోర్ట్ %d: " + +#: ../libsoup/soup-session.c:4466 #, c-format msgid "Could not parse URI '%s'" msgstr "URI '%s' అన్వయించడం సాధ్యం కాదు" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4503 #, c-format msgid "Unsupported URI scheme '%s'" msgstr "మద్దతు లేని URI స్కీమ్ '%s'" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4525 #, c-format msgid "Not an HTTP URI" msgstr "HTTP URI కాదు" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-socket.c:142 +msgid "Can't import non-socket as SoupSocket" +msgstr "నాన్-సాకెట్‌ను సూప్‌సాకెట్‌గా దిగుమతిచేయలేదు" + +#: ../libsoup/soup-socket.c:160 +msgid "Could not import existing socket: " +msgstr "ఉన్న సాకెట్‌ను దిగుమతిచేయలేదు: " + +#: ../libsoup/soup-socket.c:169 +msgid "Can't import unconnected socket" +msgstr "అనుసంధానించని సాకెట్‌ను దిగుమతిచేయలేదు" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "హోస్ట్ పేరు ఒక IP చిరునామా" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "చెల్లని హోస్ట్ పేరు" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "అతిధేయిపేరు అధార డొమైన్ కలిగిలేదు" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "సరిపోనన్ని డొమైన్ లు" diff --git a/po/tg.po b/po/tg.po index c8332dd7..613771dd 100644 --- a/po/tg.po +++ b/po/tg.po @@ -12,7 +12,7 @@ msgstr "" "PO-Revision-Date: 2013-10-10 16:30+0500\n" "Last-Translator: Victor Ibragimov \n" "Language-Team: \n" -"Language: Tajik\n" +"Language: tg\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/po/th.po b/po/th.po index b2c806a0..28937e0c 100644 --- a/po/th.po +++ b/po/th.po @@ -1,34 +1,36 @@ # Thai translation for libsoup. -# Copyright (C) 2012-2013 Free Software Foundation, Inc. +# Copyright (C) 2012-2015 Free Software Foundation, Inc. # This file is distributed under the same license as the libsoup package. -# Akom Chotiphantawanon , 2012. # Theppitak Karoonboonyanan , 2013. +# Akom Chotiphantawanon , 2012, 2015. # msgid "" msgstr "" "Project-Id-Version: libsoup master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-03-09 11:38+0700\n" -"Last-Translator: Theppitak Karoonboonyanan \n" +"POT-Creation-Date: 2015-07-18 22:38+0000\n" +"PO-Revision-Date: 2015-07-31 10:55+0700\n" +"Last-Translator: Akom Chotiphantawanon \n" "Language-Team: Thai \n" "Language: th\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Gtranslator 2.91.6\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:235 msgid "Connection terminated unexpectedly" msgstr "การเชื่อมต่อยุติกะทันหัน" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "การร้องขอการเลื่อนตำแหน่งไม่ถูกต้อง" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr "ไม่สามารถตัดท้าย SoupBodyInputStream" @@ -53,15 +55,15 @@ msgstr "ไม่สามารถแจงคำตอบ HTTP" msgid "Unrecognized HTTP response encoding" msgstr "ไม่รู้จักรหัสอักขระของคำตอบ HTTP" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "การทำงานถูกยกเลิก" - -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:392 ../libsoup/soup-message-io.c:1020 msgid "Operation would block" msgstr "การทำงานถูกบล็อค" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:972 ../libsoup/soup-message-io.c:1005 +msgid "Operation was cancelled" +msgstr "การทำงานถูกยกเลิก" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "ไม่สามารถแจงคำร้อง HTTP" @@ -75,33 +77,100 @@ msgstr "ไม่ได้ระบุ URI" msgid "Invalid '%s' URI: %s" msgstr "URI '%s' ไม่ถูกต้อง: %s" -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-server.c:1711 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "ไม่สามารถสร้างเซิร์ฟเวอร์ TLS โดยไม่มีใบรับรอง TLS" + +#: ../libsoup/soup-server.c:1730 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "ไม่สามารถรอรับการเชื่อมต่อที่ที่อยู่ %s, พอร์ต %d ได้: " + +#: ../libsoup/soup-session.c:4554 #, c-format msgid "Could not parse URI '%s'" msgstr "ไม่สามารถแจง URI '%s'" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4591 #, c-format msgid "Unsupported URI scheme '%s'" msgstr "ไม่รองรับ URI แบบ '%s'" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4613 #, c-format msgid "Not an HTTP URI" msgstr "ไม่ใช่ URI ของ HTTP" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4797 +msgid "The server did not accept the WebSocket handshake." +msgstr "เซิร์ฟเวอร์ไม่ยอมรับ WebSocket handshake" + +#: ../libsoup/soup-socket.c:148 +msgid "Can't import non-socket as SoupSocket" +msgstr "ไม่สามารถนำเข้าสิ่งที่ไม่ใช่ซ็อกเก็ตให้เป็น SoupSocket ได้" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "ไม่สามารถนำเข้าซ็อกเก็ตที่มีอยู่: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can't import unconnected socket" +msgstr "ไม่สามารถนำเข้าซ็อกเก็ตที่ไม่ได้เชื่อมต่อ" + +#: ../libsoup/soup-websocket.c:336 ../libsoup/soup-websocket.c:345 +msgid "WebSocket handshake expected" +msgstr "ต้องการ WebSocket handshake" + +#: ../libsoup/soup-websocket.c:353 +msgid "Unsupported WebSocket version" +msgstr "ไม่รองรับ WebSocket รุ่นนี้" + +#: ../libsoup/soup-websocket.c:362 +msgid "Invalid WebSocket key" +msgstr "คีย์ WebSocket ไม่ถูกต้อง" + +#: ../libsoup/soup-websocket.c:372 +#, c-format +msgid "Incorrect WebSocket \"%s\" header" +msgstr "ส่วนหัว \"%s\" ของ WebSocket ไม่ถูกต้อง" + +#: ../libsoup/soup-websocket.c:381 +msgid "Unsupported WebSocket subprotocol" +msgstr "พบโพรโทคอลย่อยของ WebSocket ที่ไม่รองรับ" + +#: ../libsoup/soup-websocket.c:508 +msgid "Server rejected WebSocket handshake" +msgstr "เซิร์ฟเวอร์ปฏิเสธ WebSocket handshake" + +#: ../libsoup/soup-websocket.c:516 ../libsoup/soup-websocket.c:525 +msgid "Server ignored WebSocket handshake" +msgstr "เซิร์ฟเวอร์ไม่สนใจ WebSocket handshake" + +#: ../libsoup/soup-websocket.c:537 +msgid "Server requested unsupported protocol" +msgstr "เซิร์ฟเวอร์ร้องขอโพรโทคอลที่ไม่รองรับ" + +#: ../libsoup/soup-websocket.c:547 +msgid "Server requested unsupported extension" +msgstr "เซิร์ฟเวอร์ร้องขอส่วนขยายที่ไม่รองรับ" + +#: ../libsoup/soup-websocket.c:560 +#, c-format +msgid "Server returned incorrect \"%s\" key" +msgstr "เซิร์ฟเวอร์คืนค่าคีย์ \"%s\" ไม่ถูกต้อง" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "ชื่อโฮสต์เป็นหมายเลขไอพี" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "ชื่อโฮสต์ผิดรูปแบบ" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "ชื่อโฮสต์ไม่มีโดเมนฐาน" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "มีโดเมนน้อยเกินไป" diff --git a/po/tr.po b/po/tr.po index 809ebf54..79b7b607 100644 --- a/po/tr.po +++ b/po/tr.po @@ -2,109 +2,184 @@ # Copyright (C) 2012 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. # -# Muhammet Kara , 2012. # Ozan Çağlayan , 2013. +# Necdet Yücel , 2014, 2015. +# Furkan Ahmet Kara , 2017. +# Emin Tufan Çetin , 2017. +# Muhammet Kara , 2012, 2014, 2015, 2018. # msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-04-03 16:00+0000\n" -"PO-Revision-Date: 2013-04-07 22:53+0300\n" -"Last-Translator: Ozan Çağlayan \n" -"Language-Team: Türkçe <>\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-09 14:43+0000\n" +"PO-Revision-Date: 2018-03-11 10:24+0300\n" +"Last-Translator: Muhammet Kara \n" +"Language-Team: Türkçe \n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Gtranslator 2.91.6\n" +"X-Generator: Gtranslator 2.91.7\n" +"X-POOTLE-MTIME: 1433280627.000000\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "Bağlantı beklenmeyen bir şekilde sonlandı" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" -msgstr "Geçersiz arama talebi" +msgstr "Geçersiz arama isteği" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "SoupBodyInputStream kesilemiyor" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "Ağ akışı beklenmeyen bir şekilde sonlandı" #: ../libsoup/soup-cache-input-stream.c:291 msgid "Failed to completely cache the resource" -msgstr "Özkaynak tamamen önbelleğe alınamadı" +msgstr "Özkaynak tümüyle önbelleğe alınamadı" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "Çıkış arabelleği çok küçük" #: ../libsoup/soup-message-client-io.c:41 msgid "Could not parse HTTP response" -msgstr "HTTP cevabı ayrıştırılamadı" +msgstr "HTTP yanıtı ayrıştırılamadı" #: ../libsoup/soup-message-client-io.c:66 msgid "Unrecognized HTTP response encoding" -msgstr "HTTP cevabı tanınmayan bir şekilde kodlanmış" +msgstr "HTTP yanıtı tanınmayan bir şekilde kodlanmış" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "İşlem iptal edildi" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Başlık çok büyük" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "İşlem bloke edebilir" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "İşlem iptal edildi" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" -msgstr "HTTP talebi ayrıştırılamadı" +msgstr "HTTP isteği ayrıştırılamadı" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "URI verilmedi" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 +#, c-format +msgid "Invalid “%s” URI: %s" +msgstr "Geçersiz “%s” URI: %s" + +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "Bir TLS sertifikası olmadan TLS sunucusu oluşturulamaz" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Invalid '%s' URI: %s" -msgstr "Geçersiz '%s' URI: %s" +msgid "Could not listen on address %s, port %d: " +msgstr "%s adresinin %d bağlantı noktası dinlenemedi: " -#: ../libsoup/soup-session.c:4252 +#: ../libsoup/soup-session.c:4524 #, c-format -msgid "Could not parse URI '%s'" -msgstr "URI '%s' ayrıştırılamadı" +msgid "Could not parse URI “%s”" +msgstr "URI “%s” ayrıştırılamadı" -#: ../libsoup/soup-session.c:4289 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "Desteklenmeyen URI şeması '%s'" +msgid "Unsupported URI scheme “%s”" +msgstr "Desteklenmeyen URI şeması “%s”" -#: ../libsoup/soup-session.c:4311 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "HTTP URI değil" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "Sunucu WebSocket el sıkışmasını kabul etmedi." + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "Non-socket, SoupSocket olarak içe aktarılamıyor" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Mevcut soket içe aktarılamadı: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "Bağlı olmayan soket içe aktarılamıyor" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "WebSocket el sıkışması bekleniyor" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Desteklenmeyen WebSocket sürümü" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Geçersiz WebSocket anahtarı" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "Hatalı WebSocket “%s” başlığı" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Desteklenmeyen WebSocket alt iletişim kuralı" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Sunucu WebSocket el sıkışmasını reddetti" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Sunucu WebSocket el sıkışmasını yoksaydı" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Sunucu desteklenmeyen iletişim kuralı isteğinde bulundu" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Sunucu desteklenmeyen eklenti isteğinde bulundu" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "Sunucu geçersiz “%s” anahtarı döndürdü" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Makine adı bir IP adresi" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Geçersiz makine adı" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Ana makinenin temel etki alanı yok" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Yeterli etki alanı yok" diff --git a/po/ug.po b/po/ug.po index c5c366a6..51447459 100644 --- a/po/ug.po +++ b/po/ug.po @@ -11,7 +11,7 @@ msgstr "" "PO-Revision-Date: 2013-02-22 21:51+0900\n" "Last-Translator: Gheyret Kenji \n" "Language-Team: Uyghur Computer Science Association \n" -"Language: \n" +"Language: ug\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/po/uk.po b/po/uk.po index 7f17ca6f..534da3e5 100644 --- a/po/uk.po +++ b/po/uk.po @@ -1,84 +1,132 @@ # Ukrainian translation for libsoup. # Copyright (C) 2012 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. -# Daniel , 2012. -# Re. , 2012. +# Mykola Tkach , 2014. msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-09-21 10:06+0300\n" -"PO-Revision-Date: 2012-09-21 10:09+0300\n" -"Last-Translator: Re. \n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libsoup&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2014-05-02 14:27+0000\n" +"PO-Revision-Date: 2014-10-17 17:43+0300\n" +"Last-Translator: Mykola Tkach \n" "Language-Team: linux.org.ua\n" "Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" -"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Generator: Virtaal 0.7.1\n" "X-Project-Style: gnome\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 +#: ../libsoup/soup-message-io.c:196 msgid "Connection terminated unexpectedly" msgstr "Несподівано зв'язок розірвано" -#: ../libsoup/soup-body-input-stream.c:461 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "Неправильний запит пошуку" -#: ../libsoup/soup-body-input-stream.c:489 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr "Неможливо вкоротити SoupBodyInputStream" +#: ../libsoup/soup-cache-input-stream.c:73 +msgid "Network stream unexpectedly closed" +msgstr "Мережевий потік несподівано закрився" + +#: ../libsoup/soup-cache-input-stream.c:290 +msgid "Failed to completely cache the resource" +msgstr "Не вдалося повністю закешувати ресурс" + #: ../libsoup/soup-converter-wrapper.c:192 #, c-format msgid "Output buffer is too small" -msgstr "Вихідний буфер надто малий" +msgstr "Вихідний буфер замалий" + +#: ../libsoup/soup-message-client-io.c:41 +msgid "Could not parse HTTP response" +msgstr "Не вдалося розібрати відповідь HTTP" + +#: ../libsoup/soup-message-client-io.c:66 +msgid "Unrecognized HTTP response encoding" +msgstr "Нерозпізнане кодування відповіді HTTP" -#: ../libsoup/soup-message-io.c:818 ../libsoup/soup-message-io.c:854 +#: ../libsoup/soup-message-io.c:854 +#: ../libsoup/soup-message-io.c:890 msgid "Operation was cancelled" msgstr "Операцію скасовано" -#: ../libsoup/soup-message-io.c:865 +#: ../libsoup/soup-message-io.c:901 msgid "Operation would block" -msgstr "Операція заблокує" +msgstr "Операція заблоковано" -#: ../libsoup/soup-request.c:142 +#: ../libsoup/soup-message-server-io.c:41 +msgid "Could not parse HTTP request" +msgstr "Не вдалося розібрати запит HTTP" + +#: ../libsoup/soup-request.c:140 #, c-format msgid "No URI provided" msgstr "Не надано URI" -#: ../libsoup/soup-request.c:152 +#: ../libsoup/soup-request.c:150 #, c-format msgid "Invalid '%s' URI: %s" msgstr "Неправильний «%s» URI: %s" -#: ../libsoup/soup-requester.c:219 +#: ../libsoup/soup-server.c:1528 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "Неможливо створити сервер TLS без сертифікату TLS" + +#: ../libsoup/soup-server.c:1547 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "Не вдалося почати прослуховування за адресою %s (порт — %d): " + +#: ../libsoup/soup-session.c:4424 #, c-format msgid "Could not parse URI '%s'" msgstr "Неможливо розібрати URI «%s»" -#: ../libsoup/soup-requester.c:253 +#: ../libsoup/soup-session.c:4461 #, c-format msgid "Unsupported URI scheme '%s'" msgstr "Непідтримувана схема URI «%s»" -#: ../libsoup/soup-tld.c:154 +#: ../libsoup/soup-session.c:4483 +#, c-format +msgid "Not an HTTP URI" +msgstr "Формат URI відрізняється від HTTP" + +#: ../libsoup/soup-socket.c:141 +msgid "Can't import non-socket as SoupSocket" +msgstr "Неможливо імпортувати об'єкт, що відрізняється від сокету, як SoupSocket" + +#: ../libsoup/soup-socket.c:159 +msgid "Could not import existing socket: " +msgstr "Не вдалося імпортувати наявний сокет: " + +#: ../libsoup/soup-socket.c:168 +msgid "Can't import unconnected socket" +msgstr "Неможливо імпортувати непід'єднаний сокет" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Назва вузла — адреса IP" -#: ../libsoup/soup-tld.c:175 +#: ../libsoup/soup-tld.c:198 +#: ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Неправильна назва вузла" -#: ../libsoup/soup-tld.c:204 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "Назва вузла не містить базового домену" -#: ../libsoup/soup-tld.c:226 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Не вистачає доменів" + diff --git a/po/vi.po b/po/vi.po index f10402e2..5a59ed7d 100644 --- a/po/vi.po +++ b/po/vi.po @@ -1,44 +1,47 @@ # Vietnamese translation for libsoup. -# Copyright (C) 2012 libsoup's COPYRIGHT HOLDER +# Bản dịch tiếng Việt dành cho libsoup. +# Copyright © 2015 GNOME i18n Project for Vietnamese. # This file is distributed under the same license as the libsoup package. # Nguyễn Thái Ngọc Duy , 2012-2013. +# Trần Ngọc Quân , 2015. # msgid "" msgstr "" "Project-Id-Version: libsoup master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-02-18 10:20+0000\n" -"PO-Revision-Date: 2013-03-02 20:44+0700\n" -"Last-Translator: Nguyễn Thái Ngọc Duy \n" -"Language-Team: Vietnamese \n" +"POT-Creation-Date: 2015-09-28 23:41+0000\n" +"PO-Revision-Date: 2015-09-29 07:41+0700\n" +"Last-Translator: Trần Ngọc Quân \n" +"Language-Team: Vietnamese \n" "Language: vi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Gtranslator 2.91.7\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:235 msgid "Connection terminated unexpectedly" msgstr "Kết nối ngắt bất ngờ" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" -msgstr "Yêu cầu di chuyển (seek) không hợp lệ" +msgstr "Yêu cầu di chuyển vị trí đọc (seek) không hợp lệ" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" -msgstr "Không thể cắt SoupBodyInputStream" +msgstr "Không thể cắt ngắn SoupBodyInputStream" #: ../libsoup/soup-cache-input-stream.c:74 msgid "Network stream unexpectedly closed" -msgstr "Luồng mạng đóng bất ngờ" +msgstr "Luồng dữ liệu mạng đã đóng bất ngờ" #: ../libsoup/soup-cache-input-stream.c:291 msgid "Failed to completely cache the resource" -msgstr "Lỗi lưu tạm (cache) toàn bộ tài nguyên" +msgstr "Gặp lỗi khi lưu tạm (cache) toàn bộ tài nguyên" #: ../libsoup/soup-converter-wrapper.c:192 #, c-format @@ -53,15 +56,15 @@ msgstr "Không thể phân tích phản hồi HTTP" msgid "Unrecognized HTTP response encoding" msgstr "Không nhận ra bảng mã phản hồi HTTP" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "Thao tác bị huỷ" - -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:392 ../libsoup/soup-message-io.c:1020 msgid "Operation would block" msgstr "Thao tác có thể treo" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:972 ../libsoup/soup-message-io.c:1005 +msgid "Operation was cancelled" +msgstr "Thao tác bị hủy" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "Không thể phân tích phản hồi HTTP" @@ -73,35 +76,102 @@ msgstr "Chưa có URI" #: ../libsoup/soup-request.c:150 #, c-format msgid "Invalid '%s' URI: %s" -msgstr "URI '%s' không hợp lệ: %s" +msgstr "URI “%s” không hợp lệ: %s" + +#: ../libsoup/soup-server.c:1711 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "Không thể tạo máy phục vụ TLS mà không có giấy chứng thực điện tử TLS" + +#: ../libsoup/soup-server.c:1730 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "Không thể lắng nghe trên địa chỉ %s, cổng %d: " -#: ../libsoup/soup-session.c:4209 +#: ../libsoup/soup-session.c:4543 #, c-format msgid "Could not parse URI '%s'" -msgstr "Không thể phân tích URI '%s'" +msgstr "Không thể phân tích URI “%s”" -#: ../libsoup/soup-session.c:4246 +#: ../libsoup/soup-session.c:4580 #, c-format msgid "Unsupported URI scheme '%s'" -msgstr "Không hỗ trợ kiểu URI '%s'" +msgstr "Không hỗ trợ kiểu URI “%s”" -#: ../libsoup/soup-session.c:4268 +#: ../libsoup/soup-session.c:4602 #, c-format msgid "Not an HTTP URI" -msgstr "Không phải HTTP URI" +msgstr "Không phải URI của HTTP" + +#: ../libsoup/soup-session.c:4788 +msgid "The server did not accept the WebSocket handshake." +msgstr "Máy chủ đã không chấp nhận bắt tay WebSocket" + +#: ../libsoup/soup-socket.c:148 +msgid "Can't import non-socket as SoupSocket" +msgstr "Không thể nhập vào SoupSocket một non-socket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "Không thể nhập vào ổ cắm mạng đã có: " + +#: ../libsoup/soup-socket.c:175 +msgid "Can't import unconnected socket" +msgstr "Không thể nhập vào một ổ cắm mạng mà nó chưa kết nối" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "Cần bắt tay WebSocket" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "Phiên bản WebSocket không được hỗ trợ" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "Khóa WebSocket không hợp lệ" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket \"%s\" header" +msgstr "Phần đầu WebSocket \"%s\" không hợp lệ" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "Không hỗ trợ giao thức phụ WebSocket" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "Máy phục vụ từ chối bắt tay WebSocket" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "Máy phục vụ bỏ qua bắt tay WebSocket" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "Máy phục vụ đã yêu cầu giao thức không được hỗ trợ" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "Máy phục vụ đã yêu cầu phần mở rộng không được hỗ trợ" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect \"%s\" key" +msgstr "Máy phục vụ trả về khóa \"%s\" không hợp lệ" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "Tên máy là địa chỉ IP" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "Tên máy không hợp lệ" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" -msgstr "Tên máy không có miền cơ bản" +msgstr "Tên máy không có miền cơ sở" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "Không đủ miền" diff --git a/po/zh_CN.po b/po/zh_CN.po index 3f746aa0..e9493d72 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -1,50 +1,52 @@ # Chinese (China) translation for libsoup. -# Copyright (C) 2012 libsoup's COPYRIGHT HOLDER +# Copyright (C) 2012-2018 libsoup's COPYRIGHT HOLDER # This file is distributed under the same license as the libsoup package. # hmasterwang , 2012. # Alpha Cheng , 2012. # Cheng Lu , 2012. # YunQiang Su , 2012. +# Dingzhong Chen , 2017, 2018. +# Aron Xu , 2018. # msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=libsoup&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-11-11 22:47+0000\n" -"PO-Revision-Date: 2013-09-07 14:07+0700\n" -"Last-Translator: 甘露(Gan Lu) \n" -"Language-Team: Chinese (simplified) \n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-03-03 11:33+0000\n" +"PO-Revision-Date: 2018-03-24 00:37+0800\n" +"Last-Translator: Dingzhong Chen \n" +"Language-Team: Chinese (China) \n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 1.5.4\n" +"X-Generator: Gtranslator 2.91.7\n" -#: ../libsoup/soup-body-input-stream.c:140 -#: ../libsoup/soup-body-input-stream.c:171 -#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:197 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "连接异常终止" -#: ../libsoup/soup-body-input-stream.c:462 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "无效的 seek 请求" -#: ../libsoup/soup-body-input-stream.c:490 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" -msgstr "不能截断(truncate) SoupBodyInputStream" +msgstr "无法截断 (truncate) SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:73 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "网络流意外关闭" -#: ../libsoup/soup-cache-input-stream.c:290 +#: ../libsoup/soup-cache-input-stream.c:291 msgid "Failed to completely cache the resource" msgstr "无法完全缓存该资源" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "输出缓冲区太小" @@ -57,55 +59,126 @@ msgstr "无法解析 HTTP 响应" msgid "Unrecognized HTTP response encoding" msgstr "未识别的 HTTP 响应编码" -#: ../libsoup/soup-message-io.c:855 ../libsoup/soup-message-io.c:891 -msgid "Operation was cancelled" -msgstr "操作被取消" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "Header 太大" -#: ../libsoup/soup-message-io.c:902 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "操作将阻塞" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "操作被取消" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "无法解析 HTTP 请求" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "未提供 URI" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "无效的“%s”URI:%s" -#: ../libsoup/soup-session.c:4302 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "没有 TLS 证书不能创建 TLS 服务器" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Could not parse URI '%s'" -msgstr "无法解析 URI:“%s”" +msgid "Could not listen on address %s, port %d: " +msgstr "不能监听 %s 地址的 %d 端口:" -#: ../libsoup/soup-session.c:4339 +#: ../libsoup/soup-session.c:4524 #, c-format -msgid "Unsupported URI scheme '%s'" -msgstr "不支持的 URI 方案:“%s”" +msgid "Could not parse URI “%s”" +msgstr "无法解析 URI“%s”" -#: ../libsoup/soup-session.c:4361 +#: ../libsoup/soup-session.c:4561 +#, c-format +msgid "Unsupported URI scheme “%s”" +msgstr "不支持的 URI 方案“%s”" + +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "不是一个 HTTP URI" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "服务器不接受 WebSocket 握手。" + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "不能将 non-socket 作为 SoupSocket 导入" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "不能导入已存在的套接字:" + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "不能导入未连接的套接字" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "期待 WebSocket 握手" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "不支持的 WebSocket 版本" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "无效的 WebSocket 密钥" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "不正确的 WebSocket “%s”头" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "不支持的 WebSocket 子协议" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "服务器拒绝 WebSocket 握手" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "服务器忽略 WebSocket 握手" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "服务器请求不支持的协议" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "服务器请求不支持的扩展" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "服务器返回不正确的“%s”密钥" + +#: ../libsoup/soup-tld.c:187 msgid "Hostname is an IP address" msgstr "主机名是一个 IP 地址" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:197 ../libsoup/soup-tld.c:219 msgid "Invalid hostname" msgstr "主机名无效" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:249 msgid "Hostname has no base domain" msgstr "主机名没有基域" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:303 msgid "Not enough domains" msgstr "没有足够的域" diff --git a/po/zh_HK.po b/po/zh_HK.po index f9e17ba7..acaba22a 100644 --- a/po/zh_HK.po +++ b/po/zh_HK.po @@ -6,36 +6,37 @@ msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-01 22:41+0800\n" -"PO-Revision-Date: 2013-03-01 22:41+0800\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2014-08-20 21:41+0000\n" +"PO-Revision-Date: 2014-08-21 18:54+0800\n" "Last-Translator: Chao-Hsiung Liao \n" "Language-Team: Chinese (Hong Kong) \n" -"Language: zh_TW\n" +"Language: zh_HK\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.4\n" +"X-Generator: Poedit 1.6.5\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:140 +#: ../libsoup/soup-body-input-stream.c:171 +#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:196 msgid "Connection terminated unexpectedly" msgstr "連線無預警的關閉了" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:462 msgid "Invalid seek request" msgstr "無效的搜尋要求" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:490 msgid "Cannot truncate SoupBodyInputStream" msgstr "不能截短 SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:73 msgid "Network stream unexpectedly closed" msgstr "網絡串流無預警的關閉了" -#: ../libsoup/soup-cache-input-stream.c:291 +#: ../libsoup/soup-cache-input-stream.c:290 msgid "Failed to completely cache the resource" msgstr "無法完整快取資源" @@ -52,15 +53,15 @@ msgstr "無法解析 HTTP 回應" msgid "Unrecognized HTTP response encoding" msgstr "未辨識的 HTTP 回應編碼" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 +#: ../libsoup/soup-message-io.c:854 ../libsoup/soup-message-io.c:890 msgid "Operation was cancelled" msgstr "操作已被取消" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:901 msgid "Operation would block" msgstr "操作會阻擋" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-server-io.c:41 msgid "Could not parse HTTP request" msgstr "無法解析 HTTP 要求" @@ -74,33 +75,54 @@ msgstr "未提供 URI" msgid "Invalid '%s' URI: %s" msgstr "無效的「%s」URI:%s" -#: ../libsoup/soup-session.c:4211 +#: ../libsoup/soup-server.c:1528 +msgid "Can't create a TLS server without a TLS certificate" +msgstr "沒有 TLS 證書不能建立 TLS 伺服器" + +#: ../libsoup/soup-server.c:1547 +#, c-format +msgid "Could not listen on address %s, port %d: " +msgstr "無法聽取位址 %s,連接埠 %d:" + +#: ../libsoup/soup-session.c:4466 #, c-format msgid "Could not parse URI '%s'" msgstr "無法解析 URI「%s」" -#: ../libsoup/soup-session.c:4248 +#: ../libsoup/soup-session.c:4503 #, c-format msgid "Unsupported URI scheme '%s'" msgstr "不支援的 URI scheme「%s」" -#: ../libsoup/soup-session.c:4270 +#: ../libsoup/soup-session.c:4525 #, c-format msgid "Not an HTTP URI" msgstr "並非 HTTP URI" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-socket.c:142 +msgid "Can't import non-socket as SoupSocket" +msgstr "不能匯入非-socket 做為 SoupSocket" + +#: ../libsoup/soup-socket.c:160 +msgid "Could not import existing socket: " +msgstr "無法匯入現有的 socket:" + +#: ../libsoup/soup-socket.c:169 +msgid "Can't import unconnected socket" +msgstr "不能匯入未連線的 socket" + +#: ../libsoup/soup-tld.c:188 msgid "Hostname is an IP address" msgstr "主機名稱是 IP 位址" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 msgid "Invalid hostname" msgstr "主機名稱無效" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:250 msgid "Hostname has no base domain" msgstr "主機名稱沒有基礎網域" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:304 msgid "Not enough domains" msgstr "沒有足夠的網域" diff --git a/po/zh_TW.po b/po/zh_TW.po index d59a81ca..cae00cdc 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -6,32 +6,33 @@ msgid "" msgstr "" "Project-Id-Version: libsoup master\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-01 22:41+0800\n" -"PO-Revision-Date: 2013-02-28 09:48+0800\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=libsoup&keywords=I18N+L10N&component=Misc\n" +"POT-Creation-Date: 2018-02-26 07:58+0000\n" +"PO-Revision-Date: 2018-02-28 20:56+0800\n" "Last-Translator: Chao-Hsiung Liao \n" "Language-Team: Chinese (Taiwan) \n" "Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.4\n" +"X-Generator: Poedit 2.0.6\n" -#: ../libsoup/soup-body-input-stream.c:141 -#: ../libsoup/soup-body-input-stream.c:172 -#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 +#: ../libsoup/soup-body-input-stream.c:139 +#: ../libsoup/soup-body-input-stream.c:170 +#: ../libsoup/soup-body-input-stream.c:203 ../libsoup/soup-message-io.c:238 msgid "Connection terminated unexpectedly" msgstr "連線無預警的關閉了" -#: ../libsoup/soup-body-input-stream.c:463 +#: ../libsoup/soup-body-input-stream.c:459 msgid "Invalid seek request" msgstr "無效的搜尋要求" -#: ../libsoup/soup-body-input-stream.c:491 +#: ../libsoup/soup-body-input-stream.c:487 msgid "Cannot truncate SoupBodyInputStream" msgstr "不能截短 SoupBodyInputStream" -#: ../libsoup/soup-cache-input-stream.c:74 +#: ../libsoup/soup-cache-input-stream.c:76 msgid "Network stream unexpectedly closed" msgstr "網路串流無預警的關閉了" @@ -39,7 +40,7 @@ msgstr "網路串流無預警的關閉了" msgid "Failed to completely cache the resource" msgstr "無法完整快取資源" -#: ../libsoup/soup-converter-wrapper.c:192 +#: ../libsoup/soup-converter-wrapper.c:189 #, c-format msgid "Output buffer is too small" msgstr "輸出緩衝區太小" @@ -52,55 +53,126 @@ msgstr "無法解析 HTTP 回應" msgid "Unrecognized HTTP response encoding" msgstr "未辨識的 HTTP 回應編碼" -#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 -msgid "Operation was cancelled" -msgstr "操作已被取消" +#: ../libsoup/soup-message-io.c:263 +msgid "Header too big" +msgstr "標頭太大" -#: ../libsoup/soup-message-io.c:893 +#: ../libsoup/soup-message-io.c:396 ../libsoup/soup-message-io.c:1024 msgid "Operation would block" msgstr "操作會阻擋" -#: ../libsoup/soup-message-server-io.c:40 +#: ../libsoup/soup-message-io.c:976 ../libsoup/soup-message-io.c:1009 +msgid "Operation was cancelled" +msgstr "操作已被取消" + +#: ../libsoup/soup-message-server-io.c:64 msgid "Could not parse HTTP request" msgstr "無法解析 HTTP 要求" -#: ../libsoup/soup-request.c:140 +#: ../libsoup/soup-request.c:141 #, c-format msgid "No URI provided" msgstr "未提供 URI" -#: ../libsoup/soup-request.c:150 +#: ../libsoup/soup-request.c:151 #, c-format -msgid "Invalid '%s' URI: %s" +msgid "Invalid “%s” URI: %s" msgstr "無效的「%s」URI:%s" -#: ../libsoup/soup-session.c:4211 +#: ../libsoup/soup-server.c:1725 +msgid "Can’t create a TLS server without a TLS certificate" +msgstr "沒有 TLS 憑證不能建立 TLS 伺服器" + +#: ../libsoup/soup-server.c:1742 #, c-format -msgid "Could not parse URI '%s'" +msgid "Could not listen on address %s, port %d: " +msgstr "無法聽取位址 %s,連接埠 %d:" + +#: ../libsoup/soup-session.c:4524 +#, c-format +msgid "Could not parse URI “%s”" msgstr "無法解析 URI「%s」" -#: ../libsoup/soup-session.c:4248 +#: ../libsoup/soup-session.c:4561 #, c-format -msgid "Unsupported URI scheme '%s'" +msgid "Unsupported URI scheme “%s”" msgstr "不支援的 URI scheme「%s」" -#: ../libsoup/soup-session.c:4270 +#: ../libsoup/soup-session.c:4583 #, c-format msgid "Not an HTTP URI" msgstr "並非 HTTP URI" -#: ../libsoup/soup-tld.c:185 +#: ../libsoup/soup-session.c:4781 +msgid "The server did not accept the WebSocket handshake." +msgstr "伺服器不接受 WebSocket 交握。" + +#: ../libsoup/soup-socket.c:148 +msgid "Can’t import non-socket as SoupSocket" +msgstr "不能匯入非-socket 做為 SoupSocket" + +#: ../libsoup/soup-socket.c:166 +msgid "Could not import existing socket: " +msgstr "無法匯入現有的 socket:" + +#: ../libsoup/soup-socket.c:175 +msgid "Can’t import unconnected socket" +msgstr "不能匯入未連線的 socket" + +#: ../libsoup/soup-websocket.c:338 ../libsoup/soup-websocket.c:347 +msgid "WebSocket handshake expected" +msgstr "預期有 WebSocket 交握" + +#: ../libsoup/soup-websocket.c:355 +msgid "Unsupported WebSocket version" +msgstr "不支援的 WebSocket 版本" + +#: ../libsoup/soup-websocket.c:364 +msgid "Invalid WebSocket key" +msgstr "無效的 WebSocket 金鑰是" + +#: ../libsoup/soup-websocket.c:374 +#, c-format +msgid "Incorrect WebSocket “%s” header" +msgstr "無效的 WebSocket「%s」標頭" + +#: ../libsoup/soup-websocket.c:383 +msgid "Unsupported WebSocket subprotocol" +msgstr "不支援的 WebSocket 子協定" + +#: ../libsoup/soup-websocket.c:510 +msgid "Server rejected WebSocket handshake" +msgstr "伺服器拒絕 WebSocket 交握" + +#: ../libsoup/soup-websocket.c:518 ../libsoup/soup-websocket.c:527 +msgid "Server ignored WebSocket handshake" +msgstr "伺服器忽略 WebSocket 交握" + +#: ../libsoup/soup-websocket.c:539 +msgid "Server requested unsupported protocol" +msgstr "伺服器要求不支援的網路通訊協定" + +#: ../libsoup/soup-websocket.c:549 +msgid "Server requested unsupported extension" +msgstr "伺服器要求不支援的擴充功能" + +#: ../libsoup/soup-websocket.c:562 +#, c-format +msgid "Server returned incorrect “%s” key" +msgstr "伺服器傳回不正確的「%s」金鑰" + +#: ../libsoup/soup-tld.c:187 msgid "Hostname is an IP address" msgstr "主機名稱是 IP 位址" -#: ../libsoup/soup-tld.c:206 +#: ../libsoup/soup-tld.c:197 ../libsoup/soup-tld.c:219 msgid "Invalid hostname" msgstr "主機名稱無效" -#: ../libsoup/soup-tld.c:235 +#: ../libsoup/soup-tld.c:249 msgid "Hostname has no base domain" msgstr "主機名稱沒有基礎網域" -#: ../libsoup/soup-tld.c:257 +#: ../libsoup/soup-tld.c:303 msgid "Not enough domains" msgstr "沒有足夠的網域" diff --git a/tests/Makefile.am b/tests/Makefile.am index a8b9d019..81a72cbc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -41,6 +41,9 @@ test_programs = \ timeout-test \ tld-test \ uri-parsing \ + websocket-test \ + xmlrpc-old-server-test \ + xmlrpc-old-test \ xmlrpc-server-test \ xmlrpc-test @@ -64,22 +67,6 @@ libtest_la_SOURCES = \ LDADD = libtest.la if HAVE_APACHE -if HAVE_APACHE_2_2 -httpd_conf_in = httpd.conf.22.in -else -httpd_conf_in = httpd.conf.24.in -endif -httpd.conf: $(httpd_conf_in) - $(AM_V_GEN) sed -e 's,[@]srcdir@,$(srcdir),' \ - -e 's,[@]builddir@,$(builddir),' \ - -e 's,[@]APACHE_MODULE_DIR@,$(APACHE_MODULE_DIR),' \ - -e 's,[@]APACHE_PHP_MODULE_DIR@,$(APACHE_PHP_MODULE_DIR),' \ - -e 's,[@]APACHE_PHP_MODULE@,$(APACHE_PHP_MODULE),' \ - -e 's,[@]IF_HAVE_PHP@,$(IF_HAVE_PHP),' \ - -e 's,[@]APACHE_SSL_MODULE_DIR@,$(APACHE_SSL_MODULE_DIR),' \ - $< > $@ || rm -f $@ - -BUILT_SOURCES += httpd.conf test_data += \ htdigest \ htpasswd \ @@ -94,8 +81,7 @@ soup-tests.gresource: soup-tests.gresource.xml $(RESOURCES) EXTRA_DIST += \ htdigest \ htpasswd \ - httpd.conf.22.in \ - httpd.conf.24.in \ + httpd.conf.in \ index.txt \ libsoup.supp \ soup-tests.gresource.xml \ @@ -116,21 +102,9 @@ check-local: check-TESTS .PHONY: start-httpd kill-httpd start-httpd: -if HAVE_APACHE_2_2 - @$(APACHE_HTTPD) -d $(abs_srcdir) -c "PidFile `pwd`/httpd.pid" -f `pwd`/httpd.conf -k start; -endif -if HAVE_APACHE_2_4 @$(APACHE_HTTPD) -d $(abs_srcdir) -c "DefaultRuntimeDir `pwd`" -c "PidFile `pwd`/httpd.pid" -f `pwd`/httpd.conf -k start; -endif kill-httpd: -if HAVE_APACHE_2_2 - @if [ -f httpd.pid ]; then \ - $(APACHE_HTTPD) -d $(abs_srcdir) -c "PidFile `pwd`/httpd.pid" -f `pwd`/httpd.conf -k stop; \ - fi -endif -if HAVE_APACHE_2_4 @if [ -f httpd.pid ]; then \ $(APACHE_HTTPD) -d $(abs_srcdir) -c "DefaultRuntimeDir `pwd`" -c "PidFile `pwd`/httpd.pid" -f `pwd`/httpd.conf -k stop; \ fi -endif diff --git a/tests/Makefile.in b/tests/Makefile.in index 5e432785..91f53720 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,9 +93,6 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(top_srcdir)/glib-tap.mk $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/build-aux/depcomp \ - $(top_srcdir)/build-aux/test-driver TESTS = $(am__EXEEXT_1) installed_test_PROGRAMS = $(am__EXEEXT_6) noinst_PROGRAMS = $(am__EXEEXT_7) @@ -115,25 +122,26 @@ check_PROGRAMS = $(am__EXEEXT_5) @ENABLE_INSTALLED_TESTS_TRUE@ $(dist_installed_test_data) @ENABLE_INSTALLED_TESTS_TRUE@am__append_12 = $(test_ltlibraries) $(installed_test_ltlibraries) @ENABLE_INSTALLED_TESTS_TRUE@am__append_13 = $(installed_test_meta_DATA) -@HAVE_APACHE_TRUE@am__append_14 = httpd.conf -@HAVE_APACHE_TRUE@am__append_15 = \ +@HAVE_APACHE_TRUE@am__append_14 = \ @HAVE_APACHE_TRUE@ htdigest \ @HAVE_APACHE_TRUE@ htpasswd \ @HAVE_APACHE_TRUE@ httpd.conf subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/glibtests.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/intltool.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/glibtests.m4 $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/vapigen.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = httpd.conf CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -189,7 +197,9 @@ am__EXEEXT_1 = auth-test$(EXEEXT) cache-test$(EXEEXT) \ server-test$(EXEEXT) sniffing-test$(EXEEXT) \ socket-test$(EXEEXT) ssl-test$(EXEEXT) streaming-test$(EXEEXT) \ timeout-test$(EXEEXT) tld-test$(EXEEXT) uri-parsing$(EXEEXT) \ - xmlrpc-server-test$(EXEEXT) xmlrpc-test$(EXEEXT) + websocket-test$(EXEEXT) xmlrpc-old-server-test$(EXEEXT) \ + xmlrpc-old-test$(EXEEXT) xmlrpc-server-test$(EXEEXT) \ + xmlrpc-test$(EXEEXT) am__EXEEXT_2 = $(am__EXEEXT_1) am__EXEEXT_3 = ntlm-test-helper$(EXEEXT) $(am__EXEEXT_2) am__EXEEXT_4 = $(am__EXEEXT_1) $(am__EXEEXT_3) @@ -330,6 +340,18 @@ uri_parsing_SOURCES = uri-parsing.c uri_parsing_OBJECTS = uri-parsing.$(OBJEXT) uri_parsing_LDADD = $(LDADD) uri_parsing_DEPENDENCIES = libtest.la +websocket_test_SOURCES = websocket-test.c +websocket_test_OBJECTS = websocket-test.$(OBJEXT) +websocket_test_LDADD = $(LDADD) +websocket_test_DEPENDENCIES = libtest.la +xmlrpc_old_server_test_SOURCES = xmlrpc-old-server-test.c +xmlrpc_old_server_test_OBJECTS = xmlrpc-old-server-test.$(OBJEXT) +xmlrpc_old_server_test_LDADD = $(LDADD) +xmlrpc_old_server_test_DEPENDENCIES = libtest.la +xmlrpc_old_test_SOURCES = xmlrpc-old-test.c +xmlrpc_old_test_OBJECTS = xmlrpc-old-test.$(OBJEXT) +xmlrpc_old_test_LDADD = $(LDADD) +xmlrpc_old_test_DEPENDENCIES = libtest.la xmlrpc_server_test_SOURCES = xmlrpc-server-test.c xmlrpc_server_test_OBJECTS = xmlrpc-server-test.$(OBJEXT) xmlrpc_server_test_LDADD = $(LDADD) @@ -382,6 +404,7 @@ SOURCES = $(libtest_la_SOURCES) auth-test.c cache-test.c \ resource-test.c server-auth-test.c server-test.c \ session-test.c sniffing-test.c socket-test.c ssl-test.c \ streaming-test.c timeout-test.c tld-test.c uri-parsing.c \ + websocket-test.c xmlrpc-old-server-test.c xmlrpc-old-test.c \ xmlrpc-server-test.c xmlrpc-test.c DIST_SOURCES = $(libtest_la_SOURCES) auth-test.c cache-test.c \ chunk-io-test.c chunk-test.c coding-test.c connection-test.c \ @@ -392,6 +415,7 @@ DIST_SOURCES = $(libtest_la_SOURCES) auth-test.c cache-test.c \ resource-test.c server-auth-test.c server-test.c \ session-test.c sniffing-test.c socket-test.c ssl-test.c \ streaming-test.c timeout-test.c tld-test.c uri-parsing.c \ + websocket-test.c xmlrpc-old-server-test.c xmlrpc-old-test.c \ xmlrpc-server-test.c xmlrpc-test.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ @@ -595,6 +619,9 @@ TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/httpd.conf.in \ + $(top_srcdir)/build-aux/depcomp \ + $(top_srcdir)/build-aux/test-driver $(top_srcdir)/glib-tap.mk DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ @@ -602,7 +629,6 @@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APACHE_HTTPD = @APACHE_HTTPD@ APACHE_MODULE_DIR = @APACHE_MODULE_DIR@ -APACHE_PHP_MODULE = @APACHE_PHP_MODULE@ APACHE_PHP_MODULE_DIR = @APACHE_PHP_MODULE_DIR@ APACHE_SSL_MODULE_DIR = @APACHE_SSL_MODULE_DIR@ AR = @AR@ @@ -614,6 +640,11 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL = @CURL@ @@ -629,6 +660,8 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ @@ -647,6 +680,7 @@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HAVE_GNOME = @HAVE_GNOME@ HTML_DIR = @HTML_DIR@ +IF_HAVE_MOD_UNIXD = @IF_HAVE_MOD_UNIXD@ IF_HAVE_PHP = @IF_HAVE_PHP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -669,6 +703,10 @@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +KRB5_CFLAGS = @KRB5_CFLAGS@ +KRB5_CONFIG = @KRB5_CONFIG@ +KRB5_LIBS = @KRB5_LIBS@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -680,6 +718,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -711,6 +750,7 @@ SOUP_AGE = @SOUP_AGE@ SOUP_API_VERSION = @SOUP_API_VERSION@ SOUP_CURRENT = @SOUP_CURRENT@ SOUP_DEBUG_FLAGS = @SOUP_DEBUG_FLAGS@ +SOUP_HIDDEN_VISIBILITY_CFLAGS = @SOUP_HIDDEN_VISIBILITY_CFLAGS@ SOUP_MAJOR_VERSION = @SOUP_MAJOR_VERSION@ SOUP_MICRO_VERSION = @SOUP_MICRO_VERSION@ SOUP_MINOR_VERSION = @SOUP_MINOR_VERSION@ @@ -719,6 +759,11 @@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ +VALAC = @VALAC@ +VAPIDIR = @VAPIDIR@ +VAPIGEN = @VAPIGEN@ +VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ +VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XML_CFLAGS = @XML_CFLAGS@ @@ -772,6 +817,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -789,15 +835,15 @@ LOG_COMPILER = $(top_srcdir)/tap-test NULL = # initialize variables for unconditional += appending -BUILT_SOURCES = $(am__append_14) +BUILT_SOURCES = BUILT_EXTRA_DIST = CLEANFILES = *.log *.trs $(am__append_13) DISTCLEANFILES = soup-tests.gresource httpd.conf MAINTAINERCLEANFILES = EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) htdigest \ - htpasswd httpd.conf.22.in httpd.conf.24.in index.txt \ - libsoup.supp soup-tests.gresource.xml test-cert.pem \ - test-key.pem xmlrpc-server.php $(RESOURCES) + htpasswd httpd.conf.in index.txt libsoup.supp \ + soup-tests.gresource.xml test-cert.pem test-key.pem \ + xmlrpc-server.php $(RESOURCES) installed_test_LTLIBRARIES = $(am__append_12) installed_test_SCRIPTS = $(am__append_10) nobase_installed_test_DATA = $(am__append_11) @@ -868,6 +914,9 @@ test_programs = \ timeout-test \ tld-test \ uri-parsing \ + websocket-test \ + xmlrpc-old-server-test \ + xmlrpc-old-test \ xmlrpc-server-test \ xmlrpc-test @@ -876,14 +925,12 @@ test_extra_programs = \ $(TESTS) test_data = index.txt soup-tests.gresource test-cert.pem test-key.pem \ - xmlrpc-server.php $(am__append_15) + xmlrpc-server.php $(am__append_14) libtest_la_SOURCES = \ test-utils.c \ test-utils.h LDADD = libtest.la -@HAVE_APACHE_2_2_FALSE@@HAVE_APACHE_TRUE@httpd_conf_in = httpd.conf.24.in -@HAVE_APACHE_2_2_TRUE@@HAVE_APACHE_TRUE@httpd_conf_in = httpd.conf.22.in RESOURCES = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/soup-tests.gresource.xml) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am @@ -902,7 +949,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/glib-tap.mk $(am__co echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tests/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -911,7 +957,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/glib-tap.mk: +$(top_srcdir)/glib-tap.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -921,6 +967,8 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +httpd.conf: $(top_builddir)/config.status $(srcdir)/httpd.conf.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ clean-checkLTLIBRARIES: -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES) @@ -1181,6 +1229,18 @@ uri-parsing$(EXEEXT): $(uri_parsing_OBJECTS) $(uri_parsing_DEPENDENCIES) $(EXTRA @rm -f uri-parsing$(EXEEXT) $(AM_V_CCLD)$(LINK) $(uri_parsing_OBJECTS) $(uri_parsing_LDADD) $(LIBS) +websocket-test$(EXEEXT): $(websocket_test_OBJECTS) $(websocket_test_DEPENDENCIES) $(EXTRA_websocket_test_DEPENDENCIES) + @rm -f websocket-test$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(websocket_test_OBJECTS) $(websocket_test_LDADD) $(LIBS) + +xmlrpc-old-server-test$(EXEEXT): $(xmlrpc_old_server_test_OBJECTS) $(xmlrpc_old_server_test_DEPENDENCIES) $(EXTRA_xmlrpc_old_server_test_DEPENDENCIES) + @rm -f xmlrpc-old-server-test$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xmlrpc_old_server_test_OBJECTS) $(xmlrpc_old_server_test_LDADD) $(LIBS) + +xmlrpc-old-test$(EXEEXT): $(xmlrpc_old_test_OBJECTS) $(xmlrpc_old_test_DEPENDENCIES) $(EXTRA_xmlrpc_old_test_DEPENDENCIES) + @rm -f xmlrpc-old-test$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xmlrpc_old_test_OBJECTS) $(xmlrpc_old_test_LDADD) $(LIBS) + xmlrpc-server-test$(EXEEXT): $(xmlrpc_server_test_OBJECTS) $(xmlrpc_server_test_DEPENDENCIES) $(EXTRA_xmlrpc_server_test_DEPENDENCIES) @rm -f xmlrpc-server-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(xmlrpc_server_test_OBJECTS) $(xmlrpc_server_test_LDADD) $(LIBS) @@ -1264,6 +1324,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeout-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tld-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uri-parsing.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/websocket-test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlrpc-old-server-test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlrpc-old-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlrpc-server-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlrpc-test.Po@am__quote@ @@ -1272,14 +1335,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -1421,7 +1484,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ - else \ + elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ @@ -1756,6 +1819,27 @@ uri-parsing.log: uri-parsing$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +websocket-test.log: websocket-test$(EXEEXT) + @p='websocket-test$(EXEEXT)'; \ + b='websocket-test'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +xmlrpc-old-server-test.log: xmlrpc-old-server-test$(EXEEXT) + @p='xmlrpc-old-server-test$(EXEEXT)'; \ + b='xmlrpc-old-server-test'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +xmlrpc-old-test.log: xmlrpc-old-test$(EXEEXT) + @p='xmlrpc-old-test$(EXEEXT)'; \ + b='xmlrpc-old-test'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) xmlrpc-server-test.log: xmlrpc-server-test$(EXEEXT) @p='xmlrpc-server-test$(EXEEXT)'; \ b='xmlrpc-server-test'; \ @@ -1971,21 +2055,14 @@ uninstall-am: uninstall-installed_testLTLIBRARIES \ uninstall-installed_test_metaDATA \ uninstall-nobase_installed_testDATA +.PRECIOUS: Makefile + @ENABLE_INSTALLED_TESTS_TRUE@%.test: %$(EXEEXT) Makefile @ENABLE_INSTALLED_TESTS_TRUE@ $(AM_V_GEN) (echo '[Test]' > $@.tmp; \ @ENABLE_INSTALLED_TESTS_TRUE@ echo 'Type=session' >> $@.tmp; \ @ENABLE_INSTALLED_TESTS_TRUE@ echo 'Exec=$(installed_testdir)/$<' >> $@.tmp; \ @ENABLE_INSTALLED_TESTS_TRUE@ mv $@.tmp $@) -@HAVE_APACHE_TRUE@httpd.conf: $(httpd_conf_in) -@HAVE_APACHE_TRUE@ $(AM_V_GEN) sed -e 's,[@]srcdir@,$(srcdir),' \ -@HAVE_APACHE_TRUE@ -e 's,[@]builddir@,$(builddir),' \ -@HAVE_APACHE_TRUE@ -e 's,[@]APACHE_MODULE_DIR@,$(APACHE_MODULE_DIR),' \ -@HAVE_APACHE_TRUE@ -e 's,[@]APACHE_PHP_MODULE_DIR@,$(APACHE_PHP_MODULE_DIR),' \ -@HAVE_APACHE_TRUE@ -e 's,[@]APACHE_PHP_MODULE@,$(APACHE_PHP_MODULE),' \ -@HAVE_APACHE_TRUE@ -e 's,[@]IF_HAVE_PHP@,$(IF_HAVE_PHP),' \ -@HAVE_APACHE_TRUE@ -e 's,[@]APACHE_SSL_MODULE_DIR@,$(APACHE_SSL_MODULE_DIR),' \ -@HAVE_APACHE_TRUE@ $< > $@ || rm -f $@ soup-tests.gresource: soup-tests.gresource.xml $(RESOURCES) $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) $< @@ -1998,16 +2075,12 @@ check-local: check-TESTS .PHONY: start-httpd kill-httpd start-httpd: -@HAVE_APACHE_2_2_TRUE@ @$(APACHE_HTTPD) -d $(abs_srcdir) -c "PidFile `pwd`/httpd.pid" -f `pwd`/httpd.conf -k start; -@HAVE_APACHE_2_4_TRUE@ @$(APACHE_HTTPD) -d $(abs_srcdir) -c "DefaultRuntimeDir `pwd`" -c "PidFile `pwd`/httpd.pid" -f `pwd`/httpd.conf -k start; + @$(APACHE_HTTPD) -d $(abs_srcdir) -c "DefaultRuntimeDir `pwd`" -c "PidFile `pwd`/httpd.pid" -f `pwd`/httpd.conf -k start; kill-httpd: -@HAVE_APACHE_2_2_TRUE@ @if [ -f httpd.pid ]; then \ -@HAVE_APACHE_2_2_TRUE@ $(APACHE_HTTPD) -d $(abs_srcdir) -c "PidFile `pwd`/httpd.pid" -f `pwd`/httpd.conf -k stop; \ -@HAVE_APACHE_2_2_TRUE@ fi -@HAVE_APACHE_2_4_TRUE@ @if [ -f httpd.pid ]; then \ -@HAVE_APACHE_2_4_TRUE@ $(APACHE_HTTPD) -d $(abs_srcdir) -c "DefaultRuntimeDir `pwd`" -c "PidFile `pwd`/httpd.pid" -f `pwd`/httpd.conf -k stop; \ -@HAVE_APACHE_2_4_TRUE@ fi + @if [ -f httpd.pid ]; then \ + $(APACHE_HTTPD) -d $(abs_srcdir) -c "DefaultRuntimeDir `pwd`" -c "PidFile `pwd`/httpd.pid" -f `pwd`/httpd.conf -k stop; \ + fi # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/tests/auth-test.c b/tests/auth-test.c index 8ed5cead..1144decf 100644 --- a/tests/auth-test.c +++ b/tests/auth-test.c @@ -414,13 +414,18 @@ digest_nonce_unauthorized (SoupMessage *msg, gpointer data) static void do_digest_nonce_test (SoupSession *session, - const char *nth, const char *uri, + const char *nth, const char *uri, gboolean use_auth_cache, gboolean expect_401, gboolean expect_signal) { SoupMessage *msg; gboolean got_401; msg = soup_message_new (SOUP_METHOD_GET, uri); + if (!use_auth_cache) { + SoupMessageFlags flags = soup_message_get_flags (msg); + + soup_message_set_flags (msg, flags | SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE); + } if (expect_signal) { g_signal_connect (session, "authenticate", G_CALLBACK (digest_nonce_authenticate), @@ -437,6 +442,12 @@ do_digest_nonce_test (SoupSession *session, got_401 ? "got" : "did not get"); soup_test_assert_message_status (msg, SOUP_STATUS_OK); + if (expect_signal) { + g_signal_handlers_disconnect_by_func (session, + G_CALLBACK (digest_nonce_authenticate), + NULL); + } + g_object_unref (msg); } @@ -451,15 +462,15 @@ do_digest_expiration_test (void) session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); uri = g_strconcat (base_uri, "Digest/realm1/", NULL); - do_digest_nonce_test (session, "First", uri, TRUE, TRUE); + do_digest_nonce_test (session, "First", uri, TRUE, TRUE, TRUE); g_free (uri); sleep (2); uri = g_strconcat (base_uri, "Digest/realm1/expire/", NULL); - do_digest_nonce_test (session, "Second", uri, TRUE, FALSE); + do_digest_nonce_test (session, "Second", uri, TRUE, TRUE, FALSE); sleep (1); - do_digest_nonce_test (session, "Third", uri, FALSE, FALSE); + do_digest_nonce_test (session, "Third", uri, TRUE, FALSE, FALSE); sleep (1); - do_digest_nonce_test (session, "Fourth", uri, FALSE, FALSE); + do_digest_nonce_test (session, "Fourth", uri, TRUE, FALSE, FALSE); g_free (uri); soup_test_session_abort_unref (session); @@ -864,12 +875,10 @@ do_select_auth_test (void) * side of this scenario correctly, because we test it against * curl in server-auth-test. */ - server = soup_test_server_new (FALSE); + server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); - - uri = soup_uri_new ("http://127.0.0.1/"); - soup_uri_set_port (uri, soup_server_get_port (server)); + uri = soup_test_server_get_uri (server, "http", NULL); basic_auth_domain = soup_auth_domain_basic_new ( SOUP_AUTH_DOMAIN_REALM, "auth-test", @@ -1012,12 +1021,12 @@ do_auth_close_test (void) SoupURI *uri; AuthCloseData acd; - server = soup_test_server_new (FALSE); + server = soup_test_server_new (SOUP_TEST_SERVER_DEFAULT); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); - uri = soup_uri_new ("http://127.0.0.1/close"); - soup_uri_set_port (uri, soup_server_get_port (server)); + uri = soup_test_server_get_uri (server, "http", NULL); + soup_uri_set_path (uri, "/close"); basic_auth_domain = soup_auth_domain_basic_new ( SOUP_AUTH_DOMAIN_REALM, "auth-test", @@ -1123,14 +1132,13 @@ do_disappearing_auth_test (void) SoupSession *session; int counter; - g_test_bug ("https://bugzilla.redhat.com/show_bug.cgi?id=916224"); + g_test_bug_base ("https://bugzilla.redhat.com/"); + g_test_bug ("916224"); server = soup_test_server_new (FALSE); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); - - uri = soup_uri_new ("http://127.0.0.1/"); - soup_uri_set_port (uri, soup_server_get_port (server)); + uri = soup_test_server_get_uri (server, "http", NULL); auth_domain = soup_auth_domain_basic_new ( SOUP_AUTH_DOMAIN_REALM, "auth-test", @@ -1187,6 +1195,17 @@ static SoupAuthTest relogin_tests[] = { { NULL } }; +/* https://bugzilla.gnome.org/show_bug.cgi?id=755617 */ +static SoupAuthTest basic_root_pspace_test[] = { + { "Auth provided via URL, should succeed", + "BasicRoot", "1", TRUE, "01", SOUP_STATUS_OK }, + + { "Parent dir should automatically reuse auth", + "/", "1", FALSE, "1", SOUP_STATUS_OK }, + + { NULL } +}; + static void do_batch_tests (gconstpointer data) { @@ -1257,6 +1276,220 @@ do_batch_tests (gconstpointer data) soup_test_session_abort_unref (session); } +static void +do_clear_credentials_test (void) +{ + SoupSession *session; + SoupAuthManager *manager; + char *uri; + + SOUP_TEST_SKIP_IF_NO_APACHE; + + session = soup_test_session_new (SOUP_TYPE_SESSION, NULL); + + uri = g_strconcat (base_uri, "Digest/realm1/", NULL); + do_digest_nonce_test (session, "First", uri, TRUE, TRUE, TRUE); + + manager = SOUP_AUTH_MANAGER (soup_session_get_feature (session, SOUP_TYPE_AUTH_MANAGER)); + soup_auth_manager_clear_cached_credentials (manager); + + do_digest_nonce_test (session, "Second", uri, TRUE, TRUE, TRUE); + g_free (uri); + + soup_test_session_abort_unref (session); +} + +static void +do_message_do_not_use_auth_cache_test (void) +{ + SoupSession *session; + SoupAuthManager *manager; + SoupMessage *msg; + SoupMessageFlags flags; + SoupURI *soup_uri; + char *uri; + + SOUP_TEST_SKIP_IF_NO_APACHE; + + session = soup_test_session_new (SOUP_TYPE_SESSION, NULL); + + uri = g_strconcat (base_uri, "Digest/realm1/", NULL); + + /* First check that cached credentials are not used */ + do_digest_nonce_test (session, "First", uri, TRUE, TRUE, TRUE); + do_digest_nonce_test (session, "Second", uri, TRUE, FALSE, FALSE); + do_digest_nonce_test (session, "Third", uri, FALSE, TRUE, TRUE); + + /* Passing credentials in the URI should always authenticate + * no matter whether the cache is used or not + */ + soup_uri = soup_uri_new (uri); + soup_uri_set_user (soup_uri, "user1"); + soup_uri_set_password (soup_uri, "realm1"); + msg = soup_message_new_from_uri (SOUP_METHOD_GET, soup_uri); + flags = soup_message_get_flags (msg); + soup_message_set_flags (msg, flags | SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE); + soup_session_send_message (session, msg); + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + g_object_unref (msg); + soup_uri_free (soup_uri); + + manager = SOUP_AUTH_MANAGER (soup_session_get_feature (session, SOUP_TYPE_AUTH_MANAGER)); + + soup_auth_manager_clear_cached_credentials (manager); + + /* Now check that credentials are not stored */ + do_digest_nonce_test (session, "First", uri, FALSE, TRUE, TRUE); + do_digest_nonce_test (session, "Second", uri, TRUE, TRUE, TRUE); + do_digest_nonce_test (session, "Third", uri, TRUE, FALSE, FALSE); + + /* Credentials were stored for uri, but if we set SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE flag, + * and we don't have the authenticate signal, it should respond with 401 + */ + msg = soup_message_new (SOUP_METHOD_GET, uri); + flags = soup_message_get_flags (msg); + soup_message_set_flags (msg, flags | SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE); + soup_session_send_message (session, msg); + soup_test_assert_message_status (msg, SOUP_STATUS_UNAUTHORIZED); + g_object_unref (msg); + g_free (uri); + + soup_test_session_abort_unref (session); +} + +static void +async_no_auth_cache_authenticate (SoupSession *session, SoupMessage *msg, + SoupAuth *auth, gboolean retrying, SoupAuth **auth_out) +{ + debug_printf (1, " async_no_auth_cache_authenticate\n"); + + soup_session_pause_message (session, msg); + *auth_out = g_object_ref (auth); + g_main_loop_quit (loop); +} + +static void +async_no_auth_cache_finished (SoupSession *session, SoupMessage *msg, gpointer user_data) +{ + debug_printf (1, " async_no_auth_cache_finished\n"); + + g_main_loop_quit (loop); +} + +static void +do_async_message_do_not_use_auth_cache_test (void) +{ + SoupSession *session; + SoupMessage *msg; + char *uri; + SoupAuth *auth = NULL; + SoupMessageFlags flags; + + SOUP_TEST_SKIP_IF_NO_APACHE; + + loop = g_main_loop_new (NULL, TRUE); + session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); + uri = g_strconcat (base_uri, "Basic/realm1/", NULL); + + msg = soup_message_new ("GET", uri); + g_free (uri); + g_signal_connect (session, "authenticate", + G_CALLBACK (async_no_auth_cache_authenticate), &auth); + flags = soup_message_get_flags (msg); + soup_message_set_flags (msg, flags | SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE); + g_object_ref (msg); + soup_session_queue_message (session, msg, async_no_auth_cache_finished, NULL); + g_main_loop_run (loop); + + soup_test_assert_message_status (msg, SOUP_STATUS_UNAUTHORIZED); + + soup_test_assert (auth, "msg didn't get authenticate signal"); + soup_auth_authenticate (auth, "user1", "realm1"); + g_object_unref (auth); + + soup_session_unpause_message (session, msg); + g_main_loop_run (loop); + + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + + soup_test_session_abort_unref (session); + g_object_unref (msg); + g_main_loop_unref (loop); +} + +static void +has_authorization_header_authenticate (SoupSession *session, SoupMessage *msg, + SoupAuth *auth, gboolean retrying, gpointer data) +{ + SoupAuth **saved_auth = data; + + soup_auth_authenticate (auth, "user1", "realm1"); + *saved_auth = g_object_ref (auth); +} + +static void +has_authorization_header_authenticate_assert (SoupSession *session, SoupMessage *msg, + SoupAuth *auth, gboolean retrying, gpointer data) +{ + soup_test_assert (FALSE, "authenticate emitted unexpectedly"); +} + +static void +do_message_has_authorization_header_test (void) +{ + SoupSession *session; + SoupMessage *msg; + SoupAuthManager *manager; + SoupAuth *auth = NULL; + char *token; + guint auth_id; + char *uri; + + g_test_bug ("775882"); + + SOUP_TEST_SKIP_IF_NO_APACHE; + + session = soup_test_session_new (SOUP_TYPE_SESSION, NULL); + uri = g_strconcat (base_uri, "Digest/realm1/", NULL); + + msg = soup_message_new ("GET", uri); + auth_id = g_signal_connect (session, "authenticate", + G_CALLBACK (has_authorization_header_authenticate), &auth); + soup_session_send_message (session, msg); + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + soup_test_assert (SOUP_IS_AUTH (auth), "Expected a SoupAuth"); + token = soup_auth_get_authorization (auth, msg); + g_object_unref (auth); + g_object_unref (msg); + g_signal_handler_disconnect (session, auth_id); + + manager = SOUP_AUTH_MANAGER (soup_session_get_feature (session, SOUP_TYPE_AUTH_MANAGER)); + soup_auth_manager_clear_cached_credentials (manager); + + msg = soup_message_new ("GET", uri); + soup_message_headers_replace (msg->request_headers, "Authorization", token); + auth_id = g_signal_connect (session, "authenticate", + G_CALLBACK (has_authorization_header_authenticate_assert), + NULL); + soup_session_send_message (session, msg); + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + g_object_unref (msg); + + /* Check that we can also provide our own Authorization header when not using credentials cache. */ + soup_auth_manager_clear_cached_credentials (manager); + msg = soup_message_new ("GET", uri); + soup_message_headers_replace (msg->request_headers, "Authorization", token); + soup_message_set_flags (msg, soup_message_get_flags (msg) | SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE); + soup_session_send_message (session, msg); + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + g_object_unref (msg); + g_free (token); + g_signal_handler_disconnect (session, auth_id); + + g_free (uri); + soup_test_session_abort_unref (session); +} + int main (int argc, char **argv) { @@ -1269,6 +1502,7 @@ main (int argc, char **argv) g_test_add_data_func ("/auth/main-tests", main_tests, do_batch_tests); g_test_add_data_func ("/auth/relogin-tests", relogin_tests, do_batch_tests); + g_test_add_data_func ("/auth/basic-root-pspec-test", basic_root_pspace_test, do_batch_tests); g_test_add_func ("/auth/pipelined-auth", do_pipelined_auth_test); g_test_add_func ("/auth/digest-expiration", do_digest_expiration_test); g_test_add_func ("/auth/async-auth/good-password", do_async_auth_good_password_test); @@ -1278,6 +1512,10 @@ main (int argc, char **argv) g_test_add_func ("/auth/auth-close", do_auth_close_test); g_test_add_func ("/auth/infinite-auth", do_infinite_auth_test); g_test_add_func ("/auth/disappearing-auth", do_disappearing_auth_test); + g_test_add_func ("/auth/clear-credentials", do_clear_credentials_test); + g_test_add_func ("/auth/message-do-not-use-auth-cache", do_message_do_not_use_auth_cache_test); + g_test_add_func ("/auth/async-message-do-not-use-auth-cache", do_async_message_do_not_use_auth_cache_test); + g_test_add_func ("/auth/authorization-header-request", do_message_has_authorization_header_test); ret = g_test_run (); diff --git a/tests/cache-test.c b/tests/cache-test.c index 3478f377..7d5897c0 100644 --- a/tests/cache-test.c +++ b/tests/cache-test.c @@ -122,6 +122,7 @@ static char *do_request (SoupSession *session, static gboolean last_request_hit_network; static gboolean last_request_validated; +static gboolean last_request_unqueued; static guint cancelled_requests; static void @@ -152,6 +153,7 @@ do_request (SoupSession *session, GError *error = NULL; last_request_validated = last_request_hit_network = FALSE; + last_request_unqueued = FALSE; uri = soup_uri_new_with_base (base_uri, path); req = soup_session_request_http_uri (session, method, uri, NULL); @@ -181,6 +183,12 @@ do_request (SoupSession *session, g_object_unref (msg); + if (last_request_validated) + last_request_unqueued = FALSE; + else + soup_test_assert (!last_request_unqueued, + "Request unqueued before finishing"); + last_request_hit_network = is_network_stream (stream); g_input_stream_read_all (stream, buf, sizeof (buf), &nread, @@ -219,7 +227,7 @@ do_request_with_cancel (SoupSession *session, GError *error = NULL; GCancellable *cancellable; - last_request_validated = last_request_hit_network = FALSE; + last_request_validated = last_request_hit_network = last_request_unqueued = FALSE; cancelled_requests = 0; uri = soup_uri_new_with_base (base_uri, path); @@ -232,7 +240,8 @@ do_request_with_cancel (SoupSession *session, g_object_unref (stream); g_object_unref (req); return; - } + } else + g_clear_error (&error); g_clear_object (&cancellable); g_clear_object (&stream); @@ -242,8 +251,7 @@ do_request_with_cancel (SoupSession *session, } static void -request_started (SoupSession *session, SoupMessage *msg, - SoupSocket *socket) +message_starting (SoupMessage *msg, gpointer data) { if (soup_message_headers_get_one (msg->request_headers, "If-Modified-Since") || @@ -255,12 +263,22 @@ request_started (SoupSession *session, SoupMessage *msg, } } +static void +request_queued (SoupSession *session, SoupMessage *msg, + gpointer data) +{ + g_signal_connect (msg, "starting", + G_CALLBACK (message_starting), + data); +} + static void request_unqueued (SoupSession *session, SoupMessage *msg, gpointer data) { if (msg->status_code == SOUP_STATUS_CANCELLED) cancelled_requests++; + last_request_unqueued = TRUE; } static void @@ -279,8 +297,11 @@ do_basics_test (gconstpointer data) SOUP_SESSION_USE_THREAD_CONTEXT, TRUE, SOUP_SESSION_ADD_FEATURE, cache, NULL); - g_signal_connect (session, "request-started", - G_CALLBACK (request_started), NULL); + + g_signal_connect (session, "request-queued", + G_CALLBACK (request_queued), NULL); + g_signal_connect (session, "request-unqueued", + G_CALLBACK (request_unqueued), NULL); debug_printf (2, " Initial requests\n"); body1 = do_request (session, base_uri, "GET", "/1", NULL, @@ -288,9 +309,11 @@ do_basics_test (gconstpointer data) NULL); body2 = do_request (session, base_uri, "GET", "/2", NULL, "Test-Set-Last-Modified", "Fri, 01 Jan 2010 00:00:00 GMT", + "Test-Set-Cache-Control", "must-revalidate", NULL); body3 = do_request (session, base_uri, "GET", "/3", NULL, "Test-Set-Last-Modified", "Fri, 01 Jan 2010 00:00:00 GMT", + "Test-Set-Expires", "Sat, 02 Jan 2011 00:00:00 GMT", "Test-Set-Cache-Control", "must-revalidate", NULL); body4 = do_request (session, base_uri, "GET", "/4", NULL, @@ -308,6 +331,8 @@ do_basics_test (gconstpointer data) NULL); soup_test_assert (!last_request_hit_network, "Request for /1 not filled from cache"); + soup_test_assert (last_request_unqueued, + "Cached resource /1 not unqueued"); g_assert_cmpstr (body1, ==, cmp); g_free (cmp); @@ -316,8 +341,13 @@ do_basics_test (gconstpointer data) debug_printf (1, " Heuristically-fresh cached resource\n"); cmp = do_request (session, base_uri, "GET", "/2", NULL, NULL); + /* Not validated even if it has must-revalidate, because it hasn't expired */ + soup_test_assert (!last_request_validated, + "Request for /2 was validated"); soup_test_assert (!last_request_hit_network, "Request for /2 not filled from cache"); + soup_test_assert (last_request_unqueued, + "Cached resource /2 not unqueued"); g_assert_cmpstr (body2, ==, cmp); g_free (cmp); @@ -328,26 +358,33 @@ do_basics_test (gconstpointer data) NULL); soup_test_assert (last_request_hit_network, "Request for /1?attr=value filled from cache"); + soup_test_assert (last_request_unqueued, + "Cached resource /1?attr=value not unqueued"); g_free (cmp); debug_printf (2, " Second request\n"); cmp = do_request (session, base_uri, "GET", "/1", NULL, NULL); soup_test_assert (!last_request_hit_network, "Second request for /1 not filled from cache"); + soup_test_assert (last_request_unqueued, + "Request for /1 not unqueued"); g_assert_cmpstr (body1, ==, cmp); g_free (cmp); - /* Last-Modified + must-revalidate causes a conditional request */ + /* Expired + must-revalidate causes a conditional request */ debug_printf (1, " Unchanged must-revalidate resource w/ Last-Modified\n"); cmp = do_request (session, base_uri, "GET", "/3", NULL, "Test-Set-Last-Modified", "Fri, 01 Jan 2010 00:00:00 GMT", + "Test-Set-Expires", "Sat, 02 Jan 2011 00:00:00 GMT", "Test-Set-Cache-Control", "must-revalidate", NULL); soup_test_assert (last_request_validated, "Request for /3 not validated"); soup_test_assert (!last_request_hit_network, "Request for /3 not filled from cache"); + soup_test_assert (last_request_unqueued, + "Cached resource /3 not unqueued"); g_assert_cmpstr (body3, ==, cmp); g_free (cmp); @@ -356,12 +393,15 @@ do_basics_test (gconstpointer data) debug_printf (1, " Changed must-revalidate resource w/ Last-Modified\n"); cmp = do_request (session, base_uri, "GET", "/3", NULL, "Test-Set-Last-Modified", "Sat, 02 Jan 2010 00:00:00 GMT", + "Test-Set-Expires", "Sat, 02 Jan 2011 00:00:00 GMT", "Test-Set-Cache-Control", "must-revalidate", NULL); soup_test_assert (last_request_validated, "Request for /3 not validated"); soup_test_assert (last_request_hit_network, "Request for /3 filled from cache"); + soup_test_assert (last_request_unqueued, + "Request for /3 not unqueued"); g_assert_cmpstr (body3, !=, cmp); g_free (cmp); @@ -374,6 +414,8 @@ do_basics_test (gconstpointer data) "Second request for /3 not validated"); soup_test_assert (!last_request_hit_network, "Second request for /3 not filled from cache"); + soup_test_assert (last_request_unqueued, + "Cached resource /3 not unqueued"); g_assert_cmpstr (body3, !=, cmp); g_free (cmp); @@ -386,6 +428,8 @@ do_basics_test (gconstpointer data) "Request for /4 not validated"); soup_test_assert (!last_request_hit_network, "Request for /4 not filled from cache"); + soup_test_assert (last_request_unqueued, + "Cached resource /4 not unqueued"); g_assert_cmpstr (body4, ==, cmp); g_free (cmp); @@ -397,6 +441,8 @@ do_basics_test (gconstpointer data) NULL); soup_test_assert (last_request_hit_network, "Request for /5 filled from cache"); + soup_test_assert (last_request_unqueued, + "Request for /5 not unqueued"); g_assert_cmpstr (body5, ==, cmp); g_free (cmp); @@ -455,6 +501,7 @@ do_cancel_test (gconstpointer data) NULL); body2 = do_request (session, base_uri, "GET", "/2", NULL, "Test-Set-Last-Modified", "Fri, 01 Jan 2010 00:00:00 GMT", + "Test-Set-Expires", "Fri, 01 Jan 2011 00:00:00 GMT", "Test-Set-Cache-Control", "must-revalidate", NULL); @@ -463,11 +510,15 @@ do_cancel_test (gconstpointer data) flags = SOUP_TEST_REQUEST_CANCEL_MESSAGE | SOUP_TEST_REQUEST_CANCEL_IMMEDIATE; do_request_with_cancel (session, base_uri, "GET", "/1", flags); g_assert_cmpint (cancelled_requests, ==, 1); + soup_test_assert (last_request_unqueued, + "Cancelled request /1 not unqueued"); debug_printf (1, " Cancel fresh resource with g_cancellable_cancel()\n"); flags = SOUP_TEST_REQUEST_CANCEL_CANCELLABLE | SOUP_TEST_REQUEST_CANCEL_IMMEDIATE; do_request_with_cancel (session, base_uri, "GET", "/1", flags); g_assert_cmpint (cancelled_requests, ==, 1); + soup_test_assert (last_request_unqueued, + "Cancelled request /1 not unqueued"); soup_test_session_abort_unref (session); @@ -483,11 +534,15 @@ do_cancel_test (gconstpointer data) flags = SOUP_TEST_REQUEST_CANCEL_MESSAGE | SOUP_TEST_REQUEST_CANCEL_IMMEDIATE; do_request_with_cancel (session, base_uri, "GET", "/2", flags); g_assert_cmpint (cancelled_requests, ==, 2); + soup_test_assert (last_request_unqueued, + "Cancelled request /2 not unqueued"); debug_printf (1, " Cancel a revalidating resource with g_cancellable_cancel()\n"); flags = SOUP_TEST_REQUEST_CANCEL_CANCELLABLE | SOUP_TEST_REQUEST_CANCEL_IMMEDIATE; do_request_with_cancel (session, base_uri, "GET", "/2", flags); g_assert_cmpint (cancelled_requests, ==, 2); + soup_test_assert (last_request_unqueued, + "Cancelled request /2 not unqueued"); soup_test_session_abort_unref (session); @@ -588,8 +643,8 @@ do_headers_test (gconstpointer data) SOUP_SESSION_ADD_FEATURE, cache, NULL); - g_signal_connect (session, "request-started", - G_CALLBACK (request_started), NULL); + g_signal_connect (session, "request-queued", + G_CALLBACK (request_queued), NULL); debug_printf (2, " Initial requests\n"); body1 = do_request (session, base_uri, "GET", "/1", NULL, @@ -630,6 +685,85 @@ do_headers_test (gconstpointer data) g_free (body1); } +static guint +count_cached_resources_in_dir (const char *cache_dir) +{ + GDir *dir; + const char *name; + guint retval = 0; + + dir = g_dir_open (cache_dir, 0, NULL); + while ((name = g_dir_read_name (dir))) { + if (g_str_has_prefix (name, "soup.")) + continue; + + retval++; + } + g_dir_close (dir); + + return retval; +} + +static void +do_leaks_test (gconstpointer data) +{ + SoupURI *base_uri = (SoupURI *)data; + SoupSession *session; + SoupCache *cache; + char *cache_dir; + char *body; + + cache_dir = g_dir_make_tmp ("cache-test-XXXXXX", NULL); + debug_printf (2, " Caching to %s\n", cache_dir); + cache = soup_cache_new (cache_dir, SOUP_CACHE_SINGLE_USER); + session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, + SOUP_SESSION_USE_THREAD_CONTEXT, TRUE, + SOUP_SESSION_ADD_FEATURE, cache, + NULL); + + debug_printf (2, " Initial requests\n"); + body = do_request (session, base_uri, "GET", "/1", NULL, + "Test-Set-Expires", "Fri, 01 Jan 2100 00:00:00 GMT", + NULL); + g_free (body); + body = do_request (session, base_uri, "GET", "/2", NULL, + "Test-Set-Expires", "Fri, 01 Jan 2100 00:00:00 GMT", + NULL); + g_free (body); + body = do_request (session, base_uri, "GET", "/3", NULL, + "Test-Set-Expires", "Fri, 01 Jan 2100 00:00:00 GMT", + NULL); + g_free (body); + + debug_printf (2, " Dumping the cache\n"); + soup_cache_dump (cache); + + g_assert_cmpuint (count_cached_resources_in_dir (cache_dir), ==, 3); + + body = do_request (session, base_uri, "GET", "/4", NULL, + "Test-Set-Expires", "Fri, 01 Jan 2100 00:00:00 GMT", + NULL); + g_free (body); + body = do_request (session, base_uri, "GET", "/5", NULL, + "Test-Set-Expires", "Fri, 01 Jan 2100 00:00:00 GMT", + NULL); + g_free (body); + + /* Destroy the cache without dumping the last two resources */ + soup_test_session_abort_unref (session); + g_object_unref (cache); + + cache = soup_cache_new (cache_dir, SOUP_CACHE_SINGLE_USER); + + debug_printf (2, " Loading the cache\n"); + g_assert_cmpuint (count_cached_resources_in_dir (cache_dir), ==, 5); + soup_cache_load (cache); + g_assert_cmpuint (count_cached_resources_in_dir (cache_dir), ==, 3); + + g_object_unref (cache); + g_free (cache_dir); +} + int main (int argc, char **argv) { @@ -641,13 +775,13 @@ main (int argc, char **argv) server = soup_test_server_new (TRUE); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); - base_uri = soup_uri_new ("http://127.0.0.1/"); - soup_uri_set_port (base_uri, soup_server_get_port (server)); + base_uri = soup_test_server_get_uri (server, "http", NULL); g_test_add_data_func ("/cache/basics", base_uri, do_basics_test); g_test_add_data_func ("/cache/cancellation", base_uri, do_cancel_test); g_test_add_data_func ("/cache/refcounting", base_uri, do_refcounting_test); g_test_add_data_func ("/cache/headers", base_uri, do_headers_test); + g_test_add_data_func ("/cache/leaks", base_uri, do_leaks_test); ret = g_test_run (); diff --git a/tests/chunk-io-test.c b/tests/chunk-io-test.c index 1e53eef1..4746ea6c 100644 --- a/tests/chunk-io-test.c +++ b/tests/chunk-io-test.c @@ -10,7 +10,6 @@ force_io_streams_init (void) { SoupServer *server; SoupSession *session; - guint port; SoupURI *base_uri; SoupMessage *msg; @@ -20,10 +19,7 @@ force_io_streams_init (void) */ server = soup_test_server_new (TRUE); - port = soup_server_get_port (server); - - base_uri = soup_uri_new ("http://127.0.0.1"); - soup_uri_set_port (base_uri, port); + base_uri = soup_test_server_get_uri (server, "http", NULL); session = soup_test_session_new (SOUP_TYPE_SESSION, NULL); msg = soup_message_new_from_uri ("POST", base_uri); diff --git a/tests/chunk-test.c b/tests/chunk-test.c index 864f8620..c658cbd4 100644 --- a/tests/chunk-test.c +++ b/tests/chunk-test.c @@ -314,7 +314,8 @@ do_temporary_test (void) char *client_md5; const char *server_md5; - g_test_bug ("https://bugs.webkit.org/show_bug.cgi?id=18343"); + g_test_bug_base ("https://bugs.webkit.org/"); + g_test_bug ("18343"); msg = soup_message_new_from_uri ("PUT", base_uri); soup_message_body_append (msg->request_body, SOUP_MEMORY_TEMPORARY, @@ -427,21 +428,17 @@ main (int argc, char **argv) { GMainLoop *loop; SoupServer *server; - guint port; int ret; test_init (argc, argv, NULL); - server = soup_test_server_new (TRUE); + server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); - port = soup_server_get_port (server); loop = g_main_loop_new (NULL, TRUE); - base_uri = soup_uri_new ("http://127.0.0.1"); - soup_uri_set_port (base_uri, port); - + base_uri = soup_test_server_get_uri (server, "http", NULL); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); g_test_add_data_func ("/chunks/request/unstreamed", GINT_TO_POINTER (0), do_request_test); diff --git a/tests/coding-test.c b/tests/coding-test.c index 0445f632..de2949be 100644 --- a/tests/coding-test.c +++ b/tests/coding-test.c @@ -486,10 +486,9 @@ main (int argc, char **argv) test_init (argc, argv, NULL); - server = soup_test_server_new (TRUE); + server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); - base_uri = soup_uri_new ("http://127.0.0.1/"); - soup_uri_set_port (base_uri, soup_server_get_port (server)); + base_uri = soup_test_server_get_uri (server, "http", NULL); g_test_add ("/coding/message/plain", CodingTestData, GINT_TO_POINTER (CODING_TEST_NO_DECODER), diff --git a/tests/connection-test.c b/tests/connection-test.c index 8f8c74be..ec54daea 100644 --- a/tests/connection-test.c +++ b/tests/connection-test.c @@ -51,16 +51,21 @@ timeout_request_started (SoupServer *server, SoupMessage *msg, SoupClientContext *client, gpointer user_data) { SoupSocket *sock; - GMainContext *context = soup_server_get_async_context (server); + GMainContext *context = g_main_context_get_thread_default (); guint readable; + g_signal_handlers_disconnect_by_func (server, timeout_request_started, NULL); + + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; sock = soup_client_context_get_socket (client); + G_GNUC_END_IGNORE_DEPRECATIONS; readable = g_signal_connect (sock, "readable", G_CALLBACK (timeout_socket), NULL); + + g_mutex_unlock (&server_mutex); while (soup_socket_is_connected (sock)) g_main_context_iteration (context, TRUE); g_signal_handler_disconnect (sock, readable); - g_signal_handlers_disconnect_by_func (server, timeout_request_started, NULL); } static void @@ -78,17 +83,18 @@ setup_timeout_persistent (SoupServer *server, SoupSocket *sock) * fail (since the client is waiting for us to * return a response). This will cause it to * emit "readable" later. - * 2. Connect to the server's request-started signal. - * 3. Run an inner main loop from that signal handler - * until the socket emits "readable". (If we don't - * do this then it's possible the client's next - * request would be ready before we returned to - * the main loop, and so the signal would never be - * emitted.) + * 2. Wait for the server to finish this request and + * start reading the next one (and lock server_mutex + * to interlock with the client and ensure that it + * doesn't start writing its next request until + * that point). + * 3. Block until "readable" is emitted, meaning the + * client has written its request. * 4. Close the socket. */ soup_socket_read (sock, buf, 1, &nread, NULL, NULL); + g_mutex_lock (&server_mutex); g_signal_connect (server, "request-started", G_CALLBACK (timeout_request_started), NULL); } @@ -130,7 +136,9 @@ server_callback (SoupServer *server, SoupMessage *msg, * the declared Content-Length. Instead, we * forcibly close the socket at that point. */ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; sock = soup_client_context_get_socket (context); + G_GNUC_END_IGNORE_DEPRECATIONS; g_signal_connect (msg, "wrote-chunk", G_CALLBACK (close_socket), sock); } else if (no_close) { @@ -148,7 +156,9 @@ server_callback (SoupServer *server, SoupMessage *msg, if (!strcmp (path, "/timeout-persistent")) { SoupSocket *sock; + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; sock = soup_client_context_get_socket (context); + G_GNUC_END_IGNORE_DEPRECATIONS; setup_timeout_persistent (server, sock); } @@ -250,6 +260,12 @@ do_timeout_test_for_session (SoupSession *session) } g_object_unref (msg); + /* The server will grab server_mutex before returning the response, + * and release it when it's ready for us to send the second request. + */ + g_mutex_lock (&server_mutex); + g_mutex_unlock (&server_mutex); + debug_printf (1, " Second message\n"); msg = soup_message_new_from_uri ("GET", base_uri); soup_session_send_message (session, msg); @@ -314,6 +330,12 @@ do_timeout_req_test_for_session (SoupSession *session) } g_object_unref (req); + /* The server will grab server_mutex before returning the response, + * and release it when it's ready for us to send the second request. + */ + g_mutex_lock (&server_mutex); + g_mutex_unlock (&server_mutex); + debug_printf (1, " Second request\n"); req = soup_session_request_uri (session, base_uri, NULL); @@ -382,7 +404,7 @@ static GMainLoop *max_conns_loop; static int msgs_done; static guint quit_loop_timeout; #define MAX_CONNS 2 -#define TEST_CONNS (MAX_CONNS * 2) +#define TEST_CONNS (MAX_CONNS * 2) + 1 static gboolean idle_start_server (gpointer data) @@ -403,7 +425,7 @@ static void max_conns_request_started (SoupSession *session, SoupMessage *msg, SoupSocket *socket, gpointer user_data) { - if (++msgs_done == MAX_CONNS) { + if (++msgs_done >= MAX_CONNS) { if (quit_loop_timeout) g_source_remove (quit_loop_timeout); quit_loop_timeout = g_timeout_add (100, quit_loop, NULL); @@ -420,7 +442,8 @@ max_conns_message_complete (SoupSession *session, SoupMessage *msg, gpointer use static void do_max_conns_test_for_session (SoupSession *session) { - SoupMessage *msgs[TEST_CONNS]; + SoupMessage *msgs[TEST_CONNS + 1]; + SoupMessageFlags flags; int i; max_conns_loop = g_main_loop_new (NULL, TRUE); @@ -430,7 +453,7 @@ do_max_conns_test_for_session (SoupSession *session) g_signal_connect (session, "request-started", G_CALLBACK (max_conns_request_started), NULL); msgs_done = 0; - for (i = 0; i < TEST_CONNS; i++) { + for (i = 0; i < TEST_CONNS - 1; i++) { msgs[i] = soup_message_new_from_uri ("GET", base_uri); g_object_ref (msgs[i]); soup_session_queue_message (session, msgs[i], @@ -439,6 +462,21 @@ do_max_conns_test_for_session (SoupSession *session) g_main_loop_run (max_conns_loop); g_assert_cmpint (msgs_done, ==, MAX_CONNS); + + if (quit_loop_timeout) + g_source_remove (quit_loop_timeout); + quit_loop_timeout = g_timeout_add (1000, quit_loop, NULL); + + /* Message with SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS should start */ + msgs[i] = soup_message_new_from_uri ("GET", base_uri); + flags = soup_message_get_flags (msgs[i]); + soup_message_set_flags (msgs[i], flags | SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS); + g_object_ref (msgs[i]); + soup_session_queue_message (session, msgs[i], + max_conns_message_complete, NULL); + + g_main_loop_run (max_conns_loop); + g_assert_cmpint (msgs_done, ==, MAX_CONNS + 1); g_signal_handlers_disconnect_by_func (session, max_conns_request_started, NULL); msgs_done = 0; @@ -762,11 +800,46 @@ network_event (SoupMessage *msg, GSocketClientEvent event, { const char **events = user_data; - debug_printf (2, " %s\n", event_name_from_abbrev (**events)); + debug_printf (2, " %s\n", event_names[event]); soup_test_assert (**events == event_abbrevs[event], - "Unexpected event: %s (expected %s)\n", + "Unexpected event: %s (expected %s)", event_names[event], event_name_from_abbrev (**events)); + + if (**events == event_abbrevs[event]) { + if (event == G_SOCKET_CLIENT_RESOLVING || + event == G_SOCKET_CLIENT_RESOLVED) { + soup_test_assert (connection == NULL, + "Unexpectedly got connection (%s) with '%s' event", + G_OBJECT_TYPE_NAME (connection), + event_names[event]); + } else if (event < G_SOCKET_CLIENT_TLS_HANDSHAKING) { + soup_test_assert (G_IS_SOCKET_CONNECTION (connection), + "Unexpectedly got %s with '%s' event", + G_OBJECT_TYPE_NAME (connection), + event_names[event]); + } else if (event == G_SOCKET_CLIENT_TLS_HANDSHAKING || + event == G_SOCKET_CLIENT_TLS_HANDSHAKED) { + soup_test_assert (G_IS_TLS_CLIENT_CONNECTION (connection), + "Unexpectedly got %s with '%s' event", + G_OBJECT_TYPE_NAME (connection), + event_names[event]); + } else if (event == G_SOCKET_CLIENT_COMPLETE) { + /* See if the previous expected event was TLS_HANDSHAKED */ + if ((*events)[-1] == 'T') { + soup_test_assert (G_IS_TLS_CLIENT_CONNECTION (connection), + "Unexpectedly got %s with '%s' event", + G_OBJECT_TYPE_NAME (connection), + event_names[event]); + } else { + soup_test_assert (G_IS_SOCKET_CONNECTION (connection), + "Unexpectedly got %s with '%s' event", + G_OBJECT_TYPE_NAME (connection), + event_names[event]); + } + } + } + *events = *events + 1; } @@ -841,6 +914,186 @@ do_connection_event_test (void) soup_test_session_abort_unref (session); } +typedef struct { + GMainLoop *loop; + GIOStream *stream; + GError *error; + const char *events; +} ConnectTestData; + +static void +connect_progress (SoupSession *session, GSocketClientEvent event, GIOStream *connection, ConnectTestData *data) +{ + soup_test_assert (*data->events == event_abbrevs[event], + "Unexpected event: %s (expected %s)", + event_names[event], + event_name_from_abbrev (*data->events)); + data->events = data->events + 1; +} + +static void +connect_finished (SoupSession *session, GAsyncResult *result, ConnectTestData *data) +{ + data->stream = soup_session_connect_finish (session, result, &data->error); + g_main_loop_quit (data->loop); +} + +static void +do_one_connection_connect_test (SoupSession *session, SoupURI *uri, const char *response, const char *events) +{ + ConnectTestData data = { NULL, NULL, NULL, events }; + static const char *request = "GET / HTTP/1.1\r\nHost: localhost\r\n\r\n"; + gsize bytes = 0; + char buffer[128]; + + data.loop = g_main_loop_new (NULL, FALSE); + soup_session_connect_async (session, uri, NULL, + (SoupSessionConnectProgressCallback)connect_progress, + (GAsyncReadyCallback)connect_finished, + &data); + g_main_loop_run (data.loop); + + g_assert (G_IS_IO_STREAM (data.stream)); + g_assert_no_error (data.error); + g_assert (g_output_stream_write_all (g_io_stream_get_output_stream (data.stream), + request, strlen (request), &bytes, NULL, NULL)); + g_assert (g_input_stream_read_all (g_io_stream_get_input_stream (data.stream), + buffer, sizeof (buffer), &bytes, NULL, NULL)); + buffer[strlen (response)] = '\0'; + g_assert_cmpstr (buffer, ==, response); + + while (*data.events) { + soup_test_assert (!*data.events, + "Expected %s", + event_name_from_abbrev (*data.events)); + data.events++; + } + + g_object_unref (data.stream); + g_main_loop_unref (data.loop); +} + +static void +do_one_connection_connect_fail_test (SoupSession *session, SoupURI *uri, GQuark domain, gint code, const char *events) +{ + ConnectTestData data = { NULL, NULL, NULL, events }; + + data.loop = g_main_loop_new (NULL, FALSE); + soup_session_connect_async (session, uri, NULL, + (SoupSessionConnectProgressCallback)connect_progress, + (GAsyncReadyCallback)connect_finished, + &data); + g_main_loop_run (data.loop); + + g_assert (!data.stream); + g_assert_error (data.error, domain, code); + + while (*data.events) { + soup_test_assert (!*data.events, + "Expected %s", + event_name_from_abbrev (*data.events)); + data.events++; + } +} + +static void +do_connection_connect_test (void) +{ + SoupSession *session; + SoupURI *http_uri; + SoupURI *https_uri = NULL; + SoupURI *ws_uri; + SoupURI *wss_uri = NULL; + SoupURI *file_uri; + SoupURI *wrong_http_uri; + SoupURI *proxy_uri; + + SOUP_TEST_SKIP_IF_NO_APACHE; + + session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, + SOUP_SESSION_USE_THREAD_CONTEXT, TRUE, + NULL); + + debug_printf (1, " http\n"); + http_uri = soup_uri_new (HTTP_SERVER); + do_one_connection_connect_test (session, http_uri, + "HTTP/1.1 200 OK", "rRcCx"); + + if (tls_available) { + debug_printf (1, " https\n"); + https_uri = soup_uri_new (HTTPS_SERVER); + do_one_connection_connect_test (session, https_uri, + "HTTP/1.1 200 OK", "rRcCtTx"); + } else + debug_printf (1, " https -- SKIPPING\n"); + + debug_printf (1, " ws\n"); + ws_uri = soup_uri_new (HTTP_SERVER); + ws_uri->scheme = SOUP_URI_SCHEME_WS; + do_one_connection_connect_test (session, ws_uri, + "HTTP/1.1 200 OK", "rRcCx"); + + if (tls_available) { + debug_printf (1, " wss\n"); + wss_uri = soup_uri_new (HTTPS_SERVER); + do_one_connection_connect_test (session, wss_uri, + "HTTP/1.1 200 OK", "rRcCtTx"); + } else + debug_printf (1, " wss -- SKIPPING\n"); + + debug_printf (1, " file\n"); + file_uri = soup_uri_new ("file:///foo/bar"); + do_one_connection_connect_fail_test (session, file_uri, + G_RESOLVER_ERROR, G_RESOLVER_ERROR_NOT_FOUND, + "r"); + + debug_printf (1, " wrong http (invalid port)\n"); + wrong_http_uri = soup_uri_new (HTTP_SERVER); + wrong_http_uri->port = 1234; + do_one_connection_connect_fail_test (session, wrong_http_uri, + G_IO_ERROR, G_IO_ERROR_CONNECTION_REFUSED, + "rRcr"); /* FIXME: why r again? GLib bug? */ + + proxy_uri = soup_uri_new (HTTP_PROXY); + g_object_set (G_OBJECT (session), + SOUP_SESSION_PROXY_URI, proxy_uri, + NULL); + + debug_printf (1, " http with proxy\n"); + do_one_connection_connect_test (session, http_uri, + "HTTP/1.1 403 Forbidden", "rRcCx"); + + if (tls_available) { + debug_printf (1, " https with proxy\n"); + do_one_connection_connect_test (session, https_uri, + "HTTP/1.1 200 OK", "rRcCpPtTx"); + } else + debug_printf (1, " https with proxy -- SKIPPING\n"); + + debug_printf (1, " ws with proxy\n"); + do_one_connection_connect_test (session, ws_uri, + "HTTP/1.1 403 Forbidden", "rRcCx"); + + if (tls_available) { + debug_printf (1, " wss with proxy\n"); + do_one_connection_connect_test (session, wss_uri, + "HTTP/1.1 200 OK", "rRcCpPtTx"); + } else + debug_printf (1, " wss with proxy -- SKIPPING\n"); + + soup_uri_free (http_uri); + if (https_uri) + soup_uri_free (https_uri); + soup_uri_free (ws_uri); + if (wss_uri) + soup_uri_free (wss_uri); + soup_uri_free (file_uri); + soup_uri_free (wrong_http_uri); + soup_uri_free (proxy_uri); + + soup_test_session_abort_unref (session); +} + int main (int argc, char **argv) { @@ -849,10 +1102,9 @@ main (int argc, char **argv) test_init (argc, argv, NULL); apache_init (); - server = soup_test_server_new (TRUE); + server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); soup_server_add_handler (server, NULL, server_callback, "http", NULL); - base_uri = soup_uri_new ("http://127.0.0.1/"); - soup_uri_set_port (base_uri, soup_server_get_port (server)); + base_uri = soup_test_server_get_uri (server, "http", NULL); g_test_add_func ("/connection/content-length-framing", do_content_length_framing_test); g_test_add_func ("/connection/persistent-connection-timeout", do_persistent_connection_timeout_test); @@ -861,6 +1113,7 @@ main (int argc, char **argv) g_test_add_func ("/connection/non-idempotent", do_non_idempotent_connection_test); g_test_add_func ("/connection/state", do_connection_state_test); g_test_add_func ("/connection/event", do_connection_event_test); + g_test_add_func ("/connection/connect", do_connection_connect_test); ret = g_test_run (); diff --git a/tests/context-test.c b/tests/context-test.c index 727c63ba..567512fe 100644 --- a/tests/context-test.c +++ b/tests/context-test.c @@ -14,12 +14,12 @@ typedef struct { } SlowData; static void -request_failed (SoupMessage *msg, gpointer data) +request_finished (SoupMessage *msg, gpointer data) { SlowData *sd = data; - if (SOUP_STATUS_IS_TRANSPORT_ERROR (msg->status_code)) - g_source_destroy (sd->timeout); + g_source_destroy (sd->timeout); + g_source_unref (sd->timeout); g_free (sd); } @@ -65,10 +65,11 @@ server_callback (SoupServer *server, SoupMessage *msg, sd->server = server; sd->msg = msg; sd->timeout = soup_add_timeout ( - soup_server_get_async_context (server), + g_main_context_get_thread_default (), 200, add_body_chunk, sd); + g_source_ref (sd->timeout); g_signal_connect (msg, "finished", - G_CALLBACK (request_failed), sd); + G_CALLBACK (request_finished), sd); } /* Test 1: An async session in another thread with its own @@ -329,14 +330,16 @@ int main (int argc, char **argv) { SoupServer *server; + SoupURI *uri; int ret; test_init (argc, argv, NULL); - server = soup_test_server_new (TRUE); + server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); - base_uri = g_strdup_printf ("http://127.0.0.1:%u/", - soup_server_get_port (server)); + uri = soup_test_server_get_uri (server, "http", NULL); + base_uri = soup_uri_to_string (uri, FALSE); + soup_uri_free (uri); g_test_add_data_func ("/context/blocking/explicit", GINT_TO_POINTER (FALSE), do_test1); g_test_add_data_func ("/context/blocking/thread-default", GINT_TO_POINTER (TRUE), do_test1); diff --git a/tests/continue-test.c b/tests/continue-test.c index b6a5805f..5e0c6603 100644 --- a/tests/continue-test.c +++ b/tests/continue-test.c @@ -10,7 +10,7 @@ #define MAX_POST_LENGTH (sizeof (SHORT_BODY)) -static int port; +static SoupURI *base_uri; static GSList *events; static void @@ -54,17 +54,20 @@ do_message (const char *path, gboolean long_body, SoupSession *session; SoupMessage *msg; const char *body; - char *uri; + SoupURI *uri; va_list ap; const char *expected_event; char *actual_event; int expected_status, actual_status; - uri = g_strdup_printf ("http://%s127.0.0.1:%d/%s", - auth ? "user:pass@" : "", - port, path); - msg = soup_message_new ("POST", uri); - g_free (uri); + uri = soup_uri_copy (base_uri); + if (auth) { + soup_uri_set_user (uri, "user"); + soup_uri_set_password (uri, "pass"); + } + soup_uri_set_path (uri, path); + msg = soup_message_new_from_uri ("POST", uri); + soup_uri_free (uri); body = long_body ? LONG_BODY : SHORT_BODY; soup_message_set_request (msg, "text/plain", SOUP_MEMORY_STATIC, @@ -148,7 +151,7 @@ do_message (const char *path, gboolean long_body, static void do_test_unauth_short_noexpect_nopass (void) { - do_message ("unauth", FALSE, FALSE, FALSE, + do_message ("/unauth", FALSE, FALSE, FALSE, "client-wrote_headers", "client-wrote_body", "server-got_headers", @@ -165,7 +168,7 @@ do_test_unauth_short_noexpect_nopass (void) static void do_test_unauth_long_noexpect_nopass (void) { - do_message ("unauth", TRUE, FALSE, FALSE, + do_message ("/unauth", TRUE, FALSE, FALSE, "client-wrote_headers", "client-wrote_body", "server-got_headers", @@ -182,7 +185,7 @@ do_test_unauth_long_noexpect_nopass (void) static void do_test_unauth_short_expect_nopass (void) { - do_message ("unauth", FALSE, TRUE, FALSE, + do_message ("/unauth", FALSE, TRUE, FALSE, "client-wrote_headers", "server-got_headers", "server-wrote_informational", SOUP_STATUS_CONTINUE, @@ -201,7 +204,7 @@ do_test_unauth_short_expect_nopass (void) static void do_test_unauth_long_expect_nopass (void) { - do_message ("unauth", TRUE, TRUE, FALSE, + do_message ("/unauth", TRUE, TRUE, FALSE, "client-wrote_headers", "server-got_headers", "server-wrote_headers", SOUP_STATUS_REQUEST_ENTITY_TOO_LARGE, @@ -216,7 +219,7 @@ do_test_unauth_long_expect_nopass (void) static void do_test_auth_short_noexpect_nopass (void) { - do_message ("auth", FALSE, FALSE, FALSE, + do_message ("/auth", FALSE, FALSE, FALSE, "client-wrote_headers", "client-wrote_body", "server-got_headers", @@ -233,7 +236,7 @@ do_test_auth_short_noexpect_nopass (void) static void do_test_auth_long_noexpect_nopass (void) { - do_message ("auth", TRUE, FALSE, FALSE, + do_message ("/auth", TRUE, FALSE, FALSE, "client-wrote_headers", "client-wrote_body", "server-got_headers", @@ -250,7 +253,7 @@ do_test_auth_long_noexpect_nopass (void) static void do_test_auth_short_expect_nopass (void) { - do_message ("auth", FALSE, TRUE, FALSE, + do_message ("/auth", FALSE, TRUE, FALSE, "client-wrote_headers", "server-got_headers", "server-wrote_headers", SOUP_STATUS_UNAUTHORIZED, @@ -265,7 +268,7 @@ do_test_auth_short_expect_nopass (void) static void do_test_auth_long_expect_nopass (void) { - do_message ("auth", TRUE, TRUE, FALSE, + do_message ("/auth", TRUE, TRUE, FALSE, "client-wrote_headers", "server-got_headers", "server-wrote_headers", SOUP_STATUS_UNAUTHORIZED, @@ -280,7 +283,7 @@ do_test_auth_long_expect_nopass (void) static void do_test_auth_short_noexpect_pass (void) { - do_message ("auth", FALSE, FALSE, TRUE, + do_message ("/auth", FALSE, FALSE, TRUE, "client-wrote_headers", "client-wrote_body", "server-got_headers", @@ -306,7 +309,7 @@ do_test_auth_short_noexpect_pass (void) static void do_test_auth_long_noexpect_pass (void) { - do_message ("auth", TRUE, FALSE, TRUE, + do_message ("/auth", TRUE, FALSE, TRUE, "client-wrote_headers", "client-wrote_body", "server-got_headers", @@ -332,7 +335,7 @@ do_test_auth_long_noexpect_pass (void) static void do_test_auth_short_expect_pass (void) { - do_message ("auth", FALSE, TRUE, TRUE, + do_message ("/auth", FALSE, TRUE, TRUE, "client-wrote_headers", "server-got_headers", "server-wrote_headers", SOUP_STATUS_UNAUTHORIZED, @@ -358,7 +361,7 @@ do_test_auth_short_expect_pass (void) static void do_test_auth_long_expect_pass (void) { - do_message ("auth", TRUE, TRUE, TRUE, + do_message ("/auth", TRUE, TRUE, TRUE, "client-wrote_headers", "server-got_headers", "server-wrote_headers", SOUP_STATUS_UNAUTHORIZED, @@ -452,7 +455,7 @@ setup_server (void) SoupServer *server; SoupAuthDomain *auth_domain; - server = soup_test_server_new (FALSE); + server = soup_test_server_new (SOUP_TEST_SERVER_DEFAULT); g_signal_connect (server, "request-started", G_CALLBACK (request_started), NULL); @@ -481,7 +484,7 @@ main (int argc, char **argv) test_init (argc, argv, NULL); server = setup_server (); - port = soup_server_get_port (server); + base_uri = soup_test_server_get_uri (server, "http", NULL); g_test_add_func ("/continue/unauth_short_noexpect_nopass", do_test_unauth_short_noexpect_nopass); g_test_add_func ("/continue/unauth_long_noexpect_nopass", do_test_unauth_long_noexpect_nopass); @@ -499,6 +502,8 @@ main (int argc, char **argv) ret = g_test_run (); soup_test_server_quit_unref (server); + soup_uri_free (base_uri); + test_cleanup (); return ret; diff --git a/tests/cookies-test.c b/tests/cookies-test.c index 12529d81..8735964c 100644 --- a/tests/cookies-test.c +++ b/tests/cookies-test.c @@ -94,6 +94,61 @@ do_cookies_accept_policy_test (void) soup_test_session_abort_unref (session); } +static void +do_cookies_subdomain_policy_test (void) +{ + SoupCookieJar *jar; + GSList *cookies; + SoupURI *uri1; + SoupURI *uri2; + + g_test_bug ("792130"); + + /* Only the base domain should be considered when deciding + * whether a cookie is a third-party cookie. + */ + uri1 = soup_uri_new ("https://www.gnome.org"); + uri2 = soup_uri_new ("https://foundation.gnome.org"); + + /* We can't check subdomains with a test server running on + * localhost, so we'll just check the cookie jar API itself. + */ + + /* Cookie should be accepted. One cookie in the jar. */ + jar = soup_cookie_jar_new (); + soup_cookie_jar_set_accept_policy (jar, SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY); + soup_cookie_jar_set_cookie_with_first_party (jar, uri1, uri2, "1=foo"); + cookies = soup_cookie_jar_all_cookies (jar); + g_assert_cmpint (g_slist_length (cookies), ==, 1); + g_slist_free_full (cookies, (GDestroyNotify)soup_cookie_free); + + /* Cookie should be accepted. Two cookies in the jar. */ + soup_cookie_jar_set_cookie_with_first_party (jar, uri2, uri1, "2=foo"); + cookies = soup_cookie_jar_all_cookies (jar); + g_assert_cmpint (g_slist_length (cookies), ==, 2); + g_slist_free_full (cookies, (GDestroyNotify)soup_cookie_free); + + /* Third-party cookie should be rejected, so there are still + * only two cookies in the jar. + */ + soup_cookie_jar_set_cookie_with_first_party (jar, third_party_uri, uri1, "3=foo"); + cookies = soup_cookie_jar_all_cookies (jar); + g_assert_cmpint (g_slist_length (cookies), ==, 2); + g_slist_free_full (cookies, (GDestroyNotify)soup_cookie_free); + + /* A leading dot in the domain property should not affect things. + * This cookie should be accepted. Three cookies in the jar. + */ + soup_cookie_jar_set_cookie_with_first_party (jar, uri1, uri1, "4=foo; Domain=.www.gnome.org"); + cookies = soup_cookie_jar_all_cookies (jar); + g_assert_cmpint (g_slist_length (cookies), ==, 3); + g_slist_free_full (cookies, (GDestroyNotify)soup_cookie_free); + + soup_uri_free (uri1); + soup_uri_free (uri2); + g_object_unref (jar); +} + /* FIXME: moar tests! */ static void do_cookies_parsing_test (void) @@ -167,24 +222,29 @@ do_cookies_parsing_test (void) int main (int argc, char **argv) { + SoupURI *server_uri; int ret; test_init (argc, argv, NULL); - server = soup_test_server_new (TRUE); + server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); + server_uri = soup_test_server_get_uri (server, "http", NULL); + first_party_uri = soup_uri_new (first_party); third_party_uri = soup_uri_new (third_party); - soup_uri_set_port (first_party_uri, soup_server_get_port (server)); - soup_uri_set_port (third_party_uri, soup_server_get_port (server)); + soup_uri_set_port (first_party_uri, server_uri->port); + soup_uri_set_port (third_party_uri, server_uri->port); g_test_add_func ("/cookies/accept-policy", do_cookies_accept_policy_test); + g_test_add_func ("/cookies/accept-policy-subdomains", do_cookies_subdomain_policy_test); g_test_add_func ("/cookies/parsing", do_cookies_parsing_test); ret = g_test_run (); soup_uri_free (first_party_uri); soup_uri_free (third_party_uri); + soup_uri_free (server_uri); soup_test_server_quit_unref (server); test_cleanup (); diff --git a/tests/date.c b/tests/date.c index e51fa57f..f623061b 100644 --- a/tests/date.c +++ b/tests/date.c @@ -102,6 +102,9 @@ static const OkDate ok_dates[] = { { "Saturday, 6-Nov-04 08:09:07 GMT", NULL }, { "Saturday, 6-Nov-04 08:09:07 GMT", NULL }, { "Saturday, 06-Nov-104 08:09:07 GMT", NULL }, + { "Saturday, 06-Nov-2004 08:09:07 GMT", NULL }, + { "Saturday, 6-Nov-2004 08:09:07 GMT", NULL }, + { "Saturday, 6-Nov-2004 08:09:07 GMT", NULL }, { "Saturday, 06-Nov-04 08:09:07", NULL }, { "06-Nov-04 08:09:07 GMT", NULL }, @@ -130,16 +133,6 @@ static const OkDate ok_dates[] = { { "Sat, 06-Nov-104 08:09:07 GMT", NULL }, { "Sat, 06-Nov-04 08:09:07", NULL }, - /* Netscape cookie spec example syntax, and broken variants */ - { "Saturday, 06-Nov-04 08:09:07 GMT", NULL }, - { "Saturday, 6-Nov-04 08:09:07 GMT", NULL }, - { "Saturday, 6-Nov-04 08:09:07 GMT", NULL }, - { "Saturday, 06-Nov-104 08:09:07 GMT", NULL }, - { "Saturday, 06-Nov-2004 08:09:07 GMT", NULL }, - { "Saturday, 6-Nov-2004 08:09:07 GMT", NULL }, - { "Saturday, 6-Nov-2004 08:09:07 GMT", NULL }, - { "Saturday, 06-Nov-04 08:09:07", NULL }, - /* Miscellaneous broken formats seen on the web */ { "Sat 06-Nov-2004 08:9:07", NULL }, { "Saturday, 06-Nov-04 8:9:07 GMT", NULL }, @@ -177,6 +170,8 @@ check_ok_time_t (void) g_assert_cmpint (date->hour, ==, 8); g_assert_cmpint (date->minute, ==, 9); g_assert_cmpint (date->second, ==, 7); + + soup_date_free (date); } typedef struct { diff --git a/tests/forms-test.c b/tests/forms-test.c index 3915b019..349932bf 100644 --- a/tests/forms-test.c +++ b/tests/forms-test.c @@ -420,41 +420,43 @@ main (int argc, char **argv) { GMainLoop *loop; SoupServer *server; - guint port; - char *uri_str; + SoupURI *base_uri, *uri; int ret = 0; test_init (argc, argv, no_test_entry); - server = soup_test_server_new (TRUE); + server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); soup_server_add_handler (server, "/hello", hello_callback, NULL, NULL); soup_server_add_handler (server, "/md5", md5_callback, NULL, NULL); - port = soup_server_get_port (server); + base_uri = soup_test_server_get_uri (server, "http", NULL); loop = g_main_loop_new (NULL, TRUE); if (run_tests) { - uri_str = g_strdup_printf ("http://127.0.0.1:%u/hello", port); - g_test_add_data_func_full ("/forms/hello", uri_str, do_hello_tests, g_free); + uri = soup_uri_new_with_base (base_uri, "/hello"); + g_test_add_data_func_full ("/forms/hello", soup_uri_to_string (uri, FALSE), do_hello_tests, g_free); + soup_uri_free (uri); - uri_str = g_strdup_printf ("http://127.0.0.1:%u/md5", port); - g_test_add_data_func_full ("/forms/md5/curl", g_strdup (uri_str), do_md5_test_curl, g_free); - g_test_add_data_func_full ("/forms/md5/libsoup", g_strdup (uri_str), do_md5_test_libsoup, g_free); - g_free (uri_str); + uri = soup_uri_new_with_base (base_uri, "/md5"); + g_test_add_data_func_full ("/forms/md5/curl", soup_uri_to_string (uri, FALSE), do_md5_test_curl, g_free); + g_test_add_data_func_full ("/forms/md5/libsoup", soup_uri_to_string (uri, FALSE), do_md5_test_libsoup, g_free); + soup_uri_free (uri); g_test_add_func ("/forms/decode", do_form_decode_test); ret = g_test_run (); } else { - g_print ("Listening on port %d\n", port); + g_print ("Listening on port %d\n", base_uri->port); g_main_loop_run (loop); } g_main_loop_unref (loop); soup_test_server_quit_unref (server); + soup_uri_free (base_uri); + if (run_tests) test_cleanup (); return ret; diff --git a/tests/header-parsing.c b/tests/header-parsing.c index fdc7885d..9cf06cee 100644 --- a/tests/header-parsing.c +++ b/tests/header-parsing.c @@ -358,6 +358,24 @@ static struct RequestTest { } }, + { "NUL in header name", "760832", + "GET / HTTP/1.1\r\nHost\x00: example.com\r\n", 36, + SOUP_STATUS_OK, + "GET", "/", SOUP_HTTP_1_1, + { { "Host", "example.com" }, + { NULL } + } + }, + + { "NUL in header value", "760832", + "GET / HTTP/1.1\r\nHost: example\x00" "com\r\n", 35, + SOUP_STATUS_OK, + "GET", "/", SOUP_HTTP_1_1, + { { "Host", "examplecom" }, + { NULL } + } + }, + /************************/ /*** INVALID REQUESTS ***/ /************************/ @@ -418,20 +436,6 @@ static struct RequestTest { { { NULL } } }, - { "NUL in header name", "666316", - "GET / HTTP/1.1\r\n\x00: silly\r\n", 37, - SOUP_STATUS_BAD_REQUEST, - NULL, NULL, -1, - { { NULL } } - }, - - { "NUL in header value", NULL, - "GET / HTTP/1.1\r\nHost: example\x00com\r\n", 37, - SOUP_STATUS_BAD_REQUEST, - NULL, NULL, -1, - { { NULL } } - }, - { "No terminating CRLF", NULL, "GET / HTTP/1.1\r\nHost: example.com", -1, SOUP_STATUS_BAD_REQUEST, @@ -513,6 +517,14 @@ static struct ResponseTest { } }, + { "Response w/ unknown status code", NULL, + "HTTP/1.1 999 Request denied\r\nFoo: bar\r\n", -1, + SOUP_HTTP_1_1, 999, "Request denied", + { { "Foo", "bar" }, + { NULL } + } + }, + { "Connection header on HTTP/1.0 message", NULL, "HTTP/1.0 200 ok\r\nFoo: bar\r\nConnection: Bar\r\nBar: quux\r\n", -1, SOUP_HTTP_1_0, SOUP_STATUS_OK, "ok", @@ -608,6 +620,46 @@ static struct ResponseTest { { NULL } } }, + { "NUL in header name", "760832", + "HTTP/1.1 200 OK\r\nF\x00oo: bar\r\n", 28, + SOUP_HTTP_1_1, SOUP_STATUS_OK, "OK", + { { "Foo", "bar" }, + { NULL } + } + }, + + { "NUL in header value", "760832", + "HTTP/1.1 200 OK\r\nFoo: b\x00" "ar\r\n", 28, + SOUP_HTTP_1_1, SOUP_STATUS_OK, "OK", + { { "Foo", "bar" }, + { NULL } + } + }, + + /********************************/ + /*** VALID CONTINUE RESPONSES ***/ + /********************************/ + + /* Tests from Cockpit project */ + + { "Response w/ 101 Switching Protocols + spaces after new line", NULL, + "HTTP/1.0 101 Switching Protocols\r\n \r\n", 38, + SOUP_HTTP_1_0, SOUP_STATUS_SWITCHING_PROTOCOLS, "Switching Protocols", + { { NULL } } + }, + + { "Response w/ 101 Switching Protocols missing \\r + spaces", NULL, + "HTTP/1.0 101 Switching Protocols\r\n \r\n", 40, + SOUP_HTTP_1_0, SOUP_STATUS_SWITCHING_PROTOCOLS, "Switching Protocols", + { { NULL } } + }, + + { "Response w/ 101 Switching Protocols + spaces after & before new line", NULL, + "HTTP/1.1 101 Switching Protocols \r\n \r\n", 42, + SOUP_HTTP_1_1, SOUP_STATUS_SWITCHING_PROTOCOLS, "Switching Protocols", + { { NULL } } + }, + /*************************/ /*** INVALID RESPONSES ***/ /*************************/ @@ -660,8 +712,8 @@ static struct ResponseTest { { { NULL } } }, - { "Status code > 599", NULL, - "HTTP/1.1 600 OK\r\nFoo: bar\r\n", -1, + { "Status code > 999", NULL, + "HTTP/1.1 1000 OK\r\nFoo: bar\r\n", -1, -1, 0, NULL, { { NULL } } }, @@ -678,17 +730,44 @@ static struct ResponseTest { { { NULL } } }, - { "NUL in header name", NULL, - "HTTP/1.1 200 OK\r\nF\x00oo: bar\r\n", 28, + /* Failing test from Cockpit */ + + { "Partial response stops after HTTP/", NULL, + "HTTP/", -1, -1, 0, NULL, { { NULL } } }, - { "NUL in header value", NULL, - "HTTP/1.1 200 OK\r\nFoo: b\x00ar\r\n", 28, + { "Space before HTTP/", NULL, + " HTTP/1.0 101 Switching Protocols\r\n ", -1, -1, 0, NULL, { { NULL } } }, + + { "Missing reason", NULL, + "HTTP/1.0 101\r\n ", -1, + -1, 0, NULL, + { { NULL } } + }, + + { "Response code containing alphabetic character", NULL, + "HTTP/1.1 1A01 Switching Protocols \r\n ", -1, + -1, 0, NULL, + { { NULL } } + }, + + { "TESTONE\\r\\n", NULL, + "TESTONE\r\n ", -1, + -1, 0, NULL, + { { NULL } } + }, + + { "Response w/ 3 headers truncated", NULL, + "HTTP/1.0 200 ok\r\nHeader1: value3\r\nHeader2: field\r\nHead3: Anothe", -1, + -1, 0, NULL, + { { NULL } + } + }, }; static const int num_resptests = G_N_ELEMENTS (resptests); @@ -837,6 +916,17 @@ do_qvalue_tests (void) debug_printf (1, " acceptable: "); if (acceptable) { + /* Kludge to deal with the fact that the sort order of the first + * test is not fully specified. + */ + if (i == 0 && acceptable->next && + !g_str_equal (acceptable->data, qvaluetests[i].acceptable[0]) && + g_str_equal (acceptable->data, qvaluetests[i].acceptable[1])) { + gpointer tmp = acceptable->data; + acceptable->data = acceptable->next->data; + acceptable->next->data = tmp; + } + for (iter = acceptable, j = 0; iter; iter = iter->next, j++) { debug_printf (1, "%s ", (char *)iter->data); g_assert_cmpstr (iter->data, ==, qvaluetests[i].acceptable[j]); diff --git a/tests/httpd.conf.22.in b/tests/httpd.conf.22.in deleted file mode 100644 index b912ca36..00000000 --- a/tests/httpd.conf.22.in +++ /dev/null @@ -1,292 +0,0 @@ -# http.conf used for testing auth-test - -ServerName 127.0.0.1 -Listen 127.0.0.1:47524 - -DocumentRoot . - -# The tests shut down apache with "graceful-stop", because that makes -# it close its listening socket right away. But it seems to sometimes -# result in apache never fully exiting. This fixes that. -GracefulShutdownTimeout 1 - -# Change this to "./error.log" if it's failing and you don't know why -ErrorLog /dev/null - -LoadModule alias_module @APACHE_MODULE_DIR@/mod_alias.so -LoadModule auth_basic_module @APACHE_MODULE_DIR@/mod_auth_basic.so -LoadModule auth_digest_module @APACHE_MODULE_DIR@/mod_auth_digest.so -LoadModule authn_file_module @APACHE_MODULE_DIR@/mod_authn_file.so -LoadModule authz_host_module @APACHE_MODULE_DIR@/mod_authz_host.so -LoadModule authz_user_module @APACHE_MODULE_DIR@/mod_authz_user.so -LoadModule dir_module @APACHE_MODULE_DIR@/mod_dir.so -LoadModule mime_module @APACHE_MODULE_DIR@/mod_mime.so -@IF_HAVE_PHP@LoadModule php5_module @APACHE_PHP_MODULE_DIR@/@APACHE_PHP_MODULE@ -LoadModule proxy_module @APACHE_MODULE_DIR@/mod_proxy.so -LoadModule proxy_http_module @APACHE_MODULE_DIR@/mod_proxy_http.so -LoadModule proxy_connect_module @APACHE_MODULE_DIR@/mod_proxy_connect.so -LoadModule ssl_module @APACHE_SSL_MODULE_DIR@/mod_ssl.so - -DirectoryIndex index.txt -TypesConfig /dev/null -AddType application/x-httpd-php .php -Redirect permanent /redirected /index.txt - -# Proxy #1: unauthenticated -Listen 127.0.0.1:47526 - - ProxyRequests On - AllowCONNECT 47525 - - # Deny proxying by default - - Order Deny,Allow - Deny from all - - - # Allow local http connections - - Order Allow,Deny - Allow from all - - - # Allow CONNECT to local https port - - Order Allow,Deny - Allow from all - - - # Deny non-proxy requests - - Order Deny,Allow - Deny from all - - - -# Proxy #2: authenticated -Listen 127.0.0.1:47527 - - ProxyRequests On - AllowCONNECT 47525 - - # Deny proxying by default - - Order Deny,Allow - Deny from all - - - # Allow local http connections with authentication - - Order Allow,Deny - Allow from all - - AuthType Basic - AuthName realm1 - AuthUserFile ./htpasswd - Require valid-user - - - # Allow CONNECT to local https port with authentication - - Order Allow,Deny - Allow from all - - AuthType Basic - AuthName realm1 - AuthUserFile ./htpasswd - Require valid-user - - - # Fail non-proxy requests - - Order Deny,Allow - Deny from all - - - -# Proxy #3: unauthenticatable-to -Listen 127.0.0.1:47528 - - ProxyRequests On - AllowCONNECT 47525 - - # Deny proxying by default - - Order Deny,Allow - Deny from all - - - # Allow local http connections with authentication - - Order Allow,Deny - Allow from all - - AuthType Basic - AuthName realm1 - AuthUserFile ./htpasswd - Require user no-such-user - - - # Allow CONNECT to local https port with authentication - - Order Allow,Deny - Allow from all - - AuthType Basic - AuthName realm1 - AuthUserFile ./htpasswd - Require user no-such-user - - - # Fail non-proxy requests - - Order Deny,Allow - Deny from all - - - - -# SSL setup - - Listen 127.0.0.1:47525 - - - SSLEngine on - - SSLCertificateFile ./test-cert.pem - SSLCertificateKeyFile ./test-key.pem - - - - - -# Basic auth tests -Alias /Basic/realm1/realm2/realm1 . -Alias /Basic/realm1/realm2 . -Alias /Basic/realm1/subdir . -Alias /Basic/realm1/not . -Alias /Basic/realm1 . -Alias /Basic/realm12/subdir . -Alias /Basic/realm12 . -Alias /Basic/realm2 . -Alias /Basic/realm3 . -Alias /Basic . - - - AuthType Basic - AuthName realm1 - AuthUserFile ./htpasswd - Require user user1 - - - - AuthType Basic - AuthName realm1 - AuthUserFile ./htpasswd - Require user user2 - - - - AuthType Basic - AuthName realm12 - AuthUserFile ./htpasswd - Require user user1 user2 - - - - AuthType Basic - AuthName realm2 - AuthUserFile ./htpasswd - Require user user2 - - - - AuthType Basic - AuthName realm1 - AuthUserFile ./htpasswd - Require user user1 - - - - AuthType Basic - AuthName realm2 - AuthUserFile ./htpasswd - Require user user2 - - - - AuthType Basic - AuthName realm3 - AuthUserFile ./htpasswd - Require user user3 - - -# Digest auth tests -Alias /Digest/realm1/realm2/realm1 . -Alias /Digest/realm1/realm2 . -Alias /Digest/realm1/subdir . -Alias /Digest/realm1/expire . -Alias /Digest/realm1/not . -Alias /Digest/realm1 . -Alias /Digest/realm2 . -Alias /Digest/realm3 . -Alias /Digest . - - - AuthType Digest - AuthName realm1 - AuthUserFile ./htdigest - AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 - Require valid-user - - - - AuthType Digest - AuthName realm1 - AuthUserFile ./htdigest - AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 - AuthDigestNonceLifetime 2 - Require valid-user - - - - AuthType Digest - AuthName realm1 - AuthUserFile ./htdigest - AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 - Require user user2 - - - - AuthType Digest - AuthName realm2 - AuthUserFile ./htdigest - AuthDigestDomain /Digest/realm2 /Digest/realm1/realm2 - Require valid-user - - - - AuthType Digest - AuthName realm1 - AuthUserFile ./htdigest - AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 - Require valid-user - - - - AuthType Digest - AuthName realm2 - AuthUserFile ./htdigest - AuthDigestDomain /Digest/realm2 /Digest/realm1/realm2 - Require valid-user - - - - AuthType Digest - AuthName realm3 - AuthUserFile ./htdigest - AuthDigestDomain /Digest/realm3 - Require valid-user - # test RFC2069-style Digest - AuthDigestQop none - diff --git a/tests/httpd.conf.24.in b/tests/httpd.conf.24.in deleted file mode 100644 index 850b8393..00000000 --- a/tests/httpd.conf.24.in +++ /dev/null @@ -1,276 +0,0 @@ -# http.conf used for testing auth-test - -ServerName 127.0.0.1 -Listen 127.0.0.1:47524 - -DocumentRoot . - -# The tests shut down apache with "graceful-stop", because that makes -# it close its listening socket right away. But it seems to sometimes -# result in apache never fully exiting. This fixes that. -GracefulShutdownTimeout 1 - -# Change this to "./error.log" if it's failing and you don't know why -ErrorLog /dev/null - -LoadModule mpm_prefork_module @APACHE_MODULE_DIR@/mod_mpm_prefork.so -LoadModule alias_module @APACHE_MODULE_DIR@/mod_alias.so -LoadModule auth_basic_module @APACHE_MODULE_DIR@/mod_auth_basic.so -LoadModule auth_digest_module @APACHE_MODULE_DIR@/mod_auth_digest.so -LoadModule authn_core_module @APACHE_MODULE_DIR@/mod_authn_core.so -LoadModule authn_file_module @APACHE_MODULE_DIR@/mod_authn_file.so -LoadModule authz_core_module @APACHE_MODULE_DIR@/mod_authz_core.so -LoadModule authz_host_module @APACHE_MODULE_DIR@/mod_authz_host.so -LoadModule authz_user_module @APACHE_MODULE_DIR@/mod_authz_user.so -LoadModule dir_module @APACHE_MODULE_DIR@/mod_dir.so -LoadModule mime_module @APACHE_MODULE_DIR@/mod_mime.so -@IF_HAVE_PHP@LoadModule php5_module @APACHE_PHP_MODULE_DIR@/@APACHE_PHP_MODULE@ -LoadModule proxy_module @APACHE_MODULE_DIR@/mod_proxy.so -LoadModule proxy_http_module @APACHE_MODULE_DIR@/mod_proxy_http.so -LoadModule proxy_connect_module @APACHE_MODULE_DIR@/mod_proxy_connect.so -LoadModule ssl_module @APACHE_SSL_MODULE_DIR@/mod_ssl.so -LoadModule unixd_module @APACHE_SSL_MODULE_DIR@/mod_unixd.so - -DirectoryIndex index.txt -TypesConfig /dev/null -AddType application/x-httpd-php .php -Redirect permanent /redirected /index.txt - -# Proxy #1: unauthenticated -Listen 127.0.0.1:47526 - - ProxyRequests On - AllowCONNECT 47525 - - # Deny proxying by default - - Require all denied - - - # Allow local http connections - - Require all granted - - - # Allow CONNECT to local https port - - Require all granted - - - # Deny non-proxy requests - - Require all denied - - - -# Proxy #2: authenticated -Listen 127.0.0.1:47527 - - ProxyRequests On - AllowCONNECT 47525 - - # Deny proxying by default - - Require all denied - - - # Allow local http connections with authentication - - AuthType Basic - AuthName realm1 - AuthUserFile ./htpasswd - Require valid-user - - - # Allow CONNECT to local https port with authentication - - AuthType Basic - AuthName realm1 - AuthUserFile ./htpasswd - Require valid-user - - - # Fail non-proxy requests - - Require all denied - - - -# Proxy #3: unauthenticatable-to -Listen 127.0.0.1:47528 - - ProxyRequests On - AllowCONNECT 47525 - - # Deny proxying by default - - Require all denied - - - # Allow local http connections with authentication - - AuthType Basic - AuthName realm1 - AuthUserFile ./htpasswd - Require user no-such-user - - - # Allow CONNECT to local https port with authentication - - AuthType Basic - AuthName realm1 - AuthUserFile ./htpasswd - Require user no-such-user - - - # Fail non-proxy requests - - Require all denied - - - - -# SSL setup - - Listen 127.0.0.1:47525 - - - SSLEngine on - - SSLCertificateFile ./test-cert.pem - SSLCertificateKeyFile ./test-key.pem - - - - - -# Basic auth tests -Alias /Basic/realm1/realm2/realm1 . -Alias /Basic/realm1/realm2 . -Alias /Basic/realm1/subdir . -Alias /Basic/realm1/not . -Alias /Basic/realm1 . -Alias /Basic/realm12/subdir . -Alias /Basic/realm12 . -Alias /Basic/realm2 . -Alias /Basic/realm3 . -Alias /Basic . - - - AuthType Basic - AuthName realm1 - AuthUserFile ./htpasswd - Require user user1 - - - - AuthType Basic - AuthName realm1 - AuthUserFile ./htpasswd - Require user user2 - - - - AuthType Basic - AuthName realm12 - AuthUserFile ./htpasswd - Require user user1 user2 - - - - AuthType Basic - AuthName realm2 - AuthUserFile ./htpasswd - Require user user2 - - - - AuthType Basic - AuthName realm1 - AuthUserFile ./htpasswd - Require user user1 - - - - AuthType Basic - AuthName realm2 - AuthUserFile ./htpasswd - Require user user2 - - - - AuthType Basic - AuthName realm3 - AuthUserFile ./htpasswd - Require user user3 - - -# Digest auth tests -Alias /Digest/realm1/realm2/realm1 . -Alias /Digest/realm1/realm2 . -Alias /Digest/realm1/subdir . -Alias /Digest/realm1/expire . -Alias /Digest/realm1/not . -Alias /Digest/realm1 . -Alias /Digest/realm2 . -Alias /Digest/realm3 . -Alias /Digest . - - - AuthType Digest - AuthName realm1 - AuthUserFile ./htdigest - AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 - Require valid-user - - - - AuthType Digest - AuthName realm1 - AuthUserFile ./htdigest - AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 - AuthDigestNonceLifetime 2 - Require valid-user - - - - AuthType Digest - AuthName realm1 - AuthUserFile ./htdigest - AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 - Require user user2 - - - - AuthType Digest - AuthName realm2 - AuthUserFile ./htdigest - AuthDigestDomain /Digest/realm2 /Digest/realm1/realm2 - Require valid-user - - - - AuthType Digest - AuthName realm1 - AuthUserFile ./htdigest - AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 - Require valid-user - - - - AuthType Digest - AuthName realm2 - AuthUserFile ./htdigest - AuthDigestDomain /Digest/realm2 /Digest/realm1/realm2 - Require valid-user - - - - AuthType Digest - AuthName realm3 - AuthUserFile ./htdigest - AuthDigestDomain /Digest/realm3 - Require valid-user - # test RFC2069-style Digest - AuthDigestQop none - diff --git a/tests/httpd.conf.in b/tests/httpd.conf.in new file mode 100644 index 00000000..b818c12d --- /dev/null +++ b/tests/httpd.conf.in @@ -0,0 +1,284 @@ +# http.conf used for testing auth-test + +ServerName 127.0.0.1 +Listen 127.0.0.1:47524 + +DocumentRoot . + +# The tests shut down apache with "graceful-stop", because that makes +# it close its listening socket right away. But it seems to sometimes +# result in apache never fully exiting. This fixes that. +GracefulShutdownTimeout 1 + +# Change this to "./error.log" if it's failing and you don't know why +ErrorLog /dev/null + +LoadModule mpm_prefork_module @APACHE_MODULE_DIR@/mod_mpm_prefork.so +LoadModule alias_module @APACHE_MODULE_DIR@/mod_alias.so +LoadModule auth_basic_module @APACHE_MODULE_DIR@/mod_auth_basic.so +LoadModule auth_digest_module @APACHE_MODULE_DIR@/mod_auth_digest.so +LoadModule authn_core_module @APACHE_MODULE_DIR@/mod_authn_core.so +LoadModule authn_file_module @APACHE_MODULE_DIR@/mod_authn_file.so +LoadModule authz_core_module @APACHE_MODULE_DIR@/mod_authz_core.so +LoadModule authz_host_module @APACHE_MODULE_DIR@/mod_authz_host.so +LoadModule authz_user_module @APACHE_MODULE_DIR@/mod_authz_user.so +LoadModule dir_module @APACHE_MODULE_DIR@/mod_dir.so +LoadModule mime_module @APACHE_MODULE_DIR@/mod_mime.so +@IF_HAVE_PHP@LoadModule php7_module @APACHE_PHP_MODULE_DIR@/libphp7.so +LoadModule proxy_module @APACHE_MODULE_DIR@/mod_proxy.so +LoadModule proxy_http_module @APACHE_MODULE_DIR@/mod_proxy_http.so +LoadModule proxy_connect_module @APACHE_MODULE_DIR@/mod_proxy_connect.so +LoadModule ssl_module @APACHE_SSL_MODULE_DIR@/mod_ssl.so +@IF_HAVE_MOD_UNIXD@LoadModule unixd_module @APACHE_SSL_MODULE_DIR@/mod_unixd.so + +DirectoryIndex index.txt +TypesConfig /dev/null +AddType application/x-httpd-php .php +Redirect permanent /redirected /index.txt + +# Proxy #1: unauthenticated +Listen 127.0.0.1:47526 + + ProxyRequests On + AllowCONNECT 47525 + + # Deny proxying by default + + Require all denied + + + # Allow local http connections + + Require all granted + + + # Allow CONNECT to local https port + + Require all granted + + + # Deny non-proxy requests + + Require all denied + + + +# Proxy #2: authenticated +Listen 127.0.0.1:47527 + + ProxyRequests On + AllowCONNECT 47525 + + # Deny proxying by default + + Require all denied + + + # Allow local http connections with authentication + + AuthType Basic + AuthName realm1 + AuthUserFile ./htpasswd + Require valid-user + + + # Allow CONNECT to local https port with authentication + + AuthType Basic + AuthName realm1 + AuthUserFile ./htpasswd + Require valid-user + + + # Fail non-proxy requests + + Require all denied + + + +# Proxy #3: unauthenticatable-to +Listen 127.0.0.1:47528 + + ProxyRequests On + AllowCONNECT 47525 + + # Deny proxying by default + + Require all denied + + + # Allow local http connections with authentication + + AuthType Basic + AuthName realm1 + AuthUserFile ./htpasswd + Require user no-such-user + + + # Allow CONNECT to local https port with authentication + + AuthType Basic + AuthName realm1 + AuthUserFile ./htpasswd + Require user no-such-user + + + # Fail non-proxy requests + + Require all denied + + + + +# SSL setup + + Listen 127.0.0.1:47525 + + + SSLEngine on + + SSLCertificateFile ./test-cert.pem + SSLCertificateKeyFile ./test-key.pem + + + + + +# Basic auth tests +Alias /Basic/realm1/realm2/realm1 . +Alias /Basic/realm1/realm2 . +Alias /Basic/realm1/subdir . +Alias /Basic/realm1/not . +Alias /Basic/realm1 . +Alias /Basic/realm12/subdir . +Alias /Basic/realm12 . +Alias /Basic/realm2 . +Alias /Basic/realm3 . +Alias /Basic . +Alias /BasicRoot . + + + AuthType Basic + AuthName realm1 + AuthUserFile ./htpasswd + Require user user1 + + + + AuthType Basic + AuthName realm1 + AuthUserFile ./htpasswd + Require user user2 + + + + AuthType Basic + AuthName realm12 + AuthUserFile ./htpasswd + Require user user1 user2 + + + + AuthType Basic + AuthName realm2 + AuthUserFile ./htpasswd + Require user user2 + + + + AuthType Basic + AuthName realm1 + AuthUserFile ./htpasswd + Require user user1 + + + + AuthType Basic + AuthName realm2 + AuthUserFile ./htpasswd + Require user user2 + + + + AuthType Basic + AuthName realm3 + AuthUserFile ./htpasswd + Require user user3 + + + + AuthType Basic + AuthName realm1 + AuthUserFile ./htpasswd + Require user user1 + + +# Digest auth tests +Alias /Digest/realm1/realm2/realm1 . +Alias /Digest/realm1/realm2 . +Alias /Digest/realm1/subdir . +Alias /Digest/realm1/expire . +Alias /Digest/realm1/not . +Alias /Digest/realm1 . +Alias /Digest/realm2 . +Alias /Digest/realm3 . +Alias /Digest . + + + AuthType Digest + AuthName realm1 + AuthUserFile ./htdigest + AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 + Require valid-user + + + + AuthType Digest + AuthName realm1 + AuthUserFile ./htdigest + AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 + AuthDigestNonceLifetime 2 + Require valid-user + + + + AuthType Digest + AuthName realm1 + AuthUserFile ./htdigest + AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 + Require user user2 + + + + AuthType Digest + AuthName realm2 + AuthUserFile ./htdigest + AuthDigestDomain /Digest/realm2 /Digest/realm1/realm2 + Require valid-user + + + + AuthType Digest + AuthName realm1 + AuthUserFile ./htdigest + AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 + Require valid-user + + + + AuthType Digest + AuthName realm2 + AuthUserFile ./htdigest + AuthDigestDomain /Digest/realm2 /Digest/realm1/realm2 + Require valid-user + + + + AuthType Digest + AuthName realm3 + AuthUserFile ./htdigest + AuthDigestDomain /Digest/realm3 + Require valid-user + # test RFC2069-style Digest + AuthDigestQop none + diff --git a/tests/libsoup.supp b/tests/libsoup.supp index ae8bda38..2c7ba9b5 100644 --- a/tests/libsoup.supp +++ b/tests/libsoup.supp @@ -208,13 +208,20 @@ glib/tlsdb Memcheck:Leak ... - fun:g_tls_backend_get_default_database + fun:g_tls_backend_gnutls_get_default_database +} +{ + glib/tlsdb_dummy + Memcheck:Leak + ... + fun:g_dummy_tls_backend_get_default_database } { glib/tlscache Memcheck:Leak ... - fun:g_tls_backend_gnutls_cache_session_data + fun:g_bytes_new_with_free_func + fun:g_tls_client_connection_gnutls_constructed } { glib/tlspriority @@ -229,6 +236,12 @@ fun:ensure_attribute_hash fun:lookup_attribute } +{ + glib/gfileinfo2 + Memcheck:Leak + ... + fun:_lookup_namespace +} { glib/unixsignalthread Memcheck:Leak @@ -312,7 +325,7 @@ glib/unused_thread_queue Memcheck:Leak ... - fun:g_async_queue_new + fun:g_async_queue_new_full fun:g_thread_pool_new } { @@ -335,6 +348,18 @@ ... fun:g_get_charset } +{ + glib/tmpdir + Memcheck:Leak + ... + fun:g_get_tmp_dir +} +{ + glib/g_get_user_name + Memcheck:Leak + ... + fun:g_get_user_name +} { glib/gtlssessioncache Memcheck:Leak @@ -414,6 +439,30 @@ fun:g_thread_pool_new fun:g_task_thread_pool_init } +{ + glib/resources + Memcheck:Leak + ... + fun:g_resource_load +} +{ + glib/resources2 + Memcheck:Leak + ... + fun:g_resources_register +} +{ + glib/worker + Memcheck:Leak + ... + fun:g_get_worker_context +} +{ + glib/worker2 + Memcheck:Leak + ... + fun:glib_worker_main +} # probably inlines the aggressive memcpy/memcmp { @@ -444,10 +493,16 @@ } { - libxml2/xmlInitParser + libxml2/xmlInitGlobals + Memcheck:Leak + ... + fun:xmlInitGlobals +} +{ + libxml2/xmlInitMemory Memcheck:Leak ... - fun:xmlInitParser + fun:xmlInitMemory } { libxml2/xmlInitParserCtxt @@ -459,7 +514,7 @@ libxml2/xmlInitializeDict Memcheck:Leak ... - fun:xmlInitializeDict + fun:__xmlInitializeDict } { libxml2/xmlInitCharEncodingHandlers @@ -503,6 +558,20 @@ fun:g_mutex_impl_new fun:g_mutex_get_impl } +{ + glib/grecmuteximpl + Memcheck:Leak + ... + fun:g_rec_mutex_impl_new + fun:g_rec_mutex_get_impl +} +{ + glib/grwlockimpl + Memcheck:Leak + ... + fun:g_rw_lock_impl_new + fun:g_rw_lock_get_impl +} { glib/gcondimpl Memcheck:Leak @@ -517,3 +586,10 @@ fun:g_private_impl_new fun:g_private_get_impl } +{ + glib/test_uri_base + Memcheck:Leak + ... + fun:g_strdup + fun:test_case_run +} \ No newline at end of file diff --git a/tests/misc-test.c b/tests/misc-test.c index 00559a03..8cbda80a 100644 --- a/tests/misc-test.c +++ b/tests/misc-test.c @@ -73,7 +73,7 @@ server_callback (SoupServer *server, SoupMessage *msg, if (!strcmp (path, "/slow")) { soup_server_pause_message (server, msg); g_object_set_data (G_OBJECT (msg), "server", server); - soup_add_timeout (soup_server_get_async_context (server), + soup_add_timeout (g_main_context_get_thread_default (), 1000, timeout_finish_message, msg); } @@ -120,6 +120,38 @@ do_host_test (void) g_object_unref (two); } +/* request with too big header should be discarded with a IO error to + * prevent DOS attacks. + */ +static void +do_host_big_header (void) +{ + SoupMessage *msg; + SoupSession *session; + int i; + + g_test_bug ("792173"); + + session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, NULL); + + msg = soup_message_new_from_uri ("GET", base_uri); + for (i = 0; i < 2048; i++) { + char *key = g_strdup_printf ("test-long-header-key%d", i); + char *value = g_strdup_printf ("test-long-header-key%d", i); + soup_message_headers_append (msg->request_headers, key, value); + g_free (value); + g_free (key); + } + + soup_session_send_message (session, msg); + + soup_test_session_abort_unref (session); + + soup_test_assert_message_status (msg, SOUP_STATUS_IO_ERROR); + + g_object_unref (msg); +} + /* Dropping the application's ref on the session from a callback * should not cause the session to be freed at an incorrect time. * (This test will crash if it fails.) @@ -151,35 +183,28 @@ static void do_callback_unref_test (void) { SoupServer *bad_server; - SoupAddress *addr; SoupSession *session; SoupMessage *one, *two; GMainLoop *loop; - char *bad_uri; + SoupURI *bad_uri; g_test_bug ("533473"); /* Get a guaranteed-bad URI */ - addr = soup_address_new ("127.0.0.1", SOUP_ADDRESS_ANY_PORT); - soup_address_resolve_sync (addr, NULL); - bad_server = soup_server_new (SOUP_SERVER_INTERFACE, addr, - NULL); - g_object_unref (addr); - - bad_uri = g_strdup_printf ("http://127.0.0.1:%u/", - soup_server_get_port (bad_server)); - g_object_unref (bad_server); + bad_server = soup_test_server_new (SOUP_TEST_SERVER_DEFAULT); + bad_uri = soup_test_server_get_uri (bad_server, "http", NULL); + soup_test_server_quit_unref (bad_server); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); g_object_add_weak_pointer (G_OBJECT (session), (gpointer *)&session); loop = g_main_loop_new (NULL, TRUE); - one = soup_message_new ("GET", bad_uri); + one = soup_message_new_from_uri ("GET", bad_uri); g_object_add_weak_pointer (G_OBJECT (one), (gpointer *)&one); - two = soup_message_new ("GET", bad_uri); + two = soup_message_new_from_uri ("GET", bad_uri); g_object_add_weak_pointer (G_OBJECT (two), (gpointer *)&two); - g_free (bad_uri); + soup_uri_free (bad_uri); soup_session_queue_message (session, one, cu_one_completed, loop); soup_session_queue_message (session, two, cu_two_completed, loop); @@ -245,22 +270,15 @@ static void do_callback_unref_req_test (void) { SoupServer *bad_server; - SoupAddress *addr; SoupSession *session; SoupRequest *one, *two; GMainLoop *loop; - char *bad_uri; + SoupURI *bad_uri; /* Get a guaranteed-bad URI */ - addr = soup_address_new ("127.0.0.1", SOUP_ADDRESS_ANY_PORT); - soup_address_resolve_sync (addr, NULL); - bad_server = soup_server_new (SOUP_SERVER_INTERFACE, addr, - NULL); - g_object_unref (addr); - - bad_uri = g_strdup_printf ("http://127.0.0.1:%u/", - soup_server_get_port (bad_server)); - g_object_unref (bad_server); + bad_server = soup_test_server_new (SOUP_TEST_SERVER_DEFAULT); + bad_uri = soup_test_server_get_uri (bad_server, "http", NULL); + soup_test_server_quit_unref (bad_server); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, SOUP_SESSION_USE_THREAD_CONTEXT, TRUE, @@ -269,11 +287,11 @@ do_callback_unref_req_test (void) loop = g_main_loop_new (NULL, TRUE); - one = soup_session_request (session, bad_uri, NULL); + one = soup_session_request_uri (session, bad_uri, NULL); g_object_add_weak_pointer (G_OBJECT (one), (gpointer *)&one); - two = soup_session_request (session, bad_uri, NULL); + two = soup_session_request_uri (session, bad_uri, NULL); g_object_add_weak_pointer (G_OBJECT (two), (gpointer *)&two); - g_free (bad_uri); + soup_uri_free (bad_uri); soup_request_send_async (one, NULL, cur_one_completed, session); g_object_unref (one); @@ -418,7 +436,7 @@ ea_connection_created (SoupSession *session, GObject *conn, gpointer user_data) } static void -ea_request_started (SoupSession *session, SoupMessage *msg, SoupSocket *socket, gpointer user_data) +ea_message_starting (SoupMessage *msg, SoupSession *session) { soup_session_cancel_message (session, msg, SOUP_STATUS_CANCELLED); } @@ -469,8 +487,8 @@ do_early_abort_test (void) session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); msg = soup_message_new_from_uri ("GET", base_uri); - g_signal_connect (session, "request-started", - G_CALLBACK (ea_request_started), NULL); + g_signal_connect (msg, "starting", + G_CALLBACK (ea_message_starting), session); soup_session_send_message (session, msg); debug_printf (2, " Message 3 completed\n"); @@ -521,12 +539,20 @@ ear_three_completed (GObject *source, GAsyncResult *result, gpointer loop) } static void -ear_request_started (SoupSession *session, SoupMessage *msg, - SoupSocket *socket, gpointer cancellable) +ear_message_starting (SoupMessage *msg, gpointer cancellable) { g_cancellable_cancel (cancellable); } +static void +ear_request_queued (SoupSession *session, SoupMessage *msg, + gpointer cancellable) +{ + g_signal_connect (msg, "starting", + G_CALLBACK (ear_message_starting), + cancellable); +} + static void do_early_abort_req_test (void) { @@ -574,8 +600,8 @@ do_early_abort_req_test (void) req = soup_session_request_uri (session, base_uri, NULL); cancellable = g_cancellable_new (); - g_signal_connect (session, "request-started", - G_CALLBACK (ear_request_started), cancellable); + g_signal_connect (session, "request-queued", + G_CALLBACK (ear_request_queued), cancellable); soup_request_send_async (req, cancellable, ear_three_completed, loop); g_main_loop_run (loop); g_object_unref (req); @@ -914,6 +940,254 @@ do_pause_abort_test (void) g_assert_null (ptr); } +static GMainLoop *pause_cancel_loop; + +static void +pause_cancel_got_headers (SoupMessage *msg, gpointer user_data) +{ + SoupSession *session = user_data; + + soup_session_pause_message (session, msg); + g_main_loop_quit (pause_cancel_loop); +} + +static void +pause_cancel_finished (SoupSession *session, SoupMessage *msg, gpointer user_data) +{ + gboolean *finished = user_data; + + *finished = TRUE; + g_main_loop_quit (pause_cancel_loop); +} + +static gboolean +pause_cancel_timeout (gpointer user_data) +{ + gboolean *timed_out = user_data; + + *timed_out = TRUE; + g_main_loop_quit (pause_cancel_loop); + return FALSE; +} + +static void +do_pause_cancel_test (void) +{ + SoupSession *session; + SoupMessage *msg; + gboolean finished = FALSE, timed_out = FALSE; + guint timeout_id; + + g_test_bug ("745094"); + + session = soup_test_session_new (SOUP_TYPE_SESSION, NULL); + pause_cancel_loop = g_main_loop_new (NULL, FALSE); + + timeout_id = g_timeout_add_seconds (5, pause_cancel_timeout, &timed_out); + + msg = soup_message_new_from_uri ("GET", base_uri); + g_object_ref (msg); + g_signal_connect (msg, "got-headers", + G_CALLBACK (pause_cancel_got_headers), session); + + soup_session_queue_message (session, msg, pause_cancel_finished, &finished); + g_main_loop_run (pause_cancel_loop); + g_assert_false (finished); + + soup_session_cancel_message (session, msg, SOUP_STATUS_CANCELLED); + g_main_loop_run (pause_cancel_loop); + g_assert_true (finished); + g_assert_false (timed_out); + + soup_test_assert_message_status (msg, SOUP_STATUS_CANCELLED); + g_object_unref (msg); + + soup_test_session_abort_unref (session); + g_main_loop_unref (pause_cancel_loop); + if (!timed_out) + g_source_remove (timeout_id); +} + +static gboolean +run_echo_server (gpointer user_data) +{ + GIOStream *stream = user_data; + GInputStream *istream; + GDataInputStream *distream; + GOutputStream *ostream; + char *str, *caps; + gssize n; + GError *error = NULL; + + istream = g_io_stream_get_input_stream (stream); + distream = G_DATA_INPUT_STREAM (g_data_input_stream_new (istream)); + ostream = g_io_stream_get_output_stream (stream); + + /* Echo until the client disconnects */ + while (TRUE) { + str = g_data_input_stream_read_line (distream, NULL, NULL, &error); + g_assert_no_error (error); + if (!str) + break; + + caps = g_ascii_strup (str, -1); + n = g_output_stream_write (ostream, caps, strlen (caps), NULL, &error); + g_assert_no_error (error); + g_assert_cmpint (n, ==, strlen (caps)); + n = g_output_stream_write (ostream, "\n", 1, NULL, &error); + g_assert_no_error (error); + g_assert_cmpint (n, ==, 1); + g_free (caps); + g_free (str); + } + + g_object_unref (distream); + + g_io_stream_close (stream, NULL, &error); + g_assert_no_error (error); + g_object_unref (stream); + + return FALSE; +} + +static void +steal_after_upgrade (SoupMessage *msg, gpointer user_data) +{ + SoupClientContext *context = user_data; + GIOStream *stream; + GSource *source; + + /* This should not ever be seen. */ + soup_message_set_status (msg, SOUP_STATUS_INTERNAL_SERVER_ERROR); + + stream = soup_client_context_steal_connection (context); + + source = g_idle_source_new (); + g_source_set_callback (source, run_echo_server, stream, NULL); + g_source_attach (source, g_main_context_get_thread_default ()); + g_source_unref (source); +} + +static void +upgrade_server_callback (SoupServer *server, SoupMessage *msg, + const char *path, GHashTable *query, + SoupClientContext *context, gpointer data) +{ + if (msg->method != SOUP_METHOD_GET) { + soup_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED); + return; + } + + soup_message_set_status (msg, SOUP_STATUS_SWITCHING_PROTOCOLS); + soup_message_headers_append (msg->request_headers, "Upgrade", "ECHO"); + soup_message_headers_append (msg->request_headers, "Connection", "upgrade"); + + g_signal_connect (msg, "wrote-informational", + G_CALLBACK (steal_after_upgrade), context); +} + +static void +callback_not_reached (SoupSession *session, SoupMessage *msg, gpointer user_data) +{ + g_assert_not_reached (); +} + +static void +switching_protocols (SoupMessage *msg, gpointer user_data) +{ + GIOStream **out_iostream = user_data; + SoupSession *session = g_object_get_data (G_OBJECT (msg), "SoupSession"); + + *out_iostream = soup_session_steal_connection (session, msg); +} + +static void +do_stealing_test (gconstpointer data) +{ + gboolean sync = GPOINTER_TO_INT (data); + SoupServer *server; + SoupURI *uri; + SoupSession *session; + SoupMessage *msg; + GIOStream *iostream; + GInputStream *istream; + GDataInputStream *distream; + GOutputStream *ostream; + int i; + gssize n; + char *str, *caps; + GError *error = NULL; + static const char *strings[] = { "one", "two", "three", "four", "five" }; + + server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); + uri = soup_test_server_get_uri (server, SOUP_URI_SCHEME_HTTP, "127.0.0.1"); + soup_server_add_handler (server, NULL, upgrade_server_callback, NULL, NULL); + + session = soup_test_session_new (SOUP_TYPE_SESSION, NULL); + msg = soup_message_new_from_uri ("GET", uri); + soup_message_headers_append (msg->request_headers, "Upgrade", "echo"); + soup_message_headers_append (msg->request_headers, "Connection", "upgrade"); + g_object_set_data (G_OBJECT (msg), "SoupSession", session); + + soup_message_add_status_code_handler (msg, "got-informational", + SOUP_STATUS_SWITCHING_PROTOCOLS, + G_CALLBACK (switching_protocols), &iostream); + + iostream = NULL; + + if (sync) { + soup_session_send_message (session, msg); + soup_test_assert_message_status (msg, SOUP_STATUS_SWITCHING_PROTOCOLS); + } else { + g_object_ref (msg); + soup_session_queue_message (session, msg, callback_not_reached, NULL); + while (iostream == NULL) + g_main_context_iteration (NULL, TRUE); + } + + g_assert (iostream != NULL); + + g_object_unref (msg); + soup_test_session_abort_unref (session); + soup_uri_free (uri); + + /* Now iostream connects to a (capitalizing) echo server */ + + istream = g_io_stream_get_input_stream (iostream); + distream = G_DATA_INPUT_STREAM (g_data_input_stream_new (istream)); + ostream = g_io_stream_get_output_stream (iostream); + + for (i = 0; i < G_N_ELEMENTS (strings); i++) { + n = g_output_stream_write (ostream, strings[i], strlen (strings[i]), + NULL, &error); + g_assert_no_error (error); + g_assert_cmpint (n, ==, strlen (strings[i])); + n = g_output_stream_write (ostream, "\n", 1, NULL, &error); + g_assert_no_error (error); + g_assert_cmpint (n, ==, 1); + } + + for (i = 0; i < G_N_ELEMENTS (strings); i++) { + str = g_data_input_stream_read_line (distream, NULL, NULL, &error); + g_assert_no_error (error); + caps = g_ascii_strup (strings[i], -1); + g_assert_cmpstr (caps, ==, str); + g_free (caps); + g_free (str); + } + + g_object_unref (distream); + + g_io_stream_close (iostream, NULL, &error); + g_assert_no_error (error); + g_object_unref (iostream); + + /* We can't do this until the end because it's in another thread, and + * soup_test_server_quit_unref() will wait for that thread to exit. + */ + soup_test_server_quit_unref (server); +} + int main (int argc, char **argv) { @@ -922,10 +1196,9 @@ main (int argc, char **argv) test_init (argc, argv, NULL); - server = soup_test_server_new (TRUE); + server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); soup_server_add_handler (server, NULL, server_callback, "http", NULL); - base_uri = soup_uri_new ("http://127.0.0.1/"); - soup_uri_set_port (base_uri, soup_server_get_port (server)); + base_uri = soup_test_server_get_uri (server, "http", NULL); auth_domain = soup_auth_domain_basic_new ( SOUP_AUTH_DOMAIN_REALM, "misc-test", @@ -936,12 +1209,12 @@ main (int argc, char **argv) g_object_unref (auth_domain); if (tls_available) { - ssl_server = soup_test_server_new_ssl (TRUE); + ssl_server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); soup_server_add_handler (ssl_server, NULL, server_callback, "https", NULL); - ssl_base_uri = soup_uri_new ("https://127.0.0.1/"); - soup_uri_set_port (ssl_base_uri, soup_server_get_port (ssl_server)); + ssl_base_uri = soup_test_server_get_uri (ssl_server, "https", "127.0.0.1"); } + g_test_add_func ("/misc/bigheader", do_host_big_header); g_test_add_func ("/misc/host", do_host_test); g_test_add_func ("/misc/callback-unref/msg", do_callback_unref_test); g_test_add_func ("/misc/callback-unref/req", do_callback_unref_req_test); @@ -956,6 +1229,9 @@ main (int argc, char **argv) g_test_add_func ("/misc/aliases", do_aliases_test); g_test_add_func ("/misc/idle-on-dispose", do_idle_on_dispose_test); g_test_add_func ("/misc/pause-abort", do_pause_abort_test); + g_test_add_func ("/misc/pause-cancel", do_pause_cancel_test); + g_test_add_data_func ("/misc/stealing/async", GINT_TO_POINTER (FALSE), do_stealing_test); + g_test_add_data_func ("/misc/stealing/sync", GINT_TO_POINTER (TRUE), do_stealing_test); ret = g_test_run (); @@ -967,5 +1243,6 @@ main (int argc, char **argv) soup_test_server_quit_unref (ssl_server); } + test_cleanup (); return ret; } diff --git a/tests/multipart-test.c b/tests/multipart-test.c index e057412e..488865ae 100644 --- a/tests/multipart-test.c +++ b/tests/multipart-test.c @@ -486,10 +486,9 @@ main (int argc, char **argv) buffer = g_malloc (READ_BUFFER_SIZE); - server = soup_test_server_new (FALSE); + server = soup_test_server_new (SOUP_TEST_SERVER_DEFAULT); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); - base_uri = soup_uri_new ("http://127.0.0.1"); - soup_uri_set_port (base_uri, soup_server_get_port (server)); + base_uri = soup_test_server_get_uri (server, "http", NULL); base_uri_string = soup_uri_to_string (base_uri, FALSE); /* FIXME: I had to raise the number of connections allowed here, otherwise I diff --git a/tests/no-ssl-test.c b/tests/no-ssl-test.c index 82532c74..c9d9bcad 100644 --- a/tests/no-ssl-test.c +++ b/tests/no-ssl-test.c @@ -3,14 +3,14 @@ #include "test-utils.h" static void -do_ssl_test_for_session (SoupSession *session, const char *uri) +do_ssl_test_for_session (SoupSession *session, SoupURI *uri) { SoupMessage *msg; GTlsCertificate *cert = NULL; GTlsCertificateFlags flags; gboolean is_https; - msg = soup_message_new ("GET", uri); + msg = soup_message_new_from_uri ("GET", uri); soup_session_send_message (session, msg); soup_test_assert_message_status (msg, SOUP_STATUS_SSL_FAILED); @@ -24,8 +24,9 @@ do_ssl_test_for_session (SoupSession *session, const char *uri) } static void -do_ssl_tests (gconstpointer uri) +do_ssl_tests (gconstpointer data) { + SoupURI *uri = (SoupURI *)data; SoupSession *session; g_test_bug ("700518"); @@ -53,10 +54,18 @@ do_session_property_tests (void) GTlsDatabase *tlsdb; char *ca_file; SoupSession *session; + GParamSpec *pspec; g_test_bug ("700518"); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; session = soup_session_async_new (); + G_GNUC_END_IGNORE_DEPRECATIONS; + + /* Temporarily undeprecate SOUP_SESSION_SSL_CA_FILE to avoid warnings. */ + pspec = g_object_class_find_property (g_type_class_peek (SOUP_TYPE_SESSION), + SOUP_SESSION_SSL_CA_FILE); + pspec->flags &= ~G_PARAM_DEPRECATED; g_object_get (G_OBJECT (session), "ssl-use-system-ca-file", &use_system, @@ -101,6 +110,9 @@ do_session_property_tests (void) soup_test_assert (ca_file == NULL, "setting tls-database NULL set ssl-ca-file"); soup_test_session_abort_unref (session); + + /* Re-deprecate SOUP_SESSION_SSL_CA_FILE */ + pspec->flags |= G_PARAM_DEPRECATED; } static void @@ -121,7 +133,8 @@ int main (int argc, char **argv) { SoupServer *server; - char *uri; + SoupURI *uri; + guint port; int ret; /* Force this test to use the dummy TLS backend */ @@ -135,15 +148,17 @@ main (int argc, char **argv) */ server = soup_test_server_new (TRUE); soup_server_add_handler (server, NULL, server_handler, NULL, NULL); - uri = g_strdup_printf ("https://127.0.0.1:%u/", - soup_server_get_port (server)); + uri = soup_test_server_get_uri (server, "http", NULL); + port = uri->port; + soup_uri_set_scheme (uri, SOUP_URI_SCHEME_HTTPS); + soup_uri_set_port (uri, port); g_test_add_func ("/no-ssl/session-properties", do_session_property_tests); g_test_add_data_func ("/no-ssl/request-error", uri, do_ssl_tests); ret = g_test_run (); - g_free (uri); + soup_uri_free (uri); soup_test_server_quit_unref (server); test_cleanup (); diff --git a/tests/ntlm-test.c b/tests/ntlm-test.c index 24a0f2e4..0cc41a7b 100644 --- a/tests/ntlm-test.c +++ b/tests/ntlm-test.c @@ -11,8 +11,6 @@ #include "test-utils.h" -static SoupURI *uri; - typedef enum { NTLM_UNAUTHENTICATED, NTLM_RECEIVED_REQUEST, @@ -29,9 +27,17 @@ static const char *state_name[] = { #define NTLM_RESPONSE_START "TlRMTVNTUAADAAAA" #define NTLM_CHALLENGE "TlRMTVNTUAACAAAADAAMADAAAAABAoEAASNFZ4mrze8AAAAAAAAAAGIAYgA8AAAARABPAE0AQQBJAE4AAgAMAEQATwBNAEEASQBOAAEADABTAEUAUgBWAEUAUgAEABQAZABvAG0AYQBpAG4ALgBjAG8AbQADACIAcwBlAHIAdgBlAHIALgBkAG8AbQBhAGkAbgAuAGMAbwBtAAAAAAA=" +#define NTLMSSP_CHALLENGE "TlRMTVNTUAACAAAADAAMADAAAAABAokAASNFZ4mrze8AAAAAAAAAAGIAYgA8AAAARABPAE0AQQBJAE4AAgAMAEQATwBNAEEASQBOAAEADABTAEUAUgBWAEUAUgAEABQAZABvAG0AYQBpAG4ALgBjAG8AbQADACIAcwBlAHIAdgBlAHIALgBkAG8AbQBhAGkAbgAuAGMAbwBtAAAAAAA=" #define NTLM_RESPONSE_USER(response) ((response)[86] == 'E' ? NTLM_AUTHENTICATED_ALICE : ((response)[86] == 'I' ? NTLM_AUTHENTICATED_BOB : NTLM_UNAUTHENTICATED)) +typedef struct { + SoupServer *server; + GHashTable *connections; + SoupURI *uri; + gboolean ntlmssp; +} TestServer; + static void clear_state (gpointer connections, GObject *ex_connection) { @@ -43,8 +49,8 @@ server_callback (SoupServer *server, SoupMessage *msg, const char *path, GHashTable *query, SoupClientContext *client, gpointer data) { - GHashTable *connections = data; - SoupSocket *socket; + TestServer *ts = data; + GSocket *socket; const char *auth; NTLMServerState state, required_user = 0; gboolean auth_required, not_found = FALSE; @@ -70,8 +76,8 @@ server_callback (SoupServer *server, SoupMessage *msg, if (strstr (path, "/404")) not_found = TRUE; - socket = soup_client_context_get_socket (client); - state = GPOINTER_TO_INT (g_hash_table_lookup (connections, socket)); + socket = soup_client_context_get_gsocket (client); + state = GPOINTER_TO_INT (g_hash_table_lookup (ts->connections, socket)); auth = soup_message_headers_get_one (msg->request_headers, "Authorization"); @@ -121,7 +127,7 @@ server_callback (SoupServer *server, SoupMessage *msg, if (ntlm_allowed && state == NTLM_RECEIVED_REQUEST) { soup_message_headers_append (msg->response_headers, "WWW-Authenticate", - "NTLM " NTLM_CHALLENGE); + ts->ntlmssp ? ("NTLM " NTLMSSP_CHALLENGE) : ("NTLM " NTLM_CHALLENGE)); state = NTLM_SENT_CHALLENGE; } else if (ntlm_allowed) { soup_message_headers_append (msg->response_headers, @@ -141,8 +147,37 @@ server_callback (SoupServer *server, SoupMessage *msg, } debug_printf (2, " (S:%s)", state_name[state]); - g_hash_table_insert (connections, socket, GINT_TO_POINTER (state)); - g_object_weak_ref (G_OBJECT (socket), clear_state, connections); + g_hash_table_insert (ts->connections, socket, GINT_TO_POINTER (state)); + g_object_weak_ref (G_OBJECT (socket), clear_state, ts->connections); +} + +static void +setup_server (TestServer *ts, + gconstpointer test_data) +{ + ts->server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); + ts->connections = g_hash_table_new (NULL, NULL); + ts->ntlmssp = FALSE; + soup_server_add_handler (ts->server, NULL, server_callback, ts, NULL); + + ts->uri = soup_test_server_get_uri (ts->server, "http", NULL); +} + +static void +setup_ntlmssp_server (TestServer *ts, + gconstpointer test_data) +{ + setup_server (ts, test_data); + ts->ntlmssp = TRUE; +} + +static void +teardown_server (TestServer *ts, + gconstpointer test_data) +{ + soup_uri_free (ts->uri); + soup_test_server_quit_unref (ts->server); + g_hash_table_destroy (ts->connections); } static gboolean authenticated_ntlm = FALSE; @@ -178,8 +213,10 @@ prompt_check (SoupMessage *msg, gpointer user_data) if (header && strstr (header, "Basic ")) state->got_basic_prompt = TRUE; if (header && strstr (header, "NTLM") && - !strstr (header, NTLM_CHALLENGE)) + (!strstr (header, NTLM_CHALLENGE) && + !strstr (header, NTLMSSP_CHALLENGE))) { state->got_ntlm_prompt = TRUE; + } } static void @@ -342,7 +379,7 @@ do_ntlm_round (SoupURI *base_uri, gboolean use_ntlm, * asking. */ authenticated_ntlm = FALSE; - do_message (session, base_uri, "/noauth", + do_message (session, base_uri, "/noauth/", FALSE, use_ntlm, FALSE, FALSE, SOUP_STATUS_OK); @@ -358,7 +395,7 @@ do_ntlm_round (SoupURI *base_uri, gboolean use_ntlm, * previous step, then we'll just immediately get a 401 here. * So in no case will we see the client try to do_ntlm. */ - do_message (session, base_uri, "/alice", + do_message (session, base_uri, "/alice/", !alice_via_ntlm, FALSE, !alice_via_ntlm, alice_via_basic, alice ? SOUP_STATUS_OK : @@ -378,7 +415,7 @@ do_ntlm_round (SoupURI *base_uri, gboolean use_ntlm, SOUP_STATUS_UNAUTHORIZED); /* 4. Should be exactly the same as #3, except the status code */ - do_message (session, base_uri, "/alice", + do_message (session, base_uri, "/alice/", !alice, bob_via_ntlm, !alice, alice_via_basic, alice ? SOUP_STATUS_OK : @@ -390,7 +427,7 @@ do_ntlm_round (SoupURI *base_uri, gboolean use_ntlm, * (and fail). Bob-via-NTLM will try to do NTLM right away and * succeed. */ - do_message (session, base_uri, "/bob", + do_message (session, base_uri, "/bob/", !bob_via_ntlm, bob_via_ntlm, !bob_via_ntlm, alice_via_basic, bob ? SOUP_STATUS_OK : @@ -402,7 +439,7 @@ do_ntlm_round (SoupURI *base_uri, gboolean use_ntlm, * still knows about this path, so will try Basic right away * and succeed. */ - do_message (session, base_uri, "/alice", + do_message (session, base_uri, "/alice/", !alice_via_ntlm, alice_via_ntlm, !alice_via_ntlm, alice_via_basic, alice ? SOUP_STATUS_OK : @@ -412,19 +449,19 @@ do_ntlm_round (SoupURI *base_uri, gboolean use_ntlm, * Since Bob-via-NTLM is unauthenticated at this point, he'll try * NTLM before realizing that the server doesn't support it. */ - do_message (session, base_uri, "/basic", + do_message (session, base_uri, "/basic/", FALSE, bob_via_ntlm, TRUE, user != NULL, user != NULL ? SOUP_STATUS_OK : SOUP_STATUS_UNAUTHORIZED); /* 8. Server accepts Basic or NTLM from either user. - * Alice-via-NTLM is still authenticated at this point from #6, - * and Bob-via-NTLM is authenticated from #7, so neither - * of them will do anything. + * NTLM users will try NTLM without getting a prompt (their + * previous NTLM connections will have been closed by the 401 + * from /basic). Non-NTLM users will be prompted for either. */ - do_message (session, base_uri, "/either", - !use_ntlm, FALSE, + do_message (session, base_uri, "/either/", + !use_ntlm, use_ntlm, !use_ntlm, !use_ntlm && user != NULL, user != NULL ? SOUP_STATUS_OK : SOUP_STATUS_UNAUTHORIZED); @@ -461,8 +498,16 @@ static const NtlmTest ntlm_tests[] = { { "/ntlm/fallback/basic", "alice", FALSE, FALLBACK } }; +static const NtlmTest ntlmssp_tests[] = { + { "/ntlm/ssp/none", NULL, FALSE, BUILTIN }, + { "/ntlm/ssp/alice", "alice", TRUE, BUILTIN }, + { "/ntlm/ssp/bob", "bob", TRUE, BUILTIN }, + { "/ntlm/ssp/basic", "alice", FALSE, BUILTIN } +}; + static void -do_ntlm_test (gconstpointer data) +do_ntlm_test (TestServer *ts, + gconstpointer data) { const NtlmTest *test = data; gboolean use_builtin_ntlm = TRUE; @@ -509,7 +554,7 @@ do_ntlm_test (gconstpointer data) break; } - do_ntlm_round (uri, test->conn_uses_ntlm, test->user, use_builtin_ntlm); + do_ntlm_round (ts->uri, test->conn_uses_ntlm, test->user, use_builtin_ntlm); } static void @@ -532,9 +577,9 @@ retry_test_authenticate (SoupSession *session, SoupMessage *msg, } static void -do_retrying_test (gconstpointer data) +do_retrying_test (TestServer *ts, + gconstpointer data) { - SoupURI *base_uri = (SoupURI *)data; SoupSession *session; SoupMessage *msg; SoupURI *uri; @@ -552,7 +597,7 @@ do_retrying_test (gconstpointer data) g_signal_connect (session, "authenticate", G_CALLBACK (retry_test_authenticate), &retried); - uri = soup_uri_new_with_base (base_uri, "/alice"); + uri = soup_uri_new_with_base (ts->uri, "/alice"); msg = soup_message_new_from_uri ("GET", uri); soup_uri_free (uri); @@ -574,7 +619,7 @@ do_retrying_test (gconstpointer data) G_CALLBACK (retry_test_authenticate), &retried); retried = FALSE; - uri = soup_uri_new_with_base (base_uri, "/bob"); + uri = soup_uri_new_with_base (ts->uri, "/bob"); msg = soup_message_new_from_uri ("GET", uri); soup_uri_free (uri); @@ -591,31 +636,25 @@ do_retrying_test (gconstpointer data) int main (int argc, char **argv) { - SoupServer *server; - GHashTable *connections; int i, ret; test_init (argc, argv, NULL); - server = soup_test_server_new (TRUE); - connections = g_hash_table_new (NULL, NULL); - soup_server_add_handler (server, NULL, - server_callback, connections, NULL); - - uri = soup_uri_new ("http://127.0.0.1/"); - soup_uri_set_port (uri, soup_server_get_port (server)); + for (i = 0; i < G_N_ELEMENTS (ntlm_tests); i++) { + g_test_add (ntlm_tests[i].name, TestServer, &ntlm_tests[i], + setup_server, do_ntlm_test, teardown_server); + } + for (i = 0; i < G_N_ELEMENTS (ntlmssp_tests); i++) { + g_test_add (ntlmssp_tests[i].name, TestServer, &ntlmssp_tests[i], + setup_ntlmssp_server, do_ntlm_test, teardown_server); + } - for (i = 0; i < G_N_ELEMENTS (ntlm_tests); i++) - g_test_add_data_func (ntlm_tests[i].name, &ntlm_tests[i], do_ntlm_test); - g_test_add_data_func ("/ntlm/retry", uri, do_retrying_test); + g_test_add ("/ntlm/retry", TestServer, NULL, + setup_server, do_retrying_test, teardown_server); ret = g_test_run (); - soup_uri_free (uri); - - soup_test_server_quit_unref (server); test_cleanup (); - g_hash_table_destroy (connections); return ret; } diff --git a/tests/proxy-test.c b/tests/proxy-test.c index 4b6679b3..1d68aa05 100644 --- a/tests/proxy-test.c +++ b/tests/proxy-test.c @@ -322,6 +322,84 @@ do_proxy_redirect_test (void) soup_test_session_abort_unref (session); } +static void +do_proxy_auth_request (const char *url, SoupSession *session, gboolean do_read) +{ + SoupRequest *request; + SoupMessage *msg; + GInputStream *stream; + GError *error = NULL; + + request = soup_session_request (session, url, NULL); + msg = soup_request_http_get_message (SOUP_REQUEST_HTTP (request)); + + stream = soup_test_request_send (request, NULL, 0, &error); + g_assert_no_error (error); + g_clear_error (&error); + + if (do_read) { + char buffer[256]; + gsize nread; + + do { + g_input_stream_read_all (stream, buffer, sizeof (buffer), &nread, + NULL, &error); + g_assert_no_error (error); + g_clear_error (&error); + } while (nread > 0); + } + + soup_test_request_close_stream (request, stream, NULL, &error); + g_assert_no_error (error); + g_clear_error (&error); + g_object_unref (stream); + + debug_printf (1, " %d %s\n", msg->status_code, msg->reason_phrase); + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + + g_object_unref (msg); + g_object_unref (request); +} + +static void +do_proxy_auth_cache_test (void) +{ + SoupSession *session; + char *cache_dir; + SoupCache *cache; + char *url; + + g_test_bug ("756076"); + + SOUP_TEST_SKIP_IF_NO_APACHE; + + cache_dir = g_dir_make_tmp ("cache-test-XXXXXX", NULL); + debug_printf (2, " Caching to %s\n", cache_dir); + cache = soup_cache_new (cache_dir, SOUP_CACHE_SINGLE_USER); + g_free (cache_dir); + + session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, + SOUP_SESSION_PROXY_RESOLVER, proxy_resolvers[AUTH_PROXY], + SOUP_SESSION_USE_THREAD_CONTEXT, TRUE, + SOUP_SESSION_ADD_FEATURE, cache, + NULL); + g_signal_connect (session, "authenticate", + G_CALLBACK (authenticate), NULL); + + url = g_strconcat (HTTP_SERVER, "/Basic/realm1/", NULL); + + debug_printf (1, " GET %s via %s (from network)\n", url, proxy_names[AUTH_PROXY]); + do_proxy_auth_request (url, session, TRUE); + soup_cache_flush (cache); + + debug_printf (1, " GET %s via %s (from cache)\n", url, proxy_names[AUTH_PROXY]); + do_proxy_auth_request (url, session, FALSE); + + g_free (url); + soup_test_session_abort_unref (session); + g_object_unref (cache); +} + int main (int argc, char **argv) { @@ -338,10 +416,9 @@ main (int argc, char **argv) g_simple_proxy_resolver_new (proxies[i], (char **) ignore_hosts); } - server = soup_test_server_new (TRUE); + server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); - base_uri = soup_uri_new ("http://127.0.0.1/"); - soup_uri_set_port (base_uri, soup_server_get_port (server)); + base_uri = soup_test_server_get_uri (server, "http", NULL); for (i = 0; i < ntests; i++) { path = g_strdup_printf ("/proxy/async/%s", tests[i].explanation); @@ -356,11 +433,14 @@ main (int argc, char **argv) g_test_add_data_func ("/proxy/fragment", base_uri, do_proxy_fragment_test); g_test_add_func ("/proxy/redirect", do_proxy_redirect_test); + g_test_add_func ("/proxy/auth-cache", do_proxy_auth_cache_test); ret = g_test_run (); soup_uri_free (base_uri); soup_test_server_quit_unref (server); + for (i = 0; i < 3; i++) + g_object_unref (proxy_resolvers[i]); test_cleanup (); return ret; diff --git a/tests/range-test.c b/tests/range-test.c index c23ba462..d3c49963 100644 --- a/tests/range-test.c +++ b/tests/range-test.c @@ -334,11 +334,7 @@ do_apache_range_test (void) session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); -#if HAVE_APACHE_2_2 - do_range_test (session, "http://127.0.0.1:47524/", FALSE, FALSE); -#else do_range_test (session, "http://127.0.0.1:47524/", TRUE, FALSE); -#endif soup_test_session_abort_unref (session); } @@ -361,16 +357,18 @@ do_libsoup_range_test (void) { SoupSession *session; SoupServer *server; - char *base_uri; + SoupURI *base_uri; + char *base_uri_str; session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); - server = soup_test_server_new (FALSE); + server = soup_test_server_new (SOUP_TEST_SERVER_DEFAULT); soup_server_add_handler (server, NULL, server_handler, NULL, NULL); - base_uri = g_strdup_printf ("http://127.0.0.1:%u/", - soup_server_get_port (server)); - do_range_test (session, base_uri, TRUE, TRUE); - g_free (base_uri); + base_uri = soup_test_server_get_uri (server, "http", NULL); + base_uri_str = soup_uri_to_string (base_uri, FALSE); + do_range_test (session, base_uri_str, TRUE, TRUE); + soup_uri_free (base_uri); + g_free (base_uri_str); soup_test_server_quit_unref (server); soup_test_session_abort_unref (session); diff --git a/tests/redirect-test.c b/tests/redirect-test.c index ad8dabaa..ccdd4c29 100644 --- a/tests/redirect-test.c +++ b/tests/redirect-test.c @@ -395,24 +395,24 @@ main (int argc, char **argv) { GMainLoop *loop; SoupServer *server, *server2; - guint port; + SoupURI *uri2; char *path; int n, ret; test_init (argc, argv, NULL); - server = soup_test_server_new (TRUE); + server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); - port = soup_server_get_port (server); - base_uri = soup_uri_new ("http://127.0.0.1"); - soup_uri_set_port (base_uri, port); + base_uri = soup_test_server_get_uri (server, "http", NULL); - server2 = soup_test_server_new (TRUE); + server2 = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); soup_server_add_handler (server2, NULL, server2_callback, NULL, NULL); - server2_uri = g_strdup_printf ("http://127.0.0.1:%d/on-server2", - soup_server_get_port (server2)); + uri2 = soup_test_server_get_uri (server2, "http", NULL); + soup_uri_set_path (uri2, "/on-server2"); + server2_uri = soup_uri_to_string (uri2, FALSE); + soup_uri_free (uri2); loop = g_main_loop_new (NULL, TRUE); @@ -422,8 +422,8 @@ main (int argc, char **argv) sync_session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, NULL); for (n = 0; n < n_tests; n++) { - path = g_strdup_printf ("/redirect/async/msg/%d-%s-%d", n - , tests[n].requests[0].method, + path = g_strdup_printf ("/redirect/async/msg/%d-%s-%d", n, + tests[n].requests[0].method, tests[n].requests[0].status_code); g_test_add_data_func (path, &tests[n], do_async_msg_api_test); g_free (path); @@ -458,5 +458,6 @@ main (int argc, char **argv) soup_test_session_abort_unref (async_session); soup_test_session_abort_unref (sync_session); + test_cleanup (); return ret; } diff --git a/tests/requester-test.c b/tests/requester-test.c index 39b30bd5..6d6d5728 100644 --- a/tests/requester-test.c +++ b/tests/requester-test.c @@ -17,6 +17,12 @@ SoupBuffer *response, *auth_response; #define REDIRECT_HTML_BODY "Try again\r\n" #define AUTH_HTML_BODY "Unauthorized\r\n" +typedef enum { + NO_CANCEL, + SYNC_CANCEL, + PAUSE_AND_CANCEL_ON_IDLE +} CancelPolicy; + static gboolean slow_finish_message (gpointer msg) { @@ -205,6 +211,32 @@ cancel_message (SoupMessage *msg, gpointer session) soup_session_cancel_message (session, msg, SOUP_STATUS_FORBIDDEN); } +typedef struct { + SoupMessage *msg; + SoupSession *session; +} CancelData; + +static gboolean +cancel_message_idle (CancelData *data) +{ + cancel_message (data->msg, data->session); + return FALSE; +} + +static void +pause_and_cancel_message (SoupMessage *msg, gpointer session) +{ + CancelData *data = g_new (CancelData, 1); + GSource *source = g_idle_source_new (); + + soup_session_pause_message (session, msg); + data->msg = msg; + data->session = session; + g_source_set_callback (source, (GSourceFunc)cancel_message_idle, data, g_free); + g_source_attach (source, soup_session_get_async_context (session)); + g_source_unref (source); +} + static void request_started (SoupSession *session, SoupMessage *msg, SoupSocket *socket, gpointer user_data) @@ -219,7 +251,7 @@ static void do_async_test (SoupSession *session, SoupURI *uri, GAsyncReadyCallback callback, guint expected_status, SoupBuffer *expected_response, - gboolean persistent, gboolean cancel) + gboolean persistent, CancelPolicy cancel_policy) { SoupRequester *requester; SoupRequest *request; @@ -234,16 +266,24 @@ do_async_test (SoupSession *session, SoupURI *uri, requester = NULL; data.body = g_string_new (NULL); - data.cancel = cancel; + data.cancel = cancel_policy != NO_CANCEL; if (requester) request = soup_requester_request_uri (requester, uri, NULL); else request = soup_session_request_uri (session, uri, NULL); msg = soup_request_http_get_message (SOUP_REQUEST_HTTP (request)); - if (cancel) { + switch (cancel_policy) { + case SYNC_CANCEL: g_signal_connect (msg, "got-headers", G_CALLBACK (cancel_message), session); + break; + case PAUSE_AND_CANCEL_ON_IDLE: + g_signal_connect (msg, "got-headers", + G_CALLBACK (pause_and_cancel_message), session); + break; + case NO_CANCEL: + break; } started_id = g_signal_connect (session, "request-started", @@ -279,7 +319,7 @@ do_async_test (SoupSession *session, SoupURI *uri, } static void -do_test_for_thread_and_context (SoupSession *session, const char *base_uri) +do_test_for_thread_and_context (SoupSession *session, SoupURI *base_uri) { SoupRequester *requester; SoupURI *uri; @@ -292,48 +332,50 @@ do_test_for_thread_and_context (SoupSession *session, const char *base_uri) soup_session_add_feature_by_type (session, SOUP_TYPE_CONTENT_SNIFFER); debug_printf (1, " basic test\n"); - uri = soup_uri_new (base_uri); - do_async_test (session, uri, test_sent, + do_async_test (session, base_uri, test_sent, SOUP_STATUS_OK, response, - TRUE, FALSE); - soup_uri_free (uri); + TRUE, NO_CANCEL); debug_printf (1, " chunked test\n"); - uri = soup_uri_new (base_uri); - soup_uri_set_path (uri, "/chunked"); + uri = soup_uri_new_with_base (base_uri, "/chunked"); do_async_test (session, uri, test_sent, SOUP_STATUS_OK, response, - TRUE, FALSE); + TRUE, NO_CANCEL); soup_uri_free (uri); debug_printf (1, " auth test\n"); - uri = soup_uri_new (base_uri); - soup_uri_set_path (uri, "/auth"); + uri = soup_uri_new_with_base (base_uri, "/auth"); do_async_test (session, uri, auth_test_sent, SOUP_STATUS_UNAUTHORIZED, auth_response, - TRUE, FALSE); + TRUE, NO_CANCEL); soup_uri_free (uri); debug_printf (1, " non-persistent test\n"); - uri = soup_uri_new (base_uri); - soup_uri_set_path (uri, "/non-persistent"); + uri = soup_uri_new_with_base (base_uri, "/non-persistent"); do_async_test (session, uri, test_sent, SOUP_STATUS_OK, response, - FALSE, FALSE); + FALSE, NO_CANCEL); soup_uri_free (uri); debug_printf (1, " cancellation test\n"); - uri = soup_uri_new (base_uri); - soup_uri_set_path (uri, "/"); + uri = soup_uri_new_with_base (base_uri, "/"); do_async_test (session, uri, test_sent, SOUP_STATUS_FORBIDDEN, NULL, - FALSE, TRUE); + FALSE, SYNC_CANCEL); + soup_uri_free (uri); + + debug_printf (1, " cancellation after paused test\n"); + uri = soup_uri_new_with_base (base_uri, "/"); + do_async_test (session, uri, test_sent, + SOUP_STATUS_FORBIDDEN, NULL, + FALSE, PAUSE_AND_CANCEL_ON_IDLE); soup_uri_free (uri); } static void -do_simple_plain_test (gconstpointer uri) +do_simple_plain_test (gconstpointer data) { + SoupURI *uri = (SoupURI *)data; SoupSession *session; g_test_bug ("653707"); @@ -344,8 +386,9 @@ do_simple_plain_test (gconstpointer uri) } static void -do_simple_async_test (gconstpointer uri) +do_simple_async_test (gconstpointer data) { + SoupURI *uri = (SoupURI *)data; SoupSession *session; g_test_bug ("653707"); @@ -358,7 +401,7 @@ do_simple_async_test (gconstpointer uri) } static void -do_test_with_context_and_type (const char *uri, gboolean plain_session) +do_test_with_context_and_type (SoupURI *uri, gboolean plain_session) { GMainContext *async_context; SoupSession *session; @@ -381,14 +424,18 @@ do_test_with_context_and_type (const char *uri, gboolean plain_session) } static void -do_async_test_with_context (gconstpointer uri) +do_async_test_with_context (gconstpointer data) { + SoupURI *uri = (SoupURI *)data; + do_test_with_context_and_type (uri, FALSE); } static void -do_plain_test_with_context (gconstpointer uri) +do_plain_test_with_context (gconstpointer data) { + SoupURI *uri = (SoupURI *)data; + do_test_with_context_and_type (uri, TRUE); } @@ -407,8 +454,9 @@ plain_test_thread (gpointer uri) } static void -do_async_test_in_thread (gconstpointer uri) +do_async_test_in_thread (gconstpointer data) { + SoupURI *uri = (SoupURI *)data; GThread *thread; thread = g_thread_new ("do_async_test_in_thread", @@ -418,8 +466,9 @@ do_async_test_in_thread (gconstpointer uri) } static void -do_plain_test_in_thread (gconstpointer uri) +do_plain_test_in_thread (gconstpointer data) { + SoupURI *uri = (SoupURI *)data; GThread *thread; thread = g_thread_new ("do_plain_test_in_thread", @@ -431,7 +480,7 @@ do_plain_test_in_thread (gconstpointer uri) static void do_sync_request (SoupSession *session, SoupRequest *request, guint expected_status, SoupBuffer *expected_response, - gboolean persistent, gboolean cancel) + gboolean persistent, CancelPolicy cancel_policy) { GInputStream *in; SoupMessage *msg; @@ -443,7 +492,7 @@ do_sync_request (SoupSession *session, SoupRequest *request, SoupSocket *socket = NULL; msg = soup_request_http_get_message (SOUP_REQUEST_HTTP (request)); - if (cancel) { + if (cancel_policy == SYNC_CANCEL) { g_signal_connect (msg, "got-headers", G_CALLBACK (cancel_message), session); } @@ -454,7 +503,7 @@ do_sync_request (SoupSession *session, SoupRequest *request, in = soup_request_send (request, NULL, &error); g_signal_handler_disconnect (session, started_id); - if (cancel) { + if (cancel_policy == SYNC_CANCEL) { g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED); g_clear_error (&error); g_object_unref (msg); @@ -504,7 +553,7 @@ do_sync_request (SoupSession *session, SoupRequest *request, } static void -do_sync_tests_for_session (SoupSession *session, const char *uri_string) +do_sync_tests_for_session (SoupSession *session, SoupURI *base_uri) { SoupRequester *requester; SoupRequest *request; @@ -512,7 +561,7 @@ do_sync_tests_for_session (SoupSession *session, const char *uri_string) requester = SOUP_REQUESTER (soup_session_get_feature (session, SOUP_TYPE_REQUESTER)); - uri = soup_uri_new (uri_string); + uri = soup_uri_copy (base_uri); debug_printf (1, " basic test\n"); if (requester) @@ -521,7 +570,7 @@ do_sync_tests_for_session (SoupSession *session, const char *uri_string) request = soup_session_request_uri (session, uri, NULL); do_sync_request (session, request, SOUP_STATUS_OK, response, - TRUE, FALSE); + TRUE, NO_CANCEL); g_object_unref (request); debug_printf (1, " chunked test\n"); @@ -532,7 +581,7 @@ do_sync_tests_for_session (SoupSession *session, const char *uri_string) request = soup_session_request_uri (session, uri, NULL); do_sync_request (session, request, SOUP_STATUS_OK, response, - TRUE, FALSE); + TRUE, NO_CANCEL); g_object_unref (request); debug_printf (1, " auth test\n"); @@ -543,7 +592,7 @@ do_sync_tests_for_session (SoupSession *session, const char *uri_string) request = soup_session_request_uri (session, uri, NULL); do_sync_request (session, request, SOUP_STATUS_UNAUTHORIZED, auth_response, - TRUE, FALSE); + TRUE, NO_CANCEL); g_object_unref (request); debug_printf (1, " non-persistent test\n"); @@ -554,7 +603,7 @@ do_sync_tests_for_session (SoupSession *session, const char *uri_string) request = soup_session_request_uri (session, uri, NULL); do_sync_request (session, request, SOUP_STATUS_OK, response, - FALSE, FALSE); + FALSE, NO_CANCEL); g_object_unref (request); debug_printf (1, " cancel test\n"); @@ -565,15 +614,16 @@ do_sync_tests_for_session (SoupSession *session, const char *uri_string) request = soup_session_request_uri (session, uri, NULL); do_sync_request (session, request, SOUP_STATUS_FORBIDDEN, NULL, - TRUE, TRUE); + TRUE, SYNC_CANCEL); g_object_unref (request); soup_uri_free (uri); } static void -do_plain_sync_test (gconstpointer uri) +do_plain_sync_test (gconstpointer data) { + SoupURI *uri = (SoupURI *)data; SoupSession *session; session = soup_test_session_new (SOUP_TYPE_SESSION, NULL); @@ -582,8 +632,9 @@ do_plain_sync_test (gconstpointer uri) } static void -do_sync_sync_test (gconstpointer uri) +do_sync_sync_test (gconstpointer data) { + SoupURI *uri = (SoupURI *)data; SoupSession *session; SoupRequester *requester; @@ -743,6 +794,7 @@ do_close_test_for_session (SoupSession *session, if (error) g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED); g_clear_error (&error); + g_object_unref (cancellable); g_assert_true (finished); @@ -751,16 +803,16 @@ do_close_test_for_session (SoupSession *session, } static void -do_async_close_test (gconstpointer uri) +do_async_close_test (gconstpointer data) { + SoupURI *uri = (SoupURI *)data; SoupSession *session; SoupURI *slow_uri; g_test_bug ("695652"); g_test_bug ("711260"); - slow_uri = soup_uri_new (uri); - soup_uri_set_path (slow_uri, "/slow"); + slow_uri = soup_uri_new_with_base ((SoupURI *)uri, "/slow"); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, SOUP_SESSION_USE_THREAD_CONTEXT, TRUE, @@ -772,18 +824,17 @@ do_async_close_test (gconstpointer uri) } static void -do_sync_close_test (gconstpointer uri) +do_sync_close_test (gconstpointer data) { + SoupURI *uri = (SoupURI *)data; SoupSession *session; SoupURI *slow_uri; g_test_bug ("695652"); g_test_bug ("711260"); - slow_uri = soup_uri_new (uri); - soup_uri_set_path (slow_uri, "/slow"); + slow_uri = soup_uri_new_with_base ((SoupURI *)uri, "/slow"); - debug_printf (1, " SoupSessionSync\n"); session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, SOUP_SESSION_USE_THREAD_CONTEXT, TRUE, NULL); @@ -796,7 +847,7 @@ do_sync_close_test (gconstpointer uri) int main (int argc, char **argv) { - char *uri; + SoupURI *uri; int ret; test_init (argc, argv, NULL); @@ -806,10 +857,11 @@ main (int argc, char **argv) AUTH_HTML_BODY, strlen (AUTH_HTML_BODY)); - server = soup_test_server_new (TRUE); + server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); - uri = g_strdup_printf ("http://127.0.0.1:%u/foo", soup_server_get_port (server)); + uri = soup_test_server_get_uri (server, "http", NULL); + soup_uri_set_path (uri, "/foo"); g_test_add_data_func ("/requester/simple/SoupSession", uri, do_simple_plain_test); g_test_add_data_func ("/requester/simple/SoupSessionAsync", uri, do_simple_async_test); @@ -826,7 +878,7 @@ main (int argc, char **argv) ret = g_test_run (); - g_free (uri); + soup_uri_free (uri); soup_buffer_free (auth_response); soup_test_server_quit_unref (server); diff --git a/tests/resources/misc.xml b/tests/resources/misc.xml new file mode 100644 index 00000000..15361e62 --- /dev/null +++ b/tests/resources/misc.xml @@ -0,0 +1,11 @@ + + + + test1.txt + test.gresource.xml + + + test2.txt + test2.txt + + diff --git a/tests/server-auth-test.c b/tests/server-auth-test.c index f386f526..34c297bc 100644 --- a/tests/server-auth-test.c +++ b/tests/server-auth-test.c @@ -36,7 +36,11 @@ do_test (SoupURI *base_uri, const char *path, GPid pid; gboolean done; - uri = soup_uri_new_with_base (base_uri, path); + /* We build the URI this way to avoid having soup_uri_new() + normalize the path, hence losing the encoded characters in + tests 4. and 5. below. */ + uri = soup_uri_copy (base_uri); + soup_uri_set_path (uri, path); uri_str = soup_uri_to_string (uri, FALSE); soup_uri_free (uri); @@ -156,7 +160,46 @@ do_server_auth_test (gconstpointer data) /* success? */ TEST_USES_DIGEST (i) && TEST_GOOD_AUTH (i)); - /* 4. Any auth required. */ + /* 4. Digest auth with encoded URI. See #794208. + */ + do_test (base_uri, "/Digest/A%20B", + TEST_GOOD_USER (i), TEST_GOOD_PASSWORD (i), + /* request */ + TEST_USES_BASIC (i), TEST_USES_DIGEST (i), + /* expected from client */ + TEST_PREEMPTIVE_BASIC (i), TEST_USES_DIGEST (i), + /* expected from server */ + FALSE, TRUE, + /* success? */ + TEST_USES_DIGEST (i) && TEST_GOOD_AUTH (i)); + + /* 5. Digest auth with a mixture of encoded and decoded chars in the URI. See #794208. + */ + do_test (base_uri, "/Digest/A%20|%20B", + TEST_GOOD_USER (i), TEST_GOOD_PASSWORD (i), + /* request */ + TEST_USES_BASIC (i), TEST_USES_DIGEST (i), + /* expected from client */ + TEST_PREEMPTIVE_BASIC (i), TEST_USES_DIGEST (i), + /* expected from server */ + FALSE, TRUE, + /* success? */ + TEST_USES_DIGEST (i) && TEST_GOOD_AUTH (i)); + + /* 6. Digest auth with UTF-8 chars in the URI. See #794208. + */ + do_test (base_uri, "/Digest/A௹B", + TEST_GOOD_USER (i), TEST_GOOD_PASSWORD (i), + /* request */ + TEST_USES_BASIC (i), TEST_USES_DIGEST (i), + /* expected from client */ + TEST_PREEMPTIVE_BASIC (i), TEST_USES_DIGEST (i), + /* expected from server */ + FALSE, TRUE, + /* success? */ + TEST_USES_DIGEST (i) && TEST_GOOD_AUTH (i)); + + /* 7. Any auth required. */ do_test (base_uri, "/Any/foo", TEST_GOOD_USER (i), TEST_GOOD_PASSWORD (i), /* request */ @@ -168,7 +211,7 @@ do_server_auth_test (gconstpointer data) /* success? */ (TEST_USES_BASIC (i) || TEST_USES_DIGEST (i)) && TEST_GOOD_AUTH (i)); - /* 5. No auth required again. (Makes sure that + /* 8. No auth required again. (Makes sure that * SOUP_AUTH_DOMAIN_REMOVE_PATH works.) */ do_test (base_uri, "/Any/Not/foo", @@ -282,7 +325,7 @@ main (int argc, char **argv) test_init (argc, argv, no_test_entry); - server = soup_test_server_new (FALSE); + server = soup_test_server_new (SOUP_TEST_SERVER_DEFAULT); g_signal_connect (server, "request_started", G_CALLBACK (request_started_callback), NULL); soup_server_add_handler (server, NULL, @@ -310,12 +353,10 @@ main (int argc, char **argv) loop = g_main_loop_new (NULL, TRUE); + base_uri = soup_test_server_get_uri (server, "http", NULL); if (run_tests) { int i; - base_uri = soup_uri_new ("http://127.0.0.1"); - soup_uri_set_port (base_uri, soup_server_get_port (server)); - for (i = 0; i < 16; i++) { char *path; const char *authtypes; @@ -344,13 +385,12 @@ main (int argc, char **argv) } ret = g_test_run (); - - soup_uri_free (base_uri); } else { - g_print ("Listening on port %d\n", soup_server_get_port (server)); + g_print ("Listening on port %d\n", base_uri->port); g_main_loop_run (loop); ret = 0; } + soup_uri_free (base_uri); g_main_loop_unref (loop); soup_test_server_quit_unref (server); diff --git a/tests/server-test.c b/tests/server-test.c index 0c980908..cf132b33 100644 --- a/tests/server-test.c +++ b/tests/server-test.c @@ -5,8 +5,13 @@ #include "test-utils.h" -SoupServer *server, *ssl_server; -SoupURI *base_uri, *ssl_base_uri; +#include + +typedef struct { + SoupServer *server; + SoupURI *base_uri, *ssl_base_uri; + GSList *handlers; +} ServerData; static void server_callback (SoupServer *server, SoupMessage *msg, @@ -32,6 +37,58 @@ server_callback (SoupServer *server, SoupMessage *msg, SOUP_MEMORY_STATIC, "index", 5); } +static void +server_setup_nohandler (ServerData *sd, gconstpointer test_data) +{ + sd->server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); + sd->base_uri = soup_test_server_get_uri (sd->server, "http", NULL); + if (tls_available) + sd->ssl_base_uri = soup_test_server_get_uri (sd->server, "https", NULL); +} + +static void +server_add_handler (ServerData *sd, + const char *path, + SoupServerCallback callback, + gpointer user_data, + GDestroyNotify destroy) +{ + soup_server_add_handler (sd->server, path, callback, user_data, destroy); + sd->handlers = g_slist_prepend (sd->handlers, g_strdup (path)); +} + +static void +server_add_early_handler (ServerData *sd, + const char *path, + SoupServerCallback callback, + gpointer user_data, + GDestroyNotify destroy) +{ + soup_server_add_early_handler (sd->server, path, callback, user_data, destroy); + sd->handlers = g_slist_prepend (sd->handlers, g_strdup (path)); +} + +static void +server_setup (ServerData *sd, gconstpointer test_data) +{ + server_setup_nohandler (sd, test_data); + server_add_handler (sd, NULL, server_callback, NULL, NULL); +} + +static void +server_teardown (ServerData *sd, gconstpointer test_data) +{ + GSList *iter; + + for (iter = sd->handlers; iter; iter = iter->next) + soup_server_remove_handler (sd->server, iter->data); + g_slist_free_full (sd->handlers, g_free); + + g_clear_pointer (&sd->server, soup_test_server_quit_unref); + g_clear_pointer (&sd->base_uri, soup_uri_free); + g_clear_pointer (&sd->ssl_base_uri, soup_uri_free); +} + static void server_star_callback (SoupServer *server, SoupMessage *msg, const char *path, GHashTable *query, @@ -58,7 +115,7 @@ server_star_callback (SoupServer *server, SoupMessage *msg, * all other URIs. #590751 */ static void -do_star_test (void) +do_star_test (ServerData *sd, gconstpointer test_data) { SoupSession *session; SoupMessage *msg; @@ -68,7 +125,7 @@ do_star_test (void) g_test_bug ("590751"); session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, NULL); - star_uri = soup_uri_copy (base_uri); + star_uri = soup_uri_copy (sd->base_uri); soup_uri_set_path (star_uri, "*"); debug_printf (1, " Testing with no handler\n"); @@ -81,7 +138,7 @@ do_star_test (void) g_assert_cmpstr (handled_by, ==, NULL); g_object_unref (msg); - soup_server_add_handler (server, "*", server_star_callback, NULL, NULL); + server_add_handler (sd, "*", server_star_callback, NULL, NULL); debug_printf (1, " Testing with handler\n"); msg = soup_message_new_from_uri ("OPTIONS", star_uri); @@ -169,8 +226,10 @@ do_one_server_aliases_test (SoupURI *uri, } static void -do_server_aliases_test (void) +do_server_aliases_test (ServerData *sd, gconstpointer test_data) { + char *http_aliases[] = { "dav", NULL }; + char *https_aliases[] = { "davs", NULL }; char *http_good[] = { "http", "dav", NULL }; char *http_bad[] = { "https", "davs", "fred", NULL }; char *https_good[] = { "https", "davs", NULL }; @@ -179,21 +238,26 @@ do_server_aliases_test (void) g_test_bug ("703694"); + g_object_set (G_OBJECT (sd->server), + SOUP_SERVER_HTTP_ALIASES, http_aliases, + SOUP_SERVER_HTTPS_ALIASES, https_aliases, + NULL); + for (i = 0; http_good[i]; i++) - do_one_server_aliases_test (base_uri, http_good[i], TRUE); + do_one_server_aliases_test (sd->base_uri, http_good[i], TRUE); for (i = 0; http_bad[i]; i++) - do_one_server_aliases_test (base_uri, http_bad[i], FALSE); + do_one_server_aliases_test (sd->base_uri, http_bad[i], FALSE); if (tls_available) { for (i = 0; https_good[i]; i++) - do_one_server_aliases_test (ssl_base_uri, https_good[i], TRUE); + do_one_server_aliases_test (sd->ssl_base_uri, https_good[i], TRUE); for (i = 0; https_bad[i]; i++) - do_one_server_aliases_test (ssl_base_uri, https_bad[i], FALSE); + do_one_server_aliases_test (sd->ssl_base_uri, https_bad[i], FALSE); } } static void -do_dot_dot_test (void) +do_dot_dot_test (ServerData *sd, gconstpointer test_data) { SoupSession *session; SoupMessage *msg; @@ -203,7 +267,7 @@ do_dot_dot_test (void) session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, NULL); - uri = soup_uri_new_with_base (base_uri, "/..%2ftest"); + uri = soup_uri_new_with_base (sd->base_uri, "/..%2ftest"); msg = soup_message_new_from_uri ("GET", uri); soup_uri_free (uri); @@ -220,10 +284,13 @@ ipv6_server_callback (SoupServer *server, SoupMessage *msg, SoupClientContext *context, gpointer data) { const char *host; + GSocketAddress *addr; char expected_host[128]; + addr = soup_client_context_get_local_address (context); g_snprintf (expected_host, sizeof (expected_host), - "[::1]:%d", soup_server_get_port (server)); + "[::1]:%d", + g_inet_socket_address_get_port (G_INET_SOCKET_ADDRESS (addr))); host = soup_message_headers_get_one (msg->request_headers, "Host"); g_assert_cmpstr (host, ==, expected_host); @@ -235,95 +302,1052 @@ ipv6_server_callback (SoupServer *server, SoupMessage *msg, } static void -do_ipv6_test (void) +do_ipv6_test (ServerData *sd, gconstpointer test_data) { - SoupServer *ipv6_server; - SoupURI *ipv6_uri; - SoupAddress *ipv6_addr; SoupSession *session; SoupMessage *msg; + GError *error = NULL; g_test_bug ("666399"); - ipv6_addr = soup_address_new ("::1", SOUP_ADDRESS_ANY_PORT); - soup_address_resolve_sync (ipv6_addr, NULL); - ipv6_server = soup_server_new (SOUP_SERVER_INTERFACE, ipv6_addr, - NULL); - g_object_unref (ipv6_addr); - if (!ipv6_server) { - debug_printf (1, " skipping due to lack of IPv6 support\n"); + sd->server = soup_test_server_new (SOUP_TEST_SERVER_NO_DEFAULT_LISTENER); + server_add_handler (sd, NULL, ipv6_server_callback, NULL, NULL); + + if (!soup_server_listen_local (sd->server, 0, + SOUP_SERVER_LISTEN_IPV6_ONLY, + &error)) { +#if GLIB_CHECK_VERSION (2, 41, 0) + g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED); +#endif + g_test_skip ("no IPv6 support"); return; } - soup_server_add_handler (ipv6_server, NULL, ipv6_server_callback, NULL, NULL); - soup_server_run_async (ipv6_server); - - ipv6_uri = soup_uri_new ("http://[::1]/"); - soup_uri_set_port (ipv6_uri, soup_server_get_port (ipv6_server)); + sd->base_uri = soup_test_server_get_uri (sd->server, "http", "::1"); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); debug_printf (1, " HTTP/1.1\n"); - msg = soup_message_new_from_uri ("GET", ipv6_uri); + msg = soup_message_new_from_uri ("GET", sd->base_uri); soup_session_send_message (session, msg); soup_test_assert_message_status (msg, SOUP_STATUS_OK); g_object_unref (msg); debug_printf (1, " HTTP/1.0\n"); - msg = soup_message_new_from_uri ("GET", ipv6_uri); + msg = soup_message_new_from_uri ("GET", sd->base_uri); soup_message_set_http_version (msg, SOUP_HTTP_1_0); soup_session_send_message (session, msg); soup_test_assert_message_status (msg, SOUP_STATUS_OK); g_object_unref (msg); - soup_uri_free (ipv6_uri); soup_test_session_abort_unref (session); - soup_test_server_quit_unref (ipv6_server); } -int -main (int argc, char **argv) +static void +multi_server_callback (SoupServer *server, SoupMessage *msg, + const char *path, GHashTable *query, + SoupClientContext *context, gpointer data) { - char *http_aliases[] = { "dav", NULL }; - char *https_aliases[] = { "davs", NULL }; - int ret; + GSocketAddress *addr; + GInetSocketAddress *iaddr; + SoupURI *uri; + char *uristr, *addrstr; - test_init (argc, argv, NULL); + addr = soup_client_context_get_local_address (context); + iaddr = G_INET_SOCKET_ADDRESS (addr); - server = soup_test_server_new (TRUE); - soup_server_add_handler (server, NULL, server_callback, NULL, NULL); - base_uri = soup_uri_new ("http://127.0.0.1/"); - soup_uri_set_port (base_uri, soup_server_get_port (server)); + uri = soup_message_get_uri (msg); + uristr = soup_uri_to_string (uri, FALSE); - g_object_set (G_OBJECT (server), - SOUP_SERVER_HTTP_ALIASES, http_aliases, - NULL); + addrstr = g_inet_address_to_string (g_inet_socket_address_get_address (iaddr)); + g_assert_cmpstr (addrstr, ==, uri->host); + g_free (addrstr); - if (tls_available) { - ssl_server = soup_test_server_new_ssl (TRUE); - soup_server_add_handler (ssl_server, NULL, server_callback, NULL, NULL); - ssl_base_uri = soup_uri_new ("https://127.0.0.1/"); - soup_uri_set_port (ssl_base_uri, soup_server_get_port (ssl_server)); - g_object_set (G_OBJECT (ssl_server), - SOUP_SERVER_HTTPS_ALIASES, https_aliases, - NULL); + g_assert_cmpint (g_inet_socket_address_get_port (iaddr), ==, uri->port); + + /* FIXME ssl */ + + soup_message_set_response (msg, "text/plain", + SOUP_MEMORY_TAKE, uristr, strlen (uristr)); + soup_message_set_status (msg, SOUP_STATUS_OK); +} + +static void +do_multi_test (ServerData *sd, SoupURI *uri1, SoupURI *uri2) +{ + char *uristr; + SoupSession *session; + SoupMessage *msg; + + server_add_handler (sd, NULL, multi_server_callback, NULL, NULL); + + session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); + + uristr = soup_uri_to_string (uri1, FALSE); + msg = soup_message_new ("GET", uristr); + soup_session_send_message (session, msg); + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + g_assert_cmpstr (msg->response_body->data, ==, uristr); + g_object_unref (msg); + g_free (uristr); + + uristr = soup_uri_to_string (uri2, FALSE); + msg = soup_message_new ("GET", uristr); + soup_session_send_message (session, msg); + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + g_assert_cmpstr (msg->response_body->data, ==, uristr); + g_object_unref (msg); + g_free (uristr); + + soup_test_session_abort_unref (session); + + soup_uri_free (uri1); + soup_uri_free (uri2); +} + +static void +do_multi_port_test (ServerData *sd, gconstpointer test_data) +{ + GSList *uris; + SoupURI *uri1, *uri2; + GError *error = NULL; + + sd->server = soup_test_server_new (SOUP_TEST_SERVER_NO_DEFAULT_LISTENER); + + if (!soup_server_listen_local (sd->server, 0, SOUP_SERVER_LISTEN_IPV4_ONLY, &error)) { + g_assert_no_error (error); + g_error_free (error); + return; + } + if (!soup_server_listen_local (sd->server, 0, SOUP_SERVER_LISTEN_IPV4_ONLY, &error)) { + g_assert_no_error (error); + g_error_free (error); + return; } - g_test_add_func ("/server/OPTIONS *", do_star_test); - g_test_add_func ("/server/aliases", do_server_aliases_test); - g_test_add_func ("/server/..-in-path", do_dot_dot_test); - g_test_add_func ("/server/ipv6", do_ipv6_test); + uris = soup_server_get_uris (sd->server); + g_assert_cmpint (g_slist_length (uris), ==, 2); + uri1 = uris->data; + uri2 = uris->next->data; + g_slist_free (uris); - ret = g_test_run (); + g_assert_cmpint (uri1->port, !=, uri2->port); + + do_multi_test (sd, uri1, uri2); +} + +static void +do_multi_scheme_test (ServerData *sd, gconstpointer test_data) +{ + GSList *uris; + SoupURI *uri1, *uri2; + GError *error = NULL; + + SOUP_TEST_SKIP_IF_NO_TLS; + + sd->server = soup_test_server_new (SOUP_TEST_SERVER_NO_DEFAULT_LISTENER); + + if (!soup_server_listen_local (sd->server, 0, SOUP_SERVER_LISTEN_IPV4_ONLY, &error)) { + g_assert_no_error (error); + g_error_free (error); + return; + } + if (!soup_server_listen_local (sd->server, 0, + SOUP_SERVER_LISTEN_IPV4_ONLY | SOUP_SERVER_LISTEN_HTTPS, + &error)) { + g_assert_no_error (error); + g_error_free (error); + return; + } + + uris = soup_server_get_uris (sd->server); + g_assert_cmpint (g_slist_length (uris), ==, 2); + uri1 = uris->data; + uri2 = uris->next->data; + g_slist_free (uris); + + g_assert_cmpstr (uri1->scheme, !=, uri2->scheme); + + do_multi_test (sd, uri1, uri2); +} + +static void +do_multi_family_test (ServerData *sd, gconstpointer test_data) +{ + GSList *uris; + SoupURI *uri1, *uri2; + GError *error = NULL; + + sd->server = soup_test_server_new (SOUP_TEST_SERVER_NO_DEFAULT_LISTENER); + + if (!soup_server_listen_local (sd->server, 0, 0, &error)) { + g_assert_no_error (error); + g_error_free (error); + return; + } + + uris = soup_server_get_uris (sd->server); + if (g_slist_length (uris) == 1) { + gboolean ipv6_works; + + /* No IPv6? Double-check */ + ipv6_works = soup_server_listen_local (sd->server, 0, + SOUP_SERVER_LISTEN_IPV6_ONLY, + NULL); + if (ipv6_works) + g_assert_false (ipv6_works); + else + g_test_skip ("no IPv6 support"); + return; + } + + g_assert_cmpint (g_slist_length (uris), ==, 2); + uri1 = uris->data; + uri2 = uris->next->data; + g_slist_free (uris); + + g_assert_cmpstr (uri1->host, !=, uri2->host); + g_assert_cmpint (uri1->port, ==, uri2->port); + + do_multi_test (sd, uri1, uri2); +} + +static void +do_gsocket_import_test (void) +{ + GSocket *gsock; + GSocketAddress *gaddr; + SoupServer *server; + GSList *listeners; + SoupURI *uri; + SoupSession *session; + SoupMessage *msg; + GError *error = NULL; + + gsock = g_socket_new (G_SOCKET_FAMILY_IPV4, + G_SOCKET_TYPE_STREAM, + G_SOCKET_PROTOCOL_DEFAULT, + &error); + g_assert_no_error (error); + + gaddr = g_inet_socket_address_new_from_string ("127.0.0.1", 0); + g_socket_bind (gsock, gaddr, TRUE, &error); + g_object_unref (gaddr); + g_assert_no_error (error); + g_socket_listen (gsock, &error); + g_assert_no_error (error); + + gaddr = g_socket_get_local_address (gsock, &error); + g_assert_no_error (error); + g_object_unref (gaddr); + + server = soup_test_server_new (SOUP_TEST_SERVER_NO_DEFAULT_LISTENER); + soup_server_add_handler (server, NULL, server_callback, NULL, NULL); + + listeners = soup_server_get_listeners (server); + g_assert_cmpint (g_slist_length (listeners), ==, 0); + g_slist_free (listeners); + + soup_server_listen_socket (server, gsock, 0, &error); + g_assert_no_error (error); + listeners = soup_server_get_listeners (server); + g_assert_cmpint (g_slist_length (listeners), ==, 1); + g_slist_free (listeners); + + uri = soup_test_server_get_uri (server, "http", "127.0.0.1"); + g_assert_nonnull (uri); + listeners = soup_server_get_listeners (server); + g_assert_cmpint (g_slist_length (listeners), ==, 1); + g_slist_free (listeners); + + session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); + msg = soup_message_new_from_uri ("GET", uri); + soup_session_send_message (session, msg); + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + g_object_unref (msg); + + soup_test_session_abort_unref (session); + + soup_uri_free (uri); + soup_test_server_quit_unref (server); + + g_assert_false (g_socket_is_connected (gsock)); + g_object_unref (gsock); +} - soup_uri_free (base_uri); +static void +do_fd_import_test (void) +{ + GSocket *gsock; + GSocketAddress *gaddr; + SoupServer *server; + GSList *listeners; + SoupURI *uri; + SoupSession *session; + SoupMessage *msg; + int type; + GError *error = NULL; + + gsock = g_socket_new (G_SOCKET_FAMILY_IPV4, + G_SOCKET_TYPE_STREAM, + G_SOCKET_PROTOCOL_DEFAULT, + &error); + g_assert_no_error (error); + + gaddr = g_inet_socket_address_new_from_string ("127.0.0.1", 0); + g_socket_bind (gsock, gaddr, TRUE, &error); + g_object_unref (gaddr); + g_assert_no_error (error); + g_socket_listen (gsock, &error); + g_assert_no_error (error); + + gaddr = g_socket_get_local_address (gsock, &error); + g_assert_no_error (error); + g_object_unref (gaddr); + + server = soup_test_server_new (SOUP_TEST_SERVER_NO_DEFAULT_LISTENER); + soup_server_add_handler (server, NULL, server_callback, NULL, NULL); + + listeners = soup_server_get_listeners (server); + g_assert_cmpint (g_slist_length (listeners), ==, 0); + g_slist_free (listeners); + + soup_server_listen_fd (server, g_socket_get_fd (gsock), 0, &error); + g_assert_no_error (error); + listeners = soup_server_get_listeners (server); + g_assert_cmpint (g_slist_length (listeners), ==, 1); + g_slist_free (listeners); + + uri = soup_test_server_get_uri (server, "http", "127.0.0.1"); + g_assert_nonnull (uri); + listeners = soup_server_get_listeners (server); + g_assert_cmpint (g_slist_length (listeners), ==, 1); + g_slist_free (listeners); + + session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); + msg = soup_message_new_from_uri ("GET", uri); + soup_session_send_message (session, msg); + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + g_object_unref (msg); + + soup_test_session_abort_unref (session); + + soup_uri_free (uri); soup_test_server_quit_unref (server); - if (tls_available) { - soup_uri_free (ssl_base_uri); - soup_test_server_quit_unref (ssl_server); + /* @server should have closed our socket, although @gsock doesn't + * know this. + */ + g_socket_get_option (gsock, SOL_SOCKET, SO_TYPE, &type, &error); + g_assert_error (error, G_IO_ERROR, G_IO_ERROR_FAILED); + g_clear_error (&error); + g_object_unref (gsock); +} + +typedef struct +{ + GIOStream parent; + GInputStream *input_stream; + GOutputStream *output_stream; +} GTestIOStream; + +typedef struct +{ + GIOStreamClass parent_class; +} GTestIOStreamClass; + +static GType g_test_io_stream_get_type (void); +G_DEFINE_TYPE (GTestIOStream, g_test_io_stream, G_TYPE_IO_STREAM); + + +static GInputStream * +get_input_stream (GIOStream *io_stream) +{ + GTestIOStream *self = (GTestIOStream *) io_stream; + + return self->input_stream; +} + +static GOutputStream * +get_output_stream (GIOStream *io_stream) +{ + GTestIOStream *self = (GTestIOStream *) io_stream; + + return self->output_stream; +} + +static void +finalize (GObject *object) +{ + GTestIOStream *self = (GTestIOStream *) object; + + if (self->input_stream != NULL) + g_object_unref (self->input_stream); + + if (self->output_stream != NULL) + g_object_unref (self->output_stream); + + G_OBJECT_CLASS (g_test_io_stream_parent_class)->finalize (object); +} + +static void +g_test_io_stream_class_init (GTestIOStreamClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + GIOStreamClass *io_class = G_IO_STREAM_CLASS (klass); + + object_class->finalize = finalize; + + io_class->get_input_stream = get_input_stream; + io_class->get_output_stream = get_output_stream; +} + +static void +g_test_io_stream_init (GTestIOStream *self) +{ +} + +static GIOStream * +g_test_io_stream_new (GInputStream *input, GOutputStream *output) +{ + GTestIOStream *self; + + self = g_object_new (g_test_io_stream_get_type (), NULL); + self->input_stream = g_object_ref (input); + self->output_stream = g_object_ref (output); + + return G_IO_STREAM (self); +} + +static void +mem_server_callback (SoupServer *server, SoupMessage *msg, + const char *path, GHashTable *query, + SoupClientContext *context, gpointer data) +{ + GSocketAddress *addr; + GSocket *sock; + const char *host; + + addr = soup_client_context_get_local_address (context); + g_assert_nonnull (addr); + + addr = soup_client_context_get_remote_address (context); + g_assert_nonnull (addr); + + sock = soup_client_context_get_gsocket (context); + g_assert_null (sock); + + host = soup_client_context_get_host (context); + g_assert_cmpstr (host, ==, "127.0.0.1"); + + server_callback (server, msg, path, query, context, data); +} + +static void +do_iostream_accept_test (void) +{ + GError *error = NULL; + SoupServer *server; + GInputStream *input; + GOutputStream *output; + GIOStream *stream; + GSocketAddress *addr; + const char req[] = "GET / HTTP/1.0\r\n\r\n"; + gchar *reply; + gsize reply_size; + + server = soup_test_server_new (SOUP_TEST_SERVER_NO_DEFAULT_LISTENER); + soup_server_add_handler (server, NULL, mem_server_callback, NULL, NULL); + + input = g_memory_input_stream_new_from_data (req, sizeof(req), NULL); + output = g_memory_output_stream_new (NULL, 0, g_realloc, g_free); + stream = g_test_io_stream_new (input, output); + + addr = g_inet_socket_address_new_from_string ("127.0.0.1", 0); + + soup_server_accept_iostream (server, stream, addr, addr, &error); + g_assert_no_error (error); + + soup_test_server_quit_unref (server); + + reply = g_memory_output_stream_get_data (G_MEMORY_OUTPUT_STREAM (output)); + reply_size = g_memory_output_stream_get_data_size (G_MEMORY_OUTPUT_STREAM (output)); + g_assert_true (reply_size > 0); + g_assert_true (g_str_has_prefix (reply, "HTTP/1.0 200 OK")); + + g_clear_object (&addr); + g_clear_object (&stream); + g_clear_object (&input); + g_clear_object (&output); + g_clear_error (&error); +} + +typedef struct { + SoupServer *server; + SoupMessage *smsg; + gboolean handler_called; + gboolean paused; +} UnhandledServerData; + +static gboolean +idle_unpause_message (gpointer user_data) +{ + UnhandledServerData *usd = user_data; + + soup_server_unpause_message (usd->server, usd->smsg); + return FALSE; +} + +static void +unhandled_server_callback (SoupServer *server, SoupMessage *msg, + const char *path, GHashTable *query, + SoupClientContext *context, gpointer data) +{ + UnhandledServerData *usd = data; + + usd->handler_called = TRUE; + + if (soup_message_headers_get_one (msg->request_headers, "X-Test-Server-Pause")) { + usd->paused = TRUE; + usd->server = server; + usd->smsg = msg; + soup_server_pause_message (server, msg); + g_idle_add (idle_unpause_message, usd); + } +} + +static void +do_fail_404_test (ServerData *sd, gconstpointer test_data) +{ + SoupSession *session; + SoupMessage *msg; + UnhandledServerData usd; + + usd.handler_called = usd.paused = FALSE; + + server_add_handler (sd, "/not-a-match", unhandled_server_callback, &usd, NULL); + + session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); + msg = soup_message_new_from_uri ("GET", sd->base_uri); + soup_session_send_message (session, msg); + soup_test_assert_message_status (msg, SOUP_STATUS_NOT_FOUND); + g_object_unref (msg); + + g_assert_false (usd.handler_called); + g_assert_false (usd.paused); + + soup_test_session_abort_unref (session); +} + +static void +do_fail_500_test (ServerData *sd, gconstpointer pause) +{ + SoupSession *session; + SoupMessage *msg; + UnhandledServerData usd; + + usd.handler_called = usd.paused = FALSE; + + server_add_handler (sd, NULL, unhandled_server_callback, &usd, NULL); + + session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); + msg = soup_message_new_from_uri ("GET", sd->base_uri); + if (pause) + soup_message_headers_append (msg->request_headers, "X-Test-Server-Pause", "true"); + soup_session_send_message (session, msg); + soup_test_assert_message_status (msg, SOUP_STATUS_INTERNAL_SERVER_ERROR); + g_object_unref (msg); + + g_assert_true (usd.handler_called); + if (pause) + g_assert_true (usd.paused); + else + g_assert_false (usd.paused); + + soup_test_session_abort_unref (session); +} + +static void +stream_got_chunk (SoupMessage *msg, SoupBuffer *chunk, gpointer user_data) +{ + GChecksum *checksum = user_data; + + g_checksum_update (checksum, (const guchar *)chunk->data, chunk->length); +} + +static void +stream_got_body (SoupMessage *msg, gpointer user_data) +{ + GChecksum *checksum = user_data; + const char *md5 = g_checksum_get_string (checksum); + + soup_message_set_status (msg, SOUP_STATUS_OK); + soup_message_set_response (msg, "text/plain", SOUP_MEMORY_COPY, + md5, strlen (md5)); + g_checksum_free (checksum); +} + +static void +early_stream_callback (SoupServer *server, SoupMessage *msg, + const char *path, GHashTable *query, + SoupClientContext *context, gpointer data) +{ + GChecksum *checksum; + + if (msg->method != SOUP_METHOD_POST) { + soup_message_set_status (msg, SOUP_STATUS_METHOD_NOT_ALLOWED); + return; } + checksum = g_checksum_new (G_CHECKSUM_MD5); + g_signal_connect (msg, "got-chunk", + G_CALLBACK (stream_got_chunk), checksum); + g_signal_connect (msg, "got-body", + G_CALLBACK (stream_got_body), checksum); + + soup_message_body_set_accumulate (msg->request_body, TRUE); +} + +static void +do_early_stream_test (ServerData *sd, gconstpointer test_data) +{ + SoupSession *session; + SoupMessage *msg; + SoupBuffer *index; + char *md5; + + server_add_early_handler (sd, NULL, early_stream_callback, NULL, NULL); + + session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, NULL); + + msg = soup_message_new_from_uri ("POST", sd->base_uri); + + index = soup_test_get_index (); + soup_message_body_append (msg->request_body, SOUP_MEMORY_COPY, + index->data, index->length); + soup_session_send_message (session, msg); + + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + + md5 = g_compute_checksum_for_data (G_CHECKSUM_MD5, + (guchar *) index->data, index->length); + g_assert_cmpstr (md5, ==, msg->response_body->data); + g_free (md5); + + g_object_unref (msg); + soup_test_session_abort_unref (session); +} + +static void +early_respond_callback (SoupServer *server, SoupMessage *msg, + const char *path, GHashTable *query, + SoupClientContext *context, gpointer data) +{ + if (!strcmp (path, "/")) + soup_message_set_status (msg, SOUP_STATUS_FORBIDDEN); +} + +static void +do_early_respond_test (ServerData *sd, gconstpointer test_data) +{ + SoupSession *session; + SoupMessage *msg; + SoupURI *uri2; + + server_add_early_handler (sd, NULL, early_respond_callback, NULL, NULL); + + session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, NULL); + + /* The early handler will intercept, and the normal handler will be skipped */ + msg = soup_message_new_from_uri ("GET", sd->base_uri); + soup_session_send_message (session, msg); + soup_test_assert_message_status (msg, SOUP_STATUS_FORBIDDEN); + g_assert_cmpint (msg->response_body->length, ==, 0); + g_object_unref (msg); + + /* The early handler will ignore this one */ + uri2 = soup_uri_new_with_base (sd->base_uri, "/subdir"); + msg = soup_message_new_from_uri ("GET", uri2); + soup_session_send_message (session, msg); + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + g_assert_cmpstr (msg->response_body->data, ==, "index"); + g_object_unref (msg); + soup_uri_free (uri2); + + soup_test_session_abort_unref (session); +} + +static void +early_multi_callback (SoupServer *server, SoupMessage *msg, + const char *path, GHashTable *query, + SoupClientContext *context, gpointer data) +{ + soup_message_headers_append (msg->response_headers, "X-Early", "yes"); +} + +static void +do_early_multi_test (ServerData *sd, gconstpointer test_data) +{ + SoupSession *session; + SoupMessage *msg; + SoupURI *uri; + struct { + const char *path; + gboolean expect_normal, expect_early; + } multi_tests[] = { + { "/", FALSE, FALSE }, + { "/normal", TRUE, FALSE }, + { "/normal/subdir", TRUE, FALSE }, + { "/normal/early", FALSE, TRUE }, + { "/normal/early/subdir", FALSE, TRUE }, + { "/early", FALSE, TRUE }, + { "/early/subdir", FALSE, TRUE }, + { "/early/normal", TRUE, FALSE }, + { "/early/normal/subdir", TRUE, FALSE }, + { "/both", TRUE, TRUE }, + { "/both/subdir", TRUE, TRUE } + }; + int i; + const char *header; + + server_add_handler (sd, "/normal", server_callback, NULL, NULL); + server_add_early_handler (sd, "/normal/early", early_multi_callback, NULL, NULL); + server_add_early_handler (sd, "/early", early_multi_callback, NULL, NULL); + server_add_handler (sd, "/early/normal", server_callback, NULL, NULL); + server_add_handler (sd, "/both", server_callback, NULL, NULL); + server_add_early_handler (sd, "/both", early_multi_callback, NULL, NULL); + + session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, NULL); + + for (i = 0; i < G_N_ELEMENTS (multi_tests); i++) { + uri = soup_uri_new_with_base (sd->base_uri, multi_tests[i].path); + msg = soup_message_new_from_uri ("GET", uri); + soup_uri_free (uri); + + soup_session_send_message (session, msg); + + /* The normal handler sets status to OK. The early handler doesn't + * touch status, meaning that if it runs and the normal handler doesn't, + * then SoupServer will set the status to INTERNAL_SERVER_ERROR + * (since a handler ran, but didn't set the status). If neither handler + * runs then SoupServer will set the status to NOT_FOUND. + */ + if (multi_tests[i].expect_normal) + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + else if (multi_tests[i].expect_early) + soup_test_assert_message_status (msg, SOUP_STATUS_INTERNAL_SERVER_ERROR); + else + soup_test_assert_message_status (msg, SOUP_STATUS_NOT_FOUND); + + header = soup_message_headers_get_one (msg->response_headers, "X-Early"); + if (multi_tests[i].expect_early) + g_assert_cmpstr (header, ==, "yes"); + else + g_assert_cmpstr (header, ==, NULL); + if (multi_tests[i].expect_normal) + g_assert_cmpstr (msg->response_body->data, ==, "index"); + else + g_assert_cmpint (msg->response_body->length, ==, 0); + + g_object_unref (msg); + } + + soup_test_session_abort_unref (session); +} + +typedef struct { + GIOStream *iostream; + GInputStream *istream; + GOutputStream *ostream; + + gssize nread, nwrote; + guchar *buffer; +} TunnelEnd; + +typedef struct { + SoupServer *self; + SoupMessage *msg; + SoupClientContext *context; + GCancellable *cancellable; + + TunnelEnd client, server; +} Tunnel; + +#define BUFSIZE 8192 + +static void tunnel_read_cb (GObject *object, + GAsyncResult *result, + gpointer user_data); + +static void +tunnel_close (Tunnel *tunnel) +{ + if (tunnel->cancellable) { + g_cancellable_cancel (tunnel->cancellable); + g_object_unref (tunnel->cancellable); + } + + if (tunnel->client.iostream) { + g_io_stream_close (tunnel->client.iostream, NULL, NULL); + g_object_unref (tunnel->client.iostream); + } + if (tunnel->server.iostream) { + g_io_stream_close (tunnel->server.iostream, NULL, NULL); + g_object_unref (tunnel->server.iostream); + } + + g_free (tunnel->client.buffer); + g_free (tunnel->server.buffer); + + g_clear_object (&tunnel->self); + g_clear_object (&tunnel->msg); + + g_free (tunnel); +} + +static void +tunnel_wrote_cb (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + Tunnel *tunnel = user_data; + TunnelEnd *write_end, *read_end; + GError *error = NULL; + gssize nwrote; + + nwrote = g_output_stream_write_finish (G_OUTPUT_STREAM (object), result, &error); + if (nwrote <= 0) { + if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { + g_error_free (error); + return; + } else if (error) { + g_print ("Tunnel write failed: %s\n", error->message); + g_error_free (error); + } + tunnel_close (tunnel); + return; + } + + if (object == (GObject *)tunnel->client.ostream) { + write_end = &tunnel->client; + read_end = &tunnel->server; + } else { + write_end = &tunnel->server; + read_end = &tunnel->client; + } + + write_end->nwrote += nwrote; + if (write_end->nwrote < read_end->nread) { + g_output_stream_write_async (write_end->ostream, + read_end->buffer + write_end->nwrote, + read_end->nread - write_end->nwrote, + G_PRIORITY_DEFAULT, tunnel->cancellable, + tunnel_wrote_cb, tunnel); + } else { + g_input_stream_read_async (read_end->istream, + read_end->buffer, BUFSIZE, + G_PRIORITY_DEFAULT, tunnel->cancellable, + tunnel_read_cb, tunnel); + } +} + +static void +tunnel_read_cb (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + Tunnel *tunnel = user_data; + TunnelEnd *read_end, *write_end; + GError *error = NULL; + gssize nread; + + nread = g_input_stream_read_finish (G_INPUT_STREAM (object), result, &error); + if (nread <= 0) { + if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { + g_error_free (error); + return; + } else if (error) { + g_print ("Tunnel read failed: %s\n", error->message); + g_error_free (error); + } + tunnel_close (tunnel); + return; + } + + if (object == (GObject *)tunnel->client.istream) { + read_end = &tunnel->client; + write_end = &tunnel->server; + } else { + read_end = &tunnel->server; + write_end = &tunnel->client; + } + + read_end->nread = nread; + write_end->nwrote = 0; + g_output_stream_write_async (write_end->ostream, + read_end->buffer, read_end->nread, + G_PRIORITY_DEFAULT, tunnel->cancellable, + tunnel_wrote_cb, tunnel); +} + +static void +start_tunnel (SoupMessage *msg, gpointer user_data) +{ + Tunnel *tunnel = user_data; + + tunnel->client.iostream = soup_client_context_steal_connection (tunnel->context); + tunnel->client.istream = g_io_stream_get_input_stream (tunnel->client.iostream); + tunnel->client.ostream = g_io_stream_get_output_stream (tunnel->client.iostream); + g_clear_object (&tunnel->self); + g_clear_object (&tunnel->msg); + + tunnel->client.buffer = g_malloc (BUFSIZE); + tunnel->server.buffer = g_malloc (BUFSIZE); + + tunnel->cancellable = g_cancellable_new (); + + g_input_stream_read_async (tunnel->client.istream, + tunnel->client.buffer, BUFSIZE, + G_PRIORITY_DEFAULT, tunnel->cancellable, + tunnel_read_cb, tunnel); + g_input_stream_read_async (tunnel->server.istream, + tunnel->server.buffer, BUFSIZE, + G_PRIORITY_DEFAULT, tunnel->cancellable, + tunnel_read_cb, tunnel); +} + + +static void +tunnel_connected_cb (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + Tunnel *tunnel = user_data; + GError *error = NULL; + + tunnel->server.iostream = (GIOStream *) + g_socket_client_connect_to_host_finish (G_SOCKET_CLIENT (object), result, &error); + if (!tunnel->server.iostream) { + soup_message_set_status (tunnel->msg, SOUP_STATUS_BAD_GATEWAY); + soup_message_set_response (tunnel->msg, "text/plain", + SOUP_MEMORY_COPY, + error->message, strlen (error->message)); + g_error_free (error); + soup_server_unpause_message (tunnel->self, tunnel->msg); + tunnel_close (tunnel); + return; + } + + tunnel->server.istream = g_io_stream_get_input_stream (tunnel->server.iostream); + tunnel->server.ostream = g_io_stream_get_output_stream (tunnel->server.iostream); + + soup_message_set_status (tunnel->msg, SOUP_STATUS_OK); + soup_server_unpause_message (tunnel->self, tunnel->msg); + g_signal_connect (tunnel->msg, "wrote-body", + G_CALLBACK (start_tunnel), tunnel); +} + +static void +proxy_server_callback (SoupServer *server, SoupMessage *msg, + const char *path, GHashTable *query, + SoupClientContext *context, gpointer data) +{ + GSocketClient *sclient; + SoupURI *dest_uri; + Tunnel *tunnel; + + if (msg->method != SOUP_METHOD_CONNECT) { + soup_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED); + return; + } + + soup_server_pause_message (server, msg); + + tunnel = g_new0 (Tunnel, 1); + tunnel->self = g_object_ref (server); + tunnel->msg = g_object_ref (msg); + tunnel->context = context; + + dest_uri = soup_message_get_uri (msg); + sclient = g_socket_client_new (); + g_socket_client_connect_to_host_async (sclient, dest_uri->host, dest_uri->port, + NULL, tunnel_connected_cb, tunnel); + g_object_unref (sclient); +} + +static void +do_steal_connect_test (ServerData *sd, gconstpointer test_data) +{ + SoupServer *proxy; + SoupURI *proxy_uri; + SoupSession *session; + SoupMessage *msg; + const char *handled_by; + + SOUP_TEST_SKIP_IF_NO_TLS; + + proxy = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); + proxy_uri = soup_test_server_get_uri (proxy, SOUP_URI_SCHEME_HTTP, "127.0.0.1"); + soup_server_add_handler (proxy, NULL, proxy_server_callback, NULL, NULL); + + session = soup_test_session_new (SOUP_TYPE_SESSION, + SOUP_SESSION_PROXY_URI, proxy_uri, + NULL); + msg = soup_message_new_from_uri ("GET", sd->ssl_base_uri); + soup_session_send_message (session, msg); + + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + handled_by = soup_message_headers_get_one (msg->response_headers, "X-Handled-By"); + g_assert_cmpstr (handled_by, ==, "server_callback"); + + g_object_unref (msg); + soup_test_session_abort_unref (session); + + soup_test_server_quit_unref (proxy); + soup_uri_free (proxy_uri); +} + +int +main (int argc, char **argv) +{ + int ret; + + test_init (argc, argv, NULL); + + g_test_add ("/server/OPTIONS *", ServerData, NULL, + server_setup, do_star_test, server_teardown); + g_test_add ("/server/aliases", ServerData, NULL, + server_setup, do_server_aliases_test, server_teardown); + g_test_add ("/server/..-in-path", ServerData, NULL, + server_setup, do_dot_dot_test, server_teardown); + g_test_add ("/server/ipv6", ServerData, NULL, + NULL, do_ipv6_test, server_teardown); + g_test_add ("/server/multi/port", ServerData, NULL, + NULL, do_multi_port_test, server_teardown); + g_test_add ("/server/multi/scheme", ServerData, NULL, + NULL, do_multi_scheme_test, server_teardown); + g_test_add ("/server/multi/family", ServerData, NULL, + NULL, do_multi_family_test, server_teardown); + g_test_add_func ("/server/import/gsocket", do_gsocket_import_test); + g_test_add_func ("/server/import/fd", do_fd_import_test); + g_test_add_func ("/server/accept/iostream", do_iostream_accept_test); + g_test_add ("/server/fail/404", ServerData, NULL, + server_setup_nohandler, do_fail_404_test, server_teardown); + g_test_add ("/server/fail/500", ServerData, GINT_TO_POINTER (FALSE), + server_setup_nohandler, do_fail_500_test, server_teardown); + g_test_add ("/server/fail/500-pause", ServerData, GINT_TO_POINTER (TRUE), + server_setup_nohandler, do_fail_500_test, server_teardown); + g_test_add ("/server/early/stream", ServerData, NULL, + server_setup_nohandler, do_early_stream_test, server_teardown); + g_test_add ("/server/early/respond", ServerData, NULL, + server_setup, do_early_respond_test, server_teardown); + g_test_add ("/server/early/multi", ServerData, NULL, + server_setup_nohandler, do_early_multi_test, server_teardown); + g_test_add ("/server/steal/CONNECT", ServerData, NULL, + server_setup, do_steal_connect_test, server_teardown); + + ret = g_test_run (); + test_cleanup (); return ret; } diff --git a/tests/session-test.c b/tests/session-test.c index 15072058..8957a258 100644 --- a/tests/session-test.c +++ b/tests/session-test.c @@ -25,7 +25,7 @@ server_handler (SoupServer *server, gpointer user_data) { if (!strcmp (path, "/request-timeout")) { - GMainContext *context = soup_server_get_async_context (server); + GMainContext *context = g_main_context_get_thread_default (); GSource *timer; timer = g_timeout_source_new (100); @@ -57,8 +57,7 @@ cancel_message_cb (SoupMessage *msg, gpointer session) } static void -do_test_for_session (SoupSession *session, - const char *uri, +do_test_for_session (SoupSession *session, SoupURI *uri, gboolean queue_is_async, gboolean send_is_blocking, gboolean cancel_is_immediate) @@ -66,17 +65,17 @@ do_test_for_session (SoupSession *session, SoupMessage *msg; gboolean finished, local_timeout; guint timeout_id; - char *timeout_uri; + SoupURI *timeout_uri; debug_printf (1, " queue_message\n"); debug_printf (2, " requesting timeout\n"); - timeout_uri = g_strdup_printf ("%s/request-timeout", uri); - msg = soup_message_new ("GET", timeout_uri); - g_free (timeout_uri); + timeout_uri = soup_uri_new_with_base (uri, "/request-timeout"); + msg = soup_message_new_from_uri ("GET", timeout_uri); + soup_uri_free (timeout_uri); soup_session_send_message (session, msg); g_object_unref (msg); - msg = soup_message_new ("GET", uri); + msg = soup_message_new_from_uri ("GET", uri); server_processed_message = timeout = finished = FALSE; soup_session_queue_message (session, msg, finished_cb, &finished); while (!timeout) @@ -98,10 +97,11 @@ do_test_for_session (SoupSession *session, } debug_printf (1, " send_message\n"); - msg = soup_message_new ("GET", uri); + msg = soup_message_new_from_uri ("GET", uri); server_processed_message = local_timeout = FALSE; timeout_id = g_idle_add_full (G_PRIORITY_HIGH, timeout_cb, &local_timeout, NULL); soup_session_send_message (session, msg); + g_object_unref (msg); g_assert_true (server_processed_message); @@ -120,7 +120,7 @@ do_test_for_session (SoupSession *session, return; debug_printf (1, " cancel_message\n"); - msg = soup_message_new ("GET", uri); + msg = soup_message_new_from_uri ("GET", uri); g_object_ref (msg); finished = FALSE; soup_session_queue_message (session, msg, finished_cb, &finished); @@ -140,14 +140,16 @@ do_test_for_session (SoupSession *session, while (!finished) g_main_context_iteration (NULL, TRUE); } + g_main_loop_unref (loop); soup_test_assert_message_status (msg, SOUP_STATUS_CANCELLED); g_object_unref (msg); } static void -do_plain_tests (gconstpointer uri) +do_plain_tests (gconstpointer data) { + SoupURI *uri = (SoupURI *)data; SoupSession *session; session = soup_test_session_new (SOUP_TYPE_SESSION, NULL); @@ -156,8 +158,9 @@ do_plain_tests (gconstpointer uri) } static void -do_async_tests (gconstpointer uri) +do_async_tests (gconstpointer data) { + SoupURI *uri = (SoupURI *)data; SoupSession *session; session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); @@ -166,8 +169,9 @@ do_async_tests (gconstpointer uri) } static void -do_sync_tests (gconstpointer uri) +do_sync_tests (gconstpointer data) { + SoupURI *uri = (SoupURI *)data; SoupSession *session; session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, NULL); @@ -194,7 +198,7 @@ priority_test_finished_cb (SoupSession *session, SoupMessage *msg, gpointer user static void do_priority_tests (gconstpointer data) { - const char *uri = data; + SoupURI *uri = (SoupURI *)data; SoupSession *session; int i, finished_count = 0; SoupMessagePriority priorities[] = @@ -212,12 +216,14 @@ do_priority_tests (gconstpointer data) expected_priorities[2] = SOUP_MESSAGE_PRIORITY_LOW; for (i = 0; i < 3; i++) { - char *msg_uri; + SoupURI *msg_uri; SoupMessage *msg; + char buf[5]; - msg_uri = g_strdup_printf ("%s/%d", uri, i); - msg = soup_message_new ("GET", uri); - g_free (msg_uri); + g_snprintf (buf, sizeof (buf), "%d", i); + msg_uri = soup_uri_new_with_base (uri, buf); + msg = soup_message_new_from_uri ("GET", msg_uri); + soup_uri_free (msg_uri); soup_message_set_priority (msg, priorities[i]); soup_session_queue_message (session, msg, priority_test_finished_cb, &finished_count); @@ -368,16 +374,14 @@ int main (int argc, char **argv) { SoupServer *server; - char *uri, *timeout_uri; + SoupURI *uri; int ret; test_init (argc, argv, NULL); server = soup_test_server_new (TRUE); soup_server_add_handler (server, NULL, server_handler, NULL, NULL); - uri = g_strdup_printf ("http://127.0.0.1:%u", - soup_server_get_port (server)); - timeout_uri = g_strdup_printf ("%s/request-timeout", uri); + uri = soup_test_server_get_uri (server, "http", NULL); g_test_add_data_func ("/session/SoupSession", uri, do_plain_tests); g_test_add_data_func ("/session/SoupSessionAsync", uri, do_async_tests); @@ -387,8 +391,7 @@ main (int argc, char **argv) ret = g_test_run (); - g_free (uri); - g_free (timeout_uri); + soup_uri_free (uri); soup_test_server_quit_unref (server); test_cleanup (); diff --git a/tests/sniffing-test.c b/tests/sniffing-test.c index 32fad9fc..7b391178 100644 --- a/tests/sniffing-test.c +++ b/tests/sniffing-test.c @@ -440,10 +440,9 @@ main (int argc, char **argv) test_init (argc, argv, NULL); - server = soup_test_server_new (TRUE); + server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); - base_uri = soup_uri_new ("http://127.0.0.1/"); - soup_uri_set_port (base_uri, soup_server_get_port (server)); + base_uri = soup_test_server_get_uri (server, "http", NULL); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, SOUP_SESSION_USE_THREAD_CONTEXT, TRUE, @@ -529,6 +528,10 @@ main (int argc, char **argv) g_test_add_data_func ("/sniffing/type/unknown-leading-space", "unknown/leading_space.html => text/html", do_sniffing_test); + /* https://bugs.webkit.org/show_bug.cgi?id=173923 */ + g_test_add_data_func ("/sniffing/type/unknown-xml", + "unknown/misc.xml => text/xml", + do_sniffing_test); /* Test the XML sniffing path */ g_test_add_data_func ("/sniffing/type/xml", diff --git a/tests/socket-test.c b/tests/socket-test.c index 5bcc3b0c..5b2b390e 100644 --- a/tests/socket-test.c +++ b/tests/socket-test.c @@ -5,7 +5,9 @@ */ #include "test-utils.h" +#include "libsoup/soup-socket-private.h" +#include #include static void @@ -74,7 +76,10 @@ do_unconnected_socket_test (void) /* listening socket fails with ENOTCONN */ g_test_expect_message ("libsoup", G_LOG_LEVEL_WARNING, - "*endpoint is not connected*"); + /* We can't check the error message since it comes from + * libc and is locale-dependent. + */ + "*"); addr = soup_socket_get_remote_address (sock); g_test_assert_expected_messages (); g_assert_null (addr); @@ -82,6 +87,7 @@ do_unconnected_socket_test (void) soup_socket_disconnect (sock); g_test_expect_message ("libsoup", G_LOG_LEVEL_WARNING, + /* This error message comes from soup-socket.c though */ "*socket not connected*"); addr = soup_socket_get_remote_address (sock); g_test_assert_expected_messages (); @@ -108,6 +114,230 @@ do_unconnected_socket_test (void) g_object_unref (sock); } +static void +do_socket_from_fd_client_test (void) +{ + SoupServer *server; + SoupURI *uri; + GSocket *gsock; + SoupSocket *sock; + SoupAddress *local, *remote; + GSocketAddress *gaddr; + gboolean is_server; + GError *error = NULL; + + server = soup_test_server_new (SOUP_TEST_SERVER_DEFAULT); + uri = soup_test_server_get_uri (server, "http", "127.0.0.1"); + + gsock = g_socket_new (G_SOCKET_FAMILY_IPV4, + G_SOCKET_TYPE_STREAM, + G_SOCKET_PROTOCOL_DEFAULT, + &error); + g_assert_no_error (error); + + gaddr = g_inet_socket_address_new_from_string ("127.0.0.1", uri->port); + g_socket_connect (gsock, gaddr, NULL, &error); + g_object_unref (gaddr); + g_assert_no_error (error); + g_assert_true (g_socket_is_connected (gsock)); + + gaddr = g_socket_get_local_address (gsock, &error); + g_assert_no_error (error); + + sock = g_initable_new (SOUP_TYPE_SOCKET, NULL, &error, + SOUP_SOCKET_FD, g_socket_get_fd (gsock), + NULL); + g_assert_no_error (error); + g_assert_nonnull (sock); + + g_object_get (G_OBJECT (sock), + SOUP_SOCKET_LOCAL_ADDRESS, &local, + SOUP_SOCKET_REMOTE_ADDRESS, &remote, + SOUP_SOCKET_IS_SERVER, &is_server, + NULL); + g_assert_cmpint (soup_socket_get_fd (sock), ==, g_socket_get_fd (gsock)); + g_assert_false (is_server); + g_assert_true (soup_socket_is_connected (sock)); + + g_assert_cmpstr (soup_address_get_physical (local), ==, "127.0.0.1"); + g_assert_cmpint (soup_address_get_port (local), ==, g_inet_socket_address_get_port (G_INET_SOCKET_ADDRESS (gaddr))); + g_assert_cmpstr (soup_address_get_physical (remote), ==, "127.0.0.1"); + g_assert_cmpint (soup_address_get_port (remote), ==, uri->port); + + g_object_unref (local); + g_object_unref (remote); + g_object_unref (gaddr); + + g_object_unref (sock); + g_object_unref (gsock); + + soup_test_server_quit_unref (server); + soup_uri_free (uri); +} + +static void +do_socket_from_fd_server_test (void) +{ + GSocket *gsock; + SoupSocket *sock; + SoupAddress *local; + GSocketAddress *gaddr; + gboolean is_server; + GError *error = NULL; + + gsock = g_socket_new (G_SOCKET_FAMILY_IPV4, + G_SOCKET_TYPE_STREAM, + G_SOCKET_PROTOCOL_DEFAULT, + &error); + g_assert_no_error (error); + + gaddr = g_inet_socket_address_new_from_string ("127.0.0.1", 0); + g_socket_bind (gsock, gaddr, TRUE, &error); + g_object_unref (gaddr); + g_assert_no_error (error); + g_socket_listen (gsock, &error); + g_assert_no_error (error); + g_assert_false (g_socket_is_connected (gsock)); + + gaddr = g_socket_get_local_address (gsock, &error); + g_assert_no_error (error); + + sock = g_initable_new (SOUP_TYPE_SOCKET, NULL, &error, + SOUP_SOCKET_GSOCKET, gsock, + NULL); + g_assert_no_error (error); + g_assert_nonnull (sock); + + g_object_get (G_OBJECT (sock), + SOUP_SOCKET_LOCAL_ADDRESS, &local, + SOUP_SOCKET_IS_SERVER, &is_server, + NULL); + g_assert_cmpint (soup_socket_get_fd (sock), ==, g_socket_get_fd (gsock)); + g_assert_true (is_server); + g_assert_true (soup_socket_is_connected (sock)); + + g_assert_cmpstr (soup_address_get_physical (local), ==, "127.0.0.1"); + g_assert_cmpint (soup_address_get_port (local), ==, g_inet_socket_address_get_port (G_INET_SOCKET_ADDRESS (gaddr))); + g_object_unref (local); + g_object_unref (gaddr); + + g_object_unref (sock); + + /* Closing the SoupSocket should have closed the GSocket */ + g_assert_true (g_socket_is_closed (gsock)); + + g_object_unref (gsock); +} + +static void +do_socket_from_fd_bad_test (void) +{ + GSocket *gsock, *gsock2, *gsockcli; + SoupSocket *sock, *sock2; + SoupAddress *local, *remote; + GSocketAddress *gaddr; + gboolean is_server; + int fd; + GError *error = NULL; + + /* Importing a non-socket fd gives an error */ + fd = open (g_test_get_filename (G_TEST_DIST, "test-cert.pem", NULL), O_RDONLY); + g_assert_cmpint (fd, !=, -1); + + sock = g_initable_new (SOUP_TYPE_SOCKET, NULL, &error, + SOUP_SOCKET_FD, fd, + NULL); + g_assert_error (error, G_IO_ERROR, G_IO_ERROR_FAILED); + g_clear_error (&error); + g_assert_null (sock); + close (fd); + + /* Importing an unconnected socket gives an error */ + gsock = g_socket_new (G_SOCKET_FAMILY_IPV4, + G_SOCKET_TYPE_STREAM, + G_SOCKET_PROTOCOL_DEFAULT, + &error); + g_assert_no_error (error); + g_assert_false (g_socket_is_connected (gsock)); + + sock = g_initable_new (SOUP_TYPE_SOCKET, NULL, &error, + SOUP_SOCKET_FD, g_socket_get_fd (gsock), + NULL); + g_assert_error (error, G_IO_ERROR, G_IO_ERROR_FAILED); + g_clear_error (&error); + g_assert_null (sock); + g_object_unref (gsock); + + /* Importing a non-listening server-side socket works, but + * gives the wrong answer for soup_socket_is_server(). + */ + gsock = g_socket_new (G_SOCKET_FAMILY_IPV4, + G_SOCKET_TYPE_STREAM, + G_SOCKET_PROTOCOL_DEFAULT, + &error); + g_assert_no_error (error); + + gaddr = g_inet_socket_address_new_from_string ("127.0.0.1", 0); + g_socket_bind (gsock, gaddr, TRUE, &error); + g_object_unref (gaddr); + g_assert_no_error (error); + g_socket_listen (gsock, &error); + g_assert_no_error (error); + g_assert_false (g_socket_is_connected (gsock)); + + gaddr = g_socket_get_local_address (gsock, &error); + g_assert_no_error (error); + + gsockcli = g_socket_new (G_SOCKET_FAMILY_IPV4, + G_SOCKET_TYPE_STREAM, + G_SOCKET_PROTOCOL_DEFAULT, + &error); + g_assert_no_error (error); + + g_socket_connect (gsockcli, gaddr, NULL, &error); + g_assert_no_error (error); + g_assert_true (g_socket_is_connected (gsockcli)); + + gsock2 = g_socket_accept (gsock, NULL, &error); + g_assert_no_error (error); + g_assert_nonnull (gsock2); + + sock2 = g_initable_new (SOUP_TYPE_SOCKET, NULL, &error, + SOUP_SOCKET_GSOCKET, gsock2, + NULL); + g_assert_no_error (error); + g_assert_nonnull (sock2); + + g_object_get (G_OBJECT (sock2), + SOUP_SOCKET_LOCAL_ADDRESS, &local, + SOUP_SOCKET_REMOTE_ADDRESS, &remote, + SOUP_SOCKET_IS_SERVER, &is_server, + NULL); + g_assert_cmpint (soup_socket_get_fd (sock2), ==, g_socket_get_fd (gsock2)); + g_assert_true (soup_socket_is_connected (sock2)); + /* This is wrong, but can't be helped. */ + g_assert_false (is_server); + + g_assert_cmpstr (soup_address_get_physical (local), ==, "127.0.0.1"); + g_assert_cmpint (soup_address_get_port (local), ==, g_inet_socket_address_get_port (G_INET_SOCKET_ADDRESS (gaddr))); + g_object_unref (gaddr); + + gaddr = g_socket_get_local_address (gsockcli, &error); + g_assert_no_error (error); + g_assert_cmpstr (soup_address_get_physical (remote), ==, "127.0.0.1"); + g_assert_cmpint (soup_address_get_port (remote), ==, g_inet_socket_address_get_port (G_INET_SOCKET_ADDRESS (gaddr))); + g_object_unref (gaddr); + + g_object_unref (local); + g_object_unref (remote); + + g_object_unref (sock2); + + g_object_unref (gsock); + g_object_unref (gsock2); + g_object_unref (gsockcli); +} + int main (int argc, char **argv) { @@ -116,6 +346,9 @@ main (int argc, char **argv) test_init (argc, argv, NULL); g_test_add_func ("/sockets/unconnected", do_unconnected_socket_test); + g_test_add_func ("/sockets/from-fd/client", do_socket_from_fd_client_test); + g_test_add_func ("/sockets/from-fd/server", do_socket_from_fd_server_test); + g_test_add_func ("/sockets/from-fd/bad", do_socket_from_fd_bad_test); ret = g_test_run (); diff --git a/tests/soup-tests.gresource.xml b/tests/soup-tests.gresource.xml index b24a7297..9c08d170 100644 --- a/tests/soup-tests.gresource.xml +++ b/tests/soup-tests.gresource.xml @@ -13,6 +13,7 @@ resources/mbox.gz resources/mbox.raw resources/mbox.zlib + resources/misc.xml resources/ps_binary.ps resources/rss20.xml resources/test.aiff diff --git a/tests/ssl-test.c b/tests/ssl-test.c index e6bbb615..735ba416 100644 --- a/tests/ssl-test.c +++ b/tests/ssl-test.c @@ -2,16 +2,17 @@ #include "test-utils.h" -static char *uri; +SoupURI *uri; +GTlsDatabase *null_tlsdb; static void -do_properties_test_for_session (SoupSession *session, const char *uri) +do_properties_test_for_session (SoupSession *session) { SoupMessage *msg; GTlsCertificate *cert; GTlsCertificateFlags flags; - msg = soup_message_new ("GET", uri); + msg = soup_message_new_from_uri ("GET", uri); soup_session_send_message (session, msg); soup_test_assert_message_status (msg, SOUP_STATUS_OK); @@ -36,10 +37,10 @@ do_async_properties_tests (void) session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); g_object_set (G_OBJECT (session), - SOUP_SESSION_SSL_CA_FILE, "/dev/null", + SOUP_SESSION_TLS_DATABASE, null_tlsdb, SOUP_SESSION_SSL_STRICT, FALSE, NULL); - do_properties_test_for_session (session, uri); + do_properties_test_for_session (session); soup_test_session_abort_unref (session); } @@ -52,10 +53,10 @@ do_sync_properties_tests (void) session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, NULL); g_object_set (G_OBJECT (session), - SOUP_SESSION_SSL_CA_FILE, "/dev/null", + SOUP_SESSION_TLS_DATABASE, null_tlsdb, SOUP_SESSION_SSL_STRICT, FALSE, NULL); - do_properties_test_for_session (session, uri); + do_properties_test_for_session (session); soup_test_session_abort_unref (session); } @@ -105,11 +106,11 @@ do_strictness_test (gconstpointer data) } if (!test->with_ca_list) { g_object_set (G_OBJECT (session), - SOUP_SESSION_SSL_CA_FILE, "/dev/null", + SOUP_SESSION_TLS_DATABASE, null_tlsdb, NULL); } - msg = soup_message_new ("GET", uri); + msg = soup_message_new_from_uri ("GET", uri); soup_session_send_message (session, msg); soup_test_assert_message_status (msg, test->expected_status); @@ -127,6 +128,7 @@ do_strictness_test (gconstpointer data) debug_printf (1, " tls error flags: 0x%x\n", flags); g_object_unref (msg); + soup_test_session_abort_unref (session); } @@ -146,12 +148,21 @@ do_session_property_tests (void) GTlsDatabase *tlsdb; char *ca_file; SoupSession *session; + GParamSpec *pspec; g_test_bug ("673678"); SOUP_TEST_SKIP_IF_NO_TLS; + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; session = soup_session_async_new (); + G_GNUC_END_IGNORE_DEPRECATIONS; + + /* Temporarily undeprecate SOUP_SESSION_SSL_CA_FILE to avoid warnings. */ + pspec = g_object_class_find_property (g_type_class_peek (SOUP_TYPE_SESSION), + SOUP_SESSION_SSL_CA_FILE); + pspec->flags &= ~G_PARAM_DEPRECATED; + g_signal_connect (session, "notify::ssl-use-system-ca-file", G_CALLBACK (property_changed), &use_system_changed); g_signal_connect (session, "notify::tls-database", @@ -232,6 +243,175 @@ do_session_property_tests (void) g_assert_true (ca_file_changed); soup_test_session_abort_unref (session); + + /* Re-deprecate SOUP_SESSION_SSL_CA_FILE */ + pspec->flags |= G_PARAM_DEPRECATED; +} + +/* GTlsInteraction subclass for do_interaction_test */ +typedef GTlsInteraction TestTlsInteraction; +typedef GTlsInteractionClass TestTlsInteractionClass; + +GType test_tls_interaction_get_type (void); + +G_DEFINE_TYPE (TestTlsInteraction, test_tls_interaction, G_TYPE_TLS_INTERACTION); + +static void +test_tls_interaction_init (TestTlsInteraction *interaction) +{ + +} + +static GTlsInteractionResult +test_tls_interaction_request_certificate (GTlsInteraction *interaction, + GTlsConnection *connection, + GTlsCertificateRequestFlags flags, + GCancellable *cancellable, + GError **error) +{ + GTlsCertificate *cert; + const char *ssl_cert_file, *ssl_key_file; + GError *my_error = NULL; + + /* Yes, we use the same certificate for the client as for the server. Shrug */ + ssl_cert_file = g_test_get_filename (G_TEST_DIST, "test-cert.pem", NULL); + ssl_key_file = g_test_get_filename (G_TEST_DIST, "test-key.pem", NULL); + cert = g_tls_certificate_new_from_files (ssl_cert_file, + ssl_key_file, + &my_error); + g_assert_no_error (my_error); + + g_tls_connection_set_certificate (connection, cert); + g_object_unref (cert); + + return G_TLS_INTERACTION_HANDLED; +} + +static void +test_tls_interaction_class_init (TestTlsInteractionClass *klass) +{ + GTlsInteractionClass *interaction_class = G_TLS_INTERACTION_CLASS (klass); + + interaction_class->request_certificate = test_tls_interaction_request_certificate; +} + + +#define INTERACTION_TEST_HTTP_RESPONSE "HTTP/1.1 200 OK\r\nConnection: close\r\n\r\nOK\r\n" + +static gboolean +accept_client_certificate (GTlsConnection *server, + GTlsCertificate *client_cert, + GTlsCertificateFlags errors) +{ + return TRUE; +} + +static void +got_connection (GThreadedSocketService *service, + GSocketConnection *connection, + GObject *source_object) +{ + GIOStream *tls; + GTlsCertificate *server_cert; + GError *error = NULL; + const char *ssl_cert_file, *ssl_key_file; + GMainContext *thread_context; + + thread_context = g_main_context_new (); + g_main_context_push_thread_default (thread_context); + + ssl_cert_file = g_test_get_filename (G_TEST_DIST, "test-cert.pem", NULL); + ssl_key_file = g_test_get_filename (G_TEST_DIST, "test-key.pem", NULL); + server_cert = g_tls_certificate_new_from_files (ssl_cert_file, + ssl_key_file, + &error); + g_assert_no_error (error); + + tls = g_tls_server_connection_new (G_IO_STREAM (connection), + server_cert, &error); + g_assert_no_error (error); + g_object_unref (server_cert); + + g_object_set (G_OBJECT (tls), + "authentication-mode", G_TLS_AUTHENTICATION_REQUIRED, + NULL); + g_signal_connect (tls, "accept-certificate", + G_CALLBACK (accept_client_certificate), NULL); + + if (g_tls_connection_handshake (G_TLS_CONNECTION (tls), NULL, &error)) { + g_output_stream_write_all (g_io_stream_get_output_stream (tls), + INTERACTION_TEST_HTTP_RESPONSE, + strlen (INTERACTION_TEST_HTTP_RESPONSE), + NULL, NULL, &error); + g_assert_no_error (error); + } else { + g_assert_error (error, G_TLS_ERROR, G_TLS_ERROR_CERTIFICATE_REQUIRED); + g_clear_error (&error); + } + + g_io_stream_close (tls, NULL, &error); + g_assert_no_error (error); + + g_object_unref (tls); + + g_main_context_pop_thread_default (thread_context); + g_main_context_unref (thread_context); +} + +static void +do_tls_interaction_test (void) +{ + GSocketService *service; + GSocketAddress *address, *bound_address; + SoupSession *session; + SoupMessage *msg; + GTlsInteraction *interaction; + SoupURI *test_uri; + GError *error = NULL; + + SOUP_TEST_SKIP_IF_NO_TLS; + + service = g_threaded_socket_service_new (1); + address = g_inet_socket_address_new_from_string ("127.0.0.1", 0); + g_socket_listener_add_address (G_SOCKET_LISTENER (service), address, + G_SOCKET_TYPE_STREAM, + G_SOCKET_PROTOCOL_TCP, + NULL, &bound_address, &error); + g_assert_no_error (error); + g_object_unref (address); + g_signal_connect (service, "run", G_CALLBACK (got_connection), NULL); + g_socket_service_start (service); + + test_uri = soup_uri_new ("https://127.0.0.1"); + soup_uri_set_port (test_uri, g_inet_socket_address_get_port (G_INET_SOCKET_ADDRESS (bound_address))); + g_object_unref (bound_address); + + session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); + + /* Without a GTlsInteraction */ + msg = soup_message_new_from_uri ("GET", test_uri); + soup_session_send_message (session, msg); + soup_test_assert_message_status (msg, SOUP_STATUS_SSL_FAILED); + g_object_unref (msg); + + interaction = g_object_new (test_tls_interaction_get_type (), NULL); + g_object_set (G_OBJECT (session), + SOUP_SESSION_TLS_INTERACTION, interaction, + NULL); + g_object_unref (interaction); + + /* With a GTlsInteraction */ + msg = soup_message_new_from_uri ("GET", test_uri); + soup_session_send_message (session, msg); + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + g_assert_true (soup_message_get_https_status (msg, NULL, NULL)); + g_object_unref (msg); + + soup_uri_free (test_uri); + soup_test_session_abort_unref (session); + + g_socket_service_stop (service); + g_object_unref (service); } static void @@ -251,21 +431,26 @@ server_handler (SoupServer *server, int main (int argc, char **argv) { - SoupServer *server; + SoupServer *server = NULL; int i, ret; + GError *error = NULL; test_init (argc, argv, NULL); if (tls_available) { - server = soup_test_server_new_ssl (TRUE); + server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); soup_server_add_handler (server, NULL, server_handler, NULL, NULL); - uri = g_strdup_printf ("https://127.0.0.1:%u/", - soup_server_get_port (server)); - } + uri = soup_test_server_get_uri (server, "https", "127.0.0.1"); + + null_tlsdb = g_tls_file_database_new ("/dev/null", &error); + g_assert_no_error (error); + } else + uri = NULL; g_test_add_func ("/ssl/session-properties", do_session_property_tests); g_test_add_func ("/ssl/message-properties/async", do_async_properties_tests); g_test_add_func ("/ssl/message-properties/sync", do_sync_properties_tests); + g_test_add_func ("/ssl/tls-interaction", do_tls_interaction_test); for (i = 0; i < G_N_ELEMENTS (strictness_tests); i++) { g_test_add_data_func (strictness_tests[i].name, @@ -276,8 +461,9 @@ main (int argc, char **argv) ret = g_test_run (); if (tls_available) { - g_free (uri); + soup_uri_free (uri); soup_test_server_quit_unref (server); + g_object_unref (null_tlsdb); } test_cleanup (); diff --git a/tests/streaming-test.c b/tests/streaming-test.c index 8d8c02ef..bd4a5194 100644 --- a/tests/streaming-test.c +++ b/tests/streaming-test.c @@ -138,7 +138,6 @@ main (int argc, char **argv) { GMainLoop *loop; SoupServer *server; - guint port; SoupURI *base_uri; int ret; @@ -149,15 +148,13 @@ main (int argc, char **argv) (guchar *)full_response->data, full_response->length); - server = soup_test_server_new (FALSE); + server = soup_test_server_new (SOUP_TEST_SERVER_DEFAULT); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); - port = soup_server_get_port (server); loop = g_main_loop_new (NULL, TRUE); - base_uri = soup_uri_new ("http://127.0.0.1"); - soup_uri_set_port (base_uri, port); + base_uri = soup_test_server_get_uri (server, "http", NULL); g_test_add_data_func ("/streaming/chunked", base_uri, do_chunked_test); g_test_add_data_func ("/streaming/content-length", base_uri, do_content_length_test); diff --git a/tests/test-cert.pem b/tests/test-cert.pem index 7f206266..ff863b4d 100644 --- a/tests/test-cert.pem +++ b/tests/test-cert.pem @@ -1,17 +1,18 @@ -----BEGIN CERTIFICATE----- -MIICpDCCAYwCCQC8Suc8hjfgujANBgkqhkiG9w0BAQUFADAUMRIwEAYDVQQDDAkx -MjcuMC4wLjEwHhcNMTEwOTE5MTkyMjA1WhcNMjEwOTE2MTkyMjA1WjAUMRIwEAYD -VQQDDAkxMjcuMC4wLjEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCr -OH7kblu+5zkYTk/ZG21OgbIyltxhLDHPmUpl4yDUFqX5BEtoVfg0Ms4ZuaoeDi4t -b2LV6Em3UDQwmwPMm2SakfJvRd3nfL6G3UkkBsVqT3V04M9u8fk6YgHPT8PN1Lj7 -5bv9AMRyQRV1QIPondMhbt8JhlmCR6ALbxYtsXkbQF7qzbj7Y2cjvoHzPQSk0QpB -rEUpj6Schm1NkPen48Z1X1faGL0F3roFHEsf6U1AjP5A4A/UGQsRtq35VzVnKgxW -N7jumUevEMIvyqLjmvK864AHMIRVCOls9GcIta80bViuVqgtuGgVGM/7SoZfIvPF -A10jIe7KQoXWAwRi4WclAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAJfihY634dRr -DeEA4SQ1e0/kB6EF8oeaC+5EuGOJxtoX+yXJfWJsEtmjRwobyOBVV997hdOtdZjo -mdJOCKerOFKccO9PLNJZ+/l4+NHv9OwOcu4UqvrSsps/pmr/22SIyQswbLLJfPAT -KjGTDLlj//zrLxzUGsu7lgGsY4s4fVbftFZv7P5AyErpwiFk8qM1BP0NMkn4XWSA -uSyTeB6O+tWYdh3bA1BeKC2P85sl6xFJI2gxvNTxtdcg9beDqNuEheJ+mEtD3P4w -HDG1vFaAX0MH1RJSDO/dIoJerN6LTjiTYYYg8yV0lmBxijv25Z/3Gi33OuG9jkdR -vXDwJpC+/ko= +MIIC2zCCAcOgAwIBAgIJALRbg2WnuAAqMA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV +BAMMCTEyNy4wLjAuMTAeFw0xNzA2MjAxNDI3MzBaFw0yNzA2MTgxNDI3MzBaMBQx +EjAQBgNVBAMMCTEyNy4wLjAuMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAKs4fuRuW77nORhOT9kbbU6BsjKW3GEsMc+ZSmXjINQWpfkES2hV+DQyzhm5 +qh4OLi1vYtXoSbdQNDCbA8ybZJqR8m9F3ed8vobdSSQGxWpPdXTgz27x+TpiAc9P +w83UuPvlu/0AxHJBFXVAg+id0yFu3wmGWYJHoAtvFi2xeRtAXurNuPtjZyO+gfM9 +BKTRCkGsRSmPpJyGbU2Q96fjxnVfV9oYvQXeugUcSx/pTUCM/kDgD9QZCxG2rflX +NWcqDFY3uO6ZR68Qwi/KouOa8rzrgAcwhFUI6Wz0Zwi1rzRtWK5WqC24aBUYz/tK +hl8i88UDXSMh7spChdYDBGLhZyUCAwEAAaMwMC4wLAYDVR0RBCUwI4IJbG9jYWxo +b3N0hwR/AAABhxAAAAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUAA4IBAQBj ++U8tebwg5/pof5Rht6TMHqeg6Fcr4OJkL2ph2g+T/AMTS7kEGeFIKJN5AZ+S/qIY +cdoDKHwc8+bCK/mG6DPmJ4z/2Eamb85YhplOLVrLRwfxRebTK9CtnjcjnflAiU9H +7vPVwXIvkwebhBSQNKTdkBlPXKaTNWXuygeFG2OVQkPf/KAxSdtg2R+owv/s802Z +HISk26wY9oFIQz6AiXWdrY1QqNOltZ7rlU5iofAH7X+9ryZlxPWj/gHg2YQRvvLl +dq6nCF+ED0ke7h0lg5nU0beKEygwli8DlLVbu0JK0PkARFp5t7wUtzC9DCjzvfOc +gxR44PyZX7/2oaTDm4PS -----END CERTIFICATE----- diff --git a/tests/test-utils.c b/tests/test-utils.c index bc160aea..9c742060 100644 --- a/tests/test-utils.c +++ b/tests/test-utils.c @@ -66,6 +66,7 @@ test_init (int argc, char **argv, GOptionEntry *entries) setlocale (LC_ALL, ""); g_setenv ("GSETTINGS_BACKEND", "memory", TRUE); g_setenv ("GIO_USE_PROXY_RESOLVER", "dummy", TRUE); + g_setenv ("GIO_USE_VFS", "local", TRUE); name = strrchr (argv[0], '/'); if (!name++) @@ -228,18 +229,31 @@ soup_test_session_new (GType type, ...) va_list args; const char *propname; SoupSession *session; + GTlsDatabase *tlsdb; char *cafile; + GError *error = NULL; va_start (args, type); propname = va_arg (args, const char *); session = (SoupSession *)g_object_new_valist (type, propname, args); va_end (args); - cafile = g_test_build_filename (G_TEST_DIST, "test-cert.pem", NULL); - g_object_set (G_OBJECT (session), - SOUP_SESSION_SSL_CA_FILE, cafile, - NULL); - g_free (cafile); + if (tls_available) { + cafile = g_test_build_filename (G_TEST_DIST, "test-cert.pem", NULL); + tlsdb = g_tls_file_database_new (cafile, &error); + g_free (cafile); + if (error) { + if (g_strcmp0 (g_getenv ("GIO_USE_TLS"), "dummy") == 0) + g_clear_error (&error); + else + g_assert_no_error (error); + } + + g_object_set (G_OBJECT (session), + SOUP_SESSION_TLS_DATABASE, tlsdb, + NULL); + g_clear_object (&tlsdb); + } if (http_debug_level && !logger) { SoupLoggerLogLevel level = MIN ((SoupLoggerLogLevel)http_debug_level, SOUP_LOGGER_LOG_BODY); @@ -262,79 +276,240 @@ soup_test_session_abort_unref (SoupSession *session) g_object_unref (session); } -static gpointer run_server_thread (gpointer user_data); +static void +server_listen (SoupServer *server) +{ + GError *error = NULL; + + soup_server_listen_local (server, 0, 0, &error); + if (error) { + g_printerr ("Unable to create server: %s\n", error->message); + exit (1); + } +} + +static GMutex server_start_mutex; +static GCond server_start_cond; -static SoupServer * -test_server_new (gboolean in_own_thread, gboolean ssl) +static gpointer +run_server_thread (gpointer user_data) +{ + SoupServer *server = user_data; + SoupTestServerOptions options = + GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (server), "options")); + GMainContext *context; + GMainLoop *loop; + + context = g_main_context_new (); + g_main_context_push_thread_default (context); + loop = g_main_loop_new (context, FALSE); + g_object_set_data (G_OBJECT (server), "GMainLoop", loop); + + if (!(options & SOUP_TEST_SERVER_NO_DEFAULT_LISTENER)) + server_listen (server); + + g_mutex_lock (&server_start_mutex); + g_cond_signal (&server_start_cond); + g_mutex_unlock (&server_start_mutex); + + g_main_loop_run (loop); + g_main_loop_unref (loop); + + soup_server_disconnect (server); + + g_main_context_pop_thread_default (context); + g_main_context_unref (context); + + return NULL; +} + +SoupServer * +soup_test_server_new (SoupTestServerOptions options) { SoupServer *server; - GMainContext *async_context; - char *ssl_cert_file, *ssl_key_file; - SoupAddress *addr; + GTlsCertificate *cert = NULL; + GError *error = NULL; - async_context = in_own_thread ? g_main_context_new () : NULL; + if (tls_available) { + char *ssl_cert_file, *ssl_key_file; - if (ssl) { ssl_cert_file = g_test_build_filename (G_TEST_DIST, "test-cert.pem", NULL); ssl_key_file = g_test_build_filename (G_TEST_DIST, "test-key.pem", NULL); - } else - ssl_cert_file = ssl_key_file = NULL; - - addr = soup_address_new ("127.0.0.1", SOUP_ADDRESS_ANY_PORT); - soup_address_resolve_sync (addr, NULL); + cert = g_tls_certificate_new_from_files (ssl_cert_file, + ssl_key_file, + &error); + g_free (ssl_cert_file); + g_free (ssl_key_file); + if (error) { + g_printerr ("Unable to create server: %s\n", error->message); + exit (1); + } + } - server = soup_server_new (SOUP_SERVER_INTERFACE, addr, - SOUP_SERVER_ASYNC_CONTEXT, async_context, - SOUP_SERVER_SSL_CERT_FILE, ssl_cert_file, - SOUP_SERVER_SSL_KEY_FILE, ssl_key_file, + server = soup_server_new (SOUP_SERVER_TLS_CERTIFICATE, cert, NULL); - g_object_unref (addr); - if (async_context) - g_main_context_unref (async_context); - g_free (ssl_cert_file); - g_free (ssl_key_file); - - if (!server) { - g_printerr ("Unable to create server\n"); - exit (1); - } + g_clear_object (&cert); + + g_object_set_data (G_OBJECT (server), "options", GUINT_TO_POINTER (options)); - if (in_own_thread) { + if (options & SOUP_TEST_SERVER_IN_THREAD) { GThread *thread; + g_mutex_lock (&server_start_mutex); + thread = g_thread_new ("server_thread", run_server_thread, server); + g_cond_wait (&server_start_cond, &server_start_mutex); + g_mutex_unlock (&server_start_mutex); + g_object_set_data (G_OBJECT (server), "thread", thread); - } else - soup_server_run_async (server); + } else if (!(options & SOUP_TEST_SERVER_NO_DEFAULT_LISTENER)) + server_listen (server); return server; } -SoupServer * -soup_test_server_new (gboolean in_own_thread) +static SoupURI * +find_server_uri (SoupServer *server, const char *scheme, const char *host) +{ + GSList *uris, *u; + SoupURI *uri, *ret_uri = NULL; + + uris = soup_server_get_uris (server); + for (u = uris; u; u = u->next) { + uri = u->data; + + if (scheme && strcmp (uri->scheme, scheme) != 0) + continue; + if (host && strcmp (uri->host, host) != 0) + continue; + + ret_uri = soup_uri_copy (uri); + break; + } + g_slist_free_full (uris, (GDestroyNotify)soup_uri_free); + + return ret_uri; +} + +static SoupURI * +add_listener (SoupServer *server, const char *scheme, const char *host) { - return test_server_new (in_own_thread, FALSE); + SoupServerListenOptions options = 0; + GError *error = NULL; + + if (!g_strcmp0 (scheme, SOUP_URI_SCHEME_HTTPS)) + options |= SOUP_SERVER_LISTEN_HTTPS; + if (!g_strcmp0 (host, "127.0.0.1")) + options |= SOUP_SERVER_LISTEN_IPV4_ONLY; + else if (!g_strcmp0 (host, "::1")) + options |= SOUP_SERVER_LISTEN_IPV6_ONLY; + + soup_server_listen_local (server, 0, options, &error); + g_assert_no_error (error); + + return find_server_uri (server, scheme, host); } -SoupServer * -soup_test_server_new_ssl (gboolean in_own_thread) +typedef struct { + GMutex mutex; + GCond cond; + + SoupServer *server; + const char *scheme; + const char *host; + + SoupURI *uri; +} AddListenerData; + +static gboolean +add_listener_in_thread (gpointer user_data) { - return test_server_new (in_own_thread, TRUE); + AddListenerData *data = user_data; + + data->uri = add_listener (data->server, data->scheme, data->host); + g_mutex_lock (&data->mutex); + g_cond_signal (&data->cond); + g_mutex_unlock (&data->mutex); + + return FALSE; } -static gpointer -run_server_thread (gpointer user_data) +SoupURI * +soup_test_server_get_uri (SoupServer *server, + const char *scheme, + const char *host) { - SoupServer *server = user_data; + SoupURI *uri; + GMainLoop *loop; - soup_server_run (server); - return NULL; + uri = find_server_uri (server, scheme, host); + if (uri) + return uri; + + /* Need to add a new listener */ + loop = g_object_get_data (G_OBJECT (server), "GMainLoop"); + if (loop) { + GMainContext *context = g_main_loop_get_context (loop); + AddListenerData data; + + g_mutex_init (&data.mutex); + g_cond_init (&data.cond); + data.server = server; + data.scheme = scheme; + data.host = host; + data.uri = NULL; + + g_mutex_lock (&data.mutex); + soup_add_completion (context, add_listener_in_thread, &data); + + while (!data.uri) + g_cond_wait (&data.cond, &data.mutex); + + g_mutex_unlock (&data.mutex); + g_mutex_clear (&data.mutex); + g_cond_clear (&data.cond); + uri = data.uri; + } else + uri = add_listener (server, scheme, host); + + return uri; } static gboolean -idle_quit_server (gpointer server) +done_waiting (gpointer user_data) { - soup_server_quit (server); + gboolean *done = user_data; + + *done = TRUE; + return FALSE; +} + +static void +disconnect_and_wait (SoupServer *server, + GMainContext *context) +{ + GSource *source; + gboolean done = FALSE; + + source = g_idle_source_new (); + g_source_set_priority (source, G_PRIORITY_LOW); + g_source_set_callback (source, done_waiting, &done, NULL); + g_source_attach (source, context); + g_source_unref (source); + + soup_server_disconnect (server); + while (!done) + g_main_context_iteration (context, TRUE); +} + +static gboolean +idle_quit_server (gpointer user_data) +{ + SoupServer *server = user_data; + GMainLoop *loop = g_object_get_data (G_OBJECT (server), "GMainLoop"); + + disconnect_and_wait (server, g_main_loop_get_context (loop)); + g_main_loop_quit (loop); return FALSE; } @@ -345,11 +520,17 @@ soup_test_server_quit_unref (SoupServer *server) thread = g_object_get_data (G_OBJECT (server), "thread"); if (thread) { - soup_add_completion (soup_server_get_async_context (server), - idle_quit_server, server); + GMainLoop *loop; + GMainContext *context; + + loop = g_object_get_data (G_OBJECT (server), "GMainLoop"); + context = g_main_loop_get_context (loop); + g_main_context_ref (context); + soup_add_completion (context, idle_quit_server, server); + g_main_context_unref (context); g_thread_join (thread); } else - soup_server_quit (server); + disconnect_and_wait (server, NULL); g_assert_cmpint (G_OBJECT (server)->ref_count, ==, 1); g_object_unref (server); @@ -400,7 +581,7 @@ create_cancel_data (SoupRequest *req, return cancel_data; } -static void inline +inline static void cancel_message_or_cancellable (CancelData *cancel_data) { if (cancel_data->flags & SOUP_TEST_REQUEST_CANCEL_MESSAGE) { @@ -461,7 +642,7 @@ soup_test_request_send (SoupRequest *req, g_timeout_add_full (G_PRIORITY_HIGH, interval, cancel_request_timeout, cancel_data, NULL); } if (cancel_data && (flags & SOUP_TEST_REQUEST_CANCEL_PREEMPTIVE)) - g_cancellable_cancel (cancellable); + cancel_message_or_cancellable (cancel_data); soup_request_send_async (req, cancellable, async_as_sync_callback, &data); g_main_loop_run (data.loop); diff --git a/tests/test-utils.h b/tests/test-utils.h index 03637dcf..0bc065fc 100644 --- a/tests/test-utils.h +++ b/tests/test-utils.h @@ -52,12 +52,25 @@ typedef enum { SOUP_TEST_REQUEST_CANCEL_AFTER_SEND_FINISH = (1 << 5), } SoupTestRequestFlags; +#undef SOUP_TYPE_SESSION_ASYNC +#define SOUP_TYPE_SESSION_ASYNC (_soup_session_async_get_type_undeprecated ()) +#undef SOUP_TYPE_SESSION_SYNC +#define SOUP_TYPE_SESSION_SYNC (_soup_session_sync_get_type_undeprecated ()) + SoupSession *soup_test_session_new (GType type, ...); void soup_test_session_abort_unref (SoupSession *session); -SoupServer *soup_test_server_new (gboolean in_own_thread); -SoupServer *soup_test_server_new_ssl (gboolean in_own_thread); -void soup_test_server_quit_unref (SoupServer *server); +typedef enum { + SOUP_TEST_SERVER_DEFAULT = 0, + SOUP_TEST_SERVER_IN_THREAD = (1 << 0), + SOUP_TEST_SERVER_NO_DEFAULT_LISTENER = (1 << 1) +} SoupTestServerOptions; + +SoupServer *soup_test_server_new (SoupTestServerOptions options); +SoupURI *soup_test_server_get_uri (SoupServer *server, + const char *scheme, + const char *host); +void soup_test_server_quit_unref (SoupServer *server); GInputStream *soup_test_request_send (SoupRequest *req, GCancellable *cancellable, diff --git a/tests/timeout-test.c b/tests/timeout-test.c index 81fb4331..96505e9b 100644 --- a/tests/timeout-test.c +++ b/tests/timeout-test.c @@ -22,7 +22,7 @@ request_started_cb (SoupSession *session, SoupMessage *msg, } static void -do_message_to_session (SoupSession *session, const char *uri, +do_message_to_session (SoupSession *session, SoupURI *uri, const char *comment, guint expected_status) { SoupMessage *msg; @@ -30,7 +30,7 @@ do_message_to_session (SoupSession *session, const char *uri, if (comment) debug_printf (1, " msg %s\n", comment); - msg = soup_message_new ("GET", uri); + msg = soup_message_new_from_uri ("GET", uri); g_signal_connect (msg, "finished", G_CALLBACK (message_finished), &finished); @@ -51,11 +51,11 @@ static void do_msg_tests_for_session (SoupSession *timeout_session, SoupSession *idle_session, SoupSession *plain_session, - const char *fast_uri, - const char *slow_uri) + SoupURI *fast_uri, + SoupURI *slow_uri) { - SoupSocket *ret, *idle_first, *idle_second; - SoupSocket *plain_first, *plain_second; + SoupSocket *ret, *idle_first = NULL, *idle_second; + SoupSocket *plain_first = NULL, *plain_second; if (idle_session) { g_signal_connect (idle_session, "request-started", @@ -100,7 +100,7 @@ do_msg_tests_for_session (SoupSession *timeout_session, } static void -do_request_to_session (SoupSession *session, const char *uri, +do_request_to_session (SoupSession *session, SoupURI *uri, const char *comment, gboolean expect_timeout) { SoupRequest *req; @@ -110,7 +110,7 @@ do_request_to_session (SoupSession *session, const char *uri, gboolean finished = FALSE; debug_printf (1, " req %s\n", comment); - req = soup_session_request (session, uri, NULL); + req = soup_session_request_uri (session, uri, NULL); msg = soup_request_http_get_message (SOUP_REQUEST_HTTP (req)); g_signal_connect (msg, "finished", @@ -149,11 +149,11 @@ static void do_req_tests_for_session (SoupSession *timeout_session, SoupSession *idle_session, SoupSession *plain_session, - const char *fast_uri, - const char *slow_uri) + SoupURI *fast_uri, + SoupURI *slow_uri) { - SoupSocket *ret, *idle_first, *idle_second; - SoupSocket *plain_first, *plain_second; + SoupSocket *ret, *idle_first = NULL, *idle_second; + SoupSocket *plain_first = NULL, *plain_second; if (idle_session) { g_signal_connect (idle_session, "request-started", @@ -201,11 +201,11 @@ static void do_async_timeout_tests (gconstpointer data) { SoupSession *timeout_session, *idle_session, *plain_session; - const char *fast_uri = data; - const char *slow_uri = g_build_path ("/", fast_uri, "slow", NULL); + SoupURI *fast_uri = (SoupURI *)data; + SoupURI *slow_uri = soup_uri_new_with_base (fast_uri, "/slow"); gboolean extra_slow; - if (g_str_has_prefix (fast_uri, "https")) { + if (fast_uri->scheme == SOUP_URI_SCHEME_HTTPS) { SOUP_TEST_SKIP_IF_NO_TLS; extra_slow = slow_https; @@ -236,17 +236,19 @@ do_async_timeout_tests (gconstpointer data) soup_test_session_abort_unref (timeout_session); soup_test_session_abort_unref (idle_session); soup_test_session_abort_unref (plain_session); + + soup_uri_free (slow_uri); } static void do_sync_timeout_tests (gconstpointer data) { SoupSession *timeout_session, *plain_session; - const char *fast_uri = data; - const char *slow_uri = g_build_path ("/", fast_uri, "slow", NULL); + SoupURI *fast_uri = (SoupURI *)data; + SoupURI *slow_uri = soup_uri_new_with_base (fast_uri, "/slow"); gboolean extra_slow; - if (g_str_has_prefix (fast_uri, "https")) { + if (fast_uri->scheme == SOUP_URI_SCHEME_HTTPS) { SOUP_TEST_SKIP_IF_NO_TLS; extra_slow = slow_https; @@ -263,6 +265,8 @@ do_sync_timeout_tests (gconstpointer data) do_req_tests_for_session (timeout_session, NULL, plain_session, fast_uri, slow_uri); soup_test_session_abort_unref (timeout_session); soup_test_session_abort_unref (plain_session); + + soup_uri_free (slow_uri); } static gboolean @@ -290,7 +294,7 @@ server_handler (SoupServer *server, if (!strcmp (path, "/slow")) { soup_server_pause_message (server, msg); g_object_set_data (G_OBJECT (msg), "server", server); - soup_add_timeout (soup_server_get_async_context (server), + soup_add_timeout (g_main_context_get_thread_default (), 4000, timeout_finish_message, msg); } } @@ -299,24 +303,22 @@ int main (int argc, char **argv) { SoupServer *server, *https_server = NULL; - char *uri, *https_uri = NULL; + SoupURI *uri, *https_uri = NULL; int ret; test_init (argc, argv, NULL); server = soup_test_server_new (TRUE); soup_server_add_handler (server, NULL, server_handler, NULL, NULL); - uri = g_strdup_printf ("http://127.0.0.1:%u/", - soup_server_get_port (server)); + uri = soup_test_server_get_uri (server, "http", NULL); if (tls_available) { SoupSession *test_session; gint64 start, end; - https_server = soup_test_server_new_ssl (TRUE); + https_server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); soup_server_add_handler (https_server, NULL, server_handler, NULL, NULL); - https_uri = g_strdup_printf ("https://127.0.0.1:%u/", - soup_server_get_port (https_server)); + https_uri = soup_test_server_get_uri (server, "https", "127.0.0.1"); /* The 1-second timeouts are too fast for some machines... */ test_session = soup_test_session_new (SOUP_TYPE_SESSION, NULL); @@ -333,7 +335,7 @@ main (int argc, char **argv) slow_https = FALSE; } } else - https_uri = g_strdup ("https://fail."); + https_uri = soup_uri_new ("https://fail."); g_test_add_data_func ("/timeout/http/async", uri, do_async_timeout_tests); g_test_add_data_func ("/timeout/http/sync", uri, do_sync_timeout_tests); @@ -342,8 +344,8 @@ main (int argc, char **argv) ret = g_test_run (); - g_free (uri); - g_free (https_uri); + soup_uri_free (uri); + soup_uri_free (https_uri); soup_test_server_quit_unref (server); if (https_server) soup_test_server_quit_unref (https_server); diff --git a/tests/tld-test.c b/tests/tld-test.c index 4fad8625..31cbb4b8 100644 --- a/tests/tld-test.c +++ b/tests/tld-test.c @@ -38,10 +38,10 @@ static struct { { "a.b.example.uk.com", "example.uk.com", -1 }, { "test.ac", "test.ac", -1 }, /* TLD with only 1 (wildcard) rule. */ - { "cy", NULL, SOUP_TLD_ERROR_NOT_ENOUGH_DOMAINS }, - { "c.cy", NULL, SOUP_TLD_ERROR_NOT_ENOUGH_DOMAINS }, - { "b.c.cy", "b.c.cy", -1 }, - { "a.b.c.cy", "b.c.cy", -1 }, + { "bn", NULL, SOUP_TLD_ERROR_NOT_ENOUGH_DOMAINS }, + { "c.bn", NULL, SOUP_TLD_ERROR_NOT_ENOUGH_DOMAINS }, + { "b.c.bn", "b.c.bn", -1 }, + { "a.b.c.bn", "b.c.bn", -1 }, /* More complex TLD. */ { "jp", NULL, SOUP_TLD_ERROR_NOT_ENOUGH_DOMAINS }, { "test.jp", "test.jp", -1 }, diff --git a/tests/uri-parsing.c b/tests/uri-parsing.c index d56b655f..85f09b9e 100644 --- a/tests/uri-parsing.c +++ b/tests/uri-parsing.c @@ -151,7 +151,11 @@ static struct { { "http://[fe80::dead:beef%25em1]/", "http://[fe80::dead:beef%25em1]/", NULL, { "http", NULL, NULL, "fe80::dead:beef%em1", 80, "/", NULL, NULL } }, { "http://[fe80::dead:beef%10]/", "http://[fe80::dead:beef%2510]/", NULL, - { "http", NULL, NULL, "fe80::dead:beef%10", 80, "/", NULL, NULL } } + { "http", NULL, NULL, "fe80::dead:beef%10", 80, "/", NULL, NULL } }, + + /* ".." past top */ + { "http://example.com/..", "http://example.com/", "785042", + { "http", NULL, NULL, "example.com", 80, "/", NULL, NULL } }, }; static int num_abs_tests = G_N_ELEMENTS(abs_tests); @@ -493,6 +497,72 @@ do_normalization_tests (void) } } +typedef struct { + const char *uri; + const char *mime_type; + const char *body; +} DataURITest; + +static const DataURITest data_tests[] = { + { "data:text/plain,foo%20bar", + "text/plain", + "foo bar" }, + { "data:text/plain;charset=utf-8,foo%20bar", + "text/plain;charset=utf-8", + "foo bar" }, + { "data:text/plain;base64,Zm9vIGJhcg==", + "text/plain", + "foo bar" }, + { "data:,foo%20bar", + "text/plain;charset=US-ASCII", + "foo bar" }, + { "data:;base64,Zm9vIGJhcg==", + "text/plain;charset=US-ASCII", + "foo bar" }, + { "data:,", + "text/plain;charset=US-ASCII", + "" }, + { "data:text/plain,", + "text/plain", + "" } +}; + +static void +do_data_tests (void) +{ + SoupSession *session; + SoupRequest *req; + GInputStream *stream; + char buf[128]; + gsize nread; + int i; + GError *error = NULL; + + session = soup_test_session_new (SOUP_TYPE_SESSION, NULL); + for (i = 0; i < G_N_ELEMENTS (data_tests); i++) { + req = soup_session_request (session, data_tests[i].uri, &error); + g_assert_no_error (error); + + stream = soup_request_send (req, NULL, &error); + g_assert_no_error (error); + + g_input_stream_read_all (stream, buf, sizeof (buf), &nread, NULL, &error); + + g_assert_no_error (error); + g_assert_cmpint (nread, ==, strlen (data_tests[i].body)); + buf[nread] = 0; + g_assert_cmpstr (buf, ==, data_tests[i].body); + + g_assert_cmpstr (soup_request_get_content_type (req), ==, data_tests[i].mime_type); + + g_input_stream_close (stream, NULL, &error); + g_assert_no_error (error); + g_object_unref (stream); + g_object_unref (req); + } + soup_test_session_abort_unref (session); +} + int main (int argc, char **argv) { @@ -505,6 +575,7 @@ main (int argc, char **argv) g_test_add_func ("/uri/equality", do_equality_tests); g_test_add_func ("/uri/null", do_soup_uri_null_tests); g_test_add_func ("/uri/normalization", do_normalization_tests); + g_test_add_func ("/uri/data", do_data_tests); ret = g_test_run (); diff --git a/tests/websocket-test.c b/tests/websocket-test.c new file mode 100644 index 00000000..722ccbdf --- /dev/null +++ b/tests/websocket-test.c @@ -0,0 +1,971 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * This file was originally part of Cockpit. + * + * Copyright (C) 2013 Red Hat, Inc. + * + * Cockpit is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * Cockpit 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Cockpit; If not, see . + */ + +#include "test-utils.h" + +typedef struct { + GSocket *listener; + gushort port; + + SoupSession *session; + SoupMessage *msg; + SoupWebsocketConnection *client; + GError *client_error; + + SoupServer *soup_server; + SoupWebsocketConnection *server; + + gboolean no_server; + GIOStream *raw_server; + + GMutex mutex; +} Test; + +#define WAIT_UNTIL(cond) \ + G_STMT_START \ + while (!(cond)) g_main_context_iteration (NULL, TRUE); \ + G_STMT_END + +static void +on_error_not_reached (SoupWebsocketConnection *ws, + GError *error, + gpointer user_data) +{ + /* At this point we know this will fail, but is informative */ + g_assert_no_error (error); +} + +static void +on_error_copy (SoupWebsocketConnection *ws, + GError *error, + gpointer user_data) +{ + GError **copy = user_data; + g_assert (*copy == NULL); + *copy = g_error_copy (error); +} + +static void +setup_listener (Test *test) +{ + GSocketAddress *addr; + GError *error = NULL; + + test->listener = g_socket_new (G_SOCKET_FAMILY_IPV4, + G_SOCKET_TYPE_STREAM, + G_SOCKET_PROTOCOL_TCP, + &error); + g_assert_no_error (error); + + addr = g_inet_socket_address_new_from_string ("127.0.0.1", 0); + g_assert_no_error (error); + + g_socket_bind (test->listener, addr, TRUE, &error); + g_assert_no_error (error); + g_object_unref (addr); + + addr = g_socket_get_local_address (test->listener, &error); + g_assert_no_error (error); + + test->port = g_inet_socket_address_get_port (G_INET_SOCKET_ADDRESS (addr)); + g_object_unref (addr); + + g_socket_listen (test->listener, &error); + g_assert_no_error (error); +} + +static void +direct_connection_complete (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + Test *test = user_data; + GSocketConnection *conn; + SoupURI *uri; + GError *error = NULL; + + conn = g_socket_client_connect_to_host_finish (G_SOCKET_CLIENT (object), + result, &error); + g_assert_no_error (error); + + uri = soup_uri_new ("http://127.0.0.1/"); + test->client = soup_websocket_connection_new (G_IO_STREAM (conn), uri, + SOUP_WEBSOCKET_CONNECTION_CLIENT, + NULL, NULL); + soup_uri_free (uri); + g_object_unref (conn); +} + +static gboolean +got_connection (GSocket *listener, + GIOCondition cond, + gpointer user_data) +{ + Test *test = user_data; + GSocket *sock; + GSocketConnection *conn; + SoupURI *uri; + GError *error = NULL; + + sock = g_socket_accept (listener, NULL, &error); + g_assert_no_error (error); + + conn = g_socket_connection_factory_create_connection (sock); + g_assert (conn != NULL); + g_object_unref (sock); + + if (test->no_server) + test->raw_server = G_IO_STREAM (conn); + else { + uri = soup_uri_new ("http://127.0.0.1/"); + test->server = soup_websocket_connection_new (G_IO_STREAM (conn), uri, + SOUP_WEBSOCKET_CONNECTION_SERVER, + NULL, NULL); + soup_uri_free (uri); + g_object_unref (conn); + } + + return FALSE; +} + +static void +setup_direct_connection (Test *test, + gconstpointer data) +{ + GSocketClient *client; + GSource *listen_source; + + setup_listener (test); + + client = g_socket_client_new (); + g_socket_client_connect_to_host_async (client, "127.0.0.1", test->port, + NULL, direct_connection_complete, test); + + listen_source = g_socket_create_source (test->listener, G_IO_IN, NULL); + g_source_set_callback (listen_source, (GSourceFunc) got_connection, test, NULL); + g_source_attach (listen_source, NULL); + + while (test->client == NULL || (test->server == NULL && test->raw_server == NULL)) + g_main_context_iteration (NULL, TRUE); + + g_source_destroy (listen_source); + g_source_unref (listen_source); + g_object_unref (client); +} + +static void +setup_half_direct_connection (Test *test, + gconstpointer data) +{ + test->no_server = TRUE; + setup_direct_connection (test, data); +} + +static void +teardown_direct_connection (Test *test, + gconstpointer data) +{ + g_clear_object (&test->listener); + g_clear_object (&test->client); + g_clear_object (&test->server); + g_clear_object (&test->raw_server); +} + +static void +setup_soup_server (Test *test, + const char *origin, + const char **protocols, + SoupServerWebsocketCallback callback, + gpointer user_data) +{ + GError *error = NULL; + + setup_listener (test); + + test->soup_server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); + soup_server_listen_socket (test->soup_server, test->listener, 0, &error); + g_assert_no_error (error); + + soup_server_add_websocket_handler (test->soup_server, "/unix", + origin, (char **) protocols, + callback, user_data, NULL); +} + +static void +client_connect (Test *test, + const char *origin, + const char **protocols, + GAsyncReadyCallback callback, + gpointer user_data) +{ + char *url; + + if (!test->session) + test->session = soup_test_session_new (SOUP_TYPE_SESSION, NULL); + + url = g_strdup_printf ("ws://127.0.0.1:%u/unix", test->port); + test->msg = soup_message_new ("GET", url); + g_free (url); + + soup_session_websocket_connect_async (test->session, test->msg, + origin, (char **) protocols, + NULL, callback, user_data); +} + +static void +got_server_connection (SoupServer *server, + SoupWebsocketConnection *connection, + const char *path, + SoupClientContext *client, + gpointer user_data) +{ + Test *test = user_data; + + test->server = g_object_ref (connection); +} + +static void +got_client_connection (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + Test *test = user_data; + + test->client = soup_session_websocket_connect_finish (SOUP_SESSION (object), + result, &test->client_error); +} + +static void +setup_soup_connection (Test *test, + gconstpointer data) +{ + setup_soup_server (test, NULL, NULL, got_server_connection, test); + client_connect (test, NULL, NULL, got_client_connection, test); + WAIT_UNTIL (test->server != NULL); + WAIT_UNTIL (test->client != NULL || test->client_error != NULL); + g_assert_no_error (test->client_error); +} + +static void +teardown_soup_connection (Test *test, + gconstpointer data) +{ + teardown_direct_connection (test, data); + + g_clear_object (&test->msg); + g_clear_error (&test->client_error); + g_clear_pointer (&test->session, soup_test_session_abort_unref); + g_clear_pointer (&test->soup_server, soup_test_server_quit_unref); +} + + +static void +on_text_message (SoupWebsocketConnection *ws, + SoupWebsocketDataType type, + GBytes *message, + gpointer user_data) +{ + GBytes **receive = user_data; + + g_assert_cmpint (type, ==, SOUP_WEBSOCKET_DATA_TEXT); + g_assert (*receive == NULL); + g_assert (message != NULL); + + *receive = g_bytes_ref (message); +} + +static void +on_close_set_flag (SoupWebsocketConnection *ws, + gpointer user_data) +{ + gboolean *flag = user_data; + + g_assert (*flag == FALSE); + + *flag = TRUE; +} + + +static void +test_handshake (Test *test, + gconstpointer data) +{ + g_assert_cmpint (soup_websocket_connection_get_state (test->client), ==, SOUP_WEBSOCKET_STATE_OPEN); + g_assert_cmpint (soup_websocket_connection_get_state (test->server), ==, SOUP_WEBSOCKET_STATE_OPEN); +} + +#define TEST_STRING "this is a test" + +static void +test_send_client_to_server (Test *test, + gconstpointer data) +{ + GBytes *received = NULL; + const char *contents; + gsize len; + + g_signal_connect (test->server, "message", G_CALLBACK (on_text_message), &received); + + soup_websocket_connection_send_text (test->client, TEST_STRING); + + WAIT_UNTIL (received != NULL); + + /* Received messages should be null terminated (outside of len) */ + contents = g_bytes_get_data (received, &len); + g_assert_cmpstr (contents, ==, TEST_STRING); + g_assert_cmpint (len, ==, strlen (TEST_STRING)); + + g_bytes_unref (received); +} + +static void +test_send_server_to_client (Test *test, + gconstpointer data) +{ + GBytes *received = NULL; + const char *contents; + gsize len; + + g_signal_connect (test->client, "message", G_CALLBACK (on_text_message), &received); + + soup_websocket_connection_send_text (test->server, TEST_STRING); + + WAIT_UNTIL (received != NULL); + + /* Received messages should be null terminated (outside of len) */ + contents = g_bytes_get_data (received, &len); + g_assert_cmpstr (contents, ==, TEST_STRING); + g_assert_cmpint (len, ==, strlen (TEST_STRING)); + + g_bytes_unref (received); +} + +static void +test_send_big_packets (Test *test, + gconstpointer data) +{ + GBytes *sent = NULL; + GBytes *received = NULL; + + g_signal_connect (test->client, "message", G_CALLBACK (on_text_message), &received); + + sent = g_bytes_new_take (g_strnfill (400, '!'), 400); + soup_websocket_connection_send_text (test->server, g_bytes_get_data (sent, NULL)); + WAIT_UNTIL (received != NULL); + g_assert (g_bytes_equal (sent, received)); + g_bytes_unref (sent); + g_bytes_unref (received); + received = NULL; + + sent = g_bytes_new_take (g_strnfill (100 * 1000, '?'), 100 * 1000); + soup_websocket_connection_send_text (test->server, g_bytes_get_data (sent, NULL)); + WAIT_UNTIL (received != NULL); + g_assert (g_bytes_equal (sent, received)); + g_bytes_unref (sent); + g_bytes_unref (received); + received = NULL; + + soup_websocket_connection_set_max_incoming_payload_size (test->client, 1000 * 1000 + 1); + g_assert (soup_websocket_connection_get_max_incoming_payload_size (test->client) == (1000 * 1000 + 1)); + soup_websocket_connection_set_max_incoming_payload_size (test->server, 1000 * 1000 + 1); + g_assert (soup_websocket_connection_get_max_incoming_payload_size (test->server) == (1000 * 1000 + 1)); + + sent = g_bytes_new_take (g_strnfill (1000 * 1000, '?'), 1000 * 1000); + soup_websocket_connection_send_text (test->server, g_bytes_get_data (sent, NULL)); + WAIT_UNTIL (received != NULL); + g_assert (g_bytes_equal (sent, received)); + g_bytes_unref (sent); + g_bytes_unref (received); +} + +static void +test_send_bad_data (Test *test, + gconstpointer unused) +{ + GError *error = NULL; + GIOStream *io; + gsize written; + const char *frame; + + g_signal_handlers_disconnect_by_func (test->server, on_error_not_reached, NULL); + g_signal_connect (test->server, "error", G_CALLBACK (on_error_copy), &error); + + io = soup_websocket_connection_get_io_stream (test->client); + + /* Bad UTF-8 frame */ + frame = "\x81\x04\xEE\xEE\xEE\xEE"; + if (!g_output_stream_write_all (g_io_stream_get_output_stream (io), + frame, 6, &written, NULL, NULL)) + g_assert_not_reached (); + g_assert_cmpuint (written, ==, 6); + + WAIT_UNTIL (error != NULL); + g_assert_error (error, SOUP_WEBSOCKET_ERROR, SOUP_WEBSOCKET_CLOSE_BAD_DATA); + g_clear_error (&error); + + WAIT_UNTIL (soup_websocket_connection_get_state (test->client) == SOUP_WEBSOCKET_STATE_CLOSED); + + g_assert_cmpuint (soup_websocket_connection_get_close_code (test->client), ==, SOUP_WEBSOCKET_CLOSE_BAD_DATA); +} + +static const char *negotiate_client_protocols[] = { "bbb", "ccc", NULL }; +static const char *negotiate_server_protocols[] = { "aaa", "bbb", "ccc", NULL }; +static const char *negotiated_protocol = "bbb"; + +static void +test_protocol_negotiate_direct (Test *test, + gconstpointer unused) +{ + SoupMessage *msg; + gboolean ok; + const char *protocol; + GError *error = NULL; + + msg = soup_message_new ("GET", "http://127.0.0.1"); + soup_websocket_client_prepare_handshake (msg, NULL, + (char **) negotiate_client_protocols); + + ok = soup_websocket_server_check_handshake (msg, NULL, + (char **) negotiate_server_protocols, + &error); + g_assert_no_error (error); + g_assert_true (ok); + + ok = soup_websocket_server_process_handshake (msg, NULL, + (char **) negotiate_server_protocols); + g_assert_true (ok); + + protocol = soup_message_headers_get_one (msg->response_headers, "Sec-WebSocket-Protocol"); + g_assert_cmpstr (protocol, ==, negotiated_protocol); + + ok = soup_websocket_client_verify_handshake (msg, &error); + g_assert_no_error (error); + g_assert_true (ok); + + g_object_unref (msg); +} + +static void +test_protocol_negotiate_soup (Test *test, + gconstpointer unused) +{ + setup_soup_server (test, NULL, negotiate_server_protocols, got_server_connection, test); + client_connect (test, NULL, negotiate_client_protocols, got_client_connection, test); + WAIT_UNTIL (test->server != NULL); + WAIT_UNTIL (test->client != NULL || test->client_error != NULL); + g_assert_no_error (test->client_error); + + g_assert_cmpstr (soup_websocket_connection_get_protocol (test->client), ==, negotiated_protocol); + g_assert_cmpstr (soup_websocket_connection_get_protocol (test->server), ==, negotiated_protocol); +} + +static const char *mismatch_client_protocols[] = { "ddd", NULL }; +static const char *mismatch_server_protocols[] = { "aaa", "bbb", "ccc", NULL }; + +static void +test_protocol_mismatch_direct (Test *test, + gconstpointer unused) +{ + SoupMessage *msg; + gboolean ok; + const char *protocol; + GError *error = NULL; + + msg = soup_message_new ("GET", "http://127.0.0.1"); + soup_websocket_client_prepare_handshake (msg, NULL, + (char **) mismatch_client_protocols); + + ok = soup_websocket_server_check_handshake (msg, NULL, + (char **) mismatch_server_protocols, + &error); + g_assert_error (error, SOUP_WEBSOCKET_ERROR, SOUP_WEBSOCKET_ERROR_BAD_HANDSHAKE); + g_clear_error (&error); + g_assert_false (ok); + + ok = soup_websocket_server_process_handshake (msg, NULL, + (char **) mismatch_server_protocols); + g_assert_false (ok); + soup_test_assert_message_status (msg, SOUP_STATUS_BAD_REQUEST); + + protocol = soup_message_headers_get_one (msg->response_headers, "Sec-WebSocket-Protocol"); + g_assert_cmpstr (protocol, ==, NULL); + + ok = soup_websocket_client_verify_handshake (msg, &error); + g_assert_error (error, SOUP_WEBSOCKET_ERROR, SOUP_WEBSOCKET_ERROR_BAD_HANDSHAKE); + g_clear_error (&error); + g_assert_false (ok); + + g_object_unref (msg); +} + +static void +test_protocol_mismatch_soup (Test *test, + gconstpointer unused) +{ + setup_soup_server (test, NULL, mismatch_server_protocols, got_server_connection, test); + client_connect (test, NULL, mismatch_client_protocols, got_client_connection, test); + WAIT_UNTIL (test->client_error != NULL); + + g_assert_error (test->client_error, SOUP_WEBSOCKET_ERROR, SOUP_WEBSOCKET_ERROR_NOT_WEBSOCKET); +} + +static const char *all_protocols[] = { "aaa", "bbb", "ccc", NULL }; + +static void +test_protocol_server_any_direct (Test *test, + gconstpointer unused) +{ + SoupMessage *msg; + gboolean ok; + const char *protocol; + GError *error = NULL; + + msg = soup_message_new ("GET", "http://127.0.0.1"); + soup_websocket_client_prepare_handshake (msg, NULL, (char **) all_protocols); + + ok = soup_websocket_server_check_handshake (msg, NULL, NULL, &error); + g_assert_no_error (error); + g_assert_true (ok); + + ok = soup_websocket_server_process_handshake (msg, NULL, NULL); + g_assert_true (ok); + + protocol = soup_message_headers_get_one (msg->response_headers, "Sec-WebSocket-Protocol"); + g_assert_cmpstr (protocol, ==, NULL); + + ok = soup_websocket_client_verify_handshake (msg, &error); + g_assert_no_error (error); + g_assert_true (ok); + + g_object_unref (msg); +} + +static void +test_protocol_server_any_soup (Test *test, + gconstpointer unused) +{ + setup_soup_server (test, NULL, NULL, got_server_connection, test); + client_connect (test, NULL, all_protocols, got_client_connection, test); + WAIT_UNTIL (test->server != NULL); + WAIT_UNTIL (test->client != NULL || test->client_error != NULL); + g_assert_no_error (test->client_error); + + g_assert_cmpstr (soup_websocket_connection_get_protocol (test->client), ==, NULL); + g_assert_cmpstr (soup_websocket_connection_get_protocol (test->server), ==, NULL); + g_assert_cmpstr (soup_message_headers_get_one (test->msg->response_headers, "Sec-WebSocket-Protocol"), ==, NULL); +} + +static void +test_protocol_client_any_direct (Test *test, + gconstpointer unused) +{ + SoupMessage *msg; + gboolean ok; + const char *protocol; + GError *error = NULL; + + msg = soup_message_new ("GET", "http://127.0.0.1"); + soup_websocket_client_prepare_handshake (msg, NULL, NULL); + + ok = soup_websocket_server_check_handshake (msg, NULL, (char **) all_protocols, &error); + g_assert_no_error (error); + g_assert_true (ok); + + ok = soup_websocket_server_process_handshake (msg, NULL, (char **) all_protocols); + g_assert_true (ok); + + protocol = soup_message_headers_get_one (msg->response_headers, "Sec-WebSocket-Protocol"); + g_assert_cmpstr (protocol, ==, NULL); + + ok = soup_websocket_client_verify_handshake (msg, &error); + g_assert_no_error (error); + g_assert_true (ok); + + g_object_unref (msg); +} + +static void +test_protocol_client_any_soup (Test *test, + gconstpointer unused) +{ + setup_soup_server (test, NULL, all_protocols, got_server_connection, test); + client_connect (test, NULL, NULL, got_client_connection, test); + WAIT_UNTIL (test->server != NULL); + WAIT_UNTIL (test->client != NULL || test->client_error != NULL); + g_assert_no_error (test->client_error); + + g_assert_cmpstr (soup_websocket_connection_get_protocol (test->client), ==, NULL); + g_assert_cmpstr (soup_websocket_connection_get_protocol (test->server), ==, NULL); + g_assert_cmpstr (soup_message_headers_get_one (test->msg->response_headers, "Sec-WebSocket-Protocol"), ==, NULL); +} + +static void +test_close_clean_client (Test *test, + gconstpointer data) +{ + gboolean close_event_client = FALSE; + gboolean close_event_server = FALSE; + + g_signal_connect (test->client, "closed", G_CALLBACK (on_close_set_flag), &close_event_client); + g_signal_connect (test->server, "closed", G_CALLBACK (on_close_set_flag), &close_event_server); + + soup_websocket_connection_close (test->client, SOUP_WEBSOCKET_CLOSE_GOING_AWAY, "give me a reason"); + g_assert_cmpint (soup_websocket_connection_get_state (test->client), ==, SOUP_WEBSOCKET_STATE_CLOSING); + + WAIT_UNTIL (soup_websocket_connection_get_state (test->server) == SOUP_WEBSOCKET_STATE_CLOSED); + WAIT_UNTIL (soup_websocket_connection_get_state (test->client) == SOUP_WEBSOCKET_STATE_CLOSED); + + g_assert (close_event_client); + g_assert (close_event_server); + + g_assert_cmpint (soup_websocket_connection_get_close_code (test->client), ==, SOUP_WEBSOCKET_CLOSE_GOING_AWAY); + g_assert_cmpint (soup_websocket_connection_get_close_code (test->server), ==, SOUP_WEBSOCKET_CLOSE_GOING_AWAY); + g_assert_cmpstr (soup_websocket_connection_get_close_data (test->server), ==, "give me a reason"); +} + +static void +test_close_clean_server (Test *test, + gconstpointer data) +{ + gboolean close_event_client = FALSE; + gboolean close_event_server = FALSE; + + g_signal_connect (test->client, "closed", G_CALLBACK (on_close_set_flag), &close_event_client); + g_signal_connect (test->server, "closed", G_CALLBACK (on_close_set_flag), &close_event_server); + + soup_websocket_connection_close (test->server, SOUP_WEBSOCKET_CLOSE_GOING_AWAY, "another reason"); + g_assert_cmpint (soup_websocket_connection_get_state (test->server), ==, SOUP_WEBSOCKET_STATE_CLOSING); + + WAIT_UNTIL (soup_websocket_connection_get_state (test->server) == SOUP_WEBSOCKET_STATE_CLOSED); + WAIT_UNTIL (soup_websocket_connection_get_state (test->client) == SOUP_WEBSOCKET_STATE_CLOSED); + + g_assert (close_event_client); + g_assert (close_event_server); + + g_assert_cmpint (soup_websocket_connection_get_close_code (test->server), ==, SOUP_WEBSOCKET_CLOSE_GOING_AWAY); + g_assert_cmpint (soup_websocket_connection_get_close_code (test->client), ==, SOUP_WEBSOCKET_CLOSE_GOING_AWAY); + g_assert_cmpstr (soup_websocket_connection_get_close_data (test->client), ==, "another reason"); +} + +static gboolean +on_closing_send_message (SoupWebsocketConnection *ws, + gpointer data) +{ + GBytes *message = data; + + soup_websocket_connection_send_text (ws, g_bytes_get_data (message, NULL)); + g_signal_handlers_disconnect_by_func (ws, on_closing_send_message, data); + return TRUE; +} + +static void +test_message_after_closing (Test *test, + gconstpointer data) +{ + gboolean close_event_client = FALSE; + gboolean close_event_server = FALSE; + GBytes *received = NULL; + GBytes *message; + + message = g_bytes_new_static ("another test because", strlen ("another test because")); + g_signal_connect (test->client, "closed", G_CALLBACK (on_close_set_flag), &close_event_client); + g_signal_connect (test->client, "message", G_CALLBACK (on_text_message), &received); + g_signal_connect (test->server, "closed", G_CALLBACK (on_close_set_flag), &close_event_server); + g_signal_connect (test->server, "closing", G_CALLBACK (on_closing_send_message), message); + + soup_websocket_connection_close (test->client, SOUP_WEBSOCKET_CLOSE_GOING_AWAY, "another reason"); + g_assert_cmpint (soup_websocket_connection_get_state (test->client), ==, SOUP_WEBSOCKET_STATE_CLOSING); + + WAIT_UNTIL (soup_websocket_connection_get_state (test->server) == SOUP_WEBSOCKET_STATE_CLOSED); + WAIT_UNTIL (soup_websocket_connection_get_state (test->client) == SOUP_WEBSOCKET_STATE_CLOSED); + + g_assert (close_event_client); + g_assert (close_event_server); + + g_assert (received != NULL); + g_assert (g_bytes_equal (message, received)); + + g_bytes_unref (received); + g_bytes_unref (message); +} + +static gpointer +timeout_server_thread (gpointer user_data) +{ + Test *test = user_data; + GError *error = NULL; + + /* don't close until the client has timed out */ + g_mutex_lock (&test->mutex); + g_mutex_unlock (&test->mutex); + + g_io_stream_close (test->raw_server, NULL, &error); + g_assert_no_error (error); + + return NULL; +} + +static void +test_close_after_timeout (Test *test, + gconstpointer data) +{ + gboolean close_event = FALSE; + GThread *thread; + + g_mutex_lock (&test->mutex); + + /* Note that no real server is around in this test, so no close happens */ + thread = g_thread_new ("timeout-thread", timeout_server_thread, test); + + g_signal_connect (test->client, "closed", G_CALLBACK (on_close_set_flag), &close_event); + g_signal_connect (test->client, "error", G_CALLBACK (on_error_not_reached), NULL); + + /* Now try and close things */ + soup_websocket_connection_close (test->client, 0, NULL); + g_assert_cmpint (soup_websocket_connection_get_state (test->client), ==, SOUP_WEBSOCKET_STATE_CLOSING); + + WAIT_UNTIL (soup_websocket_connection_get_state (test->client) == SOUP_WEBSOCKET_STATE_CLOSED); + + g_assert (close_event == TRUE); + + /* Now actually close the server side stream */ + g_mutex_unlock (&test->mutex); + g_thread_join (thread); +} + +static gpointer +send_fragments_server_thread (gpointer user_data) +{ + Test *test = user_data; + gsize written; + const char fragments[] = "\x01\x04""one " /* !fin | opcode */ + "\x00\x04""two " /* !fin | no opcode */ + "\x80\x05""three"; /* fin | no opcode */ + GError *error = NULL; + + g_output_stream_write_all (g_io_stream_get_output_stream (test->raw_server), + fragments, sizeof (fragments) -1, &written, NULL, &error); + g_assert_no_error (error); + g_assert_cmpuint (written, ==, sizeof (fragments) - 1); + g_io_stream_close (test->raw_server, NULL, &error); + g_assert_no_error (error); + + return NULL; +} + +static void +test_receive_fragmented (Test *test, + gconstpointer data) +{ + GThread *thread; + GBytes *received = NULL; + GBytes *expect; + + thread = g_thread_new ("fragment-thread", send_fragments_server_thread, test); + + g_signal_connect (test->client, "error", G_CALLBACK (on_error_not_reached), NULL); + g_signal_connect (test->client, "message", G_CALLBACK (on_text_message), &received); + + WAIT_UNTIL (received != NULL); + expect = g_bytes_new ("one two three", 13); + g_assert (g_bytes_equal (expect, received)); + g_bytes_unref (expect); + g_bytes_unref (received); + + g_thread_join (thread); + + WAIT_UNTIL (soup_websocket_connection_get_state (test->client) == SOUP_WEBSOCKET_STATE_CLOSED); +} + +static void +test_client_context_got_server_connection (SoupServer *server, + SoupWebsocketConnection *connection, + const char *path, + SoupClientContext *client, + gpointer user_data) +{ + Test *test = user_data; + GSocketAddress *addr; + GInetAddress *iaddr; + char *str; + const char *remote_ip; + + addr = soup_client_context_get_local_address (client); + iaddr = g_inet_socket_address_get_address (G_INET_SOCKET_ADDRESS (addr)); + str = g_inet_address_to_string (iaddr); + if (g_inet_address_get_family (iaddr) == G_SOCKET_FAMILY_IPV4) + g_assert_cmpstr (str, ==, "127.0.0.1"); + else + g_assert_cmpstr (str, ==, "::1"); + g_free (str); + + addr = soup_client_context_get_remote_address (client); + iaddr = g_inet_socket_address_get_address (G_INET_SOCKET_ADDRESS (addr)); + str = g_inet_address_to_string (iaddr); + if (g_inet_address_get_family (iaddr) == G_SOCKET_FAMILY_IPV4) + g_assert_cmpstr (str, ==, "127.0.0.1"); + else + g_assert_cmpstr (str, ==, "::1"); + + remote_ip = soup_client_context_get_host (client); + g_assert_cmpstr (remote_ip, ==, str); + g_free (str); + + test->server = g_object_ref (connection); +} + +static void +test_client_context (Test *test, + gconstpointer unused) +{ + setup_soup_server (test, NULL, NULL, test_client_context_got_server_connection, test); + client_connect (test, NULL, NULL, got_client_connection, test); + WAIT_UNTIL (test->server != NULL); + WAIT_UNTIL (test->client != NULL || test->client_error != NULL); + g_assert_no_error (test->client_error); +} + +int +main (int argc, + char *argv[]) +{ + int ret; + + test_init (argc, argv, NULL); + + g_test_add ("/websocket/soup/handshake", Test, NULL, + setup_soup_connection, + test_handshake, + teardown_soup_connection); + + g_test_add ("/websocket/direct/send-client-to-server", Test, NULL, + setup_direct_connection, + test_send_client_to_server, + teardown_direct_connection); + g_test_add ("/websocket/soup/send-client-to-server", Test, NULL, + setup_soup_connection, + test_send_client_to_server, + teardown_soup_connection); + + g_test_add ("/websocket/direct/send-server-to-client", Test, NULL, + setup_direct_connection, + test_send_server_to_client, + teardown_direct_connection); + g_test_add ("/websocket/soup/send-server-to-client", Test, NULL, + setup_soup_connection, + test_send_server_to_client, + teardown_soup_connection); + + g_test_add ("/websocket/direct/send-big-packets", Test, NULL, + setup_direct_connection, + test_send_big_packets, + teardown_direct_connection); + g_test_add ("/websocket/soup/send-big-packets", Test, NULL, + setup_soup_connection, + test_send_big_packets, + teardown_soup_connection); + + g_test_add ("/websocket/direct/send-bad-data", Test, NULL, + setup_direct_connection, + test_send_bad_data, + teardown_direct_connection); + g_test_add ("/websocket/soup/send-bad-data", Test, NULL, + setup_soup_connection, + test_send_bad_data, + teardown_soup_connection); + + g_test_add ("/websocket/direct/close-clean-client", Test, NULL, + setup_direct_connection, + test_close_clean_client, + teardown_direct_connection); + g_test_add ("/websocket/soup/close-clean-client", Test, NULL, + setup_soup_connection, + test_close_clean_client, + teardown_soup_connection); + + g_test_add ("/websocket/direct/close-clean-server", Test, NULL, + setup_direct_connection, + test_close_clean_server, + teardown_direct_connection); + g_test_add ("/websocket/soup/close-clean-server", Test, NULL, + setup_soup_connection, + test_close_clean_server, + teardown_soup_connection); + + g_test_add ("/websocket/direct/message-after-closing", Test, NULL, + setup_direct_connection, + test_message_after_closing, + teardown_direct_connection); + g_test_add ("/websocket/soup/message-after-closing", Test, NULL, + setup_soup_connection, + test_message_after_closing, + teardown_soup_connection); + + + g_test_add ("/websocket/direct/protocol-negotiate", Test, NULL, NULL, + test_protocol_negotiate_direct, + NULL); + g_test_add ("/websocket/soup/protocol-negotiate", Test, NULL, NULL, + test_protocol_negotiate_soup, + teardown_soup_connection); + + g_test_add ("/websocket/direct/protocol-mismatch", Test, NULL, NULL, + test_protocol_mismatch_direct, + NULL); + g_test_add ("/websocket/soup/protocol-mismatch", Test, NULL, NULL, + test_protocol_mismatch_soup, + teardown_soup_connection); + + g_test_add ("/websocket/direct/protocol-server-any", Test, NULL, NULL, + test_protocol_server_any_direct, + NULL); + g_test_add ("/websocket/soup/protocol-server-any", Test, NULL, NULL, + test_protocol_server_any_soup, + teardown_soup_connection); + + g_test_add ("/websocket/direct/protocol-client-any", Test, NULL, NULL, + test_protocol_client_any_direct, + NULL); + g_test_add ("/websocket/soup/protocol-client-any", Test, NULL, NULL, + test_protocol_client_any_soup, + teardown_soup_connection); + + + g_test_add ("/websocket/direct/receive-fragmented", Test, NULL, + setup_half_direct_connection, + test_receive_fragmented, + teardown_direct_connection); + + if (g_test_slow ()) { + g_test_add ("/websocket/direct/close-after-timeout", Test, NULL, + setup_half_direct_connection, + test_close_after_timeout, + teardown_direct_connection); + } + + g_test_add ("/websocket/soup/client-context", Test, NULL, NULL, + test_client_context, + teardown_soup_connection); + + ret = g_test_run (); + + test_cleanup (); + return ret; +} diff --git a/tests/xmlrpc-old-server-test.c b/tests/xmlrpc-old-server-test.c new file mode 100644 index 00000000..a7076b5a --- /dev/null +++ b/tests/xmlrpc-old-server-test.c @@ -0,0 +1,374 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Copyright (C) 2008 Red Hat, Inc. + */ + +#include "test-utils.h" + +static char *uri; + +#ifdef G_GNUC_BEGIN_IGNORE_DEPRECATIONS +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +#endif + +static void +type_error (SoupMessage *msg, GType expected, GValueArray *params, int bad_value) +{ + soup_xmlrpc_set_fault (msg, + SOUP_XMLRPC_FAULT_SERVER_ERROR_INVALID_METHOD_PARAMETERS, + "Bad parameter #%d: expected %s, got %s", + bad_value + 1, g_type_name (expected), + g_type_name (G_VALUE_TYPE (¶ms->values[bad_value]))); +} + +static void +args_error (SoupMessage *msg, GValueArray *params, int expected) +{ + soup_xmlrpc_set_fault (msg, + SOUP_XMLRPC_FAULT_SERVER_ERROR_INVALID_METHOD_PARAMETERS, + "Wrong number of parameters: expected %d, got %d", + expected, params->n_values); +} + +static void +do_sum (SoupMessage *msg, GValueArray *params) +{ + int i; + double sum = 0.0, val; + GValueArray *nums; + + if (params->n_values != 1) { + args_error (msg, params, 1); + return; + } + if (!soup_value_array_get_nth (params, 0, G_TYPE_VALUE_ARRAY, &nums)) { + type_error (msg, G_TYPE_VALUE_ARRAY, params, 0); + return; + } + + for (i = 0; i < nums->n_values; i++) { + if (!soup_value_array_get_nth (nums, i, G_TYPE_DOUBLE, &val)) { + type_error (msg, G_TYPE_DOUBLE, nums, i); + return; + } + sum += val; + } + + soup_xmlrpc_set_response (msg, G_TYPE_DOUBLE, sum); + +} + +static void +do_countBools (SoupMessage *msg, GValueArray *params) +{ + int i, trues = 0, falses = 0; + GValueArray *bools; + GHashTable *ret = soup_value_hash_new (); + gboolean val; + + if (params->n_values != 1) { + args_error (msg, params, 1); + return; + } + if (!soup_value_array_get_nth (params, 0, G_TYPE_VALUE_ARRAY, &bools)) { + type_error (msg, G_TYPE_VALUE_ARRAY, params, 0); + return; + } + + for (i = 0; i < bools->n_values; i++) { + if (!soup_value_array_get_nth (bools, i, G_TYPE_BOOLEAN, &val)) { + type_error (msg, G_TYPE_BOOLEAN, params, i); + return; + } + if (val) + trues++; + else + falses++; + } + + soup_value_hash_insert (ret, "true", G_TYPE_INT, trues); + soup_value_hash_insert (ret, "false", G_TYPE_INT, falses); + soup_xmlrpc_set_response (msg, G_TYPE_HASH_TABLE, ret); + g_hash_table_destroy (ret); + +} + +static void +do_md5sum (SoupMessage *msg, GValueArray *params) +{ + GChecksum *checksum; + GByteArray *data, *digest; + gsize digest_len = 16; + + if (params->n_values != 1) { + args_error (msg, params, 1); + return; + } + + if (!soup_value_array_get_nth (params, 0, SOUP_TYPE_BYTE_ARRAY, &data)) { + type_error (msg, SOUP_TYPE_BYTE_ARRAY, params, 0); + return; + } + checksum = g_checksum_new (G_CHECKSUM_MD5); + g_checksum_update (checksum, data->data, data->len); + digest = g_byte_array_new (); + g_byte_array_set_size (digest, digest_len); + g_checksum_get_digest (checksum, digest->data, &digest_len); + g_checksum_free (checksum); + + soup_xmlrpc_set_response (msg, SOUP_TYPE_BYTE_ARRAY, digest); + g_byte_array_free (digest, TRUE); +} + + +static void +do_dateChange (SoupMessage *msg, GValueArray *params) +{ + GHashTable *arg; + SoupDate *date; + int val; + + if (params->n_values != 2) { + args_error (msg, params, 2); + return; + } + + if (!soup_value_array_get_nth (params, 0, SOUP_TYPE_DATE, &date)) { + type_error (msg, SOUP_TYPE_DATE, params, 0); + return; + } + if (!soup_value_array_get_nth (params, 1, G_TYPE_HASH_TABLE, &arg)) { + type_error (msg, G_TYPE_HASH_TABLE, params, 1); + return; + } + + if (soup_value_hash_lookup (arg, "tm_year", G_TYPE_INT, &val)) + date->year = val + 1900; + if (soup_value_hash_lookup (arg, "tm_mon", G_TYPE_INT, &val)) + date->month = val + 1; + if (soup_value_hash_lookup (arg, "tm_mday", G_TYPE_INT, &val)) + date->day = val; + if (soup_value_hash_lookup (arg, "tm_hour", G_TYPE_INT, &val)) + date->hour = val; + if (soup_value_hash_lookup (arg, "tm_min", G_TYPE_INT, &val)) + date->minute = val; + if (soup_value_hash_lookup (arg, "tm_sec", G_TYPE_INT, &val)) + date->second = val; + + soup_xmlrpc_set_response (msg, SOUP_TYPE_DATE, date); +} + +static void +do_echo (SoupMessage *msg, GValueArray *params) +{ + int i; + const char *val; + GValueArray *in, *out; + + if (!soup_value_array_get_nth (params, 0, G_TYPE_VALUE_ARRAY, &in)) { + type_error (msg, G_TYPE_VALUE_ARRAY, params, 0); + return; + } + + out = g_value_array_new (in->n_values); + for (i = 0; i < in->n_values; i++) { + if (!soup_value_array_get_nth (in, i, G_TYPE_STRING, &val)) { + type_error (msg, G_TYPE_STRING, in, i); + return; + } + soup_value_array_append (out, G_TYPE_STRING, val); + } + + soup_xmlrpc_set_response (msg, G_TYPE_VALUE_ARRAY, out); + g_value_array_free (out); +} + +static void +do_ping (SoupMessage *msg, GValueArray *params) +{ + if (params->n_values) { + args_error (msg, params, 0); + return; + } + + soup_xmlrpc_set_response (msg, G_TYPE_STRING, "pong"); +} + +static void +server_callback (SoupServer *server, SoupMessage *msg, + const char *path, GHashTable *query, + SoupClientContext *context, gpointer data) +{ + char *method_name; + GValueArray *params; + + if (msg->method != SOUP_METHOD_POST) { + soup_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED); + return; + } + + soup_message_set_status (msg, SOUP_STATUS_OK); + + if (!soup_xmlrpc_parse_method_call (msg->request_body->data, + msg->request_body->length, + &method_name, ¶ms)) { + soup_xmlrpc_set_fault (msg, SOUP_XMLRPC_FAULT_PARSE_ERROR_NOT_WELL_FORMED, + "Could not parse method call"); + return; + } + + if (!strcmp (method_name, "sum")) + do_sum (msg, params); + else if (!strcmp (method_name, "countBools")) + do_countBools (msg, params); + else if (!strcmp (method_name, "md5sum")) + do_md5sum (msg, params); + else if (!strcmp (method_name, "dateChange")) + do_dateChange (msg, params); + else if (!strcmp (method_name, "echo")) + do_echo (msg, params); + else if (!strcmp (method_name, "ping")) + do_ping (msg, params); + else { + soup_xmlrpc_set_fault (msg, SOUP_XMLRPC_FAULT_SERVER_ERROR_REQUESTED_METHOD_NOT_FOUND, + "Unknown method %s", method_name); + } + + g_free (method_name); + g_value_array_free (params); +} + +static gboolean +run_xmlrpc_test (char **argv, + char **stdout_out, + char **stderr_out, + GError **error) +{ + gboolean ok; + int status; + + argv[0] = g_test_build_filename (G_TEST_BUILT, "xmlrpc-old-test", NULL); + ok = g_spawn_sync (NULL, argv, NULL, 0, NULL, NULL, + stdout_out, stderr_out, &status, + error); + g_free (argv[0]); + + if (!ok) + return FALSE; + + return g_spawn_check_exit_status (status, error); +} + +static void +do_one_xmlrpc_test (gconstpointer data) +{ + const char *path = data; + char *argv[12]; + char *stdout_out, *stderr_out; + GError *error = NULL; + int arg; + + argv[0] = NULL; + argv[1] = "-S"; + argv[2] = "-U"; + argv[3] = uri; + argv[4] = "-q"; + argv[5] = "-p"; + argv[6] = (char *) path; + + for (arg = 0; arg < debug_level && arg < 3; arg++) + argv[arg + 7] = "-d"; + argv[arg + 7] = NULL; + + run_xmlrpc_test (argv, &stdout_out, &stderr_out, &error); + if (stdout_out) { + g_print ("%s", stdout_out); + g_free (stdout_out); + } + if (stderr_out) { + g_printerr ("%s", stderr_out); + g_free (stderr_out); + } + + if ( g_error_matches (error, G_SPAWN_EXIT_ERROR, 1) + || g_error_matches (error, G_SPAWN_EXIT_ERROR, 77)) + g_test_fail (); + else + g_assert_no_error (error); + g_clear_error (&error); +} + +gboolean run_tests = TRUE; + +static GOptionEntry no_test_entry[] = { + { "no-tests", 'n', G_OPTION_FLAG_REVERSE, + G_OPTION_ARG_NONE, &run_tests, + "Don't run tests, just run the test server", NULL }, + { NULL } +}; + +int +main (int argc, char **argv) +{ + SoupServer *server; + SoupURI *server_uri; + int ret; + + test_init (argc, argv, no_test_entry); + + server = soup_test_server_new (run_tests ? SOUP_TEST_SERVER_IN_THREAD : SOUP_TEST_SERVER_DEFAULT); + soup_server_add_handler (server, "/xmlrpc-server.php", + server_callback, NULL, NULL); + server_uri = soup_test_server_get_uri (server, "http", NULL); + soup_uri_set_path (server_uri, "/xmlrpc-server.php"); + uri = soup_uri_to_string (server_uri, FALSE); + + if (run_tests) { + char *out, **tests, *path; + char *list_argv[4]; + GError *error = NULL; + int i; + + list_argv[0] = NULL; + list_argv[1] = "-S"; + list_argv[2] = "-l"; + list_argv[3] = NULL; + + if (!run_xmlrpc_test (list_argv, &out, NULL, &error)) { + g_printerr ("'xmlrpc-old-test -l' failed: %s\n", error->message); + g_error_free (error); + return 1; + } + + tests = g_strsplit (out, "\n", -1); + g_free (out); + + for (i = 0; tests[i] && *tests[i]; i++) { + g_assert_true (g_str_has_prefix (tests[i], "/xmlrpc-old/")); + path = g_strdup_printf ("/xmlrpc-old-server/%s", tests[i] + strlen ("/xmlrpc-old/")); + g_test_add_data_func (path, tests[i], do_one_xmlrpc_test); + g_free (path); + } + + ret = g_test_run (); + + g_strfreev (tests); + } else { + GMainLoop *loop; + + g_print ("Listening on port %d\n", server_uri->port); + + loop = g_main_loop_new (NULL, TRUE); + g_main_loop_run (loop); + g_main_loop_unref (loop); + + ret = 0; + } + + soup_test_server_quit_unref (server); + soup_uri_free (server_uri); + g_free (uri); + if (run_tests) + test_cleanup (); + return ret; +} diff --git a/tests/xmlrpc-old-test.c b/tests/xmlrpc-old-test.c new file mode 100644 index 00000000..ab7b34d3 --- /dev/null +++ b/tests/xmlrpc-old-test.c @@ -0,0 +1,502 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Copyright (C) 2001-2003, Ximian, Inc. + */ + +#include "test-utils.h" + +#ifdef G_GNUC_BEGIN_IGNORE_DEPRECATIONS +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +#endif + +static SoupSession *session; +static const char *default_uri = "http://127.0.0.1:47524/xmlrpc-server.php"; +static const char *uri = NULL; +static gboolean server_test = FALSE; + +#ifdef HAVE_PHP_XMLRPC +#define SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER +#else +#define SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER \ + G_STMT_START { \ + if (!server_test) { \ + g_test_skip ("php-xmlrpc is not available"); \ + return; \ + } \ + } G_STMT_END +#endif + +static gboolean +send_xmlrpc (const char *body, GValue *retval) +{ + SoupMessage *msg; + GError *err = NULL; + + msg = soup_message_new ("POST", uri); + soup_message_set_request (msg, "text/xml", SOUP_MEMORY_COPY, + body, strlen (body)); + soup_session_send_message (session, msg); + + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + + if (!soup_xmlrpc_parse_method_response (msg->response_body->data, + msg->response_body->length, + retval, &err)) { + if (err) { + soup_test_assert (FALSE, "FAULT: %d %s\n", err->code, err->message); + g_error_free (err); + } else + soup_test_assert (FALSE, "ERROR: could not parse response\n"); + g_object_unref (msg); + return FALSE; + } + g_object_unref (msg); + + return TRUE; +} + +static gboolean +do_xmlrpc (const char *method, GValue *retval, ...) +{ + va_list args; + GValueArray *params; + char *body; + gboolean ret; + + va_start (args, retval); + params = soup_value_array_from_args (args); + va_end (args); + + body = soup_xmlrpc_build_method_call (method, params->values, + params->n_values); + g_value_array_free (params); + if (!body) + return FALSE; + + ret = send_xmlrpc (body, retval); + g_free (body); + + return ret; +} + +static gboolean +check_xmlrpc (GValue *value, GType type, ...) +{ + va_list args; + + if (!G_VALUE_HOLDS (value, type)) { + g_assert_true (G_VALUE_HOLDS (value, type)); + return FALSE; + } + + va_start (args, type); + SOUP_VALUE_GETV (value, type, args); + va_end (args); + return TRUE; +} + +static void +test_sum (void) +{ + GValueArray *dbls; + int i; + double val, sum, result; + GValue retval; + gboolean ok; + + SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; + + debug_printf (2, "sum (array of double -> double): "); + + dbls = g_value_array_new (10); + for (i = sum = 0; i < 10; i++) { + val = g_random_int_range (0, 400) / 4.0; + debug_printf (2, "%s%.2f", i == 0 ? "[" : ", ", val); + soup_value_array_append (dbls, G_TYPE_DOUBLE, val); + sum += val; + } + debug_printf (2, "] -> "); + + ok = (do_xmlrpc ("sum", &retval, + G_TYPE_VALUE_ARRAY, dbls, + G_TYPE_INVALID) && + check_xmlrpc (&retval, G_TYPE_DOUBLE, &result)); + g_value_array_free (dbls); + + if (!ok) + return; + + debug_printf (2, "%.2f\n", result); + g_assert_cmpfloat (result, ==, sum); +} + +static void +test_countBools (void) +{ + GValueArray *bools; + int i, trues, falses; + GValue retval; + int ret_trues, ret_falses; + gboolean val, ok; + GHashTable *result; + + SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; + + debug_printf (2, "countBools (array of boolean -> struct of ints): "); + + bools = g_value_array_new (10); + for (i = trues = falses = 0; i < 10; i++) { + val = g_random_boolean (); + debug_printf (2, "%s%c", i == 0 ? "[" : ", ", val ? 'T' : 'F'); + soup_value_array_append (bools, G_TYPE_BOOLEAN, val); + if (val) + trues++; + else + falses++; + } + debug_printf (2, "] -> "); + + ok = (do_xmlrpc ("countBools", &retval, + G_TYPE_VALUE_ARRAY, bools, + G_TYPE_INVALID) && + check_xmlrpc (&retval, G_TYPE_HASH_TABLE, &result)); + g_value_array_free (bools); + if (!ok) + return; + + g_assert_true (soup_value_hash_lookup (result, "true", G_TYPE_INT, &ret_trues)); + g_assert_true (soup_value_hash_lookup (result, "false", G_TYPE_INT, &ret_falses)); + + g_hash_table_destroy (result); + + debug_printf (2, "{ true: %d, false: %d }\n", ret_trues, ret_falses); + g_assert_cmpint (trues, ==, ret_trues); + g_assert_cmpint (falses, ==, ret_falses); +} + +static void +test_md5sum (void) +{ + GByteArray *data, *result; + int i; + GChecksum *checksum; + guchar digest[16]; + gsize digest_len = sizeof (digest); + GValue retval; + gboolean ok; + + SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; + + debug_printf (2, "md5sum (base64 -> base64)\n"); + + data = g_byte_array_new (); + g_byte_array_set_size (data, 256); + for (i = 0; i < data->len; i++) + data->data[i] = (char)(g_random_int_range (0, 256)); + + checksum = g_checksum_new (G_CHECKSUM_MD5); + g_checksum_update (checksum, data->data, data->len); + g_checksum_get_digest (checksum, digest, &digest_len); + g_checksum_free (checksum); + + ok = (do_xmlrpc ("md5sum", &retval, + SOUP_TYPE_BYTE_ARRAY, data, + G_TYPE_INVALID) && + check_xmlrpc (&retval, SOUP_TYPE_BYTE_ARRAY, &result)); + g_byte_array_free (data, TRUE); + if (!ok) + return; + + soup_assert_cmpmem (result->data, result->len, + digest, digest_len); + g_byte_array_free (result, TRUE); +} + +static void +test_dateChange (void) +{ + GHashTable *structval; + SoupDate *date, *result; + char *timestamp; + GValue retval; + gboolean ok; + + SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; + + debug_printf (2, "dateChange (date, struct of ints -> time)\n"); + + date = soup_date_new (1970 + (g_random_int_range (0, 50)), + 1 + g_random_int_range (0, 12), + 1 + g_random_int_range (0, 28), + g_random_int_range (0, 24), + g_random_int_range (0, 60), + g_random_int_range (0, 60)); + if (debug_level >= 2) { + timestamp = soup_date_to_string (date, SOUP_DATE_ISO8601_XMLRPC); + debug_printf (2, "date: %s, {", timestamp); + g_free (timestamp); + } + + structval = soup_value_hash_new (); + +#define MAYBE (g_random_int_range (0, 3) != 0) + + if (MAYBE) { + date->year = 1970 + (g_random_int_range (0, 50)); + debug_printf (2, "tm_year: %d, ", date->year - 1900); + soup_value_hash_insert (structval, "tm_year", + G_TYPE_INT, date->year - 1900); + } + if (MAYBE) { + date->month = 1 + g_random_int_range (0, 12); + debug_printf (2, "tm_mon: %d, ", date->month - 1); + soup_value_hash_insert (structval, "tm_mon", + G_TYPE_INT, date->month - 1); + } + if (MAYBE) { + date->day = 1 + g_random_int_range (0, 28); + debug_printf (2, "tm_mday: %d, ", date->day); + soup_value_hash_insert (structval, "tm_mday", + G_TYPE_INT, date->day); + } + if (MAYBE) { + date->hour = g_random_int_range (0, 24); + debug_printf (2, "tm_hour: %d, ", date->hour); + soup_value_hash_insert (structval, "tm_hour", + G_TYPE_INT, date->hour); + } + if (MAYBE) { + date->minute = g_random_int_range (0, 60); + debug_printf (2, "tm_min: %d, ", date->minute); + soup_value_hash_insert (structval, "tm_min", + G_TYPE_INT, date->minute); + } + if (MAYBE) { + date->second = g_random_int_range (0, 60); + debug_printf (2, "tm_sec: %d, ", date->second); + soup_value_hash_insert (structval, "tm_sec", + G_TYPE_INT, date->second); + } + + debug_printf (2, "} -> "); + + ok = (do_xmlrpc ("dateChange", &retval, + SOUP_TYPE_DATE, date, + G_TYPE_HASH_TABLE, structval, + G_TYPE_INVALID) && + check_xmlrpc (&retval, SOUP_TYPE_DATE, &result)); + g_hash_table_destroy (structval); + if (!ok) { + soup_date_free (date); + return; + } + + if (debug_level >= 2) { + timestamp = soup_date_to_string (result, SOUP_DATE_ISO8601_XMLRPC); + debug_printf (2, "%s\n", timestamp); + g_free (timestamp); + } + + g_assert_cmpint (date->year, ==, result->year); + g_assert_cmpint (date->month, ==, result->month); + g_assert_cmpint (date->day, ==, result->day); + g_assert_cmpint (date->hour, ==, result->hour); + g_assert_cmpint (date->minute, ==, result->minute); + g_assert_cmpint (date->second, ==, result->second); + + soup_date_free (date); + soup_date_free (result); +} + +static const char *const echo_strings[] = { + "This is a test", + "& so is this", + "and so is ", + "& so is <this>" +}; +#define N_ECHO_STRINGS G_N_ELEMENTS (echo_strings) + +static void +test_echo (void) +{ + GValueArray *originals, *echoes; + GValue retval; + int i; + + SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; + + debug_printf (2, "echo (array of string -> array of string):\n"); + + originals = g_value_array_new (N_ECHO_STRINGS); + for (i = 0; i < N_ECHO_STRINGS; i++) { + soup_value_array_append (originals, G_TYPE_STRING, echo_strings[i]); + debug_printf (2, "%s\"%s\"", i == 0 ? "[" : ", ", echo_strings[i]); + } + debug_printf (2, "] -> "); + + if (!(do_xmlrpc ("echo", &retval, + G_TYPE_VALUE_ARRAY, originals, + G_TYPE_INVALID) && + check_xmlrpc (&retval, G_TYPE_VALUE_ARRAY, &echoes))) { + g_value_array_free (originals); + return; + } + g_value_array_free (originals); + + if (debug_level >= 2) { + for (i = 0; i < echoes->n_values; i++) { + debug_printf (2, "%s\"%s\"", i == 0 ? "[" : ", ", + g_value_get_string (&echoes->values[i])); + } + debug_printf (2, "]\n"); + } + + g_assert_cmpint (echoes->n_values, ==, N_ECHO_STRINGS); + + for (i = 0; i < echoes->n_values; i++) + g_assert_cmpstr (echo_strings[i], ==, g_value_get_string (&echoes->values[i])); + + g_value_array_free (echoes); +} + +static void +test_ping (gconstpointer include_params) +{ + GValueArray *params; + GValue retval; + char *request; + char *out; + gboolean ret; + + g_test_bug ("671661"); + + SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; + + debug_printf (2, "ping (void (%s) -> string)\n", + include_params ? "empty " : "no "); + + params = soup_value_array_new (); + request = soup_xmlrpc_build_method_call ("ping", params->values, + params->n_values); + g_value_array_free (params); + if (!request) + return; + + if (!include_params) { + char *params, *end; + + params = strstr (request, ""); + if (!params) { + soup_test_assert (FALSE, "ERROR: XML did not contain !"); + return; + } + end = params + strlen (""); + memmove (params, end, strlen (end) + 1); + } + + ret = send_xmlrpc (request, &retval); + g_free (request); + + if (!ret || !check_xmlrpc (&retval, G_TYPE_STRING, &out)) + return; + + g_assert_cmpstr (out, ==, "pong"); + + g_free (out); +} + +static void +do_bad_xmlrpc (const char *body) +{ + SoupMessage *msg; + GError *err = NULL; + GValue retval; + + msg = soup_message_new ("POST", uri); + soup_message_set_request (msg, "text/xml", SOUP_MEMORY_COPY, + body, strlen (body)); + soup_session_send_message (session, msg); + + soup_test_assert_message_status (msg, SOUP_STATUS_OK); + + if (!soup_xmlrpc_parse_method_response (msg->response_body->data, + msg->response_body->length, + &retval, &err)) { + if (err) { + debug_printf (1, "FAULT: %d %s (OK!)\n", + err->code, err->message); + g_error_free (err); + g_object_unref (msg); + return; + } else + soup_test_assert (FALSE, "ERROR: could not parse response\n"); + } else + soup_test_assert (FALSE, "Unexpectedly got successful response!\n"); + + g_object_unref (msg); +} + +static void +test_fault_malformed (void) +{ + SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; + + do_bad_xmlrpc (""); +} + +static void +test_fault_method (void) +{ + SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; + + do_bad_xmlrpc ("no_such_method1"); +} + +static void +test_fault_args (void) +{ + SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; + + do_bad_xmlrpc ("sum1"); +} + +static GOptionEntry xmlrpc_entries[] = { + { "uri", 'U', 0, G_OPTION_ARG_STRING, &uri, + "Alternate URI for server", NULL }, + { "server-test", 'S', 0, G_OPTION_ARG_NONE, &server_test, + "If this is being run from xmlrpc-old-server-test", NULL }, + { NULL } +}; + +int +main (int argc, char **argv) +{ + int ret; + + test_init (argc, argv, xmlrpc_entries); + + if (!uri && !server_test) { + apache_init (); + uri = default_uri; + } + + session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, NULL); + + g_test_add_func ("/xmlrpc-old/sum", test_sum); + g_test_add_func ("/xmlrpc-old/countBools", test_countBools); + g_test_add_func ("/xmlrpc-old/md5sum", test_md5sum); + g_test_add_func ("/xmlrpc-old/dateChange", test_dateChange); + g_test_add_func ("/xmlrpc-old/echo", test_echo); + g_test_add_data_func ("/xmlrpc-old/ping/empty-params", GINT_TO_POINTER (TRUE), test_ping); + g_test_add_data_func ("/xmlrpc-old/ping/no-params", GINT_TO_POINTER (FALSE), test_ping); + g_test_add_func ("/xmlrpc-old/fault/malformed", test_fault_malformed); + g_test_add_func ("/xmlrpc-old/fault/method", test_fault_method); + g_test_add_func ("/xmlrpc-old/fault/args", test_fault_args); + + ret = g_test_run (); + + soup_test_session_abort_unref (session); + + test_cleanup (); + return ret; +} diff --git a/tests/xmlrpc-server-test.c b/tests/xmlrpc-server-test.c index bfeb200a..80f04ea8 100644 --- a/tests/xmlrpc-server-test.c +++ b/tests/xmlrpc-server-test.c @@ -1,196 +1,194 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 2008 Red Hat, Inc. + * Copyright 2008 Red Hat, Inc. + * Copyright 2015, Collabora ltd. */ #include "test-utils.h" static char *uri; -#ifdef G_GNUC_BEGIN_IGNORE_DEPRECATIONS -G_GNUC_BEGIN_IGNORE_DEPRECATIONS -#endif - -static void -type_error (SoupMessage *msg, GType expected, GValueArray *params, int bad_value) +static GVariant * +parse_params (SoupMessage *msg, SoupXMLRPCParams *params, const char *signature) { - soup_xmlrpc_set_fault (msg, - SOUP_XMLRPC_FAULT_SERVER_ERROR_INVALID_METHOD_PARAMETERS, - "Bad parameter #%d: expected %s, got %s", - bad_value + 1, g_type_name (expected), - g_type_name (G_VALUE_TYPE (¶ms->values[bad_value]))); -} + GVariant *args; + GError *error = NULL; -static void -args_error (SoupMessage *msg, GValueArray *params, int expected) -{ - soup_xmlrpc_set_fault (msg, - SOUP_XMLRPC_FAULT_SERVER_ERROR_INVALID_METHOD_PARAMETERS, - "Wrong number of parameters: expected %d, got %d", - expected, params->n_values); + args = soup_xmlrpc_params_parse (params, signature, &error); + if (!args) { + soup_xmlrpc_message_set_fault (msg, + SOUP_XMLRPC_FAULT_SERVER_ERROR_INVALID_METHOD_PARAMETERS, + "Wrong method signature: expected %s: %s", + signature, error->message); + } + + return args; } static void -do_sum (SoupMessage *msg, GValueArray *params) +do_sum (SoupMessage *msg, SoupXMLRPCParams *params) { - int sum = 0, i, val; - GValueArray *nums; + GVariant *args; + GVariant *child; + GVariantIter iter; + double sum = 0.0, val; - if (params->n_values != 1) { - args_error (msg, params, 1); - return; - } - if (!soup_value_array_get_nth (params, 0, G_TYPE_VALUE_ARRAY, &nums)) { - type_error (msg, G_TYPE_VALUE_ARRAY, params, 0); + if (!(args = parse_params (msg, params, "(ad)"))) return; - } - for (i = 0; i < nums->n_values; i++) { - if (!soup_value_array_get_nth (nums, i, G_TYPE_INT, &val)) { - type_error (msg, G_TYPE_INT, nums, i); - return; - } + child = g_variant_get_child_value (args, 0); + + g_variant_iter_init (&iter, child); + while (g_variant_iter_loop (&iter, "d", &val)) sum += val; - } - soup_xmlrpc_set_response (msg, G_TYPE_INT, sum); + soup_xmlrpc_message_set_response (msg, g_variant_new_double (sum), NULL); + g_variant_unref (args); + g_variant_unref (child); } static void -do_countBools (SoupMessage *msg, GValueArray *params) +do_countBools (SoupMessage *msg, SoupXMLRPCParams *params) { - int i, trues = 0, falses = 0; - GValueArray *bools; - GHashTable *ret = soup_value_hash_new (); + GVariant *args; + GVariant *child; + GVariantIter iter; gboolean val; + int trues = 0, falses = 0; + GVariantDict dict; - if (params->n_values != 1) { - args_error (msg, params, 1); - return; - } - if (!soup_value_array_get_nth (params, 0, G_TYPE_VALUE_ARRAY, &bools)) { - type_error (msg, G_TYPE_VALUE_ARRAY, params, 0); + if (!(args = parse_params (msg, params, "(ab)"))) return; - } - for (i = 0; i < bools->n_values; i++) { - if (!soup_value_array_get_nth (bools, i, G_TYPE_BOOLEAN, &val)) { - type_error (msg, G_TYPE_BOOLEAN, params, i); - return; - } + child = g_variant_get_child_value (args, 0); + + g_variant_iter_init (&iter, child); + while (g_variant_iter_loop (&iter, "b", &val)) { if (val) trues++; else falses++; } - soup_value_hash_insert (ret, "true", G_TYPE_INT, trues); - soup_value_hash_insert (ret, "false", G_TYPE_INT, falses); - soup_xmlrpc_set_response (msg, G_TYPE_HASH_TABLE, ret); - g_hash_table_destroy (ret); + g_variant_dict_init (&dict, NULL); + g_variant_dict_insert (&dict, "true", "i", trues); + g_variant_dict_insert (&dict, "false", "i", falses); + + soup_xmlrpc_message_set_response (msg, g_variant_dict_end (&dict), NULL); + g_variant_unref (args); + g_variant_unref (child); } static void -do_md5sum (SoupMessage *msg, GValueArray *params) +do_md5sum (SoupMessage *msg, SoupXMLRPCParams *params) { + GVariant *args; + GVariant *child; GChecksum *checksum; - GByteArray *data, *digest; + GByteArray *digest; gsize digest_len = 16; - if (params->n_values != 1) { - args_error (msg, params, 1); + if (!(args = parse_params (msg, params, "(ay)"))) return; - } - if (!soup_value_array_get_nth (params, 0, SOUP_TYPE_BYTE_ARRAY, &data)) { - type_error (msg, SOUP_TYPE_BYTE_ARRAY, params, 0); - return; - } + child = g_variant_get_child_value (args, 0); + checksum = g_checksum_new (G_CHECKSUM_MD5); - g_checksum_update (checksum, data->data, data->len); + g_checksum_update (checksum, + g_variant_get_data (child), + g_variant_get_size (child)); digest = g_byte_array_new (); g_byte_array_set_size (digest, digest_len); g_checksum_get_digest (checksum, digest->data, &digest_len); g_checksum_free (checksum); - soup_xmlrpc_set_response (msg, SOUP_TYPE_BYTE_ARRAY, digest); + soup_xmlrpc_message_set_response (msg, + g_variant_new_from_data (G_VARIANT_TYPE_BYTESTRING, + digest->data, digest_len, + TRUE, NULL, NULL), + NULL); g_byte_array_free (digest, TRUE); + g_variant_unref (child); + g_variant_unref (args); } static void -do_dateChange (SoupMessage *msg, GValueArray *params) +do_dateChange (SoupMessage *msg, SoupXMLRPCParams *params) { - GHashTable *arg; + GVariant *args; + GVariant *timestamp; SoupDate *date; + GVariant *arg; int val; + GError *error = NULL; - if (params->n_values != 2) { - args_error (msg, params, 2); + if (!(args = parse_params (msg, params, "(va{si})"))) return; - } - if (!soup_value_array_get_nth (params, 0, SOUP_TYPE_DATE, &date)) { - type_error (msg, SOUP_TYPE_DATE, params, 0); - return; - } - if (!soup_value_array_get_nth (params, 1, G_TYPE_HASH_TABLE, &arg)) { - type_error (msg, G_TYPE_HASH_TABLE, params, 1); - return; + g_variant_get (args, "(v@a{si})", ×tamp, &arg); + + date = soup_xmlrpc_variant_get_datetime (timestamp, &error); + if (!date) { + soup_xmlrpc_message_set_fault (msg, + SOUP_XMLRPC_FAULT_SERVER_ERROR_INVALID_METHOD_PARAMETERS, + "%s", error->message); + g_clear_error (&error); + goto fail; } - if (soup_value_hash_lookup (arg, "tm_year", G_TYPE_INT, &val)) + if (g_variant_lookup (arg, "tm_year", "i", &val)) date->year = val + 1900; - if (soup_value_hash_lookup (arg, "tm_mon", G_TYPE_INT, &val)) + if (g_variant_lookup (arg, "tm_mon", "i", &val)) date->month = val + 1; - if (soup_value_hash_lookup (arg, "tm_mday", G_TYPE_INT, &val)) + if (g_variant_lookup (arg, "tm_mday", "i", &val)) date->day = val; - if (soup_value_hash_lookup (arg, "tm_hour", G_TYPE_INT, &val)) + if (g_variant_lookup (arg, "tm_hour", "i", &val)) date->hour = val; - if (soup_value_hash_lookup (arg, "tm_min", G_TYPE_INT, &val)) + if (g_variant_lookup (arg, "tm_min", "i", &val)) date->minute = val; - if (soup_value_hash_lookup (arg, "tm_sec", G_TYPE_INT, &val)) + if (g_variant_lookup (arg, "tm_sec", "i", &val)) date->second = val; - soup_xmlrpc_set_response (msg, SOUP_TYPE_DATE, date); + soup_xmlrpc_message_set_response (msg, + soup_xmlrpc_variant_new_datetime (date), + NULL); + + soup_date_free (date); + +fail: + g_variant_unref (args); + g_variant_unref (arg); + g_variant_unref (timestamp); } static void -do_echo (SoupMessage *msg, GValueArray *params) +do_echo (SoupMessage *msg, SoupXMLRPCParams *params) { - int i; - const char *val; - GValueArray *in, *out; + GVariant *args; + GVariant *child; - if (!soup_value_array_get_nth (params, 0, G_TYPE_VALUE_ARRAY, &in)) { - type_error (msg, G_TYPE_VALUE_ARRAY, params, 0); + if (!(args = parse_params (msg, params, "(as)"))) return; - } - out = g_value_array_new (in->n_values); - for (i = 0; i < in->n_values; i++) { - if (!soup_value_array_get_nth (in, i, G_TYPE_STRING, &val)) { - type_error (msg, G_TYPE_STRING, in, i); - return; - } - soup_value_array_append (out, G_TYPE_STRING, val); - } - - soup_xmlrpc_set_response (msg, G_TYPE_VALUE_ARRAY, out); - g_value_array_free (out); + child = g_variant_get_child_value (args, 0); + soup_xmlrpc_message_set_response (msg, child, NULL); + g_variant_unref (args); + g_variant_unref (child); } static void -do_ping (SoupMessage *msg, GValueArray *params) +do_ping (SoupMessage *msg, SoupXMLRPCParams *params) { - if (params->n_values) { - args_error (msg, params, 0); + GVariant *args; + + if (!(args = parse_params (msg, params, "()"))) return; - } - soup_xmlrpc_set_response (msg, G_TYPE_STRING, "pong"); + soup_xmlrpc_message_set_response (msg, g_variant_new_string ("pong"), NULL); + g_variant_unref (args); } static void @@ -199,7 +197,8 @@ server_callback (SoupServer *server, SoupMessage *msg, SoupClientContext *context, gpointer data) { char *method_name; - GValueArray *params; + SoupXMLRPCParams *params; + GError *error = NULL; if (msg->method != SOUP_METHOD_POST) { soup_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED); @@ -208,11 +207,13 @@ server_callback (SoupServer *server, SoupMessage *msg, soup_message_set_status (msg, SOUP_STATUS_OK); - if (!soup_xmlrpc_parse_method_call (msg->request_body->data, - msg->request_body->length, - &method_name, ¶ms)) { - soup_xmlrpc_set_fault (msg, SOUP_XMLRPC_FAULT_PARSE_ERROR_NOT_WELL_FORMED, - "Could not parse method call"); + method_name = soup_xmlrpc_parse_request (msg->request_body->data, + msg->request_body->length, + ¶ms, &error); + if (!method_name) { + soup_xmlrpc_message_set_fault (msg, SOUP_XMLRPC_FAULT_PARSE_ERROR_NOT_WELL_FORMED, + "Could not parse method call: %s", error->message); + g_clear_error (&error); return; } @@ -229,12 +230,12 @@ server_callback (SoupServer *server, SoupMessage *msg, else if (!strcmp (method_name, "ping")) do_ping (msg, params); else { - soup_xmlrpc_set_fault (msg, SOUP_XMLRPC_FAULT_SERVER_ERROR_REQUESTED_METHOD_NOT_FOUND, + soup_xmlrpc_message_set_fault (msg, SOUP_XMLRPC_FAULT_SERVER_ERROR_REQUESTED_METHOD_NOT_FOUND, "Unknown method %s", method_name); } g_free (method_name); - g_value_array_free (params); + soup_xmlrpc_params_free (params); } static gboolean @@ -310,15 +311,17 @@ int main (int argc, char **argv) { SoupServer *server; + SoupURI *server_uri; int ret; test_init (argc, argv, no_test_entry); - server = soup_test_server_new (run_tests); + server = soup_test_server_new (run_tests ? SOUP_TEST_SERVER_IN_THREAD : SOUP_TEST_SERVER_DEFAULT); soup_server_add_handler (server, "/xmlrpc-server.php", server_callback, NULL, NULL); - uri = g_strdup_printf ("http://127.0.0.1:%u/xmlrpc-server.php", - soup_server_get_port (server)); + server_uri = soup_test_server_get_uri (server, "http", NULL); + soup_uri_set_path (server_uri, "/xmlrpc-server.php"); + uri = soup_uri_to_string (server_uri, FALSE); if (run_tests) { char *out, **tests, *path; @@ -353,7 +356,7 @@ main (int argc, char **argv) } else { GMainLoop *loop; - g_print ("Listening on port %d\n", soup_server_get_port (server)); + g_print ("Listening on port %d\n", server_uri->port); loop = g_main_loop_new (NULL, TRUE); g_main_loop_run (loop); @@ -363,6 +366,7 @@ main (int argc, char **argv) } soup_test_server_quit_unref (server); + soup_uri_free (server_uri); g_free (uri); if (run_tests) test_cleanup (); diff --git a/tests/xmlrpc-server.php b/tests/xmlrpc-server.php index 66cb2be7..f315b6d0 100644 --- a/tests/xmlrpc-server.php +++ b/tests/xmlrpc-server.php @@ -18,7 +18,7 @@ function sum ($method_name, $params, $app_data) $sum = 0; foreach ($params[0] as $val) { - if (xmlrpc_get_type ($val) != "int") + if (xmlrpc_get_type ($val) != "double") return paramfault(); $sum = $sum + $val; @@ -71,7 +71,7 @@ function echo_ ($method_name, $params, $app_data) function ping ($method_name, $params, $app_data) { - if (count ($params) == 0) + if (is_null ($params) or count ($params) == 0) return "pong"; else return paramfault (); diff --git a/tests/xmlrpc-test.c b/tests/xmlrpc-test.c index f6b20b8f..58d96abc 100644 --- a/tests/xmlrpc-test.c +++ b/tests/xmlrpc-test.c @@ -1,14 +1,11 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 2001-2003, Ximian, Inc. + * Copyright 2001-2003, Ximian, Inc. + * Copyright 2015, Collabora ltd. */ #include "test-utils.h" -#ifdef G_GNUC_BEGIN_IGNORE_DEPRECATIONS -G_GNUC_BEGIN_IGNORE_DEPRECATIONS -#endif - static SoupSession *session; static const char *default_uri = "http://127.0.0.1:47524/xmlrpc-server.php"; static const char *uri = NULL; @@ -26,20 +23,8 @@ static gboolean server_test = FALSE; } G_STMT_END #endif -static const char *const value_type[] = { - "BAD", - "int", - "boolean", - "string", - "double", - "datetime", - "base64", - "struct", - "array" -}; - static gboolean -send_xmlrpc (const char *body, GValue *retval) +send_xmlrpc (const char *body, const char *signature, GVariant **retval) { SoupMessage *msg; GError *err = NULL; @@ -51,115 +36,94 @@ send_xmlrpc (const char *body, GValue *retval) soup_test_assert_message_status (msg, SOUP_STATUS_OK); - if (!soup_xmlrpc_parse_method_response (msg->response_body->data, - msg->response_body->length, - retval, &err)) { - if (err) { + *retval = soup_xmlrpc_parse_response (msg->response_body->data, + msg->response_body->length, + signature, &err); + if (!*retval) { + if (err->domain == SOUP_XMLRPC_FAULT) soup_test_assert (FALSE, "FAULT: %d %s\n", err->code, err->message); - g_error_free (err); - } else - soup_test_assert (FALSE, "ERROR: could not parse response\n"); + else + soup_test_assert (FALSE, "ERROR: %s\n", err->message); + g_error_free (err); g_object_unref (msg); return FALSE; } - g_object_unref (msg); return TRUE; } static gboolean -do_xmlrpc (const char *method, GValue *retval, ...) +do_xmlrpc (const char *method, GVariant *args, const char *signature, GVariant **retval) { - va_list args; - GValueArray *params; - char *body; gboolean ret; + char *body; + GError *error = NULL; - va_start (args, retval); - params = soup_value_array_from_args (args); - va_end (args); - - body = soup_xmlrpc_build_method_call (method, params->values, - params->n_values); - g_value_array_free (params); + body = soup_xmlrpc_build_request (method, args, &error); + g_assert_no_error (error); if (!body) return FALSE; - ret = send_xmlrpc (body, retval); + ret = send_xmlrpc (body, signature, retval); g_free (body); return ret; } -static gboolean -check_xmlrpc (GValue *value, GType type, ...) -{ - va_list args; - - if (!G_VALUE_HOLDS (value, type)) { - g_assert_true (G_VALUE_HOLDS (value, type)); - return FALSE; - } - - va_start (args, type); - SOUP_VALUE_GETV (value, type, args); - va_end (args); - return TRUE; -} - static void test_sum (void) { - GValueArray *ints; - int i, val, sum, result; - GValue retval; + GVariantBuilder builder; + int i; + double val, sum, result; + GVariant *retval; gboolean ok; SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; - debug_printf (2, "sum (array of int -> int): "); + debug_printf (2, "sum (array of double -> double): "); - ints = g_value_array_new (10); + g_variant_builder_init (&builder, G_VARIANT_TYPE ("ad")); for (i = sum = 0; i < 10; i++) { - val = g_random_int_range (0, 100); - debug_printf (2, "%s%d", i == 0 ? "[" : ", ", val); - soup_value_array_append (ints, G_TYPE_INT, val); + val = g_random_int_range (0, 400) / 4.0; + debug_printf (2, "%s%.2f", i == 0 ? "[" : ", ", val); + g_variant_builder_add (&builder, "d", val); sum += val; } debug_printf (2, "] -> "); - ok = (do_xmlrpc ("sum", &retval, - G_TYPE_VALUE_ARRAY, ints, - G_TYPE_INVALID) && - check_xmlrpc (&retval, G_TYPE_INT, &result)); - g_value_array_free (ints); + ok = do_xmlrpc ("sum", + g_variant_new ("(@ad)", g_variant_builder_end (&builder)), + "d", &retval); if (!ok) return; - debug_printf (2, "%d\n", result); - g_assert_cmpint (result, ==, sum); + result = g_variant_get_double (retval); + debug_printf (2, "%.2f\n", result); + g_assert_cmpfloat (result, ==, sum); + + g_variant_unref (retval); } static void test_countBools (void) { - GValueArray *bools; + GVariantBuilder builder; int i, trues, falses; - GValue retval; + GVariant *retval; int ret_trues, ret_falses; gboolean val, ok; - GHashTable *result; SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; debug_printf (2, "countBools (array of boolean -> struct of ints): "); - bools = g_value_array_new (10); + g_variant_builder_init (&builder, G_VARIANT_TYPE ("ab")); for (i = trues = falses = 0; i < 10; i++) { val = g_random_boolean (); debug_printf (2, "%s%c", i == 0 ? "[" : ", ", val ? 'T' : 'F'); - soup_value_array_append (bools, G_TYPE_BOOLEAN, val); + g_variant_builder_add (&builder, "b", val); if (val) trues++; else @@ -167,18 +131,16 @@ test_countBools (void) } debug_printf (2, "] -> "); - ok = (do_xmlrpc ("countBools", &retval, - G_TYPE_VALUE_ARRAY, bools, - G_TYPE_INVALID) && - check_xmlrpc (&retval, G_TYPE_HASH_TABLE, &result)); - g_value_array_free (bools); + ok = do_xmlrpc ("countBools", + g_variant_new ("(@ab)", g_variant_builder_end (&builder)), + "a{si}", &retval); if (!ok) return; - g_assert_true (soup_value_hash_lookup (result, "true", G_TYPE_INT, &ret_trues)); - g_assert_true (soup_value_hash_lookup (result, "false", G_TYPE_INT, &ret_falses)); - - g_hash_table_destroy (result); + g_assert_true (g_variant_lookup (retval, "true", "i", &ret_trues)); + g_assert_true (g_variant_lookup (retval, "false", "i", &ret_falses)); + g_assert_cmpint (g_variant_n_children (retval), ==, 2); + g_variant_unref (retval); debug_printf (2, "{ true: %d, false: %d }\n", ret_trues, ret_falses); g_assert_cmpint (trues, ==, ret_trues); @@ -188,12 +150,12 @@ test_countBools (void) static void test_md5sum (void) { - GByteArray *data, *result; + GByteArray *data; int i; GChecksum *checksum; guchar digest[16]; gsize digest_len = sizeof (digest); - GValue retval; + GVariant *retval; gboolean ok; SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; @@ -210,27 +172,30 @@ test_md5sum (void) g_checksum_get_digest (checksum, digest, &digest_len); g_checksum_free (checksum); - ok = (do_xmlrpc ("md5sum", &retval, - SOUP_TYPE_BYTE_ARRAY, data, - G_TYPE_INVALID) && - check_xmlrpc (&retval, SOUP_TYPE_BYTE_ARRAY, &result)); + ok = do_xmlrpc ("md5sum", + g_variant_new ("(@ay)", + g_variant_new_from_data (G_VARIANT_TYPE_BYTESTRING, + data->data, data->len, + TRUE, NULL, NULL)), + "ay", &retval); g_byte_array_free (data, TRUE); if (!ok) return; - soup_assert_cmpmem (result->data, result->len, + soup_assert_cmpmem (g_variant_get_data (retval), g_variant_get_size (retval), digest, digest_len); - g_byte_array_free (result, TRUE); + g_variant_unref (retval); } static void test_dateChange (void) { - GHashTable *structval; + GVariantDict structval; SoupDate *date, *result; char *timestamp; - GValue retval; + GVariant *retval; gboolean ok; + GError *error = NULL; SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; @@ -243,65 +208,69 @@ test_dateChange (void) g_random_int_range (0, 60), g_random_int_range (0, 60)); if (debug_level >= 2) { - timestamp = soup_date_to_string (date, SOUP_DATE_ISO8601_XMLRPC); - debug_printf (2, "date: %s, {", timestamp); - g_free (timestamp); + char *tmp; + + tmp = soup_date_to_string (date, SOUP_DATE_ISO8601_XMLRPC); + debug_printf (2, "date: %s, {", tmp); + g_free (tmp); } - structval = soup_value_hash_new (); + g_variant_dict_init (&structval, NULL); #define MAYBE (g_random_int_range (0, 3) != 0) if (MAYBE) { date->year = 1970 + (g_random_int_range (0, 50)); debug_printf (2, "tm_year: %d, ", date->year - 1900); - soup_value_hash_insert (structval, "tm_year", - G_TYPE_INT, date->year - 1900); + g_variant_dict_insert (&structval, "tm_year", + "i", date->year - 1900); } if (MAYBE) { date->month = 1 + g_random_int_range (0, 12); debug_printf (2, "tm_mon: %d, ", date->month - 1); - soup_value_hash_insert (structval, "tm_mon", - G_TYPE_INT, date->month - 1); + g_variant_dict_insert (&structval, "tm_mon", + "i", date->month - 1); } if (MAYBE) { date->day = 1 + g_random_int_range (0, 28); debug_printf (2, "tm_mday: %d, ", date->day); - soup_value_hash_insert (structval, "tm_mday", - G_TYPE_INT, date->day); + g_variant_dict_insert (&structval, "tm_mday", + "i", date->day); } if (MAYBE) { date->hour = g_random_int_range (0, 24); debug_printf (2, "tm_hour: %d, ", date->hour); - soup_value_hash_insert (structval, "tm_hour", - G_TYPE_INT, date->hour); + g_variant_dict_insert (&structval, "tm_hour", + "i", date->hour); } if (MAYBE) { date->minute = g_random_int_range (0, 60); debug_printf (2, "tm_min: %d, ", date->minute); - soup_value_hash_insert (structval, "tm_min", - G_TYPE_INT, date->minute); + g_variant_dict_insert (&structval, "tm_min", + "i", date->minute); } if (MAYBE) { date->second = g_random_int_range (0, 60); debug_printf (2, "tm_sec: %d, ", date->second); - soup_value_hash_insert (structval, "tm_sec", - G_TYPE_INT, date->second); + g_variant_dict_insert (&structval, "tm_sec", + "i", date->second); } debug_printf (2, "} -> "); - ok = (do_xmlrpc ("dateChange", &retval, - SOUP_TYPE_DATE, date, - G_TYPE_HASH_TABLE, structval, - G_TYPE_INVALID) && - check_xmlrpc (&retval, SOUP_TYPE_DATE, &result)); - g_hash_table_destroy (structval); + ok = do_xmlrpc ("dateChange", + g_variant_new ("(vv)", + soup_xmlrpc_variant_new_datetime (date), + g_variant_dict_end (&structval)), + NULL, &retval); if (!ok) { soup_date_free (date); return; } + result = soup_xmlrpc_variant_get_datetime (retval, &error); + g_assert_no_error (error); + if (debug_level >= 2) { timestamp = soup_date_to_string (result, SOUP_DATE_ISO8601_XMLRPC); debug_printf (2, "%s\n", timestamp); @@ -317,81 +286,58 @@ test_dateChange (void) soup_date_free (date); soup_date_free (result); + g_variant_unref (retval); } static const char *const echo_strings[] = { "This is a test", "& so is this", "and so is ", - "& so is <this>" -}; -#define N_ECHO_STRINGS G_N_ELEMENTS (echo_strings) - -static const char *const echo_strings_broken[] = { - "This is a test", - " so is this", - "and so is this", - "amp; so is lt;thisgt;" + "& so is <this>", + NULL }; static void test_echo (void) { - GValueArray *originals, *echoes; - GValue retval; - int i; + GVariant *originals; + GVariant *retval; + char *str; SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; debug_printf (2, "echo (array of string -> array of string):\n"); - originals = g_value_array_new (N_ECHO_STRINGS); - for (i = 0; i < N_ECHO_STRINGS; i++) { - soup_value_array_append (originals, G_TYPE_STRING, echo_strings[i]); - debug_printf (2, "%s\"%s\"", i == 0 ? "[" : ", ", echo_strings[i]); - } - debug_printf (2, "] -> "); + originals = g_variant_new ("^as", echo_strings); + g_variant_ref_sink (originals); + str = g_variant_print (originals, TRUE); + debug_printf (2, "%s -> ", str); + g_free (str); - if (!(do_xmlrpc ("echo", &retval, - G_TYPE_VALUE_ARRAY, originals, - G_TYPE_INVALID) && - check_xmlrpc (&retval, G_TYPE_VALUE_ARRAY, &echoes))) { - g_value_array_free (originals); + if (!do_xmlrpc ("echo", + g_variant_new ("(@as)", originals), + "as", &retval)) { + g_variant_unref (originals); return; } - g_value_array_free (originals); - if (debug_level >= 2) { - for (i = 0; i < echoes->n_values; i++) { - debug_printf (2, "%s\"%s\"", i == 0 ? "[" : ", ", - g_value_get_string (&echoes->values[i])); - } - debug_printf (2, "]\n"); - } + str = g_variant_print (retval, TRUE); + debug_printf (2, "%s\n", str); + g_free (str); - g_assert_cmpint (echoes->n_values, ==, N_ECHO_STRINGS); + g_assert_true (g_variant_equal (originals, retval)); - for (i = 0; i < echoes->n_values; i++) { - if (!server_test && strcmp (echo_strings_broken[i], g_value_get_string (&echoes->values[i])) == 0) { - g_test_skip ("PHP bug"); - g_value_array_free (echoes); - return; - } - - g_assert_cmpstr (echo_strings[i], ==, g_value_get_string (&echoes->values[i])); - } - - g_value_array_free (echoes); + g_variant_unref (originals); + g_variant_unref (retval); } static void test_ping (gconstpointer include_params) { - GValueArray *params; - GValue retval; + GVariant *retval; char *request; - char *out; gboolean ret; + GError *error = NULL; g_test_bug ("671661"); @@ -400,10 +346,8 @@ test_ping (gconstpointer include_params) debug_printf (2, "ping (void (%s) -> string)\n", include_params ? "empty " : "no "); - params = soup_value_array_new (); - request = soup_xmlrpc_build_method_call ("ping", params->values, - params->n_values); - g_value_array_free (params); + request = soup_xmlrpc_build_request ("ping", g_variant_new ("()"), &error); + g_assert_no_error (error); if (!request) return; @@ -419,15 +363,14 @@ test_ping (gconstpointer include_params) memmove (params, end, strlen (end) + 1); } - ret = send_xmlrpc (request, &retval); + ret = send_xmlrpc (request, "s", &retval); g_free (request); - if (!ret || !check_xmlrpc (&retval, G_TYPE_STRING, &out)) + if (!ret) return; - g_assert_cmpstr (out, ==, "pong"); - - g_free (out); + g_assert_cmpstr (g_variant_get_string (retval, NULL), ==, "pong"); + g_variant_unref (retval); } static void @@ -435,7 +378,6 @@ do_bad_xmlrpc (const char *body) { SoupMessage *msg; GError *err = NULL; - GValue retval; msg = soup_message_new ("POST", uri); soup_message_set_request (msg, "text/xml", SOUP_MEMORY_COPY, @@ -444,17 +386,17 @@ do_bad_xmlrpc (const char *body) soup_test_assert_message_status (msg, SOUP_STATUS_OK); - if (!soup_xmlrpc_parse_method_response (msg->response_body->data, - msg->response_body->length, - &retval, &err)) { - if (err) { + if (!soup_xmlrpc_parse_response (msg->response_body->data, + msg->response_body->length, + "()", &err)) { + if (err->domain == SOUP_XMLRPC_FAULT) { debug_printf (1, "FAULT: %d %s (OK!)\n", err->code, err->message); g_error_free (err); g_object_unref (msg); return; } else - soup_test_assert (FALSE, "ERROR: could not parse response\n"); + soup_test_assert (FALSE, "ERROR: could not parse response: %s\n", err->message); } else soup_test_assert (FALSE, "Unexpectedly got successful response!\n"); @@ -485,6 +427,272 @@ test_fault_args (void) do_bad_xmlrpc ("sum1"); } +#define BODY_PREFIX \ + "\n" \ + "MyMethod" +#define BODY_SUFFIX \ + "\n" + +static void +verify_serialization (GVariant *value, + const char *expected_params) +{ + char *debug; + char *body; + char *params; + GError *error = NULL; + + debug = g_variant_print (value, TRUE); + + body = soup_xmlrpc_build_request ("MyMethod", value, &error); + g_assert_no_error (error); + g_assert (g_str_has_prefix (body, BODY_PREFIX)); + g_assert (g_str_has_suffix (body, BODY_SUFFIX)); + + params = g_strndup (body + strlen (BODY_PREFIX), + strlen (body) - strlen (BODY_PREFIX) + - strlen (BODY_SUFFIX)); + + if (!g_str_equal (params, expected_params)) + g_error ("Failed to serialize '%s':\n" + " expected: %s\n" + " got: %s\n", + debug, expected_params, params); + + g_free (params); + g_free (body); + g_free (debug); +} + +static void +verify_serialization_fail (GVariant *value) +{ + char *body; + GError *error = NULL; + + body = soup_xmlrpc_build_request ("MyMethod", value, &error); + g_assert (body == NULL); + g_assert (error != NULL); +} + +static void +test_serializer (void) +{ + SoupDate *date; + + verify_serialization (g_variant_new_parsed ("()"), + ""); + verify_serialization (g_variant_new_parsed ("(1, 2)"), + "" + "1" + "2" + ""); + verify_serialization (g_variant_new_parsed ("((1, 2),)"), + "" + "1" + "2" + ""); + verify_serialization (g_variant_new_parsed ("({'one', 1},)"), + "" + "one1" + ""); + verify_serialization (g_variant_new_parsed ("([{'one', 1},{'two', 2}],)"), + "" + "one1" + "two2" + ""); + verify_serialization (g_variant_new ("(^ay)", "bytestring"), + "" + "Ynl0ZXN0cmluZwA=" + ""); + verify_serialization (g_variant_new ("(y)", 42), + "" + "42" + ""); + date = soup_date_new_from_time_t (1434161309); + verify_serialization (g_variant_new ("(v)", soup_xmlrpc_variant_new_datetime (date)), + "" + "20150613T02:08:29" + ""); + soup_date_free (date); + verify_serialization (g_variant_new ("(s)", "<>&"), + "" + "<>&" + ""); + verify_serialization (g_variant_new ("(u)", 0), + "" + "0" + ""); + + verify_serialization_fail (g_variant_new_parsed ("({1, 2},)")); + verify_serialization_fail (g_variant_new ("(mi)", NULL)); + verify_serialization_fail (g_variant_new ("(t)", 0)); +} + +static void +verify_deserialization (GVariant *expected_variant, + const char *signature, + const char *params) +{ + char *body; + char *method_name; + SoupXMLRPCParams *out_params = NULL; + GVariant *variant; + GError *error = NULL; + + body = g_strconcat (BODY_PREFIX, params, BODY_SUFFIX, NULL); + method_name = soup_xmlrpc_parse_request (body, strlen (body), + &out_params, + &error); + g_assert_no_error (error); + g_assert_cmpstr (method_name, ==, "MyMethod"); + + variant = soup_xmlrpc_params_parse (out_params, signature, &error); + g_assert_no_error (error); + + if (!g_variant_equal (variant, expected_variant)) { + char *str1, *str2; + + str1 = g_variant_print (expected_variant, TRUE); + str2 = g_variant_print (variant, TRUE); + g_error ("Failed to deserialize '%s':\n" + " expected: %s\n" + " got: %s\n", + params, str1, str2); + g_free (str1); + g_free (str2); + } + + soup_xmlrpc_params_free (out_params); + g_variant_unref (variant); + g_free (method_name); + g_free (body); +} + +static void +verify_deserialization_fail (const char *signature, + const char *params) +{ + char *body; + char *method_name; + SoupXMLRPCParams *out_params = NULL; + GVariant *variant; + GError *error = NULL; + + body = g_strconcat (BODY_PREFIX, params, BODY_SUFFIX, NULL); + method_name = soup_xmlrpc_parse_request (body, strlen (body), + &out_params, + &error); + g_assert_no_error (error); + g_assert_cmpstr (method_name, ==, "MyMethod"); + + variant = soup_xmlrpc_params_parse (out_params, signature, &error); + g_assert_error (error, SOUP_XMLRPC_ERROR, SOUP_XMLRPC_ERROR_ARGUMENTS); + g_assert (variant == NULL); + + g_free (body); + soup_xmlrpc_params_free (out_params); +} + +static void +test_deserializer (void) +{ + char *tmp; + SoupDate *date; + + verify_deserialization (g_variant_new_parsed ("@av []"), + NULL, + ""); + verify_deserialization (g_variant_new_parsed ("()"), + "()", + ""); + verify_deserialization (g_variant_new_parsed ("(@y 1,@n 2)"), + "(yn)", + "" + "1" + "2" + ""); + verify_deserialization (g_variant_new_parsed ("[<[{'one', <1>},{'two', <2>}]>]"), + NULL, + "" + "one1" + "two2" + ""); + verify_deserialization (g_variant_new_parsed ("([{'one', 1},{'two', 2}],)"), + "(a{si})", + "" + "one1" + "two2" + ""); + date = soup_date_new_from_time_t (1434146909); + verify_deserialization (g_variant_new_parsed ("[%v]", soup_xmlrpc_variant_new_datetime (date)), + NULL, + "" + "20150612T22:08:29" + ""); + soup_date_free (date); + verify_deserialization (g_variant_new_parsed ("[]"), + NULL, + "" + "Ynl0ZXN0cmluZwA=" + ""); + verify_deserialization (g_variant_new_parsed ("[<1>]"), + "av", + "1"); + verify_deserialization (g_variant_new_parsed ("[<%s>]", "<>&"), + NULL, + "" + "<>&" + ""); + verify_deserialization (g_variant_new_parsed ("(@y 255,)"), + "(y)", + "" + "255" + ""); + + tmp = g_strdup_printf ("" + "%"G_GUINT64_FORMAT"" + "", G_MAXUINT64); + verify_deserialization (g_variant_new ("(t)", G_MAXUINT64), + "(t)", tmp); + g_free (tmp); + + verify_deserialization_fail (NULL, + "" + "2" + ""); + verify_deserialization_fail ("(y)", + "" + "256" + ""); + verify_deserialization_fail ("(ii)", + "" + "1" + ""); + verify_deserialization_fail ("(i)", + "" + "1" + "2" + ""); +} + +static void +test_fault (void) +{ + char *body; + GVariant *reply; + GError *error = NULL; + + body = soup_xmlrpc_build_fault (1, "error: %s", "failed"); + reply = soup_xmlrpc_parse_response (body, strlen (body), NULL, &error); + g_assert_error (error, SOUP_XMLRPC_FAULT, 1); + g_assert_cmpstr (error->message, ==, "error: failed"); + g_assert (reply == NULL); + + g_free (body); + g_clear_error (&error); +} + static GOptionEntry xmlrpc_entries[] = { { "uri", 'U', 0, G_OPTION_ARG_STRING, &uri, "Alternate URI for server", NULL }, @@ -507,16 +715,19 @@ main (int argc, char **argv) session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, NULL); - g_test_add_func ("/xmlrpc/sum", test_sum); - g_test_add_func ("/xmlrpc/countBools", test_countBools); - g_test_add_func ("/xmlrpc/md5sum", test_md5sum); - g_test_add_func ("/xmlrpc/dateChange", test_dateChange); - g_test_add_func ("/xmlrpc/echo", test_echo); - g_test_add_data_func ("/xmlrpc/ping/empty-params", GINT_TO_POINTER (TRUE), test_ping); - g_test_add_data_func ("/xmlrpc/ping/no-params", GINT_TO_POINTER (FALSE), test_ping); - g_test_add_func ("/xmlrpc/fault/malformed", test_fault_malformed); - g_test_add_func ("/xmlrpc/fault/method", test_fault_method); - g_test_add_func ("/xmlrpc/fault/args", test_fault_args); + g_test_add_func ("/xmlrpc/variant/serializer", test_serializer); + g_test_add_func ("/xmlrpc/variant/deserializer", test_deserializer); + g_test_add_func ("/xmlrpc/variant/fault", test_fault); + g_test_add_func ("/xmlrpc/variant/sum", test_sum); + g_test_add_func ("/xmlrpc/variant/countBools", test_countBools); + g_test_add_func ("/xmlrpc/variant/md5sum", test_md5sum); + g_test_add_func ("/xmlrpc/variant/dateChange", test_dateChange); + g_test_add_func ("/xmlrpc/variant/echo", test_echo); + g_test_add_data_func ("/xmlrpc/variant/ping/empty-params", GINT_TO_POINTER (TRUE), test_ping); + g_test_add_data_func ("/xmlrpc/variant/ping/no-params", GINT_TO_POINTER (FALSE), test_ping); + g_test_add_func ("/xmlrpc/variant/fault/malformed", test_fault_malformed); + g_test_add_func ("/xmlrpc/variant/fault/method", test_fault_method); + g_test_add_func ("/xmlrpc/variant/fault/args", test_fault_args); ret = g_test_run (); diff --git a/win32/Makefile-newvs.am b/win32/Makefile-newvs.am new file mode 100644 index 00000000..3a91862b --- /dev/null +++ b/win32/Makefile-newvs.am @@ -0,0 +1,55 @@ +# Centralized autotools file +# Create the Visual Studio 2012/2013/2015 project files +# from the Visual Studio 2010 project files + +# This autotools file, from GLib, can be used in other projects +# that have Visual Studio build support. + +# Author: Fan, Chun-wei +# November 05, 2012 + +# MSVC_BASE_VER: Baseline MSVC 201x version to copy/process project files from (100 for 2010, 120 for 2013) +# MSVC_BASE_VER_LONG: Long Version of baseline Visual Studio 201x version (2010, 2012, 2013, 14, 15) +# MSVC_BASE_TOOLSET: Use if baseline MSVC toolset is not in the form v$(MSVC_BASE_VER)0, meaning v$(MSVC_BASE_TOOLSET) +# MSVC_VER_LONG: Long Version of target Visual Studio (2012, 2013, 14 and so on) +# MSVC_VER: Short Version of target Visual Studio (110 for 2012, 120 for 2013, 140 for 2015, 141 for 2017) +# MSVC_TOOLSET: Use if target MSVC toolsett is not in the form v $(MSVC_VER)0, meaning v$(MSVC_TOOLSET) + +if MSVC_BASE_NO_TOOLSET_SET +MSVC_BASE_TOOLSET = $(MSVC_BASE_VER)0 +endif + +if MSVC_NO_TOOLSET_SET +MSVC_TOOLSET = $(MSVC_VER)0 +endif + +%.sln: + sed 's/11\.00/12\.00/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + sed 's/$(MSVC_BASE_VER_LONG)/$(MSVC_VER_LONG)/g' < $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/win32/vs$(MSVC_VER)/$@ + rm $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + +%.txt: + sed 's/vs$(MSVC_BASE_VER)/vs$(MSVC_VER)/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + sed 's/VS$(MSVC_BASE_VER)/VS$(MSVC_VER)/g' < $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/win32/vs$(MSVC_VER)/$@ + rm $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + +%.vcxproj: + if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \ + sed 's/v$(MSVC_BASE_TOOLSET)/v$(MSVC_TOOLSET)/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + else \ + sed 's/v$(MSVC_BASE_TOOLSET)/v$(MSVC_TOOLSET)/g' < $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + fi + +%.props: $(top_builddir)/win32/vs$(MSVC_BASE_VER)/Makefile + if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \ + sed 's/$(MSVC_BASE_VER)<\/VSVer>/$(MSVC_VER)<\/VSVer>/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + else \ + sed 's/$(MSVC_BASE_VER)<\/VSVer>/$(MSVC_VER)<\/VSVer>/g' < $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + fi + +%.vcxproj.filters: + if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \ + cp $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + else \ + cp $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + fi diff --git a/win32/Makefile.am b/win32/Makefile.am new file mode 100644 index 00000000..e1d5759d --- /dev/null +++ b/win32/Makefile.am @@ -0,0 +1,35 @@ +SUBDIRS = vs9 vs10 vs11 vs12 vs14 vs15 + +if HAVE_INTROSPECTION +GENERATED_ITEMS = \ + introspection.body.mak \ + Soup_2_4_gir_list \ + SoupGNOME_2_4_gir_list + +MSVC_INTROSPECTION_INTERMEDIATE_FILES = Soup-2.4.gir.msvc.introspect SoupGNOME-2.4.gir.msvc.introspect + +introspection.body.mak: $(MSVC_INTROSPECTION_INTERMEDIATE_FILES) + -$(RM) introspection.body.mak + for F in `ls *.msvc.introspect`; do \ + case $$F in \ + *) cat $(top_builddir)/win32/$$F >>introspection.body.mak \ + ;; \ + esac; \ + done + $(RM) $(MSVC_INTROSPECTION_INTERMEDIATE_FILES) + +DISTCLEANFILES = $(GENERATED_ITEMS) + +else +GENERATED_ITEMS = +endif + +EXTRA_DIST = \ + pc_base.py \ + replace.py \ + souppc.py \ + soup_version_h.py \ + detectenv-msvc.mak \ + introspection-msvc.mak \ + soup-introspection-msvc.mak \ + $(GENERATED_ITEMS) diff --git a/win32/Makefile.in b/win32/Makefile.in new file mode 100644 index 00000000..17b30712 --- /dev/null +++ b/win32/Makefile.in @@ -0,0 +1,732 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = win32 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/glibtests.m4 $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/vapigen.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APACHE_HTTPD = @APACHE_HTTPD@ +APACHE_MODULE_DIR = @APACHE_MODULE_DIR@ +APACHE_PHP_MODULE_DIR = @APACHE_PHP_MODULE_DIR@ +APACHE_SSL_MODULE_DIR = @APACHE_SSL_MODULE_DIR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL = @CURL@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MAKEFILE = @GLIB_MAKEFILE@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GMSGFMT = @GMSGFMT@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_GNOME = @HAVE_GNOME@ +HTML_DIR = @HTML_DIR@ +IF_HAVE_MOD_UNIXD = @IF_HAVE_MOD_UNIXD@ +IF_HAVE_PHP = @IF_HAVE_PHP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ +INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ +INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ +INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ +INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ +INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ +INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +KRB5_CFLAGS = @KRB5_CFLAGS@ +KRB5_CONFIG = @KRB5_CONFIG@ +KRB5_LIBS = @KRB5_LIBS@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PHP = @PHP@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOUP_AGE = @SOUP_AGE@ +SOUP_API_VERSION = @SOUP_API_VERSION@ +SOUP_CURRENT = @SOUP_CURRENT@ +SOUP_DEBUG_FLAGS = @SOUP_DEBUG_FLAGS@ +SOUP_HIDDEN_VISIBILITY_CFLAGS = @SOUP_HIDDEN_VISIBILITY_CFLAGS@ +SOUP_MAJOR_VERSION = @SOUP_MAJOR_VERSION@ +SOUP_MICRO_VERSION = @SOUP_MICRO_VERSION@ +SOUP_MINOR_VERSION = @SOUP_MINOR_VERSION@ +SOUP_REVISION = @SOUP_REVISION@ +SQLITE_CFLAGS = @SQLITE_CFLAGS@ +SQLITE_LIBS = @SQLITE_LIBS@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VALAC = @VALAC@ +VAPIDIR = @VAPIDIR@ +VAPIGEN = @VAPIGEN@ +VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ +VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XML_CFLAGS = @XML_CFLAGS@ +XML_LIBS = @XML_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +installed_test_metadir = @installed_test_metadir@ +installed_testdir = @installed_testdir@ +intltool__v_merge_options_ = @intltool__v_merge_options_@ +intltool__v_merge_options_0 = @intltool__v_merge_options_0@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +ntlm_auth = @ntlm_auth@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = vs9 vs10 vs11 vs12 vs14 vs15 +@HAVE_INTROSPECTION_FALSE@GENERATED_ITEMS = +@HAVE_INTROSPECTION_TRUE@GENERATED_ITEMS = \ +@HAVE_INTROSPECTION_TRUE@ introspection.body.mak \ +@HAVE_INTROSPECTION_TRUE@ Soup_2_4_gir_list \ +@HAVE_INTROSPECTION_TRUE@ SoupGNOME_2_4_gir_list + +@HAVE_INTROSPECTION_TRUE@MSVC_INTROSPECTION_INTERMEDIATE_FILES = Soup-2.4.gir.msvc.introspect SoupGNOME-2.4.gir.msvc.introspect +@HAVE_INTROSPECTION_TRUE@DISTCLEANFILES = $(GENERATED_ITEMS) +EXTRA_DIST = \ + pc_base.py \ + replace.py \ + souppc.py \ + soup_version_h.py \ + detectenv-msvc.mak \ + introspection-msvc.mak \ + soup-introspection-msvc.mak \ + $(GENERATED_ITEMS) + +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign win32/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign win32/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +@HAVE_INTROSPECTION_TRUE@introspection.body.mak: $(MSVC_INTROSPECTION_INTERMEDIATE_FILES) +@HAVE_INTROSPECTION_TRUE@ -$(RM) introspection.body.mak +@HAVE_INTROSPECTION_TRUE@ for F in `ls *.msvc.introspect`; do \ +@HAVE_INTROSPECTION_TRUE@ case $$F in \ +@HAVE_INTROSPECTION_TRUE@ *) cat $(top_builddir)/win32/$$F >>introspection.body.mak \ +@HAVE_INTROSPECTION_TRUE@ ;; \ +@HAVE_INTROSPECTION_TRUE@ esac; \ +@HAVE_INTROSPECTION_TRUE@ done +@HAVE_INTROSPECTION_TRUE@ $(RM) $(MSVC_INTROSPECTION_INTERMEDIATE_FILES) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/win32/Makefile.msvc-introspection b/win32/Makefile.msvc-introspection new file mode 100644 index 00000000..1a244e0d --- /dev/null +++ b/win32/Makefile.msvc-introspection @@ -0,0 +1,129 @@ +# Author: Fan, Chun-wei +# Common autotools file for constructing the g-ir-scanner and +# g-ir-compiler command lines for Visual Studio builds. + +# This is copied from $(srcroot)/win32 from the gobject-introspection +# project, which may be included in projects that support both +# Visual Studio builds and introspection. + +# * Input variables: +# +# MSVC_INTROSPECT_GIRS - List of .gir's that should be built +# in the NMake Makefiles +# +# * Simple tutorial +# +# Add this to Makefile.am where your library/program is built: +# (Either YourLib_1_0_gir_MSVC_LIBS or YourLib_1_0_gir_MSVC_PROGRAM +# is required unless --headers-only is specified in +# YourLib_1_0_gir__MSVC_SCANNERFLAGS) +# +# include +# MSVC_INTROSPECT_GIRS = YourLib-1.0.gir +# YourLib_1_0_gir_NAMESPACE = YourLib # This is optional +# YourLib_1_0_gir_VERSION = 1.0 # This is optional +# YourLib_1_0_gir_MSVC_LIBS = yourlib-1.0 +# YourLib_1_0_gir_MSVC_FILES = $(libyourlib_1_0_SOURCES) +# YourLib_1_0_gir_MSVC_PROGRAM = YourProgram +# YourLib_1_0_gir_MSVC_PACKAGES = (Dependent .pc files) +# YourLib_1_0_gir_MSVC_INCLUDE_GIRS = (Dependent external .gir's) +# YourLib_1_0_gir_MSVC_EXPORT_PACKAGES = (Packages exported by this .gir) +# YourLib_1_0_gir_MSVC_C_INCLUDES = (List of public C headers which need to be included by +# consumers at compile time to make use of the API) + +# Private functions + +## Transform the MSVC project filename (no filename extensions) to something which can reference through a variable +## without automake/make complaining, eg Gtk-2.0 -> Gtk_2_0 +_gir_name=$(subst /,_,$(subst -,_,$(subst .,_,$(1)))) + +# Namespace and Version is either fetched from the gir filename +# or the _NAMESPACE/_VERSION variable combo +_gir_namespace_msvc = $(or $($(_gir_name)_NAMESPACE),$(firstword $(subst -, ,$(notdir $(1))))) +_gir_version_msvc = $(or $($(_gir_name)_VERSION),$(lastword $(subst -, ,$(1:.gir=)))) +_typelib_basename_msvc = $(_gir_namespace_msvc)'-'$(_gir_version_msvc) + +# _PROGRAM is an optional variable which needs its own --program argument +_gir_program_msvc = $(if $($(_gir_name)_MSVC_PROGRAM),--program=$($(_gir_name)_MSVC_PROGRAM)) + +# Deduce the sub-folder from $(srcroot) where the sources reside in +_gir_source_path_raw_msvc:=$(subst $(abs_top_srcdir),,$(abs_srcdir)) +_gir_source_path_msvc=$(subst /,\\,$(_gir_source_path_raw_msvc)) +_gir_source_subdir_int_msvc=$(subst \\\\,\\,\\$(_gir_source_path_msvc)\\) +_gir_source_subdir_msvc=$(subst \\.\\,\\,$(_gir_source_subdir_int_msvc)) + +_gir_files_raw_msvc=$(subst /,\\,$($(_gir_name)_MSVC_FILES)) +_gir_files_msvc=$(subst $(srcdir)\\,,$(subst $(builddir)\\,,$(subst $(top_builddir)\\$(_gir_source_path_msvc)\\,\\,$(_gir_files_raw_msvc)))) + +# Create a list of items for: +# - Libraries +# - Packages +# - GIRs to include +# - packages to export + +_gir_libraries_msvc = $(foreach lib,$($(_gir_name)_MSVC_LIBS),--library=$(lib)) +_gir_packages_msvc = $(foreach pkg,$($(_gir_name)_MSVC_PACKAGES),--pkg=$(pkg)) +_gir_includes_msvc = $(foreach include,$($(_gir_name)_MSVC_INCLUDE_GIRS),--include=$(include)) +_gir_export_packages_msvc = $(foreach pkg,$($(_gir_name)_MSVC_EXPORT_PACKAGES),--pkg-export=$(pkg)) +_gir_c_includes_msvc = $(foreach include,$($(_gir_name)_MSVC_C_INCLUDES),--c-include=$(include)) + +# +# Create NMake Makefile Sections for Building Introspection files +# from autotools files +# $(1) - File Name of the .gir that is to be generated +# + +define gir-nmake-builder + +# Basic sanity check, to make sure required variables are set +$(if $($(_gir_name)_MSVC_FILES),,$(error Need to define $(_gir_name)_MSVC_FILES)) +$(if $(or $(findstring --header-only,$($(_gir_name)_MSVC_SCANNERFLAGS)), + $($(_gir_name)_MSVC_LIBS), + $($(_gir_name)_MSVC_PROGRAM)),, + $(error Need to define $(_gir_name)_MSVC_LIBS or $(_gir_name)_MSVC_PROGRAM)) + +$(top_builddir)/win32/$(_gir_name)_list: + for F in $(_gir_files_msvc); do \ + case $$$$F in \ + *.c|*.cpp|*.cc|*.cxx|*.h|*.hpp|*.hh|*.hxx) \ + echo '..'$(_gir_source_subdir_msvc)$$$$F >>$(top_builddir)/win32/$(_gir_name)_list \ + ;; \ + esac; \ + done + +$(top_builddir)/win32/$(1).msvc.introspect: + -$(RM) $(top_builddir)/win32/$(1).msvc.introspect + +# Assemble the Command to Run g-ir-scanner + echo $(1)': '$(_gir_name)'_list '$($(_gir_name)_MSVC_GIR_DEPS)>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' @-echo Generating $$$$@...'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' $$$$(PYTHON) $$$$(G_IR_SCANNER) \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' --verbose -no-libtool \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' --namespace='$(_gir_namespace_msvc)' \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' --nsversion='$(_gir_version_msvc)' \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' '$(_gir_packages_msvc)' \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' '$(_gir_libraries_msvc)' \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' '$(_gir_program_msvc)' \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' --add-include-path=$$$$(G_IR_INCLUDEDIR) \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' '$(_gir_includes_msvc)' \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' '$(_gir_export_packages_msvc)' \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' '$(_gir_c_includes_msvc)' \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' --cflags-begin \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' '$($(_gir_name)_MSVC_CFLAGS)' \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' --cflags-end \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' '$($(_gir_name)_MSVC_SCANNERFLAGS)' \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' --filelist='$(_gir_name)'_list \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' -o $$$$@'>>$(top_builddir)/win32/$(1).msvc.introspect + echo '' >>$(top_builddir)/win32/$(1).msvc.introspect + +# Finally Assemble the Command to Compile the generated .gir + echo '$(_typelib_basename_msvc).typelib: '$(_typelib_basename_msvc)'.gir'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' @-echo Compiling $$$$@...'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' $$$$(G_IR_COMPILER) \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' --includedir=. --debug --verbose \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' '$(1)' \'>>$(top_builddir)/win32/$(1).msvc.introspect + echo ' -o $$$$@'>>$(top_builddir)/win32/$(1).msvc.introspect + echo '' >>$(top_builddir)/win32/$(1).msvc.introspect +endef + +$(foreach gir,$(MSVC_INTROSPECT_GIRS),$(eval $(call gir-nmake-builder,$(gir)))) diff --git a/win32/Makefile.msvcproj b/win32/Makefile.msvcproj new file mode 100644 index 00000000..2e96e12b --- /dev/null +++ b/win32/Makefile.msvcproj @@ -0,0 +1,153 @@ +# Author: Fan, Chun-wei +# Common Autotools file used to generate Visual Studio 2008+ +# Projects from their templates + +# This autotools file, from GLib, can be used in other projects +# that have Visual Studio build support. + +# * Input variables: +# +# MSVCPROJS - List of Projects that should be generated +# +# * Simple tutorial +# +# Add this to Makefile.am where your library/program is built: +# include +# MSVCPROJS = YourProject (can be multiple projects in a single srcdir) +# YourProject_FILES = $(libyourlib_1_0_SOURCES) +# YourProject_EXCLUDES = ... # list of sources to exclude, separated by '|', wildcards allowed; use random unsed value if none +# (the following 3 lines if headers need to be installed) +# YourProject_HEADERS_DIR = $(libyourlibincludedir) +# YourProject_HEADERS_INST = $(libyourlib_1_0_HEADERS) +# YourProject_HEADERS_EXCLUDES = ... # +# +# dist-hook: \ # (or add to it if it is already there, note the vs9 items will also call the vs10 items in the process) +# $(top_builddir)/win32/vs9/YourProject.vcproj \ +# $(top_builddir)/win32/vs9/YourProject.headers # if headers need to be installed +# +# --or, if Visual Studio 2013 or later is required-- +# dist-hook: \ # (or add to it if it is already there, this does -not- call other vs items in the process) +# $(top_builddir)/win32/vs12/YourProject.vcxproj \ +# $(top_builddir)/win32/vs12/YourProject.vs12.headers # if headers need to be installed + +# Private functions + +## Transform the MSVC project filename (no filename extensions) to something which can reference through a variable +## without automake/make complaining, eg Gtk-2.0 -> Gtk_2_0 +_proj_name=$(subst /,_,$(subst -,_,$(subst .,_,$(1)))) +_proj_path_raw:=$(subst $(abs_top_srcdir),,$(abs_srcdir)) +_proj_path=$(subst /,\\,$(_proj_path_raw)) +_proj_subdir_int=$(subst \\\\,\\,\\$(_proj_path)\\) +_proj_subdir=$(subst \\.\\,\\,$(_proj_subdir_int)) + +_proj_files_raw=$(subst /,\\,$($(_proj_name)_FILES)) +_proj_files=$(subst $(srcdir)\\,,$(subst $(builddir)\\,,$(subst $(top_builddir)\\$(_proj_path)\\,\\,$(_proj_files_raw)))) +_proj_filters=$($(_proj_name)_EXCLUDES) + +_proj_headers_raw=$(subst /,\\,$($(_proj_name)_HEADERS_INST)) +_proj_headers=$(subst $(srcdir)\\,,$(subst $(builddir)\\,,$(subst $(top_builddir)\\$(_proj_path)\\,\\,$(_proj_headers_raw)))) +_proj_headers_excludes=$($(_proj_name)_HEADERS_EXCLUDES) + +_headers_dest_posix=$(subst $(includedir),,$($(_proj_name)_HEADERS_DIR)) +_headers_destdir=$(subst /,\\,$(_headers_dest_posix)) + +# +# Creates Visual Studio 2008/2010 projects from items passed in from autotools files +# $(1) - Base Name of the MSVC project files (outputs) +# + +define msvcproj-builder + +$(top_builddir)/win32/vs10/$(1).vcxproj: $(top_builddir)/win32/vs9/$(1).vcproj +$(top_builddir)/win32/vs10/$(1).vcxproj.filters: $(top_builddir)/win32/vs9/$(1).vcproj +$(1).sourcefiles: $(top_builddir)/win32/vs9/$(1).vcproj +$(1).vs10.sourcefiles: $(top_builddir)/win32/vs9/$(1).vcproj +$(1).vs10.sourcefiles.filters: $(top_builddir)/win32/vs9/$(1).vcproj + +$(top_builddir)/win32/vs9/$(1).vcproj: Makefile + -$(RM) $(top_builddir)/win32/vs9/$(1).vcproj + -$(RM) $(top_builddir)/win32/vs10/$(1).vcxproj + -$(RM) $(top_builddir)/win32/vs10/$(1).vcxproj.filters + -$(RM) $(top_builddir)/win32/vs11/$(1).vcxproj + -$(RM) $(top_builddir)/win32/vs11/$(1).vcxproj.filters + -$(RM) $(top_builddir)/win32/vs12/$(1).vcxproj + -$(RM) $(top_builddir)/win32/vs12/$(1).vcxproj.filters + -$(RM) $(top_builddir)/win32/vs14/$(1).vcxproj + -$(RM) $(top_builddir)/win32/vs14/$(1).vcxproj.filters + + + for F in $(_proj_files); do \ + case $$$$F in \ + $(_proj_filters)) \ + ;; \ + *.c|*.cpp|*.cc|*.cxx) \ + echo ' ' >>$(1).sourcefiles && \ + echo ' ' >>$(1).vs10.sourcefiles && \ + echo ' Source Files' >>$(1).vs10.sourcefiles.filters \ + ;; \ + esac; \ + done + + + $(CPP) -P - <$(top_srcdir)/win32/vs9/$(1).vcprojin >$(top_builddir)/win32/vs9/$(1).vcproj + $(CPP) -P - <$(top_srcdir)/win32/vs10/$(1).vcxprojin >$(top_builddir)/win32/vs10/$(1).vcxproj + $(CPP) -P - <$(top_srcdir)/win32/vs10/$(1).vcxproj.filtersin >$(top_builddir)/win32/vs10/$(1).vcxproj.filters + $(RM) $(1).sourcefiles + $(RM) $(1).vs10.sourcefiles + $(RM) $(1).vs10.sourcefiles.filters + +$(top_builddir)/win32/vs10/$(1).vs10.headers: $(top_builddir)/win32/vs9/$(1).headers + +$(top_builddir)/win32/vs9/$(1).headers: Makefile + -$(RM) $(top_builddir)/win32/vs9/$(1).headers + -$(RM) $(top_builddir)/win32/vs10/$(1).vs10.headers + + for F in $(_proj_headers); do \ + case $$$$F in \ + $(_proj_headers_excludes)) \ + ;; \ + *.h|*.hpp|*.hh|*.hxx) \ + echo 'copy ..\..'$(_proj_subdir)$$$$F' $$$$(CopyDir)\include'$(_headers_destdir)'\'$$$$F' ' >>$(top_builddir)/win32/vs9/$(1).headers && \ + echo 'copy ..\..'$(_proj_subdir)$$$$F' $$$$(CopyDir)\include'$(_headers_destdir)'\'$$$$F >>$(top_builddir)/win32/vs10/$(1).vs10.headers \ + ;; \ + esac; \ + done + +$(top_builddir)/win32/vs12/$(1).vcxproj.filters: $(top_builddir)/win32/vs12/$(1).vcxproj + +$(top_builddir)/win32/vs12/$(1).vcxproj: Makefile + -$(RM) $(top_builddir)/win32/vs14/$(1).vcxproj + -$(RM) $(top_builddir)/win32/vs14/$(1).vcxproj.filters + + for F in $(_proj_files); do \ + case $$$$F in \ + $(_proj_filters)) \ + ;; \ + *.c|*.cpp|*.cc|*.cxx) \ + echo ' ' >>$(1).vs12.sourcefiles && \ + echo ' Source Files' >>$(1).vs12.sourcefiles.filters \ + ;; \ + esac; \ + done + + $(CPP) -P - <$(top_srcdir)/win32/vs12/$(1).vcxprojin >$(top_builddir)/win32/vs12/$(1).vcxproj + $(CPP) -P - <$(top_srcdir)/win32/vs12/$(1).vcxproj.filtersin >$(top_builddir)/win32/vs12/$(1).vcxproj.filters + $(RM) $(1).vs12.sourcefiles + $(RM) $(1).vs12.sourcefiles.filters + +$(top_builddir)/win32/vs12/$(1).vs12.headers: Makefile + -$(RM) $(top_builddir)/win32/vs12/$(1).vs12.headers + + for F in $(_proj_headers); do \ + case $$$$F in \ + $(_proj_headers_excludes)) \ + ;; \ + *.h|*.hpp|*.hh|*.hxx) \ + echo 'copy ..\..'$(_proj_subdir)$$$$F' $$$$(CopyDir)\include'$(_headers_destdir)'\'$$$$F >>$(top_builddir)/win32/vs12/$(1).vs12.headers \ + ;; \ + esac; \ + done + +endef + +$(foreach proj,$(MSVCPROJS),$(eval $(call msvcproj-builder,$(proj)))) diff --git a/win32/SoupGNOME_2_4_gir_list b/win32/SoupGNOME_2_4_gir_list new file mode 100644 index 00000000..b5bab880 --- /dev/null +++ b/win32/SoupGNOME_2_4_gir_list @@ -0,0 +1,6 @@ +..\libsoup\soup-cookie-jar-sqlite.h +..\libsoup\soup-gnome-features.h +..\libsoup\soup-cookie-jar-sqlite.c +..\libsoup\soup-gnome-features.c +..\libsoup\soup-proxy-resolver-gnome.c +..\libsoup\soup-password-manager-gnome.c diff --git a/win32/Soup_2_4_gir_list b/win32/Soup_2_4_gir_list new file mode 100644 index 00000000..a3825857 --- /dev/null +++ b/win32/Soup_2_4_gir_list @@ -0,0 +1,124 @@ +..\libsoup\soup-address.h +..\libsoup\soup-auth.h +..\libsoup\soup-auth-domain.h +..\libsoup\soup-auth-domain-basic.h +..\libsoup\soup-auth-domain-digest.h +..\libsoup\soup-auth-manager.h +..\libsoup\soup-autocleanups.h +..\libsoup\soup-cache.h +..\libsoup\soup-content-decoder.h +..\libsoup\soup-content-sniffer.h +..\libsoup\soup-cookie.h +..\libsoup\soup-cookie-jar.h +..\libsoup\soup-cookie-jar-db.h +..\libsoup\soup-cookie-jar-text.h +..\libsoup\soup-date.h +..\libsoup\soup-form.h +..\libsoup\soup-headers.h +..\libsoup\soup-logger.h +..\libsoup\soup-message.h +..\libsoup\soup-message-body.h +..\libsoup\soup-message-headers.h +..\libsoup\soup-method.h +..\libsoup\soup-misc.h +..\libsoup\soup-multipart.h +..\libsoup\soup-multipart-input-stream.h +..\libsoup\soup-password-manager.h +..\libsoup\soup-portability.h +..\libsoup\soup-proxy-resolver-default.h +..\libsoup\soup-proxy-uri-resolver.h +..\libsoup\soup-request.h +..\libsoup\soup-request-data.h +..\libsoup\soup-request-file.h +..\libsoup\soup-request-http.h +..\libsoup\soup-requester.h +..\libsoup\soup-server.h +..\libsoup\soup-session.h +..\libsoup\soup-session-async.h +..\libsoup\soup-session-feature.h +..\libsoup\soup-session-sync.h +..\libsoup\soup-socket.h +..\libsoup\soup-status.h +..\libsoup\soup-tld.h +..\libsoup\soup-types.h +..\libsoup\soup-uri.h +..\libsoup\soup-value-utils.h +..\libsoup\soup-websocket.h +..\libsoup\soup-websocket-connection.h +..\libsoup\soup-xmlrpc.h +..\libsoup\soup-xmlrpc-old.h +..\libsoup\soup-address.c +..\libsoup\soup-auth.c +..\libsoup\soup-auth-basic.c +..\libsoup\soup-auth-digest.c +..\libsoup\soup-auth-ntlm.c +..\libsoup\soup-auth-negotiate.c +..\libsoup\soup-auth-domain.c +..\libsoup\soup-auth-domain-basic.c +..\libsoup\soup-auth-domain-digest.c +..\libsoup\soup-auth-manager.c +..\libsoup\soup-body-input-stream.c +..\libsoup\soup-body-output-stream.c +..\libsoup\soup-cache.c +..\libsoup\soup-cache-client-input-stream.c +..\libsoup\soup-cache-input-stream.c +..\libsoup\soup-client-input-stream.c +..\libsoup\soup-connection.c +..\libsoup\soup-connection-auth.c +..\libsoup\soup-content-decoder.c +..\libsoup\soup-content-processor.c +..\libsoup\soup-content-sniffer.c +..\libsoup\soup-content-sniffer-stream.c +..\libsoup\soup-converter-wrapper.c +..\libsoup\soup-cookie.c +..\libsoup\soup-cookie-jar.c +..\libsoup\soup-cookie-jar-db.c +..\libsoup\soup-cookie-jar-text.c +..\libsoup\soup-date.c +..\libsoup\soup-directory-input-stream.c +..\libsoup\soup-filter-input-stream.c +..\libsoup\soup-form.c +..\libsoup\soup-headers.c +..\libsoup\soup-init.c +..\libsoup\soup-io-stream.c +..\libsoup\soup-logger.c +..\libsoup\soup-message.c +..\libsoup\soup-message-body.c +..\libsoup\soup-message-client-io.c +..\libsoup\soup-message-headers.c +..\libsoup\soup-message-io.c +..\libsoup\soup-message-queue.c +..\libsoup\soup-message-server-io.c +..\libsoup\soup-method.c +..\libsoup\soup-misc.c +..\libsoup\soup-multipart.c +..\libsoup\soup-multipart-input-stream.c +..\libsoup\soup-password-manager.c +..\libsoup\soup-path-map.c +..\libsoup\soup-proxy-resolver.c +..\libsoup\soup-proxy-resolver-default.c +..\libsoup\soup-proxy-resolver-wrapper.c +..\libsoup\soup-proxy-uri-resolver.c +..\libsoup\soup-request.c +..\libsoup\soup-request-data.c +..\libsoup\soup-request-file.c +..\libsoup\soup-request-http.c +..\libsoup\soup-requester.c +..\libsoup\soup-server.c +..\libsoup\soup-session.c +..\libsoup\soup-session-async.c +..\libsoup\soup-session-feature.c +..\libsoup\soup-session-sync.c +..\libsoup\soup-socket.c +..\libsoup\soup-socket-properties.c +..\libsoup\soup-status.c +..\libsoup\soup-tld.c +..\libsoup\soup-uri.c +..\libsoup\soup-value-utils.c +..\libsoup\soup-version.c +..\libsoup\soup-websocket.c +..\libsoup\soup-websocket-connection.c +..\libsoup\soup-xmlrpc.c +..\libsoup\soup-xmlrpc-old.c +..\libsoup\soup-enum-types.h +..\libsoup\soup-version.h diff --git a/win32/detectenv-msvc.mak b/win32/detectenv-msvc.mak new file mode 100644 index 00000000..6fd96ccc --- /dev/null +++ b/win32/detectenv-msvc.mak @@ -0,0 +1,78 @@ +# Common NMake Makefile module for checking the build environment +# This can be copied from $(glib_srcroot)\build\win32 for GNOME items +# that support MSVC builds and introspection under MSVC, and can be used +# for building test programs as well. + +# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or +# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir) +!if !defined(VCINSTALLDIR) && !defined(WINDOWSSDKDIR) +MSG = ^ +This Makefile is only for Visual Studio 2008 and later.^ +You need to ensure that the Visual Studio Environment is properly set up^ +before running this Makefile. +!error $(MSG) +!endif + +ERRNUL = 2>NUL +_HASH=^# + +!if ![echo VCVERSION=_MSC_VER > vercl.x] \ + && ![echo $(_HASH)if defined(_M_IX86) >> vercl.x] \ + && ![echo PLAT=Win32 >> vercl.x] \ + && ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \ + && ![echo PLAT=x64 >> vercl.x] \ + && ![echo $(_HASH)endif >> vercl.x] \ + && ![cl -nologo -TC -P vercl.x $(ERRNUL)] +!include vercl.i +!if ![echo VCVER= ^\> vercl.vc] \ + && ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc] +!include vercl.vc +!endif +!endif +!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc] +!endif + +!if $(VCVERSION) > 1499 && $(VCVERSION) < 1600 +VSVER = 9 +!elseif $(VCVERSION) > 1599 && $(VCVERSION) < 1700 +VSVER = 10 +!elseif $(VCVERSION) > 1699 && $(VCVERSION) < 1800 +VSVER = 11 +!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900 +VSVER = 12 +!elseif $(VCVERSION) > 1899 && $(VCVERSION) < 1910 +VSVER = 14 +!elseif $(VCVERSION) > 1909 && $(VCVERSION) < 2000 +VSVER = 15 +!else +VSVER = 0 +!endif + +!if "$(VSVER)" == "0" +MSG = ^ +This NMake Makefile set supports Visual Studio^ +9 (2008) through 14 (2015). Your Visual Studio^ +version is not supported. +!error $(MSG) +!endif + +VALID_CFGSET = FALSE +!if "$(CFG)" == "release" || "$(CFG)" == "debug" || "$(CFG)" == "Release" || "$(CFG)" == "Debug" +VALID_CFGSET = TRUE +!endif + +# We want debugging symbols logged for all builds, +# using .pdb files for release builds +CFLAGS_BASE = /Zi + +!if "$(CFG)" == "release" || "$(CFG)" == "Release" +CFLAGS_ADD = /MD /O2 $(CFLAGS_BASE) +!else +CFLAGS_ADD = /MDd /Od $(CFLAGS_BASE) +!endif + +!if "$(PLAT)" == "x64" +LDFLAGS_ARCH = /machine:x64 +!else +LDFLAGS_ARCH = /machine:x86 +!endif diff --git a/win32/introspection-msvc.mak b/win32/introspection-msvc.mak new file mode 100644 index 00000000..26501f52 --- /dev/null +++ b/win32/introspection-msvc.mak @@ -0,0 +1,94 @@ +# Common NMake Makefile module for checking the build environment is sane +# for building introspection files under MSVC/NMake. +# This can be copied from $(gi_srcroot)\build\win32 for GNOME items +# that support MSVC builds and introspection under MSVC. + +# Can override with env vars as needed +# You will need to have built gobject-introspection for this to work. +# Change or pass in or set the following to suit your environment + +!if "$(PREFIX)" == "" +PREFIX = ..\..\vs$(VSVER)\$(PLAT) +!endif + +!if ![setlocal] && \ + ![set PFX=$(PREFIX)] && \ + ![for %P in (%PFX%) do @echo PREFIX_FULL=%~dpnfP > pfx.x] +!endif +!include pfx.x + +!if "$(PKG_CONFIG_PATH)" == "" +PKG_CONFIG_PATH=$(PREFIX_FULL)\lib\pkgconfig +!else +PKG_CONFIG_PATH=$(PREFIX_FULL)\lib\pkgconfig;$(PKG_CONFIG_PATH) +!endif + +!if ![del $(ERRNUL) /q/f pfx.x] +!endif + +# Note: The PYTHON must be the Python release series that was used to build +# the GObject-introspection scanner Python module! +# Either having python.exe your PATH will work or passing in +# PYTHON= will do + +# This is required, and gobject-introspection needs to be built +# before this can be successfully run. +!if "$(PYTHON)" == "" +PYTHON=python +!endif + +# Path to the pkg-config tool, if not already in the PATH +!if "$(PKG_CONFIG)" == "" +PKG_CONFIG=pkg-config +!endif + +# Don't change anything following this line! + +GIR_SUBDIR = share\gir-1.0 +GIR_TYPELIBDIR = lib\girepository-1.0 +G_IR_SCANNER = $(PREFIX)\bin\g-ir-scanner +G_IR_COMPILER = $(PREFIX)\bin\g-ir-compiler.exe +G_IR_INCLUDEDIR = $(PREFIX)\$(GIR_SUBDIR) +G_IR_TYPELIBDIR = $(PREFIX)\$(GIR_TYPELIBDIR) + +VALID_PKG_CONFIG_PATH = FALSE + +MSG_INVALID_PKGCONFIG = You must set or specifiy a valid PKG_CONFIG_PATH +MSG_INVALID_CFG = You need to specify or set CFG to be release or debug to use this Makefile to build the Introspection Files + +ERROR_MSG = + +BUILD_INTROSPECTION = TRUE + +!if ![set PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)] \ + && ![$(PKG_CONFIG) --print-errors --errors-to-stdout $(CHECK_PACKAGE) > pkgconfig.x] \ + && ![setlocal] \ + && ![set file="pkgconfig.x"] \ + && ![FOR %A IN (%file%) DO @echo PKG_CHECK_SIZE=%~zA > pkgconfig.chksize] \ + && ![del $(ERRNUL) /q/f pkgconfig.x] +!endif + +!include pkgconfig.chksize +!if "$(PKG_CHECK_SIZE)" == "0" +VALID_PKG_CONFIG_PATH = TRUE +!else +VALID_PKG_CONFIG_PATH = FALSE +!endif + +!if ![del $(ERRNUL) /q/f pkgconfig.chksize] +!endif + +VALID_CFGSET = FALSE +!if "$(CFG)" == "release" || "$(CFG)" == "debug" || "$(CFG)" == "Release" || "$(CFG)" == "Debug" +VALID_CFGSET = TRUE +!endif + +!if "$(VALID_PKG_CONFIG_PATH)" != "TRUE" +BUILD_INTROSPECTION = FALSE +ERROR_MSG = $(MSG_INVALID_PKGCONFIG) +!endif + +!if "$(VALID_CFGSET)" != "TRUE" +BUILD_INTROSPECTION = FALSE +ERROR_MSG = $(MSG_INVALID_CFG) +!endif diff --git a/win32/introspection.body.mak b/win32/introspection.body.mak new file mode 100644 index 00000000..4bad419f --- /dev/null +++ b/win32/introspection.body.mak @@ -0,0 +1,54 @@ +Soup-2.4.gir: Soup_2_4_gir_list + @-echo Generating $@... + $(PYTHON) $(G_IR_SCANNER) \ + --verbose -no-libtool \ + --namespace=Soup \ + --nsversion=2.4 \ + \ + --library=soup-2.4 \ + \ + --add-include-path=$(G_IR_INCLUDEDIR) \ + --include=Gio-2.0 \ + --pkg-export=libsoup-2.4 \ + \ + --cflags-begin \ + -DG_LOG_DOMAIN="libsoup" -DLIBSOUP_COMPILATION -I.. -DLIBSOUP_USE_UNSTABLE_REQUEST_API \ + --cflags-end \ + --c-include "libsoup/soup.h" \ + --filelist=Soup_2_4_gir_list \ + -o $@ + +Soup-2.4.typelib: Soup-2.4.gir + @-echo Compiling $@... + $(G_IR_COMPILER) \ + --includedir=. --debug --verbose \ + Soup-2.4.gir \ + -o $@ + +SoupGNOME-2.4.gir: SoupGNOME_2_4_gir_list Soup-2.4.gir + @-echo Generating $@... + $(PYTHON) $(G_IR_SCANNER) \ + --verbose -no-libtool \ + --namespace=SoupGNOME \ + --nsversion=2.4 \ + \ + --library=soup-gnome-2.4 --library=soup-2.4 \ + \ + --add-include-path=$(G_IR_INCLUDEDIR) \ + \ + --pkg-export=libsoup-gnome-2.4 \ + \ + --cflags-begin \ + -DG_LOG_DOMAIN="libsoup" -DLIBSOUP_COMPILATION -I.. \ + --cflags-end \ + i --identifier-prefix=Soup --symbol-prefix=soup --c-include "libsoup/soup-gnome.h" --include-uninstalled=./Soup-2.4.gir \ + --filelist=SoupGNOME_2_4_gir_list \ + -o $@ + +SoupGNOME-2.4.typelib: SoupGNOME-2.4.gir + @-echo Compiling $@... + $(G_IR_COMPILER) \ + --includedir=. --debug --verbose \ + SoupGNOME-2.4.gir \ + -o $@ + diff --git a/win32/pc_base.py b/win32/pc_base.py new file mode 100644 index 00000000..f7976e8d --- /dev/null +++ b/win32/pc_base.py @@ -0,0 +1,124 @@ +#!/usr/bin/python +# +# Simple utility script to generate the basic info +# needed in a .pc (pkg-config) file, used especially +# for introspection purposes + +# This can be used in various projects where +# there is the need to generate .pc files, +# and is copied from GLib's $(srcroot)/win32 + +# Author: Fan, Chun-wei +# Date: March 10, 2016 + +import os +import sys +import argparse + +class BasePCItems: + def __init__(self): + self.base_replace_items = {} + self.exec_prefix = '' + self.includedir = '' + self.libdir = '' + self.prefix = '' + self.srcdir = os.path.dirname(__file__) + self.top_srcdir = self.srcdir + '\\..' + self.version = '' + + def setup(self, argv, parser=None): + if parser is None: + parser = argparse.ArgumentParser(description='Setup basic .pc file info') + parser.add_argument('--prefix', help='prefix of the installed library', + required=True) + parser.add_argument('--exec-prefix', + help='prefix of the installed programs, \ + if different from the prefix') + parser.add_argument('--includedir', + help='includedir of the installed library, \ + if different from ${prefix}/include') + parser.add_argument('--libdir', + help='libdir of the installed library, \ + if different from ${prefix}/lib') + parser.add_argument('--version', help='Version of the package', + required=True) + args = parser.parse_args() + + self.version = args.version + + # check whether the prefix and exec_prefix are valid + if not os.path.exists(args.prefix): + raise SystemExit('Specified prefix \'%s\' is invalid' % args.prefix) + + # use absolute paths for prefix + self.prefix = os.path.abspath(args.prefix).replace('\\','/') + + # check and setup the exec_prefix + if getattr(args, 'exec_prefix', None) is None: + exec_prefix_use_shorthand = True + self.exec_prefix = '${prefix}' + else: + if args.exec_prefix.startswith('${prefix}'): + exec_prefix_use_shorthand = True + input_exec_prefix = args.prefix + args.exec_prefix[len('${prefix}'):] + else: + exec_prefix_use_shorthand = False + input_exec_prefix = args.exec_prefix + if not os.path.exists(input_exec_prefix): + raise SystemExit('Specified exec_prefix \'%s\' is invalid' % + args.exec_prefix) + if exec_prefix_use_shorthand is True: + self.exec_prefix = args.exec_prefix.replace('\\','/') + else: + self.exec_prefix = os.path.abspath(input_exec_prefix).replace('\\','/') + + # check and setup the includedir + if getattr(args, 'includedir', None) is None: + self.includedir = '${prefix}/include' + else: + if args.includedir.startswith('${prefix}'): + includedir_use_shorthand = True + input_includedir = args.prefix + args.includedir[len('${prefix}'):] + else: + if args.includedir.startswith('${exec_prefix}'): + includedir_use_shorthand = True + input_includedir = input_exec_prefix + args.includedir[len('${exec_prefix}'):] + else: + includedir_use_shorthand = False + input_includedir = args.includedir + if not os.path.exists(input_includedir): + raise SystemExit('Specified includedir \'%s\' is invalid' % + args.includedir) + if includedir_use_shorthand is True: + self.includedir = args.includedir.replace('\\','/') + else: + self.includedir = os.path.abspath(input_includedir).replace('\\','/') + + # check and setup the libdir + if getattr(args, 'libdir', None) is None: + self.libdir = '${prefix}/lib' + else: + if args.libdir.startswith('${prefix}'): + libdir_use_shorthand = True + input_libdir = args.prefix + args.libdir[len('${prefix}'):] + else: + if args.libdir.startswith('${exec_prefix}'): + libdir_use_shorthand = True + input_libdir = input_exec_prefix + args.libdir[len('${exec_prefix}'):] + else: + libdir_use_shorthand = False + input_libdir = args.libdir + if not os.path.exists(input_libdir): + raise SystemExit('Specified libdir \'%s\' is invalid' % + args.libdir) + if libdir_use_shorthand is True: + self.libdir = args.libdir.replace('\\','/') + else: + self.libdir = os.path.abspath(input_libdir).replace('\\','/') + + # setup dictionary for replacing items in *.pc.in + self.base_replace_items.update({'@VERSION@': self.version}) + self.base_replace_items.update({'@prefix@': self.prefix}) + self.base_replace_items.update({'@exec_prefix@': self.exec_prefix}) + self.base_replace_items.update({'@libdir@': self.libdir}) + self.base_replace_items.update({'@includedir@': self.includedir}) diff --git a/win32/replace.py b/win32/replace.py new file mode 100644 index 00000000..3aeceb1f --- /dev/null +++ b/win32/replace.py @@ -0,0 +1,115 @@ +#!/usr/bin/python +# +# Simple utility script to manipulate +# certain types of strings in a file + +# This can be used in various projects where +# there is the need to replace strings in files, +# and is copied from GLib's $(srcroot)/win32 + +# Author: Fan, Chun-wei +# Date: September 03, 2014 + +import os +import sys +import re +import string +import argparse + +valid_actions = ['remove-prefix', + 'replace-var', + 'replace-str', + 'remove-str'] + +def open_file(filename, mode): + if sys.version_info[0] < 3: + return open(filename, mode=mode) + else: + return open(filename, mode=mode, encoding='utf-8') + +def replace_multi(src, dest, replace_items): + with open_file(src, 'r') as s: + with open_file(dest, 'w') as d: + for line in s: + replace_dict = dict((re.escape(key), value) \ + for key, value in replace_items.items()) + replace_pattern = re.compile("|".join(replace_dict.keys())) + d.write(replace_pattern.sub(lambda m: \ + replace_dict[re.escape(m.group(0))], line)) + +def replace(src, dest, instring, outstring): + replace_item = {instring: outstring} + replace_multi(src, dest, replace_item) + +def check_required_args(args, params): + for param in params: + if getattr(args, param, None) is None: + raise SystemExit('%s: error: --%s argument is required' % (__file__, param)) + +def warn_ignored_args(args, params): + for param in params: + if getattr(args, param, None) is not None: + print('%s: warning: --%s argument is ignored' % (__file__, param)) + +def main(argv): + + parser = argparse.ArgumentParser(description='Process strings in a file.') + parser.add_argument('-a', + '--action', + help='Action to carry out. Can be one of:\n' + 'remove-prefix\n' + 'replace-var\n' + 'replace-str\n' + 'remove-str', + choices=valid_actions) + parser.add_argument('-i', '--input', help='Input file') + parser.add_argument('-o', '--output', help='Output file') + parser.add_argument('--instring', help='String to replace or remove') + parser.add_argument('--var', help='Autotools variable name to replace') + parser.add_argument('--outstring', + help='New String to replace specified string or variable') + parser.add_argument('--removeprefix', help='Prefix of string to remove') + + args = parser.parse_args() + + input_string = '' + output_string = '' + + # We must have action, input, output for all operations + check_required_args(args, ['action','input','output']) + + # Build the arguments by the operation that is to be done, + # to be fed into replace() + + # Get rid of prefixes from a string + if args.action == 'remove-prefix': + check_required_args(args, ['instring','removeprefix']) + warn_ignored_args(args, ['outstring','var']) + input_string = args.removeprefix + args.instring + output_string = args.instring + + # Replace an m4-style variable (those surrounded by @...@) + if args.action == 'replace-var': + check_required_args(args, ['var','outstring']) + warn_ignored_args(args, ['instring','removeprefix']) + input_string = '@' + args.var + '@' + output_string = args.outstring + + # Replace a string + if args.action == 'replace-str': + check_required_args(args, ['instring','outstring']) + warn_ignored_args(args, ['var','removeprefix']) + input_string = args.instring + output_string = args.outstring + + # Remove a string + if args.action == 'remove-str': + check_required_args(args, ['instring']) + warn_ignored_args(args, ['var','outstring','removeprefix']) + input_string = args.instring + output_string = '' + + replace(args.input, args.output, input_string, output_string) + +if __name__ == '__main__': + sys.exit(main(sys.argv)) diff --git a/win32/soup-introspection-msvc.mak b/win32/soup-introspection-msvc.mak new file mode 100644 index 00000000..e1bbeb1c --- /dev/null +++ b/win32/soup-introspection-msvc.mak @@ -0,0 +1,37 @@ +# NMake Makefile to build Introspection Files for Pango + +!include detectenv-msvc.mak + +APIVERSION = 2.4 + +CHECK_PACKAGE = gio-2.0 + +!include introspection-msvc.mak + +!if "$(BUILD_INTROSPECTION)" == "TRUE" + +INTROSPECTION_TARGETS = Soup-$(APIVERSION).gir Soup-$(APIVERSION).typelib SoupGNOME-$(APIVERSION).gir SoupGNOME-$(APIVERSION).typelib + +all: setbuildenv $(INTROSPECTION_TARGETS) + +install-introspection: all + @-copy Soup-$(APIVERSION).gir $(G_IR_INCLUDEDIR) + @-copy /b Soup-$(APIVERSION).typelib $(G_IR_TYPELIBDIR) + @-copy SoupGNOME-$(APIVERSION).gir $(G_IR_INCLUDEDIR) + @-copy /b SoupGNOME-$(APIVERSION).typelib $(G_IR_TYPELIBDIR) + +setbuildenv: + @set PYTHONPATH=$(PREFIX)\lib\gobject-introspection + @set PATH=vs$(VSVER)\$(CFG)\$(PLAT)\bin;$(PREFIX)\bin;$(PATH) + @set PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) + @set LIB=vs$(VSVER)\$(CFG)\$(PLAT)\bin;$(PREFIX)\lib;$(LIB) + +!include introspection.body.mak + +!else +all: + @-echo $(ERROR_MSG) +!endif + +clean: + @-del /f/q $(INTROSPECTION_TARGETS) diff --git a/win32/soup_version_h.py b/win32/soup_version_h.py new file mode 100644 index 00000000..909db230 --- /dev/null +++ b/win32/soup_version_h.py @@ -0,0 +1,29 @@ +#!/usr/bin/python +# +# Simple utility script to generate soup-version.h + +import os +import sys +import argparse + +from replace import replace_multi + +def gen_version_h(argv): + top_srcdir = os.path.dirname(__file__) + "\\.." + parser = argparse.ArgumentParser(description='Generate soup-version.h') + parser.add_argument('--version', help='Version of the package', + required=True) + args = parser.parse_args() + version_info = args.version.split('.') + + version_h_replace_items = {'@SOUP_MAJOR_VERSION@': version_info[0], + '@SOUP_MINOR_VERSION@': version_info[1], + '@SOUP_MICRO_VERSION@': version_info[2]} + + # Generate soup-version.h + replace_multi(top_srcdir + '/libsoup/soup-version.h.in', + top_srcdir + '/libsoup/soup-version.h', + version_h_replace_items) + +if __name__ == '__main__': + sys.exit(gen_version_h(sys.argv)) \ No newline at end of file diff --git a/win32/souppc.py b/win32/souppc.py new file mode 100644 index 00000000..e5e85e84 --- /dev/null +++ b/win32/souppc.py @@ -0,0 +1,32 @@ +#!/usr/bin/python +# +# Utility script to generate .pc files for libsoup +# for Visual Studio builds, to be used for +# building introspection files + +# Author: Fan, Chun-wei +# Date: March 10, 2016 + +import os +import sys + +from replace import replace_multi +from pc_base import BasePCItems + +def main(argv): + base_pc = BasePCItems() + + base_pc.setup(argv) + + # Generate libsoup-2.4.pc + replace_multi(base_pc.top_srcdir + '/libsoup-2.4.pc.in', + base_pc.srcdir + '/libsoup-2.4.pc', + base_pc.base_replace_items) + + # Generate libsoup-gnome-2.4.pc + replace_multi(base_pc.top_srcdir + '/libsoup-gnome-2.4.pc.in', + base_pc.srcdir + '/libsoup-gnome-2.4.pc', + base_pc.base_replace_items) + +if __name__ == '__main__': + sys.exit(main(sys.argv)) diff --git a/win32/vs10/Makefile.am b/win32/vs10/Makefile.am new file mode 100644 index 00000000..78bd5f8f --- /dev/null +++ b/win32/vs10/Makefile.am @@ -0,0 +1,39 @@ +GENERATED_ITEMS = \ + soup.vcxproj \ + soup-gnome.vcxproj \ + soup.vcxproj.filters \ + soup-gnome.vcxproj.filters \ + soup-install.props + +MSVC_HEADERS_LIST = soup.vs10.headers soup-gnome.vs10.headers + +EXTRA_DIST = \ + libsoup.sln \ + get.vcxproj \ + simple-httpd.vcxproj \ + simple-proxy.vcxproj \ + soup-install.vcxproj \ + soup-install.vcxproj.filters \ + get.vcxproj.filters \ + simple-httpd.vcxproj.filters \ + simple-proxy.vcxproj.filters \ + soup-build-defines.props \ + soup-dll-build-defines.props \ + soup-gen-srcs.props \ + soup-version-paths.props \ + soup.vcxprojin \ + soup-gnome.vcxprojin \ + soup.vcxproj.filtersin \ + soup-gnome.vcxproj.filtersin \ + soup-install.propsin \ + $(GENERATED_ITEMS) + +soup-install.props: $(top_srcdir)/win32/vs10/soup-install.propsin $(MSVC_HEADERS_LIST) + -$(RM) $(top_builddir)/win32/vs11/soup-install.props + -$(RM) $(top_builddir)/win32/vs12/soup-install.props + -$(RM) $(top_builddir)/win32/vs14/soup-install.props + -$(RM) $(top_builddir)/win32/vs15/soup-install.props + $(CPP) -P - <$(top_srcdir)/win32/vs10/soup-install.propsin >$@ + rm $(MSVC_HEADERS_LIST) + +DISTCLEANFILES = $(GENERATED_ITEMS) diff --git a/win32/vs10/Makefile.in b/win32/vs10/Makefile.in new file mode 100644 index 00000000..21cd2ce1 --- /dev/null +++ b/win32/vs10/Makefile.in @@ -0,0 +1,564 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = win32/vs10 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/glibtests.m4 $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/vapigen.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = soup-version-paths.props +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(srcdir)/soup-version-paths.props.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APACHE_HTTPD = @APACHE_HTTPD@ +APACHE_MODULE_DIR = @APACHE_MODULE_DIR@ +APACHE_PHP_MODULE_DIR = @APACHE_PHP_MODULE_DIR@ +APACHE_SSL_MODULE_DIR = @APACHE_SSL_MODULE_DIR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL = @CURL@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MAKEFILE = @GLIB_MAKEFILE@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GMSGFMT = @GMSGFMT@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_GNOME = @HAVE_GNOME@ +HTML_DIR = @HTML_DIR@ +IF_HAVE_MOD_UNIXD = @IF_HAVE_MOD_UNIXD@ +IF_HAVE_PHP = @IF_HAVE_PHP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ +INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ +INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ +INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ +INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ +INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ +INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +KRB5_CFLAGS = @KRB5_CFLAGS@ +KRB5_CONFIG = @KRB5_CONFIG@ +KRB5_LIBS = @KRB5_LIBS@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PHP = @PHP@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOUP_AGE = @SOUP_AGE@ +SOUP_API_VERSION = @SOUP_API_VERSION@ +SOUP_CURRENT = @SOUP_CURRENT@ +SOUP_DEBUG_FLAGS = @SOUP_DEBUG_FLAGS@ +SOUP_HIDDEN_VISIBILITY_CFLAGS = @SOUP_HIDDEN_VISIBILITY_CFLAGS@ +SOUP_MAJOR_VERSION = @SOUP_MAJOR_VERSION@ +SOUP_MICRO_VERSION = @SOUP_MICRO_VERSION@ +SOUP_MINOR_VERSION = @SOUP_MINOR_VERSION@ +SOUP_REVISION = @SOUP_REVISION@ +SQLITE_CFLAGS = @SQLITE_CFLAGS@ +SQLITE_LIBS = @SQLITE_LIBS@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VALAC = @VALAC@ +VAPIDIR = @VAPIDIR@ +VAPIGEN = @VAPIGEN@ +VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ +VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XML_CFLAGS = @XML_CFLAGS@ +XML_LIBS = @XML_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +installed_test_metadir = @installed_test_metadir@ +installed_testdir = @installed_testdir@ +intltool__v_merge_options_ = @intltool__v_merge_options_@ +intltool__v_merge_options_0 = @intltool__v_merge_options_0@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +ntlm_auth = @ntlm_auth@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +GENERATED_ITEMS = \ + soup.vcxproj \ + soup-gnome.vcxproj \ + soup.vcxproj.filters \ + soup-gnome.vcxproj.filters \ + soup-install.props + +MSVC_HEADERS_LIST = soup.vs10.headers soup-gnome.vs10.headers +EXTRA_DIST = \ + libsoup.sln \ + get.vcxproj \ + simple-httpd.vcxproj \ + simple-proxy.vcxproj \ + soup-install.vcxproj \ + soup-install.vcxproj.filters \ + get.vcxproj.filters \ + simple-httpd.vcxproj.filters \ + simple-proxy.vcxproj.filters \ + soup-build-defines.props \ + soup-dll-build-defines.props \ + soup-gen-srcs.props \ + soup-version-paths.props \ + soup.vcxprojin \ + soup-gnome.vcxprojin \ + soup.vcxproj.filtersin \ + soup-gnome.vcxproj.filtersin \ + soup-install.propsin \ + $(GENERATED_ITEMS) + +DISTCLEANFILES = $(GENERATED_ITEMS) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign win32/vs10/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign win32/vs10/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +soup-version-paths.props: $(top_builddir)/config.status $(srcdir)/soup-version-paths.props.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +soup-install.props: $(top_srcdir)/win32/vs10/soup-install.propsin $(MSVC_HEADERS_LIST) + -$(RM) $(top_builddir)/win32/vs11/soup-install.props + -$(RM) $(top_builddir)/win32/vs12/soup-install.props + -$(RM) $(top_builddir)/win32/vs14/soup-install.props + -$(RM) $(top_builddir)/win32/vs15/soup-install.props + $(CPP) -P - <$(top_srcdir)/win32/vs10/soup-install.propsin >$@ + rm $(MSVC_HEADERS_LIST) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/win32/vs10/get.vcxproj b/win32/vs10/get.vcxproj new file mode 100644 index 00000000..1e2c09f6 --- /dev/null +++ b/win32/vs10/get.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B24831C4-B8F2-41D6-AAF4-12192F71C623} + get + Win32Proj + + + + Application + Unicode + v100 + true + + + Application + Unicode + v100 + + + Application + Unicode + v100 + true + + + Application + Unicode + v100 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Console + MachineX86 + + + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + MachineX64 + + + + + X64 + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX64 + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs10/get.vcxproj.filters b/win32/vs10/get.vcxproj.filters new file mode 100644 index 00000000..9bc6fcf8 --- /dev/null +++ b/win32/vs10/get.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Sources + + diff --git a/win32/vs10/libsoup.sln b/win32/vs10/libsoup.sln new file mode 100644 index 00000000..10d78247 --- /dev/null +++ b/win32/vs10/libsoup.sln @@ -0,0 +1,128 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup", "soup.vcxproj", "{D83A3162-B14C-459C-AF81-15BBFA90240D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup-gnome", "soup-gnome.vcxproj", "{8C88A385-28C8-4B30-91A4-FBA381A5A46F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "get", "get.vcxproj", "{B24831C4-B8F2-41D6-AAF4-12192F71C623}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple-httpd", "simple-httpd.vcxproj", "{80DC062E-2146-4CE8-A448-FD2205AB2CA4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple-proxy", "simple-proxy.vcxproj", "{3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup-install", "soup-install.vcxproj", "{E0DCF460-914F-46F9-94D6-86D456CB53E9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + Debug_MIT_GSSAPI|Win32 = Debug_MIT_GSSAPI|Win32 + Debug_MIT_GSSAPI|x64 = Debug_MIT_GSSAPI|x64 + Release_MIT_GSSAPI|Win32 = Release_MIT_GSSAPI|Win32 + Release_MIT_GSSAPI|x64 = Release_MIT_GSSAPI|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|Win32.ActiveCfg = Debug|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|Win32.Build.0 = Debug|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|x64.ActiveCfg = Debug|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|x64.Build.0 = Debug|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|Win32.ActiveCfg = Release|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|Win32.Build.0 = Release|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|x64.ActiveCfg = Release|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|x64.Build.0 = Release|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|x64.Build.0 = Debug_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|Win32.Build.0 = Release_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|x64.ActiveCfg = Release_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|x64.Build.0 = Release_MIT_GSSAPI|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|Win32.ActiveCfg = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|Win32.Build.0 = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|x64.ActiveCfg = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|x64.Build.0 = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|Win32.ActiveCfg = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|Win32.Build.0 = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|x64.ActiveCfg = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|x64.Build.0 = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|Win32.ActiveCfg = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|Win32.Build.0 = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|x64.ActiveCfg = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|x64.Build.0 = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|Win32.ActiveCfg = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|Win32.Build.0 = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|x64.ActiveCfg = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|x64.Build.0 = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|Win32.ActiveCfg = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|Win32.Build.0 = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|x64.ActiveCfg = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|x64.Build.0 = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|Win32.ActiveCfg = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|Win32.Build.0 = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|x64.ActiveCfg = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|x64.Build.0 = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|Win32.Build.0 = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|x64.ActiveCfg = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|x64.Build.0 = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|Win32.ActiveCfg = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|Win32.Build.0 = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|x64.ActiveCfg = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|x64.Build.0 = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|Win32.ActiveCfg = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|Win32.Build.0 = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|x64.ActiveCfg = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|x64.Build.0 = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|Win32.ActiveCfg = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|Win32.Build.0 = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|x64.ActiveCfg = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|x64.Build.0 = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/win32/vs10/simple-httpd.vcxproj b/win32/vs10/simple-httpd.vcxproj new file mode 100644 index 00000000..e3817035 --- /dev/null +++ b/win32/vs10/simple-httpd.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {80DC062E-2146-4CE8-A448-FD2205AB2CA4} + simplehttpd + Win32Proj + + + + Application + Unicode + v100 + true + + + Application + Unicode + v100 + + + Application + Unicode + v100 + true + + + Application + Unicode + v100 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Console + MachineX86 + + + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + MachineX64 + + + + + X64 + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX64 + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs10/simple-httpd.vcxproj.filters b/win32/vs10/simple-httpd.vcxproj.filters new file mode 100644 index 00000000..14cf1d4d --- /dev/null +++ b/win32/vs10/simple-httpd.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Sources + + diff --git a/win32/vs10/simple-proxy.vcxproj b/win32/vs10/simple-proxy.vcxproj new file mode 100644 index 00000000..8d5f2d3e --- /dev/null +++ b/win32/vs10/simple-proxy.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E} + simpleproxy + Win32Proj + + + + Application + Unicode + v100 + true + + + Application + Unicode + v100 + + + Application + Unicode + v100 + true + + + Application + Unicode + v100 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Console + MachineX86 + + + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + MachineX64 + + + + + X64 + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX64 + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs10/simple-proxy.vcxproj.filters b/win32/vs10/simple-proxy.vcxproj.filters new file mode 100644 index 00000000..4a7f2f26 --- /dev/null +++ b/win32/vs10/simple-proxy.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Sources + + diff --git a/win32/vs10/soup-build-defines.props b/win32/vs10/soup-build-defines.props new file mode 100644 index 00000000..0c9b527a --- /dev/null +++ b/win32/vs10/soup-build-defines.props @@ -0,0 +1,29 @@ + + + + + + + + <_PropertySheetDisplayName>soupbuilddefinesprops + $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ + $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ + + + + ..\..;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\libxml2;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) + HAVE_CONFIG_H;%(PreprocessorDefinitions) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + true + /d2Zi+ %(AdditionalOptions) + + + gio-2.0.lib;gobject-2.0.lib;glib-2.0.lib;%(AdditionalDependencies) + $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) + /HIGHENTROPYVA %(AdditionalOptions) + /HIGHENTROPYVA %(AdditionalOptions) + /HIGHENTROPYVA %(AdditionalOptions) + /HIGHENTROPYVA %(AdditionalOptions) + + + diff --git a/win32/vs10/soup-dll-build-defines.props b/win32/vs10/soup-dll-build-defines.props new file mode 100644 index 00000000..40591fff --- /dev/null +++ b/win32/vs10/soup-dll-build-defines.props @@ -0,0 +1,24 @@ + + + + + + + LIBSOUP_COMPILATION;DLL_EXPORT;G_LOG_DOMAIN="libsoup" + LIBSOUP_HAVE_GSSAPI + libxml2.lib;sqlite3.lib;intl.lib;ws2_32.lib + gssapi + 32.lib + 64.lib + + + <_PropertySheetDisplayName>soupdllbuilddefinesprops + + + + $(OutDir)$(SoupDllPrefix)$(ProjectName)$(SoupDllSuffix).dll + $(OutDir)$(SoupDllPrefix)$(ProjectName)$(SoupDllSuffix).pdb + $(OutDir)$(ProjectName)-$(ApiVersion).lib + + + diff --git a/win32/vs10/soup-gen-srcs.props b/win32/vs10/soup-gen-srcs.props new file mode 100644 index 00000000..760825c8 --- /dev/null +++ b/win32/vs10/soup-gen-srcs.props @@ -0,0 +1,26 @@ + + + + + + + copy ..\..\config.h.win32 ..\..\config.h + $(PythonPath)\python.exe ..\soup_version_h.py --version=$(SoupMajorVersion).$(SoupMinorVersion).$(SoupMicroVersion) + $(PythonPath)\python.exe ..\..\libsoup\tld-parser.py ..\..\data\effective_tld_names.dat ..\..\libsoup\tld_data.inc + + + <_PropertySheetDisplayName>soupgensrcsprops + + + + + $(CopyConfigH) + + + $(GenSoupVersionH) + + + $(GenTldDataInc) + + + diff --git a/win32/vs10/soup-gnome.vcxproj b/win32/vs10/soup-gnome.vcxproj new file mode 100644 index 00000000..1212aa6b --- /dev/null +++ b/win32/vs10/soup-gnome.vcxproj @@ -0,0 +1,164 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8C88A385-28C8-4B30-91A4-FBA381A5A46F} + soupgnome + Win32Proj + + + + DynamicLibrary + Unicode + v100 + true + + + DynamicLibrary + Unicode + v100 + + + DynamicLibrary + Unicode + v100 + true + + + DynamicLibrary + Unicode + v100 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Windows + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Windows + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Windows + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Windows + true + true + MachineX64 + + + + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs10/soup-gnome.vcxproj.filters b/win32/vs10/soup-gnome.vcxproj.filters new file mode 100644 index 00000000..924bf660 --- /dev/null +++ b/win32/vs10/soup-gnome.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Source Files + Source Files + Source Files + Source Files + + diff --git a/win32/vs10/soup-gnome.vcxproj.filtersin b/win32/vs10/soup-gnome.vcxproj.filtersin new file mode 100644 index 00000000..e6131d65 --- /dev/null +++ b/win32/vs10/soup-gnome.vcxproj.filtersin @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + +#include "soup-gnome.vs10.sourcefiles.filters" + + diff --git a/win32/vs10/soup-gnome.vcxprojin b/win32/vs10/soup-gnome.vcxprojin new file mode 100644 index 00000000..1fdc9980 --- /dev/null +++ b/win32/vs10/soup-gnome.vcxprojin @@ -0,0 +1,161 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8C88A385-28C8-4B30-91A4-FBA381A5A46F} + soupgnome + Win32Proj + + + + DynamicLibrary + Unicode + v100 + true + + + DynamicLibrary + Unicode + v100 + + + DynamicLibrary + Unicode + v100 + true + + + DynamicLibrary + Unicode + v100 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Windows + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Windows + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Windows + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Windows + true + true + MachineX64 + + + +#include "soup-gnome.vs10.sourcefiles" + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs10/soup-install.props b/win32/vs10/soup-install.props new file mode 100644 index 00000000..fb3240ef --- /dev/null +++ b/win32/vs10/soup-install.props @@ -0,0 +1,101 @@ + + + + + + + +mkdir $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup$(SoupDllSuffix).dll $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup$(SoupDllSuffix).pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup-gnome$(SoupDllSuffix).dll $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup-gnome$(SoupDllSuffix).pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\get.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\get.pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-httpd.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-httpd.pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-proxy.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-proxy.pdb $(CopyDir)\bin +mkdir $(CopyDir)\lib +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\soup-$(ApiVersion).lib $(CopyDir)\lib +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\soup-gnome-$(ApiVersion).lib $(CopyDir)\lib +copy ..\libsoup-$(ApiVersion).pc $(CopyDir)\lib\pkgconfig +copy ..\libsoup-gnome-$(ApiVersion).pc $(CopyDir)\lib\pkgconfig +mkdir $(CopyDir)\include\libsoup-$(ApiVersion)\libsoup +copy ..\..\libsoup\soup.h $(CopyDir)\include\libsoup-2.4\libsoup\soup.h +copy ..\..\libsoup\soup-address.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-address.h +copy ..\..\libsoup\soup-auth.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth.h +copy ..\..\libsoup\soup-auth-domain.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-domain.h +copy ..\..\libsoup\soup-auth-domain-basic.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-domain-basic.h +copy ..\..\libsoup\soup-auth-domain-digest.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-domain-digest.h +copy ..\..\libsoup\soup-auth-manager.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-manager.h +copy ..\..\libsoup\soup-autocleanups.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-autocleanups.h +copy ..\..\libsoup\soup-cache.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cache.h +copy ..\..\libsoup\soup-content-decoder.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-content-decoder.h +copy ..\..\libsoup\soup-content-sniffer.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-content-sniffer.h +copy ..\..\libsoup\soup-cookie.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie.h +copy ..\..\libsoup\soup-cookie-jar.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie-jar.h +copy ..\..\libsoup\soup-cookie-jar-db.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie-jar-db.h +copy ..\..\libsoup\soup-cookie-jar-text.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie-jar-text.h +copy ..\..\libsoup\soup-date.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-date.h +copy ..\..\libsoup\soup-form.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-form.h +copy ..\..\libsoup\soup-headers.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-headers.h +copy ..\..\libsoup\soup-logger.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-logger.h +copy ..\..\libsoup\soup-message.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-message.h +copy ..\..\libsoup\soup-message-body.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-message-body.h +copy ..\..\libsoup\soup-message-headers.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-message-headers.h +copy ..\..\libsoup\soup-method.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-method.h +copy ..\..\libsoup\soup-misc.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-misc.h +copy ..\..\libsoup\soup-multipart.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-multipart.h +copy ..\..\libsoup\soup-multipart-input-stream.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-multipart-input-stream.h +copy ..\..\libsoup\soup-password-manager.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-password-manager.h +copy ..\..\libsoup\soup-portability.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-portability.h +copy ..\..\libsoup\soup-proxy-resolver.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-proxy-resolver.h +copy ..\..\libsoup\soup-proxy-resolver-default.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-proxy-resolver-default.h +copy ..\..\libsoup\soup-proxy-uri-resolver.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-proxy-uri-resolver.h +copy ..\..\libsoup\soup-request.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request.h +copy ..\..\libsoup\soup-request-data.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request-data.h +copy ..\..\libsoup\soup-request-file.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request-file.h +copy ..\..\libsoup\soup-request-http.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request-http.h +copy ..\..\libsoup\soup-requester.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-requester.h +copy ..\..\libsoup\soup-server.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-server.h +copy ..\..\libsoup\soup-session.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session.h +copy ..\..\libsoup\soup-session-async.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session-async.h +copy ..\..\libsoup\soup-session-feature.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session-feature.h +copy ..\..\libsoup\soup-session-sync.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session-sync.h +copy ..\..\libsoup\soup-socket.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-socket.h +copy ..\..\libsoup\soup-status.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-status.h +copy ..\..\libsoup\soup-tld.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-tld.h +copy ..\..\libsoup\soup-types.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-types.h +copy ..\..\libsoup\soup-uri.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-uri.h +copy ..\..\libsoup\soup-value-utils.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-value-utils.h +copy ..\..\libsoup\soup-websocket.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-websocket.h +copy ..\..\libsoup\soup-websocket-connection.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-websocket-connection.h +copy ..\..\libsoup\soup-xmlrpc.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-xmlrpc.h +copy ..\..\libsoup\soup-xmlrpc-old.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-xmlrpc-old.h +copy ..\..\libsoup\soup-enum-types.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-enum-types.h +copy ..\..\libsoup\soup-version.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-version.h +mkdir $(CopyDir)\include\libsoup-gnome-$(ApiVersion)\libsoup +copy ..\..\libsoup\soup-cookie-jar-sqlite.h $(CopyDir)\include\libsoup-gnome-2.4\libsoup\soup-cookie-jar-sqlite.h +copy ..\..\libsoup\soup-gnome.h $(CopyDir)\include\libsoup-gnome-2.4\libsoup\soup-gnome.h +copy ..\..\libsoup\soup-gnome-features.h $(CopyDir)\include\libsoup-gnome-2.4\libsoup\soup-gnome-features.h + + ..\libsoup-$(ApiVersion).pc;..\libsoup-gnome-$(ApiVersion).pc + (if not exist $(CopyDir)\lib\pkgconfig mkdir $(CopyDir)\lib\pkgconfig) & ($(PythonPath)\python.exe ..\souppc.py --prefix=$(CopyDir) --version=$(SoupMajorVersion).$(SoupMinorVersion).$(SoupMicroVersion)) + + + <_PropertySheetDisplayName>soupinstallprops + + + + + $(SoupDoInstall) + + + $(SoupPCFiles) + + + $(SoupGenPC) + + + diff --git a/win32/vs10/soup-install.propsin b/win32/vs10/soup-install.propsin new file mode 100644 index 00000000..11608926 --- /dev/null +++ b/win32/vs10/soup-install.propsin @@ -0,0 +1,51 @@ + + + + + + + +mkdir $(CopyDir)\bin + +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup$(SoupDllSuffix).dll $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup$(SoupDllSuffix).pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup-gnome$(SoupDllSuffix).dll $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup-gnome$(SoupDllSuffix).pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\get.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\get.pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-httpd.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-httpd.pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-proxy.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-proxy.pdb $(CopyDir)\bin + +mkdir $(CopyDir)\lib +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\soup-$(ApiVersion).lib $(CopyDir)\lib +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\soup-gnome-$(ApiVersion).lib $(CopyDir)\lib +copy ..\libsoup-$(ApiVersion).pc $(CopyDir)\lib\pkgconfig +copy ..\libsoup-gnome-$(ApiVersion).pc $(CopyDir)\lib\pkgconfig + +mkdir $(CopyDir)\include\libsoup-$(ApiVersion)\libsoup +#include "soup.vs10.headers" + +mkdir $(CopyDir)\include\libsoup-gnome-$(ApiVersion)\libsoup +#include "soup-gnome.vs10.headers" + + ..\libsoup-$(ApiVersion).pc;..\libsoup-gnome-$(ApiVersion).pc + (if not exist $(CopyDir)\lib\pkgconfig mkdir $(CopyDir)\lib\pkgconfig) & ($(PythonPath)\python.exe ..\souppc.py --prefix=$(CopyDir) --version=$(SoupMajorVersion).$(SoupMinorVersion).$(SoupMicroVersion)) + + + <_PropertySheetDisplayName>soupinstallprops + + + + + $(SoupDoInstall) + + + $(SoupPCFiles) + + + $(SoupGenPC) + + + diff --git a/win32/vs10/soup-install.vcxproj b/win32/vs10/soup-install.vcxproj new file mode 100644 index 00000000..07da5069 --- /dev/null +++ b/win32/vs10/soup-install.vcxproj @@ -0,0 +1,121 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {E0DCF460-914F-46F9-94D6-86D456CB53E9} + soupinstall + + + + Utility + MultiByte + v100 + true + + + Utility + MultiByte + v100 + + + Utility + MultiByte + v100 + true + + + Utility + MultiByte + v100 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copying build results... + $(SoupPCFiles) + $(SoupDoInstall) + some_file;%(Outputs) + Copying build results... + $(SoupPCFiles) + $(SoupDoInstall) + some_file;%(Outputs) + + + Generating .pc files... + $(SoupGenPC) + $(SoupPCFiles);%(Outputs) + Generating .pc files... + $(SoupGenPC) + $(SoupPCFiles);%(Outputs) + + + + + {b24831c4-b8f2-41d6-aaf4-12192f71c623} + false + + + {80dc062e-2146-4ce8-a448-fd2205ab2ca4} + false + + + {3ad0cb92-ee38-425e-83cb-e7b1cb1d305e} + false + + + {8c88a385-28c8-4b30-91a4-fba381a5a46f} + false + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs10/soup-install.vcxproj.filters b/win32/vs10/soup-install.vcxproj.filters new file mode 100644 index 00000000..2627f42f --- /dev/null +++ b/win32/vs10/soup-install.vcxproj.filters @@ -0,0 +1,13 @@ + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + Resource Files + Resource Files + + diff --git a/win32/vs10/soup-version-paths.props b/win32/vs10/soup-version-paths.props new file mode 100644 index 00000000..84f790c4 --- /dev/null +++ b/win32/vs10/soup-version-paths.props @@ -0,0 +1,69 @@ + + + + + + 10 + ..\..\..\vs$(VSVer)\$(Platform) + $(GlibEtcInstallRoot) + 2 + 62 + 2 + 2.4 + lib + -$(ApiVersion)-0 + + -$(ApiVersion)-vs$(VSVer) + $(SoupSeparateVSDllPrefix) + $(SoupSeparateVSDllSuffix) + c:\python34 + + + <_PropertySheetDisplayName>soupversionpathsprops + + + + + $(VSVer) + + + $(GlibEtcInstallRoot) + + + $(CopyDir) + + + $(SoupMajorVersion) + + + $(SoupMinorVersion) + + + $(SoupMicroVersion) + + + $(ApiVersion) + + + $(SoupLibtoolCompatibleDllPrefix) + + + $(SoupLibtoolCompatibleDllSuffix) + + + $(SoupSeparateVSDllPrefix) + + + $(SoupSeparateVSDllSuffix) + + + $(SoupDllPrefix) + + + $(SoupDllSuffix) + + + $(PythonPath) + + + diff --git a/win32/vs10/soup-version-paths.props.in b/win32/vs10/soup-version-paths.props.in new file mode 100644 index 00000000..7b259cec --- /dev/null +++ b/win32/vs10/soup-version-paths.props.in @@ -0,0 +1,69 @@ + + + + + + 10 + ..\..\..\vs$(VSVer)\$(Platform) + $(GlibEtcInstallRoot) + @SOUP_MAJOR_VERSION@ + @SOUP_MINOR_VERSION@ + @SOUP_MICRO_VERSION@ + 2.4 + lib + -$(ApiVersion)-0 + + -$(ApiVersion)-vs$(VSVer) + $(SoupSeparateVSDllPrefix) + $(SoupSeparateVSDllSuffix) + c:\python34 + + + <_PropertySheetDisplayName>soupversionpathsprops + + + + + $(VSVer) + + + $(GlibEtcInstallRoot) + + + $(CopyDir) + + + $(SoupMajorVersion) + + + $(SoupMinorVersion) + + + $(SoupMicroVersion) + + + $(ApiVersion) + + + $(SoupLibtoolCompatibleDllPrefix) + + + $(SoupLibtoolCompatibleDllSuffix) + + + $(SoupSeparateVSDllPrefix) + + + $(SoupSeparateVSDllSuffix) + + + $(SoupDllPrefix) + + + $(SoupDllSuffix) + + + $(PythonPath) + + + diff --git a/win32/vs10/soup.vcxproj b/win32/vs10/soup.vcxproj new file mode 100644 index 00000000..7c9e89f1 --- /dev/null +++ b/win32/vs10/soup.vcxproj @@ -0,0 +1,414 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Debug_MIT_GSSAPI + Win32 + + + Debug_MIT_GSSAPI + x64 + + + Release_MIT_GSSAPI + Win32 + + + Release_MIT_GSSAPI + x64 + + + + {D83A3162-B14C-459C-AF81-15BBFA90240D} + soup + Win32Proj + + + + DynamicLibrary + Unicode + v100 + + + DynamicLibrary + Unicode + v100 + + + DynamicLibrary + Unicode + v100 + true + + + DynamicLibrary + Unicode + v100 + true + + + DynamicLibrary + Unicode + v100 + + + DynamicLibrary + Unicode + v100 + + + DynamicLibrary + Unicode + v100 + true + + + DynamicLibrary + Unicode + v100 + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + trueDebug\$(Platform)\bin\ + falseRelease\$(Platform)\bin\ + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + MachineX86 + + + + + Disabled + _DEBUG;$(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX86);%(AdditionalDependencies) + true + Windows + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + true + true + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX86);%(AdditionalDependencies) + true + Windows + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + MachineX64 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX64);%(AdditionalDependencies) + true + Windows + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + true + true + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX64);%(AdditionalDependencies) + true + Windows + true + true + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + + + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + + + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + + + + + + diff --git a/win32/vs10/soup.vcxproj.filters b/win32/vs10/soup.vcxproj.filters new file mode 100644 index 00000000..71eb5a6c --- /dev/null +++ b/win32/vs10/soup.vcxproj.filters @@ -0,0 +1,95 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + + + Resource Files + Resource Files + Resource Files + + diff --git a/win32/vs10/soup.vcxproj.filtersin b/win32/vs10/soup.vcxproj.filtersin new file mode 100644 index 00000000..d18b1423 --- /dev/null +++ b/win32/vs10/soup.vcxproj.filtersin @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + +#include "soup.vs10.sourcefiles.filters" + + + Resource Files + Resource Files + Resource Files + + diff --git a/win32/vs10/soup.vcxprojin b/win32/vs10/soup.vcxprojin new file mode 100644 index 00000000..047ff287 --- /dev/null +++ b/win32/vs10/soup.vcxprojin @@ -0,0 +1,341 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Debug_MIT_GSSAPI + Win32 + + + Debug_MIT_GSSAPI + x64 + + + Release_MIT_GSSAPI + Win32 + + + Release_MIT_GSSAPI + x64 + + + + {D83A3162-B14C-459C-AF81-15BBFA90240D} + soup + Win32Proj + + + + DynamicLibrary + Unicode + v100 + + + DynamicLibrary + Unicode + v100 + + + DynamicLibrary + Unicode + v100 + true + + + DynamicLibrary + Unicode + v100 + true + + + DynamicLibrary + Unicode + v100 + + + DynamicLibrary + Unicode + v100 + + + DynamicLibrary + Unicode + v100 + true + + + DynamicLibrary + Unicode + v100 + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + trueDebug\$(Platform)\bin\ + falseRelease\$(Platform)\bin\ + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + MachineX86 + + + + + Disabled + _DEBUG;$(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX86);%(AdditionalDependencies) + true + Windows + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + true + true + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX86);%(AdditionalDependencies) + true + Windows + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + MachineX64 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX64);%(AdditionalDependencies) + true + Windows + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + true + true + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX64);%(AdditionalDependencies) + true + Windows + true + true + MachineX64 + + + +#include "soup.vs10.sourcefiles" + + + + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + + + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + + + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + + + + + + diff --git a/win32/vs11/Makefile.am b/win32/vs11/Makefile.am new file mode 100644 index 00000000..3f913e61 --- /dev/null +++ b/win32/vs11/Makefile.am @@ -0,0 +1,28 @@ +EXTRA_DIST = \ + libsoup.sln \ + get.vcxproj \ + simple-httpd.vcxproj \ + simple-proxy.vcxproj \ + soup-install.vcxproj \ + soup-install.vcxproj.filters \ + get.vcxproj.filters \ + simple-httpd.vcxproj.filters \ + simple-proxy.vcxproj.filters \ + soup-build-defines.props \ + soup-dll-build-defines.props \ + soup-gen-srcs.props \ + soup-version-paths.props \ + soup.vcxproj \ + soup-gnome.vcxproj \ + soup.vcxproj.filters \ + soup-gnome.vcxproj.filters \ + soup-install.props + +DISTCLEANFILES = $(EXTRA_DIST) + +MSVC_BASE_VER = 10 +MSVC_BASE_VER_LONG = 2010 +MSVC_VER = 11 +MSVC_VER_LONG = 2012 + +include $(top_srcdir)/win32/Makefile-newvs.am diff --git a/win32/vs11/Makefile.in b/win32/vs11/Makefile.in new file mode 100644 index 00000000..759bf3da --- /dev/null +++ b/win32/vs11/Makefile.in @@ -0,0 +1,600 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Centralized autotools file +# Create the Visual Studio 2012/2013/2015 project files +# from the Visual Studio 2010 project files + +# This autotools file, from GLib, can be used in other projects +# that have Visual Studio build support. + +# Author: Fan, Chun-wei +# November 05, 2012 + +# MSVC_BASE_VER: Baseline MSVC 201x version to copy/process project files from (100 for 2010, 120 for 2013) +# MSVC_BASE_VER_LONG: Long Version of baseline Visual Studio 201x version (2010, 2012, 2013, 14, 15) +# MSVC_BASE_TOOLSET: Use if baseline MSVC toolset is not in the form v$(MSVC_BASE_VER)0, meaning v$(MSVC_BASE_TOOLSET) +# MSVC_VER_LONG: Long Version of target Visual Studio (2012, 2013, 14 and so on) +# MSVC_VER: Short Version of target Visual Studio (110 for 2012, 120 for 2013, 140 for 2015, 141 for 2017) +# MSVC_TOOLSET: Use if target MSVC toolsett is not in the form v $(MSVC_VER)0, meaning v$(MSVC_TOOLSET) +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = win32/vs11 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/glibtests.m4 $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/vapigen.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/win32/Makefile-newvs.am +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APACHE_HTTPD = @APACHE_HTTPD@ +APACHE_MODULE_DIR = @APACHE_MODULE_DIR@ +APACHE_PHP_MODULE_DIR = @APACHE_PHP_MODULE_DIR@ +APACHE_SSL_MODULE_DIR = @APACHE_SSL_MODULE_DIR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL = @CURL@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MAKEFILE = @GLIB_MAKEFILE@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GMSGFMT = @GMSGFMT@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_GNOME = @HAVE_GNOME@ +HTML_DIR = @HTML_DIR@ +IF_HAVE_MOD_UNIXD = @IF_HAVE_MOD_UNIXD@ +IF_HAVE_PHP = @IF_HAVE_PHP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ +INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ +INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ +INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ +INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ +INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ +INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +KRB5_CFLAGS = @KRB5_CFLAGS@ +KRB5_CONFIG = @KRB5_CONFIG@ +KRB5_LIBS = @KRB5_LIBS@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PHP = @PHP@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOUP_AGE = @SOUP_AGE@ +SOUP_API_VERSION = @SOUP_API_VERSION@ +SOUP_CURRENT = @SOUP_CURRENT@ +SOUP_DEBUG_FLAGS = @SOUP_DEBUG_FLAGS@ +SOUP_HIDDEN_VISIBILITY_CFLAGS = @SOUP_HIDDEN_VISIBILITY_CFLAGS@ +SOUP_MAJOR_VERSION = @SOUP_MAJOR_VERSION@ +SOUP_MICRO_VERSION = @SOUP_MICRO_VERSION@ +SOUP_MINOR_VERSION = @SOUP_MINOR_VERSION@ +SOUP_REVISION = @SOUP_REVISION@ +SQLITE_CFLAGS = @SQLITE_CFLAGS@ +SQLITE_LIBS = @SQLITE_LIBS@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VALAC = @VALAC@ +VAPIDIR = @VAPIDIR@ +VAPIGEN = @VAPIGEN@ +VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ +VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XML_CFLAGS = @XML_CFLAGS@ +XML_LIBS = @XML_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +installed_test_metadir = @installed_test_metadir@ +installed_testdir = @installed_testdir@ +intltool__v_merge_options_ = @intltool__v_merge_options_@ +intltool__v_merge_options_0 = @intltool__v_merge_options_0@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +ntlm_auth = @ntlm_auth@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = \ + libsoup.sln \ + get.vcxproj \ + simple-httpd.vcxproj \ + simple-proxy.vcxproj \ + soup-install.vcxproj \ + soup-install.vcxproj.filters \ + get.vcxproj.filters \ + simple-httpd.vcxproj.filters \ + simple-proxy.vcxproj.filters \ + soup-build-defines.props \ + soup-dll-build-defines.props \ + soup-gen-srcs.props \ + soup-version-paths.props \ + soup.vcxproj \ + soup-gnome.vcxproj \ + soup.vcxproj.filters \ + soup-gnome.vcxproj.filters \ + soup-install.props + +DISTCLEANFILES = $(EXTRA_DIST) +MSVC_BASE_VER = 10 +MSVC_BASE_VER_LONG = 2010 +MSVC_VER = 11 +MSVC_VER_LONG = 2012 +@MSVC_BASE_NO_TOOLSET_SET_TRUE@MSVC_BASE_TOOLSET = $(MSVC_BASE_VER)0 +@MSVC_NO_TOOLSET_SET_TRUE@MSVC_TOOLSET = $(MSVC_VER)0 +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/win32/Makefile-newvs.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign win32/vs11/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign win32/vs11/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(top_srcdir)/win32/Makefile-newvs.am $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +%.sln: + sed 's/11\.00/12\.00/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + sed 's/$(MSVC_BASE_VER_LONG)/$(MSVC_VER_LONG)/g' < $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/win32/vs$(MSVC_VER)/$@ + rm $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + +%.txt: + sed 's/vs$(MSVC_BASE_VER)/vs$(MSVC_VER)/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + sed 's/VS$(MSVC_BASE_VER)/VS$(MSVC_VER)/g' < $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/win32/vs$(MSVC_VER)/$@ + rm $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + +%.vcxproj: + if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \ + sed 's/v$(MSVC_BASE_TOOLSET)/v$(MSVC_TOOLSET)/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + else \ + sed 's/v$(MSVC_BASE_TOOLSET)/v$(MSVC_TOOLSET)/g' < $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + fi + +%.props: $(top_builddir)/win32/vs$(MSVC_BASE_VER)/Makefile + if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \ + sed 's/$(MSVC_BASE_VER)<\/VSVer>/$(MSVC_VER)<\/VSVer>/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + else \ + sed 's/$(MSVC_BASE_VER)<\/VSVer>/$(MSVC_VER)<\/VSVer>/g' < $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + fi + +%.vcxproj.filters: + if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \ + cp $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + else \ + cp $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + fi + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/win32/vs11/get.vcxproj b/win32/vs11/get.vcxproj new file mode 100644 index 00000000..2cb7899e --- /dev/null +++ b/win32/vs11/get.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B24831C4-B8F2-41D6-AAF4-12192F71C623} + get + Win32Proj + + + + Application + Unicode + v110 + true + + + Application + Unicode + v110 + + + Application + Unicode + v110 + true + + + Application + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Console + MachineX86 + + + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + MachineX64 + + + + + X64 + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX64 + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs11/get.vcxproj.filters b/win32/vs11/get.vcxproj.filters new file mode 100644 index 00000000..9bc6fcf8 --- /dev/null +++ b/win32/vs11/get.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Sources + + diff --git a/win32/vs11/libsoup.sln b/win32/vs11/libsoup.sln new file mode 100644 index 00000000..67cd7b55 --- /dev/null +++ b/win32/vs11/libsoup.sln @@ -0,0 +1,128 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup", "soup.vcxproj", "{D83A3162-B14C-459C-AF81-15BBFA90240D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup-gnome", "soup-gnome.vcxproj", "{8C88A385-28C8-4B30-91A4-FBA381A5A46F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "get", "get.vcxproj", "{B24831C4-B8F2-41D6-AAF4-12192F71C623}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple-httpd", "simple-httpd.vcxproj", "{80DC062E-2146-4CE8-A448-FD2205AB2CA4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple-proxy", "simple-proxy.vcxproj", "{3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup-install", "soup-install.vcxproj", "{E0DCF460-914F-46F9-94D6-86D456CB53E9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + Debug_MIT_GSSAPI|Win32 = Debug_MIT_GSSAPI|Win32 + Debug_MIT_GSSAPI|x64 = Debug_MIT_GSSAPI|x64 + Release_MIT_GSSAPI|Win32 = Release_MIT_GSSAPI|Win32 + Release_MIT_GSSAPI|x64 = Release_MIT_GSSAPI|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|Win32.ActiveCfg = Debug|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|Win32.Build.0 = Debug|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|x64.ActiveCfg = Debug|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|x64.Build.0 = Debug|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|Win32.ActiveCfg = Release|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|Win32.Build.0 = Release|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|x64.ActiveCfg = Release|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|x64.Build.0 = Release|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|x64.Build.0 = Debug_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|Win32.Build.0 = Release_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|x64.ActiveCfg = Release_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|x64.Build.0 = Release_MIT_GSSAPI|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|Win32.ActiveCfg = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|Win32.Build.0 = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|x64.ActiveCfg = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|x64.Build.0 = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|Win32.ActiveCfg = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|Win32.Build.0 = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|x64.ActiveCfg = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|x64.Build.0 = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|Win32.ActiveCfg = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|Win32.Build.0 = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|x64.ActiveCfg = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|x64.Build.0 = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|Win32.ActiveCfg = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|Win32.Build.0 = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|x64.ActiveCfg = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|x64.Build.0 = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|Win32.ActiveCfg = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|Win32.Build.0 = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|x64.ActiveCfg = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|x64.Build.0 = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|Win32.ActiveCfg = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|Win32.Build.0 = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|x64.ActiveCfg = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|x64.Build.0 = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|Win32.Build.0 = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|x64.ActiveCfg = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|x64.Build.0 = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|Win32.ActiveCfg = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|Win32.Build.0 = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|x64.ActiveCfg = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|x64.Build.0 = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|Win32.ActiveCfg = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|Win32.Build.0 = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|x64.ActiveCfg = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|x64.Build.0 = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|Win32.ActiveCfg = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|Win32.Build.0 = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|x64.ActiveCfg = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|x64.Build.0 = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/win32/vs11/simple-httpd.vcxproj b/win32/vs11/simple-httpd.vcxproj new file mode 100644 index 00000000..1c93bf08 --- /dev/null +++ b/win32/vs11/simple-httpd.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {80DC062E-2146-4CE8-A448-FD2205AB2CA4} + simplehttpd + Win32Proj + + + + Application + Unicode + v110 + true + + + Application + Unicode + v110 + + + Application + Unicode + v110 + true + + + Application + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Console + MachineX86 + + + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + MachineX64 + + + + + X64 + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX64 + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs11/simple-httpd.vcxproj.filters b/win32/vs11/simple-httpd.vcxproj.filters new file mode 100644 index 00000000..14cf1d4d --- /dev/null +++ b/win32/vs11/simple-httpd.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Sources + + diff --git a/win32/vs11/simple-proxy.vcxproj b/win32/vs11/simple-proxy.vcxproj new file mode 100644 index 00000000..04f595f8 --- /dev/null +++ b/win32/vs11/simple-proxy.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E} + simpleproxy + Win32Proj + + + + Application + Unicode + v110 + true + + + Application + Unicode + v110 + + + Application + Unicode + v110 + true + + + Application + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Console + MachineX86 + + + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + MachineX64 + + + + + X64 + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX64 + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs11/simple-proxy.vcxproj.filters b/win32/vs11/simple-proxy.vcxproj.filters new file mode 100644 index 00000000..4a7f2f26 --- /dev/null +++ b/win32/vs11/simple-proxy.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Sources + + diff --git a/win32/vs11/soup-build-defines.props b/win32/vs11/soup-build-defines.props new file mode 100644 index 00000000..0c9b527a --- /dev/null +++ b/win32/vs11/soup-build-defines.props @@ -0,0 +1,29 @@ + + + + + + + + <_PropertySheetDisplayName>soupbuilddefinesprops + $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ + $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ + + + + ..\..;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\libxml2;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) + HAVE_CONFIG_H;%(PreprocessorDefinitions) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + true + /d2Zi+ %(AdditionalOptions) + + + gio-2.0.lib;gobject-2.0.lib;glib-2.0.lib;%(AdditionalDependencies) + $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) + /HIGHENTROPYVA %(AdditionalOptions) + /HIGHENTROPYVA %(AdditionalOptions) + /HIGHENTROPYVA %(AdditionalOptions) + /HIGHENTROPYVA %(AdditionalOptions) + + + diff --git a/win32/vs11/soup-dll-build-defines.props b/win32/vs11/soup-dll-build-defines.props new file mode 100644 index 00000000..40591fff --- /dev/null +++ b/win32/vs11/soup-dll-build-defines.props @@ -0,0 +1,24 @@ + + + + + + + LIBSOUP_COMPILATION;DLL_EXPORT;G_LOG_DOMAIN="libsoup" + LIBSOUP_HAVE_GSSAPI + libxml2.lib;sqlite3.lib;intl.lib;ws2_32.lib + gssapi + 32.lib + 64.lib + + + <_PropertySheetDisplayName>soupdllbuilddefinesprops + + + + $(OutDir)$(SoupDllPrefix)$(ProjectName)$(SoupDllSuffix).dll + $(OutDir)$(SoupDllPrefix)$(ProjectName)$(SoupDllSuffix).pdb + $(OutDir)$(ProjectName)-$(ApiVersion).lib + + + diff --git a/win32/vs11/soup-gen-srcs.props b/win32/vs11/soup-gen-srcs.props new file mode 100644 index 00000000..760825c8 --- /dev/null +++ b/win32/vs11/soup-gen-srcs.props @@ -0,0 +1,26 @@ + + + + + + + copy ..\..\config.h.win32 ..\..\config.h + $(PythonPath)\python.exe ..\soup_version_h.py --version=$(SoupMajorVersion).$(SoupMinorVersion).$(SoupMicroVersion) + $(PythonPath)\python.exe ..\..\libsoup\tld-parser.py ..\..\data\effective_tld_names.dat ..\..\libsoup\tld_data.inc + + + <_PropertySheetDisplayName>soupgensrcsprops + + + + + $(CopyConfigH) + + + $(GenSoupVersionH) + + + $(GenTldDataInc) + + + diff --git a/win32/vs11/soup-gnome.vcxproj b/win32/vs11/soup-gnome.vcxproj new file mode 100644 index 00000000..1d97e83d --- /dev/null +++ b/win32/vs11/soup-gnome.vcxproj @@ -0,0 +1,164 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8C88A385-28C8-4B30-91A4-FBA381A5A46F} + soupgnome + Win32Proj + + + + DynamicLibrary + Unicode + v110 + true + + + DynamicLibrary + Unicode + v110 + + + DynamicLibrary + Unicode + v110 + true + + + DynamicLibrary + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Windows + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Windows + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Windows + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Windows + true + true + MachineX64 + + + + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs11/soup-gnome.vcxproj.filters b/win32/vs11/soup-gnome.vcxproj.filters new file mode 100644 index 00000000..924bf660 --- /dev/null +++ b/win32/vs11/soup-gnome.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Source Files + Source Files + Source Files + Source Files + + diff --git a/win32/vs11/soup-install.props b/win32/vs11/soup-install.props new file mode 100644 index 00000000..fb3240ef --- /dev/null +++ b/win32/vs11/soup-install.props @@ -0,0 +1,101 @@ + + + + + + + +mkdir $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup$(SoupDllSuffix).dll $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup$(SoupDllSuffix).pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup-gnome$(SoupDllSuffix).dll $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup-gnome$(SoupDllSuffix).pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\get.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\get.pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-httpd.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-httpd.pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-proxy.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-proxy.pdb $(CopyDir)\bin +mkdir $(CopyDir)\lib +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\soup-$(ApiVersion).lib $(CopyDir)\lib +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\soup-gnome-$(ApiVersion).lib $(CopyDir)\lib +copy ..\libsoup-$(ApiVersion).pc $(CopyDir)\lib\pkgconfig +copy ..\libsoup-gnome-$(ApiVersion).pc $(CopyDir)\lib\pkgconfig +mkdir $(CopyDir)\include\libsoup-$(ApiVersion)\libsoup +copy ..\..\libsoup\soup.h $(CopyDir)\include\libsoup-2.4\libsoup\soup.h +copy ..\..\libsoup\soup-address.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-address.h +copy ..\..\libsoup\soup-auth.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth.h +copy ..\..\libsoup\soup-auth-domain.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-domain.h +copy ..\..\libsoup\soup-auth-domain-basic.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-domain-basic.h +copy ..\..\libsoup\soup-auth-domain-digest.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-domain-digest.h +copy ..\..\libsoup\soup-auth-manager.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-manager.h +copy ..\..\libsoup\soup-autocleanups.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-autocleanups.h +copy ..\..\libsoup\soup-cache.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cache.h +copy ..\..\libsoup\soup-content-decoder.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-content-decoder.h +copy ..\..\libsoup\soup-content-sniffer.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-content-sniffer.h +copy ..\..\libsoup\soup-cookie.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie.h +copy ..\..\libsoup\soup-cookie-jar.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie-jar.h +copy ..\..\libsoup\soup-cookie-jar-db.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie-jar-db.h +copy ..\..\libsoup\soup-cookie-jar-text.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie-jar-text.h +copy ..\..\libsoup\soup-date.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-date.h +copy ..\..\libsoup\soup-form.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-form.h +copy ..\..\libsoup\soup-headers.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-headers.h +copy ..\..\libsoup\soup-logger.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-logger.h +copy ..\..\libsoup\soup-message.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-message.h +copy ..\..\libsoup\soup-message-body.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-message-body.h +copy ..\..\libsoup\soup-message-headers.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-message-headers.h +copy ..\..\libsoup\soup-method.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-method.h +copy ..\..\libsoup\soup-misc.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-misc.h +copy ..\..\libsoup\soup-multipart.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-multipart.h +copy ..\..\libsoup\soup-multipart-input-stream.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-multipart-input-stream.h +copy ..\..\libsoup\soup-password-manager.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-password-manager.h +copy ..\..\libsoup\soup-portability.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-portability.h +copy ..\..\libsoup\soup-proxy-resolver.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-proxy-resolver.h +copy ..\..\libsoup\soup-proxy-resolver-default.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-proxy-resolver-default.h +copy ..\..\libsoup\soup-proxy-uri-resolver.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-proxy-uri-resolver.h +copy ..\..\libsoup\soup-request.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request.h +copy ..\..\libsoup\soup-request-data.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request-data.h +copy ..\..\libsoup\soup-request-file.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request-file.h +copy ..\..\libsoup\soup-request-http.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request-http.h +copy ..\..\libsoup\soup-requester.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-requester.h +copy ..\..\libsoup\soup-server.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-server.h +copy ..\..\libsoup\soup-session.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session.h +copy ..\..\libsoup\soup-session-async.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session-async.h +copy ..\..\libsoup\soup-session-feature.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session-feature.h +copy ..\..\libsoup\soup-session-sync.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session-sync.h +copy ..\..\libsoup\soup-socket.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-socket.h +copy ..\..\libsoup\soup-status.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-status.h +copy ..\..\libsoup\soup-tld.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-tld.h +copy ..\..\libsoup\soup-types.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-types.h +copy ..\..\libsoup\soup-uri.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-uri.h +copy ..\..\libsoup\soup-value-utils.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-value-utils.h +copy ..\..\libsoup\soup-websocket.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-websocket.h +copy ..\..\libsoup\soup-websocket-connection.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-websocket-connection.h +copy ..\..\libsoup\soup-xmlrpc.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-xmlrpc.h +copy ..\..\libsoup\soup-xmlrpc-old.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-xmlrpc-old.h +copy ..\..\libsoup\soup-enum-types.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-enum-types.h +copy ..\..\libsoup\soup-version.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-version.h +mkdir $(CopyDir)\include\libsoup-gnome-$(ApiVersion)\libsoup +copy ..\..\libsoup\soup-cookie-jar-sqlite.h $(CopyDir)\include\libsoup-gnome-2.4\libsoup\soup-cookie-jar-sqlite.h +copy ..\..\libsoup\soup-gnome.h $(CopyDir)\include\libsoup-gnome-2.4\libsoup\soup-gnome.h +copy ..\..\libsoup\soup-gnome-features.h $(CopyDir)\include\libsoup-gnome-2.4\libsoup\soup-gnome-features.h + + ..\libsoup-$(ApiVersion).pc;..\libsoup-gnome-$(ApiVersion).pc + (if not exist $(CopyDir)\lib\pkgconfig mkdir $(CopyDir)\lib\pkgconfig) & ($(PythonPath)\python.exe ..\souppc.py --prefix=$(CopyDir) --version=$(SoupMajorVersion).$(SoupMinorVersion).$(SoupMicroVersion)) + + + <_PropertySheetDisplayName>soupinstallprops + + + + + $(SoupDoInstall) + + + $(SoupPCFiles) + + + $(SoupGenPC) + + + diff --git a/win32/vs11/soup-install.vcxproj b/win32/vs11/soup-install.vcxproj new file mode 100644 index 00000000..cbd15370 --- /dev/null +++ b/win32/vs11/soup-install.vcxproj @@ -0,0 +1,121 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {E0DCF460-914F-46F9-94D6-86D456CB53E9} + soupinstall + + + + Utility + MultiByte + v110 + true + + + Utility + MultiByte + v110 + + + Utility + MultiByte + v110 + true + + + Utility + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copying build results... + $(SoupPCFiles) + $(SoupDoInstall) + some_file;%(Outputs) + Copying build results... + $(SoupPCFiles) + $(SoupDoInstall) + some_file;%(Outputs) + + + Generating .pc files... + $(SoupGenPC) + $(SoupPCFiles);%(Outputs) + Generating .pc files... + $(SoupGenPC) + $(SoupPCFiles);%(Outputs) + + + + + {b24831c4-b8f2-41d6-aaf4-12192f71c623} + false + + + {80dc062e-2146-4ce8-a448-fd2205ab2ca4} + false + + + {3ad0cb92-ee38-425e-83cb-e7b1cb1d305e} + false + + + {8c88a385-28c8-4b30-91a4-fba381a5a46f} + false + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs11/soup-install.vcxproj.filters b/win32/vs11/soup-install.vcxproj.filters new file mode 100644 index 00000000..2627f42f --- /dev/null +++ b/win32/vs11/soup-install.vcxproj.filters @@ -0,0 +1,13 @@ + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + Resource Files + Resource Files + + diff --git a/win32/vs11/soup-version-paths.props b/win32/vs11/soup-version-paths.props new file mode 100644 index 00000000..c31dc31f --- /dev/null +++ b/win32/vs11/soup-version-paths.props @@ -0,0 +1,69 @@ + + + + + + 11 + ..\..\..\vs$(VSVer)\$(Platform) + $(GlibEtcInstallRoot) + 2 + 62 + 2 + 2.4 + lib + -$(ApiVersion)-0 + + -$(ApiVersion)-vs$(VSVer) + $(SoupSeparateVSDllPrefix) + $(SoupSeparateVSDllSuffix) + c:\python34 + + + <_PropertySheetDisplayName>soupversionpathsprops + + + + + $(VSVer) + + + $(GlibEtcInstallRoot) + + + $(CopyDir) + + + $(SoupMajorVersion) + + + $(SoupMinorVersion) + + + $(SoupMicroVersion) + + + $(ApiVersion) + + + $(SoupLibtoolCompatibleDllPrefix) + + + $(SoupLibtoolCompatibleDllSuffix) + + + $(SoupSeparateVSDllPrefix) + + + $(SoupSeparateVSDllSuffix) + + + $(SoupDllPrefix) + + + $(SoupDllSuffix) + + + $(PythonPath) + + + diff --git a/win32/vs11/soup.vcxproj b/win32/vs11/soup.vcxproj new file mode 100644 index 00000000..f7c57a40 --- /dev/null +++ b/win32/vs11/soup.vcxproj @@ -0,0 +1,414 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Debug_MIT_GSSAPI + Win32 + + + Debug_MIT_GSSAPI + x64 + + + Release_MIT_GSSAPI + Win32 + + + Release_MIT_GSSAPI + x64 + + + + {D83A3162-B14C-459C-AF81-15BBFA90240D} + soup + Win32Proj + + + + DynamicLibrary + Unicode + v110 + + + DynamicLibrary + Unicode + v110 + + + DynamicLibrary + Unicode + v110 + true + + + DynamicLibrary + Unicode + v110 + true + + + DynamicLibrary + Unicode + v110 + + + DynamicLibrary + Unicode + v110 + + + DynamicLibrary + Unicode + v110 + true + + + DynamicLibrary + Unicode + v110 + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + trueDebug\$(Platform)\bin\ + falseRelease\$(Platform)\bin\ + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + MachineX86 + + + + + Disabled + _DEBUG;$(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX86);%(AdditionalDependencies) + true + Windows + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + true + true + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX86);%(AdditionalDependencies) + true + Windows + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + MachineX64 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX64);%(AdditionalDependencies) + true + Windows + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + true + true + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX64);%(AdditionalDependencies) + true + Windows + true + true + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + + + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + + + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + + + + + + diff --git a/win32/vs11/soup.vcxproj.filters b/win32/vs11/soup.vcxproj.filters new file mode 100644 index 00000000..71eb5a6c --- /dev/null +++ b/win32/vs11/soup.vcxproj.filters @@ -0,0 +1,95 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + + + Resource Files + Resource Files + Resource Files + + diff --git a/win32/vs12/Makefile.am b/win32/vs12/Makefile.am new file mode 100644 index 00000000..a86d179e --- /dev/null +++ b/win32/vs12/Makefile.am @@ -0,0 +1,28 @@ +EXTRA_DIST = \ + libsoup.sln \ + get.vcxproj \ + simple-httpd.vcxproj \ + simple-proxy.vcxproj \ + soup-install.vcxproj \ + soup-install.vcxproj.filters \ + get.vcxproj.filters \ + simple-httpd.vcxproj.filters \ + simple-proxy.vcxproj.filters \ + soup-build-defines.props \ + soup-dll-build-defines.props \ + soup-gen-srcs.props \ + soup-version-paths.props \ + soup.vcxproj \ + soup-gnome.vcxproj \ + soup.vcxproj.filters \ + soup-gnome.vcxproj.filters \ + soup-install.props + +DISTCLEANFILES = $(EXTRA_DIST) + +MSVC_BASE_VER = 10 +MSVC_BASE_VER_LONG = 2010 +MSVC_VER = 12 +MSVC_VER_LONG = 2013 + +include $(top_srcdir)/win32/Makefile-newvs.am diff --git a/win32/vs12/Makefile.in b/win32/vs12/Makefile.in new file mode 100644 index 00000000..d29a41e9 --- /dev/null +++ b/win32/vs12/Makefile.in @@ -0,0 +1,600 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Centralized autotools file +# Create the Visual Studio 2012/2013/2015 project files +# from the Visual Studio 2010 project files + +# This autotools file, from GLib, can be used in other projects +# that have Visual Studio build support. + +# Author: Fan, Chun-wei +# November 05, 2012 + +# MSVC_BASE_VER: Baseline MSVC 201x version to copy/process project files from (100 for 2010, 120 for 2013) +# MSVC_BASE_VER_LONG: Long Version of baseline Visual Studio 201x version (2010, 2012, 2013, 14, 15) +# MSVC_BASE_TOOLSET: Use if baseline MSVC toolset is not in the form v$(MSVC_BASE_VER)0, meaning v$(MSVC_BASE_TOOLSET) +# MSVC_VER_LONG: Long Version of target Visual Studio (2012, 2013, 14 and so on) +# MSVC_VER: Short Version of target Visual Studio (110 for 2012, 120 for 2013, 140 for 2015, 141 for 2017) +# MSVC_TOOLSET: Use if target MSVC toolsett is not in the form v $(MSVC_VER)0, meaning v$(MSVC_TOOLSET) +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = win32/vs12 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/glibtests.m4 $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/vapigen.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/win32/Makefile-newvs.am +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APACHE_HTTPD = @APACHE_HTTPD@ +APACHE_MODULE_DIR = @APACHE_MODULE_DIR@ +APACHE_PHP_MODULE_DIR = @APACHE_PHP_MODULE_DIR@ +APACHE_SSL_MODULE_DIR = @APACHE_SSL_MODULE_DIR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL = @CURL@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MAKEFILE = @GLIB_MAKEFILE@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GMSGFMT = @GMSGFMT@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_GNOME = @HAVE_GNOME@ +HTML_DIR = @HTML_DIR@ +IF_HAVE_MOD_UNIXD = @IF_HAVE_MOD_UNIXD@ +IF_HAVE_PHP = @IF_HAVE_PHP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ +INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ +INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ +INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ +INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ +INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ +INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +KRB5_CFLAGS = @KRB5_CFLAGS@ +KRB5_CONFIG = @KRB5_CONFIG@ +KRB5_LIBS = @KRB5_LIBS@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PHP = @PHP@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOUP_AGE = @SOUP_AGE@ +SOUP_API_VERSION = @SOUP_API_VERSION@ +SOUP_CURRENT = @SOUP_CURRENT@ +SOUP_DEBUG_FLAGS = @SOUP_DEBUG_FLAGS@ +SOUP_HIDDEN_VISIBILITY_CFLAGS = @SOUP_HIDDEN_VISIBILITY_CFLAGS@ +SOUP_MAJOR_VERSION = @SOUP_MAJOR_VERSION@ +SOUP_MICRO_VERSION = @SOUP_MICRO_VERSION@ +SOUP_MINOR_VERSION = @SOUP_MINOR_VERSION@ +SOUP_REVISION = @SOUP_REVISION@ +SQLITE_CFLAGS = @SQLITE_CFLAGS@ +SQLITE_LIBS = @SQLITE_LIBS@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VALAC = @VALAC@ +VAPIDIR = @VAPIDIR@ +VAPIGEN = @VAPIGEN@ +VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ +VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XML_CFLAGS = @XML_CFLAGS@ +XML_LIBS = @XML_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +installed_test_metadir = @installed_test_metadir@ +installed_testdir = @installed_testdir@ +intltool__v_merge_options_ = @intltool__v_merge_options_@ +intltool__v_merge_options_0 = @intltool__v_merge_options_0@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +ntlm_auth = @ntlm_auth@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = \ + libsoup.sln \ + get.vcxproj \ + simple-httpd.vcxproj \ + simple-proxy.vcxproj \ + soup-install.vcxproj \ + soup-install.vcxproj.filters \ + get.vcxproj.filters \ + simple-httpd.vcxproj.filters \ + simple-proxy.vcxproj.filters \ + soup-build-defines.props \ + soup-dll-build-defines.props \ + soup-gen-srcs.props \ + soup-version-paths.props \ + soup.vcxproj \ + soup-gnome.vcxproj \ + soup.vcxproj.filters \ + soup-gnome.vcxproj.filters \ + soup-install.props + +DISTCLEANFILES = $(EXTRA_DIST) +MSVC_BASE_VER = 10 +MSVC_BASE_VER_LONG = 2010 +MSVC_VER = 12 +MSVC_VER_LONG = 2013 +@MSVC_BASE_NO_TOOLSET_SET_TRUE@MSVC_BASE_TOOLSET = $(MSVC_BASE_VER)0 +@MSVC_NO_TOOLSET_SET_TRUE@MSVC_TOOLSET = $(MSVC_VER)0 +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/win32/Makefile-newvs.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign win32/vs12/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign win32/vs12/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(top_srcdir)/win32/Makefile-newvs.am $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +%.sln: + sed 's/11\.00/12\.00/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + sed 's/$(MSVC_BASE_VER_LONG)/$(MSVC_VER_LONG)/g' < $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/win32/vs$(MSVC_VER)/$@ + rm $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + +%.txt: + sed 's/vs$(MSVC_BASE_VER)/vs$(MSVC_VER)/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + sed 's/VS$(MSVC_BASE_VER)/VS$(MSVC_VER)/g' < $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/win32/vs$(MSVC_VER)/$@ + rm $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + +%.vcxproj: + if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \ + sed 's/v$(MSVC_BASE_TOOLSET)/v$(MSVC_TOOLSET)/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + else \ + sed 's/v$(MSVC_BASE_TOOLSET)/v$(MSVC_TOOLSET)/g' < $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + fi + +%.props: $(top_builddir)/win32/vs$(MSVC_BASE_VER)/Makefile + if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \ + sed 's/$(MSVC_BASE_VER)<\/VSVer>/$(MSVC_VER)<\/VSVer>/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + else \ + sed 's/$(MSVC_BASE_VER)<\/VSVer>/$(MSVC_VER)<\/VSVer>/g' < $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + fi + +%.vcxproj.filters: + if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \ + cp $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + else \ + cp $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + fi + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/win32/vs12/get.vcxproj b/win32/vs12/get.vcxproj new file mode 100644 index 00000000..01ecefdd --- /dev/null +++ b/win32/vs12/get.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B24831C4-B8F2-41D6-AAF4-12192F71C623} + get + Win32Proj + + + + Application + Unicode + v120 + true + + + Application + Unicode + v120 + + + Application + Unicode + v120 + true + + + Application + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Console + MachineX86 + + + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + MachineX64 + + + + + X64 + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX64 + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs12/get.vcxproj.filters b/win32/vs12/get.vcxproj.filters new file mode 100644 index 00000000..9bc6fcf8 --- /dev/null +++ b/win32/vs12/get.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Sources + + diff --git a/win32/vs12/libsoup.sln b/win32/vs12/libsoup.sln new file mode 100644 index 00000000..945b0465 --- /dev/null +++ b/win32/vs12/libsoup.sln @@ -0,0 +1,128 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup", "soup.vcxproj", "{D83A3162-B14C-459C-AF81-15BBFA90240D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup-gnome", "soup-gnome.vcxproj", "{8C88A385-28C8-4B30-91A4-FBA381A5A46F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "get", "get.vcxproj", "{B24831C4-B8F2-41D6-AAF4-12192F71C623}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple-httpd", "simple-httpd.vcxproj", "{80DC062E-2146-4CE8-A448-FD2205AB2CA4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple-proxy", "simple-proxy.vcxproj", "{3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup-install", "soup-install.vcxproj", "{E0DCF460-914F-46F9-94D6-86D456CB53E9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + Debug_MIT_GSSAPI|Win32 = Debug_MIT_GSSAPI|Win32 + Debug_MIT_GSSAPI|x64 = Debug_MIT_GSSAPI|x64 + Release_MIT_GSSAPI|Win32 = Release_MIT_GSSAPI|Win32 + Release_MIT_GSSAPI|x64 = Release_MIT_GSSAPI|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|Win32.ActiveCfg = Debug|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|Win32.Build.0 = Debug|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|x64.ActiveCfg = Debug|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|x64.Build.0 = Debug|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|Win32.ActiveCfg = Release|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|Win32.Build.0 = Release|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|x64.ActiveCfg = Release|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|x64.Build.0 = Release|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|x64.Build.0 = Debug_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|Win32.Build.0 = Release_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|x64.ActiveCfg = Release_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|x64.Build.0 = Release_MIT_GSSAPI|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|Win32.ActiveCfg = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|Win32.Build.0 = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|x64.ActiveCfg = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|x64.Build.0 = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|Win32.ActiveCfg = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|Win32.Build.0 = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|x64.ActiveCfg = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|x64.Build.0 = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|Win32.ActiveCfg = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|Win32.Build.0 = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|x64.ActiveCfg = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|x64.Build.0 = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|Win32.ActiveCfg = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|Win32.Build.0 = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|x64.ActiveCfg = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|x64.Build.0 = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|Win32.ActiveCfg = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|Win32.Build.0 = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|x64.ActiveCfg = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|x64.Build.0 = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|Win32.ActiveCfg = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|Win32.Build.0 = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|x64.ActiveCfg = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|x64.Build.0 = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|Win32.Build.0 = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|x64.ActiveCfg = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|x64.Build.0 = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|Win32.ActiveCfg = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|Win32.Build.0 = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|x64.ActiveCfg = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|x64.Build.0 = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|Win32.ActiveCfg = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|Win32.Build.0 = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|x64.ActiveCfg = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|x64.Build.0 = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|Win32.ActiveCfg = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|Win32.Build.0 = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|x64.ActiveCfg = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|x64.Build.0 = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/win32/vs12/simple-httpd.vcxproj b/win32/vs12/simple-httpd.vcxproj new file mode 100644 index 00000000..fd1f564d --- /dev/null +++ b/win32/vs12/simple-httpd.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {80DC062E-2146-4CE8-A448-FD2205AB2CA4} + simplehttpd + Win32Proj + + + + Application + Unicode + v120 + true + + + Application + Unicode + v120 + + + Application + Unicode + v120 + true + + + Application + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Console + MachineX86 + + + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + MachineX64 + + + + + X64 + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX64 + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs12/simple-httpd.vcxproj.filters b/win32/vs12/simple-httpd.vcxproj.filters new file mode 100644 index 00000000..14cf1d4d --- /dev/null +++ b/win32/vs12/simple-httpd.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Sources + + diff --git a/win32/vs12/simple-proxy.vcxproj b/win32/vs12/simple-proxy.vcxproj new file mode 100644 index 00000000..0071cbd5 --- /dev/null +++ b/win32/vs12/simple-proxy.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E} + simpleproxy + Win32Proj + + + + Application + Unicode + v120 + true + + + Application + Unicode + v120 + + + Application + Unicode + v120 + true + + + Application + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Console + MachineX86 + + + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + MachineX64 + + + + + X64 + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX64 + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs12/simple-proxy.vcxproj.filters b/win32/vs12/simple-proxy.vcxproj.filters new file mode 100644 index 00000000..4a7f2f26 --- /dev/null +++ b/win32/vs12/simple-proxy.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Sources + + diff --git a/win32/vs12/soup-build-defines.props b/win32/vs12/soup-build-defines.props new file mode 100644 index 00000000..0c9b527a --- /dev/null +++ b/win32/vs12/soup-build-defines.props @@ -0,0 +1,29 @@ + + + + + + + + <_PropertySheetDisplayName>soupbuilddefinesprops + $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ + $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ + + + + ..\..;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\libxml2;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) + HAVE_CONFIG_H;%(PreprocessorDefinitions) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + true + /d2Zi+ %(AdditionalOptions) + + + gio-2.0.lib;gobject-2.0.lib;glib-2.0.lib;%(AdditionalDependencies) + $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) + /HIGHENTROPYVA %(AdditionalOptions) + /HIGHENTROPYVA %(AdditionalOptions) + /HIGHENTROPYVA %(AdditionalOptions) + /HIGHENTROPYVA %(AdditionalOptions) + + + diff --git a/win32/vs12/soup-dll-build-defines.props b/win32/vs12/soup-dll-build-defines.props new file mode 100644 index 00000000..40591fff --- /dev/null +++ b/win32/vs12/soup-dll-build-defines.props @@ -0,0 +1,24 @@ + + + + + + + LIBSOUP_COMPILATION;DLL_EXPORT;G_LOG_DOMAIN="libsoup" + LIBSOUP_HAVE_GSSAPI + libxml2.lib;sqlite3.lib;intl.lib;ws2_32.lib + gssapi + 32.lib + 64.lib + + + <_PropertySheetDisplayName>soupdllbuilddefinesprops + + + + $(OutDir)$(SoupDllPrefix)$(ProjectName)$(SoupDllSuffix).dll + $(OutDir)$(SoupDllPrefix)$(ProjectName)$(SoupDllSuffix).pdb + $(OutDir)$(ProjectName)-$(ApiVersion).lib + + + diff --git a/win32/vs12/soup-gen-srcs.props b/win32/vs12/soup-gen-srcs.props new file mode 100644 index 00000000..760825c8 --- /dev/null +++ b/win32/vs12/soup-gen-srcs.props @@ -0,0 +1,26 @@ + + + + + + + copy ..\..\config.h.win32 ..\..\config.h + $(PythonPath)\python.exe ..\soup_version_h.py --version=$(SoupMajorVersion).$(SoupMinorVersion).$(SoupMicroVersion) + $(PythonPath)\python.exe ..\..\libsoup\tld-parser.py ..\..\data\effective_tld_names.dat ..\..\libsoup\tld_data.inc + + + <_PropertySheetDisplayName>soupgensrcsprops + + + + + $(CopyConfigH) + + + $(GenSoupVersionH) + + + $(GenTldDataInc) + + + diff --git a/win32/vs12/soup-gnome.vcxproj b/win32/vs12/soup-gnome.vcxproj new file mode 100644 index 00000000..50209282 --- /dev/null +++ b/win32/vs12/soup-gnome.vcxproj @@ -0,0 +1,164 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8C88A385-28C8-4B30-91A4-FBA381A5A46F} + soupgnome + Win32Proj + + + + DynamicLibrary + Unicode + v120 + true + + + DynamicLibrary + Unicode + v120 + + + DynamicLibrary + Unicode + v120 + true + + + DynamicLibrary + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Windows + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Windows + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Windows + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Windows + true + true + MachineX64 + + + + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs12/soup-gnome.vcxproj.filters b/win32/vs12/soup-gnome.vcxproj.filters new file mode 100644 index 00000000..924bf660 --- /dev/null +++ b/win32/vs12/soup-gnome.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Source Files + Source Files + Source Files + Source Files + + diff --git a/win32/vs12/soup-install.props b/win32/vs12/soup-install.props new file mode 100644 index 00000000..fb3240ef --- /dev/null +++ b/win32/vs12/soup-install.props @@ -0,0 +1,101 @@ + + + + + + + +mkdir $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup$(SoupDllSuffix).dll $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup$(SoupDllSuffix).pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup-gnome$(SoupDllSuffix).dll $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup-gnome$(SoupDllSuffix).pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\get.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\get.pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-httpd.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-httpd.pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-proxy.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-proxy.pdb $(CopyDir)\bin +mkdir $(CopyDir)\lib +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\soup-$(ApiVersion).lib $(CopyDir)\lib +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\soup-gnome-$(ApiVersion).lib $(CopyDir)\lib +copy ..\libsoup-$(ApiVersion).pc $(CopyDir)\lib\pkgconfig +copy ..\libsoup-gnome-$(ApiVersion).pc $(CopyDir)\lib\pkgconfig +mkdir $(CopyDir)\include\libsoup-$(ApiVersion)\libsoup +copy ..\..\libsoup\soup.h $(CopyDir)\include\libsoup-2.4\libsoup\soup.h +copy ..\..\libsoup\soup-address.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-address.h +copy ..\..\libsoup\soup-auth.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth.h +copy ..\..\libsoup\soup-auth-domain.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-domain.h +copy ..\..\libsoup\soup-auth-domain-basic.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-domain-basic.h +copy ..\..\libsoup\soup-auth-domain-digest.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-domain-digest.h +copy ..\..\libsoup\soup-auth-manager.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-manager.h +copy ..\..\libsoup\soup-autocleanups.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-autocleanups.h +copy ..\..\libsoup\soup-cache.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cache.h +copy ..\..\libsoup\soup-content-decoder.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-content-decoder.h +copy ..\..\libsoup\soup-content-sniffer.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-content-sniffer.h +copy ..\..\libsoup\soup-cookie.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie.h +copy ..\..\libsoup\soup-cookie-jar.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie-jar.h +copy ..\..\libsoup\soup-cookie-jar-db.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie-jar-db.h +copy ..\..\libsoup\soup-cookie-jar-text.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie-jar-text.h +copy ..\..\libsoup\soup-date.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-date.h +copy ..\..\libsoup\soup-form.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-form.h +copy ..\..\libsoup\soup-headers.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-headers.h +copy ..\..\libsoup\soup-logger.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-logger.h +copy ..\..\libsoup\soup-message.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-message.h +copy ..\..\libsoup\soup-message-body.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-message-body.h +copy ..\..\libsoup\soup-message-headers.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-message-headers.h +copy ..\..\libsoup\soup-method.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-method.h +copy ..\..\libsoup\soup-misc.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-misc.h +copy ..\..\libsoup\soup-multipart.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-multipart.h +copy ..\..\libsoup\soup-multipart-input-stream.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-multipart-input-stream.h +copy ..\..\libsoup\soup-password-manager.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-password-manager.h +copy ..\..\libsoup\soup-portability.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-portability.h +copy ..\..\libsoup\soup-proxy-resolver.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-proxy-resolver.h +copy ..\..\libsoup\soup-proxy-resolver-default.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-proxy-resolver-default.h +copy ..\..\libsoup\soup-proxy-uri-resolver.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-proxy-uri-resolver.h +copy ..\..\libsoup\soup-request.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request.h +copy ..\..\libsoup\soup-request-data.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request-data.h +copy ..\..\libsoup\soup-request-file.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request-file.h +copy ..\..\libsoup\soup-request-http.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request-http.h +copy ..\..\libsoup\soup-requester.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-requester.h +copy ..\..\libsoup\soup-server.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-server.h +copy ..\..\libsoup\soup-session.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session.h +copy ..\..\libsoup\soup-session-async.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session-async.h +copy ..\..\libsoup\soup-session-feature.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session-feature.h +copy ..\..\libsoup\soup-session-sync.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session-sync.h +copy ..\..\libsoup\soup-socket.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-socket.h +copy ..\..\libsoup\soup-status.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-status.h +copy ..\..\libsoup\soup-tld.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-tld.h +copy ..\..\libsoup\soup-types.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-types.h +copy ..\..\libsoup\soup-uri.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-uri.h +copy ..\..\libsoup\soup-value-utils.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-value-utils.h +copy ..\..\libsoup\soup-websocket.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-websocket.h +copy ..\..\libsoup\soup-websocket-connection.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-websocket-connection.h +copy ..\..\libsoup\soup-xmlrpc.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-xmlrpc.h +copy ..\..\libsoup\soup-xmlrpc-old.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-xmlrpc-old.h +copy ..\..\libsoup\soup-enum-types.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-enum-types.h +copy ..\..\libsoup\soup-version.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-version.h +mkdir $(CopyDir)\include\libsoup-gnome-$(ApiVersion)\libsoup +copy ..\..\libsoup\soup-cookie-jar-sqlite.h $(CopyDir)\include\libsoup-gnome-2.4\libsoup\soup-cookie-jar-sqlite.h +copy ..\..\libsoup\soup-gnome.h $(CopyDir)\include\libsoup-gnome-2.4\libsoup\soup-gnome.h +copy ..\..\libsoup\soup-gnome-features.h $(CopyDir)\include\libsoup-gnome-2.4\libsoup\soup-gnome-features.h + + ..\libsoup-$(ApiVersion).pc;..\libsoup-gnome-$(ApiVersion).pc + (if not exist $(CopyDir)\lib\pkgconfig mkdir $(CopyDir)\lib\pkgconfig) & ($(PythonPath)\python.exe ..\souppc.py --prefix=$(CopyDir) --version=$(SoupMajorVersion).$(SoupMinorVersion).$(SoupMicroVersion)) + + + <_PropertySheetDisplayName>soupinstallprops + + + + + $(SoupDoInstall) + + + $(SoupPCFiles) + + + $(SoupGenPC) + + + diff --git a/win32/vs12/soup-install.vcxproj b/win32/vs12/soup-install.vcxproj new file mode 100644 index 00000000..03a6acdf --- /dev/null +++ b/win32/vs12/soup-install.vcxproj @@ -0,0 +1,121 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {E0DCF460-914F-46F9-94D6-86D456CB53E9} + soupinstall + + + + Utility + MultiByte + v120 + true + + + Utility + MultiByte + v120 + + + Utility + MultiByte + v120 + true + + + Utility + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copying build results... + $(SoupPCFiles) + $(SoupDoInstall) + some_file;%(Outputs) + Copying build results... + $(SoupPCFiles) + $(SoupDoInstall) + some_file;%(Outputs) + + + Generating .pc files... + $(SoupGenPC) + $(SoupPCFiles);%(Outputs) + Generating .pc files... + $(SoupGenPC) + $(SoupPCFiles);%(Outputs) + + + + + {b24831c4-b8f2-41d6-aaf4-12192f71c623} + false + + + {80dc062e-2146-4ce8-a448-fd2205ab2ca4} + false + + + {3ad0cb92-ee38-425e-83cb-e7b1cb1d305e} + false + + + {8c88a385-28c8-4b30-91a4-fba381a5a46f} + false + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs12/soup-install.vcxproj.filters b/win32/vs12/soup-install.vcxproj.filters new file mode 100644 index 00000000..2627f42f --- /dev/null +++ b/win32/vs12/soup-install.vcxproj.filters @@ -0,0 +1,13 @@ + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + Resource Files + Resource Files + + diff --git a/win32/vs12/soup-version-paths.props b/win32/vs12/soup-version-paths.props new file mode 100644 index 00000000..dcb8c926 --- /dev/null +++ b/win32/vs12/soup-version-paths.props @@ -0,0 +1,69 @@ + + + + + + 12 + ..\..\..\vs$(VSVer)\$(Platform) + $(GlibEtcInstallRoot) + 2 + 62 + 2 + 2.4 + lib + -$(ApiVersion)-0 + + -$(ApiVersion)-vs$(VSVer) + $(SoupSeparateVSDllPrefix) + $(SoupSeparateVSDllSuffix) + c:\python34 + + + <_PropertySheetDisplayName>soupversionpathsprops + + + + + $(VSVer) + + + $(GlibEtcInstallRoot) + + + $(CopyDir) + + + $(SoupMajorVersion) + + + $(SoupMinorVersion) + + + $(SoupMicroVersion) + + + $(ApiVersion) + + + $(SoupLibtoolCompatibleDllPrefix) + + + $(SoupLibtoolCompatibleDllSuffix) + + + $(SoupSeparateVSDllPrefix) + + + $(SoupSeparateVSDllSuffix) + + + $(SoupDllPrefix) + + + $(SoupDllSuffix) + + + $(PythonPath) + + + diff --git a/win32/vs12/soup.vcxproj b/win32/vs12/soup.vcxproj new file mode 100644 index 00000000..e49c4375 --- /dev/null +++ b/win32/vs12/soup.vcxproj @@ -0,0 +1,414 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Debug_MIT_GSSAPI + Win32 + + + Debug_MIT_GSSAPI + x64 + + + Release_MIT_GSSAPI + Win32 + + + Release_MIT_GSSAPI + x64 + + + + {D83A3162-B14C-459C-AF81-15BBFA90240D} + soup + Win32Proj + + + + DynamicLibrary + Unicode + v120 + + + DynamicLibrary + Unicode + v120 + + + DynamicLibrary + Unicode + v120 + true + + + DynamicLibrary + Unicode + v120 + true + + + DynamicLibrary + Unicode + v120 + + + DynamicLibrary + Unicode + v120 + + + DynamicLibrary + Unicode + v120 + true + + + DynamicLibrary + Unicode + v120 + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + trueDebug\$(Platform)\bin\ + falseRelease\$(Platform)\bin\ + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + MachineX86 + + + + + Disabled + _DEBUG;$(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX86);%(AdditionalDependencies) + true + Windows + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + true + true + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX86);%(AdditionalDependencies) + true + Windows + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + MachineX64 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX64);%(AdditionalDependencies) + true + Windows + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + true + true + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX64);%(AdditionalDependencies) + true + Windows + true + true + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + + + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + + + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + + + + + + diff --git a/win32/vs12/soup.vcxproj.filters b/win32/vs12/soup.vcxproj.filters new file mode 100644 index 00000000..71eb5a6c --- /dev/null +++ b/win32/vs12/soup.vcxproj.filters @@ -0,0 +1,95 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + + + Resource Files + Resource Files + Resource Files + + diff --git a/win32/vs14/Makefile.am b/win32/vs14/Makefile.am new file mode 100644 index 00000000..43db09d3 --- /dev/null +++ b/win32/vs14/Makefile.am @@ -0,0 +1,28 @@ +EXTRA_DIST = \ + libsoup.sln \ + get.vcxproj \ + simple-httpd.vcxproj \ + simple-proxy.vcxproj \ + get.vcxproj.filters \ + soup-install.vcxproj \ + soup-install.vcxproj.filters \ + simple-httpd.vcxproj.filters \ + simple-proxy.vcxproj.filters \ + soup-build-defines.props \ + soup-dll-build-defines.props \ + soup-gen-srcs.props \ + soup-version-paths.props \ + soup.vcxproj \ + soup-gnome.vcxproj \ + soup.vcxproj.filters \ + soup-gnome.vcxproj.filters \ + soup-install.props + +DISTCLEANFILES = $(EXTRA_DIST) + +MSVC_BASE_VER = 10 +MSVC_BASE_VER_LONG = 2010 +MSVC_VER = 14 +MSVC_VER_LONG = 14 + +include $(top_srcdir)/win32/Makefile-newvs.am diff --git a/win32/vs14/Makefile.in b/win32/vs14/Makefile.in new file mode 100644 index 00000000..5ed552bc --- /dev/null +++ b/win32/vs14/Makefile.in @@ -0,0 +1,600 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Centralized autotools file +# Create the Visual Studio 2012/2013/2015 project files +# from the Visual Studio 2010 project files + +# This autotools file, from GLib, can be used in other projects +# that have Visual Studio build support. + +# Author: Fan, Chun-wei +# November 05, 2012 + +# MSVC_BASE_VER: Baseline MSVC 201x version to copy/process project files from (100 for 2010, 120 for 2013) +# MSVC_BASE_VER_LONG: Long Version of baseline Visual Studio 201x version (2010, 2012, 2013, 14, 15) +# MSVC_BASE_TOOLSET: Use if baseline MSVC toolset is not in the form v$(MSVC_BASE_VER)0, meaning v$(MSVC_BASE_TOOLSET) +# MSVC_VER_LONG: Long Version of target Visual Studio (2012, 2013, 14 and so on) +# MSVC_VER: Short Version of target Visual Studio (110 for 2012, 120 for 2013, 140 for 2015, 141 for 2017) +# MSVC_TOOLSET: Use if target MSVC toolsett is not in the form v $(MSVC_VER)0, meaning v$(MSVC_TOOLSET) +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = win32/vs14 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/glibtests.m4 $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/vapigen.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/win32/Makefile-newvs.am +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APACHE_HTTPD = @APACHE_HTTPD@ +APACHE_MODULE_DIR = @APACHE_MODULE_DIR@ +APACHE_PHP_MODULE_DIR = @APACHE_PHP_MODULE_DIR@ +APACHE_SSL_MODULE_DIR = @APACHE_SSL_MODULE_DIR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL = @CURL@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MAKEFILE = @GLIB_MAKEFILE@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GMSGFMT = @GMSGFMT@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_GNOME = @HAVE_GNOME@ +HTML_DIR = @HTML_DIR@ +IF_HAVE_MOD_UNIXD = @IF_HAVE_MOD_UNIXD@ +IF_HAVE_PHP = @IF_HAVE_PHP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ +INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ +INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ +INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ +INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ +INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ +INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +KRB5_CFLAGS = @KRB5_CFLAGS@ +KRB5_CONFIG = @KRB5_CONFIG@ +KRB5_LIBS = @KRB5_LIBS@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PHP = @PHP@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOUP_AGE = @SOUP_AGE@ +SOUP_API_VERSION = @SOUP_API_VERSION@ +SOUP_CURRENT = @SOUP_CURRENT@ +SOUP_DEBUG_FLAGS = @SOUP_DEBUG_FLAGS@ +SOUP_HIDDEN_VISIBILITY_CFLAGS = @SOUP_HIDDEN_VISIBILITY_CFLAGS@ +SOUP_MAJOR_VERSION = @SOUP_MAJOR_VERSION@ +SOUP_MICRO_VERSION = @SOUP_MICRO_VERSION@ +SOUP_MINOR_VERSION = @SOUP_MINOR_VERSION@ +SOUP_REVISION = @SOUP_REVISION@ +SQLITE_CFLAGS = @SQLITE_CFLAGS@ +SQLITE_LIBS = @SQLITE_LIBS@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VALAC = @VALAC@ +VAPIDIR = @VAPIDIR@ +VAPIGEN = @VAPIGEN@ +VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ +VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XML_CFLAGS = @XML_CFLAGS@ +XML_LIBS = @XML_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +installed_test_metadir = @installed_test_metadir@ +installed_testdir = @installed_testdir@ +intltool__v_merge_options_ = @intltool__v_merge_options_@ +intltool__v_merge_options_0 = @intltool__v_merge_options_0@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +ntlm_auth = @ntlm_auth@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = \ + libsoup.sln \ + get.vcxproj \ + simple-httpd.vcxproj \ + simple-proxy.vcxproj \ + get.vcxproj.filters \ + soup-install.vcxproj \ + soup-install.vcxproj.filters \ + simple-httpd.vcxproj.filters \ + simple-proxy.vcxproj.filters \ + soup-build-defines.props \ + soup-dll-build-defines.props \ + soup-gen-srcs.props \ + soup-version-paths.props \ + soup.vcxproj \ + soup-gnome.vcxproj \ + soup.vcxproj.filters \ + soup-gnome.vcxproj.filters \ + soup-install.props + +DISTCLEANFILES = $(EXTRA_DIST) +MSVC_BASE_VER = 10 +MSVC_BASE_VER_LONG = 2010 +MSVC_VER = 14 +MSVC_VER_LONG = 14 +@MSVC_BASE_NO_TOOLSET_SET_TRUE@MSVC_BASE_TOOLSET = $(MSVC_BASE_VER)0 +@MSVC_NO_TOOLSET_SET_TRUE@MSVC_TOOLSET = $(MSVC_VER)0 +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/win32/Makefile-newvs.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign win32/vs14/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign win32/vs14/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(top_srcdir)/win32/Makefile-newvs.am $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +%.sln: + sed 's/11\.00/12\.00/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + sed 's/$(MSVC_BASE_VER_LONG)/$(MSVC_VER_LONG)/g' < $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/win32/vs$(MSVC_VER)/$@ + rm $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + +%.txt: + sed 's/vs$(MSVC_BASE_VER)/vs$(MSVC_VER)/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + sed 's/VS$(MSVC_BASE_VER)/VS$(MSVC_VER)/g' < $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/win32/vs$(MSVC_VER)/$@ + rm $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + +%.vcxproj: + if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \ + sed 's/v$(MSVC_BASE_TOOLSET)/v$(MSVC_TOOLSET)/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + else \ + sed 's/v$(MSVC_BASE_TOOLSET)/v$(MSVC_TOOLSET)/g' < $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + fi + +%.props: $(top_builddir)/win32/vs$(MSVC_BASE_VER)/Makefile + if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \ + sed 's/$(MSVC_BASE_VER)<\/VSVer>/$(MSVC_VER)<\/VSVer>/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + else \ + sed 's/$(MSVC_BASE_VER)<\/VSVer>/$(MSVC_VER)<\/VSVer>/g' < $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + fi + +%.vcxproj.filters: + if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \ + cp $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + else \ + cp $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + fi + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/win32/vs14/get.vcxproj b/win32/vs14/get.vcxproj new file mode 100644 index 00000000..3b6bfb79 --- /dev/null +++ b/win32/vs14/get.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B24831C4-B8F2-41D6-AAF4-12192F71C623} + get + Win32Proj + + + + Application + Unicode + v140 + true + + + Application + Unicode + v140 + + + Application + Unicode + v140 + true + + + Application + Unicode + v140 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Console + MachineX86 + + + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + MachineX64 + + + + + X64 + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX64 + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs14/get.vcxproj.filters b/win32/vs14/get.vcxproj.filters new file mode 100644 index 00000000..9bc6fcf8 --- /dev/null +++ b/win32/vs14/get.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Sources + + diff --git a/win32/vs14/libsoup.sln b/win32/vs14/libsoup.sln new file mode 100644 index 00000000..ca11fce7 --- /dev/null +++ b/win32/vs14/libsoup.sln @@ -0,0 +1,128 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup", "soup.vcxproj", "{D83A3162-B14C-459C-AF81-15BBFA90240D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup-gnome", "soup-gnome.vcxproj", "{8C88A385-28C8-4B30-91A4-FBA381A5A46F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "get", "get.vcxproj", "{B24831C4-B8F2-41D6-AAF4-12192F71C623}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple-httpd", "simple-httpd.vcxproj", "{80DC062E-2146-4CE8-A448-FD2205AB2CA4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple-proxy", "simple-proxy.vcxproj", "{3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup-install", "soup-install.vcxproj", "{E0DCF460-914F-46F9-94D6-86D456CB53E9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + Debug_MIT_GSSAPI|Win32 = Debug_MIT_GSSAPI|Win32 + Debug_MIT_GSSAPI|x64 = Debug_MIT_GSSAPI|x64 + Release_MIT_GSSAPI|Win32 = Release_MIT_GSSAPI|Win32 + Release_MIT_GSSAPI|x64 = Release_MIT_GSSAPI|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|Win32.ActiveCfg = Debug|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|Win32.Build.0 = Debug|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|x64.ActiveCfg = Debug|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|x64.Build.0 = Debug|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|Win32.ActiveCfg = Release|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|Win32.Build.0 = Release|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|x64.ActiveCfg = Release|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|x64.Build.0 = Release|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|x64.Build.0 = Debug_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|Win32.Build.0 = Release_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|x64.ActiveCfg = Release_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|x64.Build.0 = Release_MIT_GSSAPI|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|Win32.ActiveCfg = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|Win32.Build.0 = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|x64.ActiveCfg = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|x64.Build.0 = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|Win32.ActiveCfg = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|Win32.Build.0 = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|x64.ActiveCfg = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|x64.Build.0 = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|Win32.ActiveCfg = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|Win32.Build.0 = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|x64.ActiveCfg = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|x64.Build.0 = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|Win32.ActiveCfg = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|Win32.Build.0 = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|x64.ActiveCfg = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|x64.Build.0 = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|Win32.ActiveCfg = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|Win32.Build.0 = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|x64.ActiveCfg = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|x64.Build.0 = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|Win32.ActiveCfg = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|Win32.Build.0 = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|x64.ActiveCfg = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|x64.Build.0 = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|Win32.Build.0 = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|x64.ActiveCfg = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|x64.Build.0 = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|Win32.ActiveCfg = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|Win32.Build.0 = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|x64.ActiveCfg = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|x64.Build.0 = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|Win32.ActiveCfg = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|Win32.Build.0 = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|x64.ActiveCfg = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|x64.Build.0 = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|Win32.ActiveCfg = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|Win32.Build.0 = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|x64.ActiveCfg = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|x64.Build.0 = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/win32/vs14/simple-httpd.vcxproj b/win32/vs14/simple-httpd.vcxproj new file mode 100644 index 00000000..13740e1e --- /dev/null +++ b/win32/vs14/simple-httpd.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {80DC062E-2146-4CE8-A448-FD2205AB2CA4} + simplehttpd + Win32Proj + + + + Application + Unicode + v140 + true + + + Application + Unicode + v140 + + + Application + Unicode + v140 + true + + + Application + Unicode + v140 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Console + MachineX86 + + + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + MachineX64 + + + + + X64 + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX64 + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs14/simple-httpd.vcxproj.filters b/win32/vs14/simple-httpd.vcxproj.filters new file mode 100644 index 00000000..14cf1d4d --- /dev/null +++ b/win32/vs14/simple-httpd.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Sources + + diff --git a/win32/vs14/simple-proxy.vcxproj b/win32/vs14/simple-proxy.vcxproj new file mode 100644 index 00000000..fa5cbfac --- /dev/null +++ b/win32/vs14/simple-proxy.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E} + simpleproxy + Win32Proj + + + + Application + Unicode + v140 + true + + + Application + Unicode + v140 + + + Application + Unicode + v140 + true + + + Application + Unicode + v140 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Console + MachineX86 + + + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + MachineX64 + + + + + X64 + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX64 + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs14/simple-proxy.vcxproj.filters b/win32/vs14/simple-proxy.vcxproj.filters new file mode 100644 index 00000000..4a7f2f26 --- /dev/null +++ b/win32/vs14/simple-proxy.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Sources + + diff --git a/win32/vs14/soup-build-defines.props b/win32/vs14/soup-build-defines.props new file mode 100644 index 00000000..0c9b527a --- /dev/null +++ b/win32/vs14/soup-build-defines.props @@ -0,0 +1,29 @@ + + + + + + + + <_PropertySheetDisplayName>soupbuilddefinesprops + $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ + $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ + + + + ..\..;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\libxml2;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) + HAVE_CONFIG_H;%(PreprocessorDefinitions) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + true + /d2Zi+ %(AdditionalOptions) + + + gio-2.0.lib;gobject-2.0.lib;glib-2.0.lib;%(AdditionalDependencies) + $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) + /HIGHENTROPYVA %(AdditionalOptions) + /HIGHENTROPYVA %(AdditionalOptions) + /HIGHENTROPYVA %(AdditionalOptions) + /HIGHENTROPYVA %(AdditionalOptions) + + + diff --git a/win32/vs14/soup-dll-build-defines.props b/win32/vs14/soup-dll-build-defines.props new file mode 100644 index 00000000..40591fff --- /dev/null +++ b/win32/vs14/soup-dll-build-defines.props @@ -0,0 +1,24 @@ + + + + + + + LIBSOUP_COMPILATION;DLL_EXPORT;G_LOG_DOMAIN="libsoup" + LIBSOUP_HAVE_GSSAPI + libxml2.lib;sqlite3.lib;intl.lib;ws2_32.lib + gssapi + 32.lib + 64.lib + + + <_PropertySheetDisplayName>soupdllbuilddefinesprops + + + + $(OutDir)$(SoupDllPrefix)$(ProjectName)$(SoupDllSuffix).dll + $(OutDir)$(SoupDllPrefix)$(ProjectName)$(SoupDllSuffix).pdb + $(OutDir)$(ProjectName)-$(ApiVersion).lib + + + diff --git a/win32/vs14/soup-gen-srcs.props b/win32/vs14/soup-gen-srcs.props new file mode 100644 index 00000000..760825c8 --- /dev/null +++ b/win32/vs14/soup-gen-srcs.props @@ -0,0 +1,26 @@ + + + + + + + copy ..\..\config.h.win32 ..\..\config.h + $(PythonPath)\python.exe ..\soup_version_h.py --version=$(SoupMajorVersion).$(SoupMinorVersion).$(SoupMicroVersion) + $(PythonPath)\python.exe ..\..\libsoup\tld-parser.py ..\..\data\effective_tld_names.dat ..\..\libsoup\tld_data.inc + + + <_PropertySheetDisplayName>soupgensrcsprops + + + + + $(CopyConfigH) + + + $(GenSoupVersionH) + + + $(GenTldDataInc) + + + diff --git a/win32/vs14/soup-gnome.vcxproj b/win32/vs14/soup-gnome.vcxproj new file mode 100644 index 00000000..d220c10c --- /dev/null +++ b/win32/vs14/soup-gnome.vcxproj @@ -0,0 +1,164 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8C88A385-28C8-4B30-91A4-FBA381A5A46F} + soupgnome + Win32Proj + + + + DynamicLibrary + Unicode + v140 + true + + + DynamicLibrary + Unicode + v140 + + + DynamicLibrary + Unicode + v140 + true + + + DynamicLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Windows + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Windows + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Windows + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Windows + true + true + MachineX64 + + + + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs14/soup-gnome.vcxproj.filters b/win32/vs14/soup-gnome.vcxproj.filters new file mode 100644 index 00000000..924bf660 --- /dev/null +++ b/win32/vs14/soup-gnome.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Source Files + Source Files + Source Files + Source Files + + diff --git a/win32/vs14/soup-install.props b/win32/vs14/soup-install.props new file mode 100644 index 00000000..fb3240ef --- /dev/null +++ b/win32/vs14/soup-install.props @@ -0,0 +1,101 @@ + + + + + + + +mkdir $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup$(SoupDllSuffix).dll $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup$(SoupDllSuffix).pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup-gnome$(SoupDllSuffix).dll $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup-gnome$(SoupDllSuffix).pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\get.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\get.pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-httpd.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-httpd.pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-proxy.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-proxy.pdb $(CopyDir)\bin +mkdir $(CopyDir)\lib +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\soup-$(ApiVersion).lib $(CopyDir)\lib +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\soup-gnome-$(ApiVersion).lib $(CopyDir)\lib +copy ..\libsoup-$(ApiVersion).pc $(CopyDir)\lib\pkgconfig +copy ..\libsoup-gnome-$(ApiVersion).pc $(CopyDir)\lib\pkgconfig +mkdir $(CopyDir)\include\libsoup-$(ApiVersion)\libsoup +copy ..\..\libsoup\soup.h $(CopyDir)\include\libsoup-2.4\libsoup\soup.h +copy ..\..\libsoup\soup-address.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-address.h +copy ..\..\libsoup\soup-auth.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth.h +copy ..\..\libsoup\soup-auth-domain.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-domain.h +copy ..\..\libsoup\soup-auth-domain-basic.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-domain-basic.h +copy ..\..\libsoup\soup-auth-domain-digest.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-domain-digest.h +copy ..\..\libsoup\soup-auth-manager.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-manager.h +copy ..\..\libsoup\soup-autocleanups.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-autocleanups.h +copy ..\..\libsoup\soup-cache.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cache.h +copy ..\..\libsoup\soup-content-decoder.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-content-decoder.h +copy ..\..\libsoup\soup-content-sniffer.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-content-sniffer.h +copy ..\..\libsoup\soup-cookie.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie.h +copy ..\..\libsoup\soup-cookie-jar.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie-jar.h +copy ..\..\libsoup\soup-cookie-jar-db.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie-jar-db.h +copy ..\..\libsoup\soup-cookie-jar-text.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie-jar-text.h +copy ..\..\libsoup\soup-date.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-date.h +copy ..\..\libsoup\soup-form.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-form.h +copy ..\..\libsoup\soup-headers.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-headers.h +copy ..\..\libsoup\soup-logger.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-logger.h +copy ..\..\libsoup\soup-message.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-message.h +copy ..\..\libsoup\soup-message-body.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-message-body.h +copy ..\..\libsoup\soup-message-headers.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-message-headers.h +copy ..\..\libsoup\soup-method.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-method.h +copy ..\..\libsoup\soup-misc.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-misc.h +copy ..\..\libsoup\soup-multipart.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-multipart.h +copy ..\..\libsoup\soup-multipart-input-stream.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-multipart-input-stream.h +copy ..\..\libsoup\soup-password-manager.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-password-manager.h +copy ..\..\libsoup\soup-portability.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-portability.h +copy ..\..\libsoup\soup-proxy-resolver.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-proxy-resolver.h +copy ..\..\libsoup\soup-proxy-resolver-default.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-proxy-resolver-default.h +copy ..\..\libsoup\soup-proxy-uri-resolver.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-proxy-uri-resolver.h +copy ..\..\libsoup\soup-request.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request.h +copy ..\..\libsoup\soup-request-data.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request-data.h +copy ..\..\libsoup\soup-request-file.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request-file.h +copy ..\..\libsoup\soup-request-http.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request-http.h +copy ..\..\libsoup\soup-requester.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-requester.h +copy ..\..\libsoup\soup-server.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-server.h +copy ..\..\libsoup\soup-session.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session.h +copy ..\..\libsoup\soup-session-async.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session-async.h +copy ..\..\libsoup\soup-session-feature.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session-feature.h +copy ..\..\libsoup\soup-session-sync.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session-sync.h +copy ..\..\libsoup\soup-socket.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-socket.h +copy ..\..\libsoup\soup-status.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-status.h +copy ..\..\libsoup\soup-tld.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-tld.h +copy ..\..\libsoup\soup-types.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-types.h +copy ..\..\libsoup\soup-uri.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-uri.h +copy ..\..\libsoup\soup-value-utils.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-value-utils.h +copy ..\..\libsoup\soup-websocket.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-websocket.h +copy ..\..\libsoup\soup-websocket-connection.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-websocket-connection.h +copy ..\..\libsoup\soup-xmlrpc.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-xmlrpc.h +copy ..\..\libsoup\soup-xmlrpc-old.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-xmlrpc-old.h +copy ..\..\libsoup\soup-enum-types.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-enum-types.h +copy ..\..\libsoup\soup-version.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-version.h +mkdir $(CopyDir)\include\libsoup-gnome-$(ApiVersion)\libsoup +copy ..\..\libsoup\soup-cookie-jar-sqlite.h $(CopyDir)\include\libsoup-gnome-2.4\libsoup\soup-cookie-jar-sqlite.h +copy ..\..\libsoup\soup-gnome.h $(CopyDir)\include\libsoup-gnome-2.4\libsoup\soup-gnome.h +copy ..\..\libsoup\soup-gnome-features.h $(CopyDir)\include\libsoup-gnome-2.4\libsoup\soup-gnome-features.h + + ..\libsoup-$(ApiVersion).pc;..\libsoup-gnome-$(ApiVersion).pc + (if not exist $(CopyDir)\lib\pkgconfig mkdir $(CopyDir)\lib\pkgconfig) & ($(PythonPath)\python.exe ..\souppc.py --prefix=$(CopyDir) --version=$(SoupMajorVersion).$(SoupMinorVersion).$(SoupMicroVersion)) + + + <_PropertySheetDisplayName>soupinstallprops + + + + + $(SoupDoInstall) + + + $(SoupPCFiles) + + + $(SoupGenPC) + + + diff --git a/win32/vs14/soup-install.vcxproj b/win32/vs14/soup-install.vcxproj new file mode 100644 index 00000000..7064d08d --- /dev/null +++ b/win32/vs14/soup-install.vcxproj @@ -0,0 +1,121 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {E0DCF460-914F-46F9-94D6-86D456CB53E9} + soupinstall + + + + Utility + MultiByte + v140 + true + + + Utility + MultiByte + v140 + + + Utility + MultiByte + v140 + true + + + Utility + MultiByte + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copying build results... + $(SoupPCFiles) + $(SoupDoInstall) + some_file;%(Outputs) + Copying build results... + $(SoupPCFiles) + $(SoupDoInstall) + some_file;%(Outputs) + + + Generating .pc files... + $(SoupGenPC) + $(SoupPCFiles);%(Outputs) + Generating .pc files... + $(SoupGenPC) + $(SoupPCFiles);%(Outputs) + + + + + {b24831c4-b8f2-41d6-aaf4-12192f71c623} + false + + + {80dc062e-2146-4ce8-a448-fd2205ab2ca4} + false + + + {3ad0cb92-ee38-425e-83cb-e7b1cb1d305e} + false + + + {8c88a385-28c8-4b30-91a4-fba381a5a46f} + false + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs14/soup-install.vcxproj.filters b/win32/vs14/soup-install.vcxproj.filters new file mode 100644 index 00000000..2627f42f --- /dev/null +++ b/win32/vs14/soup-install.vcxproj.filters @@ -0,0 +1,13 @@ + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + Resource Files + Resource Files + + diff --git a/win32/vs14/soup-version-paths.props b/win32/vs14/soup-version-paths.props new file mode 100644 index 00000000..379b289b --- /dev/null +++ b/win32/vs14/soup-version-paths.props @@ -0,0 +1,69 @@ + + + + + + 14 + ..\..\..\vs$(VSVer)\$(Platform) + $(GlibEtcInstallRoot) + 2 + 62 + 2 + 2.4 + lib + -$(ApiVersion)-0 + + -$(ApiVersion)-vs$(VSVer) + $(SoupSeparateVSDllPrefix) + $(SoupSeparateVSDllSuffix) + c:\python34 + + + <_PropertySheetDisplayName>soupversionpathsprops + + + + + $(VSVer) + + + $(GlibEtcInstallRoot) + + + $(CopyDir) + + + $(SoupMajorVersion) + + + $(SoupMinorVersion) + + + $(SoupMicroVersion) + + + $(ApiVersion) + + + $(SoupLibtoolCompatibleDllPrefix) + + + $(SoupLibtoolCompatibleDllSuffix) + + + $(SoupSeparateVSDllPrefix) + + + $(SoupSeparateVSDllSuffix) + + + $(SoupDllPrefix) + + + $(SoupDllSuffix) + + + $(PythonPath) + + + diff --git a/win32/vs14/soup.vcxproj b/win32/vs14/soup.vcxproj new file mode 100644 index 00000000..5611b13e --- /dev/null +++ b/win32/vs14/soup.vcxproj @@ -0,0 +1,414 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Debug_MIT_GSSAPI + Win32 + + + Debug_MIT_GSSAPI + x64 + + + Release_MIT_GSSAPI + Win32 + + + Release_MIT_GSSAPI + x64 + + + + {D83A3162-B14C-459C-AF81-15BBFA90240D} + soup + Win32Proj + + + + DynamicLibrary + Unicode + v140 + + + DynamicLibrary + Unicode + v140 + + + DynamicLibrary + Unicode + v140 + true + + + DynamicLibrary + Unicode + v140 + true + + + DynamicLibrary + Unicode + v140 + + + DynamicLibrary + Unicode + v140 + + + DynamicLibrary + Unicode + v140 + true + + + DynamicLibrary + Unicode + v140 + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + trueDebug\$(Platform)\bin\ + falseRelease\$(Platform)\bin\ + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + MachineX86 + + + + + Disabled + _DEBUG;$(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX86);%(AdditionalDependencies) + true + Windows + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + true + true + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX86);%(AdditionalDependencies) + true + Windows + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + MachineX64 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX64);%(AdditionalDependencies) + true + Windows + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + true + true + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX64);%(AdditionalDependencies) + true + Windows + true + true + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + + + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + + + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + + + + + + diff --git a/win32/vs14/soup.vcxproj.filters b/win32/vs14/soup.vcxproj.filters new file mode 100644 index 00000000..71eb5a6c --- /dev/null +++ b/win32/vs14/soup.vcxproj.filters @@ -0,0 +1,95 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + + + Resource Files + Resource Files + Resource Files + + diff --git a/win32/vs15/Makefile.am b/win32/vs15/Makefile.am new file mode 100644 index 00000000..efb3c884 --- /dev/null +++ b/win32/vs15/Makefile.am @@ -0,0 +1,29 @@ +EXTRA_DIST = \ + libsoup.sln \ + get.vcxproj \ + simple-httpd.vcxproj \ + simple-proxy.vcxproj \ + get.vcxproj.filters \ + soup-install.vcxproj \ + soup-install.vcxproj.filters \ + simple-httpd.vcxproj.filters \ + simple-proxy.vcxproj.filters \ + soup-build-defines.props \ + soup-dll-build-defines.props \ + soup-gen-srcs.props \ + soup-version-paths.props \ + soup.vcxproj \ + soup-gnome.vcxproj \ + soup.vcxproj.filters \ + soup-gnome.vcxproj.filters \ + soup-install.props + +DISTCLEANFILES = $(EXTRA_DIST) + +MSVC_BASE_VER = 10 +MSVC_BASE_VER_LONG = 2010 +MSVC_VER = 15 +MSVC_VER_LONG = 15 +MSVC_TOOLSET = 141 + +include $(top_srcdir)/win32/Makefile-newvs.am diff --git a/win32/vs15/Makefile.in b/win32/vs15/Makefile.in new file mode 100644 index 00000000..87c5789b --- /dev/null +++ b/win32/vs15/Makefile.in @@ -0,0 +1,601 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Centralized autotools file +# Create the Visual Studio 2012/2013/2015 project files +# from the Visual Studio 2010 project files + +# This autotools file, from GLib, can be used in other projects +# that have Visual Studio build support. + +# Author: Fan, Chun-wei +# November 05, 2012 + +# MSVC_BASE_VER: Baseline MSVC 201x version to copy/process project files from (100 for 2010, 120 for 2013) +# MSVC_BASE_VER_LONG: Long Version of baseline Visual Studio 201x version (2010, 2012, 2013, 14, 15) +# MSVC_BASE_TOOLSET: Use if baseline MSVC toolset is not in the form v$(MSVC_BASE_VER)0, meaning v$(MSVC_BASE_TOOLSET) +# MSVC_VER_LONG: Long Version of target Visual Studio (2012, 2013, 14 and so on) +# MSVC_VER: Short Version of target Visual Studio (110 for 2012, 120 for 2013, 140 for 2015, 141 for 2017) +# MSVC_TOOLSET: Use if target MSVC toolsett is not in the form v $(MSVC_VER)0, meaning v$(MSVC_TOOLSET) +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = win32/vs15 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/glibtests.m4 $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/vapigen.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/win32/Makefile-newvs.am +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APACHE_HTTPD = @APACHE_HTTPD@ +APACHE_MODULE_DIR = @APACHE_MODULE_DIR@ +APACHE_PHP_MODULE_DIR = @APACHE_PHP_MODULE_DIR@ +APACHE_SSL_MODULE_DIR = @APACHE_SSL_MODULE_DIR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL = @CURL@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MAKEFILE = @GLIB_MAKEFILE@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GMSGFMT = @GMSGFMT@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_GNOME = @HAVE_GNOME@ +HTML_DIR = @HTML_DIR@ +IF_HAVE_MOD_UNIXD = @IF_HAVE_MOD_UNIXD@ +IF_HAVE_PHP = @IF_HAVE_PHP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ +INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ +INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ +INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ +INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ +INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ +INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +KRB5_CFLAGS = @KRB5_CFLAGS@ +KRB5_CONFIG = @KRB5_CONFIG@ +KRB5_LIBS = @KRB5_LIBS@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PHP = @PHP@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOUP_AGE = @SOUP_AGE@ +SOUP_API_VERSION = @SOUP_API_VERSION@ +SOUP_CURRENT = @SOUP_CURRENT@ +SOUP_DEBUG_FLAGS = @SOUP_DEBUG_FLAGS@ +SOUP_HIDDEN_VISIBILITY_CFLAGS = @SOUP_HIDDEN_VISIBILITY_CFLAGS@ +SOUP_MAJOR_VERSION = @SOUP_MAJOR_VERSION@ +SOUP_MICRO_VERSION = @SOUP_MICRO_VERSION@ +SOUP_MINOR_VERSION = @SOUP_MINOR_VERSION@ +SOUP_REVISION = @SOUP_REVISION@ +SQLITE_CFLAGS = @SQLITE_CFLAGS@ +SQLITE_LIBS = @SQLITE_LIBS@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VALAC = @VALAC@ +VAPIDIR = @VAPIDIR@ +VAPIGEN = @VAPIGEN@ +VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ +VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XML_CFLAGS = @XML_CFLAGS@ +XML_LIBS = @XML_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +installed_test_metadir = @installed_test_metadir@ +installed_testdir = @installed_testdir@ +intltool__v_merge_options_ = @intltool__v_merge_options_@ +intltool__v_merge_options_0 = @intltool__v_merge_options_0@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +ntlm_auth = @ntlm_auth@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = \ + libsoup.sln \ + get.vcxproj \ + simple-httpd.vcxproj \ + simple-proxy.vcxproj \ + get.vcxproj.filters \ + soup-install.vcxproj \ + soup-install.vcxproj.filters \ + simple-httpd.vcxproj.filters \ + simple-proxy.vcxproj.filters \ + soup-build-defines.props \ + soup-dll-build-defines.props \ + soup-gen-srcs.props \ + soup-version-paths.props \ + soup.vcxproj \ + soup-gnome.vcxproj \ + soup.vcxproj.filters \ + soup-gnome.vcxproj.filters \ + soup-install.props + +DISTCLEANFILES = $(EXTRA_DIST) +MSVC_BASE_VER = 10 +MSVC_BASE_VER_LONG = 2010 +MSVC_VER = 15 +MSVC_VER_LONG = 15 +@MSVC_NO_TOOLSET_SET_TRUE@MSVC_TOOLSET = $(MSVC_VER)0 +MSVC_TOOLSET = 141 +@MSVC_BASE_NO_TOOLSET_SET_TRUE@MSVC_BASE_TOOLSET = $(MSVC_BASE_VER)0 +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/win32/Makefile-newvs.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign win32/vs15/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign win32/vs15/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(top_srcdir)/win32/Makefile-newvs.am $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +%.sln: + sed 's/11\.00/12\.00/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + sed 's/$(MSVC_BASE_VER_LONG)/$(MSVC_VER_LONG)/g' < $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/win32/vs$(MSVC_VER)/$@ + rm $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + +%.txt: + sed 's/vs$(MSVC_BASE_VER)/vs$(MSVC_VER)/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + sed 's/VS$(MSVC_BASE_VER)/VS$(MSVC_VER)/g' < $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/win32/vs$(MSVC_VER)/$@ + rm $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp + +%.vcxproj: + if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \ + sed 's/v$(MSVC_BASE_TOOLSET)/v$(MSVC_TOOLSET)/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + else \ + sed 's/v$(MSVC_BASE_TOOLSET)/v$(MSVC_TOOLSET)/g' < $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + fi + +%.props: $(top_builddir)/win32/vs$(MSVC_BASE_VER)/Makefile + if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \ + sed 's/$(MSVC_BASE_VER)<\/VSVer>/$(MSVC_VER)<\/VSVer>/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + else \ + sed 's/$(MSVC_BASE_VER)<\/VSVer>/$(MSVC_VER)<\/VSVer>/g' < $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + fi + +%.vcxproj.filters: + if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \ + cp $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + else \ + cp $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ $(top_builddir)/win32/vs$(MSVC_VER)/$@; \ + fi + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/win32/vs15/get.vcxproj b/win32/vs15/get.vcxproj new file mode 100644 index 00000000..78cd3156 --- /dev/null +++ b/win32/vs15/get.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B24831C4-B8F2-41D6-AAF4-12192F71C623} + get + Win32Proj + + + + Application + Unicode + v141 + true + + + Application + Unicode + v141 + + + Application + Unicode + v141 + true + + + Application + Unicode + v141 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Console + MachineX86 + + + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + MachineX64 + + + + + X64 + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX64 + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs15/get.vcxproj.filters b/win32/vs15/get.vcxproj.filters new file mode 100644 index 00000000..9bc6fcf8 --- /dev/null +++ b/win32/vs15/get.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Sources + + diff --git a/win32/vs15/libsoup.sln b/win32/vs15/libsoup.sln new file mode 100644 index 00000000..ec1df455 --- /dev/null +++ b/win32/vs15/libsoup.sln @@ -0,0 +1,128 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup", "soup.vcxproj", "{D83A3162-B14C-459C-AF81-15BBFA90240D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup-gnome", "soup-gnome.vcxproj", "{8C88A385-28C8-4B30-91A4-FBA381A5A46F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "get", "get.vcxproj", "{B24831C4-B8F2-41D6-AAF4-12192F71C623}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple-httpd", "simple-httpd.vcxproj", "{80DC062E-2146-4CE8-A448-FD2205AB2CA4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple-proxy", "simple-proxy.vcxproj", "{3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup-install", "soup-install.vcxproj", "{E0DCF460-914F-46F9-94D6-86D456CB53E9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + Debug_MIT_GSSAPI|Win32 = Debug_MIT_GSSAPI|Win32 + Debug_MIT_GSSAPI|x64 = Debug_MIT_GSSAPI|x64 + Release_MIT_GSSAPI|Win32 = Release_MIT_GSSAPI|Win32 + Release_MIT_GSSAPI|x64 = Release_MIT_GSSAPI|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|Win32.ActiveCfg = Debug|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|Win32.Build.0 = Debug|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|x64.ActiveCfg = Debug|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|x64.Build.0 = Debug|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|Win32.ActiveCfg = Release|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|Win32.Build.0 = Release|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|x64.ActiveCfg = Release|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|x64.Build.0 = Release|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|x64.Build.0 = Debug_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|Win32.Build.0 = Release_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|x64.ActiveCfg = Release_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|x64.Build.0 = Release_MIT_GSSAPI|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|Win32.ActiveCfg = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|Win32.Build.0 = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|x64.ActiveCfg = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|x64.Build.0 = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|Win32.ActiveCfg = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|Win32.Build.0 = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|x64.ActiveCfg = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|x64.Build.0 = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|Win32.ActiveCfg = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|Win32.Build.0 = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|x64.ActiveCfg = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|x64.Build.0 = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|Win32.ActiveCfg = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|Win32.Build.0 = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|x64.ActiveCfg = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|x64.Build.0 = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|Win32.ActiveCfg = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|Win32.Build.0 = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|x64.ActiveCfg = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|x64.Build.0 = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|Win32.ActiveCfg = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|Win32.Build.0 = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|x64.ActiveCfg = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|x64.Build.0 = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|Win32.Build.0 = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|x64.ActiveCfg = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|x64.Build.0 = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|Win32.ActiveCfg = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|Win32.Build.0 = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|x64.ActiveCfg = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|x64.Build.0 = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|Win32.ActiveCfg = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|Win32.Build.0 = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|x64.ActiveCfg = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|x64.Build.0 = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|Win32.ActiveCfg = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|Win32.Build.0 = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|x64.ActiveCfg = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|x64.Build.0 = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/win32/vs15/simple-httpd.vcxproj b/win32/vs15/simple-httpd.vcxproj new file mode 100644 index 00000000..86c4901c --- /dev/null +++ b/win32/vs15/simple-httpd.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {80DC062E-2146-4CE8-A448-FD2205AB2CA4} + simplehttpd + Win32Proj + + + + Application + Unicode + v141 + true + + + Application + Unicode + v141 + + + Application + Unicode + v141 + true + + + Application + Unicode + v141 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Console + MachineX86 + + + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + MachineX64 + + + + + X64 + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX64 + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs15/simple-httpd.vcxproj.filters b/win32/vs15/simple-httpd.vcxproj.filters new file mode 100644 index 00000000..14cf1d4d --- /dev/null +++ b/win32/vs15/simple-httpd.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Sources + + diff --git a/win32/vs15/simple-proxy.vcxproj b/win32/vs15/simple-proxy.vcxproj new file mode 100644 index 00000000..1a90b308 --- /dev/null +++ b/win32/vs15/simple-proxy.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E} + simpleproxy + Win32Proj + + + + Application + Unicode + v141 + true + + + Application + Unicode + v141 + + + Application + Unicode + v141 + true + + + Application + Unicode + v141 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Console + MachineX86 + + + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + MachineX64 + + + + + X64 + + + MaxSpeed + true + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX64 + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs15/simple-proxy.vcxproj.filters b/win32/vs15/simple-proxy.vcxproj.filters new file mode 100644 index 00000000..4a7f2f26 --- /dev/null +++ b/win32/vs15/simple-proxy.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Sources + + diff --git a/win32/vs15/soup-build-defines.props b/win32/vs15/soup-build-defines.props new file mode 100644 index 00000000..0c9b527a --- /dev/null +++ b/win32/vs15/soup-build-defines.props @@ -0,0 +1,29 @@ + + + + + + + + <_PropertySheetDisplayName>soupbuilddefinesprops + $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ + $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ + + + + ..\..;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\libxml2;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) + HAVE_CONFIG_H;%(PreprocessorDefinitions) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + true + /d2Zi+ %(AdditionalOptions) + + + gio-2.0.lib;gobject-2.0.lib;glib-2.0.lib;%(AdditionalDependencies) + $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) + /HIGHENTROPYVA %(AdditionalOptions) + /HIGHENTROPYVA %(AdditionalOptions) + /HIGHENTROPYVA %(AdditionalOptions) + /HIGHENTROPYVA %(AdditionalOptions) + + + diff --git a/win32/vs15/soup-dll-build-defines.props b/win32/vs15/soup-dll-build-defines.props new file mode 100644 index 00000000..40591fff --- /dev/null +++ b/win32/vs15/soup-dll-build-defines.props @@ -0,0 +1,24 @@ + + + + + + + LIBSOUP_COMPILATION;DLL_EXPORT;G_LOG_DOMAIN="libsoup" + LIBSOUP_HAVE_GSSAPI + libxml2.lib;sqlite3.lib;intl.lib;ws2_32.lib + gssapi + 32.lib + 64.lib + + + <_PropertySheetDisplayName>soupdllbuilddefinesprops + + + + $(OutDir)$(SoupDllPrefix)$(ProjectName)$(SoupDllSuffix).dll + $(OutDir)$(SoupDllPrefix)$(ProjectName)$(SoupDllSuffix).pdb + $(OutDir)$(ProjectName)-$(ApiVersion).lib + + + diff --git a/win32/vs15/soup-gen-srcs.props b/win32/vs15/soup-gen-srcs.props new file mode 100644 index 00000000..760825c8 --- /dev/null +++ b/win32/vs15/soup-gen-srcs.props @@ -0,0 +1,26 @@ + + + + + + + copy ..\..\config.h.win32 ..\..\config.h + $(PythonPath)\python.exe ..\soup_version_h.py --version=$(SoupMajorVersion).$(SoupMinorVersion).$(SoupMicroVersion) + $(PythonPath)\python.exe ..\..\libsoup\tld-parser.py ..\..\data\effective_tld_names.dat ..\..\libsoup\tld_data.inc + + + <_PropertySheetDisplayName>soupgensrcsprops + + + + + $(CopyConfigH) + + + $(GenSoupVersionH) + + + $(GenTldDataInc) + + + diff --git a/win32/vs15/soup-gnome.vcxproj b/win32/vs15/soup-gnome.vcxproj new file mode 100644 index 00000000..b5da2d34 --- /dev/null +++ b/win32/vs15/soup-gnome.vcxproj @@ -0,0 +1,164 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8C88A385-28C8-4B30-91A4-FBA381A5A46F} + soupgnome + Win32Proj + + + + DynamicLibrary + Unicode + v141 + true + + + DynamicLibrary + Unicode + v141 + + + DynamicLibrary + Unicode + v141 + true + + + DynamicLibrary + Unicode + v141 + + + + + + + + + + + + + + + + + + + + + + true + false + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + true + Windows + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Windows + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Windows + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + true + Windows + true + true + MachineX64 + + + + + + + + + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs15/soup-gnome.vcxproj.filters b/win32/vs15/soup-gnome.vcxproj.filters new file mode 100644 index 00000000..924bf660 --- /dev/null +++ b/win32/vs15/soup-gnome.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Source Files + Source Files + Source Files + Source Files + + diff --git a/win32/vs15/soup-install.props b/win32/vs15/soup-install.props new file mode 100644 index 00000000..fb3240ef --- /dev/null +++ b/win32/vs15/soup-install.props @@ -0,0 +1,101 @@ + + + + + + + +mkdir $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup$(SoupDllSuffix).dll $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup$(SoupDllSuffix).pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup-gnome$(SoupDllSuffix).dll $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\$(SoupDllPrefix)soup-gnome$(SoupDllSuffix).pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\get.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\get.pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-httpd.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-httpd.pdb $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-proxy.exe $(CopyDir)\bin +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\simple-proxy.pdb $(CopyDir)\bin +mkdir $(CopyDir)\lib +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\soup-$(ApiVersion).lib $(CopyDir)\lib +copy $(SolutionDir)\$(Configuration)\$(Platform)\bin\soup-gnome-$(ApiVersion).lib $(CopyDir)\lib +copy ..\libsoup-$(ApiVersion).pc $(CopyDir)\lib\pkgconfig +copy ..\libsoup-gnome-$(ApiVersion).pc $(CopyDir)\lib\pkgconfig +mkdir $(CopyDir)\include\libsoup-$(ApiVersion)\libsoup +copy ..\..\libsoup\soup.h $(CopyDir)\include\libsoup-2.4\libsoup\soup.h +copy ..\..\libsoup\soup-address.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-address.h +copy ..\..\libsoup\soup-auth.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth.h +copy ..\..\libsoup\soup-auth-domain.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-domain.h +copy ..\..\libsoup\soup-auth-domain-basic.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-domain-basic.h +copy ..\..\libsoup\soup-auth-domain-digest.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-domain-digest.h +copy ..\..\libsoup\soup-auth-manager.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-auth-manager.h +copy ..\..\libsoup\soup-autocleanups.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-autocleanups.h +copy ..\..\libsoup\soup-cache.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cache.h +copy ..\..\libsoup\soup-content-decoder.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-content-decoder.h +copy ..\..\libsoup\soup-content-sniffer.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-content-sniffer.h +copy ..\..\libsoup\soup-cookie.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie.h +copy ..\..\libsoup\soup-cookie-jar.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie-jar.h +copy ..\..\libsoup\soup-cookie-jar-db.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie-jar-db.h +copy ..\..\libsoup\soup-cookie-jar-text.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-cookie-jar-text.h +copy ..\..\libsoup\soup-date.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-date.h +copy ..\..\libsoup\soup-form.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-form.h +copy ..\..\libsoup\soup-headers.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-headers.h +copy ..\..\libsoup\soup-logger.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-logger.h +copy ..\..\libsoup\soup-message.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-message.h +copy ..\..\libsoup\soup-message-body.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-message-body.h +copy ..\..\libsoup\soup-message-headers.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-message-headers.h +copy ..\..\libsoup\soup-method.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-method.h +copy ..\..\libsoup\soup-misc.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-misc.h +copy ..\..\libsoup\soup-multipart.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-multipart.h +copy ..\..\libsoup\soup-multipart-input-stream.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-multipart-input-stream.h +copy ..\..\libsoup\soup-password-manager.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-password-manager.h +copy ..\..\libsoup\soup-portability.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-portability.h +copy ..\..\libsoup\soup-proxy-resolver.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-proxy-resolver.h +copy ..\..\libsoup\soup-proxy-resolver-default.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-proxy-resolver-default.h +copy ..\..\libsoup\soup-proxy-uri-resolver.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-proxy-uri-resolver.h +copy ..\..\libsoup\soup-request.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request.h +copy ..\..\libsoup\soup-request-data.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request-data.h +copy ..\..\libsoup\soup-request-file.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request-file.h +copy ..\..\libsoup\soup-request-http.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-request-http.h +copy ..\..\libsoup\soup-requester.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-requester.h +copy ..\..\libsoup\soup-server.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-server.h +copy ..\..\libsoup\soup-session.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session.h +copy ..\..\libsoup\soup-session-async.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session-async.h +copy ..\..\libsoup\soup-session-feature.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session-feature.h +copy ..\..\libsoup\soup-session-sync.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-session-sync.h +copy ..\..\libsoup\soup-socket.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-socket.h +copy ..\..\libsoup\soup-status.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-status.h +copy ..\..\libsoup\soup-tld.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-tld.h +copy ..\..\libsoup\soup-types.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-types.h +copy ..\..\libsoup\soup-uri.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-uri.h +copy ..\..\libsoup\soup-value-utils.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-value-utils.h +copy ..\..\libsoup\soup-websocket.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-websocket.h +copy ..\..\libsoup\soup-websocket-connection.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-websocket-connection.h +copy ..\..\libsoup\soup-xmlrpc.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-xmlrpc.h +copy ..\..\libsoup\soup-xmlrpc-old.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-xmlrpc-old.h +copy ..\..\libsoup\soup-enum-types.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-enum-types.h +copy ..\..\libsoup\soup-version.h $(CopyDir)\include\libsoup-2.4\libsoup\soup-version.h +mkdir $(CopyDir)\include\libsoup-gnome-$(ApiVersion)\libsoup +copy ..\..\libsoup\soup-cookie-jar-sqlite.h $(CopyDir)\include\libsoup-gnome-2.4\libsoup\soup-cookie-jar-sqlite.h +copy ..\..\libsoup\soup-gnome.h $(CopyDir)\include\libsoup-gnome-2.4\libsoup\soup-gnome.h +copy ..\..\libsoup\soup-gnome-features.h $(CopyDir)\include\libsoup-gnome-2.4\libsoup\soup-gnome-features.h + + ..\libsoup-$(ApiVersion).pc;..\libsoup-gnome-$(ApiVersion).pc + (if not exist $(CopyDir)\lib\pkgconfig mkdir $(CopyDir)\lib\pkgconfig) & ($(PythonPath)\python.exe ..\souppc.py --prefix=$(CopyDir) --version=$(SoupMajorVersion).$(SoupMinorVersion).$(SoupMicroVersion)) + + + <_PropertySheetDisplayName>soupinstallprops + + + + + $(SoupDoInstall) + + + $(SoupPCFiles) + + + $(SoupGenPC) + + + diff --git a/win32/vs15/soup-install.vcxproj b/win32/vs15/soup-install.vcxproj new file mode 100644 index 00000000..d6de8a70 --- /dev/null +++ b/win32/vs15/soup-install.vcxproj @@ -0,0 +1,121 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {E0DCF460-914F-46F9-94D6-86D456CB53E9} + soupinstall + + + + Utility + MultiByte + v141 + true + + + Utility + MultiByte + v141 + + + Utility + MultiByte + v141 + true + + + Utility + MultiByte + v141 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copying build results... + $(SoupPCFiles) + $(SoupDoInstall) + some_file;%(Outputs) + Copying build results... + $(SoupPCFiles) + $(SoupDoInstall) + some_file;%(Outputs) + + + Generating .pc files... + $(SoupGenPC) + $(SoupPCFiles);%(Outputs) + Generating .pc files... + $(SoupGenPC) + $(SoupPCFiles);%(Outputs) + + + + + {b24831c4-b8f2-41d6-aaf4-12192f71c623} + false + + + {80dc062e-2146-4ce8-a448-fd2205ab2ca4} + false + + + {3ad0cb92-ee38-425e-83cb-e7b1cb1d305e} + false + + + {8c88a385-28c8-4b30-91a4-fba381a5a46f} + false + + + {d83a3162-b14c-459c-af81-15bbfa90240d} + false + + + + + + diff --git a/win32/vs15/soup-install.vcxproj.filters b/win32/vs15/soup-install.vcxproj.filters new file mode 100644 index 00000000..2627f42f --- /dev/null +++ b/win32/vs15/soup-install.vcxproj.filters @@ -0,0 +1,13 @@ + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + Resource Files + Resource Files + + diff --git a/win32/vs15/soup-version-paths.props b/win32/vs15/soup-version-paths.props new file mode 100644 index 00000000..98cd6b13 --- /dev/null +++ b/win32/vs15/soup-version-paths.props @@ -0,0 +1,69 @@ + + + + + + 15 + ..\..\..\vs$(VSVer)\$(Platform) + $(GlibEtcInstallRoot) + 2 + 62 + 2 + 2.4 + lib + -$(ApiVersion)-0 + + -$(ApiVersion)-vs$(VSVer) + $(SoupSeparateVSDllPrefix) + $(SoupSeparateVSDllSuffix) + c:\python34 + + + <_PropertySheetDisplayName>soupversionpathsprops + + + + + $(VSVer) + + + $(GlibEtcInstallRoot) + + + $(CopyDir) + + + $(SoupMajorVersion) + + + $(SoupMinorVersion) + + + $(SoupMicroVersion) + + + $(ApiVersion) + + + $(SoupLibtoolCompatibleDllPrefix) + + + $(SoupLibtoolCompatibleDllSuffix) + + + $(SoupSeparateVSDllPrefix) + + + $(SoupSeparateVSDllSuffix) + + + $(SoupDllPrefix) + + + $(SoupDllSuffix) + + + $(PythonPath) + + + diff --git a/win32/vs15/soup.vcxproj b/win32/vs15/soup.vcxproj new file mode 100644 index 00000000..65effc4d --- /dev/null +++ b/win32/vs15/soup.vcxproj @@ -0,0 +1,414 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Debug_MIT_GSSAPI + Win32 + + + Debug_MIT_GSSAPI + x64 + + + Release_MIT_GSSAPI + Win32 + + + Release_MIT_GSSAPI + x64 + + + + {D83A3162-B14C-459C-AF81-15BBFA90240D} + soup + Win32Proj + + + + DynamicLibrary + Unicode + v141 + + + DynamicLibrary + Unicode + v141 + + + DynamicLibrary + Unicode + v141 + true + + + DynamicLibrary + Unicode + v141 + true + + + DynamicLibrary + Unicode + v141 + + + DynamicLibrary + Unicode + v141 + + + DynamicLibrary + Unicode + v141 + true + + + DynamicLibrary + Unicode + v141 + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + trueDebug\$(Platform)\bin\ + falseRelease\$(Platform)\bin\ + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + MachineX86 + + + + + Disabled + _DEBUG;$(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX86);%(AdditionalDependencies) + true + Windows + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + true + true + MachineX86 + + + + + MaxSpeed + true + $(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX86);%(AdditionalDependencies) + true + Windows + true + true + MachineX86 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + MachineX64 + + + + + X64 + + + Disabled + _DEBUG;$(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX64);%(AdditionalDependencies) + true + Windows + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);%(AdditionalDependencies) + true + Windows + true + true + MachineX64 + + + + + X64 + + + MaxSpeed + true + $(SoupBuildDefines);$(SoupMITGSSAPIBuildDefines);%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + $(SoupExtraDepLibs);$(MITGSSAPILibBaseName)$(MITGSSAPILibNameSuffixX64);%(AdditionalDependencies) + true + Windows + true + true + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + Copying config.h from config.h.win32... + $(CopyConfigH) + ..\..\config.h;%(Outputs) + + + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + Generating tld_data.inc... + $(GenTldDataInc) + ..\..\libsoup\tld_data.inc;%(Outputs) + + + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + Generating soup-version.h... + $(GenSoupVersionH) + ..\..\libsoup\soup-version.h;%(Outputs) + + + + + + diff --git a/win32/vs15/soup.vcxproj.filters b/win32/vs15/soup.vcxproj.filters new file mode 100644 index 00000000..71eb5a6c --- /dev/null +++ b/win32/vs15/soup.vcxproj.filters @@ -0,0 +1,95 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + Source Files + + + Resource Files + Resource Files + Resource Files + + diff --git a/win32/vs9/Makefile.am b/win32/vs9/Makefile.am new file mode 100644 index 00000000..62f77fa6 --- /dev/null +++ b/win32/vs9/Makefile.am @@ -0,0 +1,27 @@ +GENERATED_ITEMS = \ + soup.vcproj \ + soup-gnome.vcproj \ + soup-install.vsprops + +MSVC_HEADERS_LIST = soup.headers soup-gnome.headers + +EXTRA_DIST = \ + libsoup.sln \ + get.vcproj \ + simple-httpd.vcproj \ + simple-proxy.vcproj \ + soup-install.vcproj \ + soup-build-defines.vsprops \ + soup-dll-build-defines.vsprops \ + soup-gen-srcs.vsprops \ + soup-version-paths.vsprops \ + soup.vcprojin \ + soup-gnome.vcprojin \ + soup-install.vspropsin \ + $(GENERATED_ITEMS) + +soup-install.vsprops: $(top_srcdir)/win32/vs9/soup-install.vspropsin $(MSVC_HEADERS_LIST) + $(CPP) -P - <$(top_srcdir)/win32/vs9/soup-install.vspropsin >$@ + rm $(MSVC_HEADERS_LIST) + +DISTCLEANFILES = $(GENERATED_ITEMS) diff --git a/win32/vs9/Makefile.in b/win32/vs9/Makefile.in new file mode 100644 index 00000000..23ca1ac7 --- /dev/null +++ b/win32/vs9/Makefile.in @@ -0,0 +1,552 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = win32/vs9 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/glibtests.m4 $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/vapigen.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = soup-version-paths.vsprops +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(srcdir)/soup-version-paths.vsprops.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APACHE_HTTPD = @APACHE_HTTPD@ +APACHE_MODULE_DIR = @APACHE_MODULE_DIR@ +APACHE_PHP_MODULE_DIR = @APACHE_PHP_MODULE_DIR@ +APACHE_SSL_MODULE_DIR = @APACHE_SSL_MODULE_DIR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL = @CURL@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MAKEFILE = @GLIB_MAKEFILE@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GMSGFMT = @GMSGFMT@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_GNOME = @HAVE_GNOME@ +HTML_DIR = @HTML_DIR@ +IF_HAVE_MOD_UNIXD = @IF_HAVE_MOD_UNIXD@ +IF_HAVE_PHP = @IF_HAVE_PHP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ +INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ +INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ +INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ +INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ +INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ +INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +KRB5_CFLAGS = @KRB5_CFLAGS@ +KRB5_CONFIG = @KRB5_CONFIG@ +KRB5_LIBS = @KRB5_LIBS@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PHP = @PHP@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOUP_AGE = @SOUP_AGE@ +SOUP_API_VERSION = @SOUP_API_VERSION@ +SOUP_CURRENT = @SOUP_CURRENT@ +SOUP_DEBUG_FLAGS = @SOUP_DEBUG_FLAGS@ +SOUP_HIDDEN_VISIBILITY_CFLAGS = @SOUP_HIDDEN_VISIBILITY_CFLAGS@ +SOUP_MAJOR_VERSION = @SOUP_MAJOR_VERSION@ +SOUP_MICRO_VERSION = @SOUP_MICRO_VERSION@ +SOUP_MINOR_VERSION = @SOUP_MINOR_VERSION@ +SOUP_REVISION = @SOUP_REVISION@ +SQLITE_CFLAGS = @SQLITE_CFLAGS@ +SQLITE_LIBS = @SQLITE_LIBS@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VALAC = @VALAC@ +VAPIDIR = @VAPIDIR@ +VAPIGEN = @VAPIGEN@ +VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ +VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XML_CFLAGS = @XML_CFLAGS@ +XML_LIBS = @XML_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +installed_test_metadir = @installed_test_metadir@ +installed_testdir = @installed_testdir@ +intltool__v_merge_options_ = @intltool__v_merge_options_@ +intltool__v_merge_options_0 = @intltool__v_merge_options_0@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +ntlm_auth = @ntlm_auth@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +GENERATED_ITEMS = \ + soup.vcproj \ + soup-gnome.vcproj \ + soup-install.vsprops + +MSVC_HEADERS_LIST = soup.headers soup-gnome.headers +EXTRA_DIST = \ + libsoup.sln \ + get.vcproj \ + simple-httpd.vcproj \ + simple-proxy.vcproj \ + soup-install.vcproj \ + soup-build-defines.vsprops \ + soup-dll-build-defines.vsprops \ + soup-gen-srcs.vsprops \ + soup-version-paths.vsprops \ + soup.vcprojin \ + soup-gnome.vcprojin \ + soup-install.vspropsin \ + $(GENERATED_ITEMS) + +DISTCLEANFILES = $(GENERATED_ITEMS) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign win32/vs9/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign win32/vs9/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +soup-version-paths.vsprops: $(top_builddir)/config.status $(srcdir)/soup-version-paths.vsprops.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +soup-install.vsprops: $(top_srcdir)/win32/vs9/soup-install.vspropsin $(MSVC_HEADERS_LIST) + $(CPP) -P - <$(top_srcdir)/win32/vs9/soup-install.vspropsin >$@ + rm $(MSVC_HEADERS_LIST) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/win32/vs9/get.vcproj b/win32/vs9/get.vcproj new file mode 100644 index 00000000..7c3f998a --- /dev/null +++ b/win32/vs9/get.vcproj @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/win32/vs9/libsoup.sln b/win32/vs9/libsoup.sln new file mode 100644 index 00000000..d738f8e1 --- /dev/null +++ b/win32/vs9/libsoup.sln @@ -0,0 +1,147 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup", "soup.vcproj", "{D83A3162-B14C-459C-AF81-15BBFA90240D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup-gnome", "soup-gnome.vcproj", "{8C88A385-28C8-4B30-91A4-FBA381A5A46F}" + ProjectSection(ProjectDependencies) = postProject + {D83A3162-B14C-459C-AF81-15BBFA90240D} = {D83A3162-B14C-459C-AF81-15BBFA90240D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "get", "get.vcproj", "{B24831C4-B8F2-41D6-AAF4-12192F71C623}" + ProjectSection(ProjectDependencies) = postProject + {D83A3162-B14C-459C-AF81-15BBFA90240D} = {D83A3162-B14C-459C-AF81-15BBFA90240D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple-httpd", "simple-httpd.vcproj", "{80DC062E-2146-4CE8-A448-FD2205AB2CA4}" + ProjectSection(ProjectDependencies) = postProject + {D83A3162-B14C-459C-AF81-15BBFA90240D} = {D83A3162-B14C-459C-AF81-15BBFA90240D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple-proxy", "simple-proxy.vcproj", "{3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}" + ProjectSection(ProjectDependencies) = postProject + {D83A3162-B14C-459C-AF81-15BBFA90240D} = {D83A3162-B14C-459C-AF81-15BBFA90240D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soup-install", "soup-install.vcproj", "{E0DCF460-914F-46F9-94D6-86D456CB53E9}" + ProjectSection(ProjectDependencies) = postProject + {80DC062E-2146-4CE8-A448-FD2205AB2CA4} = {80DC062E-2146-4CE8-A448-FD2205AB2CA4} + {D83A3162-B14C-459C-AF81-15BBFA90240D} = {D83A3162-B14C-459C-AF81-15BBFA90240D} + {8C88A385-28C8-4B30-91A4-FBA381A5A46F} = {8C88A385-28C8-4B30-91A4-FBA381A5A46F} + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E} = {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E} + {B24831C4-B8F2-41D6-AAF4-12192F71C623} = {B24831C4-B8F2-41D6-AAF4-12192F71C623} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + Debug_MIT_GSSAPI|Win32 = Debug_MIT_GSSAPI|Win32 + Debug_MIT_GSSAPI|x64 = Debug_MIT_GSSAPI|x64 + Release_MIT_GSSAPI|Win32 = Release_MIT_GSSAPI|Win32 + Release_MIT_GSSAPI|x64 = Release_MIT_GSSAPI|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|Win32.ActiveCfg = Debug|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|Win32.Build.0 = Debug|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|x64.ActiveCfg = Debug|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug|x64.Build.0 = Debug|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|Win32.ActiveCfg = Release|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|Win32.Build.0 = Release|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|x64.ActiveCfg = Release|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release|x64.Build.0 = Release|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Debug_MIT_GSSAPI|x64.Build.0 = Debug_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|Win32.Build.0 = Release_MIT_GSSAPI|Win32 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|x64.ActiveCfg = Release_MIT_GSSAPI|x64 + {D83A3162-B14C-459C-AF81-15BBFA90240D}.Release_MIT_GSSAPI|x64.Build.0 = Release_MIT_GSSAPI|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|Win32.ActiveCfg = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|Win32.Build.0 = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|x64.ActiveCfg = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug|x64.Build.0 = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|Win32.ActiveCfg = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|Win32.Build.0 = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|x64.ActiveCfg = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release|x64.Build.0 = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {8C88A385-28C8-4B30-91A4-FBA381A5A46F}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|Win32.ActiveCfg = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|Win32.Build.0 = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|x64.ActiveCfg = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug|x64.Build.0 = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|Win32.ActiveCfg = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|Win32.Build.0 = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|x64.ActiveCfg = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release|x64.Build.0 = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {B24831C4-B8F2-41D6-AAF4-12192F71C623}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|Win32.ActiveCfg = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|Win32.Build.0 = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|x64.ActiveCfg = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug|x64.Build.0 = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|Win32.ActiveCfg = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|Win32.Build.0 = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|x64.ActiveCfg = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release|x64.Build.0 = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {80DC062E-2146-4CE8-A448-FD2205AB2CA4}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|Win32.Build.0 = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|x64.ActiveCfg = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug|x64.Build.0 = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|Win32.ActiveCfg = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|Win32.Build.0 = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|x64.ActiveCfg = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release|x64.Build.0 = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {3AD0CB92-EE38-425E-83CB-E7B1CB1D305E}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|Win32.ActiveCfg = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|Win32.Build.0 = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|x64.ActiveCfg = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug|x64.Build.0 = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|Win32.ActiveCfg = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|Win32.Build.0 = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|x64.ActiveCfg = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release|x64.Build.0 = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|Win32.ActiveCfg = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|Win32.Build.0 = Debug|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|x64.ActiveCfg = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Debug_MIT_GSSAPI|x64.Build.0 = Debug|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|Win32.ActiveCfg = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|Win32.Build.0 = Release|Win32 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|x64.ActiveCfg = Release|x64 + {E0DCF460-914F-46F9-94D6-86D456CB53E9}.Release_MIT_GSSAPI|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/win32/vs9/simple-httpd.vcproj b/win32/vs9/simple-httpd.vcproj new file mode 100644 index 00000000..217306ec --- /dev/null +++ b/win32/vs9/simple-httpd.vcproj @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/win32/vs9/simple-proxy.vcproj b/win32/vs9/simple-proxy.vcproj new file mode 100644 index 00000000..cd3582d5 --- /dev/null +++ b/win32/vs9/simple-proxy.vcproj @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/win32/vs9/soup-build-defines.vsprops b/win32/vs9/soup-build-defines.vsprops new file mode 100644 index 00000000..095d5684 --- /dev/null +++ b/win32/vs9/soup-build-defines.vsprops @@ -0,0 +1,22 @@ + + + + + diff --git a/win32/vs9/soup-dll-build-defines.vsprops b/win32/vs9/soup-dll-build-defines.vsprops new file mode 100644 index 00000000..02d0547f --- /dev/null +++ b/win32/vs9/soup-dll-build-defines.vsprops @@ -0,0 +1,38 @@ + + + + + + + + + + diff --git a/win32/vs9/soup-gen-srcs.vsprops b/win32/vs9/soup-gen-srcs.vsprops new file mode 100644 index 00000000..d897efa8 --- /dev/null +++ b/win32/vs9/soup-gen-srcs.vsprops @@ -0,0 +1,20 @@ + + + + + + diff --git a/win32/vs9/soup-gnome.vcproj b/win32/vs9/soup-gnome.vcproj new file mode 100644 index 00000000..cbeb14ca --- /dev/null +++ b/win32/vs9/soup-gnome.vcproj @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/win32/vs9/soup-gnome.vcprojin b/win32/vs9/soup-gnome.vcprojin new file mode 100644 index 00000000..8e13232b --- /dev/null +++ b/win32/vs9/soup-gnome.vcprojin @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#include "soup-gnome.sourcefiles" + + + + + + + + + diff --git a/win32/vs9/soup-install.vcproj b/win32/vs9/soup-install.vcproj new file mode 100644 index 00000000..665b91a6 --- /dev/null +++ b/win32/vs9/soup-install.vcproj @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/win32/vs9/soup-install.vsprops b/win32/vs9/soup-install.vsprops new file mode 100644 index 00000000..4a03756d --- /dev/null +++ b/win32/vs9/soup-install.vsprops @@ -0,0 +1,91 @@ + + + + + diff --git a/win32/vs9/soup-install.vspropsin b/win32/vs9/soup-install.vspropsin new file mode 100644 index 00000000..5948d775 --- /dev/null +++ b/win32/vs9/soup-install.vspropsin @@ -0,0 +1,40 @@ + + + + + diff --git a/win32/vs9/soup-version-paths.vsprops b/win32/vs9/soup-version-paths.vsprops new file mode 100644 index 00000000..ab961cce --- /dev/null +++ b/win32/vs9/soup-version-paths.vsprops @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + diff --git a/win32/vs9/soup-version-paths.vsprops.in b/win32/vs9/soup-version-paths.vsprops.in new file mode 100644 index 00000000..cde608ee --- /dev/null +++ b/win32/vs9/soup-version-paths.vsprops.in @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + diff --git a/win32/vs9/soup.vcproj b/win32/vs9/soup.vcproj new file mode 100644 index 00000000..f791b4a6 --- /dev/null +++ b/win32/vs9/soup.vcproj @@ -0,0 +1,391 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/win32/vs9/soup.vcprojin b/win32/vs9/soup.vcprojin new file mode 100644 index 00000000..58f4baa9 --- /dev/null +++ b/win32/vs9/soup.vcprojin @@ -0,0 +1,318 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#include "soup.sourcefiles" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3