Skip to content
Snippets Groups Projects
Commit 4a4af6fb authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Merge branch 'pike-modules/sass' into 8.0

* pike-modules/sass:
  Sass: Survive old libsass.
parents 7e3eec60 19cdd367
No related branches found
No related tags found
No related merge requests found
...@@ -62,6 +62,16 @@ AS_IF( ...@@ -62,6 +62,16 @@ AS_IF(
# #
# Check for features in libsass # Check for features in libsass
# #
# NB: Not available in the libsass in Ubuntu 16.04 (3.3.4-1).
AC_CHECK_LIB(
sass, sass_copy_c_string,
[
#LIBS="${LIBS-} -lsass"
AC_DEFINE(HAVE_LIBSASS_COPY_C_STRING, [1],
[Defined if sass_copy_c_string is available ])
])
AC_CHECK_LIB( AC_CHECK_LIB(
sass, sass_delete_options, sass, sass_delete_options,
[ [
......
...@@ -24,6 +24,17 @@ DECLARATIONS ...@@ -24,6 +24,17 @@ DECLARATIONS
#include "pike_sass.h" #include "pike_sass.h"
#include <sass.h> #include <sass.h>
#ifndef HAVE_LIBSASS_COPY_C_STRING
static char *sass_copy_c_string(const char *str)
{
size_t len = strlen(str);
char *res = malloc(len+1);
if (!res) return NULL;
memcpy(res, str, len+1);
return res;
}
#endif /* !HAVE_LIBSASS_COPY_C_STRING */
/*! @module Web /*! @module Web
*/ */
/*! @module Sass /*! @module Sass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment