acconfig.h configure.in added check for putenv and #ifdefed it's usage

* acconfig.h
* configure.in
* app/main.c: added check for putenv and #ifdefed it's usage since NeXTStep is
lame

* libgimp/gimp.c
* app/main.c
* app/plug_in.c: conditionally compile shared mem stuff so platforms without
it can still work

* plug-ins/CEL/CEL.c
* plug-ins/palette/palette.c
* plug-ins/print/print-escp2.c
* plug-ins/print/print-pcl.c
* plug-ins/print/print-ps.c: s/strdup/g_strdup/ for portability

-Yosh
This commit is contained in:
Manish Singh 1998-08-28 23:01:46 +00:00
parent 2f6378107f
commit 5c107a279e
33 changed files with 458 additions and 74 deletions

View File

@ -1,3 +1,21 @@
Fri Aug 28 15:56:41 PDT 1998 Manish Singh <yosh@gimp.org>
* acconfig.h
* configure.in
* app/main.c: added check for putenv and #ifdefed it's usage since
NeXTStep is lame
* libgimp/gimp.c
* app/main.c
* app/plug_in.c: conditionally compile shared mem stuff so platforms
without it can still work
* plug-ins/CEL/CEL.c
* plug-ins/palette/palette.c
* plug-ins/print/print-escp2.c
* plug-ins/print/print-pcl.c
* plug-ins/print/print-ps.c: s/strdup/g_strdup/ for portability
Wed Aug 26 16:30:36 1998 Raph Levien <raph@gimp.org>
* app/gradient.c (grad_create_gradient_editor,

View File

@ -22,7 +22,9 @@
#undef HAVE_IPC_H
#undef HAVE_LC_MESSAGES
#undef HAVE_NDIR_H
#undef HAVE_PUTENV
#undef HAVE_SHM_H
#undef HAVE_STPCPY
#undef HAVE_SYS_DIR_H
#undef HAVE_SYS_NDIR_H
#undef HAVE_SYS_SELECT_H

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -89,7 +89,9 @@ main (int argc, char **argv)
int show_version;
int show_help;
int i, j;
#ifdef HAVE_PUTENV
gchar *display_name, *display_env;
#endif
ATEXIT (g_mem_profile);
@ -113,18 +115,24 @@ main (int argc, char **argv)
gle_init (&argc, &argv);
#endif /* !HAVE_LIBGLE */
#ifdef HAVE_PUTENV
display_name = gdk_get_display ();
display_env = g_new (gchar, strlen (display_name) + 9);
*display_env = 0;
strcat (display_env, "DISPLAY=");
strcat (display_env, display_name);
putenv (display_env);
#endif
no_interface = FALSE;
no_data = FALSE;
no_splash = FALSE;
no_splash_image = FALSE;
#ifdef HAVE_SHM_H
use_shm = TRUE;
#else
use_shm = FALSE;
#endif
use_debug_handler = FALSE;
restore_session = FALSE;
console_messages = FALSE;

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -25,12 +25,18 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#include "libgimp/gimpprotocol.h"
#include "libgimp/gimpwire.h"
@ -292,6 +298,7 @@ plug_in_init ()
wire_set_writer (plug_in_write);
wire_set_flusher (plug_in_flush);
#ifdef HAVE_SHM_H
/* allocate a piece of shared memory for use in transporting tiles
* to plug-ins. if we can't allocate a piece of shared memory then
* we'll fall back on sending the data over the pipe.
@ -316,6 +323,7 @@ plug_in_init ()
#endif
}
}
#endif
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, plug_in_init_file, MODE_EXECUTABLE);
@ -444,6 +452,7 @@ plug_in_kill ()
GSList *tmp;
PlugIn *plug_in;
#ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1)
{
@ -454,7 +463,8 @@ plug_in_kill ()
if (shm_ID != -1)
shmdt ((char*) shm_addr);
#endif
#endif
tmp = open_plug_ins;
while (tmp)
{

View File

@ -3,6 +3,9 @@
/* Define if using alloca.c. */
#undef C_ALLOCA
/* Define to empty if the keyword does not work. */
#undef const
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
@ -16,6 +19,9 @@
/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
@ -28,12 +34,21 @@
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
/* Define to `int' if <sys/types.h> doesn't define. */
#undef pid_t
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
@ -57,7 +72,9 @@
#undef HAVE_IPC_H
#undef HAVE_LC_MESSAGES
#undef HAVE_NDIR_H
#undef HAVE_PUTENV
#undef HAVE_SHM_H
#undef HAVE_STPCPY
#undef HAVE_SYS_DIR_H
#undef HAVE_SYS_NDIR_H
#undef HAVE_SYS_SELECT_H
@ -76,14 +93,83 @@
#undef USE_PTHREADS
/* Define if you have the __argz_count function. */
#undef HAVE___ARGZ_COUNT
/* Define if you have the __argz_next function. */
#undef HAVE___ARGZ_NEXT
/* Define if you have the __argz_stringify function. */
#undef HAVE___ARGZ_STRINGIFY
/* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
/* Define if you have the setenv function. */
#undef HAVE_SETENV
/* Define if you have the setlocale function. */
#undef HAVE_SETLOCALE
/* Define if you have the stpcpy function. */
#undef HAVE_STPCPY
/* Define if you have the strcasecmp function. */
#undef HAVE_STRCASECMP
/* Define if you have the strchr function. */
#undef HAVE_STRCHR
/* Define if you have the strdup function. */
#undef HAVE_STRDUP
/* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
/* Define if you have the <nl_types.h> header file. */
#undef HAVE_NL_TYPES_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the <sys/dir.h> header file. */
#undef HAVE_SYS_DIR_H
/* Define if you have the <sys/ndir.h> header file. */
#undef HAVE_SYS_NDIR_H
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the i library (-li). */
#undef HAVE_LIBI

View File

@ -311,6 +311,9 @@ AC_CHECK_FUNC(random, [
dnl check for difftime
AC_CHECK_FUNC(difftime, , AC_DEFINE(NO_DIFFTIME))
dnl check for putenv (because %#@&% NeXTStep doesn't have it)
AC_CHECK_FUNC(putenv, AC_DEFINE(HAVE_PUTENV))
dnl check for inline
AC_MSG_CHECKING([for inline definition in glibconfig.h])
AC_EGREP_CPP(glib_defines_inline,

View File

@ -25,12 +25,18 @@
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/time.h>
#include <sys/param.h>
#include <unistd.h>
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
@ -129,8 +135,10 @@ gimp_quit ()
if (PLUG_IN_INFO.quit_proc)
(* PLUG_IN_INFO.quit_proc) ();
#ifdef HAVE_SHM_H
if ((_shm_ID != -1) && _shm_addr)
shmdt ((char*) _shm_addr);
#endif
gp_quit_write (_writefd);
exit (0);
@ -1059,6 +1067,7 @@ gimp_config (GPConfig *config)
_color_cube[3] = config->color_cube[3];
_gdisp_ID = config->gdisp_ID;
#ifdef HAVE_SHM_H
if (_shm_ID != -1)
{
_shm_addr = (guchar*) shmat (_shm_ID, 0, 0);
@ -1066,6 +1075,7 @@ gimp_config (GPConfig *config)
if (_shm_addr == (guchar*) -1)
g_error ("could not attach to gimp shared memory segment\n");
}
#endif
}
static void

View File

@ -493,7 +493,7 @@ static gint palette_dialog(char *title) {
GtkWidget *dialog;
argv= g_malloc(sizeof(gchar *));
argv[0]= strdup("CEL file-filter");
argv[0]= g_strdup("CEL file-filter");
gtk_init (&argc, &argv);
gtk_rc_parse (gimp_gtkrc ());

View File

@ -493,7 +493,7 @@ static gint palette_dialog(char *title) {
GtkWidget *dialog;
argv= g_malloc(sizeof(gchar *));
argv[0]= strdup("CEL file-filter");
argv[0]= g_strdup("CEL file-filter");
gtk_init (&argc, &argv);
gtk_rc_parse (gimp_gtkrc ());

View File

@ -165,7 +165,7 @@ static void palette_close(GtkWidget *widget, GtkWidget **fs) {
static void palette_ok(GtkWidget *widget, GtkWidget **fs) {
g_free(filename);
filename= strdup( gtk_file_selection_get_filename(
filename= g_strdup( gtk_file_selection_get_filename(
GTK_FILE_SELECTION(fs)));
running= TRUE;
gtk_widget_destroy(GTK_WIDGET(fs));

View File

@ -165,7 +165,7 @@ static void palette_close(GtkWidget *widget, GtkWidget **fs) {
static void palette_ok(GtkWidget *widget, GtkWidget **fs) {
g_free(filename);
filename= strdup( gtk_file_selection_get_filename(
filename= g_strdup( gtk_file_selection_get_filename(
GTK_FILE_SELECTION(fs)));
running= TRUE;
gtk_widget_destroy(GTK_WIDGET(fs));

View File

@ -30,6 +30,25 @@
* Revision History:
*
* $Log$
* Revision 1.10 1998/08/28 23:01:44 yosh
* * acconfig.h
* * configure.in
* * app/main.c: added check for putenv and #ifdefed it's usage since NeXTStep is
* lame
*
* * libgimp/gimp.c
* * app/main.c
* * app/plug_in.c: conditionally compile shared mem stuff so platforms without
* it can still work
*
* * plug-ins/CEL/CEL.c
* * plug-ins/palette/palette.c
* * plug-ins/print/print-escp2.c
* * plug-ins/print/print-pcl.c
* * plug-ins/print/print-ps.c: s/strdup/g_strdup/ for portability
*
* -Yosh
*
* Revision 1.9 1998/05/17 07:16:45 yosh
* 0.99.31 fun
*
@ -151,7 +170,7 @@ escp2_parameters(int model, /* I - Printer model */
valptrs = g_new(char *, *count);
for (i = 0; i < *count; i ++)
valptrs[i] = strdup(p[i]);
valptrs[i] = g_strdup(p[i]);
return (valptrs);
}

View File

@ -34,6 +34,25 @@
* Revision History:
*
* $Log$
* Revision 1.10 1998/08/28 23:01:45 yosh
* * acconfig.h
* * configure.in
* * app/main.c: added check for putenv and #ifdefed it's usage since NeXTStep is
* lame
*
* * libgimp/gimp.c
* * app/main.c
* * app/plug_in.c: conditionally compile shared mem stuff so platforms without
* it can still work
*
* * plug-ins/CEL/CEL.c
* * plug-ins/palette/palette.c
* * plug-ins/print/print-escp2.c
* * plug-ins/print/print-pcl.c
* * plug-ins/print/print-ps.c: s/strdup/g_strdup/ for portability
*
* -Yosh
*
* Revision 1.9 1998/05/17 07:16:46 yosh
* 0.99.31 fun
*
@ -218,7 +237,7 @@ pcl_parameters(int model, /* I - Printer model */
valptrs = g_new(char *, *count);
for (i = 0; i < *count; i ++)
valptrs[i] = strdup(p[i]);
valptrs[i] = g_strdup(p[i]);
return (valptrs);
}

View File

@ -32,6 +32,25 @@
* Revision History:
*
* $Log$
* Revision 1.10 1998/08/28 23:01:46 yosh
* * acconfig.h
* * configure.in
* * app/main.c: added check for putenv and #ifdefed it's usage since NeXTStep is
* lame
*
* * libgimp/gimp.c
* * app/main.c
* * app/plug_in.c: conditionally compile shared mem stuff so platforms without
* it can still work
*
* * plug-ins/CEL/CEL.c
* * plug-ins/palette/palette.c
* * plug-ins/print/print-escp2.c
* * plug-ins/print/print-pcl.c
* * plug-ins/print/print-ps.c: s/strdup/g_strdup/ for portability
*
* -Yosh
*
* Revision 1.9 1998/05/17 07:16:47 yosh
* 0.99.31 fun
*
@ -175,7 +194,7 @@ ps_parameters(int model, /* I - Printer model */
valptrs = g_new(char *, 6);
for (i = 0; i < 6; i ++)
valptrs[i] = strdup(media_sizes[i]);
valptrs[i] = g_strdup(media_sizes[i]);
return (valptrs);
}
@ -198,7 +217,7 @@ ps_parameters(int model, /* I - Printer model */
if (strcasecmp(lname, name) == 0)
{
valptrs[*count] = strdup(loption);
valptrs[*count] = g_strdup(loption);
(*count) ++;
};
};
@ -532,28 +551,28 @@ ps_print(int model, /* I - Model (Level 1 or 2) */
if ((command = ppd_find(ppd_file, "PageSize", media_size, &order)) != NULL)
{
commands[num_commands].command = strdup(command);
commands[num_commands].command = g_strdup(command);
commands[num_commands].order = order;
num_commands ++;
};
if ((command = ppd_find(ppd_file, "InputSlot", media_source, &order)) != NULL)
{
commands[num_commands].command = strdup(command);
commands[num_commands].command = g_strdup(command);
commands[num_commands].order = order;
num_commands ++;
};
if ((command = ppd_find(ppd_file, "MediaType", media_type, &order)) != NULL)
{
commands[num_commands].command = strdup(command);
commands[num_commands].command = g_strdup(command);
commands[num_commands].order = order;
num_commands ++;
};
if ((command = ppd_find(ppd_file, "Resolution", resolution, &order)) != NULL)
{
commands[num_commands].command = strdup(command);
commands[num_commands].command = g_strdup(command);
commands[num_commands].order = order;
num_commands ++;
};