Mercurial > hg > xemacs-beta
comparison src/postgresql.c @ 771:943eaba38521
[xemacs-hg @ 2002-03-13 08:51:24 by ben]
The big ben-mule-21-5 check-in!
Various files were added and deleted. See CHANGES-ben-mule.
There are still some test suite failures. No crashes, though.
Many of the failures have to do with problems in the test suite itself
rather than in the actual code. I'll be addressing these in the next
day or so -- none of the test suite failures are at all critical.
Meanwhile I'll be trying to address the biggest issues -- i.e. build
or run failures, which will almost certainly happen on various platforms.
All comments should be sent to ben@xemacs.org -- use a Cc: if necessary
when sending to mailing lists. There will be pre- and post- tags,
something like
pre-ben-mule-21-5-merge-in, and
post-ben-mule-21-5-merge-in.
author | ben |
---|---|
date | Wed, 13 Mar 2002 08:54:06 +0000 |
parents | 183866b06e0b |
children | e38acbeb1cae |
comparison
equal
deleted
inserted
replaced
770:336a418893b5 | 771:943eaba38521 |
---|---|
104 #ifdef RUNNING_XEMACS_21_1 /* handle interface changes */ | 104 #ifdef RUNNING_XEMACS_21_1 /* handle interface changes */ |
105 #define PG_OS_CODING FORMAT_FILENAME | 105 #define PG_OS_CODING FORMAT_FILENAME |
106 #define TO_EXTERNAL_FORMAT(a,from,b,to,c) GET_C_STRING_EXT_DATA_ALLOCA(from,FORMAT_FILENAME,to) | 106 #define TO_EXTERNAL_FORMAT(a,from,b,to,c) GET_C_STRING_EXT_DATA_ALLOCA(from,FORMAT_FILENAME,to) |
107 #else | 107 #else |
108 #ifdef MULE | 108 #ifdef MULE |
109 #define PG_OS_CODING Fget_coding_system(Vpg_coding_system) | 109 #define PG_OS_CODING get_coding_system_for_text_file (Vpg_coding_system, 1) |
110 #else | 110 #else |
111 #define PG_OS_CODING Qnative | 111 #define PG_OS_CODING Qnative |
112 #endif | 112 #endif |
113 Lisp_Object Vpg_coding_system; | 113 Lisp_Object Vpg_coding_system; |
114 #endif | 114 #endif |
1794 */ ); | 1794 */ ); |
1795 } | 1795 } |
1796 | 1796 |
1797 /* These initializations should not be done at dump-time. */ | 1797 /* These initializations should not be done at dump-time. */ |
1798 void | 1798 void |
1799 init_postgresql_from_environment(void) | 1799 init_postgresql_from_environment (void) |
1800 { | 1800 { |
1801 char *p; | 1801 Intbyte *p; |
1802 | 1802 |
1803 if ((p = getenv ("PGHOST"))) | 1803 #define FROB(envvar, var) \ |
1804 if ((p = egetenv (envvar))) \ | |
1805 var = build_intstring (p); \ | |
1806 else \ | |
1807 var = Qnil | |
1808 | |
1809 if (initialized) | |
1804 { | 1810 { |
1805 VXPGHOST = build_ext_string (p, PG_OS_CODING); | 1811 FROB ("PGHOST", VXPGHOST); |
1812 FROB ("PGUSER", VXPGUSER); | |
1813 FROB ("PGOPTIONS", VXPGOPTIONS); | |
1814 | |
1815 if ((p = egetenv ("PGPORT"))) | |
1816 VXPGPORT = make_int (atoi ((char *) p)); | |
1817 else | |
1818 VXPGPORT = Qnil; | |
1819 | |
1820 FROB ("PGTTY", VXPGTTY); | |
1821 FROB ("PGDATABASE", VXPGDATABASE); | |
1822 FROB ("PGREALM", VXPGREALM); | |
1823 #ifdef MULE | |
1824 /* It's not clear whether this is any use. My intent is to | |
1825 autodetect the coding system from the database. */ | |
1826 FROB ("PGCLIENTENCODING", VXPGCLIENTENCODING); | |
1827 #endif | |
1828 | |
1829 #if !defined(HAVE_POSTGRESQLV7) | |
1830 FROB ("PGAUTHTYPE", VXPGAUTHTYPE); | |
1831 #endif | |
1832 | |
1833 FROB ("PGGEQO", VXPGGEQO); | |
1834 FROB ("PGCOSTINDEX", VXPGCOSTINDEX); | |
1835 FROB ("PGCOSTHEAP", VXPGCOSTHEAP); | |
1836 FROB ("PGTZ", VXPGTZ); | |
1837 FROB ("PGDATESTYLE", VXPGDATESTYLE); | |
1838 #undef FROB | |
1806 } | 1839 } |
1807 else | 1840 } |
1808 { | 1841 |
1809 VXPGHOST = Qnil; | |
1810 } | |
1811 | |
1812 if ((p = getenv ("PGUSER"))) | |
1813 { | |
1814 VXPGUSER = build_ext_string (p, PG_OS_CODING); | |
1815 } | |
1816 else | |
1817 { | |
1818 VXPGUSER = Qnil; | |
1819 } | |
1820 | |
1821 if ((p = getenv ("PGOPTIONS"))) | |
1822 { | |
1823 VXPGOPTIONS = build_ext_string (p, PG_OS_CODING); | |
1824 } | |
1825 else | |
1826 { | |
1827 VXPGOPTIONS = Qnil; | |
1828 } | |
1829 | |
1830 if ((p = getenv ("PGPORT"))) | |
1831 { | |
1832 VXPGPORT = make_int (atoi (p)); | |
1833 } | |
1834 else | |
1835 { | |
1836 VXPGPORT = Qnil; | |
1837 } | |
1838 | |
1839 if ((p = getenv ("PGTTY"))) | |
1840 { | |
1841 VXPGTTY = build_ext_string (p, PG_OS_CODING); | |
1842 } | |
1843 else | |
1844 { | |
1845 VXPGTTY = Qnil; | |
1846 } | |
1847 | |
1848 if ((p = getenv ("PGDATABASE"))) | |
1849 { | |
1850 VXPGDATABASE = build_ext_string (p, PG_OS_CODING); | |
1851 } | |
1852 else | |
1853 { | |
1854 VXPGDATABASE = Qnil; | |
1855 } | |
1856 | |
1857 if ((p = getenv ("PGREALM"))) | |
1858 { | |
1859 VXPGREALM = build_ext_string (p, PG_OS_CODING); | |
1860 } | |
1861 else | |
1862 { | |
1863 VXPGREALM = Qnil; | |
1864 } | |
1865 | |
1866 #ifdef MULE | |
1867 /* It's not clear whether this is any use. My intent is to | |
1868 autodetect the coding system from the database. */ | |
1869 if ((p = getenv ("PGCLIENTENCODING"))) | |
1870 { | |
1871 VXPGCLIENTENCODING = build_ext_string (p, PG_OS_CODING); | |
1872 } | |
1873 else | |
1874 { | |
1875 VXPGCLIENTENCODING = Qnil; | |
1876 } | |
1877 #endif | |
1878 | |
1879 #if !defined(HAVE_POSTGRESQLV7) | |
1880 if ((p = getenv ("PGAUTHTYPE"))) | |
1881 { | |
1882 VXPGAUTHTYPE = build_ext_string (p, PG_OS_CODING); | |
1883 } | |
1884 else | |
1885 { | |
1886 VXPGAUTHTYPE = Qnil; | |
1887 } | |
1888 #endif | |
1889 | |
1890 if ((p = getenv ("PGGEQO"))) | |
1891 { | |
1892 VXPGGEQO = build_ext_string (p, PG_OS_CODING); | |
1893 } | |
1894 else | |
1895 { | |
1896 VXPGGEQO = Qnil; | |
1897 } | |
1898 | |
1899 if ((p = getenv ("PGCOSTINDEX"))) | |
1900 { | |
1901 VXPGCOSTINDEX = build_ext_string (p, PG_OS_CODING); | |
1902 } | |
1903 else | |
1904 { | |
1905 VXPGCOSTINDEX = Qnil; | |
1906 } | |
1907 | |
1908 if ((p = getenv ("PGCOSTHEAP"))) | |
1909 { | |
1910 VXPGCOSTHEAP = build_ext_string (p, PG_OS_CODING); | |
1911 } | |
1912 else | |
1913 { | |
1914 VXPGCOSTHEAP = Qnil; | |
1915 } | |
1916 | |
1917 if ((p = getenv ("PGTZ"))) | |
1918 { | |
1919 VXPGTZ = build_ext_string (p, PG_OS_CODING); | |
1920 } | |
1921 else | |
1922 { | |
1923 VXPGTZ = Qnil; | |
1924 } | |
1925 | |
1926 if ((p = getenv ("PGDATESTYLE"))) | |
1927 { | |
1928 VXPGDATESTYLE = build_ext_string (p, PG_OS_CODING); | |
1929 } | |
1930 else | |
1931 { | |
1932 VXPGDATESTYLE = Qnil; | |
1933 } | |
1934 } | |
1935 |