Merge tag 'OB_15.1.1-4' into omaha_15.1.1

15.1.1-4

 Conflicts:
	edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py


Former-commit-id: 0db5e1ec86 [formerly 8e57da4bb70fda78c3aaa91add874cd403286939]
Former-commit-id: 42f66043f1
This commit is contained in:
Steve Harris 2015-04-13 12:13:02 -05:00
commit 1686645cdc
3927 changed files with 932 additions and 2510149 deletions

View file

@ -21,7 +21,7 @@
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- Direct port of tdlSurfaceMenus.txt -->
<!-- DR 9363: Commented out IFPS part of menu. Has no functionality
<contribute xsi:type="titleItem" titleText="------ IFPS ------"
<contribute xsi:type="titleItem" titleText="- IFPS -"
id="IFPSLine" />
<contribute xsi:type="placeholder" menuText="IFPS 3hr" id="IFPS3Hr" />
<contribute xsi:type="placeholder" menuText="IFPS 12hr" id="IFPS12Hr" />

View file

@ -329,7 +329,9 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
*/
@Override
public void nullifyMonitor() {
monitor.removeMonitorListener(zoneDialog);
if (zoneDialog != null) {
monitor.removeMonitorListener(zoneDialog);
}
ProductAlertObserver.removeObserver(OBS, this);
monitor = null;
}
@ -380,7 +382,9 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
}
}
} else {
monitor.nullifyMonitor();
if (monitor != null) {
monitor.nullifyMonitor();
}
}
}

View file

@ -79,6 +79,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* 06 Sep 2013 #2342 lvenable Fixed color memory leaks and a null point exception.
* 04 Sep 2014 14448 cgobs Make MPE redisplay after save of color settings in ColorScaleMgr
* 26 Feb 2015 16848 cgobs Fix merging of color sets by deleting existing set before saving new set.
* Updated to include fix of error when saving a new source.
* </pre>
*
* @author lvenable
@ -1972,8 +1973,7 @@ public class ColorScaleMgrDlg extends CaveSWTDialog {
String statement = "delete from colorValue " + whereClause;
try
{
try {
DirectDbQuery.executeStatement(statement,HydroConstants.IHFS, QueryLanguage.SQL);
}
@ -1984,26 +1984,38 @@ public class ColorScaleMgrDlg extends CaveSWTDialog {
// 0. Collect data to delete (user, dataType, duration
java.util.List<ColorScaleData> data = editColorData
java.util.List<ColorScaleData> usedColorData = null;
try
{
usedColorData = editColorData
.getUsedColorScaleDataArray(userId, durationString + "_" + colorUseName);
}
catch (Exception e)
{
statusHandler.handle(Priority.DEBUG,
"No problem. Color set doesn't exist yet, can't delete it. ", e);
}
ColorValueData cvd = new ColorValueData();
cvd.setApplicationName(applicationName);
cvd.setColorUseName(colorUseName);
cvd.setUserId(userId);
cvd.setDuration(durationString);
System.out.println("Attempting to delete data from cvd = " + getStringFromColorValueData(cvd) );
if (usedColorData != null) {
ColorValueData cvd = new ColorValueData();
cvd.setApplicationName(applicationName);
cvd.setColorUseName(colorUseName);
cvd.setUserId(userId);
cvd.setDuration(durationString);
// 1. Delete each record from database
for (ColorScaleData csd : data) {
cvd.setThresholdValue(csd.getDoubleVal().toString());
try {
manager.deleteRecord(cvd);
} catch (VizException e) {
statusHandler.handle(Priority.ERROR,
"Error deleting Color Value Data: ", e);
}
System.out.println("Attempting to delete data from cvd = " +
getStringFromColorValueData(cvd) );
// 1. Delete each record from database
for (ColorScaleData csd : usedColorData) {
cvd.setThresholdValue(csd.getDoubleVal().toString());
try {
manager.deleteRecord(cvd);
} catch (VizException e) {
statusHandler.handle(Priority.ERROR,
"Error deleting Color Value Data: ", e);
}
} //end for
}
}

View file

@ -444,18 +444,16 @@ public class AWIPSHeaderBlockDlg extends CaveSWTDialog implements
if (null == CCCcode) {
wsfoIdTF.setText(textProd.getCccid());
} else {
wsfoIdTF.setText(CCCcode);
if (textProd.getProdId().getWmoid().isEmpty()
&& textProd.getProdId().getSite().isEmpty()) {
wsfoIdTF.setText(textProd.getCccid());
}
else
wsfoIdTF.setText(CCCcode);
}
} else {
wsfoIdTF.setText(textProd.getCccid());
}
if(textProd.getProduct() != null) {
if(textProd.getProduct().startsWith("ZCZC")) {
wsfoIdTF.setText(textProd.getCccid());
}
}
prodCatTF.setText(textProd.getNnnid());
prodDesignatorTF.setText(textProd.getXxxid());
}

View file

@ -5748,17 +5748,14 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
int numberOfLinesOfHeaderText = 2;
int afosNnnLimit = 2; // first three characters is AFOS NNN
int afosXxxLimit = 5; // second three characters is AFOS XXX
String prodText = textEditor.getText();
if (!prodText.startsWith("ZCZC")) {
/*
* DR15610 - Make sure that if the first line of the text product is not
* a WMO heading it is treated as part of the text body.
*/
String[] pieces = null;
if(textEditor.getText().startsWith("ZCZC"))
pieces = textEditor.getText().split("\r*\n", 1);
else
pieces = textEditor.getText().split("\r*\n", 2);
String[] pieces = textEditor.getText().split("\r*\n", 2);
if (pieces.length > 1) {
pieces[0] += "\n"; // WMOHeader expects this
}
@ -5858,6 +5855,35 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
textEditor.setText("");
}
}
} else {
/**
* If the first word begins with "ZCZC", it is a two-line header at least,
* it is "ZCZC CCNNNXXX adr\r\r\nTTAA00 KCCC DDHHMM bbb\r\r\n"
*/
int newLineIndex = prodText.indexOf("\n\n");
String first = prodText.substring(0, newLineIndex);
if (first.length() > 10 ) {
String rest = prodText.substring(newLineIndex+1);
headerTF.setText(first);
String cccnnnxxx = first.substring(5, 14);
setCurrentSiteId("");
setCurrentWmoId("");
setCurrentWsfoId(cccnnnxxx.substring(0, 3));
setCurrentProdCategory(cccnnnxxx.substring(3, 6));
setCurrentProdDesignator(cccnnnxxx.substring(6, 9));
try {
textEditor.setText(rest.trim());
textEditor.setEditable(true);
textEditor.setEditable(false);
} catch (IllegalArgumentException e) {
// There is no text product body, so set it to the empty string.
textEditor.setText("");
}
}
}
}
/**

View file

@ -0,0 +1,277 @@
<bundle xmlns:ns2="group">
<displayList>
<displays xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="d2DMapRenderableDisplay" scale="CONUS" density="1.0" magnification="1.0" zoomLevel="1.0" mapCenter="-79.09835514095181 33.915979250804455 0.0">
<descriptor xsi:type="mapDescriptor">
<resource>
<loadProperties xsi:type="gridLoadProperties" displayType="CONTOUR" loadWithoutData="false">
<capabilities>
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
</capabilities>
<resourceType>PLAN_VIEW</resourceType>
</loadProperties>
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
</properties>
<resourceData xsi:type="gridResourceData" retrieveData="true" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
<metadataMap>
<mapping key="info.parameter.abbreviation">
<constraint constraintValue="GH" constraintType="EQUALS"/>
</mapping>
<mapping key="info.datasetId">
<constraint constraintValue="${modelName}" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.leveltwovalue">
<constraint constraintValue="-999999" constraintType="EQUALS" />
</mapping>
<mapping key="pluginName">
<constraint constraintValue="grid" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.masterLevel.name">
<constraint constraintValue="MB" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.levelonevalue">
<constraint constraintValue="500.0" constraintType="EQUALS"/>
</mapping>
</metadataMap>
<alertParser xsi:type="dataCubeAlertMessageParser"/>
</resourceData>
</resource>
<resource>
<loadProperties xsi:type="gridLoadProperties" displayType="CONTOUR" loadWithoutData="false">
<capabilities>
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
</capabilities>
<resourceType>PLAN_VIEW</resourceType>
</loadProperties>
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
</properties>
<resourceData xsi:type="gridResourceData" retrieveData="true" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
<metadataMap>
<mapping key="info.parameter.abbreviation">
<constraint constraintValue="AV" constraintType="EQUALS"/>
</mapping>
<mapping key="info.datasetId">
<constraint constraintValue="${modelName}" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.leveltwovalue">
<constraint constraintValue="-999999" constraintType="EQUALS"/>
</mapping>
<mapping key="pluginName">
<constraint constraintValue="grid" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.masterLevel.name">
<constraint constraintValue="MB" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.levelonevalue">
<constraint constraintValue="500.0" constraintType="EQUALS"/>
</mapping>
</metadataMap>
<alertParser xsi:type="dataCubeAlertMessageParser"/>
</resourceData>
</resource>
<resource>
<loadProperties xsi:type="gridLoadProperties" displayType="CONTOUR" loadWithoutData="false">
<capabilities>
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
</capabilities>
<resourceType>PLAN_VIEW</resourceType>
</loadProperties>
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="false">
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
</properties>
<resourceData xsi:type="gridResourceData" retrieveData="true" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
<metadataMap>
<mapping key="info.parameter.abbreviation">
<constraint constraintValue="msl-P" constraintType="EQUALS"/>
</mapping>
<mapping key="info.datasetId">
<constraint constraintValue="${modelName}" constraintType="EQUALS"/>
</mapping>
<mapping key="pluginName">
<constraint constraintValue="grid" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.masterLevel.name">
<constraint constraintValue="SFC" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.levelonevalue">
<constraint constraintValue="0.0" constraintType="EQUALS"/>
</mapping>
</metadataMap>
<alertParser xsi:type="dataCubeAlertMessageParser"/>
</resourceData>
</resource>
<resource>
<loadProperties xsi:type="gridLoadProperties" displayType="CONTOUR" loadWithoutData="false">
<capabilities>
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
</capabilities>
<resourceType>PLAN_VIEW</resourceType>
</loadProperties>
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="false">
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
</properties>
<resourceData xsi:type="gridResourceData" retrieveData="true" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
<metadataMap>
<mapping key="info.parameter.abbreviation">
<constraint constraintValue="dZ" constraintType="EQUALS"/>
</mapping>
<mapping key="info.datasetId">
<constraint constraintValue="${modelName}" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.leveltwovalue">
<constraint constraintValue="500.0" constraintType="EQUALS"/>
</mapping>
<mapping key="pluginName">
<constraint constraintValue="grid" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.masterLevel.name">
<constraint constraintValue="MB" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.levelonevalue">
<constraint constraintValue="1000.0" constraintType="EQUALS"/>
</mapping>
</metadataMap>
<alertParser xsi:type="dataCubeAlertMessageParser"/>
</resourceData>
</resource>
<resource>
<loadProperties xsi:type="gridLoadProperties" displayType="CONTOUR" loadWithoutData="false">
<capabilities>
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
</capabilities>
<resourceType>PLAN_VIEW</resourceType>
</loadProperties>
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="false">
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
</properties>
<resourceData xsi:type="gridResourceData" retrieveData="true" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
<metadataMap>
<mapping key="info.parameter.abbreviation">
<constraint constraintValue="GH" constraintType="EQUALS"/>
</mapping>
<mapping key="info.datasetId">
<constraint constraintValue="${modelName}" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.leveltwovalue">
<constraint constraintValue="-999999" constraintType="EQUALS"/>
</mapping>
<mapping key="pluginName">
<constraint constraintValue="grid" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.masterLevel.name">
<constraint constraintValue="MB" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.levelonevalue">
<constraint constraintValue="700.0" constraintType="EQUALS"/>
</mapping>
</metadataMap>
<alertParser xsi:type="dataCubeAlertMessageParser"/>
</resourceData>
</resource>
<resource>
<loadProperties xsi:type="gridLoadProperties" displayType="CONTOUR" loadWithoutData="false">
<capabilities>
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
</capabilities>
<resourceType>PLAN_VIEW</resourceType>
</loadProperties>
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="false">
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
</properties>
<resourceData xsi:type="gridResourceData" retrieveData="true" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
<metadataMap>
<mapping key="info.parameter.abbreviation">
<constraint constraintValue="RH" constraintType="EQUALS"/>
</mapping>
<mapping key="info.datasetId">
<constraint constraintValue="${modelName}" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.leveltwovalue">
<constraint constraintValue="500.0" constraintType="EQUALS"/>
</mapping>
<mapping key="pluginName">
<constraint constraintValue="grid" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.masterLevel.name">
<constraint constraintValue="MB" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.levelonevalue">
<constraint constraintValue="1000.0" constraintType="EQUALS"/>
</mapping>
</metadataMap>
<alertParser xsi:type="dataCubeAlertMessageParser"/>
</resourceData>
</resource>
<resource>
<loadProperties xsi:type="gridLoadProperties" displayType="CONTOUR" loadWithoutData="false">
<capabilities>
<capability xsi:type="outlineCapability" lineStyle="DEFAULT" outlineOn="true" outlineWidth="1"/>
</capabilities>
<resourceType>PLAN_VIEW</resourceType>
</loadProperties>
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="false">
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
</properties>
<resourceData xsi:type="gridResourceData" retrieveData="true" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
<metadataMap>
<mapping key="info.parameter.abbreviation">
<constraint constraintValue="T" constraintType="EQUALS"/>
</mapping>
<mapping key="info.datasetId">
<constraint constraintValue="${modelName}" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.leveltwovalue">
<constraint constraintValue="-999999" constraintType="EQUALS"/>
</mapping>
<mapping key="pluginName">
<constraint constraintValue="grid" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.masterLevel.name">
<constraint constraintValue="MB" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.levelonevalue">
<constraint constraintValue="850.0" constraintType="EQUALS"/>
</mapping>
</metadataMap>
<alertParser xsi:type="dataCubeAlertMessageParser"/>
</resourceData>
</resource>
<resource>
<loadProperties xsi:type="gridLoadProperties" displayType="CONTOUR" loadWithoutData="false">
<capabilities>
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
</capabilities>
<resourceType>PLAN_VIEW</resourceType>
</loadProperties>
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="false">
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
</properties>
<resourceData xsi:type="gridResourceData" retrieveData="true" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
<metadataMap>
<mapping key="info.parameter.abbreviation">
<constraint constraintValue="${TP}" constraintType="EQUALS"/>
</mapping>
<mapping key="info.datasetId">
<constraint constraintValue="${modelName}" constraintType="EQUALS"/>
</mapping>
<mapping key="pluginName">
<constraint constraintValue="grid" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.masterLevel.name">
<constraint constraintValue="SFC" constraintType="EQUALS"/>
</mapping>
<mapping key="info.level.levelonevalue">
<constraint constraintValue="0.0" constraintType="EQUALS"/>
</mapping>
</metadataMap>
<alertParser xsi:type="dataCubeAlertMessageParser"/>
</resourceData>
</resource>
<timeMatcher xsi:type="d2DTimeMatcher" deltaFilter="0" forecastFilter="0"/>
<numberOfFrames>${frameCount}</numberOfFrames>
</descriptor>
</displays>
</displayList>
</bundle>

View file

@ -69,7 +69,7 @@
<substitute key="modelName" value="${MMMmodel2}"/>
<substitute key="frameCount" value="17"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/volume/DefaultFamily.xml"
<contribute xsi:type="bundleItem" file="bundles/volume/HRRRFamily.xml"
menuText="HRRR" id="hrrr" useReferenceTime="true">
<substitute key="modelName" value="HRRR"/>
<substitute key="TP" value="TP"/>
@ -110,4 +110,4 @@
<substitute key="TP" value="TP6hr"/>
<substitute key="frameCount" value="15"/>
</contribute>
</menuTemplate>
</menuTemplate>

View file

@ -28,6 +28,8 @@
<!-- End Baumgardt Submenu -->
<contribute xsi:type="menuItem" menuText="Cloud Cover"
key="CCP" indentText="false" />
<contribute xsi:type="menuItem" menuText="Cloud Cover Anl Uncertainty"
key="CCPerranl" indentText="false" />
<contribute xsi:type="menuItem" menuText="Cloud Decks"
key="clDecks" indentText="true" />
<contribute xsi:type="menuItem" menuText="Cloud Type"

View file

@ -37,6 +37,8 @@
indentText="false" />
<contribute xsi:type="menuItem" menuText="Gust Speed"
key="WGS" indentText="true" />
<contribute xsi:type="menuItem" menuText="Gust Speed Anl Uncertainty"
key="WGSea" indentText="true" />
<contribute xsi:type="menuItem" menuText="Max Gust Speed" key="MaxWHRRR"
indentText="true" />
<contribute xsi:type="menuItem" menuText="Wind Direction"

View file

@ -1,5 +1,12 @@
#!/bin/bash
PSQL="/awips2/psql/bin/psql"
# vaa plugin was in rare occassions inserting records without a time which are then never purged
${PSQL} -U awips -d metadata -c "delete from vaa_location where parentid in (select recordid from vaa_subpart where parentid in (select id from vaa where reftime is NULL))"
${PSQL} -U awips -d metadata -c "delete from vaa_subpart where parentid in (select id from vaa where reftime is NULL)"
${PSQL} -U awips -d metadata -c "delete from vaa where reftime is NULL"
tables=$(psql -U awips -d metadata -tc "select table_name from information_schema.columns where column_name = 'reftime'")
echo "Updating record tables to disallow null times"

View file

@ -10,7 +10,7 @@ PSQL="/awips2/psql/bin/psql"
for table in satellite_creating_entities satellite_geostationary_positions satellite_physical_elements satellite_sector_ids satellite_sources satellite_units
do
echo Dropping table: $table
command="DROP TABLE $table"
command="DROP TABLE IF EXISTS $table"
if ${PSQL} -U ${DBUSER} -d ${DBNAME} -c "$command"
then
echo $table dropped successfully

View file

@ -19,6 +19,7 @@ function changeToReal {
}
msg="INFO: All columns changed successfully"
${PSQL} -U awips -d metadata -c "drop table if exists bufrmos"
for table in ${TABLES[*]}
do

View file

@ -3,6 +3,8 @@
PSQL="/awips2/psql/bin/psql"
${PSQL} -U awips -d metadata -c "delete from ccfp where id in (select a.id from ccfp a, ccfp b where a.id < b.id and a.reftime = b.reftime and a.producttype = b.producttype and a.boxlat = b.boxlat and a.boxlong = b.boxlong)"
# takes one arg: a table name
# drops the datauri constraint and column if they exist
function dropDatauri {
@ -34,7 +36,7 @@ function dropDatauriAndAddConstraint {
echo "INFO: Dropping ccfp dataURI columns."
dropDatauriAndAddConstraint ccfp ccfp_reftime_producttype_boxlat_boxlong_key "(reftime, producttype, boxlat, boxlong)"
${PSQL} -U awips -d metadata -c "DROP INDEX ccfp_reftimeindex;"
${PSQL} -U awips -d metadata -c "DROP INDEX IF EXISTS ccfp_reftimeindex;"
${PSQL} -U awips -d metadata -c "CREATE INDEX ccfp_reftimeindex ON ccfp USING btree (reftime);"
${PSQL} -U awips -d metadata -c "VACUUM FULL ANALYZE ccfp"

View file

@ -34,7 +34,7 @@ function dropDatauriAndAddConstraint {
echo "INFO: Dropping taf dataURI columns."
dropDatauriAndAddConstraint taf taf_reftime_stationid_corindicator_amdindicator_issuetimestring_key "(reftime, stationid, corindicator, amdindicator, issue_timestring)"
${PSQL} -U awips -d metadata -c "DROP INDEX taf_reftimeindex;"
${PSQL} -U awips -d metadata -c "DROP INDEX IF EXISTS taf_reftimeindex;"
${PSQL} -U awips -d metadata -c "CREATE INDEX taf_reftimeindex ON taf USING btree (reftime);"
${PSQL} -U awips -d metadata -c "VACUUM FULL ANALYZE taf"

View file

@ -5,6 +5,7 @@ PSQL="/awips2/psql/bin/psql"
echo "INFO: Updating satellite spatial table"
${PSQL} -U awips -d metadata -q -c "delete from satellite_spatial where gid not in (select distinct coverage_gid from satellite)"
${PSQL} -U awips -d metadata -q -c "ALTER TABLE satellite_spatial DROP CONSTRAINT IF EXISTS uk_fdpq7gpkgi3r3k76j83x7axb1"
${PSQL} -U awips -d metadata -c "ALTER TABLE satellite_spatial ADD CONSTRAINT uk_fdpq7gpkgi3r3k76j83x7axb1 UNIQUE (minx, miny, dx, dy, nx, ny, crswkt)"
${PSQL} -U awips -d metadata -c "CREATE SEQUENCE satspatial_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1;"

View file

@ -54,6 +54,8 @@
# 01/19/2015 #4014 dgilling Added ETSS.
# 02/24/2015 #16692 byin Added RTMA. Removed gfsLR and GWW233
# 03/19/2015 #4300 randerso Remove GUMa as it is obsolete (per Shannon White)
# 03/30/2015 #17288 bhunder Added Guam-RTMA to D2D models
# 03/31/2015 #17288 bhunder Added Weather Params for RTMA
# 04/08/2015 #4383 dgilling Define FireWX ISC configuration parameters.
#
########################################################################
@ -298,6 +300,10 @@ else:
WSpdUnc = ("WSpdUnc", SCALAR, "kts", "WSpd Anl Uncertainty", 12.0, 0.0, 0, NO)
WDirUnc = ("WDirUnc", SCALAR, "deg", "WDir Anl Uncertainty", 10.0, 0.0, 0, NO)
VisUnc = ("VisUnc", SCALAR, "SM", "Vsby Anl Uncertainty", 10.0, 0.0, 2, NO)
# DCS 17288
PressUnc = ("PressUnc", SCALAR, "Pa", "Press Anl Uncertainty", 110000.0, 0.0, 2, NO)
Pressure = ("Pressure", SCALAR, "Pa", "Pressure", 110000.0, 0.0, 2, NO)
WGustUnc = ("WGustUnc", SCALAR, "kts", "WGust Anl Uncertainty", 12.0, 0.0, 0, NO)
# NamDNG5 parms
QPF3 = ("QPF3", SCALAR, "in", "3HR QPF", 3.0, 0.0, 2, YES)
@ -1246,6 +1252,8 @@ elif SID == "GUM":
('nwpsCG1', 'nwpsCG1'),
('nwpsTrkngCG0', 'nwpsTrkngCG0'),
('GFS20-PAC', 'GFS20'),
# DCS #17288
('Guam-RTMA', 'RTMA'),
]
#CONUS sites
@ -2045,16 +2053,17 @@ TPCTCM_MODEL = [([HiWind], TC3)]
# RTMA database parameter groupings
#if SID in ALASKA_SITES: - not sure if this is right
# DCS17288
if SID in ALASKA_SITES or SID in ["HFO", "SJU"]:
RTMAPARMS = [([Temp,Td,RH,Wind,Vis],TC1),
RTMAPARMS = [([Temp,Td,RH,Wind,Vis,Pressure,WindGust],TC1),
([MinT],MinTTC), ([MaxT],MaxTTC),
([MinRH],MinRHTC), ([MaxRH],MaxRHTC),
([TUnc,TdUnc,WSpdUnc,WDirUnc,VisUnc],TC1)]
([TUnc,TdUnc,WSpdUnc,WDirUnc,VisUnc,PressUnc,WGustUnc],TC1)]
else:
RTMAPARMS = [([Temp,Td,RH,Wind,QPE,Sky,Vis],TC1),
RTMAPARMS = [([Temp,Td,RH,Wind,QPE,Sky,Vis,Pressure,WindGust],TC1),
([MinT],MinTTC), ([MaxT],MaxTTC),
([MinRH],MinRHTC), ([MaxRH],MaxRHTC),
([TUnc,TdUnc,WSpdUnc,WDirUnc,VisUnc],TC1)]
([TUnc,TdUnc,WSpdUnc,WDirUnc,VisUnc,PressUnc,WGustUnc],TC1)]
# NamDNG5 database parameter groupings
NamDNG5PARMS = [([Temp, Td, RH, Wind, Sky, WindGust, Vis], TC3),

View file

@ -172,4 +172,109 @@
<level>FHAG2</level>
</levels>
</gridParameterInfo>
</gridParamInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>p</short_name>
<long_name>pressure</long_name>
<units>Pa</units>
<udunits>pascal</udunits>
<uiname>atmP</uiname>
<valid_range>0.0</valid_range>
<valid_range>110000.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>perranl</short_name>
<long_name>pressure uncertainty</long_name>
<units>Pa</units>
<udunits>pascal</udunits>
<uiname>atmPerranlind</uiname>
<valid_range>0.0</valid_range>
<valid_range>110000.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>vis</short_name>
<long_name>visibility</long_name>
<units>m</units>
<udunits>meters</udunits>
<uiname>Vis</uiname>
<valid_range>0.0</valid_range>
<valid_range>100000.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>viserranl</short_name>
<long_name>visibility uncertainty</long_name>
<units>m</units>
<udunits>meters</udunits>
<uiname>Viserranlind</uiname>
<valid_range>0.0</valid_range>
<valid_range>100000.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>tcc</short_name>
<long_name>Total Cloud Covery</long_name>
<units>%</units>
<udunits>percent</udunits>
<uiname>toalCldCvr</uiname>
<valid_range>0.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>EA</levelsDesc>
<levels>
<level>EA</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>wgs</short_name>
<long_name>Wind Gust Speed</long_name>
<units>m/s</units>
<udunits>meter/sec</udunits>
<uiname>windGustspeed</uiname>
<valid_range>-150.0</valid_range>
<valid_range>150.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>FHAG 10</levelsDesc>
<levels>
<level>FHAG10</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>wgserranl</short_name>
<long_name>wind speed uncertainty</long_name>
<units>m/s</units>
<udunits>meter/sec</udunits>
<uiname>WGSerranlind</uiname>
<valid_range>-150.0</valid_range>
<valid_range>150.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>FHAG 10</levelsDesc>
<levels>
<level>FHAG10</level>
</levels>
</gridParameterInfo>
</gridParamInfo>

View file

@ -172,4 +172,110 @@
<level>FHAG2</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>p</short_name>
<long_name>pressure</long_name>
<units>Pa</units>
<udunits>pascal</udunits>
<uiname>atmP</uiname>
<valid_range>0.0</valid_range>
<valid_range>110000.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>perranl</short_name>
<long_name>pressure uncertainty</long_name>
<units>Pa</units>
<udunits>pascal</udunits>
<uiname>atmPerranlind</uiname>
<valid_range>0.0</valid_range>
<valid_range>110000.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>wgs</short_name>
<long_name>Wind Gust Speed</long_name>
<units>m/s</units>
<udunits>meter/sec</udunits>
<uiname>windGustSpeed</uiname>
<valid_range>-150.0</valid_range>
<valid_range>150.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>FHAG 10</levelsDesc>
<levels>
<level>FHAG10</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>wgserranl</short_name>
<long_name>wind speed uncertainty</long_name>
<units>m/s</units>
<udunits>meter/sec</udunits>
<uiname>WGSerranlind</uiname>
<valid_range>-150.0</valid_range>
<valid_range>150.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>FHAG 10</levelsDesc>
<levels>
<level>FHAG10</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>vis</short_name>
<long_name>visibility</long_name>
<units>m</units>
<udunits>meters</udunits>
<uiname>Vis</uiname>
<valid_range>0.0</valid_range>
<valid_range>100000.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>viserranl</short_name>
<long_name>visibility uncertainty</long_name>
<units>m</units>
<udunits>meters</udunits>
<uiname>Viserranlind</uiname>
<valid_range>0.0</valid_range>
<valid_range>100000.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
</gridParamInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>tcc</short_name>
<long_name>Total Cloud Cover</long_name>
<units>%</units>
<udunits>percent</udunits>
<uiname>totalCloudCover</uiname>
<valid_range>0.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>EA</levelsDesc>
<levels>
<level>EA</level>
</levels>
</gridParameterInfo>
</gridParamInfo>

View file

@ -201,5 +201,80 @@
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>tcc</short_name>
<long_name>Total Cloud Cover</long_name>
<units>%</units>
<udunits>percent</udunits>
<uiname>totalCloudCover</uiname>
<valid_range>0.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>EA</levelsDesc>
<levels>
<level>EA</level>
</levels>
</gridParameterInfo>
</gridParamInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>wgs</short_name>
<long_name>Wind Gust Speed</long_name>
<units>m/s</units>
<udunits>meter/sec</udunits>
<uiname>windGustSpeed</uiname>
<valid_range>-150.0</valid_range>
<valid_range>150.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>FHAG 10</levelsDesc>
<levels>
<level>FHAG10</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>wgserranl</short_name>
<long_name>wind speed uncertainty</long_name>
<units>m/s</units>
<udunits>meter/sec</udunits>
<uiname>WGSerranlind</uiname>
<valid_range>-150.0</valid_range>
<valid_range>150.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>FHAG 10</levelsDesc>
<levels>
<level>FHAG10</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>p</short_name>
<long_name>pressure</long_name>
<units>mPa</units>
<udunits>pascal</udunits>
<uiname>atmP</uiname>
<valid_range>0.0</valid_range>
<valid_range>110000.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>perranl</short_name>
<long_name>pressure uncertainty</long_name>
<units>Pa</units>
<udunits>pascal</udunits>
<uiname>atmPerranlind</uiname>
<valid_range>0.0</valid_range>
<valid_range>110000.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
</gridParamInfo>

View file

@ -278,4 +278,49 @@
</levels>
<n3D>1</n3D>
</gridParameterInfo>
</gridParamInfo>
<gridParameterInfo xsi:type="parameterInfo">
<short_name>p</short_name>
<long_name>pressure</long_name>
<units>Pa</units>
<udunits>pascal</udunits>
<uiname>atmP</uiname>
<valid_range>0.0</valid_range>
<valid_range>110000.0</valid_range>
<fillValue>-99999.0</fillValue>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
<n3D>1</n3D>
</gridParameterInfo>
<gridParameterInfo xsi:type="parameterInfo">
<short_name>viserranl</short_name>
<long_name>visibility uncertainty</long_name>
<units>m</units>
<udunits>meters</udunits>
<uiname>Viserranlind</uiname>
<valid_range>0.0</valid_range>
<valid_range>100000.0</valid_range>
<fillValue>-99999.0</fillValue>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
<n3D>1</n3D>
</gridParameterInfo>
<gridParameterInfo xsi:type="parameterInfo">
<short_name>perranl</short_name>
<long_name>pressure uncertainty</long_name>
<units>Pa</units>
<udunits>pascal</udunits>
<uiname>atmPerranlind</uiname>
<valid_range>0.0</valid_range>
<valid_range>110000.0</valid_range>
<fillValue>-99999.0</fillValue>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
<n3D>1</n3D>
</gridParameterInfo>
</gridParamInfo>

View file

@ -35,6 +35,10 @@ class RTMAForecaster(Forecaster):
direc=wind_FHAG10[1]
newmag=self.convertMsecToKts(mag)
return (newmag,direc)
def calcWindGust(self, wgs_FHAG10):
newmag=self.convertMsecToKts(wgs_FHAG10)
return newmag
##--------------------------------------------------------------------------
## QPE - change mm to inches and clip greater than 1000mm
##--------------------------------------------------------------------------
@ -104,6 +108,11 @@ class RTMAForecaster(Forecaster):
def calcTdUnc(self,dpterranl_FHAG2):
return dpterranl_FHAG2 * 1.8
##--------------------------------------------------------------------------
## Pressure Analysis Uncertainty
##--------------------------------------------------------------------------
def calcPressUnc(self, perranl_SFC):
return perranl_SFC
##--------------------------------------------------------------------------
## Wind Analysis Uncertainty - change m/s to kts
##--------------------------------------------------------------------------
def calcWSpdUnc(self, wserranl_FHAG10):
@ -113,7 +122,9 @@ class RTMAForecaster(Forecaster):
def calcWDirUnc(self, wderranl_FHAG10):
return wderranl_FHAG10
def calcWGustUnc(self, wgserranl_FHAG10):
return wgserranl_FHAG10
##--------------------------------------------------------------------------
## Visibility
##--------------------------------------------------------------------------
@ -122,7 +133,12 @@ class RTMAForecaster(Forecaster):
def calcVisUnc(self, viserranl_SFC):
return self.convertMtoSM(viserranl_SFC)
##--------------------------------------------------------------------------
## Surface Pressure
##--------------------------------------------------------------------------
def calcPressure(self, p_SFC):
return p_SFC
##-------------------------------------------------------------------------
## TdAft and TdMrn - simply calculate from MaxT/MinRH and MinT/MaxRH
##-------------------------------------------------------------------------

View file

@ -0,0 +1,11 @@
<?xml version='1.0' encoding='UTF-8'?>
<subGridDef>
<modelNames>URMA25</modelNames>
<referenceGrid>184</referenceGrid>
<nx>500</nx>
<ny>500</ny>
<!--
<centerLatitude>36.5</centerLatitude>
<centerLongitude>-81</centerLongitude>
-->
</subGridDef>

View file

@ -0,0 +1 @@
200:200:Entire Atmosphere::EATM:EA

View file

@ -188,16 +188,10 @@ public class MhsMessage {
private String validTimeString;
/**
* Absolute time that the sender will wait for an acknowledgment before
* reporting a delivery error. This parameter is optional.
* Relative amount of time that the sender will wait for an acknowledgment
* before reporting a delivery error. This parameter is optional.
*/
private Date timeoutTime;
/**
* Timeout time parameter formatted as a string (mm/dd/yyyy:HHMM). This
* value is derived from {@link #timeoutTime} during message submission.
*/
private String timeoutTimeString;
private long timeoutTime; // DR-17251 - changed from Date to long
/**
* Mailbox user name. This is used for switching messaging gateways and
@ -272,14 +266,14 @@ public class MhsMessage {
String traceString = System.getenv(EnvMhsTrace);
showTrace = (traceString != null)
&& ((traceString.equalsIgnoreCase("yes")
|| traceString.equalsIgnoreCase("true")));
&& ((traceString.equalsIgnoreCase("yes") || traceString
.equalsIgnoreCase("true")));
actionCode = code;
setRetryCount(0);
addressees = new AddresseeList();
enclosures = new EnclosureList();
timeoutTime = null;
timeoutTime = 0; // DR-17251 - Changed from null to 0
validTime = null;
bodyFile = "";
productId = "";
@ -722,8 +716,7 @@ public class MhsMessage {
* @see #addAckAddressee(String)
*/
public void setTimeoutTime(long timeoutSeconds) {
this.timeoutTime = new Date(System.currentTimeMillis() + timeoutSeconds
* 1000);
this.timeoutTime = timeoutSeconds; // DR-17251
}
/**
@ -738,7 +731,8 @@ public class MhsMessage {
* @see #addAckAddressee(String)
*/
public void setTimeoutTime(Date timeoutTime) {
this.timeoutTime = timeoutTime;
this.timeoutTime = (timeoutTime.getTime() - (new Date().getTime())) / 1000; // DR-17251
}
/**
@ -750,7 +744,11 @@ public class MhsMessage {
* {@link #MaxTimeoutSeconds} in the future.
*/
public Date getTimeoutTime() {
return timeoutTime;
if (this.timeoutTime == 0) { // DR-17251
return null;
} else {
return new Date((this.timeoutTime * 1000) + (new Date().getTime())); // DR-17251
}
}
/**
@ -956,11 +954,11 @@ public class MhsMessage {
private boolean isTimeoutTimeValid() {
boolean status = true;
if (timeoutTime != null) {
if (timeoutTime.before(new Date())) {
if (timeoutTime != 0) { // DR-17251
if (timeoutTime < 0) { // DR-17251
status = false;
resultText = "Time out time must be in the future";
} else if ((timeoutTime.getTime() - (new Date().getTime())) > (MaxTimeoutSeconds * 1000)) {
} else if (timeoutTime > MaxTimeoutSeconds) { // DR-17251
status = false;
resultText = "Time out time must be within "
+ MaxTimeoutSeconds + " seconds of now";
@ -969,8 +967,7 @@ public class MhsMessage {
return status;
}
private static boolean checkVars(String envdir, String envfrag,
boolean fatal) {
private static boolean checkVars(String envdir, String envfrag, boolean fatal) {
String filename;
File dwbFile;
final String TEMPLATE = "/env.";
@ -1083,17 +1080,14 @@ public class MhsMessage {
} else {
validTimeString = "";
}
if (timeoutTime != null) {
timeoutTimeString = dateFormat.format(timeoutTime);
} else {
timeoutTimeString = "";
}
SimpleDateFormat timeStampFormat = new SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss.SSS");
String timeStamp = timeStampFormat.format(System.currentTimeMillis());
System.out.println(timeStamp + ": Message submitted");
// Submit the message by constructing a command line and
// execing a new msg_send process
LinkedList<String> command = new LinkedList<String>();
command.add("msg_send");
@ -1144,8 +1138,8 @@ public class MhsMessage {
command.add("-e" + encList);
}
if (!timeoutTimeString.isEmpty()) {
command.add("-T" + timeoutTimeString);
if (timeoutTime > 0) {
command.add("-T +" + timeoutTime); // DR-17251 - use relative time instead of absolute
}
if (!validTimeString.isEmpty()) {
@ -1210,8 +1204,9 @@ public class MhsMessage {
}
if (showTrace) {
System.out.println("Message successfully submitted. Message ID: "
+ messageId);
System.out
.println("Message successfully submitted. Message ID: "
+ messageId);
}
} catch (Throwable t) {
resultText = t.getMessage();

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
This_software_product_contains_export-restricted_data_whose
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
an_export_license_or_other_authorization.
Contractor_Name:________Raytheon_Company
Contractor_Address:_____6825_Pine_Street,_Suite_340
________________________Mail_Stop_B8
________________________Omaha,_NE_68106
________________________402.291.0100
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<DerivedParameter unit="%" name="Cloud Cover Analysis Uncertainty" abbreviation="CCPerranl" xmlns:ns2="group">
<Method name="Alias">
<Field abbreviation="TCCerranl"/>
</Method>
</DerivedParameter>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
This_software_product_contains_export-restricted_data_whose
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
an_export_license_or_other_authorization.
Contractor_Name:________Raytheon_Company
Contractor_Address:_____6825_Pine_Street,_Suite_340
________________________Mail_Stop_B8
________________________Omaha,_NE_68106
________________________402.291.0100
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<DerivedParameter abbreviation="Perranl" name="Pressure Analysis Uncertainty" unit="Pa"/>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
This_software_product_contains_export-restricted_data_whose
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
an_export_license_or_other_authorization.
Contractor_Name:________Raytheon_Company
Contractor_Address:_____6825_Pine_Street,_Suite_340
________________________Mail_Stop_B8
________________________Omaha,_NE_68106
________________________402.291.0100
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<DerivedParameter abbreviation="Viserranl" name="Visibility Analysis Uncertainty" unit="m"/>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
This_software_product_contains_export-restricted_data_whose
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
an_export_license_or_other_authorization.
Contractor_Name:________Raytheon_Company
Contractor_Address:_____6825_Pine_Street,_Suite_340
________________________Mail_Stop_B8
________________________Omaha,_NE_68106
________________________402.291.0100
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<DerivedParameter abbreviation="WGSea" name="Wind Gust Speed Analysis Uncertainty" unit="m/s">
<Method name="Alias" levels="Surface">
<Field abbreviation="WGSerranl" level="10FHAG"/>
</Method>
</DerivedParameter>

View file

@ -661,7 +661,8 @@ kts|1.944| 0.0 | 4 | | |..|8000F0FF| | 0 | 1
-->
<styleRule>
<paramLevelMatches>
<parameter>wSpea</parameter>
<parameter>wSpea</parameter>
<parameter>WGSea</parameter>
</paramLevelMatches>
<contourStyle>
<displayUnits>kts</displayUnits>
@ -976,6 +977,14 @@ g/Kg/12hr|-43200| 0.0 | 4 | | | |8000F0FF|x| 8 | 1 2 5 10 20 50 100 200
</contourLabeling>
</contourStyle>
</styleRule>
<styleRule>
<paramLevelMatches>
<parameter>Perranl</parameter>
</paramLevelMatches>
<contourStyle>
<displayUnits>mb</displayUnits>
</contourStyle>
</styleRule>
<!--
* CPrD
mb | 1 | 0.0 | 4 | | |..|8000F0FF|x| 8 | 10 20 30 50 100 200 300 500
@ -1425,6 +1434,16 @@ mi | 0.0006207 | 0 | 4 | | |..|8000F0FF| | 9 | .25 .5 1 2 3 5 10 20 50
</contourLabeling>
</contourStyle>
</styleRule>
<styleRule>
<paramLevelMatches>
<parameter>Viserranl</parameter>
<singleLevel units="SURFACE" />
</paramLevelMatches>
<contourStyle>
<displayUnits>mi</displayUnits>
<displayFlags>NoPlane</displayFlags>
</contourStyle>
</styleRule>
<!-- * CloudTop, EchoTop, ConvCloudTop, CloudBase, CloudCeiling, GH, zAGL
hft | 0.0328084 | 0 | 4 | | |..|8000F0FF| | 0 | 50
-->

View file

@ -870,6 +870,7 @@
<styleRule>
<paramLevelMatches>
<parameter>wSpea</parameter>
<parameter>WGSea</parameter>
</paramLevelMatches>
<imageStyle>
<displayUnits>kts</displayUnits>
@ -1711,6 +1712,7 @@
<paramLevelMatches>
<parameter>CPr</parameter>
<parameter>P</parameter>
<parameter>Perranl</parameter>
</paramLevelMatches>
<imageStyle>
<displayUnits>mb</displayUnits>
@ -2000,6 +2002,7 @@
<styleRule>
<paramLevelMatches>
<parameter>Vis</parameter>
<parameter>Viserranl</parameter>
<singleLevel units="SURFACE" />
</paramLevelMatches>
<imageStyle>

View file

@ -389,6 +389,11 @@
<abbreviation>TCC</abbreviation>
<unit>%</unit>
</parameter>
<parameter>
<name>Total Cloud Cover Error Analysis</name>
<abbreviation>TCCerranl</abbreviation>
<unit>%</unit>
</parameter>
<parameter>
<name>Temperature Anomaly</name>
<abbreviation>Ta</abbreviation>

View file

@ -30,8 +30,8 @@
* May 14, 2014 2881 rferrel Change retention times and data set modifications.
* Aug 25, 2014 3537 rferrel Fixed dirPattern in Category Local.
* Jan 22, 2015 3793 rferrel Converted tags minRetentionHours to defaultRetentionHours
* Feb 02, 2015 4066 rferrel Added lightning to Observation category.
* and extRetentionHours to selectedDetentionHours.
* Feb 02, 2015 4066 rferrel Added lightning to Observation category.
*
* @author rferrel
* @version 1.0

View file

@ -521,7 +521,12 @@
<keyValue>RTMA25</keyValue>
<versionsToKeep>24</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
</rule>
<rule>
<keyValue>URMA25</keyValue>
<versionsToKeep>24</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for AK-RTMA-3KM analysis -->
<rule>
<keyValue>AK-RTMA3</keyValue>

View file

@ -30,6 +30,10 @@
# sites.
#
##
# Mar 23, 2015 #4308 dgilling Export mixedCaseProductIds.txt.
#
##
if [ ${#AWIPS_HOME} = 0 ]

View file

@ -44,6 +44,10 @@
<istrue value="${client.build}"/>
</condition>
<condition property="deploy.hti" value="yes">
<isfalse value="${client.build}"/>
</condition>
<condition property="deploy.svcBackup" value="yes">
<and>
<isfalse value="${client.build}"/>
@ -94,13 +98,12 @@
</copy>
</target>
<target name="-deploy.hti"
<target name="-deploy.hti" if="deploy.hti"
description="Deploys HTI software to a specific directory">
<!-- copy the CLI tools to the deploy directory -->
<echo message="Copying in HTI files" />
<copy todir="${gfe.suite.hti}" overwrite="true">
<fileset dir="${basedir}/hti"/>
<filterset refid="installer.filter.set"/>
</copy>
</target>

View file

@ -1 +0,0 @@
20b5c776c07af2d058fb0519831fb743fc1c159c

View file

@ -1,560 +0,0 @@
/*
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
#ifndef CLASSFILE_CONSTANTS_H
#define CLASSFILE_CONSTANTS_H
#ifdef __cplusplus
extern "C" {
#endif
/* Classfile version number for this information */
#define JVM_CLASSFILE_MAJOR_VERSION 51
#define JVM_CLASSFILE_MINOR_VERSION 0
/* Flags */
enum {
JVM_ACC_PUBLIC = 0x0001,
JVM_ACC_PRIVATE = 0x0002,
JVM_ACC_PROTECTED = 0x0004,
JVM_ACC_STATIC = 0x0008,
JVM_ACC_FINAL = 0x0010,
JVM_ACC_SYNCHRONIZED = 0x0020,
JVM_ACC_SUPER = 0x0020,
JVM_ACC_VOLATILE = 0x0040,
JVM_ACC_BRIDGE = 0x0040,
JVM_ACC_TRANSIENT = 0x0080,
JVM_ACC_VARARGS = 0x0080,
JVM_ACC_NATIVE = 0x0100,
JVM_ACC_INTERFACE = 0x0200,
JVM_ACC_ABSTRACT = 0x0400,
JVM_ACC_STRICT = 0x0800,
JVM_ACC_SYNTHETIC = 0x1000,
JVM_ACC_ANNOTATION = 0x2000,
JVM_ACC_ENUM = 0x4000
};
/* Used in newarray instruction. */
enum {
JVM_T_BOOLEAN = 4,
JVM_T_CHAR = 5,
JVM_T_FLOAT = 6,
JVM_T_DOUBLE = 7,
JVM_T_BYTE = 8,
JVM_T_SHORT = 9,
JVM_T_INT = 10,
JVM_T_LONG = 11
};
/* Constant Pool Entries */
enum {
JVM_CONSTANT_Utf8 = 1,
JVM_CONSTANT_Unicode = 2, /* unused */
JVM_CONSTANT_Integer = 3,
JVM_CONSTANT_Float = 4,
JVM_CONSTANT_Long = 5,
JVM_CONSTANT_Double = 6,
JVM_CONSTANT_Class = 7,
JVM_CONSTANT_String = 8,
JVM_CONSTANT_Fieldref = 9,
JVM_CONSTANT_Methodref = 10,
JVM_CONSTANT_InterfaceMethodref = 11,
JVM_CONSTANT_NameAndType = 12,
JVM_CONSTANT_MethodHandle = 15, // JSR 292
JVM_CONSTANT_MethodType = 16, // JSR 292
JVM_CONSTANT_InvokeDynamic = 18
};
/* JVM_CONSTANT_MethodHandle subtypes */
enum {
JVM_REF_getField = 1,
JVM_REF_getStatic = 2,
JVM_REF_putField = 3,
JVM_REF_putStatic = 4,
JVM_REF_invokeVirtual = 5,
JVM_REF_invokeStatic = 6,
JVM_REF_invokeSpecial = 7,
JVM_REF_newInvokeSpecial = 8,
JVM_REF_invokeInterface = 9
};
/* StackMapTable type item numbers */
enum {
JVM_ITEM_Top = 0,
JVM_ITEM_Integer = 1,
JVM_ITEM_Float = 2,
JVM_ITEM_Double = 3,
JVM_ITEM_Long = 4,
JVM_ITEM_Null = 5,
JVM_ITEM_UninitializedThis = 6,
JVM_ITEM_Object = 7,
JVM_ITEM_Uninitialized = 8
};
/* Type signatures */
enum {
JVM_SIGNATURE_ARRAY = '[',
JVM_SIGNATURE_BYTE = 'B',
JVM_SIGNATURE_CHAR = 'C',
JVM_SIGNATURE_CLASS = 'L',
JVM_SIGNATURE_ENDCLASS = ';',
JVM_SIGNATURE_ENUM = 'E',
JVM_SIGNATURE_FLOAT = 'F',
JVM_SIGNATURE_DOUBLE = 'D',
JVM_SIGNATURE_FUNC = '(',
JVM_SIGNATURE_ENDFUNC = ')',
JVM_SIGNATURE_INT = 'I',
JVM_SIGNATURE_LONG = 'J',
JVM_SIGNATURE_SHORT = 'S',
JVM_SIGNATURE_VOID = 'V',
JVM_SIGNATURE_BOOLEAN = 'Z'
};
/* Opcodes */
enum {
JVM_OPC_nop = 0,
JVM_OPC_aconst_null = 1,
JVM_OPC_iconst_m1 = 2,
JVM_OPC_iconst_0 = 3,
JVM_OPC_iconst_1 = 4,
JVM_OPC_iconst_2 = 5,
JVM_OPC_iconst_3 = 6,
JVM_OPC_iconst_4 = 7,
JVM_OPC_iconst_5 = 8,
JVM_OPC_lconst_0 = 9,
JVM_OPC_lconst_1 = 10,
JVM_OPC_fconst_0 = 11,
JVM_OPC_fconst_1 = 12,
JVM_OPC_fconst_2 = 13,
JVM_OPC_dconst_0 = 14,
JVM_OPC_dconst_1 = 15,
JVM_OPC_bipush = 16,
JVM_OPC_sipush = 17,
JVM_OPC_ldc = 18,
JVM_OPC_ldc_w = 19,
JVM_OPC_ldc2_w = 20,
JVM_OPC_iload = 21,
JVM_OPC_lload = 22,
JVM_OPC_fload = 23,
JVM_OPC_dload = 24,
JVM_OPC_aload = 25,
JVM_OPC_iload_0 = 26,
JVM_OPC_iload_1 = 27,
JVM_OPC_iload_2 = 28,
JVM_OPC_iload_3 = 29,
JVM_OPC_lload_0 = 30,
JVM_OPC_lload_1 = 31,
JVM_OPC_lload_2 = 32,
JVM_OPC_lload_3 = 33,
JVM_OPC_fload_0 = 34,
JVM_OPC_fload_1 = 35,
JVM_OPC_fload_2 = 36,
JVM_OPC_fload_3 = 37,
JVM_OPC_dload_0 = 38,
JVM_OPC_dload_1 = 39,
JVM_OPC_dload_2 = 40,
JVM_OPC_dload_3 = 41,
JVM_OPC_aload_0 = 42,
JVM_OPC_aload_1 = 43,
JVM_OPC_aload_2 = 44,
JVM_OPC_aload_3 = 45,
JVM_OPC_iaload = 46,
JVM_OPC_laload = 47,
JVM_OPC_faload = 48,
JVM_OPC_daload = 49,
JVM_OPC_aaload = 50,
JVM_OPC_baload = 51,
JVM_OPC_caload = 52,
JVM_OPC_saload = 53,
JVM_OPC_istore = 54,
JVM_OPC_lstore = 55,
JVM_OPC_fstore = 56,
JVM_OPC_dstore = 57,
JVM_OPC_astore = 58,
JVM_OPC_istore_0 = 59,
JVM_OPC_istore_1 = 60,
JVM_OPC_istore_2 = 61,
JVM_OPC_istore_3 = 62,
JVM_OPC_lstore_0 = 63,
JVM_OPC_lstore_1 = 64,
JVM_OPC_lstore_2 = 65,
JVM_OPC_lstore_3 = 66,
JVM_OPC_fstore_0 = 67,
JVM_OPC_fstore_1 = 68,
JVM_OPC_fstore_2 = 69,
JVM_OPC_fstore_3 = 70,
JVM_OPC_dstore_0 = 71,
JVM_OPC_dstore_1 = 72,
JVM_OPC_dstore_2 = 73,
JVM_OPC_dstore_3 = 74,
JVM_OPC_astore_0 = 75,
JVM_OPC_astore_1 = 76,
JVM_OPC_astore_2 = 77,
JVM_OPC_astore_3 = 78,
JVM_OPC_iastore = 79,
JVM_OPC_lastore = 80,
JVM_OPC_fastore = 81,
JVM_OPC_dastore = 82,
JVM_OPC_aastore = 83,
JVM_OPC_bastore = 84,
JVM_OPC_castore = 85,
JVM_OPC_sastore = 86,
JVM_OPC_pop = 87,
JVM_OPC_pop2 = 88,
JVM_OPC_dup = 89,
JVM_OPC_dup_x1 = 90,
JVM_OPC_dup_x2 = 91,
JVM_OPC_dup2 = 92,
JVM_OPC_dup2_x1 = 93,
JVM_OPC_dup2_x2 = 94,
JVM_OPC_swap = 95,
JVM_OPC_iadd = 96,
JVM_OPC_ladd = 97,
JVM_OPC_fadd = 98,
JVM_OPC_dadd = 99,
JVM_OPC_isub = 100,
JVM_OPC_lsub = 101,
JVM_OPC_fsub = 102,
JVM_OPC_dsub = 103,
JVM_OPC_imul = 104,
JVM_OPC_lmul = 105,
JVM_OPC_fmul = 106,
JVM_OPC_dmul = 107,
JVM_OPC_idiv = 108,
JVM_OPC_ldiv = 109,
JVM_OPC_fdiv = 110,
JVM_OPC_ddiv = 111,
JVM_OPC_irem = 112,
JVM_OPC_lrem = 113,
JVM_OPC_frem = 114,
JVM_OPC_drem = 115,
JVM_OPC_ineg = 116,
JVM_OPC_lneg = 117,
JVM_OPC_fneg = 118,
JVM_OPC_dneg = 119,
JVM_OPC_ishl = 120,
JVM_OPC_lshl = 121,
JVM_OPC_ishr = 122,
JVM_OPC_lshr = 123,
JVM_OPC_iushr = 124,
JVM_OPC_lushr = 125,
JVM_OPC_iand = 126,
JVM_OPC_land = 127,
JVM_OPC_ior = 128,
JVM_OPC_lor = 129,
JVM_OPC_ixor = 130,
JVM_OPC_lxor = 131,
JVM_OPC_iinc = 132,
JVM_OPC_i2l = 133,
JVM_OPC_i2f = 134,
JVM_OPC_i2d = 135,
JVM_OPC_l2i = 136,
JVM_OPC_l2f = 137,
JVM_OPC_l2d = 138,
JVM_OPC_f2i = 139,
JVM_OPC_f2l = 140,
JVM_OPC_f2d = 141,
JVM_OPC_d2i = 142,
JVM_OPC_d2l = 143,
JVM_OPC_d2f = 144,
JVM_OPC_i2b = 145,
JVM_OPC_i2c = 146,
JVM_OPC_i2s = 147,
JVM_OPC_lcmp = 148,
JVM_OPC_fcmpl = 149,
JVM_OPC_fcmpg = 150,
JVM_OPC_dcmpl = 151,
JVM_OPC_dcmpg = 152,
JVM_OPC_ifeq = 153,
JVM_OPC_ifne = 154,
JVM_OPC_iflt = 155,
JVM_OPC_ifge = 156,
JVM_OPC_ifgt = 157,
JVM_OPC_ifle = 158,
JVM_OPC_if_icmpeq = 159,
JVM_OPC_if_icmpne = 160,
JVM_OPC_if_icmplt = 161,
JVM_OPC_if_icmpge = 162,
JVM_OPC_if_icmpgt = 163,
JVM_OPC_if_icmple = 164,
JVM_OPC_if_acmpeq = 165,
JVM_OPC_if_acmpne = 166,
JVM_OPC_goto = 167,
JVM_OPC_jsr = 168,
JVM_OPC_ret = 169,
JVM_OPC_tableswitch = 170,
JVM_OPC_lookupswitch = 171,
JVM_OPC_ireturn = 172,
JVM_OPC_lreturn = 173,
JVM_OPC_freturn = 174,
JVM_OPC_dreturn = 175,
JVM_OPC_areturn = 176,
JVM_OPC_return = 177,
JVM_OPC_getstatic = 178,
JVM_OPC_putstatic = 179,
JVM_OPC_getfield = 180,
JVM_OPC_putfield = 181,
JVM_OPC_invokevirtual = 182,
JVM_OPC_invokespecial = 183,
JVM_OPC_invokestatic = 184,
JVM_OPC_invokeinterface = 185,
JVM_OPC_invokedynamic = 186,
JVM_OPC_new = 187,
JVM_OPC_newarray = 188,
JVM_OPC_anewarray = 189,
JVM_OPC_arraylength = 190,
JVM_OPC_athrow = 191,
JVM_OPC_checkcast = 192,
JVM_OPC_instanceof = 193,
JVM_OPC_monitorenter = 194,
JVM_OPC_monitorexit = 195,
JVM_OPC_wide = 196,
JVM_OPC_multianewarray = 197,
JVM_OPC_ifnull = 198,
JVM_OPC_ifnonnull = 199,
JVM_OPC_goto_w = 200,
JVM_OPC_jsr_w = 201,
JVM_OPC_MAX = 201
};
/* Opcode length initializer, use with something like:
* unsigned char opcode_length[JVM_OPC_MAX+1] = JVM_OPCODE_LENGTH_INITIALIZER;
*/
#define JVM_OPCODE_LENGTH_INITIALIZER { \
1, /* nop */ \
1, /* aconst_null */ \
1, /* iconst_m1 */ \
1, /* iconst_0 */ \
1, /* iconst_1 */ \
1, /* iconst_2 */ \
1, /* iconst_3 */ \
1, /* iconst_4 */ \
1, /* iconst_5 */ \
1, /* lconst_0 */ \
1, /* lconst_1 */ \
1, /* fconst_0 */ \
1, /* fconst_1 */ \
1, /* fconst_2 */ \
1, /* dconst_0 */ \
1, /* dconst_1 */ \
2, /* bipush */ \
3, /* sipush */ \
2, /* ldc */ \
3, /* ldc_w */ \
3, /* ldc2_w */ \
2, /* iload */ \
2, /* lload */ \
2, /* fload */ \
2, /* dload */ \
2, /* aload */ \
1, /* iload_0 */ \
1, /* iload_1 */ \
1, /* iload_2 */ \
1, /* iload_3 */ \
1, /* lload_0 */ \
1, /* lload_1 */ \
1, /* lload_2 */ \
1, /* lload_3 */ \
1, /* fload_0 */ \
1, /* fload_1 */ \
1, /* fload_2 */ \
1, /* fload_3 */ \
1, /* dload_0 */ \
1, /* dload_1 */ \
1, /* dload_2 */ \
1, /* dload_3 */ \
1, /* aload_0 */ \
1, /* aload_1 */ \
1, /* aload_2 */ \
1, /* aload_3 */ \
1, /* iaload */ \
1, /* laload */ \
1, /* faload */ \
1, /* daload */ \
1, /* aaload */ \
1, /* baload */ \
1, /* caload */ \
1, /* saload */ \
2, /* istore */ \
2, /* lstore */ \
2, /* fstore */ \
2, /* dstore */ \
2, /* astore */ \
1, /* istore_0 */ \
1, /* istore_1 */ \
1, /* istore_2 */ \
1, /* istore_3 */ \
1, /* lstore_0 */ \
1, /* lstore_1 */ \
1, /* lstore_2 */ \
1, /* lstore_3 */ \
1, /* fstore_0 */ \
1, /* fstore_1 */ \
1, /* fstore_2 */ \
1, /* fstore_3 */ \
1, /* dstore_0 */ \
1, /* dstore_1 */ \
1, /* dstore_2 */ \
1, /* dstore_3 */ \
1, /* astore_0 */ \
1, /* astore_1 */ \
1, /* astore_2 */ \
1, /* astore_3 */ \
1, /* iastore */ \
1, /* lastore */ \
1, /* fastore */ \
1, /* dastore */ \
1, /* aastore */ \
1, /* bastore */ \
1, /* castore */ \
1, /* sastore */ \
1, /* pop */ \
1, /* pop2 */ \
1, /* dup */ \
1, /* dup_x1 */ \
1, /* dup_x2 */ \
1, /* dup2 */ \
1, /* dup2_x1 */ \
1, /* dup2_x2 */ \
1, /* swap */ \
1, /* iadd */ \
1, /* ladd */ \
1, /* fadd */ \
1, /* dadd */ \
1, /* isub */ \
1, /* lsub */ \
1, /* fsub */ \
1, /* dsub */ \
1, /* imul */ \
1, /* lmul */ \
1, /* fmul */ \
1, /* dmul */ \
1, /* idiv */ \
1, /* ldiv */ \
1, /* fdiv */ \
1, /* ddiv */ \
1, /* irem */ \
1, /* lrem */ \
1, /* frem */ \
1, /* drem */ \
1, /* ineg */ \
1, /* lneg */ \
1, /* fneg */ \
1, /* dneg */ \
1, /* ishl */ \
1, /* lshl */ \
1, /* ishr */ \
1, /* lshr */ \
1, /* iushr */ \
1, /* lushr */ \
1, /* iand */ \
1, /* land */ \
1, /* ior */ \
1, /* lor */ \
1, /* ixor */ \
1, /* lxor */ \
3, /* iinc */ \
1, /* i2l */ \
1, /* i2f */ \
1, /* i2d */ \
1, /* l2i */ \
1, /* l2f */ \
1, /* l2d */ \
1, /* f2i */ \
1, /* f2l */ \
1, /* f2d */ \
1, /* d2i */ \
1, /* d2l */ \
1, /* d2f */ \
1, /* i2b */ \
1, /* i2c */ \
1, /* i2s */ \
1, /* lcmp */ \
1, /* fcmpl */ \
1, /* fcmpg */ \
1, /* dcmpl */ \
1, /* dcmpg */ \
3, /* ifeq */ \
3, /* ifne */ \
3, /* iflt */ \
3, /* ifge */ \
3, /* ifgt */ \
3, /* ifle */ \
3, /* if_icmpeq */ \
3, /* if_icmpne */ \
3, /* if_icmplt */ \
3, /* if_icmpge */ \
3, /* if_icmpgt */ \
3, /* if_icmple */ \
3, /* if_acmpeq */ \
3, /* if_acmpne */ \
3, /* goto */ \
3, /* jsr */ \
2, /* ret */ \
99, /* tableswitch */ \
99, /* lookupswitch */ \
1, /* ireturn */ \
1, /* lreturn */ \
1, /* freturn */ \
1, /* dreturn */ \
1, /* areturn */ \
1, /* return */ \
3, /* getstatic */ \
3, /* putstatic */ \
3, /* getfield */ \
3, /* putfield */ \
3, /* invokevirtual */ \
3, /* invokespecial */ \
3, /* invokestatic */ \
5, /* invokeinterface */ \
5, /* invokedynamic */ \
3, /* new */ \
2, /* newarray */ \
3, /* anewarray */ \
1, /* arraylength */ \
1, /* athrow */ \
3, /* checkcast */ \
3, /* instanceof */ \
1, /* monitorenter */ \
1, /* monitorexit */ \
0, /* wide */ \
4, /* multianewarray */ \
3, /* ifnull */ \
3, /* ifnonnull */ \
5, /* goto_w */ \
5 /* jsr_w */ \
}
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* CLASSFILE_CONSTANTS */

View file

@ -1,299 +0,0 @@
/*
* Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
#ifndef _JAVASOFT_JAWT_H_
#define _JAVASOFT_JAWT_H_
#include "jni.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* AWT native interface (new in JDK 1.3)
*
* The AWT native interface allows a native C or C++ application a means
* by which to access native structures in AWT. This is to facilitate moving
* legacy C and C++ applications to Java and to target the needs of the
* community who, at present, wish to do their own native rendering to canvases
* for performance reasons. Standard extensions such as Java3D also require a
* means to access the underlying native data structures of AWT.
*
* There may be future extensions to this API depending on demand.
*
* A VM does not have to implement this API in order to pass the JCK.
* It is recommended, however, that this API is implemented on VMs that support
* standard extensions, such as Java3D.
*
* Since this is a native API, any program which uses it cannot be considered
* 100% pure java.
*/
/*
* AWT Native Drawing Surface (JAWT_DrawingSurface).
*
* For each platform, there is a native drawing surface structure. This
* platform-specific structure can be found in jawt_md.h. It is recommended
* that additional platforms follow the same model. It is also recommended
* that VMs on Win32 and Solaris support the existing structures in jawt_md.h.
*
*******************
* EXAMPLE OF USAGE:
*******************
*
* In Win32, a programmer wishes to access the HWND of a canvas to perform
* native rendering into it. The programmer has declared the paint() method
* for their canvas subclass to be native:
*
*
* MyCanvas.java:
*
* import java.awt.*;
*
* public class MyCanvas extends Canvas {
*
* static {
* System.loadLibrary("mylib");
* }
*
* public native void paint(Graphics g);
* }
*
*
* myfile.c:
*
* #include "jawt_md.h"
* #include <assert.h>
*
* JNIEXPORT void JNICALL
* Java_MyCanvas_paint(JNIEnv* env, jobject canvas, jobject graphics)
* {
* JAWT awt;
* JAWT_DrawingSurface* ds;
* JAWT_DrawingSurfaceInfo* dsi;
* JAWT_Win32DrawingSurfaceInfo* dsi_win;
* jboolean result;
* jint lock;
*
* // Get the AWT
* awt.version = JAWT_VERSION_1_3;
* result = JAWT_GetAWT(env, &awt);
* assert(result != JNI_FALSE);
*
* // Get the drawing surface
* ds = awt.GetDrawingSurface(env, canvas);
* assert(ds != NULL);
*
* // Lock the drawing surface
* lock = ds->Lock(ds);
* assert((lock & JAWT_LOCK_ERROR) == 0);
*
* // Get the drawing surface info
* dsi = ds->GetDrawingSurfaceInfo(ds);
*
* // Get the platform-specific drawing info
* dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
*
* //////////////////////////////
* // !!! DO PAINTING HERE !!! //
* //////////////////////////////
*
* // Free the drawing surface info
* ds->FreeDrawingSurfaceInfo(dsi);
*
* // Unlock the drawing surface
* ds->Unlock(ds);
*
* // Free the drawing surface
* awt.FreeDrawingSurface(ds);
* }
*
*/
/*
* JAWT_Rectangle
* Structure for a native rectangle.
*/
typedef struct jawt_Rectangle {
jint x;
jint y;
jint width;
jint height;
} JAWT_Rectangle;
struct jawt_DrawingSurface;
/*
* JAWT_DrawingSurfaceInfo
* Structure for containing the underlying drawing information of a component.
*/
typedef struct jawt_DrawingSurfaceInfo {
/*
* Pointer to the platform-specific information. This can be safely
* cast to a JAWT_Win32DrawingSurfaceInfo on Windows or a
* JAWT_X11DrawingSurfaceInfo on Solaris. On Mac OS X, when using the
* native Cocoa toolkit this is a pointer to a NSObject that conforms
* to the JAWT_SurfaceLayers protocol. See jawt_md.h for details.
*/
void* platformInfo;
/* Cached pointer to the underlying drawing surface */
struct jawt_DrawingSurface* ds;
/* Bounding rectangle of the drawing surface */
JAWT_Rectangle bounds;
/* Number of rectangles in the clip */
jint clipSize;
/* Clip rectangle array */
JAWT_Rectangle* clip;
} JAWT_DrawingSurfaceInfo;
#define JAWT_LOCK_ERROR 0x00000001
#define JAWT_LOCK_CLIP_CHANGED 0x00000002
#define JAWT_LOCK_BOUNDS_CHANGED 0x00000004
#define JAWT_LOCK_SURFACE_CHANGED 0x00000008
/*
* JAWT_DrawingSurface
* Structure for containing the underlying drawing information of a component.
* All operations on a JAWT_DrawingSurface MUST be performed from the same
* thread as the call to GetDrawingSurface.
*/
typedef struct jawt_DrawingSurface {
/*
* Cached reference to the Java environment of the calling thread.
* If Lock(), Unlock(), GetDrawingSurfaceInfo() or
* FreeDrawingSurfaceInfo() are called from a different thread,
* this data member should be set before calling those functions.
*/
JNIEnv* env;
/* Cached reference to the target object */
jobject target;
/*
* Lock the surface of the target component for native rendering.
* When finished drawing, the surface must be unlocked with
* Unlock(). This function returns a bitmask with one or more of the
* following values:
*
* JAWT_LOCK_ERROR - When an error has occurred and the surface could not
* be locked.
*
* JAWT_LOCK_CLIP_CHANGED - When the clip region has changed.
*
* JAWT_LOCK_BOUNDS_CHANGED - When the bounds of the surface have changed.
*
* JAWT_LOCK_SURFACE_CHANGED - When the surface itself has changed
*/
jint (JNICALL *Lock)
(struct jawt_DrawingSurface* ds);
/*
* Get the drawing surface info.
* The value returned may be cached, but the values may change if
* additional calls to Lock() or Unlock() are made.
* Lock() must be called before this can return a valid value.
* Returns NULL if an error has occurred.
* When finished with the returned value, FreeDrawingSurfaceInfo must be
* called.
*/
JAWT_DrawingSurfaceInfo* (JNICALL *GetDrawingSurfaceInfo)
(struct jawt_DrawingSurface* ds);
/*
* Free the drawing surface info.
*/
void (JNICALL *FreeDrawingSurfaceInfo)
(JAWT_DrawingSurfaceInfo* dsi);
/*
* Unlock the drawing surface of the target component for native rendering.
*/
void (JNICALL *Unlock)
(struct jawt_DrawingSurface* ds);
} JAWT_DrawingSurface;
/*
* JAWT
* Structure for containing native AWT functions.
*/
typedef struct jawt {
/*
* Version of this structure. This must always be set before
* calling JAWT_GetAWT()
*/
jint version;
/*
* Return a drawing surface from a target jobject. This value
* may be cached.
* Returns NULL if an error has occurred.
* Target must be a java.awt.Component (should be a Canvas
* or Window for native rendering).
* FreeDrawingSurface() must be called when finished with the
* returned JAWT_DrawingSurface.
*/
JAWT_DrawingSurface* (JNICALL *GetDrawingSurface)
(JNIEnv* env, jobject target);
/*
* Free the drawing surface allocated in GetDrawingSurface.
*/
void (JNICALL *FreeDrawingSurface)
(JAWT_DrawingSurface* ds);
/*
* Since 1.4
* Locks the entire AWT for synchronization purposes
*/
void (JNICALL *Lock)(JNIEnv* env);
/*
* Since 1.4
* Unlocks the entire AWT for synchronization purposes
*/
void (JNICALL *Unlock)(JNIEnv* env);
/*
* Since 1.4
* Returns a reference to a java.awt.Component from a native
* platform handle. On Windows, this corresponds to an HWND;
* on Solaris and Linux, this is a Drawable. For other platforms,
* see the appropriate machine-dependent header file for a description.
* The reference returned by this function is a local
* reference that is only valid in this environment.
* This function returns a NULL reference if no component could be
* found with matching platform information.
*/
jobject (JNICALL *GetComponent)(JNIEnv* env, void* platformInfo);
} JAWT;
/*
* Get the AWT native structure. This function returns JNI_FALSE if
* an error occurs.
*/
_JNI_IMPORT_OR_EXPORT_
jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt);
#define JAWT_VERSION_1_3 0x00010003
#define JAWT_VERSION_1_4 0x00010004
#define JAWT_VERSION_1_7 0x00010007
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* !_JAVASOFT_JAWT_H_ */

View file

@ -1,254 +0,0 @@
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
/*
* Java Debug Wire Protocol Transport Service Provider Interface.
*/
#ifndef JDWPTRANSPORT_H
#define JDWPTRANSPORT_H
#include "jni.h"
enum {
JDWPTRANSPORT_VERSION_1_0 = 0x00010000
};
#ifdef __cplusplus
extern "C" {
#endif
struct jdwpTransportNativeInterface_;
struct _jdwpTransportEnv;
#ifdef __cplusplus
typedef _jdwpTransportEnv jdwpTransportEnv;
#else
typedef const struct jdwpTransportNativeInterface_ *jdwpTransportEnv;
#endif /* __cplusplus */
/*
* Errors. Universal errors with JVMTI/JVMDI equivalents keep the
* values the same.
*/
typedef enum {
JDWPTRANSPORT_ERROR_NONE = 0,
JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT = 103,
JDWPTRANSPORT_ERROR_OUT_OF_MEMORY = 110,
JDWPTRANSPORT_ERROR_INTERNAL = 113,
JDWPTRANSPORT_ERROR_ILLEGAL_STATE = 201,
JDWPTRANSPORT_ERROR_IO_ERROR = 202,
JDWPTRANSPORT_ERROR_TIMEOUT = 203,
JDWPTRANSPORT_ERROR_MSG_NOT_AVAILABLE = 204
} jdwpTransportError;
/*
* Structure to define capabilities
*/
typedef struct {
unsigned int can_timeout_attach :1;
unsigned int can_timeout_accept :1;
unsigned int can_timeout_handshake :1;
unsigned int reserved3 :1;
unsigned int reserved4 :1;
unsigned int reserved5 :1;
unsigned int reserved6 :1;
unsigned int reserved7 :1;
unsigned int reserved8 :1;
unsigned int reserved9 :1;
unsigned int reserved10 :1;
unsigned int reserved11 :1;
unsigned int reserved12 :1;
unsigned int reserved13 :1;
unsigned int reserved14 :1;
unsigned int reserved15 :1;
} JDWPTransportCapabilities;
/*
* Structures to define packet layout.
*
* See: http://java.sun.com/j2se/1.5/docs/guide/jpda/jdwp-spec.html
*/
enum {
JDWPTRANSPORT_FLAGS_NONE = 0x0,
JDWPTRANSPORT_FLAGS_REPLY = 0x80
};
typedef struct {
jint len;
jint id;
jbyte flags;
jbyte cmdSet;
jbyte cmd;
jbyte *data;
} jdwpCmdPacket;
typedef struct {
jint len;
jint id;
jbyte flags;
jshort errorCode;
jbyte *data;
} jdwpReplyPacket;
typedef struct {
union {
jdwpCmdPacket cmd;
jdwpReplyPacket reply;
} type;
} jdwpPacket;
/*
* JDWP functions called by the transport.
*/
typedef struct jdwpTransportCallback {
void *(*alloc)(jint numBytes); /* Call this for all allocations */
void (*free)(void *buffer); /* Call this for all deallocations */
} jdwpTransportCallback;
typedef jint (JNICALL *jdwpTransport_OnLoad_t)(JavaVM *jvm,
jdwpTransportCallback *callback,
jint version,
jdwpTransportEnv** env);
/* Function Interface */
struct jdwpTransportNativeInterface_ {
/* 1 : RESERVED */
void *reserved1;
/* 2 : Get Capabilities */
jdwpTransportError (JNICALL *GetCapabilities)(jdwpTransportEnv* env,
JDWPTransportCapabilities *capabilities_ptr);
/* 3 : Attach */
jdwpTransportError (JNICALL *Attach)(jdwpTransportEnv* env,
const char* address,
jlong attach_timeout,
jlong handshake_timeout);
/* 4: StartListening */
jdwpTransportError (JNICALL *StartListening)(jdwpTransportEnv* env,
const char* address,
char** actual_address);
/* 5: StopListening */
jdwpTransportError (JNICALL *StopListening)(jdwpTransportEnv* env);
/* 6: Accept */
jdwpTransportError (JNICALL *Accept)(jdwpTransportEnv* env,
jlong accept_timeout,
jlong handshake_timeout);
/* 7: IsOpen */
jboolean (JNICALL *IsOpen)(jdwpTransportEnv* env);
/* 8: Close */
jdwpTransportError (JNICALL *Close)(jdwpTransportEnv* env);
/* 9: ReadPacket */
jdwpTransportError (JNICALL *ReadPacket)(jdwpTransportEnv* env,
jdwpPacket *pkt);
/* 10: Write Packet */
jdwpTransportError (JNICALL *WritePacket)(jdwpTransportEnv* env,
const jdwpPacket* pkt);
/* 11: GetLastError */
jdwpTransportError (JNICALL *GetLastError)(jdwpTransportEnv* env,
char** error);
};
/*
* Use inlined functions so that C++ code can use syntax such as
* env->Attach("mymachine:5000", 10*1000, 0);
*
* rather than using C's :-
*
* (*env)->Attach(env, "mymachine:5000", 10*1000, 0);
*/
struct _jdwpTransportEnv {
const struct jdwpTransportNativeInterface_ *functions;
#ifdef __cplusplus
jdwpTransportError GetCapabilities(JDWPTransportCapabilities *capabilities_ptr) {
return functions->GetCapabilities(this, capabilities_ptr);
}
jdwpTransportError Attach(const char* address, jlong attach_timeout,
jlong handshake_timeout) {
return functions->Attach(this, address, attach_timeout, handshake_timeout);
}
jdwpTransportError StartListening(const char* address,
char** actual_address) {
return functions->StartListening(this, address, actual_address);
}
jdwpTransportError StopListening(void) {
return functions->StopListening(this);
}
jdwpTransportError Accept(jlong accept_timeout, jlong handshake_timeout) {
return functions->Accept(this, accept_timeout, handshake_timeout);
}
jboolean IsOpen(void) {
return functions->IsOpen(this);
}
jdwpTransportError Close(void) {
return functions->Close(this);
}
jdwpTransportError ReadPacket(jdwpPacket *pkt) {
return functions->ReadPacket(this, pkt);
}
jdwpTransportError WritePacket(const jdwpPacket* pkt) {
return functions->WritePacket(this, pkt);
}
jdwpTransportError GetLastError(char** error) {
return functions->GetLastError(this, error);
}
#endif /* __cplusplus */
};
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* JDWPTRANSPORT_H */

File diff suppressed because it is too large Load diff

View file

@ -1,115 +0,0 @@
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
/*
* This header file defines the data structures sent by the VM
* through the JVMTI CompiledMethodLoad callback function via the
* "void * compile_info" parameter. The memory pointed to by the
* compile_info parameter may not be referenced after returning from
* the CompiledMethodLoad callback. These are VM implementation
* specific data structures that may evolve in future releases. A
* JVMTI agent should interpret a non-NULL compile_info as a pointer
* to a region of memory containing a list of records. In a typical
* usage scenario, a JVMTI agent would cast each record to a
* jvmtiCompiledMethodLoadRecordHeader, a struct that represents
* arbitrary information. This struct contains a kind field to indicate
* the kind of information being passed, and a pointer to the next
* record. If the kind field indicates inlining information, then the
* agent would cast the record to a jvmtiCompiledMethodLoadInlineRecord.
* This record contains an array of PCStackInfo structs, which indicate
* for every pc address what are the methods on the invocation stack.
* The "methods" and "bcis" fields in each PCStackInfo struct specify a
* 1-1 mapping between these inlined methods and their bytecode indices.
* This can be used to derive the proper source lines of the inlined
* methods.
*/
#ifndef _JVMTI_CMLR_H_
#define _JVMTI_CMLR_H_
enum {
JVMTI_CMLR_MAJOR_VERSION_1 = 0x00000001,
JVMTI_CMLR_MINOR_VERSION_0 = 0x00000000,
JVMTI_CMLR_MAJOR_VERSION = 0x00000001,
JVMTI_CMLR_MINOR_VERSION = 0x00000000
/*
* This comment is for the "JDK import from HotSpot" sanity check:
* version: 1.0.0
*/
};
typedef enum {
JVMTI_CMLR_DUMMY = 1,
JVMTI_CMLR_INLINE_INFO = 2
} jvmtiCMLRKind;
/*
* Record that represents arbitrary information passed through JVMTI
* CompiledMethodLoadEvent void pointer.
*/
typedef struct _jvmtiCompiledMethodLoadRecordHeader {
jvmtiCMLRKind kind; /* id for the kind of info passed in the record */
jint majorinfoversion; /* major and minor info version values. Init'ed */
jint minorinfoversion; /* to current version value in jvmtiExport.cpp. */
struct _jvmtiCompiledMethodLoadRecordHeader* next;
} jvmtiCompiledMethodLoadRecordHeader;
/*
* Record that gives information about the methods on the compile-time
* stack at a specific pc address of a compiled method. Each element in
* the methods array maps to same element in the bcis array.
*/
typedef struct _PCStackInfo {
void* pc; /* the pc address for this compiled method */
jint numstackframes; /* number of methods on the stack */
jmethodID* methods; /* array of numstackframes method ids */
jint* bcis; /* array of numstackframes bytecode indices */
} PCStackInfo;
/*
* Record that contains inlining information for each pc address of
* an nmethod.
*/
typedef struct _jvmtiCompiledMethodLoadInlineRecord {
jvmtiCompiledMethodLoadRecordHeader header; /* common header for casting */
jint numpcs; /* number of pc descriptors in this nmethod */
PCStackInfo* pcinfo; /* array of numpcs pc descriptors */
} jvmtiCompiledMethodLoadInlineRecord;
/*
* Dummy record used to test that we can pass records with different
* information through the void pointer provided that they can be cast
* to a jvmtiCompiledMethodLoadRecordHeader.
*/
typedef struct _jvmtiCompiledMethodLoadDummyRecord {
jvmtiCompiledMethodLoadRecordHeader header; /* common header for casting */
char message[50];
} jvmtiCompiledMethodLoadDummyRecord;
#endif

View file

@ -1,61 +0,0 @@
/*
* Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
#ifndef _JAVASOFT_JAWT_MD_H_
#define _JAVASOFT_JAWT_MD_H_
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Intrinsic.h>
#include "jawt.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* X11-specific declarations for AWT native interface.
* See notes in jawt.h for an example of use.
*/
typedef struct jawt_X11DrawingSurfaceInfo {
Drawable drawable;
Display* display;
VisualID visualID;
Colormap colormapID;
int depth;
/*
* Since 1.4
* Returns a pixel value from a set of RGB values.
* This is useful for paletted color (256 color) modes.
*/
int (JNICALL *GetAWTColor)(JAWT_DrawingSurface* ds,
int r, int g, int b);
} JAWT_X11DrawingSurfaceInfo;
#ifdef __cplusplus
}
#endif
#endif /* !_JAVASOFT_JAWT_MD_H_ */

View file

@ -1,42 +0,0 @@
/*
* Copyright (c) 1996, 2000, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
#ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_
#define JNIEXPORT
#define JNIIMPORT
#define JNICALL
typedef int jint;
#ifdef _LP64 /* 64-bit Solaris */
typedef long jlong;
#else
typedef long long jlong;
#endif
typedef signed char jbyte;
#endif /* !_JAVASOFT_JNI_MD_H_ */

View file

@ -1 +1 @@
1402c774e35bd8303eb5f7e05baba4d4b732a8c4
f237beba56129d4e7bb029a55ff2679abb214a8d

View file

@ -1 +1 @@
1402c774e35bd8303eb5f7e05baba4d4b732a8c4
f237beba56129d4e7bb029a55ff2679abb214a8d

View file

@ -1,4 +0,0 @@
cd ../build.native/i386-pc-linux-gnu/lib; if [ $? != 0 ]; then exit 0; fi
rm -f ./libgfortran.so.1
cd ..; rmdir lib
exit 0

View file

@ -1,283 +0,0 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure --prefix=/home/bhundermark/OB15.1.1/AWIPS2_baseline/nativeLib/rary.cots.jepp/
## --------- ##
## Platform. ##
## --------- ##
hostname = dante
uname -m = x86_64
uname -r = 2.6.32-358.el6.x86_64
uname -s = Linux
uname -v = #1 SMP Tue Jan 29 11:47:41 EST 2013
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /home/bhundermark/awips2/ADE-14.4/python/bin
PATH: /home/bhundermark/awips2/ADE-14.4/apache-ant-1.7.0/bin
PATH: /home/bhundermark/awips2/ADE-14.4/java/bin
PATH: /usr/lib64/qt-3.3/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/local/sbin
PATH: /usr/sbin
PATH: /sbin
PATH: /home/bhundermark/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1538: checking for a BSD-compatible install
configure:1593: result: /usr/bin/install -c
configure:1604: checking whether build environment is sane
configure:1647: result: yes
configure:1712: checking for gawk
configure:1728: found /usr/bin/gawk
configure:1738: result: gawk
configure:1748: checking whether make sets $(MAKE)
configure:1768: result: yes
configure:1951: checking build system type
configure:1969: result: x86_64-unknown-linux-gnu
configure:1977: checking host system type
configure:1991: result: x86_64-unknown-linux-gnu
configure:2048: checking for a BSD-compatible install
configure:2103: result: /usr/bin/install -c
configure:2160: checking for gcc
configure:2176: found /usr/bin/gcc
configure:2186: result: gcc
configure:2430: checking for C compiler version
configure:2433: gcc --version </dev/null >&5
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
Copyright (C) 2010 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.
configure:2436: $? = 0
configure:2438: gcc -v </dev/null >&5
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
configure:2441: $? = 0
configure:2443: gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:2446: $? = 1
configure:2469: checking for C compiler default output file name
configure:2472: gcc -m32 -O3 -I/awips2/python/lib/python2.7/site-packages/numpy/core/include conftest.c >&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:2475: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "jep"
| #define VERSION "2.3"
| #define USE_DEALLOC 1
| #define USE_MAPPED_EXCEPTIONS 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2514: error: C compiler cannot create executables
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_build_alias=x86_64-unknown-linux-gnu
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-m32 -O3'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=-I/awips2/python/lib/python2.7/site-packages/numpy/core/include
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-unknown-linux-gnu
ac_cv_host_alias=x86_64-unknown-linux-gnu
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /home/bhundermark/OB15.1.1/AWIPS2_baseline/nativeLib/rary.cots.jepp/jepp-2.3/missing --run aclocal-1.9'
ALLOCA=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /home/bhundermark/OB15.1.1/AWIPS2_baseline/nativeLib/rary.cots.jepp/jepp-2.3/missing --run tar'
AR=''
AUTOCONF='${SHELL} /home/bhundermark/OB15.1.1/AWIPS2_baseline/nativeLib/rary.cots.jepp/jepp-2.3/missing --run autoconf'
AUTOHEADER='${SHELL} /home/bhundermark/OB15.1.1/AWIPS2_baseline/nativeLib/rary.cots.jepp/jepp-2.3/missing --run autoheader'
AUTOMAKE='${SHELL} /home/bhundermark/OB15.1.1/AWIPS2_baseline/nativeLib/rary.cots.jepp/jepp-2.3/missing --run automake-1.9'
AWK='gawk'
CC='gcc'
CCDEPMODE=''
CFLAGS='-m32 -O3'
CPP=''
CPPFLAGS='-I/awips2/python/lib/python2.7/site-packages/numpy/core/include'
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
F77=''
FFLAGS=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
ISODATE='2015-02-26'
JAVAC=''
JAVAH=''
JAVAX_SCRIPT_CLASSES=''
JAVA_LDFLAGS=''
JAVA_LIBS=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/bhundermark/OB15.1.1/AWIPS2_baseline/nativeLib/rary.cots.jepp/jepp-2.3/missing --run makeinfo'
OBJEXT=''
PACKAGE='jep'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PYTHON=''
RANLIB=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='2.3'
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_F77=''
ac_ct_RANLIB=''
ac_ct_STRIP=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${prefix}/share'
exec_prefix='NONE'
host='x86_64-unknown-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'
includedir='${prefix}/include'
infodir='${prefix}/info'
install_sh='/home/bhundermark/OB15.1.1/AWIPS2_baseline/nativeLib/rary.cots.jepp/jepp-2.3/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
mkdir_p='mkdir -p --'
oldincludedir='/usr/include'
prefix='/home/bhundermark/OB15.1.1/AWIPS2_baseline/nativeLib/rary.cots.jepp/'
program_transform_name='s,x,x,'
python_configdir=''
python_execprefix=''
python_includespec=''
python_libspec=''
python_moduledir=''
python_moduleexecdir=''
python_prefix=''
python_version=''
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE "jep"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define USE_DEALLOC 1
#define USE_MAPPED_EXCEPTIONS 1
#define VERSION "2.3"
configure: exit 77

View file

@ -1,34 +0,0 @@
# Global excludes across all subdirectories
*.o
*.so
*.so.[0-9]
*.so.[0-9].[0-9]
*.sl
*.sl.[0-9]
*.sl.[0-9].[0-9]
*.dylib
*.dll
*.a
*.mo
objfiles.txt
.deps/
*.gcno
*.gcda
*.gcov
*.gcov.out
lcov.info
*.vcproj
*.vcxproj
win32ver.rc
*.exe
lib*dll.def
lib*.pc
# Local excludes in root directory
/GNUmakefile
/config.log
/config.status
/pgsql.sln
/pgsql.sln.cache
/Debug/
/Release/

View file

@ -1,23 +0,0 @@
PostgreSQL Database Management System
(formerly known as Postgres, then as Postgres95)
Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
Portions Copyright (c) 1994, The Regents of the University of California
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written agreement
is hereby granted, provided that the above copyright notice and this
paragraph and the following two paragraphs appear in all copies.
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

View file

@ -1,132 +0,0 @@
#
# PostgreSQL top level makefile
#
# GNUmakefile.in
#
subdir =
top_builddir = .
include $(top_builddir)/src/Makefile.global
$(call recurse,all install,src config)
all:
+@echo "All of PostgreSQL successfully made. Ready to install."
docs:
$(MAKE) -C doc all
$(call recurse,world,doc src config contrib,all)
world:
+@echo "PostgreSQL, contrib, and documentation successfully made. Ready to install."
# build src/ before contrib/
world-contrib-recurse: world-src-recurse
html man:
$(MAKE) -C doc $@
install:
+@echo "PostgreSQL installation complete."
install-docs:
$(MAKE) -C doc install
$(call recurse,install-world,doc src config contrib,install)
install-world:
+@echo "PostgreSQL, contrib, and documentation installation complete."
# build src/ before contrib/
install-world-contrib-recurse: install-world-src-recurse
$(call recurse,installdirs uninstall coverage init-po update-po,doc src config)
$(call recurse,distprep,doc src config contrib)
# clean, distclean, etc should apply to contrib too, even though
# it's not built by default
$(call recurse,clean,doc contrib src config)
clean:
# Garbage from autoconf:
@rm -rf autom4te.cache/
# Important: distclean `src' last, otherwise Makefile.global
# will be gone too soon.
distclean maintainer-clean:
$(MAKE) -C doc $@
$(MAKE) -C contrib $@
$(MAKE) -C config $@
$(MAKE) -C src $@
rm -f config.cache config.log config.status GNUmakefile
# Garbage from autoconf:
@rm -rf autom4te.cache/
check: all
check installcheck installcheck-parallel:
$(MAKE) -C src/test/regress $@
$(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib,check)
$(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib,installcheck)
$(call recurse,maintainer-check,doc src config contrib)
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
./config.status $@
##########################################################################
distdir = postgresql-$(VERSION)
dummy = =install=
garbage = =* "#"* ."#"* *~* *.orig *.rej core postgresql-*
dist: $(distdir).tar.gz $(distdir).tar.bz2
rm -rf $(distdir)
$(distdir).tar: distdir
$(TAR) chf $@ $(distdir)
.INTERMEDIATE: $(distdir).tar
distdir-location:
@echo $(distdir)
distdir:
rm -rf $(distdir)* $(dummy)
for x in `cd $(top_srcdir) && find . \( -name CVS -prune \) -o \( -name .git -prune \) -o -print`; do \
file=`expr X$$x : 'X\./\(.*\)'`; \
if test -d "$(top_srcdir)/$$file" ; then \
mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
else \
ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
|| cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
fi || exit; \
done
$(MAKE) -C $(distdir) distprep
$(MAKE) -C $(distdir)/doc/src/sgml/ INSTALL
cp $(distdir)/doc/src/sgml/INSTALL $(distdir)/
$(MAKE) -C $(distdir) distclean
rm -f $(distdir)/README.git
distcheck: dist
rm -rf $(dummy)
mkdir $(dummy)
$(GZIP) -d -c $(distdir).tar.gz | $(TAR) xf -
install_prefix=`cd $(dummy) && pwd`; \
cd $(distdir) \
&& ./configure --prefix="$$install_prefix"
$(MAKE) -C $(distdir) -q distprep
$(MAKE) -C $(distdir)
$(MAKE) -C $(distdir) install
$(MAKE) -C $(distdir) uninstall
@echo "checking whether \`$(MAKE) uninstall' works"
test `find $(dummy) ! -type d | wc -l` -eq 0
$(MAKE) -C $(distdir) dist
# Room for improvement: Check here whether this distribution tarball
# is sufficiently similar to the original one.
rm -rf $(distdir) $(dummy)
@echo "Distribution integrity checks out."
.PHONY: dist distdir distcheck docs install-docs world check-world install-world installcheck-world

View file

@ -1,5 +0,0 @@
Release notes for all versions of PostgreSQL can be found on-line at
http://www.postgresql.org/docs/current/static/release.html
Distribution file sets include release notes for their version and preceding
versions. Visit the file doc/src/sgml/html/release.html in an HTML browser.

File diff suppressed because it is too large Load diff

View file

@ -1,36 +0,0 @@
# The PostgreSQL make files exploit features of GNU make that other
# makes do not have. Because it is a common mistake for users to try
# to build Postgres with a different make, we have this make file
# that, as a service, will look for a GNU make and invoke it, or show
# an error message if none could be found.
# If the user were using GNU make now, this file would not get used
# because GNU make uses a make file named "GNUmakefile" in preference
# to "Makefile" if it exists. PostgreSQL is shipped with a
# "GNUmakefile". If the user hasn't run the configure script yet, the
# GNUmakefile won't exist yet, so we catch that case as well.
all check install installdirs installcheck installcheck-parallel uninstall clean distclean maintainer-clean dist distcheck world check-world install-world installcheck-world:
@if [ ! -f GNUmakefile ] ; then \
echo "You need to run the 'configure' program first. See the file"; \
echo "'INSTALL' for installation instructions." ; \
false ; \
fi
@IFS=':' ; \
for dir in $$PATH; do \
for prog in gmake gnumake make; do \
if [ -f $$dir/$$prog ] && ( $$dir/$$prog -f /dev/null --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then \
GMAKE=$$dir/$$prog; \
break 2; \
fi; \
done; \
done; \
\
if [ x"$${GMAKE+set}" = xset ]; then \
echo "Using GNU make found at $${GMAKE}"; \
$${GMAKE} $@ ; \
else \
echo "You must use GNU make to build PostgreSQL." ; \
false; \
fi

View file

@ -1,27 +0,0 @@
PostgreSQL Database Management System
=====================================
This directory contains the source code distribution of the PostgreSQL
database management system.
PostgreSQL is an advanced object-relational database management system
that supports an extended subset of the SQL standard, including
transactions, foreign keys, subqueries, triggers, user-defined types
and functions. This distribution also contains C language bindings.
PostgreSQL has many language interfaces, many of which are listed here:
http://www.postgresql.org/download
See the file INSTALL for instructions on how to build and install
PostgreSQL. That file also lists supported operating systems and
hardware platforms and contains information regarding any other
software packages that are required to build or run the PostgreSQL
system. Copyright and license information can be found in the
file COPYRIGHT. A comprehensive documentation set is included in this
distribution; it can be read as described in the installation
instructions.
The latest version of this software may be obtained at
http://www.postgresql.org/download/. For more information look at our
web site located at http://www.postgresql.org/.

View file

@ -1,12 +0,0 @@
dnl aclocal.m4
m4_include([config/ac_func_accept_argtypes.m4])
m4_include([config/acx_pthread.m4])
m4_include([config/c-compiler.m4])
m4_include([config/c-library.m4])
m4_include([config/docbook.m4])
m4_include([config/general.m4])
m4_include([config/libtool.m4])
m4_include([config/perl.m4])
m4_include([config/programs.m4])
m4_include([config/python.m4])
m4_include([config/tcl.m4])

View file

@ -1,15 +0,0 @@
# config/Makefile
subdir = config
top_builddir = ..
include $(top_builddir)/src/Makefile.global
install: all installdirs
$(INSTALL_SCRIPT) $(srcdir)/install-sh '$(DESTDIR)$(pgxsdir)/config/install-sh'
installdirs:
$(MKDIR_P) '$(DESTDIR)$(pgxsdir)/config'
uninstall:
rm -f '$(DESTDIR)$(pgxsdir)/config/install-sh'

View file

@ -1,85 +0,0 @@
# config/ac_func_accept_argtypes.m4
# This comes from the official Autoconf macro archive at
# <http://research.cys.de/autoconf-archive/>
dnl @synopsis AC_FUNC_ACCEPT_ARGTYPES
dnl
dnl Checks the data types of the three arguments to accept(). Results are
dnl placed into the symbols ACCEPT_TYPE_RETURN and ACCEPT_TYPE_ARG[123],
dnl consistent with the following example:
dnl
dnl #define ACCEPT_TYPE_RETURN int
dnl #define ACCEPT_TYPE_ARG1 int
dnl #define ACCEPT_TYPE_ARG2 struct sockaddr *
dnl #define ACCEPT_TYPE_ARG3 socklen_t
dnl
dnl This macro requires AC_CHECK_HEADERS to have already verified the
dnl presence or absence of sys/types.h and sys/socket.h.
dnl
dnl NOTE: This is just a modified version of the AC_FUNC_SELECT_ARGTYPES
dnl macro. Credit for that one goes to David MacKenzie et. al.
dnl
dnl @version $Id: ac_func_accept_argtypes.m4,v 1.1 1999/12/03 11:29:29 simons Exp $
dnl @author Daniel Richard G. <skunk@mit.edu>
dnl
# PostgreSQL local changes: In the original version ACCEPT_TYPE_ARG3
# is a pointer type. That's kind of useless because then you can't
# use the macro to define a corresponding variable. We also make the
# reasonable(?) assumption that you can use arg3 for getsocktype etc.
# as well (i.e., anywhere POSIX.2 has socklen_t).
#
# arg2 can also be `const' (e.g., RH 4.2). Change the order of tests
# for arg3 so that `int' is first, in case there is no prototype at all.
#
# Solaris 7 and 8 have arg3 as 'void *' (disguised as 'Psocklen_t'
# which is *not* 'socklen_t *'). If we detect that, then we assume
# 'int' as the result, because that ought to work best.
#
# On Win32, accept() returns 'unsigned int PASCAL'
# Win64 uses SOCKET for return and arg1
AC_DEFUN([AC_FUNC_ACCEPT_ARGTYPES],
[AC_MSG_CHECKING([types of arguments for accept()])
AC_CACHE_VAL(ac_cv_func_accept_return,dnl
[AC_CACHE_VAL(ac_cv_func_accept_arg1,dnl
[AC_CACHE_VAL(ac_cv_func_accept_arg2,dnl
[AC_CACHE_VAL(ac_cv_func_accept_arg3,dnl
[for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
AC_TRY_COMPILE(
[#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);],
[], [ac_not_found=no; break 4], [ac_not_found=yes])
done
done
done
done
if test "$ac_not_found" = yes; then
AC_MSG_ERROR([could not determine argument types])
fi
if test "$ac_cv_func_accept_arg3" = "void"; then
ac_cv_func_accept_arg3=int
fi
])dnl AC_CACHE_VAL
])dnl AC_CACHE_VAL
])dnl AC_CACHE_VAL
])dnl AC_CACHE_VAL
AC_MSG_RESULT([$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *])
AC_DEFINE_UNQUOTED(ACCEPT_TYPE_RETURN, $ac_cv_func_accept_return,
[Define to the return type of 'accept'])
AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG1, $ac_cv_func_accept_arg1,
[Define to the type of arg 1 of 'accept'])
AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG2, $ac_cv_func_accept_arg2,
[Define to the type of arg 2 of 'accept'])
AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG3, $ac_cv_func_accept_arg3,
[Define to the type of arg 3 of 'accept'])
])

View file

@ -1,228 +0,0 @@
dnl PGSGL: When updating, comment out port-specific part below;
dnl see the comment below with the word "PostgreSQL".
dnl
dnl Available from the GNU Autoconf Macro Archive at:
dnl http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html
dnl
AC_DEFUN([ACX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_LANG_SAVE
AC_LANG_C
acx_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on True64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
AC_MSG_RESULT($acx_pthread_ok)
if test x"$acx_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
fi
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all, and "pthread-config"
# which is a program returning the flags for the Pth emulation library.
acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
case "${host_cpu}-${host_os}" in
*solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthread or
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
;;
esac
if test x"$acx_pthread_ok" = xno; then
for flag in $acx_pthread_flags; do
tryPTHREAD_CFLAGS=""
tryPTHREAD_LIBS=""
case $flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $flag])
tryPTHREAD_CFLAGS="$flag"
;;
pthread-config)
# skip this if we already have flags defined, for PostgreSQL
if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
if test x"$acx_pthread_config" = xno; then continue; fi
tryPTHREAD_CFLAGS="`pthread-config --cflags`"
tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
tryPTHREAD_LIBS="-l$flag"
;;
esac
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_TRY_LINK([#include <pthread.h>],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[acx_pthread_ok=yes], [acx_pthread_ok=no])
if test "x$acx_pthread_ok" = xyes; then
# Don't use options that are ignored by the compiler.
# We find them by checking stderror.
cat >conftest.$ac_ext <<_ACEOF
int
main (int argc, char **argv)
{
(void) argc;
(void) argv;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
# Check both linking and compiling, because they might tolerate different options.
if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
# we continue with more flags because Linux needs -lpthread
# for libpq builds on PostgreSQL. The test above only
# tests for building binaries, not shared libraries.
PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
else acx_pthread_ok=no
fi
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($acx_pthread_ok)
done
fi
# Various other checks:
if test "x$acx_pthread_ok" = xyes; then
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: threads are created detached by default
# and the JOINABLE attribute has a nonstandard name (UNDETACHED).
AC_MSG_CHECKING([for joinable pthread attribute])
AC_TRY_LINK([#include <pthread.h>],
[int attr=PTHREAD_CREATE_JOINABLE;],
ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
if test x"$ok" = xunknown; then
AC_TRY_LINK([#include <pthread.h>],
[int attr=PTHREAD_CREATE_UNDETACHED;],
ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
fi
if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
[Define to the necessary symbol if this constant
uses a non-standard name on your system.])
fi
AC_MSG_RESULT(${ok})
if test x"$ok" = xunknown; then
AC_MSG_WARN([we do not know how to create joinable pthreads])
fi
AC_MSG_CHECKING([if more special flags are required for pthreads])
flag=no
# We always add these in PostgreSQL
# case "${host_cpu}-${host_os}" in
# *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
# *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
# esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# Supporting cc_r would require a special CC in all places that
# use libpq, and that is ugly, so we don't do it. Users can still
# define their compiler as cc_r to do thread builds of everything.
# More AIX lossage: must compile with cc_r
AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
else
PTHREAD_CC="$CC"
fi
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_CC)
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$acx_pthread_ok" = xyes; then
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
:
else
acx_pthread_ok=no
$2
fi
AC_LANG_RESTORE
])dnl ACX_PTHREAD

View file

@ -1,302 +0,0 @@
# Macros to detect C compiler features
# config/c-compiler.m4
# PGAC_C_SIGNED
# -------------
# Check if the C compiler understands signed types.
AC_DEFUN([PGAC_C_SIGNED],
[AC_CACHE_CHECK(for signed types, pgac_cv_c_signed,
[AC_TRY_COMPILE([],
[signed char c; signed short s; signed int i;],
[pgac_cv_c_signed=yes],
[pgac_cv_c_signed=no])])
if test x"$pgac_cv_c_signed" = xno ; then
AC_DEFINE(signed,, [Define to empty if the C compiler does not understand signed types.])
fi])# PGAC_C_SIGNED
# PGAC_C_INLINE
# -------------
# Check if the C compiler understands inline functions without being
# noisy about unused static inline functions. Some older compilers
# understand inline functions (as tested by AC_C_INLINE) but warn about
# them if they aren't used in a translation unit.
#
# This test used to just define an inline function, but some compilers
# (notably clang) got too smart and now warn about unused static
# inline functions when defined inside a .c file, but not when defined
# in an included header. Since the latter is what we want to use, test
# to see if the warning appears when the function is in a header file.
# Not pretty, but it works.
#
# Defines: inline, PG_USE_INLINE
AC_DEFUN([PGAC_C_INLINE],
[AC_C_INLINE
AC_CACHE_CHECK([for quiet inline (no complaint if unreferenced)], pgac_cv_c_inline_quietly,
[pgac_cv_c_inline_quietly=no
if test "$ac_cv_c_inline" != no; then
pgac_c_inline_save_werror=$ac_c_werror_flag
ac_c_werror_flag=yes
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include "$srcdir/config/test_quiet_include.h"],[])],
[pgac_cv_c_inline_quietly=yes])
ac_c_werror_flag=$pgac_c_inline_save_werror
fi])
if test "$pgac_cv_c_inline_quietly" != no; then
AC_DEFINE_UNQUOTED([PG_USE_INLINE], 1,
[Define to 1 if "static inline" works without unwanted warnings from ]
[compilations where static inline functions are defined but not called.])
fi
])# PGAC_C_INLINE
# PGAC_TYPE_64BIT_INT(TYPE)
# -------------------------
# Check if TYPE is a working 64 bit integer type. Set HAVE_TYPE_64 to
# yes or no respectively, and define HAVE_TYPE_64 if yes.
AC_DEFUN([PGAC_TYPE_64BIT_INT],
[define([Ac_define], [translit([have_$1_64], [a-z *], [A-Z_P])])dnl
define([Ac_cachevar], [translit([pgac_cv_type_$1_64], [ *], [_p])])dnl
AC_CACHE_CHECK([whether $1 is 64 bits], [Ac_cachevar],
[AC_TRY_RUN(
[typedef $1 ac_int64;
/*
* These are globals to discourage the compiler from folding all the
* arithmetic tests down to compile-time constants.
*/
ac_int64 a = 20000001;
ac_int64 b = 40000005;
int does_int64_work()
{
ac_int64 c,d;
if (sizeof(ac_int64) != 8)
return 0; /* definitely not the right size */
/* Do perfunctory checks to see if 64-bit arithmetic seems to work */
c = a * b;
d = (c + b) / b;
if (d != a+1)
return 0;
return 1;
}
main() {
exit(! does_int64_work());
}],
[Ac_cachevar=yes],
[Ac_cachevar=no],
[# If cross-compiling, check the size reported by the compiler and
# trust that the arithmetic works.
AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([], [sizeof($1) == 8])],
Ac_cachevar=yes,
Ac_cachevar=no)])])
Ac_define=$Ac_cachevar
if test x"$Ac_cachevar" = xyes ; then
AC_DEFINE(Ac_define, 1, [Define to 1 if `]$1[' works and is 64 bits.])
fi
undefine([Ac_define])dnl
undefine([Ac_cachevar])dnl
])# PGAC_TYPE_64BIT_INT
# PGAC_C_FUNCNAME_SUPPORT
# -----------------------
# Check if the C compiler understands __func__ (C99) or __FUNCTION__ (gcc).
# Define HAVE_FUNCNAME__FUNC or HAVE_FUNCNAME__FUNCTION accordingly.
AC_DEFUN([PGAC_C_FUNCNAME_SUPPORT],
[AC_CACHE_CHECK(for __func__, pgac_cv_funcname_func_support,
[AC_TRY_COMPILE([#include <stdio.h>],
[printf("%s\n", __func__);],
[pgac_cv_funcname_func_support=yes],
[pgac_cv_funcname_func_support=no])])
if test x"$pgac_cv_funcname_func_support" = xyes ; then
AC_DEFINE(HAVE_FUNCNAME__FUNC, 1,
[Define to 1 if your compiler understands __func__.])
else
AC_CACHE_CHECK(for __FUNCTION__, pgac_cv_funcname_function_support,
[AC_TRY_COMPILE([#include <stdio.h>],
[printf("%s\n", __FUNCTION__);],
[pgac_cv_funcname_function_support=yes],
[pgac_cv_funcname_function_support=no])])
if test x"$pgac_cv_funcname_function_support" = xyes ; then
AC_DEFINE(HAVE_FUNCNAME__FUNCTION, 1,
[Define to 1 if your compiler understands __FUNCTION__.])
fi
fi])# PGAC_C_FUNCNAME_SUPPORT
# PGAC_C_STATIC_ASSERT
# --------------------
# Check if the C compiler understands _Static_assert(),
# and define HAVE__STATIC_ASSERT if so.
#
# We actually check the syntax ({ _Static_assert(...) }), because we need
# gcc-style compound expressions to be able to wrap the thing into macros.
AC_DEFUN([PGAC_C_STATIC_ASSERT],
[AC_CACHE_CHECK(for _Static_assert, pgac_cv__static_assert,
[AC_TRY_LINK([],
[({ _Static_assert(1, "foo"); })],
[pgac_cv__static_assert=yes],
[pgac_cv__static_assert=no])])
if test x"$pgac_cv__static_assert" = xyes ; then
AC_DEFINE(HAVE__STATIC_ASSERT, 1,
[Define to 1 if your compiler understands _Static_assert.])
fi])# PGAC_C_STATIC_ASSERT
# PGAC_C_TYPES_COMPATIBLE
# -----------------------
# Check if the C compiler understands __builtin_types_compatible_p,
# and define HAVE__BUILTIN_TYPES_COMPATIBLE_P if so.
#
# We check usage with __typeof__, though it's unlikely any compiler would
# have the former and not the latter.
AC_DEFUN([PGAC_C_TYPES_COMPATIBLE],
[AC_CACHE_CHECK(for __builtin_types_compatible_p, pgac_cv__types_compatible,
[AC_TRY_COMPILE([],
[ int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)]; ],
[pgac_cv__types_compatible=yes],
[pgac_cv__types_compatible=no])])
if test x"$pgac_cv__types_compatible" = xyes ; then
AC_DEFINE(HAVE__BUILTIN_TYPES_COMPATIBLE_P, 1,
[Define to 1 if your compiler understands __builtin_types_compatible_p.])
fi])# PGAC_C_TYPES_COMPATIBLE
# PGAC_C_BUILTIN_CONSTANT_P
# -------------------------
# Check if the C compiler understands __builtin_constant_p(),
# and define HAVE__BUILTIN_CONSTANT_P if so.
AC_DEFUN([PGAC_C_BUILTIN_CONSTANT_P],
[AC_CACHE_CHECK(for __builtin_constant_p, pgac_cv__builtin_constant_p,
[AC_TRY_COMPILE([static int x; static int y[__builtin_constant_p(x) ? x : 1];],
[],
[pgac_cv__builtin_constant_p=yes],
[pgac_cv__builtin_constant_p=no])])
if test x"$pgac_cv__builtin_constant_p" = xyes ; then
AC_DEFINE(HAVE__BUILTIN_CONSTANT_P, 1,
[Define to 1 if your compiler understands __builtin_constant_p.])
fi])# PGAC_C_BUILTIN_CONSTANT_P
# PGAC_C_BUILTIN_UNREACHABLE
# --------------------------
# Check if the C compiler understands __builtin_unreachable(),
# and define HAVE__BUILTIN_UNREACHABLE if so.
#
# NB: Don't get the idea of putting a for(;;); or such before the
# __builtin_unreachable() call. Some compilers would remove it before linking
# and only a warning instead of an error would be produced.
AC_DEFUN([PGAC_C_BUILTIN_UNREACHABLE],
[AC_CACHE_CHECK(for __builtin_unreachable, pgac_cv__builtin_unreachable,
[AC_TRY_LINK([],
[__builtin_unreachable();],
[pgac_cv__builtin_unreachable=yes],
[pgac_cv__builtin_unreachable=no])])
if test x"$pgac_cv__builtin_unreachable" = xyes ; then
AC_DEFINE(HAVE__BUILTIN_UNREACHABLE, 1,
[Define to 1 if your compiler understands __builtin_unreachable.])
fi])# PGAC_C_BUILTIN_UNREACHABLE
# PGAC_C_VA_ARGS
# --------------
# Check if the C compiler understands C99-style variadic macros,
# and define HAVE__VA_ARGS if so.
AC_DEFUN([PGAC_C_VA_ARGS],
[AC_CACHE_CHECK(for __VA_ARGS__, pgac_cv__va_args,
[AC_TRY_COMPILE([#include <stdio.h>],
[#define debug(...) fprintf(stderr, __VA_ARGS__)
debug("%s", "blarg");
],
[pgac_cv__va_args=yes],
[pgac_cv__va_args=no])])
if test x"$pgac_cv__va_args" = xyes ; then
AC_DEFINE(HAVE__VA_ARGS, 1,
[Define to 1 if your compiler understands __VA_ARGS__ in macros.])
fi])# PGAC_C_VA_ARGS
# PGAC_PROG_CC_CFLAGS_OPT
# -----------------------
# Given a string, check if the compiler supports the string as a
# command-line option. If it does, add the string to CFLAGS.
AC_DEFUN([PGAC_PROG_CC_CFLAGS_OPT],
[define([Ac_cachevar], [AS_TR_SH([pgac_cv_prog_cc_cflags_$1])])dnl
AC_CACHE_CHECK([whether $CC supports $1], [Ac_cachevar],
[pgac_save_CFLAGS=$CFLAGS
CFLAGS="$pgac_save_CFLAGS $1"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
[Ac_cachevar=yes],
[Ac_cachevar=no])
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"])
if test x"$Ac_cachevar" = x"yes"; then
CFLAGS="$CFLAGS $1"
fi
undefine([Ac_cachevar])dnl
])# PGAC_PROG_CC_CFLAGS_OPT
# PGAC_PROG_CC_VAR_OPT
# -----------------------
# Given a variable name and a string, check if the compiler supports
# the string as a command-line option. If it does, add the string to
# the given variable.
AC_DEFUN([PGAC_PROG_CC_VAR_OPT],
[define([Ac_cachevar], [AS_TR_SH([pgac_cv_prog_cc_cflags_$2])])dnl
AC_CACHE_CHECK([whether $CC supports $2], [Ac_cachevar],
[pgac_save_CFLAGS=$CFLAGS
CFLAGS="$pgac_save_CFLAGS $2"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
[Ac_cachevar=yes],
[Ac_cachevar=no])
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"])
if test x"$Ac_cachevar" = x"yes"; then
$1="${$1} $2"
fi
undefine([Ac_cachevar])dnl
])# PGAC_PROG_CC_CFLAGS_OPT
# PGAC_PROG_CC_LDFLAGS_OPT
# ------------------------
# Given a string, check if the compiler supports the string as a
# command-line option. If it does, add the string to LDFLAGS.
# For reasons you'd really rather not know about, this checks whether
# you can link to a particular function, not just whether you can link.
# In fact, we must actually check that the resulting program runs :-(
AC_DEFUN([PGAC_PROG_CC_LDFLAGS_OPT],
[define([Ac_cachevar], [AS_TR_SH([pgac_cv_prog_cc_ldflags_$1])])dnl
AC_CACHE_CHECK([whether $CC supports $1], [Ac_cachevar],
[pgac_save_LDFLAGS=$LDFLAGS
LDFLAGS="$pgac_save_LDFLAGS $1"
AC_RUN_IFELSE([AC_LANG_PROGRAM([extern void $2 (); void (*fptr) () = $2;],[])],
[Ac_cachevar=yes],
[Ac_cachevar=no],
[Ac_cachevar="assuming no"])
LDFLAGS="$pgac_save_LDFLAGS"])
if test x"$Ac_cachevar" = x"yes"; then
LDFLAGS="$LDFLAGS $1"
fi
undefine([Ac_cachevar])dnl
])# PGAC_PROG_CC_LDFLAGS_OPT

View file

@ -1,328 +0,0 @@
# Macros that test various C library quirks
# config/c-library.m4
# PGAC_VAR_INT_TIMEZONE
# ---------------------
# Check if the global variable `timezone' exists. If so, define
# HAVE_INT_TIMEZONE.
AC_DEFUN([PGAC_VAR_INT_TIMEZONE],
[AC_CACHE_CHECK(for int timezone, pgac_cv_var_int_timezone,
[AC_TRY_LINK([#include <time.h>
int res;],
[#ifndef __CYGWIN__
res = timezone / 60;
#else
res = _timezone / 60;
#endif],
[pgac_cv_var_int_timezone=yes],
[pgac_cv_var_int_timezone=no])])
if test x"$pgac_cv_var_int_timezone" = xyes ; then
AC_DEFINE(HAVE_INT_TIMEZONE,, [Define to 1 if you have the global variable 'int timezone'.])
fi])# PGAC_VAR_INT_TIMEZONE
# PGAC_STRUCT_TIMEZONE
# ------------------
# Figure out how to get the current timezone. If `struct tm' has a
# `tm_zone' member, define `HAVE_TM_ZONE'. Also, if the
# external array `tzname' is found, define `HAVE_TZNAME'.
# This is the same as the standard macro AC_STRUCT_TIMEZONE, except that
# tzname[] is checked for regardless of whether we find tm_zone.
AC_DEFUN([PGAC_STRUCT_TIMEZONE],
[AC_REQUIRE([AC_STRUCT_TM])dnl
AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
#include <$ac_cv_struct_tm>
])
if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
AC_DEFINE(HAVE_TM_ZONE, 1,
[Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
`HAVE_STRUCT_TM_TM_ZONE' instead.])
fi
AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
[AC_TRY_LINK(
[#include <time.h>
#ifndef tzname /* For SGI. */
extern char *tzname[]; /* RS6000 and others reject char **tzname. */
#endif
],
[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
if test $ac_cv_var_tzname = yes; then
AC_DEFINE(HAVE_TZNAME, 1,
[Define to 1 if you have the external array `tzname'.])
fi
])# PGAC_STRUCT_TIMEZONE
# PGAC_FUNC_GETTIMEOFDAY_1ARG
# ---------------------------
# Check if gettimeofday() has only one arguments. (Normal is two.)
# If so, define GETTIMEOFDAY_1ARG.
AC_DEFUN([PGAC_FUNC_GETTIMEOFDAY_1ARG],
[AC_CACHE_CHECK(whether gettimeofday takes only one argument,
pgac_cv_func_gettimeofday_1arg,
[AC_TRY_COMPILE([#include <sys/time.h>],
[struct timeval *tp;
struct timezone *tzp;
gettimeofday(tp,tzp);],
[pgac_cv_func_gettimeofday_1arg=no],
[pgac_cv_func_gettimeofday_1arg=yes])])
if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
AC_DEFINE(GETTIMEOFDAY_1ARG,, [Define to 1 if gettimeofday() takes only 1 argument.])
fi
AH_VERBATIM(GETTIMEOFDAY_1ARG_,
[@%:@ifdef GETTIMEOFDAY_1ARG
@%:@ define gettimeofday(a,b) gettimeofday(a)
@%:@endif])dnl
])# PGAC_FUNC_GETTIMEOFDAY_1ARG
# PGAC_FUNC_GETPWUID_R_5ARG
# ---------------------------
# Check if getpwuid_r() takes a fifth argument (later POSIX standard, not draft version)
# If so, define GETPWUID_R_5ARG
AC_DEFUN([PGAC_FUNC_GETPWUID_R_5ARG],
[AC_CACHE_CHECK(whether getpwuid_r takes a fifth argument,
pgac_cv_func_getpwuid_r_5arg,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <pwd.h>],
[uid_t uid;
struct passwd *space;
char *buf;
size_t bufsize;
struct passwd **result;
getpwuid_r(uid, space, buf, bufsize, result);],
[pgac_cv_func_getpwuid_r_5arg=yes],
[pgac_cv_func_getpwuid_r_5arg=no])])
if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
AC_DEFINE(GETPWUID_R_5ARG,, [Define to 1 if getpwuid_r() takes a 5th argument.])
fi
])# PGAC_FUNC_GETPWUID_R_5ARG
# PGAC_FUNC_STRERROR_R_INT
# ---------------------------
# Check if strerror_r() returns an int (SUSv3) rather than a char * (GNU libc)
# If so, define STRERROR_R_INT
AC_DEFUN([PGAC_FUNC_STRERROR_R_INT],
[AC_CACHE_CHECK(whether strerror_r returns int,
pgac_cv_func_strerror_r_int,
[AC_TRY_COMPILE([#include <string.h>],
[#ifndef _AIX
int strerror_r(int, char *, size_t);
#else
/* Older AIX has 'int' for the third argument so we don't test the args. */
int strerror_r();
#endif],
[pgac_cv_func_strerror_r_int=yes],
[pgac_cv_func_strerror_r_int=no])])
if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
AC_DEFINE(STRERROR_R_INT,, [Define to 1 if strerror_r() returns a int.])
fi
])# PGAC_FUNC_STRERROR_R_INT
# PGAC_UNION_SEMUN
# ----------------
# Check if `union semun' exists. Define HAVE_UNION_SEMUN if so.
# If it doesn't then one could define it as
# union semun { int val; struct semid_ds *buf; unsigned short *array; }
AC_DEFUN([PGAC_UNION_SEMUN],
[AC_CHECK_TYPES([union semun], [], [],
[#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>])])# PGAC_UNION_SEMUN
# PGAC_STRUCT_SOCKADDR_UN
# -----------------------
# If `struct sockaddr_un' exists, define HAVE_UNIX_SOCKETS.
# (Requires test for <sys/un.h>!)
AC_DEFUN([PGAC_STRUCT_SOCKADDR_UN],
[AC_CHECK_TYPE([struct sockaddr_un], [AC_DEFINE(HAVE_UNIX_SOCKETS, 1, [Define to 1 if you have unix sockets.])], [],
[#include <sys/types.h>
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif
])])# PGAC_STRUCT_SOCKADDR_UN
# PGAC_STRUCT_SOCKADDR_STORAGE
# ----------------------------
# If `struct sockaddr_storage' exists, define HAVE_STRUCT_SOCKADDR_STORAGE.
# If it is missing then one could define it.
AC_DEFUN([PGAC_STRUCT_SOCKADDR_STORAGE],
[AC_CHECK_TYPES([struct sockaddr_storage], [], [],
[#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
])])# PGAC_STRUCT_SOCKADDR_STORAGE
# PGAC_STRUCT_SOCKADDR_STORAGE_MEMBERS
# --------------------------------------
# Check the members of `struct sockaddr_storage'. We need to know about
# ss_family and ss_len. (Some platforms follow RFC 2553 and call them
# __ss_family and __ss_len.) We also check struct sockaddr's sa_len;
# if we have to define our own `struct sockaddr_storage', this tells us
# whether we need to provide an ss_len field.
AC_DEFUN([PGAC_STRUCT_SOCKADDR_STORAGE_MEMBERS],
[AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family,
struct sockaddr_storage.__ss_family,
struct sockaddr_storage.ss_len,
struct sockaddr_storage.__ss_len,
struct sockaddr.sa_len], [], [],
[#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
])])# PGAC_STRUCT_SOCKADDR_STORAGE_MEMBERS
# PGAC_STRUCT_ADDRINFO
# -----------------------
# If `struct addrinfo' exists, define HAVE_STRUCT_ADDRINFO.
AC_DEFUN([PGAC_STRUCT_ADDRINFO],
[AC_CHECK_TYPES([struct addrinfo], [], [],
[#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
])])# PGAC_STRUCT_ADDRINFO
# PGAC_FUNC_POSIX_SIGNALS
# -----------------------
# Check to see if the machine has the POSIX signal interface. Define
# HAVE_POSIX_SIGNALS if so. Also set the output variable HAVE_POSIX_SIGNALS
# to yes or no.
#
# Note that this test only compiles a test program, it doesn't check
# whether the routines actually work. If that becomes a problem, make
# a fancier check.
AC_DEFUN([PGAC_FUNC_POSIX_SIGNALS],
[AC_CACHE_CHECK(for POSIX signal interface, pgac_cv_func_posix_signals,
[AC_TRY_LINK([#include <signal.h>
],
[struct sigaction act, oact;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_RESTART;
sigaction(0, &act, &oact);],
[pgac_cv_func_posix_signals=yes],
[pgac_cv_func_posix_signals=no])])
if test x"$pgac_cv_func_posix_signals" = xyes ; then
AC_DEFINE(HAVE_POSIX_SIGNALS,, [Define to 1 if you have the POSIX signal interface.])
fi
HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
AC_SUBST(HAVE_POSIX_SIGNALS)])# PGAC_FUNC_POSIX_SIGNALS
# PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT
# ---------------------------------------
# Determine which format snprintf uses for long long int. We handle
# %lld, %qd, %I64d. The result is in shell variable
# LONG_LONG_INT_FORMAT.
#
# MinGW uses '%I64d', though gcc throws an warning with -Wall,
# while '%lld' doesn't generate a warning, but doesn't work.
#
AC_DEFUN([PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT],
[AC_MSG_CHECKING([snprintf format for long long int])
AC_CACHE_VAL(pgac_cv_snprintf_long_long_int_format,
[for pgac_format in '%lld' '%qd' '%I64d'; do
AC_TRY_RUN([#include <stdio.h>
typedef long long int ac_int64;
#define INT64_FORMAT "$pgac_format"
ac_int64 a = 20000001;
ac_int64 b = 40000005;
int does_int64_snprintf_work()
{
ac_int64 c;
char buf[100];
if (sizeof(ac_int64) != 8)
return 0; /* doesn't look like the right size */
c = a * b;
snprintf(buf, 100, INT64_FORMAT, c);
if (strcmp(buf, "800000140000005") != 0)
return 0; /* either multiply or snprintf is busted */
return 1;
}
main() {
exit(! does_int64_snprintf_work());
}],
[pgac_cv_snprintf_long_long_int_format=$pgac_format; break],
[],
[pgac_cv_snprintf_long_long_int_format=cross; break])
done])dnl AC_CACHE_VAL
LONG_LONG_INT_FORMAT=''
case $pgac_cv_snprintf_long_long_int_format in
cross) AC_MSG_RESULT([cannot test (not on host machine)]);;
?*) AC_MSG_RESULT([$pgac_cv_snprintf_long_long_int_format])
LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
*) AC_MSG_RESULT(none);;
esac])# PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT
# PGAC_FUNC_PRINTF_ARG_CONTROL
# ---------------------------------------
# Determine if printf supports %1$ argument selection, e.g. %5$ selects
# the fifth argument after the printf print string.
# This is not in the C99 standard, but in the Single Unix Specification (SUS).
# It is used in our language translation strings.
#
AC_DEFUN([PGAC_FUNC_PRINTF_ARG_CONTROL],
[AC_MSG_CHECKING([whether printf supports argument control])
AC_CACHE_VAL(pgac_cv_printf_arg_control,
[AC_TRY_RUN([#include <stdio.h>
#include <string.h>
int main()
{
char buf[100];
/* can it swap arguments? */
snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
if (strcmp(buf, "4 3") != 0)
return 1;
return 0;
}],
[pgac_cv_printf_arg_control=yes],
[pgac_cv_printf_arg_control=no],
[pgac_cv_printf_arg_control=cross])
])dnl AC_CACHE_VAL
AC_MSG_RESULT([$pgac_cv_printf_arg_control])
])# PGAC_FUNC_PRINTF_ARG_CONTROL
# PGAC_TYPE_LOCALE_T
# ------------------
# Check for the locale_t type and find the right header file. Mac OS
# X needs xlocale.h; standard is locale.h, but glibc also has an
# xlocale.h file that we should not use.
#
AC_DEFUN([PGAC_TYPE_LOCALE_T],
[AC_CACHE_CHECK([for locale_t], pgac_cv_type_locale_t,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[#include <locale.h>
locale_t x;],
[])],
[pgac_cv_type_locale_t=yes],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[#include <xlocale.h>
locale_t x;],
[])],
[pgac_cv_type_locale_t='yes (in xlocale.h)'],
[pgac_cv_type_locale_t=no])])])
if test "$pgac_cv_type_locale_t" != no; then
AC_DEFINE(HAVE_LOCALE_T, 1,
[Define to 1 if the system has the type `locale_t'.])
fi
if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
AC_DEFINE(LOCALE_T_IN_XLOCALE, 1,
[Define to 1 if `locale_t' requires <xlocale.h>.])
fi])])# PGAC_HEADER_XLOCALE

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,102 +0,0 @@
# config/docbook.m4
# PGAC_PROG_JADE
# --------------
AC_DEFUN([PGAC_PROG_JADE],
[AC_CHECK_PROGS([JADE], [openjade jade])])
# PGAC_PROG_NSGMLS
# ----------------
AC_DEFUN([PGAC_PROG_NSGMLS],
[AC_CHECK_PROGS([NSGMLS], [onsgmls nsgmls])])
# PGAC_CHECK_DOCBOOK(VERSION)
# ---------------------------
AC_DEFUN([PGAC_CHECK_DOCBOOK],
[AC_REQUIRE([PGAC_PROG_NSGMLS])
AC_CACHE_CHECK([for DocBook V$1], [pgac_cv_check_docbook],
[cat >conftest.sgml <<EOF
<!doctype book PUBLIC "-//OASIS//DTD DocBook V$1//EN">
<book>
<title>test</title>
<chapter>
<title>random</title>
<sect1>
<title>testsect</title>
<para>text</para>
</sect1>
</chapter>
</book>
EOF
pgac_cv_check_docbook=no
if test -n "$NSGMLS"; then
$NSGMLS -s conftest.sgml 1>&AS_MESSAGE_LOG_FD 2>&1
if test $? -eq 0; then
pgac_cv_check_docbook=yes
fi
fi
rm -f conftest.sgml])
have_docbook=$pgac_cv_check_docbook
AC_SUBST([have_docbook])
])# PGAC_CHECK_DOCBOOK
# PGAC_PATH_DOCBOOK_STYLESHEETS
# -----------------------------
AC_DEFUN([PGAC_PATH_DOCBOOK_STYLESHEETS],
[AC_ARG_VAR(DOCBOOKSTYLE, [location of DocBook stylesheets])dnl
AC_MSG_CHECKING([for DocBook stylesheets])
AC_CACHE_VAL([pgac_cv_path_stylesheets],
[if test -n "$DOCBOOKSTYLE"; then
pgac_cv_path_stylesheets=$DOCBOOKSTYLE
else
for pgac_prefix in /usr /usr/local /opt /sw; do
for pgac_infix in share lib; do
for pgac_postfix in \
sgml/stylesheets/nwalsh-modular \
sgml/stylesheets/docbook \
sgml/stylesheets/dsssl/docbook \
sgml/docbook-dsssl \
sgml/docbook/dsssl/modular \
sgml/docbook/stylesheet/dsssl/modular \
sgml/docbook/dsssl-stylesheets \
sgml/dsssl/docbook-dsssl-nwalsh
do
pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
if test -r "$pgac_candidate/html/docbook.dsl" \
&& test -r "$pgac_candidate/print/docbook.dsl"
then
pgac_cv_path_stylesheets=$pgac_candidate
break 3
fi
done
done
done
fi])
DOCBOOKSTYLE=$pgac_cv_path_stylesheets
AC_SUBST([DOCBOOKSTYLE])
if test -n "$DOCBOOKSTYLE"; then
AC_MSG_RESULT([$DOCBOOKSTYLE])
else
AC_MSG_RESULT(no)
fi])# PGAC_PATH_DOCBOOK_STYLESHEETS
# PGAC_PATH_COLLATEINDEX
# ----------------------
# Some DocBook installations provide collateindex.pl in $DOCBOOKSTYLE/bin,
# but it's not necessarily marked executable, so we can't use AC_PATH_PROG
# to check for it there. Other installations just put it in the PATH.
AC_DEFUN([PGAC_PATH_COLLATEINDEX],
[AC_REQUIRE([PGAC_PATH_DOCBOOK_STYLESHEETS])dnl
if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
AC_SUBST([COLLATEINDEX])
else
AC_PATH_PROG(COLLATEINDEX, collateindex.pl)
fi])# PGAC_PATH_COLLATEINDEX

View file

@ -1,149 +0,0 @@
# config/general.m4
# This file defines new macros to process configure command line
# arguments, to replace the brain-dead AC_ARG_WITH and AC_ARG_ENABLE.
# The flaw in these is particularly that they only differentiate
# between "given" and "not given" and do not provide enough help to
# process arguments that only accept "yes/no", that require an
# argument (other than "yes/no"), etc.
#
# The point of this implementation is to reduce code size and
# redundancy in configure.in and to improve robustness and consistency
# in the option evaluation code.
# Convert type and name to shell variable name (e.g., "enable_long_strings")
m4_define([pgac_arg_to_variable],
[$1[]_[]patsubst($2, -, _)])
# PGAC_ARG(TYPE, NAME, HELP-STRING-LHS-EXTRA, HELP-STRING-RHS,
# [ACTION-IF-YES], [ACTION-IF-NO], [ACTION-IF-ARG],
# [ACTION-IF-OMITTED])
# ------------------------------------------------------------
# This is the base layer. TYPE is either "with" or "enable", depending
# on what you like. NAME is the rest of the option name.
# HELP-STRING-LHS-EXTRA is a string to append to the option name on
# the left-hand side of the help output, e.g., an argument name. If
# set to "-", append nothing, but let the option appear in the
# negative form (disable/without). HELP-STRING-RHS is the option
# description, for the right-hand side of the help output.
# ACTION-IF-YES is executed if the option is given without an argument
# (or "yes", which is the same); similar for ACTION-IF-NO.
AC_DEFUN([PGAC_ARG],
[
m4_case([$1],
enable, [
AC_ARG_ENABLE([$2], [AS_HELP_STRING([--]m4_if($3, -, disable, enable)[-$2]m4_if($3, -, , $3), [$4])], [
case [$]enableval in
yes)
m4_default([$5], :)
;;
no)
m4_default([$6], :)
;;
*)
$7
;;
esac
],
[$8])[]dnl AC_ARG_ENABLE
],
with, [
AC_ARG_WITH([$2], [AS_HELP_STRING([--]m4_if($3, -, without, with)[-$2]m4_if($3, -, , $3), [$4])], [
case [$]withval in
yes)
m4_default([$5], :)
;;
no)
m4_default([$6], :)
;;
*)
$7
;;
esac
],
[$8])[]dnl AC_ARG_WITH
],
[m4_fatal([first argument of $0 must be 'enable' or 'with', not '$1'])]
)
])# PGAC_ARG
# PGAC_ARG_BOOL(TYPE, NAME, DEFAULT, HELP-STRING-RHS,
# [ACTION-IF-YES], [ACTION-IF-NO])
# ---------------------------------------------------
# Accept a boolean option, that is, one that only takes yes or no.
# ("no" is equivalent to "disable" or "without"). DEFAULT is what
# should be done if the option is omitted; it should be "yes" or "no".
# (Consequently, one of ACTION-IF-YES and ACTION-IF-NO will always
# execute.)
AC_DEFUN([PGAC_ARG_BOOL],
[dnl The following hack is necessary because in a few instances this
dnl macro is called twice for the same option with different default
dnl values. But we only want it to appear once in the help. We achieve
dnl that by making the help string look the same, which is why we need to
dnl save the default that was passed in previously.
m4_define([_pgac_helpdefault], m4_ifdef([pgac_defined_$1_$2_bool], [m4_defn([pgac_defined_$1_$2_bool])], [$3]))dnl
PGAC_ARG([$1], [$2], [m4_if(_pgac_helpdefault, yes, -)], [$4], [$5], [$6],
[AC_MSG_ERROR([no argument expected for --$1-$2 option])],
[m4_case([$3],
yes, [pgac_arg_to_variable([$1], [$2])=yes
$5],
no, [pgac_arg_to_variable([$1], [$2])=no
$6],
[m4_fatal([third argument of $0 must be 'yes' or 'no', not '$3'])])])[]dnl
m4_define([pgac_defined_$1_$2_bool], [$3])dnl
])# PGAC_ARG_BOOL
# PGAC_ARG_REQ(TYPE, NAME, HELP-ARGNAME, HELP-STRING-RHS,
# [ACTION-IF-GIVEN], [ACTION-IF-NOT-GIVEN])
# -------------------------------------------------------
# This option will require an argument; "yes" or "no" will not be
# accepted. HELP-ARGNAME is a name for the argument for the help output.
AC_DEFUN([PGAC_ARG_REQ],
[PGAC_ARG([$1], [$2], [=$3], [$4],
[AC_MSG_ERROR([argument required for --$1-$2 option])],
[AC_MSG_ERROR([argument required for --$1-$2 option])],
[$5],
[$6])])# PGAC_ARG_REQ
# PGAC_ARG_OPTARG(TYPE, NAME, HELP-ARGNAME, HELP-STRING-RHS,
# [DEFAULT-ACTION], [ARG-ACTION],
# [ACTION-ENABLED], [ACTION-DISABLED])
# ----------------------------------------------------------
# This will create an option that behaves as follows: If omitted, or
# called with "no", then set the enable_variable to "no" and do
# nothing else. If called with "yes", then execute DEFAULT-ACTION. If
# called with argument, set enable_variable to "yes" and execute
# ARG-ACTION. Additionally, execute ACTION-ENABLED if we ended up with
# "yes" either way, else ACTION-DISABLED.
#
# The intent is to allow enabling a feature, and optionally pass an
# additional piece of information.
AC_DEFUN([PGAC_ARG_OPTARG],
[PGAC_ARG([$1], [$2], [@<:@=$3@:>@], [$4], [$5], [],
[pgac_arg_to_variable([$1], [$2])=yes
$6],
[pgac_arg_to_variable([$1], [$2])=no])
dnl Add this code only if there's a ACTION-ENABLED or ACTION-DISABLED.
m4_ifval([$7[]$8],
[
if test "[$]pgac_arg_to_variable([$1], [$2])" = yes; then
m4_default([$7], :)
m4_ifval([$8],
[else
$8
])[]dnl
fi
])[]dnl
])# PGAC_ARG_OPTARG

View file

@ -1,527 +0,0 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-11-20.07; # 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.
nl='
'
IFS=" "" $nl"
# 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
# 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_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.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
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
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
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) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
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
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 -n "$no_target_directory"; 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'
`
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.
;;
*)
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;;
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
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob 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` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob 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:

View file

@ -1,119 +0,0 @@
## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
## Copyright (C) 1996-1999,2000 Free Software Foundation, Inc.
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
## As a special exception to the GNU General Public License, if you
## distribute this file as part of a program that contains a
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
# No, PostgreSQL doesn't use libtool (yet), we just borrow stuff from it.
# This file was taken on 2000-10-20 from the multi-language branch (since
# that is the branch that PostgreSQL would most likely adopt anyway).
# --petere
# ... bunch of stuff removed here ...
# PGAC_PROG_LD - find the path to the GNU or non-GNU linker
AC_DEFUN([PGAC_PROG_LD],
[AC_ARG_WITH(gnu-ld,
[ --with-gnu-ld assume the C compiler uses GNU ld [[default=no]]],
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
dnl ###not for PostgreSQL### AC_REQUIRE([AC_CANONICAL_BUILD])dnl
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
AC_MSG_CHECKING([for ld used by GCC])
case $host in
*-*-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` ;;
esac
case "$ac_prog" in
# Accept absolute paths.
changequote(,)dnl
[\\/]* | [A-Za-z]:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
changequote([,])dnl
# Canonicalize the path of ld
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
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"
;;
"")
# If it fails, then pretend we aren't using GCC.
ac_prog=ld
;;
*)
# If it is relative, then search for the first ld in PATH.
with_gnu_ld=unknown
;;
esac
elif test "$with_gnu_ld" = yes; then
AC_MSG_CHECKING([for GNU ld])
else
AC_MSG_CHECKING([for non-GNU ld])
fi
AC_CACHE_VAL(ac_cv_path_LD,
[if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
ac_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
test "$with_gnu_ld" != no && break
else
test "$with_gnu_ld" != yes && break
fi
fi
done
IFS="$ac_save_ifs"
else
ac_cv_path_LD="$LD" # Let the user override the test with a path.
fi])
LD="$ac_cv_path_LD"
if test -n "$LD"; then
AC_MSG_RESULT($LD)
else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
PGAC_PROG_LD_GNU
])
AC_DEFUN([PGAC_PROG_LD_GNU],
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
ac_cv_prog_gnu_ld=yes
else
ac_cv_prog_gnu_ld=no
fi])
with_gnu_ld=$ac_cv_prog_gnu_ld
])
# ... more stuff removed ...

View file

@ -1,54 +0,0 @@
#! /bin/sh
# config/missing
# This is *not* the GNU `missing' script, although it is similar in
# concept. You can call it from the makefiles to get consistent
# behavior when certain utility programs are missing.
case $1 in
flex|bison)
# `missing flex|bison <input> <output>'
input=$2
output=$3
if test -f "$output"; then
echo "\
***
WARNING: \`$1' is missing on your system. You should only need it
if you changed the file \`$input'; these changes will not take effect.
You can get $1 from a GNU mirror site.
***" >&2
echo "touch $output"
touch "$output"
exit 0
else # ! test -f $output
echo "\
***
ERROR: \`$1' is missing on your system. It is needed to create the
file \`$output'. You can either get $1 from a GNU mirror site
or download an official distribution of PostgreSQL, which contains
pre-packaged $1 output.
***" >&2
exit 1
fi
;;
perl)
# `missing perl'
echo "\
***
ERROR: Perl is missing on your system. It is needed unless you are building
from an unmodified official distribution of PostgreSQL.
***" >&2
exit 1
;;
*)
# `missing something-or-other'
echo "\
***
ERROR: \`$1' is missing on your system.
***" >&2
exit 1
;;
esac

View file

@ -1,78 +0,0 @@
# config/perl.m4
# PGAC_PATH_PERL
# --------------
AC_DEFUN([PGAC_PATH_PERL],
[# Let the user override the search
if test -z "$PERL"; then
AC_PATH_PROG(PERL, perl)
fi
if test "$PERL"; then
pgac_perl_version=`$PERL -v 2>/dev/null | sed -n ['s/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p']`
AC_MSG_NOTICE([using perl $pgac_perl_version])
if echo "$pgac_perl_version" | sed ['s/[.a-z_]/ /g'] | \
$AWK '{ if ([$]1 = 5 && [$]2 >= 8) exit 1; else exit 0;}'
then
AC_MSG_WARN([
*** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
*** Perl version 5.8 or later is required, but this is $pgac_perl_version.])
PERL=""
fi
fi
if test -z "$PERL"; then
AC_MSG_WARN([
*** Without Perl you will not be able to build PostgreSQL from Git.
*** You can obtain Perl from any CPAN mirror site.
*** (If you are using the official distribution of PostgreSQL then you do not
*** need to worry about this, because the Perl output is pre-generated.)])
fi
])# PGAC_PATH_PERL
# PGAC_CHECK_PERL_CONFIG(NAME)
# ----------------------------
AC_DEFUN([PGAC_CHECK_PERL_CONFIG],
[AC_REQUIRE([PGAC_PATH_PERL])
AC_MSG_CHECKING([for Perl $1])
perl_$1=`$PERL -MConfig -e 'print $Config{$1}'`
test "$PORTNAME" = "win32" && perl_$1=`echo $perl_$1 | sed 's,\\\\,/,g'`
AC_SUBST(perl_$1)dnl
AC_MSG_RESULT([$perl_$1])])
# PGAC_CHECK_PERL_CONFIGS(NAMES)
# ------------------------------
AC_DEFUN([PGAC_CHECK_PERL_CONFIGS],
[m4_foreach([pgac_item], [$1], [PGAC_CHECK_PERL_CONFIG(pgac_item)])])
# PGAC_CHECK_PERL_EMBED_LDFLAGS
# -----------------------------
# We are after Embed's ldopts, but without the subset mentioned in
# Config's ccdlflags; and also without any -arch flags, which recent
# Apple releases put in unhelpfully. (If you want a multiarch build
# you'd better be specifying it in more places than plperl's final link.)
AC_DEFUN([PGAC_CHECK_PERL_EMBED_LDFLAGS],
[AC_REQUIRE([PGAC_PATH_PERL])
AC_MSG_CHECKING(for flags to link embedded Perl)
if test "$PORTNAME" = "win32" ; then
perl_lib=`basename $perl_archlibexp/CORE/perl[[5-9]]*.lib .lib`
test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
else
pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e ["s/ -arch [-a-zA-Z0-9_]*//g"]`
fi
AC_SUBST(perl_embed_ldflags)dnl
if test -z "$perl_embed_ldflags" ; then
AC_MSG_RESULT(no)
AC_MSG_ERROR([could not determine flags for linking embedded Perl.
This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
installed.])
else
AC_MSG_RESULT([$perl_embed_ldflags])
fi
])# PGAC_CHECK_PERL_EMBED_LDFLAGS

View file

@ -1,45 +0,0 @@
#! /bin/sh
# This script prepares a PostgreSQL build tree. It is intended
# to be run by the configure script.
me=`basename $0`
help="\
Usage: $me sourcetree [buildtree]"
if test -z "$1"; then
echo "$help" 1>&2
exit 1
elif test x"$1" = x"--help"; then
echo "$help"
exit 0
fi
unset CDPATH
sourcetree=`cd $1 && pwd`
buildtree=`cd ${2:-'.'} && pwd`
# We must not auto-create the subdirectories holding built documentation.
# If we did, it would interfere with installation of prebuilt docs from
# the source tree, if a VPATH build is done from a distribution tarball.
# See bug #5595.
for item in `find "$sourcetree" -type d \( \( -name CVS -prune \) -o \( -name .git -prune \) -o -print \) | grep -v "$sourcetree/doc/src/sgml/\+"`; do
subdir=`expr "$item" : "$sourcetree\(.*\)"`
if test ! -d "$buildtree/$subdir"; then
mkdir -p "$buildtree/$subdir" || exit 1
fi
done
for item in `find "$sourcetree" -name Makefile -print -o -name GNUmakefile -print`; do
filename=`expr "$item" : "$sourcetree\(.*\)"`
if test ! -f "${item}.in"; then
if cmp "$item" "$buildtree/$filename" >/dev/null 2>&1; then : ; else
ln -fs "$item" "$buildtree/$filename" || exit 1
fi
fi
done
exit 0

View file

@ -1,237 +0,0 @@
# config/programs.m4
# PGAC_PATH_BISON
# ---------------
# Look for Bison, set the output variable BISON to its path if found.
# Reject versions before 1.875 (they have bugs or capacity limits).
# Note we do not accept other implementations of yacc.
AC_DEFUN([PGAC_PATH_BISON],
[# Let the user override the search
if test -z "$BISON"; then
AC_PATH_PROGS(BISON, bison)
fi
if test "$BISON"; then
pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
AC_MSG_NOTICE([using $pgac_bison_version])
if echo "$pgac_bison_version" | $AWK '{ if ([$]4 < 1.875) exit 0; else exit 1;}'
then
AC_MSG_WARN([
*** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
*** Bison version 1.875 or later is required, but this is $pgac_bison_version.])
BISON=""
fi
fi
if test -z "$BISON"; then
AC_MSG_WARN([
*** Without Bison you will not be able to build PostgreSQL from Git nor
*** change any of the parser definition files. You can obtain Bison from
*** a GNU mirror site. (If you are using the official distribution of
*** PostgreSQL then you do not need to worry about this, because the Bison
*** output is pre-generated.)])
fi
# We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
AC_SUBST(BISONFLAGS)
])# PGAC_PATH_BISON
# PGAC_PATH_FLEX
# --------------
# Look for Flex, set the output variable FLEX to its path if found.
# Reject versions before 2.5.31, as we need a reasonably non-buggy reentrant
# scanner. (Note: the well-publicized security problem in 2.5.31 does not
# affect Postgres, and there are still distros shipping patched 2.5.31,
# so allow it.) Also find Flex if its installed under `lex', but do not
# accept other Lex programs.
AC_DEFUN([PGAC_PATH_FLEX],
[AC_CACHE_CHECK([for flex], pgac_cv_path_flex,
[# Let the user override the test
if test -n "$FLEX"; then
pgac_cv_path_flex=$FLEX
else
pgac_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for pgac_dir in $PATH; do
IFS=$pgac_save_IFS
if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
pgac_dir=`pwd`
fi
for pgac_prog in flex lex; do
pgac_candidate="$pgac_dir/$pgac_prog"
if test -f "$pgac_candidate" \
&& $pgac_candidate --version </dev/null >/dev/null 2>&1
then
echo '%%' > conftest.l
if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
if echo "$pgac_flex_version" | sed ['s/[.a-z]/ /g'] | $AWK '{ if ([$]1 = 2 && [$]2 = 5 && [$]3 >= 31) exit 0; else exit 1;}'
then
pgac_cv_path_flex=$pgac_candidate
break 2
else
AC_MSG_WARN([
*** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
*** Flex version 2.5.31 or later is required, but this is $pgac_flex_version.])
fi
fi
fi
done
done
rm -f conftest.l lex.yy.c
: ${pgac_cv_path_flex=no}
fi
])[]dnl AC_CACHE_CHECK
if test x"$pgac_cv_path_flex" = x"no"; then
AC_MSG_WARN([
*** Without Flex you will not be able to build PostgreSQL from Git nor
*** change any of the scanner definition files. You can obtain Flex from
*** a GNU mirror site. (If you are using the official distribution of
*** PostgreSQL then you do not need to worry about this because the Flex
*** output is pre-generated.)])
FLEX=
else
FLEX=$pgac_cv_path_flex
pgac_flex_version=`$FLEX --version 2>/dev/null`
AC_MSG_NOTICE([using $pgac_flex_version])
fi
AC_SUBST(FLEX)
AC_SUBST(FLEXFLAGS)
])# PGAC_PATH_FLEX
# PGAC_CHECK_READLINE
# -------------------
# Check for the readline library and dependent libraries, either
# termcap or curses. Also try libedit, since NetBSD's is compatible.
# Add the required flags to LIBS, define HAVE_LIBREADLINE.
AC_DEFUN([PGAC_CHECK_READLINE],
[AC_REQUIRE([AC_CANONICAL_HOST])
AC_CACHE_CHECK([for library containing readline], [pgac_cv_check_readline],
[pgac_cv_check_readline=no
pgac_save_LIBS=$LIBS
if test x"$with_libedit_preferred" != x"yes"
then READLINE_ORDER="-lreadline -ledit"
else READLINE_ORDER="-ledit -lreadline"
fi
for pgac_rllib in $READLINE_ORDER ; do
for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
AC_TRY_LINK_FUNC([readline], [[
# Older NetBSD, OpenBSD, and Irix have a broken linker that does not
# recognize dependent libraries; assume curses is needed if we didn't
# find any dependency.
case $host_os in
netbsd* | openbsd* | irix*)
if test x"$pgac_lib" = x"" ; then
pgac_lib=" -lcurses"
fi ;;
esac
pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
break
]])
done
if test "$pgac_cv_check_readline" != no ; then
break
fi
done
LIBS=$pgac_save_LIBS
])[]dnl AC_CACHE_CHECK
if test "$pgac_cv_check_readline" != no ; then
LIBS="$pgac_cv_check_readline $LIBS"
AC_DEFINE(HAVE_LIBREADLINE, 1, [Define if you have a function readline library])
fi
])# PGAC_CHECK_READLINE
# PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER
# ---------------------------------------
# Readline versions < 2.1 don't have rl_completion_append_character
AC_DEFUN([PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER],
[AC_CACHE_CHECK([for rl_completion_append_character], pgac_cv_var_rl_completion_append_character,
[AC_TRY_LINK([#include <stdio.h>
#ifdef HAVE_READLINE_READLINE_H
# include <readline/readline.h>
#elif defined(HAVE_READLINE_H)
# include <readline.h>
#endif
],
[rl_completion_append_character = 'x';],
[pgac_cv_var_rl_completion_append_character=yes],
[pgac_cv_var_rl_completion_append_character=no])])
if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1,
[Define to 1 if you have the global variable 'rl_completion_append_character'.])
fi])# PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER
# PGAC_CHECK_GETTEXT
# ------------------
# We check for bind_textdomain_codeset() not just gettext(). GNU gettext
# before 0.10.36 does not have that function, and is generally too incomplete
# to be usable.
AC_DEFUN([PGAC_CHECK_GETTEXT],
[
AC_SEARCH_LIBS(bind_textdomain_codeset, intl, [],
[AC_MSG_ERROR([a gettext implementation is required for NLS])])
AC_CHECK_HEADER([libintl.h], [],
[AC_MSG_ERROR([header file <libintl.h> is required for NLS])])
AC_CHECK_PROGS(MSGFMT, msgfmt)
if test -z "$MSGFMT"; then
AC_MSG_ERROR([msgfmt is required for NLS])
fi
AC_CHECK_PROGS(MSGMERGE, msgmerge)
AC_CHECK_PROGS(XGETTEXT, xgettext)
])# PGAC_CHECK_GETTEXT
# PGAC_CHECK_STRIP
# ----------------
# Check for a 'strip' program, and figure out if that program can
# strip libraries.
AC_DEFUN([PGAC_CHECK_STRIP],
[
AC_CHECK_TOOL(STRIP, strip, :)
AC_MSG_CHECKING([whether it is possible to strip libraries])
if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
STRIP_STATIC_LIB="$STRIP -x"
STRIP_SHARED_LIB="$STRIP --strip-unneeded"
AC_MSG_RESULT(yes)
else
case $host_os in
darwin*)
STRIP="$STRIP -x"
STRIP_STATIC_LIB=$STRIP
STRIP_SHARED_LIB=$STRIP
AC_MSG_RESULT(yes)
;;
*)
STRIP_STATIC_LIB=:
STRIP_SHARED_LIB=:
AC_MSG_RESULT(no)
;;
esac
fi
AC_SUBST(STRIP_STATIC_LIB)
AC_SUBST(STRIP_SHARED_LIB)
])# PGAC_CHECK_STRIP

View file

@ -1,112 +0,0 @@
#
# Autoconf macros for configuring the build of Python extension modules
#
# config/python.m4
#
# PGAC_PATH_PYTHON
# ----------------
# Look for Python and set the output variable 'PYTHON'
# to 'python' if found, empty otherwise.
AC_DEFUN([PGAC_PATH_PYTHON],
[AC_PATH_PROG(PYTHON, python)
if test x"$PYTHON" = x""; then
AC_MSG_ERROR([Python not found])
fi
])
# _PGAC_CHECK_PYTHON_DIRS
# -----------------------
# Determine the name of various directories of a given Python installation.
AC_DEFUN([_PGAC_CHECK_PYTHON_DIRS],
[AC_REQUIRE([PGAC_PATH_PYTHON])
AC_MSG_CHECKING([for Python distutils module])
if "${PYTHON}" -c 'import distutils' 2>&AS_MESSAGE_LOG_FD
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([distutils module not found])
fi
AC_MSG_CHECKING([Python configuration directory])
python_majorversion=`${PYTHON} -c "import sys; print(sys.version[[0]])"`
python_version=`${PYTHON} -c "import sys; print(sys.version[[:3]])"`
python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
AC_MSG_RESULT([$python_configdir])
AC_MSG_CHECKING([Python include directories])
python_includespec=`${PYTHON} -c "
import distutils.sysconfig
a = '-I' + distutils.sysconfig.get_python_inc(False)
b = '-I' + distutils.sysconfig.get_python_inc(True)
if a == b:
print(a)
else:
print(a + ' ' + b)"`
AC_MSG_RESULT([$python_includespec])
AC_SUBST(python_majorversion)[]dnl
AC_SUBST(python_version)[]dnl
AC_SUBST(python_includespec)[]dnl
])# _PGAC_CHECK_PYTHON_DIRS
# PGAC_CHECK_PYTHON_EMBED_SETUP
# -----------------------------
#
# Note: selecting libpython from python_configdir works in all Python
# releases, but it generally finds a non-shared library, which means
# that we are binding the python interpreter right into libplpython.so.
# In Python 2.3 and up there should be a shared library available in
# the main library location.
AC_DEFUN([PGAC_CHECK_PYTHON_EMBED_SETUP],
[AC_REQUIRE([_PGAC_CHECK_PYTHON_DIRS])
AC_MSG_CHECKING([how to link an embedded Python application])
python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
then
# New way: use the official shared library
ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
python_libspec="-L${python_libdir} -l${ldlibrary}"
else
# Old way: use libpython from python_configdir
python_libdir="${python_configdir}"
# LDVERSION was introduced in Python 3.2.
python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
if test x"${python_ldversion}" = x""; then
python_ldversion=$python_version
fi
python_libspec="-L${python_libdir} -lpython${python_ldversion}"
fi
python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
AC_MSG_RESULT([${python_libspec} ${python_additional_libs}])
AC_SUBST(python_libdir)[]dnl
AC_SUBST(python_libspec)[]dnl
AC_SUBST(python_additional_libs)[]dnl
AC_SUBST(python_enable_shared)[]dnl
# threaded python is not supported on OpenBSD
AC_MSG_CHECKING(whether Python is compiled with thread support)
pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"`
if test "$pythreads" = "1"; then
AC_MSG_RESULT(yes)
case $host_os in
openbsd*)
AC_MSG_ERROR([threaded Python not supported on this platform])
;;
esac
else
AC_MSG_RESULT(no)
fi
])# PGAC_CHECK_PYTHON_EMBED_SETUP

View file

