except when it doesn't :)
You know that all better, thank you.
I do remember being able to compile webkit in Emacs by compiling
Emacs
itself, but it did not work as expected and I removed it.
$ locate stdlib.h
/usr/include/stdlib.h
but webkit-module.c inside of emacs-webkit git directory does
not have
stdlib.h, there is nowhere in other files included. And I
included
also string.h that was missing.
$ head webkit-module.c
#define _POSIX_SOURCE 1
#include <gtk/gtk.h>
#include <webkit2/webkit2.h>
#include <stdbool.h>
#include <signal.h>
#include <assert.h>
#include <errno.h>
I think it should be included there and I have included those
missind
but then I got these other errors. Maybe my webkit is outdated
for
this one. I cannot install new webkit on this system.
webkit-module.c: In function ‘webkit_get_uri’:
webkit-module.c:147:26: warning: implicit declaration of
function ‘webkit_uri_for_display’
[-Wimplicit-function-declaration]
const gchar *uri = webkit_uri_for_display
(webkit_web_view_get_uri
^~~~~~~~~~~~~~~~~~~~~~
webkit-module.c:147:26: warning: initialization makes pointer
from integer without a cast [-Wint-conversion]
webkit-module.c: In function ‘webkit_js_finished’:
webkit-module.c:362:3: error: unknown type name ‘JSCValue’
JSCValue *value = webkit_javascript_result_get_js_value
(js_result);
^~~~~~~~
webkit-module.c:362:21: warning: implicit declaration of
function ‘webkit_javascript_result_get_js_value’
[-Wimplicit-function-declaration]
JSCValue *value = webkit_javascript_result_get_js_value
(js_result);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
webkit-module.c:362:21: warning: initialization makes pointer
from integer without a cast [-Wint-conversion]
webkit-module.c:363:17: warning: implicit declaration of
function ‘jsc_value_to_json’ [-Wimplicit-function-declaration]
gchar *json = jsc_value_to_json (value, 1);
^~~~~~~~~~~~~~~~~
webkit-module.c:363:17: warning: initialization makes pointer
from integer without a cast [-Wint-conversion]
webkit-module.c:364:3: error: unknown type name ‘JSCException’
JSCException *exception =
^~~~~~~~~~~~
webkit-module.c:365:5: warning: implicit declaration of function
‘jsc_context_get_exception’ [-Wimplicit-function-declaration]
jsc_context_get_exception (jsc_value_get_context (value));
^~~~~~~~~~~~~~~~~~~~~~~~~
webkit-module.c:365:32: warning: implicit declaration of
function ‘jsc_value_get_context’
[-Wimplicit-function-declaration]
jsc_context_get_exception (jsc_value_get_context (value));
^~~~~~~~~~~~~~~~~~~~~
webkit-module.c:365:5: warning: initialization makes pointer
from integer without a cast [-Wint-conversion]
jsc_context_get_exception (jsc_value_get_context (value));
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib.h:62:0,
from /usr/include/gtk-3.0/gdk/gdkconfig.h:13,
from /usr/include/gtk-3.0/gdk/gdk.h:30,
from /usr/include/gtk-3.0/gtk/gtk.h:30,
from webkit-module.c:3:
webkit-module.c:368:16: warning: implicit declaration of
function ‘jsc_exception_get_message’
[-Wimplicit-function-declaration]
jsc_exception_get_message (exception));
^
/usr/include/glib-2.0/glib/gmessages.h:336:32: note: in
definition of macro ‘g_warning’
__VA_ARGS__)
^~~~~~~~~~~
webkit-module.c:367:16: warning: format ‘%s’ expects argument of
type ‘char *’, but argument 4 has type ‘int’ [-Wformat=]
g_warning ("Error running javascript: %s",
^
/usr/include/glib-2.0/glib/gmessages.h:336:32: note: in
definition of macro ‘g_warning’
__VA_ARGS__)
^~~~~~~~~~~
webkit-module.c: In function ‘webkit_script_message_cb’:
webkit-module.c:503:3: error: unknown type name ‘JSCValue’
JSCValue *value = webkit_javascript_result_get_js_value
(js_result);
^~~~~~~~
webkit-module.c:503:21: warning: initialization makes pointer
from integer without a cast [-Wint-conversion]
JSCValue *value = webkit_javascript_result_get_js_value
(js_result);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
webkit-module.c:504:17: warning: initialization makes pointer
from integer without a cast [-Wint-conversion]
gchar *json = jsc_value_to_json (value, 1);
^~~~~~~~~~~~~~~~~
webkit-module.c:505:3: error: unknown type name ‘JSCException’
JSCException *exception =
^~~~~~~~~~~~
webkit-module.c:506:5: warning: initialization makes pointer
from integer without a cast [-Wint-conversion]
jsc_context_get_exception (jsc_value_get_context (value));
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib.h:62:0,
from /usr/include/gtk-3.0/gdk/gdkconfig.h:13,
from /usr/include/gtk-3.0/gdk/gdk.h:30,
from /usr/include/gtk-3.0/gtk/gtk.h:30,
from webkit-module.c:3:
webkit-module.c:508:16: warning: format ‘%s’ expects argument of
type ‘char *’, but argument 4 has type ‘int’ [-Wformat=]
g_warning ("Error in javascript message recieve: %s",
^
/usr/include/glib-2.0/glib/gmessages.h:336:32: note: in
definition of macro ‘g_warning’
__VA_ARGS__)
^~~~~~~~~~~
webkit-module.c: In function ‘webview_notify_uri’:
webkit-module.c:614:22: warning: initialization makes pointer
from integer without a cast [-Wint-conversion]
const gchar *uri = webkit_uri_for_display
(webkit_web_view_get_uri (webview));
^~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:10: webkit-module.so] Error 1