Skip to content

V1.0 #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: v1.0
Choose a base branch
from
Open

V1.0 #194

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .ci/clang-3.4.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
sudo apt-get install -y libuv-dev zlib1g-dev clang-3.4 libssl-dev
sudo apt-get install -y zlib1g-dev clang-3.4 libssl-dev

CC="clang"
CXX="clang++"
.ci/install-libuv.sh
autoreconf -fi
./configure --enable-debug
make
make check 2>/dev/null
4 changes: 3 additions & 1 deletion .ci/clang-ia32.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sudo apt-get install -y libc6-dev libc6-dev:i386 libuv-dev:i386 zlib1g-dev:i386 build-essential g++ gcc libtool libssl-dev:i386
sudo apt-get install -y libc6-dev libc6-dev:i386 zlib1g-dev:i386 build-essential g++ gcc libtool libssl-dev:i386

sudo apt-get install -y gcc-multilib g++-multilib clang

Expand All @@ -8,6 +8,8 @@ export CFLAGS="-m32"
export CXXFLAGS="-m32"
export CPPFLAGS="-m32"
export LDFLAGS="-m32"
.ci/install-libuv.sh
autoreconf -fi
./configure --enable-debug
make
make check 2>/dev/null
4 changes: 3 additions & 1 deletion .ci/clang.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
sudo apt-get install -y libuv-dev zlib1g-dev clang libssl-dev
sudo apt-get install -y zlib1g-dev clang libssl-dev

CC="clang"
CXX="clang++"
.ci/install-libuv.sh
autoreconf -fi
./configure --enable-debug
make
make check 2>/dev/null
3 changes: 2 additions & 1 deletion .ci/cppcheck.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sudo apt-get install -y cppcheck libuv-dev
sudo apt-get install -y cppcheck

.ci/install-libuv.sh
autoreconf -fi
./configure --enable-debug
cppcheck --quiet --enable=all --error-exitcode=1 src tests examples
3 changes: 2 additions & 1 deletion .ci/docs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sudo apt-get install -y python-sphinx libuv-dev
sudo apt-get install -y python-sphinx

.ci/install-libuv.sh
autoreconf -fi
./configure
make html
3 changes: 2 additions & 1 deletion .ci/gcc-distcheck.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sudo apt-get install -y libuv-dev zlib1g-dev libssl-dev
sudo apt-get install -y zlib1g-dev libssl-dev

.ci/install-libuv.sh
autoreconf -fi
./configure --enable-debug
make distcheck 2>/dev/null
4 changes: 3 additions & 1 deletion .ci/gcc-ia32.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
sudo apt-get install -y libc6-dev libc6-dev:i386 libuv-dev:i386 zlib1g-dev:i386 build-essential g++ gcc libtool libssl-dev:i386
sudo apt-get install -y libc6-dev libc6-dev:i386 zlib1g-dev:i386 build-essential g++ gcc libtool libssl-dev:i386

sudo apt-get install -y gcc-multilib g++-multilib

export CFLAGS="-m32"
export CXXFLAGS="-m32"
export LDFLAGS="-m32"
export CPPFLAGS="-m32"
.ci/install-libuv.sh
autoreconf -fi
./configure --enable-debug
make
make check 2>/dev/null
11 changes: 11 additions & 0 deletions .ci/install-libuv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

mkdir ~/tmp
cd ~/tmp
wget https://github.com/libuv/libuv/archive/v1.4.2.tar.gz
tar -zxvf v1.4.2.tar.gz
cd libuv-1.4.2
./autogen.sh
./configure --prefix=/usr
make
sudo make install
3 changes: 2 additions & 1 deletion .ci/no-optional.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
sudo apt-get install -y libuv-dev
sudo apt-get remove -y zlib1g-dev libssl-dev

.ci/install-libuv.sh
autoreconf -fi
./configure --enable-debug
make
make check 2>/dev/null
3 changes: 2 additions & 1 deletion .ci/scanbuild.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
sudo apt-get install -y libuv-dev zlib1g-dev clang-3.4 libssl-dev
sudo apt-get install -y zlib1g-dev clang-3.4 libssl-dev

