Skip to content
Open
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: 0 additions & 4 deletions Makefile.unix.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ LIBCAP_DIR=@ac_cv_libcap_root@
LIBCAP_INCL_OPT=@ac_cv_libcap_include_opt@
LIBCAP_LIB_OPT=@ac_cv_libcap_lib_opt@

MONGO_EXISTS=@ac_cv_has_libmongo_client@
MONGO_CFLAGS=@ac_cv_libmongo_client_cflags@
MONGO_LIBS=@ac_cv_libmongo_client_libs@

MONGOC_EXISTS=@ac_cv_has_libmongoc@
MONGOC_CFLAGS=@ac_cv_libmongoc_cflags@
MONGOC_LIBS=@ac_cv_libmongoc_libs@
Expand Down
2 changes: 0 additions & 2 deletions bin/ej-contests.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,12 +920,10 @@ setup_spool_dirs(const struct ejudge_cfg *config, struct server_framework_state
#endif /* EJUDGE_RUN_SPOOL_DIR */
}

extern int ej_bson_force_link_dummy;
extern int ej_bson_new_force_link_dummy;

static void *forced_symbols[] __attribute__((unused,used)) =
{
&ej_bson_force_link_dummy,
&ej_bson_new_force_link_dummy,
&base64u_encode,
&base64u_decode,
Expand Down
2 changes: 0 additions & 2 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@
// official mongo client library
#undef HAVE_LIBMONGOC

#undef HAVE_LIBMONGO_CLIENT

/* path to the web server cgi-bin dir */
#undef EJUDGE_HTTPD_CGI_BIN_DIR

Expand Down
34 changes: 0 additions & 34 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -657,9 +657,6 @@ ac_cv_primary_user
ac_cv_libmongoc_libs
ac_cv_libmongoc_cflags
ac_cv_has_libmongoc
ac_cv_libmongo_client_libs
ac_cv_libmongo_client_cflags
ac_cv_has_libmongo_client
ac_cv_lang_config_dir_expanded
ac_cv_lang_config_dir
ac_cv_ejudge_server_bin_path_m
Expand Down Expand Up @@ -8506,28 +8503,6 @@ then
ac_cv_libmongoc_libs=`pkg-config --libs libmongoc-1.0`
fi

if [ x"${ac_cv_has_libmongoc}" = x ]
then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmongo-client" >&5
printf %s "checking for libmongo-client... " >&6; }
if pkg-config --exists libmongo-client
then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
ac_cv_has_libmongo_client=1
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
ac_cv_has_libmongo_client=
fi

if [ x"${ac_cv_has_libmongo_client}" = x1 ]
then
ac_cv_libmongo_client_cflags=`pkg-config --cflags libmongo-client`
ac_cv_libmongo_client_libs=`pkg-config --libs libmongo-client`
fi
fi



if [ x"${prefix}" = xNONE ]
Expand Down Expand Up @@ -8723,9 +8698,6 @@ fi









Expand Down Expand Up @@ -9016,12 +8988,6 @@ then

fi

if [ x"${ac_cv_has_libmongo_client}" = x1 ]
then
printf "%s\n" "#define HAVE_LIBMONGO_CLIENT 1" >>confdefs.h

fi

ac_config_headers="$ac_config_headers config.h"


Expand Down
27 changes: 0 additions & 27 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -973,25 +973,6 @@ then
ac_cv_libmongoc_libs=`pkg-config --libs libmongoc-1.0`
fi

if [[ x"${ac_cv_has_libmongoc}" = x ]]
then
AC_MSG_CHECKING([for libmongo-client])
if pkg-config --exists libmongo-client
then
AC_MSG_RESULT([yes])
ac_cv_has_libmongo_client=1
else
AC_MSG_RESULT([no])
ac_cv_has_libmongo_client=
fi

if [[ x"${ac_cv_has_libmongo_client}" = x1 ]]
then
ac_cv_libmongo_client_cflags=`pkg-config --cflags libmongo-client`
ac_cv_libmongo_client_libs=`pkg-config --libs libmongo-client`
fi
fi

dnl Checking for available languages
dnl AC_MSG_NOTICE([checking available languages])

Expand Down Expand Up @@ -1206,9 +1187,6 @@ AC_SUBST(ac_cv_libcap_link)
AC_SUBST(ac_cv_ejudge_server_bin_path_m)
AC_SUBST(ac_cv_lang_config_dir)
AC_SUBST(ac_cv_lang_config_dir_expanded)
AC_SUBST(ac_cv_has_libmongo_client)
AC_SUBST(ac_cv_libmongo_client_cflags)
AC_SUBST(ac_cv_libmongo_client_libs)
AC_SUBST(ac_cv_has_libmongoc)
AC_SUBST(ac_cv_libmongoc_cflags)
AC_SUBST(ac_cv_libmongoc_libs)
Expand Down Expand Up @@ -1442,11 +1420,6 @@ then
AC_DEFINE(HAVE_LIBMONGOC, 1)
fi

if [[ x"${ac_cv_has_libmongo_client}" = x1 ]]
then
AC_DEFINE(HAVE_LIBMONGO_CLIENT, 1)
fi

AC_CONFIG_HEADERS([config.h])

AC_CONFIG_SUBDIRS([libdwarf])
Expand Down
1 change: 0 additions & 1 deletion files.make
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ COMMON_CFILES=\
lib/base64.c\
lib/base64u.c\
lib/bitset.c\
lib/bson_utils.c\
lib/bson_utils_new.c\
lib/build_support.c\
lib/cgi.c\
Expand Down
91 changes: 0 additions & 91 deletions include/ejudge/bson_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,17 @@
#include <stdio.h>
#include <time.h>

