PSPP_READLINE
dnl Checks for header files.
-AC_CHECK_HEADERS([sys/wait.h fpu_control.h ieeefp.h fenv.h])
+AC_CHECK_HEADERS([sys/wait.h fpu_control.h ieeefp.h fenv.h pwd.h])
# For gnulib.
gl_INIT
#include <errno.h>
#include <libgen.h>
#include <libxml/xmlwriter.h>
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
xmlTextWriterEndElement (w);
}
+#ifdef HAVE_PWD_H
+ {
+ struct passwd *pw = getpwuid (getuid ());
+ if (pw != NULL)
+ {
+ xmlTextWriterStartElement (w, _xml ("meta:initial-creator"));
+ xmlTextWriterWriteString (w, _xml (strtok (pw->pw_gecos, ",")));
+ xmlTextWriterEndElement (w);
+
+ xmlTextWriterStartElement (w, _xml ("dc:creator"));
+ xmlTextWriterWriteString (w, _xml (strtok (pw->pw_gecos, ",")));
+ xmlTextWriterEndElement (w);
+ }
+ }
+#endif
+
xmlTextWriterEndElement (w);
xmlTextWriterEndElement (w);
xmlTextWriterEndDocument (w);