@ -1,93 +0,0 @@
# config/tcl.m4
# Autoconf macros to check for Tcl related things
AC_DEFUN([PGAC_PATH_TCLSH],
[AC_PATH_PROGS(TCLSH, [tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83])
if test x"$TCLSH" = x""; then
AC_MSG_ERROR([Tcl shell not found])
fi
])
# PGAC_PATH_TCLCONFIGSH([SEARCH-PATH])
# ------------------------------------
AC_DEFUN([PGAC_PATH_TCLCONFIGSH],
[AC_REQUIRE([PGAC_PATH_TCLSH])[]dnl
AC_BEFORE([$0], [PGAC_PATH_TKCONFIGSH])[]dnl
AC_MSG_CHECKING([for tclConfig.sh])
# Let user override test
if test -z "$TCL_CONFIG_SH"; then
pgac_test_dirs="$1"
set X $pgac_test_dirs; shift
if test $[#] -eq 0; then
test -z "$TCLSH" && AC_MSG_ERROR([unable to locate tclConfig.sh because no Tcl shell was found])
set X `echo 'puts $auto_path' | $TCLSH`; shift
fi
for pgac_dir do
if test -r "$pgac_dir/tclConfig.sh"; then
TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
break
fi
done
fi
if test -z "$TCL_CONFIG_SH"; then
AC_MSG_RESULT(no)
AC_MSG_ERROR([file 'tclConfig.sh' is required for Tcl])
else
AC_MSG_RESULT([$TCL_CONFIG_SH])
fi
AC_SUBST([TCL_CONFIG_SH])
])# PGAC_PATH_TCLCONFIGSH
# PGAC_PATH_TKCONFIGSH([SEARCH-PATH])
# ------------------------------------
AC_DEFUN([PGAC_PATH_TKCONFIGSH],
[AC_REQUIRE([PGAC_PATH_TCLSH])[]dnl
AC_MSG_CHECKING([for tkConfig.sh])
# Let user override test
if test -z "$TK_CONFIG_SH"; then
pgac_test_dirs="$1"
set X $pgac_test_dirs; shift
if test $[#] -eq 0; then
test -z "$TCLSH" && AC_MSG_ERROR([unable to locate tkConfig.sh because no Tcl shell was found])
set X `echo 'puts $auto_path' | $TCLSH`; shift
fi
for pgac_dir do
if test -r "$pgac_dir/tkConfig.sh"; then
TK_CONFIG_SH=$pgac_dir/tkConfig.sh
break
fi
done
fi
if test -z "$TK_CONFIG_SH"; then
AC_MSG_RESULT(no)
AC_MSG_ERROR([file 'tkConfig.sh' is required for Tk])
else
AC_MSG_RESULT([$TK_CONFIG_SH])
fi
AC_SUBST([TK_CONFIG_SH])
])# PGAC_PATH_TKCONFIGSH
# PGAC_EVAL_TCLCONFIGSH(FILE, WANTED-VARS)
# ----------------------------------------
# Assigns variables listed in WANTED-VARS by reading FILE and
# evaluating it according to the quoting scheme of tclConfig.sh and
# tkConfig.sh. Calls AC_SUBST for each variable.
AC_DEFUN([PGAC_EVAL_TCLCONFIGSH],
[. "$1"
m4_foreach([pgac_item], [$2],
[eval pgac_item=\"[$]pgac_item\"
AC_SUBST(pgac_item)])])

View file

@ -1,5 +0,0 @@
/*
* For the raison d'etre of this file, check the comment above the definition
* of the PGAC_C_INLINE macro in config/c-compiler.m4.
*/
static inline int fun () { return 0; }

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,87 +0,0 @@
# contrib/Makefile
subdir = contrib
top_builddir = ..
include $(top_builddir)/src/Makefile.global
SUBDIRS = \
adminpack \
auth_delay \
auto_explain \
btree_gin \
btree_gist \
chkpass \
citext \
cube \
dblink \
dict_int \
dict_xsyn \
dummy_seclabel \
earthdistance \
file_fdw \
fuzzystrmatch \
hstore \
intagg \
intarray \
isn \
lo \
ltree \
oid2name \
pageinspect \
passwordcheck \
pg_archivecleanup \
pg_buffercache \
pg_freespacemap \
pg_standby \
pg_stat_statements \
pg_test_fsync \
pg_test_timing \
pg_trgm \
pg_upgrade \
pg_upgrade_support \
pgbench \
pgcrypto \
pgrowlocks \
pgstattuple \
pg_xlogdump \
postgres_fdw \
seg \
spi \
tablefunc \
tcn \
test_parser \
tsearch2 \
unaccent \
vacuumlo \
worker_spi
ifeq ($(with_openssl),yes)
SUBDIRS += sslinfo
else
ALWAYS_SUBDIRS += sslinfo
endif
ifeq ($(with_ossp_uuid),yes)
SUBDIRS += uuid-ossp
else
ALWAYS_SUBDIRS += uuid-ossp
endif
ifeq ($(with_libxml),yes)
SUBDIRS += xml2
else
ALWAYS_SUBDIRS += xml2
endif
ifeq ($(with_selinux),yes)
SUBDIRS += sepgsql
else
ALWAYS_SUBDIRS += sepgsql
endif
# Missing:
# start-scripts \ (does not have a makefile)
$(recurse)
$(recurse_always)

View file

@ -1,28 +0,0 @@
The PostgreSQL contrib tree
---------------------------
This subtree contains porting tools, analysis utilities, and plug-in
features that are not part of the core PostgreSQL system, mainly
because they address a limited audience or are too experimental to be
part of the main source tree. This does not preclude their
usefulness.
User documentation for each module appears in the main SGML
documentation.
When building from the source distribution, these modules are not
built automatically, unless you build the "world" target. You can
also build and install them all by running "gmake all" and "gmake
install" in this directory; or to build and install just one selected
module, do the same in that module's subdirectory.
Some directories supply new user-defined functions, operators, or
types. To make use of one of these modules, after you have installed
the code you need to register the new SQL objects in the database
system by executing a CREATE EXTENSION command. In a fresh database,
you can simply do
CREATE EXTENSION module_name;
See the PostgreSQL documentation for more information about this
procedure.

View file

@ -1,19 +0,0 @@
# contrib/adminpack/Makefile
MODULE_big = adminpack
OBJS = adminpack.o
PG_CPPFLAGS = -I$(libpq_srcdir)
EXTENSION = adminpack
DATA = adminpack--1.0.sql
ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/adminpack
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif

View file

@ -1,53 +0,0 @@
/* contrib/adminpack/adminpack--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION adminpack" to load this file. \quit
/* ***********************************************
* Administrative functions for PostgreSQL
* *********************************************** */
/* generic file access functions */
CREATE FUNCTION pg_catalog.pg_file_write(text, text, bool)
RETURNS bigint
AS 'MODULE_PATHNAME', 'pg_file_write'
LANGUAGE C VOLATILE STRICT;
CREATE FUNCTION pg_catalog.pg_file_rename(text, text, text)
RETURNS bool
AS 'MODULE_PATHNAME', 'pg_file_rename'
LANGUAGE C VOLATILE;
CREATE FUNCTION pg_catalog.pg_file_rename(text, text)
RETURNS bool
AS 'SELECT pg_catalog.pg_file_rename($1, $2, NULL::pg_catalog.text);'
LANGUAGE SQL VOLATILE STRICT;
CREATE FUNCTION pg_catalog.pg_file_unlink(text)
RETURNS bool
AS 'MODULE_PATHNAME', 'pg_file_unlink'
LANGUAGE C VOLATILE STRICT;
CREATE FUNCTION pg_catalog.pg_logdir_ls()
RETURNS setof record
AS 'MODULE_PATHNAME', 'pg_logdir_ls'
LANGUAGE C VOLATILE STRICT;
/* Renaming of existing backend functions for pgAdmin compatibility */
CREATE FUNCTION pg_catalog.pg_file_read(text, bigint, bigint)
RETURNS text
AS 'pg_read_file'
LANGUAGE INTERNAL VOLATILE STRICT;
CREATE FUNCTION pg_catalog.pg_file_length(text)
RETURNS bigint
AS 'SELECT size FROM pg_catalog.pg_stat_file($1)'
LANGUAGE SQL VOLATILE STRICT;
CREATE FUNCTION pg_catalog.pg_logfile_rotate()
RETURNS int4
AS 'pg_rotate_logfile'
LANGUAGE INTERNAL VOLATILE STRICT;

View file

@ -1,389 +0,0 @@
/*-------------------------------------------------------------------------
*
* adminpack.c
*
*
* Copyright (c) 2002-2013, PostgreSQL Global Development Group
*
* Author: Andreas Pflug <pgadmin@pse-consulting.de>
*
* IDENTIFICATION
* contrib/adminpack/adminpack.c
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <sys/file.h>
#include <sys/stat.h>
#include <unistd.h>
#include "catalog/pg_type.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "postmaster/syslogger.h"
#include "storage/fd.h"
#include "utils/builtins.h"
#include "utils/datetime.h"
#ifdef WIN32
#ifdef rename
#undef rename
#endif
#ifdef unlink
#undef unlink
#endif
#endif
PG_MODULE_MAGIC;
Datum pg_file_write(PG_FUNCTION_ARGS);
Datum pg_file_rename(PG_FUNCTION_ARGS);
Datum pg_file_unlink(PG_FUNCTION_ARGS);
Datum pg_logdir_ls(PG_FUNCTION_ARGS);
PG_FUNCTION_INFO_V1(pg_file_write);
PG_FUNCTION_INFO_V1(pg_file_rename);
PG_FUNCTION_INFO_V1(pg_file_unlink);
PG_FUNCTION_INFO_V1(pg_logdir_ls);
typedef struct
{
char *location;
DIR *dirdesc;
} directory_fctx;
/*-----------------------
* some helper functions
*/
/*
* Convert a "text" filename argument to C string, and check it's allowable.
*
* Filename may be absolute or relative to the DataDir, but we only allow
* absolute paths that match DataDir or Log_directory.
*/
static char *
convert_and_check_filename(text *arg, bool logAllowed)
{
char *filename = text_to_cstring(arg);
canonicalize_path(filename); /* filename can change length here */
if (is_absolute_path(filename))
{
/* Disallow '/a/b/data/..' */
if (path_contains_parent_reference(filename))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
(errmsg("reference to parent directory (\"..\") not allowed"))));
/*
* Allow absolute paths if within DataDir or Log_directory, even
* though Log_directory might be outside DataDir.
*/
if (!path_is_prefix_of_path(DataDir, filename) &&
(!logAllowed || !is_absolute_path(Log_directory) ||
!path_is_prefix_of_path(Log_directory, filename)))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
(errmsg("absolute path not allowed"))));
}
else if (!path_is_relative_and_below_cwd(filename))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
(errmsg("path must be in or below the current directory"))));
return filename;
}
/*
* check for superuser, bark if not.
*/
static void
requireSuperuser(void)
{
if (!superuser())
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
(errmsg("only superuser may access generic file functions"))));
}
/* ------------------------------------
* generic file handling functions
*/
Datum
pg_file_write(PG_FUNCTION_ARGS)
{
FILE *f;
char *filename;
text *data;
int64 count = 0;
requireSuperuser();
filename = convert_and_check_filename(PG_GETARG_TEXT_P(0), false);
data = PG_GETARG_TEXT_P(1);
if (!PG_GETARG_BOOL(2))
{
struct stat fst;
if (stat(filename, &fst) >= 0)
ereport(ERROR,
(ERRCODE_DUPLICATE_FILE,
errmsg("file \"%s\" exists", filename)));
f = fopen(filename, "wb");
}
else
f = fopen(filename, "ab");
if (!f)
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not open file \"%s\" for writing: %m",
filename)));
if (VARSIZE(data) != 0)
{
count = fwrite(VARDATA(data), 1, VARSIZE(data) - VARHDRSZ, f);
if (count != VARSIZE(data) - VARHDRSZ)
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not write file \"%s\": %m", filename)));
}
fclose(f);
PG_RETURN_INT64(count);
}
Datum
pg_file_rename(PG_FUNCTION_ARGS)
{
char *fn1,
*fn2,
*fn3;
int rc;
requireSuperuser();
if (PG_ARGISNULL(0) || PG_ARGISNULL(1))
PG_RETURN_NULL();
fn1 = convert_and_check_filename(PG_GETARG_TEXT_P(0), false);
fn2 = convert_and_check_filename(PG_GETARG_TEXT_P(1), false);
if (PG_ARGISNULL(2))
fn3 = 0;
else
fn3 = convert_and_check_filename(PG_GETARG_TEXT_P(2), false);
if (access(fn1, W_OK) < 0)
{
ereport(WARNING,
(errcode_for_file_access(),
errmsg("file \"%s\" is not accessible: %m", fn1)));
PG_RETURN_BOOL(false);
}
if (fn3 && access(fn2, W_OK) < 0)
{
ereport(WARNING,
(errcode_for_file_access(),
errmsg("file \"%s\" is not accessible: %m", fn2)));
PG_RETURN_BOOL(false);
}
rc = access(fn3 ? fn3 : fn2, 2);
if (rc >= 0 || errno != ENOENT)
{
ereport(ERROR,
(ERRCODE_DUPLICATE_FILE,
errmsg("cannot rename to target file \"%s\"",
fn3 ? fn3 : fn2)));
}
if (fn3)
{
if (rename(fn2, fn3) != 0)
{
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not rename \"%s\" to \"%s\": %m",
fn2, fn3)));
}
if (rename(fn1, fn2) != 0)
{
ereport(WARNING,
(errcode_for_file_access(),
errmsg("could not rename \"%s\" to \"%s\": %m",
fn1, fn2)));
if (rename(fn3, fn2) != 0)
{
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not rename \"%s\" back to \"%s\": %m",
fn3, fn2)));
}
else
{
ereport(ERROR,
(ERRCODE_UNDEFINED_FILE,
errmsg("renaming \"%s\" to \"%s\" was reverted",
fn2, fn3)));
}
}
}
else if (rename(fn1, fn2) != 0)
{
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not rename \"%s\" to \"%s\": %m", fn1, fn2)));
}
PG_RETURN_BOOL(true);
}
Datum
pg_file_unlink(PG_FUNCTION_ARGS)
{
char *filename;
requireSuperuser();
filename = convert_and_check_filename(PG_GETARG_TEXT_P(0), false);
if (access(filename, W_OK) < 0)
{
if (errno == ENOENT)
PG_RETURN_BOOL(false);
else
ereport(ERROR,
(errcode_for_file_access(),
errmsg("file \"%s\" is not accessible: %m", filename)));
}
if (unlink(filename) < 0)
{
ereport(WARNING,
(errcode_for_file_access(),
errmsg("could not unlink file \"%s\": %m", filename)));
PG_RETURN_BOOL(false);
}
PG_RETURN_BOOL(true);
}
Datum
pg_logdir_ls(PG_FUNCTION_ARGS)
{
FuncCallContext *funcctx;
struct dirent *de;
directory_fctx *fctx;
if (!superuser())
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
(errmsg("only superuser can list the log directory"))));
if (strcmp(Log_filename, "postgresql-%Y-%m-%d_%H%M%S.log") != 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
(errmsg("the log_filename parameter must equal 'postgresql-%%Y-%%m-%%d_%%H%%M%%S.log'"))));
if (SRF_IS_FIRSTCALL())
{
MemoryContext oldcontext;
TupleDesc tupdesc;
funcctx = SRF_FIRSTCALL_INIT();
oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
fctx = palloc(sizeof(directory_fctx));
tupdesc = CreateTemplateTupleDesc(2, false);
TupleDescInitEntry(tupdesc, (AttrNumber) 1, "starttime",
TIMESTAMPOID, -1, 0);
TupleDescInitEntry(tupdesc, (AttrNumber) 2, "filename",
TEXTOID, -1, 0);
funcctx->attinmeta = TupleDescGetAttInMetadata(tupdesc);
fctx->location = pstrdup(Log_directory);
fctx->dirdesc = AllocateDir(fctx->location);
if (!fctx->dirdesc)
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not read directory \"%s\": %m",
fctx->location)));
funcctx->user_fctx = fctx;
MemoryContextSwitchTo(oldcontext);
}
funcctx = SRF_PERCALL_SETUP();
fctx = (directory_fctx *) funcctx->user_fctx;
while ((de = ReadDir(fctx->dirdesc, fctx->location)) != NULL)
{
char *values[2];
HeapTuple tuple;
char timestampbuf[32];
char *field[MAXDATEFIELDS];
char lowstr[MAXDATELEN + 1];
int dtype;
int nf,
ftype[MAXDATEFIELDS];
fsec_t fsec;
int tz = 0;
struct pg_tm date;
/*
* Default format: postgresql-YYYY-MM-DD_HHMMSS.log
*/
if (strlen(de->d_name) != 32
|| strncmp(de->d_name, "postgresql-", 11) != 0
|| de->d_name[21] != '_'
|| strcmp(de->d_name + 28, ".log") != 0)
continue;
/* extract timestamp portion of filename */
strcpy(timestampbuf, de->d_name + 11);
timestampbuf[17] = '\0';
/* parse and decode expected timestamp to verify it's OK format */
if (ParseDateTime(timestampbuf, lowstr, MAXDATELEN, field, ftype, MAXDATEFIELDS, &nf))
continue;
if (DecodeDateTime(field, ftype, nf, &dtype, &date, &fsec, &tz))
continue;
/* Seems the timestamp is OK; prepare and return tuple */
values[0] = timestampbuf;
values[1] = palloc(strlen(fctx->location) + strlen(de->d_name) + 2);
sprintf(values[1], "%s/%s", fctx->location, de->d_name);
tuple = BuildTupleFromCStrings(funcctx->attinmeta, values);
SRF_RETURN_NEXT(funcctx, HeapTupleGetDatum(tuple));
}
FreeDir(fctx->dirdesc);
SRF_RETURN_DONE(funcctx);
}

View file

@ -1,6 +0,0 @@
# adminpack extension
comment = 'administrative functions for PostgreSQL'
default_version = '1.0'
module_pathname = '$libdir/adminpack'
relocatable = false
schema = pg_catalog

View file

@ -1,14 +0,0 @@
# contrib/auth_delay/Makefile
MODULES = auth_delay
ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/auth_delay
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif

View file

@ -1,71 +0,0 @@
/* -------------------------------------------------------------------------
*
* auth_delay.c
*
* Copyright (C) 2010-2011, PostgreSQL Global Development Group
*
* IDENTIFICATION
* contrib/auth_delay/auth_delay.c
*
* -------------------------------------------------------------------------
*/
#include "postgres.h"
#include "libpq/auth.h"
#include "port.h"
#include "utils/guc.h"
#include "utils/timestamp.h"
PG_MODULE_MAGIC;
void _PG_init(void);
/* GUC Variables */
static int auth_delay_milliseconds;
/* Original Hook */
static ClientAuthentication_hook_type original_client_auth_hook = NULL;
/*
* Check authentication
*/
static void
auth_delay_checks(Port *port, int status)
{
/*
* Any other plugins which use ClientAuthentication_hook.
*/
if (original_client_auth_hook)
original_client_auth_hook(port, status);
/*
* Inject a short delay if authentication failed.
*/
if (status != STATUS_OK)
{
pg_usleep(1000L * auth_delay_milliseconds);
}
}
/*
* Module Load Callback
*/
void
_PG_init(void)
{
/* Define custom GUC variables */
DefineCustomIntVariable("auth_delay.milliseconds",
"Milliseconds to delay before reporting authentication failure",
NULL,
&auth_delay_milliseconds,
0,
0, INT_MAX / 1000,
PGC_SIGHUP,
GUC_UNIT_MS,
NULL,
NULL,
NULL);
/* Install Hooks */
original_client_auth_hook = ClientAuthentication_hook;
ClientAuthentication_hook = auth_delay_checks;
}

View file

@ -1,15 +0,0 @@
# contrib/auto_explain/Makefile
MODULE_big = auto_explain
OBJS = auto_explain.o
ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/auto_explain
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif

View file

@ -1,330 +0,0 @@
/*-------------------------------------------------------------------------
*
* auto_explain.c
*
*
* Copyright (c) 2008-2013, PostgreSQL Global Development Group
*
* IDENTIFICATION
* contrib/auto_explain/auto_explain.c
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <limits.h>
#include "commands/explain.h"
#include "executor/instrument.h"
#include "utils/guc.h"
PG_MODULE_MAGIC;
/* GUC variables */
static int auto_explain_log_min_duration = -1; /* msec or -1 */
static bool auto_explain_log_analyze = false;
static bool auto_explain_log_verbose = false;
static bool auto_explain_log_buffers = false;
static bool auto_explain_log_timing = false;
static int auto_explain_log_format = EXPLAIN_FORMAT_TEXT;
static bool auto_explain_log_nested_statements = false;
static const struct config_enum_entry format_options[] = {
{"text", EXPLAIN_FORMAT_TEXT, false},
{"xml", EXPLAIN_FORMAT_XML, false},
{"json", EXPLAIN_FORMAT_JSON, false},
{"yaml", EXPLAIN_FORMAT_YAML, false},
{NULL, 0, false}
};
/* Current nesting depth of ExecutorRun calls */
static int nesting_level = 0;
/* Saved hook values in case of unload */
static ExecutorStart_hook_type prev_ExecutorStart = NULL;
static ExecutorRun_hook_type prev_ExecutorRun = NULL;
static ExecutorFinish_hook_type prev_ExecutorFinish = NULL;
static ExecutorEnd_hook_type prev_ExecutorEnd = NULL;
#define auto_explain_enabled() \
(auto_explain_log_min_duration >= 0 && \
(nesting_level == 0 || auto_explain_log_nested_statements))
void _PG_init(void);
void _PG_fini(void);
static void explain_ExecutorStart(QueryDesc *queryDesc, int eflags);
static void explain_ExecutorRun(QueryDesc *queryDesc,
ScanDirection direction,
long count);
static void explain_ExecutorFinish(QueryDesc *queryDesc);
static void explain_ExecutorEnd(QueryDesc *queryDesc);
/*
* Module load callback
*/
void
_PG_init(void)
{
/* Define custom GUC variables. */
DefineCustomIntVariable("auto_explain.log_min_duration",
"Sets the minimum execution time above which plans will be logged.",
"Zero prints all plans. -1 turns this feature off.",
&auto_explain_log_min_duration,
-1,
-1, INT_MAX / 1000,
PGC_SUSET,
GUC_UNIT_MS,
NULL,
NULL,
NULL);
DefineCustomBoolVariable("auto_explain.log_analyze",
"Use EXPLAIN ANALYZE for plan logging.",
NULL,
&auto_explain_log_analyze,
false,
PGC_SUSET,
0,
NULL,
NULL,
NULL);
DefineCustomBoolVariable("auto_explain.log_verbose",
"Use EXPLAIN VERBOSE for plan logging.",
NULL,
&auto_explain_log_verbose,
false,
PGC_SUSET,
0,
NULL,
NULL,
NULL);
DefineCustomBoolVariable("auto_explain.log_buffers",
"Log buffers usage.",
NULL,
&auto_explain_log_buffers,
false,
PGC_SUSET,
0,
NULL,
NULL,
NULL);
DefineCustomEnumVariable("auto_explain.log_format",
"EXPLAIN format to be used for plan logging.",
NULL,
&auto_explain_log_format,
EXPLAIN_FORMAT_TEXT,
format_options,
PGC_SUSET,
0,
NULL,
NULL,
NULL);
DefineCustomBoolVariable("auto_explain.log_nested_statements",
"Log nested statements.",
NULL,
&auto_explain_log_nested_statements,
false,
PGC_SUSET,
0,
NULL,
NULL,
NULL);
DefineCustomBoolVariable("auto_explain.log_timing",
"Collect timing data, not just row counts.",
NULL,
&auto_explain_log_timing,
true,
PGC_SUSET,
0,
NULL,
NULL,
NULL);
EmitWarningsOnPlaceholders("auto_explain");
/* Install hooks. */
prev_ExecutorStart = ExecutorStart_hook;
ExecutorStart_hook = explain_ExecutorStart;
prev_ExecutorRun = ExecutorRun_hook;
ExecutorRun_hook = explain_ExecutorRun;
prev_ExecutorFinish = ExecutorFinish_hook;
ExecutorFinish_hook = explain_ExecutorFinish;
prev_ExecutorEnd = ExecutorEnd_hook;
ExecutorEnd_hook = explain_ExecutorEnd;
}
/*
* Module unload callback
*/
void
_PG_fini(void)
{
/* Uninstall hooks. */
ExecutorStart_hook = prev_ExecutorStart;
ExecutorRun_hook = prev_ExecutorRun;
ExecutorFinish_hook = prev_ExecutorFinish;
ExecutorEnd_hook = prev_ExecutorEnd;
}
/*
* ExecutorStart hook: start up logging if needed
*/
static void
explain_ExecutorStart(QueryDesc *queryDesc, int eflags)
{
if (auto_explain_enabled())
{
/* Enable per-node instrumentation iff log_analyze is required. */
if (auto_explain_log_analyze && (eflags & EXEC_FLAG_EXPLAIN_ONLY) == 0)
{
if (auto_explain_log_timing)
queryDesc->instrument_options |= INSTRUMENT_TIMER;
else
queryDesc->instrument_options |= INSTRUMENT_ROWS;
if (auto_explain_log_buffers)
queryDesc->instrument_options |= INSTRUMENT_BUFFERS;
}
}
if (prev_ExecutorStart)
prev_ExecutorStart(queryDesc, eflags);
else
standard_ExecutorStart(queryDesc, eflags);
if (auto_explain_enabled())
{
/*
* Set up to track total elapsed time in ExecutorRun. Make sure the
* space is allocated in the per-query context so it will go away at
* ExecutorEnd.
*/
if (queryDesc->totaltime == NULL)
{
MemoryContext oldcxt;
oldcxt = MemoryContextSwitchTo(queryDesc->estate->es_query_cxt);
queryDesc->totaltime = InstrAlloc(1, INSTRUMENT_ALL);
MemoryContextSwitchTo(oldcxt);
}
}
}
/*
* ExecutorRun hook: all we need do is track nesting depth
*/
static void
explain_ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, long count)
{
nesting_level++;
PG_TRY();
{
if (prev_ExecutorRun)
prev_ExecutorRun(queryDesc, direction, count);
else
standard_ExecutorRun(queryDesc, direction, count);
nesting_level--;
}
PG_CATCH();
{
nesting_level--;
PG_RE_THROW();
}
PG_END_TRY();
}
/*
* ExecutorFinish hook: all we need do is track nesting depth
*/
static void
explain_ExecutorFinish(QueryDesc *queryDesc)
{
nesting_level++;
PG_TRY();
{
if (prev_ExecutorFinish)
prev_ExecutorFinish(queryDesc);
else
standard_ExecutorFinish(queryDesc);
nesting_level--;
}
PG_CATCH();
{
nesting_level--;
PG_RE_THROW();
}
PG_END_TRY();
}
/*
* ExecutorEnd hook: log results if needed
*/
static void
explain_ExecutorEnd(QueryDesc *queryDesc)
{
if (queryDesc->totaltime && auto_explain_enabled())
{
double msec;
/*
* Make sure stats accumulation is done. (Note: it's okay if several
* levels of hook all do this.)
*/
InstrEndLoop(queryDesc->totaltime);
/* Log plan if duration is exceeded. */
msec = queryDesc->totaltime->total * 1000.0;
if (msec >= auto_explain_log_min_duration)
{
ExplainState es;
ExplainInitState(&es);
es.analyze = (queryDesc->instrument_options && auto_explain_log_analyze);
es.verbose = auto_explain_log_verbose;
es.buffers = (es.analyze && auto_explain_log_buffers);
es.format = auto_explain_log_format;
ExplainBeginOutput(&es);
ExplainQueryText(&es, queryDesc);
ExplainPrintPlan(&es, queryDesc);
ExplainEndOutput(&es);
/* Remove last line break */
if (es.str->len > 0 && es.str->data[es.str->len - 1] == '\n')
es.str->data[--es.str->len] = '\0';
/* Fix JSON to output an object */
if (auto_explain_log_format == EXPLAIN_FORMAT_JSON)
{
es.str->data[0] = '{';
es.str->data[es.str->len - 1] = '}';
}
/*
* Note: we rely on the existing logging of context or
* debug_query_string to identify just which statement is being
* reported. This isn't ideal but trying to do it here would
* often result in duplication.
*/
ereport(LOG,
(errmsg("duration: %.3f ms plan:\n%s",
msec, es.str->data),
errhidestmt(true)));
pfree(es.str->data);
}
}
if (prev_ExecutorEnd)
prev_ExecutorEnd(queryDesc);
else
standard_ExecutorEnd(queryDesc);
}

View file

@ -1,4 +0,0 @@
# Generated subdirectories
/log/
/results/
/tmp_check/

View file

@ -1,23 +0,0 @@
# contrib/btree_gin/Makefile
MODULE_big = btree_gin
OBJS = btree_gin.o
EXTENSION = btree_gin
DATA = btree_gin--1.0.sql btree_gin--unpackaged--1.0.sql
REGRESS = install_btree_gin int2 int4 int8 float4 float8 money oid \
timestamp timestamptz time timetz date interval \
macaddr inet cidr text varchar char bytea bit varbit \
numeric
ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/btree_gin
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif

View file

