Commit Graph

9 Commits

Author SHA1 Message Date
Julien Fischer
133d040411 Use a different library name for the ODBC binding.
When building the ODBC binding as a library, name it libmercury_odbc, rather
than libodbc; unixODBC uses the former name, which is at the very least
confusing and appears to the source of linker errors on some platforms.

extras/odbc/mercury_odbc.m:
    An empty module importing odbc, that is used to force the library
    name to be libmercury_odbc instead of libodbc.

extras/odbc/Mmakefile:
    Do not warn about the module we use force the library name not exporting
    anything.

    Delete a workaround for really old versions of GCC.
2022-01-17 14:12:51 +11:00
Julien Fischer
aaf4e57f4f Fix a typo.
extras/odbc/Mmakefile:
    As above.
2020-06-28 16:14:10 +10:00
Zoltan Somogyi
d33273d033 Tell vim not to expand tabs in Makefiles.
This file-specific setting will override a default setting of expandtabs
in $HOME/.vimrc.

*/Makefile:
*/Mmakefile:
    As above.

tests/hard_coded/.gitignore:
    Don't ignore the purity subdir. This ignore must have been left over
    from when purity.m was a test in hard_coded, not hard_coded/purity,
    and it ignored an executable, not a directory.
2015-01-08 22:07:29 +11:00
Julien Fischer
749c6da9c7 A major cleanup of the ODBC binding. This is incorporates fixes for a number
Estimated hours taken: 6
Branches: main

A major cleanup of the ODBC binding.  This is incorporates fixes for a number
of problems pointed out by Keri Harris the other day plus some fixes for some
other problems I encountered while working on it.

Also, add support for unixODBC to the ODBC binding.

extras/odbc/odbc.m:
extras/odbc/odbc_test.m:
	Convert to four-space indentation throughout.

	Use the new foreign-language interface throughout.

	Make the type odbc.statement into a foreign_type.  This cuts
	down on the amount of casting required in the C code.

	Use '.' as a module qualifier throughout.

	Avoid unnecessary module qualification.  Rename some local predicates
	to help with this.

	Fix places where we don't conform to the C or Mercury coding
	standards.

	Add support for unixODBC.

	Don't use cast expressions as lvalues.

	Add missing character escapes.

	Avoid warnings about stat shadowing a global declaration.

extras/odbc/Mmakefile:
	Support MODBC_UNIX (unixODBC) as a legal value for MODBC_DRIVER.

	Remove a link to an old installation of iODBC.

	Add the MLLIBS options necessary for building the ODBC binding
	on Debian with either iODBC or unixODBC.  (I've left the Windows
	specific stuff intact, but I have no idea if it works or not.)
2006-04-03 06:19:55 +00:00
Fergus Henderson
dced016cc1 Fix a problem where different packages in the `extras' distribution
Estimated hours taken: 3
Branches: main, release

Fix a problem where different packages in the `extras' distribution
were being installed in different directories when you specified
INSTALL_PREFIX in the Mmake.params file.  Some honoured the INSTALL_PREFIX
setting, some appended "/extras", and some ignored it completely.

Also, add `clean' and `realclean' targets for the extras directory hierarchy,
and fix a few other minor bugs.

extras/lazy_evaluation/Mmakefile:
	Include Mmake.params, which previously wasn't included at all
	in this file.

extras/logged_output/Mmakefile:
extras/odbc/Mmakefile:
extras/quickcheck/Mmakefile:
	Append "/extras" to INSTALL_PREFIX, which previously wasn't done
	at all in these directories.

extras/cgi/Mmakefile:
extras/complex_numbers/Mmakefile:
extras/concurrency/Mmakefile:
extras/curs/Mmakefile:
extras/curses/Mmakefile:
extras/dynamic_linking/Mmakefile:
extras/moose/Mmakefile:
extras/posix/Mmakefile:
	Move the line `INSTALL_PREFIX := $(INSTALL_PREFIX/extras)'
	to before the include of Mmake.params, so as not to override
	the user's setting (only override the default setting).

extras/Mmakefile:
extras/concurrency/Mmakefile:
	Add `clean' and `realclean' targets.

extras/posix/Mmakefile:
	Add MGNUCFLAGS = --no-ansi, since this is needed on some systems.

extras/quickcheck/Mmakefile:
	Add "depend", "all", and "install" targets.
	Ensure that the "check" target runs the test program.

