Public feed
#721999
#include <xfsm-util.h>
#include <xfsm-legacy.h>
int main(void) {
XfceRc *rc;
gchar *sessionName;
char *path = '~/.config/xfce4-session/xfce4-session.rc';
rc = xfce_rc_simple_open(path, 0);
if (rc == NULL) {
printf("Cannot find '%s'\n", path);
return 1;
}
sessionName = xfce_rc_read_entry(rc, sessionName, "Default");
xfce_rc_close(rc);
printf("Using session name '%s'\n", sessionName);
return 0;
}
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I/usr/include/xfce4 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DPNG_NO_MMX_CODE -I/usr/include/xfce4 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/atk-1.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -DDBUS_API_SUBJECT_TO_CHANGE -DLIBDIR=\"/usr/local/lib\" -DPACKAGE_LOCALE_DIR=\"/usr/local/share/locale\" -DSYSCONFDIR=\"/usr/local/etc\" -DXFSM_SHUTDOWN_HELPER=\"/usr/local/libexec/xfsm-shutdown-helper\" -I../libxfsm -g -O2 xfce4_session-xfce4-session-save.o -o session-save.o `test -f 'xfce4-session-save.c' || echo './'`xfce4-session-save.c;
xfce4-session-save.c:7:15: warning: character constant too long for its type
xfce4-session-save.c: In function 'main':
xfce4-session-save.c:7: warning: initialization makes pointer from integer without a cast
xfce4-session-save.c:15: warning: assignment discards qualifiers from pointer target type
/tmp/ccAx4QpF.o: In function `main':
/var/tmp/portage/xfce-base/xfce4-session-4.4.1/work/xfce4-session-4.4.1/xfce4-session/xfce4-session-save.c:4: multiple definition of `main'
xfce4_session-xfce4-session-save.o:/var/tmp/portage/xfce-base/xfce4-session-4.4.1/work/xfce4-session-4.4.1/xfce4-session/xfce4-session-save.c:4: first defined here
xfce4_session-xfce4-session-save.o: In function `main':
xfce4-session-save.c:(.text+0x27): undefined reference to `xfce_rc_simple_open'
xfce4-session-save.c:(.text+0x42): undefined reference to `xfce_rc_read_entry'
xfce4-session-save.c:(.text+0x4c): undefined reference to `xfce_rc_close'
/tmp/ccAx4QpF.o: In function `main':
xfce4-session-save.c:(.text+0x27): undefined reference to `xfce_rc_simple_open'
xfce4-session-save.c:(.text+0x42): undefined reference to `xfce_rc_read_entry'
xfce4-session-save.c:(.text+0x4c): undefined reference to `xfce_rc_close'
collect2: ld returned 1 exit status