CC="clang"
CXX="clang++"
.ci/install-libuv.sh
autoreconf -fi
./configure --enable-debug
scan-build --use-cc=clang --use-c++=clang++ --status-bugs make
3 changes: 2 additions & 1 deletion .ci/valgrind.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sudo apt-get install -y libuv-dev zlib1g-dev valgrind libssl-dev
sudo apt-get install -y zlib1g-dev valgrind libssl-dev

.ci/install-libuv.sh
autoreconf -fi
./configure --enable-debug
TESTS_ENVIRONMENT="./libtool --mode=execute valgrind --error-exitcode=1 --leak-check=yes --track-fds=no --malloc-fill=A5 --free-fill=DE --suppressions=valgrind.supp" make check 2>/dev/null
3 changes: 3 additions & 0 deletions libattachsql-1.0/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ uint8_t attachsql_get_library_version_patch(void);
ASQL_API
void attachsql_library_init(void);

ASQL_API
void attachsql_snprintf(char *buffer, size_t count, const char *format, ...);

#ifdef __cplusplus
}
#endif
Expand Down
37 changes: 20 additions & 17 deletions libattachsql-1.0/visibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,24 @@
* under the License.
*
*/
#if defined(ASQL_DLL)
# if defined(BUILDING_ASQL)
# if defined(_MSC_VER)
# define ASQL_API extern __declspec(dllexport)
# elif defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
# define ASQL_API __attribute__ ((visibility("default")))
# elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
# define ASQL_API __global
# endif /* defined(HAVE_VISIBILITY) */
# else /* defined(BUILDING_ASQL) */
# if defined(_MSC_VER)
# define ASQL_API extern __declspec(dllimport)
# else
# define ASQL_API
# endif /* defined(_MSC_VER) */
# endif /* defined(BUILDING_ASQL) */
#endif /* defined(ASQL_DLL) */

#if defined(BUILDING_ASQL)
# if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
# define ASQL_API __attribute__ ((visibility("default")))
# elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
# define ASQL_API __global
# elif defined(_MSC_VER)
# define ASQL_API extern __declspec(dllexport)
# else
# define ASQL_API
# endif /* defined(HAVE_VISIBILITY) */
#else /* defined(BUILDING_ASQL) */
# if defined(_MSC_VER)
# define ASQL_API extern __declspec(dllimport)
# else
# define ASQL_API
# endif /* defined(_MSC_VER) */
#endif /* defined(BUILDING_ASQL) */
#ifndef ASQL_API
# define ASQL_API
#endif
9 changes: 7 additions & 2 deletions rpm/libattachsql.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ Version: @VERSION@
Release: 1
License: Apache2
Group: System Environment/Libraries
BuildRequires: libuv-devel zlib-devel openssl-devel redhat-rpm-config
Requires: libuv zlib openssl
BuildRequires: libuv-devel >= 1.0
BuildRequires: zlib-devel
BuildRequires: openssl-devel
BuildRequires: redhat-rpm-config
Requires: libuv >= 1.0
Requires: zlib
Requires: openssl
URL: https://libattachsql.org/

Packager: Andrew Hutchings <andrew@linuxjedi.co.uk>
Expand Down
4 changes: 2 additions & 2 deletions src/ascore/command.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ ascore_command_status_t ascore_command_send(ascon_st *con, ascore_command_t comm
if (ret != 0)
{
con->local_errcode= ASRET_NET_WRITE_ERROR;
asdebug("Write fail: %s", uv_err_name(uv_last_error(con->uv_objects.loop)));
asdebug("Write fail: %s", uv_err_name(ret));
con->command_status= ASCORE_COMMAND_STATUS_SEND_FAILED;
con->next_packet_queue_used= 0;
con->local_errcode= ASRET_NET_WRITE_ERROR;
snprintf(con->errmsg, ASCORE_ERROR_BUFFER_SIZE, "Query send failed: %s", uv_err_name(uv_last_error(con->uv_objects.loop)));
attachsql_snprintf(con->errmsg, ASCORE_ERROR_BUFFER_SIZE, "Query send failed: %s", uv_err_name(ret));
return con->command_status;
}

Expand Down
1 change: 1 addition & 0 deletions src/ascore/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "structs.h"
#include <new>
#include <uv.h>
#include <libattachsql-1.0/attachsql.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Loading