extras/quickcheck/qcheck.m:
	Set the exit status to non-zero if a test fails.

extras/references/Mmakefile:
	Adjust the setting of LIBGRADES to account for the fact that
	$(GRADE) is no longer implicitly included in $(LIBGRADES).
2003-01-16 10:44:26 +00:00
Zoltan Somogyi
a1cd1a1633 Optionally test the extras directory during bootchecks.
Estimated hours taken: 4

Optionally test the extras directory during bootchecks.

tools/bootcheck
	Add an option, -e, for testing the extras directory. Rename the
	-T/--test-only option as -n/--no-bootcheck, since it does not prevent
	the testing of the extras.

	Bootcheck only test the subdirectories in extras which have an
	Mmakefile and which can be tested in all grades and in all setups.

extras/*/Mmakefile:
	Updates to include extras/Mmake.params if it exists (to get the
	parameters, including grades, of the bootcheck) and to add a check
	target, which in most cases does not do anything yet (which means
	that the only testing we do is checking that the program compiles
	all right). Making "mmake check" do something meaningful will be
	up to the authors of the various subdirectories involved.

	In many cases, add .PHONY annotations on the relevant targets,
	and copyright notices.

extras/aditi/NOBOOTTEST:
	Prevent the automatic testing of the aditi subdirectory from
	bootcheck, since this can be done only on a machine with Aditi
	installed.

extras/aditi/NOBOOTTEST:
	Prevent the automatic testing of the aditi subdirectory from
	bootcheck, since this can be done only on a machine with Aditi
	installed.

extras/aditi/NOBOOTTEST:
	Prevent the automatic testing of this subdirectory from bootcheck,
	since this can be done only on a machine with Aditi installed.

extras/dynamic_linking/NOBOOTTEST:
	Prevent the automatic testing of this subdirectory from bootcheck,
	since this can be done only on a machine with the dl library already
	installed.

extras/logged_out/NOBOOTTEST:
	Prevent the automatic testing of this subdirectory from bootcheck,
	since this can be done only in grades with the right kind of stream
	support.

extras/odbc/NOBOOTTEST:
	Prevent the automatic testing of this subdirectory from bootcheck,
	since this can be done only on a machine with ODBC installed.

extras/references/NOBOOTTEST:
extras/trailed_update/NOBOOTTEST:
	Prevent the automatic testing of this subdirectory from bootcheck,
	since this can be done only in trailing grades.

extras/*/.nocopyright:
	Mention the NOBOOTTEST files in the relevant .nocopyright files.
2000-11-21 23:52:54 +00:00
Simon Taylor
8d20c43319 Handle exceptions thrown by the closure passed to odbc__transaction.
Estimated hours taken: 2

Handle exceptions thrown by the closure passed to odbc__transaction.

extras/odbc/odbc.m:
	Abort the transaction if the closure throws an exception,
	and rethrow the exception to the caller.

extras/odbc/odbc_test.m:
	Add a transaction which throws an exception to the test.

extras/odbc/Mmakefile:
	Minor changes to the set-up for iODBC 2.50.3.
2000-03-21 05:39:29 +00:00
Fergus Henderson
249417ef48 Add `--no-ansi' to MGNUCFLAGS, to allow recognition of
Estimated hours taken: 0.25

extras/odbc/Mmakefile:
	Add `--no-ansi' to MGNUCFLAGS, to allow recognition of
	C++-style "//" comments with gcc >= 2.7.1.
1997-10-07 12:09:07 +00:00
Simon Taylor
0e77183b7d A cleaned up version of Mission Critical's ODBC interface.
NEWS
	Document the ODBC interface.

runtime/engine.h
runtime/engine.mod
        Add wrappers around longjmp and setjmp which save and restore
        some state in engine.c and the Mercury registers.

runtime/mercury_trail.h
	Add a macro MR_IF_USE_TRAIL which evaluates to its argument
	if MR_USE_TRAIL is defined, or to nothing otherwise.

runtime/mercury_string.h
        Add a macro make_aligned_string_copy to copy a C string
        onto the Mercury heap.

runtime/misc.c
        Avoid a seg-fault when printing out info about the nondet stack
        in a debug grade.

extras/odbc/Mmakefile
extras/odbc/odbc.m
        The interface.

extras/odbc/odbc_test.m
	A simple test.
1997-10-02 01:51:41 +00:00