@ -1,689 +0,0 @@
/* contrib/btree_gin/btree_gin--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION btree_gin" to load this file. \quit
CREATE FUNCTION gin_btree_consistent(internal, int2, anyelement, int4, internal, internal)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_value_int2(int2, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_int2(int2, int2, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_int2(int2, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS int2_ops
DEFAULT FOR TYPE int2 USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 btint2cmp(int2,int2),
FUNCTION 2 gin_extract_value_int2(int2, internal),
FUNCTION 3 gin_extract_query_int2(int2, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_int2(int2,int2,int2, internal),
STORAGE int2;
CREATE FUNCTION gin_extract_value_int4(int4, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_int4(int4, int4, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_int4(int4, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS int4_ops
DEFAULT FOR TYPE int4 USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 btint4cmp(int4,int4),
FUNCTION 2 gin_extract_value_int4(int4, internal),
FUNCTION 3 gin_extract_query_int4(int4, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_int4(int4,int4,int2, internal),
STORAGE int4;
CREATE FUNCTION gin_extract_value_int8(int8, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_int8(int8, int8, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_int8(int8, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS int8_ops
DEFAULT FOR TYPE int8 USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 btint8cmp(int8,int8),
FUNCTION 2 gin_extract_value_int8(int8, internal),
FUNCTION 3 gin_extract_query_int8(int8, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_int8(int8,int8,int2, internal),
STORAGE int8;
CREATE FUNCTION gin_extract_value_float4(float4, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_float4(float4, float4, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_float4(float4, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS float4_ops
DEFAULT FOR TYPE float4 USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 btfloat4cmp(float4,float4),
FUNCTION 2 gin_extract_value_float4(float4, internal),
FUNCTION 3 gin_extract_query_float4(float4, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_float4(float4,float4,int2, internal),
STORAGE float4;
CREATE FUNCTION gin_extract_value_float8(float8, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_float8(float8, float8, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_float8(float8, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS float8_ops
DEFAULT FOR TYPE float8 USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 btfloat8cmp(float8,float8),
FUNCTION 2 gin_extract_value_float8(float8, internal),
FUNCTION 3 gin_extract_query_float8(float8, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_float8(float8,float8,int2, internal),
STORAGE float8;
CREATE FUNCTION gin_extract_value_money(money, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_money(money, money, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_money(money, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS money_ops
DEFAULT FOR TYPE money USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 cash_cmp(money,money),
FUNCTION 2 gin_extract_value_money(money, internal),
FUNCTION 3 gin_extract_query_money(money, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_money(money,money,int2, internal),
STORAGE money;
CREATE FUNCTION gin_extract_value_oid(oid, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_oid(oid, oid, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_oid(oid, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS oid_ops
DEFAULT FOR TYPE oid USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 btoidcmp(oid,oid),
FUNCTION 2 gin_extract_value_oid(oid, internal),
FUNCTION 3 gin_extract_query_oid(oid, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_oid(oid,oid,int2, internal),
STORAGE oid;
CREATE FUNCTION gin_extract_value_timestamp(timestamp, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_timestamp(timestamp, timestamp, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_timestamp(timestamp, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS timestamp_ops
DEFAULT FOR TYPE timestamp USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 timestamp_cmp(timestamp,timestamp),
FUNCTION 2 gin_extract_value_timestamp(timestamp, internal),
FUNCTION 3 gin_extract_query_timestamp(timestamp, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_timestamp(timestamp,timestamp,int2, internal),
STORAGE timestamp;
CREATE FUNCTION gin_extract_value_timestamptz(timestamptz, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_timestamptz(timestamptz, timestamptz, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_timestamptz(timestamptz, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS timestamptz_ops
DEFAULT FOR TYPE timestamptz USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 timestamptz_cmp(timestamptz,timestamptz),
FUNCTION 2 gin_extract_value_timestamptz(timestamptz, internal),
FUNCTION 3 gin_extract_query_timestamptz(timestamptz, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_timestamptz(timestamptz,timestamptz,int2, internal),
STORAGE timestamptz;
CREATE FUNCTION gin_extract_value_time(time, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_time(time, time, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_time(time, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS time_ops
DEFAULT FOR TYPE time USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 time_cmp(time,time),
FUNCTION 2 gin_extract_value_time(time, internal),
FUNCTION 3 gin_extract_query_time(time, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_time(time,time,int2, internal),
STORAGE time;
CREATE FUNCTION gin_extract_value_timetz(timetz, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_timetz(timetz, timetz, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_timetz(timetz, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS timetz_ops
DEFAULT FOR TYPE timetz USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 timetz_cmp(timetz,timetz),
FUNCTION 2 gin_extract_value_timetz(timetz, internal),
FUNCTION 3 gin_extract_query_timetz(timetz, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_timetz(timetz,timetz,int2, internal),
STORAGE timetz;
CREATE FUNCTION gin_extract_value_date(date, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_date(date, date, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_date(date, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS date_ops
DEFAULT FOR TYPE date USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 date_cmp(date,date),
FUNCTION 2 gin_extract_value_date(date, internal),
FUNCTION 3 gin_extract_query_date(date, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_date(date,date,int2, internal),
STORAGE date;
CREATE FUNCTION gin_extract_value_interval(interval, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_interval(interval, interval, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_interval(interval, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS interval_ops
DEFAULT FOR TYPE interval USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 interval_cmp(interval,interval),
FUNCTION 2 gin_extract_value_interval(interval, internal),
FUNCTION 3 gin_extract_query_interval(interval, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_interval(interval,interval,int2, internal),
STORAGE interval;
CREATE FUNCTION gin_extract_value_macaddr(macaddr, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_macaddr(macaddr, macaddr, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_macaddr(macaddr, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS macaddr_ops
DEFAULT FOR TYPE macaddr USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 macaddr_cmp(macaddr,macaddr),
FUNCTION 2 gin_extract_value_macaddr(macaddr, internal),
FUNCTION 3 gin_extract_query_macaddr(macaddr, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_macaddr(macaddr,macaddr,int2, internal),
STORAGE macaddr;
CREATE FUNCTION gin_extract_value_inet(inet, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_inet(inet, inet, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_inet(inet, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS inet_ops
DEFAULT FOR TYPE inet USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 network_cmp(inet,inet),
FUNCTION 2 gin_extract_value_inet(inet, internal),
FUNCTION 3 gin_extract_query_inet(inet, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_inet(inet,inet,int2, internal),
STORAGE inet;
CREATE FUNCTION gin_extract_value_cidr(cidr, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_cidr(cidr, cidr, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_cidr(cidr, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS cidr_ops
DEFAULT FOR TYPE cidr USING gin
AS
OPERATOR 1 <(inet,inet),
OPERATOR 2 <=(inet,inet),
OPERATOR 3 =(inet,inet),
OPERATOR 4 >=(inet,inet),
OPERATOR 5 >(inet,inet),
FUNCTION 1 network_cmp(inet,inet),
FUNCTION 2 gin_extract_value_cidr(cidr, internal),
FUNCTION 3 gin_extract_query_cidr(cidr, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_cidr(cidr,cidr,int2, internal),
STORAGE cidr;
CREATE FUNCTION gin_extract_value_text(text, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_text(text, text, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_text(text, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS text_ops
DEFAULT FOR TYPE text USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 bttextcmp(text,text),
FUNCTION 2 gin_extract_value_text(text, internal),
FUNCTION 3 gin_extract_query_text(text, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_text(text,text,int2, internal),
STORAGE text;
CREATE OPERATOR CLASS varchar_ops
DEFAULT FOR TYPE varchar USING gin
AS
OPERATOR 1 <(text,text),
OPERATOR 2 <=(text,text),
OPERATOR 3 =(text,text),
OPERATOR 4 >=(text,text),
OPERATOR 5 >(text,text),
FUNCTION 1 bttextcmp(text,text),
FUNCTION 2 gin_extract_value_text(text, internal),
FUNCTION 3 gin_extract_query_text(text, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_text(text,text,int2, internal),
STORAGE varchar;
CREATE FUNCTION gin_extract_value_char("char", internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_char("char", "char", int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_char("char", internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS char_ops
DEFAULT FOR TYPE "char" USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 btcharcmp("char","char"),
FUNCTION 2 gin_extract_value_char("char", internal),
FUNCTION 3 gin_extract_query_char("char", internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_char("char","char",int2, internal),
STORAGE "char";
CREATE FUNCTION gin_extract_value_bytea(bytea, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_bytea(bytea, bytea, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_bytea(bytea, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS bytea_ops
DEFAULT FOR TYPE bytea USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 byteacmp(bytea,bytea),
FUNCTION 2 gin_extract_value_bytea(bytea, internal),
FUNCTION 3 gin_extract_query_bytea(bytea, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_bytea(bytea,bytea,int2, internal),
STORAGE bytea;
CREATE FUNCTION gin_extract_value_bit(bit, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_bit(bit, bit, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_bit(bit, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS bit_ops
DEFAULT FOR TYPE bit USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 bitcmp(bit,bit),
FUNCTION 2 gin_extract_value_bit(bit, internal),
FUNCTION 3 gin_extract_query_bit(bit, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_bit(bit,bit,int2, internal),
STORAGE bit;
CREATE FUNCTION gin_extract_value_varbit(varbit, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_varbit(varbit, varbit, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_varbit(varbit, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS varbit_ops
DEFAULT FOR TYPE varbit USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 varbitcmp(varbit,varbit),
FUNCTION 2 gin_extract_value_varbit(varbit, internal),
FUNCTION 3 gin_extract_query_varbit(varbit, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_varbit(varbit,varbit,int2, internal),
STORAGE varbit;
CREATE FUNCTION gin_extract_value_numeric(numeric, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_compare_prefix_numeric(numeric, numeric, int2, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_extract_query_numeric(numeric, internal, int2, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gin_numeric_cmp(numeric, numeric)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OPERATOR CLASS numeric_ops
DEFAULT FOR TYPE numeric USING gin
AS
OPERATOR 1 <,
OPERATOR 2 <=,
OPERATOR 3 =,
OPERATOR 4 >=,
OPERATOR 5 >,
FUNCTION 1 gin_numeric_cmp(numeric,numeric),
FUNCTION 2 gin_extract_value_numeric(numeric, internal),
FUNCTION 3 gin_extract_query_numeric(numeric, internal, int2, internal, internal),
FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 gin_compare_prefix_numeric(numeric,numeric,int2, internal),
STORAGE numeric;

View file

@ -1,119 +0,0 @@
/* contrib/btree_gin/btree_gin--unpackaged--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION btree_gin" to load this file. \quit
ALTER EXTENSION btree_gin ADD function gin_btree_consistent(internal,smallint,anyelement,integer,internal,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_value_int2(smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_int2(smallint,smallint,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_int2(smallint,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family int2_ops using gin;
ALTER EXTENSION btree_gin ADD operator class int2_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_int4(integer,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_int4(integer,integer,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_int4(integer,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family int4_ops using gin;
ALTER EXTENSION btree_gin ADD operator class int4_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_int8(bigint,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_int8(bigint,bigint,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_int8(bigint,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family int8_ops using gin;
ALTER EXTENSION btree_gin ADD operator class int8_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_float4(real,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_float4(real,real,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_float4(real,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family float4_ops using gin;
ALTER EXTENSION btree_gin ADD operator class float4_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_float8(double precision,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_float8(double precision,double precision,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_float8(double precision,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family float8_ops using gin;
ALTER EXTENSION btree_gin ADD operator class float8_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_money(money,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_money(money,money,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_money(money,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family money_ops using gin;
ALTER EXTENSION btree_gin ADD operator class money_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_oid(oid,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_oid(oid,oid,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_oid(oid,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family oid_ops using gin;
ALTER EXTENSION btree_gin ADD operator class oid_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_timestamp(timestamp without time zone,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_timestamp(timestamp without time zone,timestamp without time zone,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_timestamp(timestamp without time zone,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family timestamp_ops using gin;
ALTER EXTENSION btree_gin ADD operator class timestamp_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_timestamptz(timestamp with time zone,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_timestamptz(timestamp with time zone,timestamp with time zone,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_timestamptz(timestamp with time zone,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family timestamptz_ops using gin;
ALTER EXTENSION btree_gin ADD operator class timestamptz_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_time(time without time zone,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_time(time without time zone,time without time zone,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_time(time without time zone,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family time_ops using gin;
ALTER EXTENSION btree_gin ADD operator class time_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_timetz(time with time zone,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_timetz(time with time zone,time with time zone,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_timetz(time with time zone,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family timetz_ops using gin;
ALTER EXTENSION btree_gin ADD operator class timetz_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_date(date,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_date(date,date,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_date(date,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family date_ops using gin;
ALTER EXTENSION btree_gin ADD operator class date_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_interval(interval,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_interval(interval,interval,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_interval(interval,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family interval_ops using gin;
ALTER EXTENSION btree_gin ADD operator class interval_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_macaddr(macaddr,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_macaddr(macaddr,macaddr,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_macaddr(macaddr,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family macaddr_ops using gin;
ALTER EXTENSION btree_gin ADD operator class macaddr_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_inet(inet,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_inet(inet,inet,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_inet(inet,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family inet_ops using gin;
ALTER EXTENSION btree_gin ADD operator class inet_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_cidr(cidr,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_cidr(cidr,cidr,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_cidr(cidr,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family cidr_ops using gin;
ALTER EXTENSION btree_gin ADD operator class cidr_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_text(text,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_text(text,text,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_text(text,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family text_ops using gin;
ALTER EXTENSION btree_gin ADD operator class text_ops using gin;
ALTER EXTENSION btree_gin ADD operator family varchar_ops using gin;
ALTER EXTENSION btree_gin ADD operator class varchar_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_char("char",internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_char("char","char",smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_char("char",internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family char_ops using gin;
ALTER EXTENSION btree_gin ADD operator class char_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_bytea(bytea,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_bytea(bytea,bytea,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_bytea(bytea,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family bytea_ops using gin;
ALTER EXTENSION btree_gin ADD operator class bytea_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_bit(bit,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_bit(bit,bit,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_bit(bit,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family bit_ops using gin;
ALTER EXTENSION btree_gin ADD operator class bit_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_varbit(bit varying,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_varbit(bit varying,bit varying,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_varbit(bit varying,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD operator family varbit_ops using gin;
ALTER EXTENSION btree_gin ADD operator class varbit_ops using gin;
ALTER EXTENSION btree_gin ADD function gin_extract_value_numeric(numeric,internal);
ALTER EXTENSION btree_gin ADD function gin_compare_prefix_numeric(numeric,numeric,smallint,internal);
ALTER EXTENSION btree_gin ADD function gin_extract_query_numeric(numeric,internal,smallint,internal,internal);
ALTER EXTENSION btree_gin ADD function gin_numeric_cmp(numeric,numeric);
ALTER EXTENSION btree_gin ADD operator family numeric_ops using gin;
ALTER EXTENSION btree_gin ADD operator class numeric_ops using gin;

View file

@ -1,442 +0,0 @@
/*
* contrib/btree_gin/btree_gin.c
*/
#include "postgres.h"
#include <limits.h>
#include "access/skey.h"
#include "utils/builtins.h"
#include "utils/bytea.h"
#include "utils/cash.h"
#include "utils/date.h"
#include "utils/inet.h"
#include "utils/numeric.h"
#include "utils/timestamp.h"
#include "utils/varbit.h"
PG_MODULE_MAGIC;
typedef struct TypeInfo
{
bool is_varlena;
Datum (*leftmostvalue) (void);
Datum (*typecmp) (FunctionCallInfo);
} TypeInfo;
typedef struct QueryInfo
{
StrategyNumber strategy;
Datum datum;
} QueryInfo;
#define GIN_EXTRACT_VALUE(type) \
PG_FUNCTION_INFO_V1(gin_extract_value_##type); \
Datum gin_extract_value_##type(PG_FUNCTION_ARGS); \
Datum \
gin_extract_value_##type(PG_FUNCTION_ARGS) \
{ \
Datum datum = PG_GETARG_DATUM(0); \
int32 *nentries = (int32 *) PG_GETARG_POINTER(1); \
Datum *entries = (Datum *) palloc(sizeof(Datum)); \
\
if ( TypeInfo_##type.is_varlena ) \
datum = PointerGetDatum(PG_DETOAST_DATUM(datum)); \
entries[0] = datum; \
*nentries = 1; \
\
PG_RETURN_POINTER(entries); \
}
/*
* For BTGreaterEqualStrategyNumber, BTGreaterStrategyNumber, and
* BTEqualStrategyNumber we want to start the index scan at the
* supplied query datum, and work forward. For BTLessStrategyNumber
* and BTLessEqualStrategyNumber, we need to start at the leftmost
* key, and work forward until the supplied query datum (which must be
* sent along inside the QueryInfo structure).
*/
#define GIN_EXTRACT_QUERY(type) \
PG_FUNCTION_INFO_V1(gin_extract_query_##type); \
Datum gin_extract_query_##type(PG_FUNCTION_ARGS); \
Datum \
gin_extract_query_##type(PG_FUNCTION_ARGS) \
{ \
Datum datum = PG_GETARG_DATUM(0); \
int32 *nentries = (int32 *) PG_GETARG_POINTER(1); \
StrategyNumber strategy = PG_GETARG_UINT16(2); \
bool **partialmatch = (bool **) PG_GETARG_POINTER(3); \
Pointer **extra_data = (Pointer **) PG_GETARG_POINTER(4); \
Datum *entries = (Datum *) palloc(sizeof(Datum)); \
QueryInfo *data = (QueryInfo *) palloc(sizeof(QueryInfo)); \
bool *ptr_partialmatch; \
\
*nentries = 1; \
ptr_partialmatch = *partialmatch = (bool *) palloc(sizeof(bool)); \
*ptr_partialmatch = false; \
if ( TypeInfo_##type.is_varlena ) \
datum = PointerGetDatum(PG_DETOAST_DATUM(datum)); \
data->strategy = strategy; \
data->datum = datum; \
*extra_data = (Pointer *) palloc(sizeof(Pointer)); \
**extra_data = (Pointer) data; \
\
switch (strategy) \
{ \
case BTLessStrategyNumber: \
case BTLessEqualStrategyNumber: \
entries[0] = TypeInfo_##type.leftmostvalue(); \
*ptr_partialmatch = true; \
break; \
case BTGreaterEqualStrategyNumber: \
case BTGreaterStrategyNumber: \
*ptr_partialmatch = true; \
case BTEqualStrategyNumber: \
entries[0] = datum; \
break; \
default: \
elog(ERROR, "unrecognized strategy number: %d", strategy); \
} \
\
PG_RETURN_POINTER(entries); \
}
/*
* Datum a is a value from extract_query method and for BTLess*
* strategy it is a left-most value. So, use original datum from QueryInfo
* to decide to stop scanning or not. Datum b is always from index.
*/
#define GIN_COMPARE_PREFIX(type) \
PG_FUNCTION_INFO_V1(gin_compare_prefix_##type); \
Datum gin_compare_prefix_##type(PG_FUNCTION_ARGS); \
Datum \
gin_compare_prefix_##type(PG_FUNCTION_ARGS) \
{ \
Datum a = PG_GETARG_DATUM(0); \
Datum b = PG_GETARG_DATUM(1); \
QueryInfo *data = (QueryInfo *) PG_GETARG_POINTER(3); \
int32 res, \
cmp; \
\
cmp = DatumGetInt32(DirectFunctionCall2Coll( \
TypeInfo_##type.typecmp, \
PG_GET_COLLATION(), \
(data->strategy == BTLessStrategyNumber || \
data->strategy == BTLessEqualStrategyNumber) \
? data->datum : a, \
b)); \
\
switch (data->strategy) \
{ \
case BTLessStrategyNumber: \
/* If original datum > indexed one then return match */ \
if (cmp > 0) \
res = 0; \
else \
res = 1; \
break; \
case BTLessEqualStrategyNumber: \
/* The same except equality */ \
if (cmp >= 0) \
res = 0; \
else \
res = 1; \
break; \
case BTEqualStrategyNumber: \
if (cmp != 0) \
res = 1; \
else \
res = 0; \
break; \
case BTGreaterEqualStrategyNumber: \
/* If original datum <= indexed one then return match */ \
if (cmp <= 0) \
res = 0; \
else \
res = 1; \
break; \
case BTGreaterStrategyNumber: \
/* If original datum <= indexed one then return match */ \
/* If original datum == indexed one then continue scan */ \
if (cmp < 0) \
res = 0; \
else if (cmp == 0) \
res = -1; \
else \
res = 1; \
break; \
default: \
elog(ERROR, "unrecognized strategy number: %d", \
data->strategy); \
res = 0; \
} \
\
PG_RETURN_INT32(res); \
}
#define GIN_SUPPORT(type) \
GIN_EXTRACT_VALUE(type) \
GIN_EXTRACT_QUERY(type) \
GIN_COMPARE_PREFIX(type)
PG_FUNCTION_INFO_V1(gin_btree_consistent);
Datum gin_btree_consistent(PG_FUNCTION_ARGS);
Datum
gin_btree_consistent(PG_FUNCTION_ARGS)
{
bool *recheck = (bool *) PG_GETARG_POINTER(5);
*recheck = false;
PG_RETURN_BOOL(true);
}
static Datum
leftmostvalue_int2(void)
{
return Int16GetDatum(SHRT_MIN);
}
static TypeInfo TypeInfo_int2 = {false, leftmostvalue_int2, btint2cmp};
GIN_SUPPORT(int2)
static Datum
leftmostvalue_int4(void)
{
return Int32GetDatum(INT_MIN);
}
static TypeInfo TypeInfo_int4 = {false, leftmostvalue_int4, btint4cmp};
GIN_SUPPORT(int4)
static Datum
leftmostvalue_int8(void)
{
/*
* Use sequence's definition to keep compatibility.
*/
return Int64GetDatum(SEQ_MINVALUE);
}
static TypeInfo TypeInfo_int8 = {false, leftmostvalue_int8, btint8cmp};
GIN_SUPPORT(int8)
static Datum
leftmostvalue_float4(void)
{
return Float4GetDatum(-get_float4_infinity());
}
static TypeInfo TypeInfo_float4 = {false, leftmostvalue_float4, btfloat4cmp};
GIN_SUPPORT(float4)
static Datum
leftmostvalue_float8(void)
{
return Float8GetDatum(-get_float8_infinity());
}
static TypeInfo TypeInfo_float8 = {false, leftmostvalue_float8, btfloat8cmp};
GIN_SUPPORT(float8)
static Datum
leftmostvalue_money(void)
{
/*
* Use sequence's definition to keep compatibility.
*/
return Int64GetDatum(SEQ_MINVALUE);
}
static TypeInfo TypeInfo_money = {false, leftmostvalue_money, cash_cmp};
GIN_SUPPORT(money)
static Datum
leftmostvalue_oid(void)
{
return ObjectIdGetDatum(0);
}
static TypeInfo TypeInfo_oid = {false, leftmostvalue_oid, btoidcmp};
GIN_SUPPORT(oid)
static Datum
leftmostvalue_timestamp(void)
{
return TimestampGetDatum(DT_NOBEGIN);
}
static TypeInfo TypeInfo_timestamp = {false, leftmostvalue_timestamp, timestamp_cmp};
GIN_SUPPORT(timestamp)
static TypeInfo TypeInfo_timestamptz = {false, leftmostvalue_timestamp, timestamp_cmp};
GIN_SUPPORT(timestamptz)
static Datum
leftmostvalue_time(void)
{
return TimeADTGetDatum(0);
}
static TypeInfo TypeInfo_time = {false, leftmostvalue_time, time_cmp};
GIN_SUPPORT(time)
static Datum
leftmostvalue_timetz(void)
{
TimeTzADT *v = palloc(sizeof(TimeTzADT));
v->time = 0;
v->zone = -24 * 3600; /* XXX is that true? */
return TimeTzADTPGetDatum(v);
}
static TypeInfo TypeInfo_timetz = {false, leftmostvalue_timetz, timetz_cmp};
GIN_SUPPORT(timetz)
static Datum
leftmostvalue_date(void)
{
return DateADTGetDatum(DATEVAL_NOBEGIN);
}
static TypeInfo TypeInfo_date = {false, leftmostvalue_date, date_cmp};
GIN_SUPPORT(date)
static Datum
leftmostvalue_interval(void)
{
Interval *v = palloc(sizeof(Interval));
v->time = DT_NOBEGIN;
v->day = 0;
v->month = 0;
return IntervalPGetDatum(v);
}
static TypeInfo TypeInfo_interval = {false, leftmostvalue_interval, interval_cmp};
GIN_SUPPORT(interval)
static Datum
leftmostvalue_macaddr(void)
{
macaddr *v = palloc0(sizeof(macaddr));
return MacaddrPGetDatum(v);
}
static TypeInfo TypeInfo_macaddr = {false, leftmostvalue_macaddr, macaddr_cmp};
GIN_SUPPORT(macaddr)
static Datum
leftmostvalue_inet(void)
{
return DirectFunctionCall3(inet_in,
CStringGetDatum("0.0.0.0/0"),
ObjectIdGetDatum(0),
Int32GetDatum(-1));
}
static TypeInfo TypeInfo_inet = {true, leftmostvalue_inet, network_cmp};
GIN_SUPPORT(inet)
static TypeInfo TypeInfo_cidr = {true, leftmostvalue_inet, network_cmp};
GIN_SUPPORT(cidr)
static Datum
leftmostvalue_text(void)
{
return PointerGetDatum(cstring_to_text_with_len("", 0));
}
static TypeInfo TypeInfo_text = {true, leftmostvalue_text, bttextcmp};
GIN_SUPPORT(text)
static Datum
leftmostvalue_char(void)
{
return CharGetDatum(SCHAR_MIN);
}
static TypeInfo TypeInfo_char = {false, leftmostvalue_char, btcharcmp};
GIN_SUPPORT(char)
static TypeInfo TypeInfo_bytea = {true, leftmostvalue_text, byteacmp};
GIN_SUPPORT(bytea)
static Datum
leftmostvalue_bit(void)
{
return DirectFunctionCall3(bit_in,
CStringGetDatum(""),
ObjectIdGetDatum(0),
Int32GetDatum(-1));
}
static TypeInfo TypeInfo_bit = {true, leftmostvalue_bit, bitcmp};
GIN_SUPPORT(bit)
static Datum
leftmostvalue_varbit(void)
{
return DirectFunctionCall3(varbit_in,
CStringGetDatum(""),
ObjectIdGetDatum(0),
Int32GetDatum(-1));
}
static TypeInfo TypeInfo_varbit = {true, leftmostvalue_varbit, bitcmp};
GIN_SUPPORT(varbit)
/*
* Numeric type hasn't a real left-most value, so we use PointerGetDatum(NULL)
* (*not* a SQL NULL) to represent that. We can get away with that because
* the value returned by our leftmostvalue function will never be stored in
* the index nor passed to anything except our compare and prefix-comparison
* functions. The same trick could be used for other pass-by-reference types.
*/
#define NUMERIC_IS_LEFTMOST(x) ((x) == NULL)
PG_FUNCTION_INFO_V1(gin_numeric_cmp);
Datum gin_numeric_cmp(PG_FUNCTION_ARGS);
Datum
gin_numeric_cmp(PG_FUNCTION_ARGS)
{
Numeric a = (Numeric) PG_GETARG_POINTER(0);
Numeric b = (Numeric) PG_GETARG_POINTER(1);
int res = 0;
if (NUMERIC_IS_LEFTMOST(a))
{
res = (NUMERIC_IS_LEFTMOST(b)) ? 0 : -1;
}
else if (NUMERIC_IS_LEFTMOST(b))
{
res = 1;
}
else
{
res = DatumGetInt32(DirectFunctionCall2(numeric_cmp,
NumericGetDatum(a),
NumericGetDatum(b)));
}
PG_RETURN_INT32(res);
}
static Datum
leftmostvalue_numeric(void)
{
return PointerGetDatum(NULL);
}
static TypeInfo TypeInfo_numeric = {true, leftmostvalue_numeric, gin_numeric_cmp};
GIN_SUPPORT(numeric)

Some files were not shown because too many files have changed in this diff Show more