// for libmongo-client (obsolete)
struct _bson;
struct _bson_cursor;

// for libmongoc
struct _bson_t;
// FIXME: no opaque structure tag for bson_iter_t

void
ej_bson_unparse(
FILE *out,
const struct _bson *,
int is_array);
void
ej_bson_unparse_new(
FILE *out,
const struct _bson_t *,
int is_array);

int
ej_bson_parse_int(
struct _bson_cursor *bc,
const unsigned char *field_name,
int *p_value,
int check_low,
int low_value,
int check_high,
int high_value);
int
ej_bson_parse_int_new(
void *bc, // bson_iter_t *
const unsigned char *field_name,
Expand All @@ -61,121 +43,66 @@ ej_bson_parse_int_new(
int high_value);

int
ej_bson_parse_int64(
struct _bson_cursor *bc,
const unsigned char *field_name,
long long *p_value);
int
ej_bson_parse_int64_new(
void *bc, // bson_iter_t *
const unsigned char *field_name,
long long *p_value);

int
ej_bson_parse_boolean(
struct _bson_cursor *bc,
const unsigned char *field_name,
int *p_value);
int
ej_bson_parse_boolean_new(
void *bc, // bson_iter_t *
const unsigned char *field_name,
int *p_value);

int
ej_bson_parse_boolean_uc(
struct _bson_cursor *bc,
const unsigned char *field_name,
unsigned char *p_value);
int
ej_bson_parse_boolean_uc_new(
void *bc, // bson_iter_t *
const unsigned char *field_name,
unsigned char *p_value);

int
ej_bson_parse_utc_datetime(
struct _bson_cursor *bc,
const unsigned char *field_name,
time_t *p_value);
int
ej_bson_parse_utc_datetime_new(
void *bc, // bson_iter_t *
const unsigned char *field_name,
time_t *p_value);

int
ej_bson_parse_utc_datetime_64(
struct _bson_cursor *bc,
const unsigned char *field_name,
ej_time64_t *p_value);
int
ej_bson_parse_utc_datetime_64_new(
void *bc, // bson_iter_t *
const unsigned char *field_name,
ej_time64_t *p_value);

int
ej_bson_parse_uuid(
struct _bson_cursor *bc,
const unsigned char *field_name,
ej_uuid_t *p_value);
int
ej_bson_parse_uuid_new(
void *bc, // bson_iter_t *
const unsigned char *field_name,
ej_uuid_t *p_value);

int
ej_bson_parse_oid(
struct _bson_cursor *bc,
const unsigned char *field_name,
unsigned char *p_value);
int
ej_bson_parse_oid_new(
void *bc, // bson_iter_t
const unsigned char *field_name,
unsigned char *p_value);

int
ej_bson_parse_ip(
struct _bson_cursor *bc,
const unsigned char *field_name,
ej_ip_t *p_value);
int
ej_bson_parse_ip_new(
void *bc, // bson_iter_t
const unsigned char *field_name,
ej_ip_t *p_value);

int
ej_bson_parse_string(
struct _bson_cursor *bc,
const unsigned char *field_name,
unsigned char **p_value);
int
ej_bson_parse_string_new(
void *bc, // bson_iter_t
const unsigned char *field_name,
unsigned char **p_value);

int
ej_bson_parse_array(
struct _bson_cursor *bc,
const unsigned char *field_name,
struct _bson **p_value);
int
ej_bson_parse_array_new(
void *bc, // bson_iter_t
const unsigned char *field_name,
struct _bson_t **p_value);

int
ej_bson_parse_document(
struct _bson_cursor *bc,
const unsigned char *field_name,
struct _bson **p_value);
int
ej_bson_parse_document_new(
void *bc, // bson_iter_t
const unsigned char *field_name,
Expand All @@ -188,40 +115,22 @@ ej_bson_parse_sha1_new(
unsigned char *p_value);

void
ej_bson_append_uuid(
struct _bson *b,
const unsigned char *key,
const ej_uuid_t *p_uuid);
void
ej_bson_append_uuid_new(
struct _bson_t *b,
const unsigned char *key,
const ej_uuid_t *p_uuid);

void
ej_bson_append_ip(
struct _bson *b,
const unsigned char *key,
const ej_ip_t *p_ip);
void
ej_bson_append_ip_new(
struct _bson_t *b,
const unsigned char *key,
const ej_ip_t *p_ip);

struct _bson *
ej_bson_unparse_array_int(
const int *values,
int count);
struct _bson_t *
ej_bson_unparse_array_int_new(
const int *values,
int count);

struct _bson *
ej_bson_unparse_array_uuid(
ej_uuid_t *values,
int count);
struct _bson_t *
ej_bson_unparse_array_uuid_new(
ej_uuid_t *values,
Expand Down
25 changes: 0 additions & 25 deletions lib/bson_utils.c

This file was deleted.

2 changes: 1 addition & 1 deletion lib/testing_report_bson.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/

#include "bson/bson.h"
#include "ejudge/config.h"

#include "ejudge/runlog.h"
Expand All @@ -29,6 +28,7 @@
#include <sys/mman.h>

#if HAVE_LIBMONGOC - 0 > 0
#include <bson/bson.h>

#if HAVE_LIBMONGOC - 0 > 1
#include <mongoc/mongoc.h>
Expand Down
Loading